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

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

Go to download

The AWS Java SDK for AWS CloudFormation module holds the client classes that are used for communicating with AWS CloudFormation Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2012-2017 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;

/**
 * 

* An AWS CloudFormation stack, in a specific account and region, that's part of a stack set operation. A stack instance * is a reference to an attempted or actual stack in a given account within a given region. A stack instance can exist * without a stack—for example, if the stack couldn't be created for some reason. A stack instance is associated with * only one stack set. Each stack instance contains the ID of its associated stack set, as well as the ID of the actual * stack and the stack status. *

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

* The name or unique ID of the stack set that the stack instance is associated with. *

*/ private String stackSetId; /** *

* The name of the AWS region that the stack instance is associated with. *

*/ private String region; /** *

* The name of the AWS account that the stack instance is associated with. *

*/ private String account; /** *

* The ID of the stack instance. *

*/ private String stackId; /** *

* The status of the stack instance, in terms of its synchronization with its associated stack set. *

*
    *
  • *

    * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

    *
  • *
  • *

    * OUTDATED: The stack isn't currently up to date with the stack set because: *

    *
      *
    • *

      * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

      *
    • *
    • *

      * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

      *
    • *
    *
  • *
  • *

    * CURRENT: The stack is currently up to date with the stack set. *

    *
  • *
*/ private String status; /** *

* The explanation for the specific status code that is assigned to this stack instance. *

*/ private String statusReason; /** *

* The name or unique ID of the stack set that the stack instance is associated with. *

* * @param stackSetId * The name or unique ID of the stack set that the stack instance is associated with. */ public void setStackSetId(String stackSetId) { this.stackSetId = stackSetId; } /** *

* The name or unique ID of the stack set that the stack instance is associated with. *

* * @return The name or unique ID of the stack set that the stack instance is associated with. */ public String getStackSetId() { return this.stackSetId; } /** *

* The name or unique ID of the stack set that the stack instance is associated with. *

* * @param stackSetId * The name or unique ID of the stack set that the stack instance is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public StackInstance withStackSetId(String stackSetId) { setStackSetId(stackSetId); return this; } /** *

* The name of the AWS region that the stack instance is associated with. *

* * @param region * The name of the AWS region that the stack instance is associated with. */ public void setRegion(String region) { this.region = region; } /** *

* The name of the AWS region that the stack instance is associated with. *

* * @return The name of the AWS region that the stack instance is associated with. */ public String getRegion() { return this.region; } /** *

* The name of the AWS region that the stack instance is associated with. *

* * @param region * The name of the AWS region that the stack instance is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public StackInstance withRegion(String region) { setRegion(region); return this; } /** *

* The name of the AWS account that the stack instance is associated with. *

* * @param account * The name of the AWS account that the stack instance is associated with. */ public void setAccount(String account) { this.account = account; } /** *

* The name of the AWS account that the stack instance is associated with. *

* * @return The name of the AWS account that the stack instance is associated with. */ public String getAccount() { return this.account; } /** *

* The name of the AWS account that the stack instance is associated with. *

* * @param account * The name of the AWS account that the stack instance is associated with. * @return Returns a reference to this object so that method calls can be chained together. */ public StackInstance withAccount(String account) { setAccount(account); return this; } /** *

* The ID of the stack instance. *

* * @param stackId * The ID of the stack instance. */ public void setStackId(String stackId) { this.stackId = stackId; } /** *

* The ID of the stack instance. *

* * @return The ID of the stack instance. */ public String getStackId() { return this.stackId; } /** *

* The ID of the stack instance. *

* * @param stackId * The ID of the stack instance. * @return Returns a reference to this object so that method calls can be chained together. */ public StackInstance withStackId(String stackId) { setStackId(stackId); return this; } /** *

* The status of the stack instance, in terms of its synchronization with its associated stack set. *

*
    *
  • *

    * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

    *
  • *
  • *

    * OUTDATED: The stack isn't currently up to date with the stack set because: *

    *
      *
    • *

      * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

      *
    • *
    • *

      * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

      *
    • *
    *
  • *
  • *

    * CURRENT: The stack is currently up to date with the stack set. *

    *
  • *
* * @param status * The status of the stack instance, in terms of its synchronization with its associated stack set.

*
    *
  • *

    * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

    *
  • *
  • *

    * OUTDATED: The stack isn't currently up to date with the stack set because: *

    *
      *
    • *

      * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

      *
    • *
    • *

      * The stack was part of a CreateStackSet or UpdateStackSet operation that failed * or was stopped before the stack was created or updated. *

      *
    • *
    *
  • *
  • *

    * CURRENT: The stack is currently up to date with the stack set. *

    *
  • * @see StackInstanceStatus */ public void setStatus(String status) { this.status = status; } /** *

    * The status of the stack instance, in terms of its synchronization with its associated stack set. *

    *
      *
    • *

      * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

      *
    • *
    • *

      * OUTDATED: The stack isn't currently up to date with the stack set because: *

      *
        *
      • *

        * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

        *
      • *
      • *

        * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

        *
      • *
      *
    • *
    • *

      * CURRENT: The stack is currently up to date with the stack set. *

      *
    • *
    * * @return The status of the stack instance, in terms of its synchronization with its associated stack set.

    *
      *
    • *

      * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in * an unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

      *
    • *
    • *

      * OUTDATED: The stack isn't currently up to date with the stack set because: *

      *
        *
      • *

        * The associated stack failed during a CreateStackSet or UpdateStackSet * operation. *

        *
      • *
      • *

        * The stack was part of a CreateStackSet or UpdateStackSet operation that failed * or was stopped before the stack was created or updated. *

        *
      • *
      *
    • *
    • *

      * CURRENT: The stack is currently up to date with the stack set. *

      *
    • * @see StackInstanceStatus */ public String getStatus() { return this.status; } /** *

      * The status of the stack instance, in terms of its synchronization with its associated stack set. *

      *
        *
      • *

        * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

        *
      • *
      • *

        * OUTDATED: The stack isn't currently up to date with the stack set because: *

        *
          *
        • *

          * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

          *
        • *
        • *

          * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

          *
        • *
        *
      • *
      • *

        * CURRENT: The stack is currently up to date with the stack set. *

        *
      • *
      * * @param status * The status of the stack instance, in terms of its synchronization with its associated stack set.

      *
        *
      • *

        * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

        *
      • *
      • *

        * OUTDATED: The stack isn't currently up to date with the stack set because: *

        *
          *
        • *

          * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

          *
        • *
        • *

          * The stack was part of a CreateStackSet or UpdateStackSet operation that failed * or was stopped before the stack was created or updated. *

          *
        • *
        *
      • *
      • *

        * CURRENT: The stack is currently up to date with the stack set. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see StackInstanceStatus */ public StackInstance withStatus(String status) { setStatus(status); return this; } /** *

        * The status of the stack instance, in terms of its synchronization with its associated stack set. *

        *
          *
        • *

          * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

          *
        • *
        • *

          * OUTDATED: The stack isn't currently up to date with the stack set because: *

          *
            *
          • *

            * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

            *
          • *
          • *

            * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

            *
          • *
          *
        • *
        • *

          * CURRENT: The stack is currently up to date with the stack set. *

          *
        • *
        * * @param status * The status of the stack instance, in terms of its synchronization with its associated stack set.

        *
          *
        • *

          * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

          *
        • *
        • *

          * OUTDATED: The stack isn't currently up to date with the stack set because: *

          *
            *
          • *

            * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

            *
          • *
          • *

            * The stack was part of a CreateStackSet or UpdateStackSet operation that failed * or was stopped before the stack was created or updated. *

            *
          • *
          *
        • *
        • *

          * CURRENT: The stack is currently up to date with the stack set. *

          *
        • * @see StackInstanceStatus */ public void setStatus(StackInstanceStatus status) { withStatus(status); } /** *

          * The status of the stack instance, in terms of its synchronization with its associated stack set. *

          *
            *
          • *

            * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

            *
          • *
          • *

            * OUTDATED: The stack isn't currently up to date with the stack set because: *

            *
              *
            • *

              * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

              *
            • *
            • *

              * The stack was part of a CreateStackSet or UpdateStackSet operation that failed or was * stopped before the stack was created or updated. *

              *
            • *
            *
          • *
          • *

            * CURRENT: The stack is currently up to date with the stack set. *

            *
          • *
          * * @param status * The status of the stack instance, in terms of its synchronization with its associated stack set.

          *
            *
          • *

            * INOPERABLE: A DeleteStackInstances operation has failed and left the stack in an * unstable state. Stacks in this state are excluded from further UpdateStackSet and * DeleteStackInstances operations. You might need to clean up the stack manually. *

            *
          • *
          • *

            * OUTDATED: The stack isn't currently up to date with the stack set because: *

            *
              *
            • *

              * The associated stack failed during a CreateStackSet or UpdateStackSet operation. *

              *
            • *
            • *

              * The stack was part of a CreateStackSet or UpdateStackSet operation that failed * or was stopped before the stack was created or updated. *

              *
            • *
            *
          • *
          • *

            * CURRENT: The stack is currently up to date with the stack set. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see StackInstanceStatus */ public StackInstance withStatus(StackInstanceStatus status) { this.status = status.toString(); return this; } /** *

            * The explanation for the specific status code that is assigned to this stack instance. *

            * * @param statusReason * The explanation for the specific status code that is assigned to this stack instance. */ public void setStatusReason(String statusReason) { this.statusReason = statusReason; } /** *

            * The explanation for the specific status code that is assigned to this stack instance. *

            * * @return The explanation for the specific status code that is assigned to this stack instance. */ public String getStatusReason() { return this.statusReason; } /** *

            * The explanation for the specific status code that is assigned to this stack instance. *

            * * @param statusReason * The explanation for the specific status code that is assigned to this stack instance. * @return Returns a reference to this object so that method calls can be chained together. */ public StackInstance withStatusReason(String statusReason) { setStatusReason(statusReason); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getStackSetId() != null) sb.append("StackSetId: ").append(getStackSetId()).append(","); if (getRegion() != null) sb.append("Region: ").append(getRegion()).append(","); if (getAccount() != null) sb.append("Account: ").append(getAccount()).append(","); if (getStackId() != null) sb.append("StackId: ").append(getStackId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getStatusReason() != null) sb.append("StatusReason: ").append(getStatusReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StackInstance == false) return false; StackInstance other = (StackInstance) obj; if (other.getStackSetId() == null ^ this.getStackSetId() == null) return false; if (other.getStackSetId() != null && other.getStackSetId().equals(this.getStackSetId()) == false) return false; if (other.getRegion() == null ^ this.getRegion() == null) return false; if (other.getRegion() != null && other.getRegion().equals(this.getRegion()) == false) return false; if (other.getAccount() == null ^ this.getAccount() == null) return false; if (other.getAccount() != null && other.getAccount().equals(this.getAccount()) == false) return false; if (other.getStackId() == null ^ this.getStackId() == null) return false; if (other.getStackId() != null && other.getStackId().equals(this.getStackId()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getStatusReason() == null ^ this.getStatusReason() == null) return false; if (other.getStatusReason() != null && other.getStatusReason().equals(this.getStatusReason()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackSetId() == null) ? 0 : getStackSetId().hashCode()); hashCode = prime * hashCode + ((getRegion() == null) ? 0 : getRegion().hashCode()); hashCode = prime * hashCode + ((getAccount() == null) ? 0 : getAccount().hashCode()); hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getStatusReason() == null) ? 0 : getStatusReason().hashCode()); return hashCode; } @Override public StackInstance clone() { try { return (StackInstance) 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