Struct aws_sdk_dlm::types::builders::ScriptBuilder
source · #[non_exhaustive]pub struct ScriptBuilder { /* private fields */ }Expand description
A builder for Script.
Implementations§
source§impl ScriptBuilder
impl ScriptBuilder
sourcepub fn stages(self, input: StageValues) -> Self
pub fn stages(self, input: StageValues) -> Self
Appends an item to stages.
To override the contents of this collection use set_stages.
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
sourcepub fn set_stages(self, input: Option<Vec<StageValues>>) -> Self
pub fn set_stages(self, input: Option<Vec<StageValues>>) -> Self
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
sourcepub fn get_stages(&self) -> &Option<Vec<StageValues>>
pub fn get_stages(&self) -> &Option<Vec<StageValues>>
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
sourcepub fn execution_handler_service(
self,
input: ExecutionHandlerServiceValues
) -> Self
pub fn execution_handler_service( self, input: ExecutionHandlerServiceValues ) -> Self
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
sourcepub fn set_execution_handler_service(
self,
input: Option<ExecutionHandlerServiceValues>
) -> Self
pub fn set_execution_handler_service( self, input: Option<ExecutionHandlerServiceValues> ) -> Self
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
sourcepub fn get_execution_handler_service(
&self
) -> &Option<ExecutionHandlerServiceValues>
pub fn get_execution_handler_service( &self ) -> &Option<ExecutionHandlerServiceValues>
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
sourcepub fn execution_handler(self, input: impl Into<String>) -> Self
pub fn execution_handler(self, input: impl Into<String>) -> Self
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.
sourcepub fn set_execution_handler(self, input: Option<String>) -> Self
pub fn set_execution_handler(self, input: Option<String>) -> Self
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.
sourcepub fn get_execution_handler(&self) -> &Option<String>
pub fn get_execution_handler(&self) -> &Option<String>
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.
sourcepub fn execute_operation_on_script_failure(self, input: bool) -> Self
pub fn execute_operation_on_script_failure(self, input: bool) -> Self
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
sourcepub fn set_execute_operation_on_script_failure(
self,
input: Option<bool>
) -> Self
pub fn set_execute_operation_on_script_failure( self, input: Option<bool> ) -> Self
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
sourcepub fn get_execute_operation_on_script_failure(&self) -> &Option<bool>
pub fn get_execute_operation_on_script_failure(&self) -> &Option<bool>
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
sourcepub fn execution_timeout(self, input: i32) -> Self
pub fn execution_timeout(self, input: i32) -> Self
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
sourcepub fn set_execution_timeout(self, input: Option<i32>) -> Self
pub fn set_execution_timeout(self, input: Option<i32>) -> Self
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
sourcepub fn get_execution_timeout(&self) -> &Option<i32>
pub fn get_execution_timeout(&self) -> &Option<i32>
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
sourcepub fn maximum_retry_count(self, input: i32) -> Self
pub fn maximum_retry_count(self, input: i32) -> Self
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
sourcepub fn set_maximum_retry_count(self, input: Option<i32>) -> Self
pub fn set_maximum_retry_count(self, input: Option<i32>) -> Self
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
sourcepub fn get_maximum_retry_count(&self) -> &Option<i32>
pub fn get_maximum_retry_count(&self) -> &Option<i32>
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
Trait Implementations§
source§impl Clone for ScriptBuilder
impl Clone for ScriptBuilder
source§fn clone(&self) -> ScriptBuilder
fn clone(&self) -> ScriptBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ScriptBuilder
impl Debug for ScriptBuilder
source§impl Default for ScriptBuilder
impl Default for ScriptBuilder
source§fn default() -> ScriptBuilder
fn default() -> ScriptBuilder
source§impl PartialEq for ScriptBuilder
impl PartialEq for ScriptBuilder
source§fn eq(&self, other: &ScriptBuilder) -> bool
fn eq(&self, other: &ScriptBuilder) -> bool
self and other values to be equal, and is used
by ==.