All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.dlm.model.Script Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.dlm.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* [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. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Script implements Serializable, Cloneable, StructuredPojo { /** *

* 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

*/ private java.util.List stages; /** *

* 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 *

*/ private String executionHandlerService; /** *

* 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 the AWSEC2-CreateVssSnapshot SSM 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. *

    *
  • *
*/ private String executionHandler; /** *

* 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 *

*/ private Boolean executeOperationOnScriptFailure; /** *

* 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 *

*/ private Integer executionTimeout; /** *

* 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 *

*/ private Integer maximumRetryCount; /** *

* 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

* * @return 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls * the SSM document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, * Amazon Data Lifecycle Manager calls the SSM document with the pre-script parameter before * initiating snapshot creation, and then it calls the SSM document again with the post-script * parameter after initiating snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST * @see StageValues */ public java.util.List getStages() { return 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

* * @param 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls * the SSM document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, * Amazon Data Lifecycle Manager calls the SSM document with the pre-script parameter before * initiating snapshot creation, and then it calls the SSM document again with the post-script * parameter after initiating snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST * @see StageValues */ public void setStages(java.util.Collection stages) { if (stages == null) { this.stages = null; return; } this.stages = new java.util.ArrayList(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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setStages(java.util.Collection)} or {@link #withStages(java.util.Collection)} if you want to override the * existing values. *

* * @param 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls * the SSM document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, * Amazon Data Lifecycle Manager calls the SSM document with the pre-script parameter before * initiating snapshot creation, and then it calls the SSM document again with the post-script * parameter after initiating snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST * @return Returns a reference to this object so that method calls can be chained together. * @see StageValues */ public Script withStages(String... stages) { if (this.stages == null) { setStages(new java.util.ArrayList(stages.length)); } for (String ele : stages) { this.stages.add(ele); } return this; } /** *

* 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

* * @param 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls * the SSM document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, * Amazon Data Lifecycle Manager calls the SSM document with the pre-script parameter before * initiating snapshot creation, and then it calls the SSM document again with the post-script * parameter after initiating snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST * @return Returns a reference to this object so that method calls can be chained together. * @see StageValues */ public Script withStages(java.util.Collection stages) { setStages(stages); return this; } /** *

* 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls the SSM * document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, Amazon Data * Lifecycle Manager calls the SSM document with the pre-script parameter before initiating snapshot * creation, and then it calls the SSM document again with the post-script parameter after initiating * snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST *

* * @param 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 the pre-script parameter before initiating snapshot creation. *

    *
  • *
  • *

    * To run a post script only, specify POST. In this case, Amazon Data Lifecycle Manager calls * the SSM document with the post-script parameter after initiating snapshot creation. *

    *
  • *
  • *

    * To run both pre and post scripts, specify both PRE and POST. In this case, * Amazon Data Lifecycle Manager calls the SSM document with the pre-script parameter before * initiating snapshot creation, and then it calls the SSM document again with the post-script * parameter after initiating snapshot creation. *

    *
  • *
*

* If you are automating VSS Backups, omit this parameter. *

*

* Default: PRE and POST * @return Returns a reference to this object so that method calls can be chained together. * @see StageValues */ public Script withStages(StageValues... stages) { java.util.ArrayList stagesCopy = new java.util.ArrayList(stages.length); for (StageValues value : stages) { stagesCopy.add(value.toString()); } if (getStages() == null) { setStages(stagesCopy); } else { getStages().addAll(stagesCopy); } return this; } /** *

* 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 *

* * @param executionHandlerService * 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 * @see ExecutionHandlerServiceValues */ public void setExecutionHandlerService(String executionHandlerService) { this.executionHandlerService = executionHandlerService; } /** *

* 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 *

* * @return 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 * @see ExecutionHandlerServiceValues */ public String getExecutionHandlerService() { return this.executionHandlerService; } /** *

* 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 *

* * @param executionHandlerService * 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 * @return Returns a reference to this object so that method calls can be chained together. * @see ExecutionHandlerServiceValues */ public Script withExecutionHandlerService(String executionHandlerService) { setExecutionHandlerService(executionHandlerService); return this; } /** *

* 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 *

* * @param executionHandlerService * 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 * @return Returns a reference to this object so that method calls can be chained together. * @see ExecutionHandlerServiceValues */ public Script withExecutionHandlerService(ExecutionHandlerServiceValues executionHandlerService) { this.executionHandlerService = executionHandlerService.toString(); return this; } /** *

* 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 the AWSEC2-CreateVssSnapshot SSM 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. *

    *
  • *
* * @param executionHandler * 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 the AWSEC2-CreateVssSnapshot SSM 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. *

    *
  • */ public void setExecutionHandler(String executionHandler) { this.executionHandler = executionHandler; } /** *

    * 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 the AWSEC2-CreateVssSnapshot SSM 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. *

      *
    • *
    * * @return 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 the AWSEC2-CreateVssSnapshot SSM 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. *

      *
    • */ public String getExecutionHandler() { return this.executionHandler; } /** *

      * 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 the AWSEC2-CreateVssSnapshot SSM 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. *

        *
      • *
      * * @param executionHandler * 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 the AWSEC2-CreateVssSnapshot SSM 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. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public Script withExecutionHandler(String executionHandler) { setExecutionHandler(executionHandler); return this; } /** *

        * 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 *

        * * @param executeOperationOnScriptFailure * 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 */ public void setExecuteOperationOnScriptFailure(Boolean executeOperationOnScriptFailure) { this.executeOperationOnScriptFailure = executeOperationOnScriptFailure; } /** *

        * 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 *

        * * @return 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 */ public Boolean getExecuteOperationOnScriptFailure() { return this.executeOperationOnScriptFailure; } /** *

        * 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 *

        * * @param executeOperationOnScriptFailure * 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 * @return Returns a reference to this object so that method calls can be chained together. */ public Script withExecuteOperationOnScriptFailure(Boolean executeOperationOnScriptFailure) { setExecuteOperationOnScriptFailure(executeOperationOnScriptFailure); return this; } /** *

        * 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 *

        * * @return 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 */ public Boolean isExecuteOperationOnScriptFailure() { return this.executeOperationOnScriptFailure; } /** *

        * 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 *

        * * @param executionTimeout * 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 */ public void setExecutionTimeout(Integer executionTimeout) { this.executionTimeout = executionTimeout; } /** *

        * 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 *

        * * @return 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 */ public Integer getExecutionTimeout() { return this.executionTimeout; } /** *

        * 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 *

        * * @param executionTimeout * 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 * @return Returns a reference to this object so that method calls can be chained together. */ public Script withExecutionTimeout(Integer executionTimeout) { setExecutionTimeout(executionTimeout); return this; } /** *

        * 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 *

        * * @param maximumRetryCount * 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 */ public void setMaximumRetryCount(Integer maximumRetryCount) { this.maximumRetryCount = maximumRetryCount; } /** *

        * 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 *

        * * @return 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 */ public Integer getMaximumRetryCount() { return this.maximumRetryCount; } /** *

        * 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 *

        * * @param maximumRetryCount * 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 * @return Returns a reference to this object so that method calls can be chained together. */ public Script withMaximumRetryCount(Integer maximumRetryCount) { setMaximumRetryCount(maximumRetryCount); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStages() != null) sb.append("Stages: ").append(getStages()).append(","); if (getExecutionHandlerService() != null) sb.append("ExecutionHandlerService: ").append(getExecutionHandlerService()).append(","); if (getExecutionHandler() != null) sb.append("ExecutionHandler: ").append(getExecutionHandler()).append(","); if (getExecuteOperationOnScriptFailure() != null) sb.append("ExecuteOperationOnScriptFailure: ").append(getExecuteOperationOnScriptFailure()).append(","); if (getExecutionTimeout() != null) sb.append("ExecutionTimeout: ").append(getExecutionTimeout()).append(","); if (getMaximumRetryCount() != null) sb.append("MaximumRetryCount: ").append(getMaximumRetryCount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Script == false) return false; Script other = (Script) obj; if (other.getStages() == null ^ this.getStages() == null) return false; if (other.getStages() != null && other.getStages().equals(this.getStages()) == false) return false; if (other.getExecutionHandlerService() == null ^ this.getExecutionHandlerService() == null) return false; if (other.getExecutionHandlerService() != null && other.getExecutionHandlerService().equals(this.getExecutionHandlerService()) == false) return false; if (other.getExecutionHandler() == null ^ this.getExecutionHandler() == null) return false; if (other.getExecutionHandler() != null && other.getExecutionHandler().equals(this.getExecutionHandler()) == false) return false; if (other.getExecuteOperationOnScriptFailure() == null ^ this.getExecuteOperationOnScriptFailure() == null) return false; if (other.getExecuteOperationOnScriptFailure() != null && other.getExecuteOperationOnScriptFailure().equals(this.getExecuteOperationOnScriptFailure()) == false) return false; if (other.getExecutionTimeout() == null ^ this.getExecutionTimeout() == null) return false; if (other.getExecutionTimeout() != null && other.getExecutionTimeout().equals(this.getExecutionTimeout()) == false) return false; if (other.getMaximumRetryCount() == null ^ this.getMaximumRetryCount() == null) return false; if (other.getMaximumRetryCount() != null && other.getMaximumRetryCount().equals(this.getMaximumRetryCount()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStages() == null) ? 0 : getStages().hashCode()); hashCode = prime * hashCode + ((getExecutionHandlerService() == null) ? 0 : getExecutionHandlerService().hashCode()); hashCode = prime * hashCode + ((getExecutionHandler() == null) ? 0 : getExecutionHandler().hashCode()); hashCode = prime * hashCode + ((getExecuteOperationOnScriptFailure() == null) ? 0 : getExecuteOperationOnScriptFailure().hashCode()); hashCode = prime * hashCode + ((getExecutionTimeout() == null) ? 0 : getExecutionTimeout().hashCode()); hashCode = prime * hashCode + ((getMaximumRetryCount() == null) ? 0 : getMaximumRetryCount().hashCode()); return hashCode; } @Override public Script clone() { try { return (Script) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.dlm.model.transform.ScriptMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy