ScriptProperty Struct
[Custom snapshot policies that target instances only] Information about pre and/or post scripts for a snapshot lifecycle policy that targets instances.
For more information, see Automating application-consistent snapshots with pre and post scripts .
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 scriptProperty: dlm.CfnLifecyclePolicy.ScriptProperty = {
executeOperationOnScriptFailure: false,
executionHandler: 'executionHandler',
executionHandlerService: 'executionHandlerService',
executionTimeout: 123,
maximumRetryCount: 123,
stages: ['stages'],
};
Properties
executeOperationOnScriptFailureboolean | IResolvableexecute_operation_on_script_failuretyping.Union[bool, IResolvable]executeOperationOnScriptFailureBooleanExecuteOperationOnScriptFailureboolExecuteOperationOnScriptFailureinterface{}#notes
- To default to crash consistent snapshot if the pre script fails, specify
true. - To skip the instance for snapshot creation if the pre script fails, specify
false.
This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.
Default: true
executionHandlerstringexecution_handlerstrexecutionHandlerStringExecutionHandlerstringExecutionHandler*string#notes
- If you are automating VSS backups, specify
AWS_VSS_BACKUP. In this case, Amazon Data Lifecycle Manager automatically uses theAWSEC2-CreateVssSnapshotSSM document. - If you are automating application-consistent snapshots for SAP HANA workloads, specify
AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA. - If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.
executionHandlerServicestringexecution_handler_servicestrexecutionHandlerServiceStringExecutionHandlerServicestringExecutionHandlerService*string#- If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify
AWS_SYSTEMS_MANAGER. - If you are automating VSS Backups, omit this parameter.
Default: AWS_SYSTEMS_MANAGER
executionTimeoutnumberexecution_timeoutint | floatexecutionTimeoutNumberExecutionTimeoutdoubleExecutionTimeout*float64#notes
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
maximumRetryCountnumbermaximum_retry_countint | floatmaximumRetryCountNumberMaximumRetryCountdoubleMaximumRetryCount*float64#notes
- If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.
- If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.
If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify 0 .
Default: 0
notes
Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.
- To run a pre script only, specify
PRE. In this case, Amazon Data Lifecycle Manager calls the SSM document with thepre-scriptparameter before initiating snapshot creation. - To run a post script only, specify
POST. In this case, Amazon Data Lifecycle Manager calls the SSM document with thepost-scriptparameter after initiating snapshot creation. - To run both pre and post scripts, specify both
PREandPOST. In this case, Amazon Data Lifecycle Manager calls the SSM document with thepre-scriptparameter before initiating snapshot creation, and then it calls the SSM document again with thepost-scriptparameter after initiating snapshot creation.
If you are automating VSS Backups, omit this parameter.
Default: PRE and POST