# CrossRegionCopyActionProperty

Struct · External

*[Event-based policies only]* Specifies a cross-Region copy action for event-based policies.

> To specify a cross-Region copy rule for snapshot and AMI policies, use [CrossRegionCopyRule](https://docs.aws.amazon.com/dlm/latest/APIReference/API_CrossRegionCopyRule.html) .

- 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 crossRegionCopyActionProperty: dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty = {
  encryptionConfiguration: {
    encrypted: false,

    // the properties below are optional
    cmkArn: 'cmkArn',
  },
  target: 'target',

  // the properties below are optional
  retainRule: {
    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_action_property = dlm.CfnLifecyclePolicy.CrossRegionCopyActionProperty(
    encryption_configuration=dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty(
        encrypted=False,

        # the properties below are optional
        cmk_arn="cmkArn"
    ),
    target="target",

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

CrossRegionCopyActionProperty crossRegionCopyActionProperty = CrossRegionCopyActionProperty.builder()
        .encryptionConfiguration(EncryptionConfigurationProperty.builder()
                .encrypted(false)

                // the properties below are optional
                .cmkArn("cmkArn")
                .build())
        .target("target")

        // the properties below are optional
        .retainRule(CrossRegionCopyRetainRuleProperty.builder()
                .interval(123)
                .intervalUnit("intervalUnit")
                .build())
        .build();
```

C#:

```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 crossRegionCopyActionProperty = new CrossRegionCopyActionProperty {
    EncryptionConfiguration = new EncryptionConfigurationProperty {
        Encrypted = false,

        // the properties below are optional
        CmkArn = "cmkArn"
    },
    Target = "target",

    // the properties below are optional
    RetainRule = new CrossRegionCopyRetainRuleProperty {
        Interval = 123,
        IntervalUnit = "intervalUnit"
    }
};
```

Go:

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

crossRegionCopyActionProperty := &CrossRegionCopyActionProperty{
	EncryptionConfiguration: &EncryptionConfigurationProperty{
		Encrypted: jsii.Boolean(false),

		// the properties below are optional
		CmkArn: jsii.String("cmkArn"),
	},
	Target: jsii.String("target"),

	// the properties below are optional
	RetainRule: &CrossRegionCopyRetainRuleProperty{
		Interval: jsii.Number(123),
		IntervalUnit: jsii.String("intervalUnit"),
	},
}
```

## Properties

- `encryptionConfiguration`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLifecyclePolicy.EncryptionConfigurationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dlm.CfnLifecyclePolicy.EncryptionConfigurationProperty.html) (required) — The encryption settings for the copied snapshot.

- `retainRule`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty.html) — 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.

- `target`: string (required) — The target Region.
