# TransitionProperty

Struct · External

Specifies when an object transitions to a specified storage class.

For more information about Amazon S3 lifecycle configuration rules, see [Transitioning Objects Using Amazon S3 Lifecycle](https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html) in the *Amazon S3 User Guide* .

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';
const transitionProperty: s3.CfnBucket.TransitionProperty = {
  storageClass: 'storageClass',

  // the properties below are optional
  transitionDate: new Date(),
  transitionInDays: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3

transition_property = s3.CfnBucket.TransitionProperty(
    storage_class="storageClass",

    # the properties below are optional
    transition_date=Date(),
    transition_in_days=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

TransitionProperty transitionProperty = TransitionProperty.builder()
        .storageClass("storageClass")

        // the properties below are optional
        .transitionDate(new Date())
        .transitionInDays(123)
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var transitionProperty = new TransitionProperty {
    StorageClass = "storageClass",

    // the properties below are optional
    TransitionDate = new Date(),
    TransitionInDays = 123
};
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

transitionProperty := &TransitionProperty{
	StorageClass: jsii.String("storageClass"),

	// the properties below are optional
	TransitionDate: NewDate(),
	TransitionInDays: jsii.Number(123),
}
```

## Properties

- `storageClass`: string (required) — The storage class to which you want the object to transition.

- `transitionDate`: date | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates when objects are transitioned to the specified storage class.

  The date value must be in ISO 8601 format. The time is always midnight UTC.

- `transitionInDays`: number — Indicates the number of days after creation when objects are transitioned to the specified storage class.

  If the specified storage class is `INTELLIGENT_TIERING` , `GLACIER_IR` , `GLACIER` , or `DEEP_ARCHIVE` , valid values are `0` or positive integers. If the specified storage class is `STANDARD_IA` or `ONEZONE_IA` , valid values are positive integers greater than `30` . Be aware that some storage classes have a minimum storage duration and that you're charged for transitioning objects before their minimum storage duration. For more information, see [Constraints and considerations for transitions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html#lifecycle-configuration-constraints) in the *Amazon S3 User Guide* .
