Class CfnLifecyclePolicy.ScheduleProperty
[Custom snapshot and AMI policies only] Specifies a schedule for a snapshot or AMI lifecycle policy.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.DLM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ScheduleProperty : Object, CfnLifecyclePolicy.IScheduleProperty
Syntax (vb)
Public Class ScheduleProperty
Inherits Object
Implements CfnLifecyclePolicy.IScheduleProperty
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 scheduleProperty = 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",
Scripts = new [] { new ScriptProperty {
ExecuteOperationOnScriptFailure = false,
ExecutionHandler = "executionHandler",
ExecutionHandlerService = "executionHandlerService",
ExecutionTimeout = 123,
MaximumRetryCount = 123,
Stages = new [] { "stages" }
} },
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"
} }
};
Synopsis
Constructors
ScheduleProperty() |
Properties
ArchiveRule | [Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule. |
CopyTags | Copy all user-defined tags on a source volume to snapshots of the volume created by this policy. |
CreateRule | The creation rule. |
CrossRegionCopyRules | Specifies a rule for copying snapshots or AMIs across regions. |
DeprecateRule | [Custom AMI policies only] The AMI deprecation rule for the schedule. |
FastRestoreRule | [Custom snapshot policies only] The rule for enabling fast snapshot restore. |
Name | The name of the schedule. |
RetainRule | The retention rule for snapshots or AMIs created by the policy. |
ShareRules | [Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts . |
TagsToAdd | The tags to apply to policy-created resources. |
VariableTags | [AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed. |
Constructors
ScheduleProperty()
public ScheduleProperty()
Properties
ArchiveRule
[Custom snapshot policies that target volumes only] The snapshot archiving rule for the schedule.
public object ArchiveRule { get; set; }
Property Value
System.Object
Remarks
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
Copy all user-defined tags on a source volume to snapshots of the volume created by this policy.
public object CopyTags { get; set; }
Property Value
System.Object
Remarks
CreateRule
The creation rule.
public object CreateRule { get; set; }
Property Value
System.Object
Remarks
CrossRegionCopyRules
Specifies a rule for copying snapshots or AMIs across regions.
public object CrossRegionCopyRules { get; set; }
Property Value
System.Object
Remarks
You can't specify cross-Region copy rules for policies that create snapshots on an Outpost. If the policy creates snapshots in a Region, then snapshots can be copied to up to three Regions or Outposts.
DeprecateRule
[Custom AMI policies only] The AMI deprecation rule for the schedule.
public object DeprecateRule { get; set; }
Property Value
System.Object
Remarks
FastRestoreRule
[Custom snapshot policies only] The rule for enabling fast snapshot restore.
public object FastRestoreRule { get; set; }
Property Value
System.Object
Remarks
Name
The name of the schedule.
public string Name { get; set; }
Property Value
System.String
Remarks
RetainRule
The retention rule for snapshots or AMIs created by the policy.
public object RetainRule { get; set; }
Property Value
System.Object
Remarks
ShareRules
[Custom snapshot policies only] The rule for sharing snapshots with other AWS accounts .
public object ShareRules { get; set; }
Property Value
System.Object
Remarks
TagsToAdd
The tags to apply to policy-created resources.
public object TagsToAdd { get; set; }
Property Value
System.Object
Remarks
These user-defined tags are in addition to the AWS -added lifecycle tags.
VariableTags
[AMI policies and snapshot policies that target instances only] A collection of key/value pairs with values determined dynamically when the policy is executed.
public object VariableTags { get; set; }
Property Value
System.Object
Remarks
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.