# CrossRegionCopyRuleProperty

*[Custom snapshot and AMI policies only]* Specifies a cross-Region copy rule for a snapshot and AMI policies.

> To specify a cross-Region copy action for event-based polices, use [CrossRegionCopyAction](https://docs.aws.amazon.com/dlm/latest/APIReference/API_CrossRegionCopyAction.html) .

- Source: Generated code
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

```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 crossRegionCopyRuleProperty: dlm.CfnLifecyclePolicy.CrossRegionCopyRuleProperty = {
  encrypted: false,

  // the properties below are optional
  cmkArn: 'cmkArn',
  copyTags: false,
  deprecateRule: {
    interval: 123,
    intervalUnit: 'intervalUnit',
  },
  retainRule: {
    interval: 123,
    intervalUnit: 'intervalUnit',
  },
  target: 'target',
  targetRegion: 'targetRegion',
};
```

## Properties

- `cmkArn`: string — The Amazon Resource Name (ARN) of the AWS KMS key to use for EBS encryption.

  If this parameter is not specified, the default KMS key for the account is used.

- `copyTags`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Indicates whether to copy all user-defined tags from the source snapshot or AMI to the cross-Region copy.

- `deprecateRule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_dlm.CfnLifecyclePolicy.CrossRegionCopyDeprecateRuleProperty.html) — *[Custom AMI policies only]* The AMI deprecation rule for cross-Region AMI copies created by the rule.

- `encrypted`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) (required) — To encrypt a copy of an unencrypted snapshot if encryption by default is not enabled, enable encryption using this parameter.

  Copies of encrypted snapshots are encrypted, even if this parameter is false or if encryption by default is not enabled.

- `retainRule`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_dlm.CfnLifecyclePolicy.CrossRegionCopyRetainRuleProperty.html) — The retention rule that indicates how long the cross-Region snapshot or AMI copies are to be retained in the destination Region.

- `target`: string — > Use this parameter for snapshot policies only. For AMI policies, use *TargetRegion* instead.

  *[Custom snapshot policies only]* The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.

- `targetRegion`: string — > Use this parameter for AMI policies only.

  For snapshot policies, use *Target* instead. For snapshot policies created before the *Target* parameter was introduced, this parameter indicates the target Region for snapshot copies.

  *[Custom AMI policies only]* The target Region or the Amazon Resource Name (ARN) of the target Outpost for the snapshot copies.
