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

com.amazonaws.services.cloudformation.model.DeleteStackRequest 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 2013-2018 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;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* The input for DeleteStack action. *

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

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

*/ private String stackName; /** *

* For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the * resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the * retained resources. *

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to * delete the stack. *

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

* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. *

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If * no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials. *

*/ private String roleARN; /** *

* A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests * so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry * DeleteStack requests to ensure that AWS CloudFormation successfully received them. *

*

* All events triggered by a given stack operation are assigned the same client request token, which you can use to * track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that are * initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify * the stack operation . For example, if you create a stack using the console, each stack event would be assigned * the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. *

*/ private String clientRequestToken; /** *

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

* * @param stackName * The name or the unique stack ID that is associated with the stack. */ public void setStackName(String stackName) { this.stackName = stackName; } /** *

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

* * @return The name or the unique stack ID that is associated with the stack. */ public String getStackName() { return this.stackName; } /** *

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

* * @param stackName * The name or the unique stack ID that is associated with the stack. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteStackRequest withStackName(String stackName) { setStackName(stackName); return this; } /** *

* For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the * resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the * retained resources. *

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to * delete the stack. *

* * @return For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated * with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not * delete the retained resources.

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you * want to delete the stack. */ public java.util.List getRetainResources() { if (retainResources == null) { retainResources = new com.amazonaws.internal.SdkInternalList(); } return retainResources; } /** *

* For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the * resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the * retained resources. *

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to * delete the stack. *

* * @param retainResources * For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated * with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not * delete the retained resources.

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you * want to delete the stack. */ public void setRetainResources(java.util.Collection retainResources) { if (retainResources == null) { this.retainResources = null; return; } this.retainResources = new com.amazonaws.internal.SdkInternalList(retainResources); } /** *

* For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the * resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the * retained resources. *

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to * delete the stack. *

*

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

* * @param retainResources * For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated * with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not * delete the retained resources.

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you * want to delete the stack. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteStackRequest withRetainResources(String... retainResources) { if (this.retainResources == null) { setRetainResources(new com.amazonaws.internal.SdkInternalList(retainResources.length)); } for (String ele : retainResources) { this.retainResources.add(ele); } return this; } /** *

* For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated with the * resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not delete the * retained resources. *

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you want to * delete the stack. *

* * @param retainResources * For stacks in the DELETE_FAILED state, a list of resource logical IDs that are associated * with the resources you want to retain. During deletion, AWS CloudFormation deletes the stack but does not * delete the retained resources.

*

* Retaining resources is useful when you cannot delete a resource, such as a non-empty S3 bucket, but you * want to delete the stack. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteStackRequest withRetainResources(java.util.Collection retainResources) { setRetainResources(retainResources); return this; } /** *

* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. *

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If * no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials. *

* * @param roleARN * The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your * behalf.

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the * stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your * user credentials. */ public void setRoleARN(String roleARN) { this.roleARN = roleARN; } /** *

* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. *

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If * no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials. *

* * @return The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS * CloudFormation assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls * on your behalf.

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the * stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your * user credentials. */ public String getRoleARN() { return this.roleARN; } /** *

* The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your behalf. *

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If * no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials. *

* * @param roleARN * The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) role that AWS CloudFormation * assumes to delete the stack. AWS CloudFormation uses the role's credentials to make calls on your * behalf.

*

* If you don't specify a value, AWS CloudFormation uses the role that was previously associated with the * stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your * user credentials. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteStackRequest withRoleARN(String roleARN) { setRoleARN(roleARN); return this; } /** *

* A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests * so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry * DeleteStack requests to ensure that AWS CloudFormation successfully received them. *

*

* All events triggered by a given stack operation are assigned the same client request token, which you can use to * track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that are * initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify * the stack operation . For example, if you create a stack using the console, each stack event would be assigned * the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. *

* * @param clientRequestToken * A unique identifier for this DeleteStack request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. * You might retry DeleteStack requests to ensure that AWS CloudFormation successfully received * them.

*

* All events triggered by a given stack operation are assigned the same client request token, which you can * use to track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that * are initiated from the console use the token format Console-StackOperation-ID, which helps you * easily identify the stack operation . For example, if you create a stack using the console, each stack * event would be assigned the same token in the following format: * Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests * so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry * DeleteStack requests to ensure that AWS CloudFormation successfully received them. *

*

* All events triggered by a given stack operation are assigned the same client request token, which you can use to * track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that are * initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify * the stack operation . For example, if you create a stack using the console, each stack event would be assigned * the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. *

* * @return A unique identifier for this DeleteStack request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to delete a stack with the same * name. You might retry DeleteStack requests to ensure that AWS CloudFormation successfully * received them.

*

* All events triggered by a given stack operation are assigned the same client request token, which you can * use to track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations * that are initiated from the console use the token format Console-StackOperation-ID, which helps * you easily identify the stack operation . For example, if you create a stack using the console, each * stack event would be assigned the same token in the following format: * Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* A unique identifier for this DeleteStack request. Specify this token if you plan to retry requests * so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry * DeleteStack requests to ensure that AWS CloudFormation successfully received them. *

*

* All events triggered by a given stack operation are assigned the same client request token, which you can use to * track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that are * initiated from the console use the token format Console-StackOperation-ID, which helps you easily identify * the stack operation . For example, if you create a stack using the console, each stack event would be assigned * the same token in the following format: Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. *

* * @param clientRequestToken * A unique identifier for this DeleteStack request. Specify this token if you plan to retry * requests so that AWS CloudFormation knows that you're not attempting to delete a stack with the same name. * You might retry DeleteStack requests to ensure that AWS CloudFormation successfully received * them.

*

* All events triggered by a given stack operation are assigned the same client request token, which you can * use to track operations. For example, if you execute a CreateStack operation with the token * token1, then all the StackEvents generated by that operation will have * ClientRequestToken set as token1. *

*

* In the console, stack operations display the client request token on the Events tab. Stack operations that * are initiated from the console use the token format Console-StackOperation-ID, which helps you * easily identify the stack operation . For example, if you create a stack using the console, each stack * event would be assigned the same token in the following format: * Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteStackRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); 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 (getStackName() != null) sb.append("StackName: ").append(getStackName()).append(","); if (getRetainResources() != null) sb.append("RetainResources: ").append(getRetainResources()).append(","); if (getRoleARN() != null) sb.append("RoleARN: ").append(getRoleARN()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteStackRequest == false) return false; DeleteStackRequest other = (DeleteStackRequest) obj; if (other.getStackName() == null ^ this.getStackName() == null) return false; if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getRetainResources() == null ^ this.getRetainResources() == null) return false; if (other.getRetainResources() != null && other.getRetainResources().equals(this.getRetainResources()) == false) return false; if (other.getRoleARN() == null ^ this.getRoleARN() == null) return false; if (other.getRoleARN() != null && other.getRoleARN().equals(this.getRoleARN()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getRetainResources() == null) ? 0 : getRetainResources().hashCode()); hashCode = prime * hashCode + ((getRoleARN() == null) ? 0 : getRoleARN().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; } @Override public DeleteStackRequest clone() { return (DeleteStackRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy