aws_sdk_cloudformation/operation/delete_stack_instances/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::delete_stack_instances::_delete_stack_instances_output::DeleteStackInstancesOutputBuilder;
3
4pub use crate::operation::delete_stack_instances::_delete_stack_instances_input::DeleteStackInstancesInputBuilder;
5
6impl crate::operation::delete_stack_instances::builders::DeleteStackInstancesInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::delete_stack_instances::DeleteStackInstancesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::delete_stack_instances::DeleteStackInstancesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.delete_stack_instances();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `DeleteStackInstances`.
24///
25/// <p>Deletes stack instances for the specified accounts, in the specified Amazon Web Services Regions.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct DeleteStackInstancesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::delete_stack_instances::builders::DeleteStackInstancesInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::delete_stack_instances::DeleteStackInstancesOutput,
35 crate::operation::delete_stack_instances::DeleteStackInstancesError,
36 > for DeleteStackInstancesFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::delete_stack_instances::DeleteStackInstancesOutput,
44 crate::operation::delete_stack_instances::DeleteStackInstancesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl DeleteStackInstancesFluentBuilder {
51 /// Creates a new `DeleteStackInstancesFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the DeleteStackInstances as a reference.
60 pub fn as_input(&self) -> &crate::operation::delete_stack_instances::builders::DeleteStackInstancesInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::delete_stack_instances::DeleteStackInstancesOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::delete_stack_instances::DeleteStackInstancesError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::delete_stack_instances::DeleteStackInstances::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::delete_stack_instances::DeleteStackInstances::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::delete_stack_instances::DeleteStackInstancesOutput,
97 crate::operation::delete_stack_instances::DeleteStackInstancesError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The name or unique ID of the stack set that you want to delete stack instances for.</p>
112 pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.stack_set_name(input.into());
114 self
115 }
116 /// <p>The name or unique ID of the stack set that you want to delete stack instances for.</p>
117 pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_stack_set_name(input);
119 self
120 }
121 /// <p>The name or unique ID of the stack set that you want to delete stack instances for.</p>
122 pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_stack_set_name()
124 }
125 ///
126 /// Appends an item to `Accounts`.
127 ///
128 /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
129 ///
130 /// <p>\[Self-managed permissions\] The account IDs of the Amazon Web Services accounts that you want to delete stack instances for.</p>
131 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
132 pub fn accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.inner = self.inner.accounts(input.into());
134 self
135 }
136 /// <p>\[Self-managed permissions\] The account IDs of the Amazon Web Services accounts that you want to delete stack instances for.</p>
137 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
138 pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
139 self.inner = self.inner.set_accounts(input);
140 self
141 }
142 /// <p>\[Self-managed permissions\] The account IDs of the Amazon Web Services accounts that you want to delete stack instances for.</p>
143 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
144 pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
145 self.inner.get_accounts()
146 }
147 /// <p>\[Service-managed permissions\] The Organizations accounts from which to delete stack instances.</p>
148 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
149 pub fn deployment_targets(mut self, input: crate::types::DeploymentTargets) -> Self {
150 self.inner = self.inner.deployment_targets(input);
151 self
152 }
153 /// <p>\[Service-managed permissions\] The Organizations accounts from which to delete stack instances.</p>
154 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
155 pub fn set_deployment_targets(mut self, input: ::std::option::Option<crate::types::DeploymentTargets>) -> Self {
156 self.inner = self.inner.set_deployment_targets(input);
157 self
158 }
159 /// <p>\[Service-managed permissions\] The Organizations accounts from which to delete stack instances.</p>
160 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
161 pub fn get_deployment_targets(&self) -> &::std::option::Option<crate::types::DeploymentTargets> {
162 self.inner.get_deployment_targets()
163 }
164 ///
165 /// Appends an item to `Regions`.
166 ///
167 /// To override the contents of this collection use [`set_regions`](Self::set_regions).
168 ///
169 /// <p>The Amazon Web Services Regions where you want to delete stack set instances.</p>
170 pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.inner = self.inner.regions(input.into());
172 self
173 }
174 /// <p>The Amazon Web Services Regions where you want to delete stack set instances.</p>
175 pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
176 self.inner = self.inner.set_regions(input);
177 self
178 }
179 /// <p>The Amazon Web Services Regions where you want to delete stack set instances.</p>
180 pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
181 self.inner.get_regions()
182 }
183 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
184 pub fn operation_preferences(mut self, input: crate::types::StackSetOperationPreferences) -> Self {
185 self.inner = self.inner.operation_preferences(input);
186 self
187 }
188 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
189 pub fn set_operation_preferences(mut self, input: ::std::option::Option<crate::types::StackSetOperationPreferences>) -> Self {
190 self.inner = self.inner.set_operation_preferences(input);
191 self
192 }
193 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
194 pub fn get_operation_preferences(&self) -> &::std::option::Option<crate::types::StackSetOperationPreferences> {
195 self.inner.get_operation_preferences()
196 }
197 /// <p>Removes the stack instances from the specified stack set, but doesn't delete the stacks. You can't reassociate a retained stack or add an existing, saved stack to a new stack set.</p>
198 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
199 pub fn retain_stacks(mut self, input: bool) -> Self {
200 self.inner = self.inner.retain_stacks(input);
201 self
202 }
203 /// <p>Removes the stack instances from the specified stack set, but doesn't delete the stacks. You can't reassociate a retained stack or add an existing, saved stack to a new stack set.</p>
204 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
205 pub fn set_retain_stacks(mut self, input: ::std::option::Option<bool>) -> Self {
206 self.inner = self.inner.set_retain_stacks(input);
207 self
208 }
209 /// <p>Removes the stack instances from the specified stack set, but doesn't delete the stacks. You can't reassociate a retained stack or add an existing, saved stack to a new stack set.</p>
210 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
211 pub fn get_retain_stacks(&self) -> &::std::option::Option<bool> {
212 self.inner.get_retain_stacks()
213 }
214 /// <p>The unique identifier for this stack set operation.</p>
215 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
216 /// <p>The operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request multiple times. You can retry stack set operation requests to ensure that CloudFormation successfully received them.</p>
217 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p>
218 pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
219 self.inner = self.inner.operation_id(input.into());
220 self
221 }
222 /// <p>The unique identifier for this stack set operation.</p>
223 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
224 /// <p>The operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request multiple times. You can retry stack set operation requests to ensure that CloudFormation successfully received them.</p>
225 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p>
226 pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
227 self.inner = self.inner.set_operation_id(input);
228 self
229 }
230 /// <p>The unique identifier for this stack set operation.</p>
231 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
232 /// <p>The operation ID also functions as an idempotency token, to ensure that CloudFormation performs the stack set operation only once, even if you retry the request multiple times. You can retry stack set operation requests to ensure that CloudFormation successfully received them.</p>
233 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p>
234 pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
235 self.inner.get_operation_id()
236 }
237 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
238 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
239 /// <ul>
240 /// <li>
241 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
242 /// <li>
243 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
244 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
245 /// </ul>
246 pub fn call_as(mut self, input: crate::types::CallAs) -> Self {
247 self.inner = self.inner.call_as(input);
248 self
249 }
250 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
251 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
252 /// <ul>
253 /// <li>
254 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
255 /// <li>
256 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
257 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
258 /// </ul>
259 pub fn set_call_as(mut self, input: ::std::option::Option<crate::types::CallAs>) -> Self {
260 self.inner = self.inner.set_call_as(input);
261 self
262 }
263 /// <p>\[Service-managed permissions\] Specifies whether you are acting as an account administrator in the organization's management account or as a delegated administrator in a member account.</p>
264 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
265 /// <ul>
266 /// <li>
267 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
268 /// <li>
269 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
270 /// <p>Your Amazon Web Services account must be registered as a delegated administrator in the management account. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html">Register a delegated administrator</a> in the <i>CloudFormation User Guide</i>.</p></li>
271 /// </ul>
272 pub fn get_call_as(&self) -> &::std::option::Option<crate::types::CallAs> {
273 self.inner.get_call_as()
274 }
275}