# CrossRegionCopyRetainRuleProperty

Specifies a retention rule for cross-Region snapshot copies created by snapshot or event-based policies, or cross-Region AMI copies created by AMI policies.

After the retention period expires, the cross-Region copy is deleted.

- 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_dlm as dlm } from 'aws-cdk-lib';
const crossRegionCopyRetainRuleProperty: dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty = {
  interval: 123,
  intervalUnit: 'intervalUnit',
};
```

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_dlm as dlm

cross_region_copy_retain_rule_property = dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty(
    interval=123,
    interval_unit="intervalUnit"
)
```

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.dlm.*;

CrossRegionCopyRetainRuleProperty crossRegionCopyRetainRuleProperty = CrossRegionCopyRetainRuleProperty.builder()
        .interval(123)
        .intervalUnit("intervalUnit")
        .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.DLM;

var crossRegionCopyRetainRuleProperty = new CrossRegionCopyRetainRuleProperty {
    Interval = 123,
    IntervalUnit = "intervalUnit"
};
```

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"

crossRegionCopyRetainRuleProperty := &CrossRegionCopyRetainRuleProperty{
	Interval: jsii.Number(123),
	IntervalUnit: jsii.String("intervalUnit"),
}
```

## Properties

- `interval`: number (required) — The amount of time to retain a cross-Region snapshot or AMI copy.

  The maximum is 100 years. This is equivalent to 1200 months, 5200 weeks, or 36500 days.

- `intervalUnit`: string (required) — The unit of time for time-based retention.

  For example, to retain a cross-Region copy for 3 months, specify `Interval=3` and `IntervalUnit=MONTHS` .
