interface ScheduleProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DLM.CfnLifecyclePolicy.ScheduleProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsdlm#CfnLifecyclePolicy_ScheduleProperty |
![]() | software.amazon.awscdk.services.dlm.CfnLifecyclePolicy.ScheduleProperty |
![]() | aws_cdk.aws_dlm.CfnLifecyclePolicy.ScheduleProperty |
![]() | aws-cdk-lib » aws_dlm » CfnLifecyclePolicy » ScheduleProperty |
[Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.
Example
// 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 scheduleProperty: dlm.CfnLifecyclePolicy.ScheduleProperty = {
archiveRule: {
retainRule: {
retentionArchiveTier: {
count: 123,
interval: 123,
intervalUnit: 'intervalUnit',
},
},
},
copyTags: false,
createRule: {
cronExpression: 'cronExpression',
interval: 123,
intervalUnit: 'intervalUnit',
location: 'location',
scripts: [{
executeOperationOnScriptFailure: false,
executionHandler: 'executionHandler',
executionHandlerService: 'executionHandlerService',
executionTimeout: 123,
maximumRetryCount: 123,
stages: ['stages'],
}],
times: ['times'],
},
crossRegionCopyRules: [{
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',
}],
deprecateRule: {
count: 123,
interval: 123,
intervalUnit: 'intervalUnit',
},
fastRestoreRule: {
availabilityZones: ['availabilityZones'],
count: 123,
interval: 123,
intervalUnit: 'intervalUnit',
},
name: 'name',
retainRule: {
count: 123,
interval: 123,
intervalUnit: 'intervalUnit',
},
shareRules: [{
targetAccounts: ['targetAccounts'],
unshareInterval: 123,
unshareIntervalUnit: 'unshareIntervalUnit',
}],
tagsToAdd: [{
key: 'key',
value: 'value',
}],
variableTags: [{
key: 'key',
value: 'value',
}],
};
Properties
Name | Type | Description |
---|---|---|
archive | IResolvable | Archive | [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule. |
copy | boolean | IResolvable | Copy all user-defined tags on a source volume to snapshots of the volume created by this policy. |
create | IResolvable | Create | The creation rule. |
cross | IResolvable | IResolvable | Cross [] | Specifies a rule for copying snapshots or AMIs across Regions. |
deprecate | IResolvable | Deprecate | [Custom AMI policies only] The AMI deprecation rule for the schedule. |
fast | IResolvable | Fast | [Custom snapshot policies only] The rule for enabling fast snapshot restore. |
name? | string | The name of the schedule. |
retain | IResolvable | Retain | The retention rule for snapshots or AMIs created by the policy. |
share | IResolvable | IResolvable | Share [] | [Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts . |
tags | IResolvable | IResolvable | Cfn [] | The tags to apply to policy-created resources. |
variable | IResolvable | IResolvable | Cfn [] | [AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed. |
archiveRule?
Type:
IResolvable
|
Archive
(optional)
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
When you specify an archiving rule, snapshots are automatically moved from the standard tier to the archive tier once the schedule's retention threshold is met. Snapshots are then retained in the archive tier for the archive retention period that you specify.
For more information about using snapshot archiving, see Considerations for snapshot lifecycle policies .
copyTags?
Type:
boolean |
IResolvable
(optional)
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
createRule?
Type:
IResolvable
|
Create
(optional)
The creation rule.
crossRegionCopyRules?
Type:
IResolvable
|
IResolvable
|
Cross
[]
(optional)
Specifies a rule for copying snapshots or AMIs across Regions.
You can't specify cross-Region copy rules for policies that create snapshots on an Outpost or in a Local Zone. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
deprecateRule?
Type:
IResolvable
|
Deprecate
(optional)
[Custom AMI policies only] The AMI deprecation rule for the schedule.
fastRestoreRule?
Type:
IResolvable
|
Fast
(optional)
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
name?
Type:
string
(optional)
The name of the schedule.
retainRule?
Type:
IResolvable
|
Retain
(optional)
The retention rule for snapshots or AMIs created by the policy.
shareRules?
Type:
IResolvable
|
IResolvable
|
Share
[]
(optional)
[Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts .
tagsToAdd?
Type:
IResolvable
|
IResolvable
|
Cfn
[]
(optional)
The tags to apply to policy-created resources.
These user-defined tags are in addition to the AWS -added lifecycle tags.
variableTags?
Type:
IResolvable
|
IResolvable
|
Cfn
[]
(optional)
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.
Keys may be any valid Amazon EC2 tag key. Values must be in one of the two following formats: $(instance-id)
or $(timestamp)
. Variable tags are only valid for EBS Snapshot Management – Instance policies.