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

com.amazonaws.services.cloudformation.model.RollbackConfiguration Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.cloudformation.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* Structure containing the rollback triggers for CloudFormation to monitor during stack creation and updating * operations, and for the specified monitoring period afterwards. *

*

* Rollback triggers enable you to have CloudFormation monitor the state of your application during stack creation and * updating, and to roll back that operation if the application breaches the threshold of any of the alarms you've * specified. For more information, see Monitor and * Roll Back Stack Operations. *

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

* The triggers to monitor during stack creation or update actions. *

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent * update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this * parameter, those triggers replace any list of triggers previously specified for the stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used for this * stack, even triggers you've specified before (for example, when creating the stack or during a previous stack * update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. *

*/ private com.amazonaws.internal.SdkInternalList rollbackTriggers; /** *

* The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after the * stack creation or update operation deploys all necessary resources. *

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this monitoring * period to perform any manual stack validation desired, and manually cancel the stack creation or update (using * CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during stack * creation and update operations. Then, for update operations, it begins disposing of old resources immediately * once the operation completes. *

*/ private Integer monitoringTimeInMinutes; /** *

* The triggers to monitor during stack creation or update actions. *

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent * update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this * parameter, those triggers replace any list of triggers previously specified for the stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used for this * stack, even triggers you've specified before (for example, when creating the stack or during a previous stack * update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. *

* * @return The triggers to monitor during stack creation or update actions.

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any * subsequent update operations for the stack, unless you specify otherwise. If you do specify rollback * triggers for this parameter, those triggers replace any list of triggers previously specified for the * stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used * for this stack, even triggers you've specified before (for example, when creating the stack or during a * previous stack update). Any triggers that you don't include in the updated list of triggers are no longer * applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. */ public java.util.List getRollbackTriggers() { if (rollbackTriggers == null) { rollbackTriggers = new com.amazonaws.internal.SdkInternalList(); } return rollbackTriggers; } /** *

* The triggers to monitor during stack creation or update actions. *

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent * update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this * parameter, those triggers replace any list of triggers previously specified for the stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used for this * stack, even triggers you've specified before (for example, when creating the stack or during a previous stack * update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. *

* * @param rollbackTriggers * The triggers to monitor during stack creation or update actions.

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any * subsequent update operations for the stack, unless you specify otherwise. If you do specify rollback * triggers for this parameter, those triggers replace any list of triggers previously specified for the * stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used * for this stack, even triggers you've specified before (for example, when creating the stack or during a * previous stack update). Any triggers that you don't include in the updated list of triggers are no longer * applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. */ public void setRollbackTriggers(java.util.Collection rollbackTriggers) { if (rollbackTriggers == null) { this.rollbackTriggers = null; return; } this.rollbackTriggers = new com.amazonaws.internal.SdkInternalList(rollbackTriggers); } /** *

* The triggers to monitor during stack creation or update actions. *

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent * update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this * parameter, those triggers replace any list of triggers previously specified for the stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used for this * stack, even triggers you've specified before (for example, when creating the stack or during a previous stack * update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. *

*

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

* * @param rollbackTriggers * The triggers to monitor during stack creation or update actions.

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any * subsequent update operations for the stack, unless you specify otherwise. If you do specify rollback * triggers for this parameter, those triggers replace any list of triggers previously specified for the * stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used * for this stack, even triggers you've specified before (for example, when creating the stack or during a * previous stack update). Any triggers that you don't include in the updated list of triggers are no longer * applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. * @return Returns a reference to this object so that method calls can be chained together. */ public RollbackConfiguration withRollbackTriggers(RollbackTrigger... rollbackTriggers) { if (this.rollbackTriggers == null) { setRollbackTriggers(new com.amazonaws.internal.SdkInternalList(rollbackTriggers.length)); } for (RollbackTrigger ele : rollbackTriggers) { this.rollbackTriggers.add(ele); } return this; } /** *

* The triggers to monitor during stack creation or update actions. *

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any subsequent * update operations for the stack, unless you specify otherwise. If you do specify rollback triggers for this * parameter, those triggers replace any list of triggers previously specified for the stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used for this * stack, even triggers you've specified before (for example, when creating the stack or during a previous stack * update). Any triggers that you don't include in the updated list of triggers are no longer applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. *

* * @param rollbackTriggers * The triggers to monitor during stack creation or update actions.

*

* By default, CloudFormation saves the rollback triggers specified for a stack and applies them to any * subsequent update operations for the stack, unless you specify otherwise. If you do specify rollback * triggers for this parameter, those triggers replace any list of triggers previously specified for the * stack. This means: *

*
    *
  • *

    * To use the rollback triggers previously specified for this stack, if any, don't specify this parameter. *

    *
  • *
  • *

    * To specify new or updated rollback triggers, you must specify all the triggers that you want used * for this stack, even triggers you've specified before (for example, when creating the stack or during a * previous stack update). Any triggers that you don't include in the updated list of triggers are no longer * applied to the stack. *

    *
  • *
  • *

    * To remove all currently specified triggers, specify an empty list for this parameter. *

    *
  • *
*

* If a specified trigger is missing, the entire stack operation fails and is rolled back. * @return Returns a reference to this object so that method calls can be chained together. */ public RollbackConfiguration withRollbackTriggers(java.util.Collection rollbackTriggers) { setRollbackTriggers(rollbackTriggers); return this; } /** *

* The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after the * stack creation or update operation deploys all necessary resources. *

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this monitoring * period to perform any manual stack validation desired, and manually cancel the stack creation or update (using * CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during stack * creation and update operations. Then, for update operations, it begins disposing of old resources immediately * once the operation completes. *

* * @param monitoringTimeInMinutes * The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after * the stack creation or update operation deploys all necessary resources.

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this * monitoring period to perform any manual stack validation desired, and manually cancel the stack creation * or update (using CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during * stack creation and update operations. Then, for update operations, it begins disposing of old resources * immediately once the operation completes. */ public void setMonitoringTimeInMinutes(Integer monitoringTimeInMinutes) { this.monitoringTimeInMinutes = monitoringTimeInMinutes; } /** *

* The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after the * stack creation or update operation deploys all necessary resources. *

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this monitoring * period to perform any manual stack validation desired, and manually cancel the stack creation or update (using * CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during stack * creation and update operations. Then, for update operations, it begins disposing of old resources immediately * once the operation completes. *

* * @return The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers * after the stack creation or update operation deploys all necessary resources.

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits * the specified period of time before cleaning up old resources after update operations. You can use this * monitoring period to perform any manual stack validation desired, and manually cancel the stack creation * or update (using CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during * stack creation and update operations. Then, for update operations, it begins disposing of old resources * immediately once the operation completes. */ public Integer getMonitoringTimeInMinutes() { return this.monitoringTimeInMinutes; } /** *

* The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after the * stack creation or update operation deploys all necessary resources. *

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this monitoring * period to perform any manual stack validation desired, and manually cancel the stack creation or update (using * CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during stack * creation and update operations. Then, for update operations, it begins disposing of old resources immediately * once the operation completes. *

* * @param monitoringTimeInMinutes * The amount of time, in minutes, during which CloudFormation should monitor all the rollback triggers after * the stack creation or update operation deploys all necessary resources.

*

* The default is 0 minutes. *

*

* If you specify a monitoring period but don't specify any rollback triggers, CloudFormation still waits the * specified period of time before cleaning up old resources after update operations. You can use this * monitoring period to perform any manual stack validation desired, and manually cancel the stack creation * or update (using CancelUpdateStack, for example) as necessary. *

*

* If you specify 0 for this parameter, CloudFormation still monitors the specified rollback triggers during * stack creation and update operations. Then, for update operations, it begins disposing of old resources * immediately once the operation completes. * @return Returns a reference to this object so that method calls can be chained together. */ public RollbackConfiguration withMonitoringTimeInMinutes(Integer monitoringTimeInMinutes) { setMonitoringTimeInMinutes(monitoringTimeInMinutes); 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 (getRollbackTriggers() != null) sb.append("RollbackTriggers: ").append(getRollbackTriggers()).append(","); if (getMonitoringTimeInMinutes() != null) sb.append("MonitoringTimeInMinutes: ").append(getMonitoringTimeInMinutes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RollbackConfiguration == false) return false; RollbackConfiguration other = (RollbackConfiguration) obj; if (other.getRollbackTriggers() == null ^ this.getRollbackTriggers() == null) return false; if (other.getRollbackTriggers() != null && other.getRollbackTriggers().equals(this.getRollbackTriggers()) == false) return false; if (other.getMonitoringTimeInMinutes() == null ^ this.getMonitoringTimeInMinutes() == null) return false; if (other.getMonitoringTimeInMinutes() != null && other.getMonitoringTimeInMinutes().equals(this.getMonitoringTimeInMinutes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRollbackTriggers() == null) ? 0 : getRollbackTriggers().hashCode()); hashCode = prime * hashCode + ((getMonitoringTimeInMinutes() == null) ? 0 : getMonitoringTimeInMinutes().hashCode()); return hashCode; } @Override public RollbackConfiguration clone() { try { return (RollbackConfiguration) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy