Skip to content
v2.278.0

NoncurrentVersionTransitionProperty Struct ​

Container for the transition rule that describes when noncurrent objects transition to the STANDARD_IA , ONEZONE_IA , INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE storage class.

If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the STANDARD_IA , ONEZONE_IA , INTELLIGENT_TIERING , GLACIER_IR , GLACIER , or DEEP_ARCHIVE storage class at a specific period in the object's lifetime. If you specify this property, don't specify the NoncurrentVersionTransitions property.

Example ​

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 noncurrentVersionTransitionProperty: s3.CfnBucket.NoncurrentVersionTransitionProperty = {
  storageClass: 'storageClass',
  transitionInDays: 123,

  // the properties below are optional
  newerNoncurrentVersions: 123,
};
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

noncurrent_version_transition_property = s3.CfnBucket.NoncurrentVersionTransitionProperty(
    storage_class="storageClass",
    transition_in_days=123,

    # the properties below are optional
    newer_noncurrent_versions=123
)
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.*;

NoncurrentVersionTransitionProperty noncurrentVersionTransitionProperty = NoncurrentVersionTransitionProperty.builder()
        .storageClass("storageClass")
        .transitionInDays(123)

        // the properties below are optional
        .newerNoncurrentVersions(123)
        .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.AWS.S3;

var noncurrentVersionTransitionProperty = new NoncurrentVersionTransitionProperty {
    StorageClass = "storageClass",
    TransitionInDays = 123,

    // the properties below are optional
    NewerNoncurrentVersions = 123
};
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"

noncurrentVersionTransitionProperty := &NoncurrentVersionTransitionProperty{
	StorageClass: jsii.String("storageClass"),
	TransitionInDays: jsii.Number(123),

	// the properties below are optional
	NewerNoncurrentVersions: jsii.Number(123),
}

Properties ​

newerNoncurrentVersionsoptionalnumbernewer_noncurrent_versionsoptionalint | floatnewerNoncurrentVersionsoptionalNumberNewerNoncurrentVersionsoptionaldoubleNewerNoncurrentVersionsoptional*float64 #
Specifies how many noncurrent versions Amazon S3 will retain.
notes

If there are this many more recent noncurrent versions, Amazon S3 will take the associated action. For more information about noncurrent versions, see Lifecycle configuration elements in the Amazon S3 User Guide .

storageClassstringstorage_classstrstorageClassStringStorageClassstringStorageClass*string required #
The class of storage used to store the object.
transitionInDaysnumbertransition_in_daysint | floattransitionInDaysNumberTransitionInDaysdoubleTransitionInDays*float64 required #
Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action.
notes

For information about the noncurrent days calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent in the Amazon S3 User Guide .