NoncurrentVersionTransition Struct
Describes when noncurrent versions transition to a specified storage class.
| Source | aws-s3/lib/rule.ts |
|---|---|
| Type last changed |
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 noncurrentVersionTransition: s3.NoncurrentVersionTransition = {
storageClass: storageClass,
transitionAfter: cdk.Duration.minutes(30),
// the properties below are optional
noncurrentVersionsToRetain: 123,
};
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
noncurrent_version_transition = s3.NoncurrentVersionTransition(
storage_class=storage_class,
transition_after=cdk.Duration.minutes(30),
# the properties below are optional
noncurrent_versions_to_retain=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.*;
import software.amazon.awscdk.services.s3.*;
StorageClass storageClass;
NoncurrentVersionTransition noncurrentVersionTransition = NoncurrentVersionTransition.builder()
.storageClass(storageClass)
.transitionAfter(Duration.minutes(30))
// the properties below are optional
.noncurrentVersionsToRetain(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;
using Amazon.CDK.AWS.S3;
StorageClass storageClass;
var noncurrentVersionTransition = new NoncurrentVersionTransition {
StorageClass = storageClass,
TransitionAfter = Duration.Minutes(30),
// the properties below are optional
NoncurrentVersionsToRetain = 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 cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var storageClass StorageClass
noncurrentVersionTransition := &NoncurrentVersionTransition{
StorageClass: storageClass,
TransitionAfter: cdk.Duration_Minutes(jsii.Number(30)),
// the properties below are optional
NoncurrentVersionsToRetain: jsii.Number(123),
}
Properties
noncurrentVersionsToRetainoptionalnumbernoncurrent_versions_to_retainoptionalint | floatnoncurrentVersionsToRetainoptionalNumberNoncurrentVersionsToRetainoptionaldoubleNoncurrentVersionsToRetainoptional*float64 #Indicates the number of noncurrent version objects to be retained.
Default: No noncurrent version retained.
Can be up to 100 noncurrent versions retained.
storageClassStorageClassstorage_classStorageClassstorageClassStorageClassStorageClassStorageClassStorageClassStorageClass required #The storage class to which you want the object to transition.