# CopyActionResourceTypeProperty

Copies backups created by a backup rule to another vault.

- 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_backup as backup } from 'aws-cdk-lib';
const copyActionResourceTypeProperty: backup.CfnBackupPlan.CopyActionResourceTypeProperty = {
  destinationBackupVaultArn: 'destinationBackupVaultArn',

  // the properties below are optional
  lifecycle: {
    deleteAfterDays: 123,
    moveToColdStorageAfterDays: 123,
    optInToArchiveForSupportedResources: false,
  },
};
```

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_backup as backup

copy_action_resource_type_property = backup.CfnBackupPlan.CopyActionResourceTypeProperty(
    destination_backup_vault_arn="destinationBackupVaultArn",

    # the properties below are optional
    lifecycle=backup.CfnBackupPlan.LifecycleResourceTypeProperty(
        delete_after_days=123,
        move_to_cold_storage_after_days=123,
        opt_in_to_archive_for_supported_resources=False
    )
)
```

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

CopyActionResourceTypeProperty copyActionResourceTypeProperty = CopyActionResourceTypeProperty.builder()
        .destinationBackupVaultArn("destinationBackupVaultArn")

        // the properties below are optional
        .lifecycle(LifecycleResourceTypeProperty.builder()
                .deleteAfterDays(123)
                .moveToColdStorageAfterDays(123)
                .optInToArchiveForSupportedResources(false)
                .build())
        .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.Backup;

var copyActionResourceTypeProperty = new CopyActionResourceTypeProperty {
    DestinationBackupVaultArn = "destinationBackupVaultArn",

    // the properties below are optional
    Lifecycle = new LifecycleResourceTypeProperty {
        DeleteAfterDays = 123,
        MoveToColdStorageAfterDays = 123,
        OptInToArchiveForSupportedResources = false
    }
};
```

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"

copyActionResourceTypeProperty := &CopyActionResourceTypeProperty{
	DestinationBackupVaultArn: jsii.String("destinationBackupVaultArn"),

	// the properties below are optional
	Lifecycle: &LifecycleResourceTypeProperty{
		DeleteAfterDays: jsii.Number(123),
		MoveToColdStorageAfterDays: jsii.Number(123),
		OptInToArchiveForSupportedResources: jsii.Boolean(false),
	},
}
```

## Properties

- `destinationBackupVaultArn`: string (required) — An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup.

  For example, `arn:aws:backup:us-east-1:123456789012:vault:aBackupVault.`

- `lifecycle`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnBackupPlan.LifecycleResourceTypeProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_backup.CfnBackupPlan.LifecycleResourceTypeProperty.html) — Defines when a protected resource is transitioned to cold storage and when it expires.

  AWS Backup transitions and expires backups automatically according to the lifecycle that you define. If you do not specify a lifecycle, AWS Backup applies the lifecycle policy of the source backup to the destination backup.

  Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days.
