aws_sdk_cloudformation/client/
delete_stack.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3    /// Constructs a fluent builder for the [`DeleteStack`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder) operation.
4    ///
5    /// - The fluent builder is configurable:
6    ///   - [`stack_name(impl Into<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::stack_name) / [`set_stack_name(Option<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_stack_name):<br>required: **true**<br><p>The name or the unique stack ID that's associated with the stack.</p><br>
7    ///   - [`retain_resources(impl Into<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::retain_resources) / [`set_retain_resources(Option<Vec::<String>>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_retain_resources):<br>required: **false**<br><p>For stacks in the <code>DELETE_FAILED</code> state, a list of resource logical IDs that are associated with the resources you want to retain. During deletion, CloudFormation deletes the stack but doesn't delete the retained resources.</p> <p>Retaining resources is useful when you can't delete a resource, such as a non-empty S3 bucket, but you want to delete the stack.</p><br>
8    ///   - [`role_arn(impl Into<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::role_arn) / [`set_role_arn(Option<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of an IAM role that CloudFormation assumes to delete the stack. CloudFormation uses the role's credentials to make calls on your behalf.</p> <p>If you don't specify a value, CloudFormation uses the role that was previously associated with the stack. If no role is available, CloudFormation uses a temporary session that's generated from your user credentials.</p><br>
9    ///   - [`client_request_token(impl Into<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_client_request_token):<br>required: **false**<br><p>A unique identifier for this <code>DeleteStack</code> request. Specify this token if you plan to retry requests so that CloudFormation knows that you're not attempting to delete a stack with the same name. You might retry <code>DeleteStack</code> requests to ensure that CloudFormation successfully received them.</p> <p>All events initiated 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 <code>CreateStack</code> operation with the token <code>token1</code>, then all the <code>StackEvents</code> generated by that operation will have <code>ClientRequestToken</code> set as <code>token1</code>.</p> <p>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 <i>Console-StackOperation-ID</i>, 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: <code>Console-CreateStack-7f59c3cf-00d2-40c7-b2ff-e75db0987002</code>.</p><br>
10    ///   - [`deletion_mode(DeletionMode)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::deletion_mode) / [`set_deletion_mode(Option<DeletionMode>)`](crate::operation::delete_stack::builders::DeleteStackFluentBuilder::set_deletion_mode):<br>required: **false**<br><p>Specifies the deletion mode for the stack. Possible values are:</p> <ul>  <li>   <p><code>STANDARD</code> - Use the standard behavior. Specifying this value is the same as not specifying this parameter.</p></li>  <li>   <p><code>FORCE_DELETE_STACK</code> - Delete the stack if it's stuck in a <code>DELETE_FAILED</code> state due to resource deletion failure.</p></li> </ul><br>
11    /// - On success, responds with [`DeleteStackOutput`](crate::operation::delete_stack::DeleteStackOutput)
12    /// - On failure, responds with [`SdkError<DeleteStackError>`](crate::operation::delete_stack::DeleteStackError)
13    pub fn delete_stack(&self) -> crate::operation::delete_stack::builders::DeleteStackFluentBuilder {
14        crate::operation::delete_stack::builders::DeleteStackFluentBuilder::new(self.handle.clone())
15    }
16}