Interface CfnLifecyclePolicy.IPolicyDetailsProperty
[All policy types] Specifies the configuration of a lifecycle policy.
Namespace: Amazon.CDK.AWS.DLM
Assembly: Amazon.CDK.AWS.DLM.dll
Syntax (csharp)
public interface IPolicyDetailsProperty
Syntax (vb)
Public Interface IPolicyDetailsProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// 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 policyDetailsProperty = new PolicyDetailsProperty {
Actions = new [] { new ActionProperty {
CrossRegionCopy = new [] { 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"
}
} },
Name = "name"
} },
EventSource = new EventSourceProperty {
Type = "type",
// the properties below are optional
Parameters = new EventParametersProperty {
EventType = "eventType",
SnapshotOwner = new [] { "snapshotOwner" },
// the properties below are optional
DescriptionRegex = "descriptionRegex"
}
},
Parameters = new ParametersProperty {
ExcludeBootVolume = false,
ExcludeDataVolumeTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
NoReboot = false
},
PolicyType = "policyType",
ResourceLocations = new [] { "resourceLocations" },
ResourceTypes = new [] { "resourceTypes" },
Schedules = new [] { new ScheduleProperty {
ArchiveRule = new ArchiveRuleProperty {
RetainRule = new ArchiveRetainRuleProperty {
RetentionArchiveTier = new RetentionArchiveTierProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
}
}
},
CopyTags = false,
CreateRule = new CreateRuleProperty {
CronExpression = "cronExpression",
Interval = 123,
IntervalUnit = "intervalUnit",
Location = "location",
Times = new [] { "times" }
},
CrossRegionCopyRules = new [] { new CrossRegionCopyRuleProperty {
Encrypted = false,
// the properties below are optional
CmkArn = "cmkArn",
CopyTags = false,
DeprecateRule = new CrossRegionCopyDeprecateRuleProperty {
Interval = 123,
IntervalUnit = "intervalUnit"
},
RetainRule = new CrossRegionCopyRetainRuleProperty {
Interval = 123,
IntervalUnit = "intervalUnit"
},
Target = "target",
TargetRegion = "targetRegion"
} },
DeprecateRule = new DeprecateRuleProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
FastRestoreRule = new FastRestoreRuleProperty {
AvailabilityZones = new [] { "availabilityZones" },
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
Name = "name",
RetainRule = new RetainRuleProperty {
Count = 123,
Interval = 123,
IntervalUnit = "intervalUnit"
},
ShareRules = new [] { new ShareRuleProperty {
TargetAccounts = new [] { "targetAccounts" },
UnshareInterval = 123,
UnshareIntervalUnit = "unshareIntervalUnit"
} },
TagsToAdd = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
VariableTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
} },
TargetTags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Properties
Actions | [Event-based policies only] The actions to be performed when the event-based policy is activated. |
EventSource | [Event-based policies only] The event that activates the event-based policy. |
Parameters | [Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies. |
PolicyType | [All policy types] The valid target resource types and actions a policy can manage. |
ResourceLocations | [Snapshot and AMI policies only] The location of the resources to backup. |
ResourceTypes | [Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies. |
Schedules | [Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies. |
TargetTags | [Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy. |
Properties
Actions
[Event-based policies only] The actions to be performed when the event-based policy is activated.
virtual object Actions { get; }
Property Value
System.Object
Remarks
You can specify only one action per policy.
EventSource
[Event-based policies only] The event that activates the event-based policy.
virtual object EventSource { get; }
Property Value
System.Object
Remarks
Parameters
[Snapshot and AMI policies only] A set of optional parameters for snapshot and AMI lifecycle policies.
virtual object Parameters { get; }
Property Value
System.Object
Remarks
If you are modifying a policy that was created or previously modified using the Amazon Data Lifecycle Manager console, then you must include this parameter and specify either the default values or the new values that you require. You can't omit this parameter or set its values to null.
PolicyType
[All policy types] The valid target resource types and actions a policy can manage.
virtual string PolicyType { get; }
Property Value
System.String
Remarks
Specify EBS_SNAPSHOT_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of Amazon EBS snapshots. Specify IMAGE_MANAGEMENT
to create a lifecycle policy that manages the lifecycle of EBS-backed AMIs. Specify EVENT_BASED_POLICY
to create an event-based policy that performs specific actions when a defined event occurs in your AWS account .
The default is EBS_SNAPSHOT_MANAGEMENT
.
ResourceLocations
[Snapshot and AMI policies only] The location of the resources to backup.
virtual string[] ResourceLocations { get; }
Property Value
System.String[]
Remarks
If the source resources are located in an AWS Region , specify CLOUD
. If the source resources are located on an Outpost in your account, specify OUTPOST
.
If you specify OUTPOST
, Amazon Data Lifecycle Manager backs up all resources of the specified type with matching target tags across all of the Outposts in your account.
ResourceTypes
[Snapshot policies only] The target resource type for snapshot and AMI lifecycle policies.
virtual string[] ResourceTypes { get; }
Property Value
System.String[]
Remarks
Use VOLUME
to create snapshots of individual volumes or use INSTANCE
to create multi-volume snapshots from the volumes for an instance.
Schedules
[Snapshot and AMI policies only] The schedules of policy-defined actions for snapshot and AMI lifecycle policies.
virtual object Schedules { get; }
Property Value
System.Object
Remarks
A policy can have up to four schedules—one mandatory schedule and up to three optional schedules.
TargetTags
[Snapshot and AMI policies only] The single tag that identifies targeted resources for this policy.
virtual object TargetTags { get; }
Property Value
System.Object