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