aws_sdk_cloudformation/operation/update_stack_instances/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_stack_instances::_update_stack_instances_output::UpdateStackInstancesOutputBuilder;
3
4pub use crate::operation::update_stack_instances::_update_stack_instances_input::UpdateStackInstancesInputBuilder;
5
6impl crate::operation::update_stack_instances::builders::UpdateStackInstancesInputBuilder {
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::update_stack_instances::UpdateStackInstancesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_stack_instances::UpdateStackInstancesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_stack_instances();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateStackInstances`.
24///
25/// <p>Updates the parameter values for stack instances for the specified accounts, within the specified Amazon Web Services Regions. A stack instance refers to a stack in a specific account and Region.</p>
26/// <p>You can only update stack instances in Amazon Web Services Regions and accounts where they already exist; to create additional stack instances, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStackInstances.html">CreateStackInstances</a>.</p>
27/// <p>During StackSet updates, any parameters overridden for a stack instance aren't updated, but retain their overridden value.</p>
28/// <p>You can only update the parameter <i>values</i> that are specified in the StackSet. To add or delete a parameter itself, use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update the StackSet template. If you add a parameter to a template, before you can override the parameter value specified in the StackSet you must first use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update all stack instances with the updated template and parameter value specified in the StackSet. Once a stack instance has been updated with the new parameter, you can then override the parameter value using <code>UpdateStackInstances</code>.</p><note>
29/// <p>The maximum number of organizational unit (OUs) supported by a <code>UpdateStackInstances</code> operation is 50.</p>
30/// <p>If you need more than 50, consider the following options:</p>
31/// <ul>
32/// <li>
33/// <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>
34/// <li>
35/// <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>
36/// </ul>
37/// </note>
38#[derive(::std::clone::Clone, ::std::fmt::Debug)]
39pub struct UpdateStackInstancesFluentBuilder {
40 handle: ::std::sync::Arc<crate::client::Handle>,
41 inner: crate::operation::update_stack_instances::builders::UpdateStackInstancesInputBuilder,
42 config_override: ::std::option::Option<crate::config::Builder>,
43}
44impl
45 crate::client::customize::internal::CustomizableSend<
46 crate::operation::update_stack_instances::UpdateStackInstancesOutput,
47 crate::operation::update_stack_instances::UpdateStackInstancesError,
48 > for UpdateStackInstancesFluentBuilder
49{
50 fn send(
51 self,
52 config_override: crate::config::Builder,
53 ) -> crate::client::customize::internal::BoxFuture<
54 crate::client::customize::internal::SendResult<
55 crate::operation::update_stack_instances::UpdateStackInstancesOutput,
56 crate::operation::update_stack_instances::UpdateStackInstancesError,
57 >,
58 > {
59 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
60 }
61}
62impl UpdateStackInstancesFluentBuilder {
63 /// Creates a new `UpdateStackInstancesFluentBuilder`.
64 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
65 Self {
66 handle,
67 inner: ::std::default::Default::default(),
68 config_override: ::std::option::Option::None,
69 }
70 }
71 /// Access the UpdateStackInstances as a reference.
72 pub fn as_input(&self) -> &crate::operation::update_stack_instances::builders::UpdateStackInstancesInputBuilder {
73 &self.inner
74 }
75 /// Sends the request and returns the response.
76 ///
77 /// If an error occurs, an `SdkError` will be returned with additional details that
78 /// can be matched against.
79 ///
80 /// By default, any retryable failures will be retried twice. Retry behavior
81 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
82 /// set when configuring the client.
83 pub async fn send(
84 self,
85 ) -> ::std::result::Result<
86 crate::operation::update_stack_instances::UpdateStackInstancesOutput,
87 ::aws_smithy_runtime_api::client::result::SdkError<
88 crate::operation::update_stack_instances::UpdateStackInstancesError,
89 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
90 >,
91 > {
92 let input = self
93 .inner
94 .build()
95 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
96 let runtime_plugins = crate::operation::update_stack_instances::UpdateStackInstances::operation_runtime_plugins(
97 self.handle.runtime_plugins.clone(),
98 &self.handle.conf,
99 self.config_override,
100 );
101 crate::operation::update_stack_instances::UpdateStackInstances::orchestrate(&runtime_plugins, input).await
102 }
103
104 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
105 pub fn customize(
106 self,
107 ) -> crate::client::customize::CustomizableOperation<
108 crate::operation::update_stack_instances::UpdateStackInstancesOutput,
109 crate::operation::update_stack_instances::UpdateStackInstancesError,
110 Self,
111 > {
112 crate::client::customize::CustomizableOperation::new(self)
113 }
114 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
115 self.set_config_override(::std::option::Option::Some(config_override.into()));
116 self
117 }
118
119 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
120 self.config_override = config_override;
121 self
122 }
123 /// <p>The name or unique ID of the StackSet associated with the stack instances.</p>
124 pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
125 self.inner = self.inner.stack_set_name(input.into());
126 self
127 }
128 /// <p>The name or unique ID of the StackSet associated with the stack instances.</p>
129 pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
130 self.inner = self.inner.set_stack_set_name(input);
131 self
132 }
133 /// <p>The name or unique ID of the StackSet associated with the stack instances.</p>
134 pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> {
135 self.inner.get_stack_set_name()
136 }
137 ///
138 /// Appends an item to `Accounts`.
139 ///
140 /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
141 ///
142 /// <p>\[Self-managed permissions\] The account IDs of one or more Amazon Web Services accounts in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
143 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
144 pub fn accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
145 self.inner = self.inner.accounts(input.into());
146 self
147 }
148 /// <p>\[Self-managed permissions\] The account IDs of one or more Amazon Web Services accounts in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
149 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
150 pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
151 self.inner = self.inner.set_accounts(input);
152 self
153 }
154 /// <p>\[Self-managed permissions\] The account IDs of one or more Amazon Web Services accounts in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
155 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
156 pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
157 self.inner.get_accounts()
158 }
159 /// <p>\[Service-managed permissions\] The Organizations accounts in which you want to update parameter values for stack instances. If your update targets OUs, the overridden parameter values only apply to the accounts that are currently in the target OUs and their child OUs. Accounts added to the target OUs and their child OUs in the future won't use the overridden values.</p>
160 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
161 pub fn deployment_targets(mut self, input: crate::types::DeploymentTargets) -> Self {
162 self.inner = self.inner.deployment_targets(input);
163 self
164 }
165 /// <p>\[Service-managed permissions\] The Organizations accounts in which you want to update parameter values for stack instances. If your update targets OUs, the overridden parameter values only apply to the accounts that are currently in the target OUs and their child OUs. Accounts added to the target OUs and their child OUs in the future won't use the overridden values.</p>
166 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
167 pub fn set_deployment_targets(mut self, input: ::std::option::Option<crate::types::DeploymentTargets>) -> Self {
168 self.inner = self.inner.set_deployment_targets(input);
169 self
170 }
171 /// <p>\[Service-managed permissions\] The Organizations accounts in which you want to update parameter values for stack instances. If your update targets OUs, the overridden parameter values only apply to the accounts that are currently in the target OUs and their child OUs. Accounts added to the target OUs and their child OUs in the future won't use the overridden values.</p>
172 /// <p>You can specify <code>Accounts</code> or <code>DeploymentTargets</code>, but not both.</p>
173 pub fn get_deployment_targets(&self) -> &::std::option::Option<crate::types::DeploymentTargets> {
174 self.inner.get_deployment_targets()
175 }
176 ///
177 /// Appends an item to `Regions`.
178 ///
179 /// To override the contents of this collection use [`set_regions`](Self::set_regions).
180 ///
181 /// <p>The names of one or more Amazon Web Services Regions in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
182 pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.inner = self.inner.regions(input.into());
184 self
185 }
186 /// <p>The names of one or more Amazon Web Services Regions in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
187 pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
188 self.inner = self.inner.set_regions(input);
189 self
190 }
191 /// <p>The names of one or more Amazon Web Services Regions in which you want to update parameter values for stack instances. The overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions.</p>
192 pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
193 self.inner.get_regions()
194 }
195 ///
196 /// Appends an item to `ParameterOverrides`.
197 ///
198 /// To override the contents of this collection use [`set_parameter_overrides`](Self::set_parameter_overrides).
199 ///
200 /// <p>A list of input parameters whose values you want to update for the specified stack instances.</p>
201 /// <p>Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance update operations:</p>
202 /// <ul>
203 /// <li>
204 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
205 /// <li>
206 /// <p>To leave an overridden parameter set to its present value, include the parameter and specify <code>UsePreviousValue</code> as <code>true</code>. (You can't specify both a value and set <code>UsePreviousValue</code> to <code>true</code>.)</p></li>
207 /// <li>
208 /// <p>To set an overridden parameter back to the value specified in the StackSet, specify a parameter list but don't include the parameter in the list.</p></li>
209 /// <li>
210 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
211 /// </ul>
212 /// <p>During StackSet updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
213 /// <p>You can only override the parameter <i>values</i> that are specified in the StackSet. To add or delete a parameter itself, use <code>UpdateStackSet</code> to update the StackSet template. If you add a parameter to a template, before you can override the parameter value specified in the StackSet you must first use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update all stack instances with the updated template and parameter value specified in the StackSet. Once a stack instance has been updated with the new parameter, you can then override the parameter value using <code>UpdateStackInstances</code>.</p>
214 pub fn parameter_overrides(mut self, input: crate::types::Parameter) -> Self {
215 self.inner = self.inner.parameter_overrides(input);
216 self
217 }
218 /// <p>A list of input parameters whose values you want to update for the specified stack instances.</p>
219 /// <p>Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance update operations:</p>
220 /// <ul>
221 /// <li>
222 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
223 /// <li>
224 /// <p>To leave an overridden parameter set to its present value, include the parameter and specify <code>UsePreviousValue</code> as <code>true</code>. (You can't specify both a value and set <code>UsePreviousValue</code> to <code>true</code>.)</p></li>
225 /// <li>
226 /// <p>To set an overridden parameter back to the value specified in the StackSet, specify a parameter list but don't include the parameter in the list.</p></li>
227 /// <li>
228 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
229 /// </ul>
230 /// <p>During StackSet updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
231 /// <p>You can only override the parameter <i>values</i> that are specified in the StackSet. To add or delete a parameter itself, use <code>UpdateStackSet</code> to update the StackSet template. If you add a parameter to a template, before you can override the parameter value specified in the StackSet you must first use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update all stack instances with the updated template and parameter value specified in the StackSet. Once a stack instance has been updated with the new parameter, you can then override the parameter value using <code>UpdateStackInstances</code>.</p>
232 pub fn set_parameter_overrides(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>) -> Self {
233 self.inner = self.inner.set_parameter_overrides(input);
234 self
235 }
236 /// <p>A list of input parameters whose values you want to update for the specified stack instances.</p>
237 /// <p>Any overridden parameter values will be applied to all stack instances in the specified accounts and Amazon Web Services Regions. When specifying parameters and their values, be aware of how CloudFormation sets parameter values during stack instance update operations:</p>
238 /// <ul>
239 /// <li>
240 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
241 /// <li>
242 /// <p>To leave an overridden parameter set to its present value, include the parameter and specify <code>UsePreviousValue</code> as <code>true</code>. (You can't specify both a value and set <code>UsePreviousValue</code> to <code>true</code>.)</p></li>
243 /// <li>
244 /// <p>To set an overridden parameter back to the value specified in the StackSet, specify a parameter list but don't include the parameter in the list.</p></li>
245 /// <li>
246 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
247 /// </ul>
248 /// <p>During StackSet updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
249 /// <p>You can only override the parameter <i>values</i> that are specified in the StackSet. To add or delete a parameter itself, use <code>UpdateStackSet</code> to update the StackSet template. If you add a parameter to a template, before you can override the parameter value specified in the StackSet you must first use <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update all stack instances with the updated template and parameter value specified in the StackSet. Once a stack instance has been updated with the new parameter, you can then override the parameter value using <code>UpdateStackInstances</code>.</p>
250 pub fn get_parameter_overrides(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
251 self.inner.get_parameter_overrides()
252 }
253 /// <p>Preferences for how CloudFormation performs this StackSet operation.</p>
254 pub fn operation_preferences(mut self, input: crate::types::StackSetOperationPreferences) -> Self {
255 self.inner = self.inner.operation_preferences(input);
256 self
257 }
258 /// <p>Preferences for how CloudFormation performs this StackSet operation.</p>
259 pub fn set_operation_preferences(mut self, input: ::std::option::Option<crate::types::StackSetOperationPreferences>) -> Self {
260 self.inner = self.inner.set_operation_preferences(input);
261 self
262 }
263 /// <p>Preferences for how CloudFormation performs this StackSet operation.</p>
264 pub fn get_operation_preferences(&self) -> &::std::option::Option<crate::types::StackSetOperationPreferences> {
265 self.inner.get_operation_preferences()
266 }
267 /// <p>The unique identifier for this StackSet operation.</p>
268 /// <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 might retry StackSet operation requests to ensure that CloudFormation successfully received them.</p>
269 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
270 pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
271 self.inner = self.inner.operation_id(input.into());
272 self
273 }
274 /// <p>The unique identifier for this StackSet operation.</p>
275 /// <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 might retry StackSet operation requests to ensure that CloudFormation successfully received them.</p>
276 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
277 pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
278 self.inner = self.inner.set_operation_id(input);
279 self
280 }
281 /// <p>The unique identifier for this StackSet operation.</p>
282 /// <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 might retry StackSet operation requests to ensure that CloudFormation successfully received them.</p>
283 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
284 pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
285 self.inner.get_operation_id()
286 }
287 /// <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>
288 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p>
289 /// <ul>
290 /// <li>
291 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
292 /// <li>
293 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
294 /// <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>
295 /// </ul>
296 pub fn call_as(mut self, input: crate::types::CallAs) -> Self {
297 self.inner = self.inner.call_as(input);
298 self
299 }
300 /// <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>
301 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p>
302 /// <ul>
303 /// <li>
304 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
305 /// <li>
306 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
307 /// <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>
308 /// </ul>
309 pub fn set_call_as(mut self, input: ::std::option::Option<crate::types::CallAs>) -> Self {
310 self.inner = self.inner.set_call_as(input);
311 self
312 }
313 /// <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>
314 /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for StackSets with self-managed permissions.</p>
315 /// <ul>
316 /// <li>
317 /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
318 /// <li>
319 /// <p>If you are signed in to a delegated administrator account, specify <code>DELEGATED_ADMIN</code>.</p>
320 /// <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>
321 /// </ul>
322 pub fn get_call_as(&self) -> &::std::option::Option<crate::types::CallAs> {
323 self.inner.get_call_as()
324 }
325}