# NoncurrentVersionTransitionProperty

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.

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

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

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

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

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

        // the properties below are optional
        .newerNoncurrentVersions(123)
        .build();
```

C# / .NET:

```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
};
```

Golang:

```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

- `newerNoncurrentVersions`: number — Specifies how many noncurrent versions Amazon S3 will retain.

  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](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide* .

- `storageClass`: string (required) — The class of storage used to store the object.

- `transitionInDays`: number (required) — Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action.

  For information about the noncurrent days calculations, see [How Amazon S3 Calculates How Long an Object Has Been Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide* .
