Class CfnLifecyclePolicy.CreateRuleProperty
[Custom snapshot and AMI policies only] Specifies when the policy should create snapshots or AMIs.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.DLM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CreateRuleProperty : Object, CfnLifecyclePolicy.ICreateRuleProperty
Syntax (vb)
Public Class CreateRuleProperty
Inherits Object
Implements CfnLifecyclePolicy.ICreateRuleProperty
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 createRuleProperty = 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" }
};
Synopsis
Constructors
CreateRuleProperty() |
Properties
CronExpression | The schedule, as a Cron expression. |
Interval | The interval between snapshots. |
IntervalUnit | The interval unit. |
Location | [Custom snapshot policies only] Specifies the destination for snapshots created by the policy. |
Scripts | [Custom snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances. |
Times | The time, in UTC, to start the operation. The supported format is hh:mm. |
Constructors
CreateRuleProperty()
public CreateRuleProperty()
Properties
CronExpression
The schedule, as a Cron expression.
public string CronExpression { get; set; }
Property Value
System.String
Remarks
The schedule interval must be between 1 hour and 1 year. For more information, see the Cron expressions reference in the Amazon EventBridge User Guide .
Interval
The interval between snapshots.
public Nullable<double> Interval { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.
IntervalUnit
The interval unit.
public string IntervalUnit { get; set; }
Property Value
System.String
Remarks
Location
[Custom snapshot policies only] Specifies the destination for snapshots created by the policy.
public string Location { get; set; }
Property Value
System.String
Remarks
To create snapshots in the same Region as the source resource, specify CLOUD
. To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL
. If you omit this parameter, CLOUD
is used by default.
If the policy targets resources in an AWS Region , then you must create snapshots in the same Region as the source resource. If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost as the source resource, or in the Region of that Outpost.
Scripts
[Custom snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances.
public object Scripts { get; set; }
Property Value
System.Object
Remarks
This is useful for creating application-consistent snapshots, or for performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.
For more information, see Automating application-consistent snapshots with pre and post scripts .
Times
The time, in UTC, to start the operation. The supported format is hh:mm.
public string[] Times { get; set; }
Property Value
System.String[]
Remarks
The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.