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