aws_sdk_cloudformation/operation/create_stack_instances/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_stack_instances::_create_stack_instances_output::CreateStackInstancesOutputBuilder;
3
4pub use crate::operation::create_stack_instances::_create_stack_instances_input::CreateStackInstancesInputBuilder;
5
6impl crate::operation::create_stack_instances::builders::CreateStackInstancesInputBuilder {
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::create_stack_instances::CreateStackInstancesOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_stack_instances::CreateStackInstancesError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_stack_instances();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateStackInstances`.
24///
25/// <p>Creates 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. You must specify at least one value for either <code>Accounts</code> or <code>DeploymentTargets</code>, and you must specify at least one value for <code>Regions</code>.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct CreateStackInstancesFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::create_stack_instances::builders::CreateStackInstancesInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::create_stack_instances::CreateStackInstancesOutput,
35 crate::operation::create_stack_instances::CreateStackInstancesError,
36 > for CreateStackInstancesFluentBuilder
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::create_stack_instances::CreateStackInstancesOutput,
44 crate::operation::create_stack_instances::CreateStackInstancesError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl CreateStackInstancesFluentBuilder {
51 /// Creates a new `CreateStackInstancesFluentBuilder`.
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 CreateStackInstances as a reference.
60 pub fn as_input(&self) -> &crate::operation::create_stack_instances::builders::CreateStackInstancesInputBuilder {
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::create_stack_instances::CreateStackInstancesOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::create_stack_instances::CreateStackInstancesError,
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::create_stack_instances::CreateStackInstances::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::create_stack_instances::CreateStackInstances::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::create_stack_instances::CreateStackInstancesOutput,
97 crate::operation::create_stack_instances::CreateStackInstancesError,
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 create stack instances from.</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 create stack instances from.</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 create stack instances from.</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 one or more Amazon Web Services accounts that you want to create stack instances in the specified Region(s) 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 one or more Amazon Web Services accounts that you want to create stack instances in the specified Region(s) 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 one or more Amazon Web Services accounts that you want to create stack instances in the specified Region(s) 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 for which to create stack instances in the specified Amazon Web Services Regions.</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 for which to create stack instances in the specified Amazon Web Services Regions.</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 for which to create stack instances in the specified Amazon Web Services Regions.</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 names of one or more Amazon Web Services Regions where you want to create stack instances using the specified Amazon Web Services accounts.</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 names of one or more Amazon Web Services Regions where you want to create stack instances using the specified Amazon Web Services accounts.</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 names of one or more Amazon Web Services Regions where you want to create stack instances using the specified Amazon Web Services accounts.</p>
180 pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
181 self.inner.get_regions()
182 }
183 ///
184 /// Appends an item to `ParameterOverrides`.
185 ///
186 /// To override the contents of this collection use [`set_parameter_overrides`](Self::set_parameter_overrides).
187 ///
188 /// <p>A list of stack set parameters whose values you want to override in the selected stack instances.</p>
189 /// <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 operations:</p>
190 /// <ul>
191 /// <li>
192 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
193 /// <li>
194 /// <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>
195 /// <li>
196 /// <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>
197 /// <li>
198 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
199 /// </ul>
200 /// <p>During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
201 /// <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 <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update the stack set template.</p>
202 pub fn parameter_overrides(mut self, input: crate::types::Parameter) -> Self {
203 self.inner = self.inner.parameter_overrides(input);
204 self
205 }
206 /// <p>A list of stack set parameters whose values you want to override in the selected stack instances.</p>
207 /// <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 operations:</p>
208 /// <ul>
209 /// <li>
210 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
211 /// <li>
212 /// <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>
213 /// <li>
214 /// <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>
215 /// <li>
216 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
217 /// </ul>
218 /// <p>During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
219 /// <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 <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update the stack set template.</p>
220 pub fn set_parameter_overrides(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Parameter>>) -> Self {
221 self.inner = self.inner.set_parameter_overrides(input);
222 self
223 }
224 /// <p>A list of stack set parameters whose values you want to override in the selected stack instances.</p>
225 /// <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 operations:</p>
226 /// <ul>
227 /// <li>
228 /// <p>To override the current value for a parameter, include the parameter and specify its value.</p></li>
229 /// <li>
230 /// <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>
231 /// <li>
232 /// <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>
233 /// <li>
234 /// <p>To leave all parameters set to their present values, don't specify this property at all.</p></li>
235 /// </ul>
236 /// <p>During stack set updates, any parameter values overridden for a stack instance aren't updated, but retain their overridden value.</p>
237 /// <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 <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStackSet.html">UpdateStackSet</a> to update the stack set template.</p>
238 pub fn get_parameter_overrides(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Parameter>> {
239 self.inner.get_parameter_overrides()
240 }
241 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
242 pub fn operation_preferences(mut self, input: crate::types::StackSetOperationPreferences) -> Self {
243 self.inner = self.inner.operation_preferences(input);
244 self
245 }
246 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
247 pub fn set_operation_preferences(mut self, input: ::std::option::Option<crate::types::StackSetOperationPreferences>) -> Self {
248 self.inner = self.inner.set_operation_preferences(input);
249 self
250 }
251 /// <p>Preferences for how CloudFormation performs this stack set operation.</p>
252 pub fn get_operation_preferences(&self) -> &::std::option::Option<crate::types::StackSetOperationPreferences> {
253 self.inner.get_operation_preferences()
254 }
255 /// <p>The unique identifier for this stack set operation.</p>
256 /// <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>
257 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
258 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p>
259 pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
260 self.inner = self.inner.operation_id(input.into());
261 self
262 }
263 /// <p>The unique identifier for this stack set operation.</p>
264 /// <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>
265 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
266 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</p>
267 pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.inner = self.inner.set_operation_id(input);
269 self
270 }
271 /// <p>The unique identifier for this stack set operation.</p>
272 /// <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>
273 /// <p>If you don't specify an operation ID, the SDK generates one automatically.</p>
274 /// <p>Repeating this stack set operation with a new operation ID retries all stack instances whose status is <code>OUTDATED</code>.</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}