Class CfnLifecyclePolicy.ScriptProperty
[Custom snapshot policies that target instances only] Information about pre and/or post scripts for a snapshot lifecycle policy that targets instances.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.DLM
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ScriptProperty : Object, CfnLifecyclePolicy.IScriptProperty
Syntax (vb)
Public Class ScriptProperty
Inherits Object
Implements CfnLifecyclePolicy.IScriptProperty
Remarks
For more information, see Automating application-consistent snapshots with pre and post scripts .
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 scriptProperty = new ScriptProperty {
ExecuteOperationOnScriptFailure = false,
ExecutionHandler = "executionHandler",
ExecutionHandlerService = "executionHandlerService",
ExecutionTimeout = 123,
MaximumRetryCount = 123,
Stages = new [] { "stages" }
};
Synopsis
Constructors
ScriptProperty() |
Properties
ExecuteOperationOnScriptFailure | Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails. |
ExecutionHandler | The SSM document that includes the pre and/or post scripts to run. |
ExecutionHandlerService | Indicates the service used to execute the pre and/or post scripts. |
ExecutionTimeout | Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. |
MaximumRetryCount | Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail. |
Stages | Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. |
Constructors
ScriptProperty()
public ScriptProperty()
Properties
ExecuteOperationOnScriptFailure
Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.
public object ExecuteOperationOnScriptFailure { get; set; }
Property Value
System.Object
Remarks
This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.
Default: true
ExecutionHandler
The SSM document that includes the pre and/or post scripts to run.
public string ExecutionHandler { get; set; }
Property Value
System.String
Remarks
ExecutionHandlerService
Indicates the service used to execute the pre and/or post scripts.
public string ExecutionHandlerService { get; set; }
Property Value
System.String
Remarks
ExecutionTimeout
Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed.
public Nullable<double> ExecutionTimeout { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.
If you are automating VSS Backups, omit this parameter.
Default: 10
MaximumRetryCount
Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.
public Nullable<double> MaximumRetryCount { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify 0
.
Default: 0
Stages
Indicate which scripts Amazon Data Lifecycle Manager should run on target instances.
public string[] Stages { get; set; }
Property Value
System.String[]
Remarks
Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.
If you are automating VSS Backups, omit this parameter.
Default: PRE and POST