Class: AWSCDK::DLM::CfnLifecyclePolicy::ScriptProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DLM::CfnLifecyclePolicy::ScriptProperty
- Defined in:
- dlm/cfn_lifecycle_policy.rb
Overview
[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 .
Instance Attribute Summary collapse
-
#execute_operation_on_script_failure ⇒ Boolean, ...
readonly
Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.
-
#execution_handler ⇒ String?
readonly
The SSM document that includes the pre and/or post scripts to run.
-
#execution_handler_service ⇒ String?
readonly
Indicates the service used to execute the pre and/or post scripts.
-
#execution_timeout ⇒ Numeric?
readonly
Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed.
-
#maximum_retry_count ⇒ Numeric?
readonly
Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.
-
#stages ⇒ Array<String>?
readonly
Indicate which scripts Amazon Data Lifecycle Manager should run on target instances.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(execute_operation_on_script_failure: nil, execution_handler: nil, execution_handler_service: nil, execution_timeout: nil, maximum_retry_count: nil, stages: nil) ⇒ ScriptProperty
constructor
A new instance of ScriptProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(execute_operation_on_script_failure: nil, execution_handler: nil, execution_handler_service: nil, execution_timeout: nil, maximum_retry_count: nil, stages: nil) ⇒ ScriptProperty
Returns a new instance of ScriptProperty.
2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2109 def initialize(execute_operation_on_script_failure: nil, execution_handler: nil, execution_handler_service: nil, execution_timeout: nil, maximum_retry_count: nil, stages: nil) @execute_operation_on_script_failure = execute_operation_on_script_failure Jsii::Type.check_type(@execute_operation_on_script_failure, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "executeOperationOnScriptFailure") unless @execute_operation_on_script_failure.nil? @execution_handler = execution_handler Jsii::Type.check_type(@execution_handler, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionHandler") unless @execution_handler.nil? @execution_handler_service = execution_handler_service Jsii::Type.check_type(@execution_handler_service, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "executionHandlerService") unless @execution_handler_service.nil? @execution_timeout = execution_timeout Jsii::Type.check_type(@execution_timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "executionTimeout") unless @execution_timeout.nil? @maximum_retry_count = maximum_retry_count Jsii::Type.check_type(@maximum_retry_count, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maximumRetryCount") unless @maximum_retry_count.nil? @stages = stages Jsii::Type.check_type(@stages, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "stages") unless @stages.nil? end |
Instance Attribute Details
#execute_operation_on_script_failure ⇒ Boolean, ... (readonly)
Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.
- 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
2135 2136 2137 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2135 def execute_operation_on_script_failure @execute_operation_on_script_failure end |
#execution_handler ⇒ String? (readonly)
The SSM document that includes the pre and/or post scripts to run.
- 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.
2144 2145 2146 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2144 def execution_handler @execution_handler end |
#execution_handler_service ⇒ String? (readonly)
Indicates the service used to execute the pre and/or post scripts.
- 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
2154 2155 2156 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2154 def execution_handler_service @execution_handler_service end |
#execution_timeout ⇒ Numeric? (readonly)
Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed.
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
2165 2166 2167 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2165 def execution_timeout @execution_timeout end |
#maximum_retry_count ⇒ Numeric? (readonly)
Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.
- 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
2177 2178 2179 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2177 def maximum_retry_count @maximum_retry_count end |
#stages ⇒ Array<String>? (readonly)
Indicate which scripts Amazon Data Lifecycle Manager should run on target instances.
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
2192 2193 2194 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2192 def stages @stages end |
Class Method Details
.jsii_properties ⇒ Object
2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2194 def self.jsii_properties { :execute_operation_on_script_failure => "executeOperationOnScriptFailure", :execution_handler => "executionHandler", :execution_handler_service => "executionHandlerService", :execution_timeout => "executionTimeout", :maximum_retry_count => "maximumRetryCount", :stages => "stages", } end |
Instance Method Details
#to_jsii ⇒ Object
2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 |
# File 'dlm/cfn_lifecycle_policy.rb', line 2205 def to_jsii result = {} result.merge!({ "executeOperationOnScriptFailure" => @execute_operation_on_script_failure, "executionHandler" => @execution_handler, "executionHandlerService" => @execution_handler_service, "executionTimeout" => @execution_timeout, "maximumRetryCount" => @maximum_retry_count, "stages" => @stages, }) result.compact end |