Skip to content
v2.278.0

Transition Struct ​

Describes when an object transitions to a specified storage class.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const storageClass: s3.StorageClass;
const transition: s3.Transition = {
  storageClass: storageClass,

  // the properties below are optional
  transitionAfter: cdk.Duration.minutes(30),
  transitionDate: new Date(),
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_s3 as s3

# storage_class: s3.StorageClass

transition = s3.Transition(
    storage_class=storage_class,

    # the properties below are optional
    transition_after=cdk.Duration.minutes(30),
    transition_date=Date()
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.s3.*;

StorageClass storageClass;

Transition transition = Transition.builder()
        .storageClass(storageClass)

        // the properties below are optional
        .transitionAfter(Duration.minutes(30))
        .transitionDate(new Date())
        .build();
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;
using Amazon.CDK.AWS.S3;

StorageClass storageClass;

var transition = new Transition {
    StorageClass = storageClass,

    // the properties below are optional
    TransitionAfter = Duration.Minutes(30),
    TransitionDate = new Date()
};
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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var storageClass StorageClass

transition := &Transition{
	StorageClass: storageClass,

	// the properties below are optional
	TransitionAfter: cdk.Duration_Minutes(jsii.Number(30)),
	TransitionDate: NewDate(),
}

Properties ​

storageClassStorageClassstorage_classStorageClassstorageClassStorageClassStorageClassStorageClassStorageClassStorageClass required #
The storage class to which you want the object to transition.
transitionAfteroptionalDurationtransition_afteroptionalDurationtransitionAfteroptionalDurationTransitionAfteroptionalDurationTransitionAfteroptionalDuration #
Indicates the number of days after creation when objects are transitioned to the specified storage class.

Default: No transition count.

transitionDateoptionaldatetransition_dateoptionaldatetimetransitionDateoptionalInstantTransitionDateoptionalDateTimeTransitionDateoptional*time.Time #
Indicates when objects are transitioned to the specified storage class.

Default: No transition date.

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