aws_sdk_cloudformation/operation/import_stacks_to_stack_set/
_import_stacks_to_stack_set_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ImportStacksToStackSetInput {
6    /// <p>The name of the stack set. The name must be unique in the Region where you create your stack set.</p>
7    pub stack_set_name: ::std::option::Option<::std::string::String>,
8    /// <p>The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per stack set at a time.</p>
9    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
10    pub stack_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// <p>The Amazon S3 URL which contains list of stack ids to be inputted.</p>
12    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
13    pub stack_ids_url: ::std::option::Option<::std::string::String>,
14    /// <p>The list of OU ID's to which the stacks being imported has to be mapped as deployment target.</p>
15    pub organizational_unit_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16    /// <p>The user-specified preferences for how CloudFormation performs a stack set operation.</p>
17    /// <p>For more information about maximum concurrent accounts and failure tolerance, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
18    pub operation_preferences: ::std::option::Option<crate::types::StackSetOperationPreferences>,
19    /// <p>A unique, user defined, identifier for the stack set operation.</p>
20    pub operation_id: ::std::option::Option<::std::string::String>,
21    /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
22    /// <ul>
23    /// <li>
24    /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
25    /// <li>
26    /// <p>For service managed stack sets, specify <code>DELEGATED_ADMIN</code>.</p></li>
27    /// </ul>
28    pub call_as: ::std::option::Option<crate::types::CallAs>,
29}
30impl ImportStacksToStackSetInput {
31    /// <p>The name of the stack set. The name must be unique in the Region where you create your stack set.</p>
32    pub fn stack_set_name(&self) -> ::std::option::Option<&str> {
33        self.stack_set_name.as_deref()
34    }
35    /// <p>The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per stack set at a time.</p>
36    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.stack_ids.is_none()`.
39    pub fn stack_ids(&self) -> &[::std::string::String] {
40        self.stack_ids.as_deref().unwrap_or_default()
41    }
42    /// <p>The Amazon S3 URL which contains list of stack ids to be inputted.</p>
43    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
44    pub fn stack_ids_url(&self) -> ::std::option::Option<&str> {
45        self.stack_ids_url.as_deref()
46    }
47    /// <p>The list of OU ID's to which the stacks being imported has to be mapped as deployment target.</p>
48    ///
49    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.organizational_unit_ids.is_none()`.
50    pub fn organizational_unit_ids(&self) -> &[::std::string::String] {
51        self.organizational_unit_ids.as_deref().unwrap_or_default()
52    }
53    /// <p>The user-specified preferences for how CloudFormation performs a stack set operation.</p>
54    /// <p>For more information about maximum concurrent accounts and failure tolerance, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
55    pub fn operation_preferences(&self) -> ::std::option::Option<&crate::types::StackSetOperationPreferences> {
56        self.operation_preferences.as_ref()
57    }
58    /// <p>A unique, user defined, identifier for the stack set operation.</p>
59    pub fn operation_id(&self) -> ::std::option::Option<&str> {
60        self.operation_id.as_deref()
61    }
62    /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
63    /// <ul>
64    /// <li>
65    /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
66    /// <li>
67    /// <p>For service managed stack sets, specify <code>DELEGATED_ADMIN</code>.</p></li>
68    /// </ul>
69    pub fn call_as(&self) -> ::std::option::Option<&crate::types::CallAs> {
70        self.call_as.as_ref()
71    }
72}
73impl ImportStacksToStackSetInput {
74    /// Creates a new builder-style object to manufacture [`ImportStacksToStackSetInput`](crate::operation::import_stacks_to_stack_set::ImportStacksToStackSetInput).
75    pub fn builder() -> crate::operation::import_stacks_to_stack_set::builders::ImportStacksToStackSetInputBuilder {
76        crate::operation::import_stacks_to_stack_set::builders::ImportStacksToStackSetInputBuilder::default()
77    }
78}
79
80/// A builder for [`ImportStacksToStackSetInput`](crate::operation::import_stacks_to_stack_set::ImportStacksToStackSetInput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct ImportStacksToStackSetInputBuilder {
84    pub(crate) stack_set_name: ::std::option::Option<::std::string::String>,
85    pub(crate) stack_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
86    pub(crate) stack_ids_url: ::std::option::Option<::std::string::String>,
87    pub(crate) organizational_unit_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
88    pub(crate) operation_preferences: ::std::option::Option<crate::types::StackSetOperationPreferences>,
89    pub(crate) operation_id: ::std::option::Option<::std::string::String>,
90    pub(crate) call_as: ::std::option::Option<crate::types::CallAs>,
91}
92impl ImportStacksToStackSetInputBuilder {
93    /// <p>The name of the stack set. The name must be unique in the Region where you create your stack set.</p>
94    /// This field is required.
95    pub fn stack_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.stack_set_name = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The name of the stack set. The name must be unique in the Region where you create your stack set.</p>
100    pub fn set_stack_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.stack_set_name = input;
102        self
103    }
104    /// <p>The name of the stack set. The name must be unique in the Region where you create your stack set.</p>
105    pub fn get_stack_set_name(&self) -> &::std::option::Option<::std::string::String> {
106        &self.stack_set_name
107    }
108    /// Appends an item to `stack_ids`.
109    ///
110    /// To override the contents of this collection use [`set_stack_ids`](Self::set_stack_ids).
111    ///
112    /// <p>The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per stack set at a time.</p>
113    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
114    pub fn stack_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        let mut v = self.stack_ids.unwrap_or_default();
116        v.push(input.into());
117        self.stack_ids = ::std::option::Option::Some(v);
118        self
119    }
120    /// <p>The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per stack set at a time.</p>
121    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
122    pub fn set_stack_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
123        self.stack_ids = input;
124        self
125    }
126    /// <p>The IDs of the stacks you are importing into a stack set. You import up to 10 stacks per stack set at a time.</p>
127    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
128    pub fn get_stack_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
129        &self.stack_ids
130    }
131    /// <p>The Amazon S3 URL which contains list of stack ids to be inputted.</p>
132    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
133    pub fn stack_ids_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.stack_ids_url = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>The Amazon S3 URL which contains list of stack ids to be inputted.</p>
138    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
139    pub fn set_stack_ids_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.stack_ids_url = input;
141        self
142    }
143    /// <p>The Amazon S3 URL which contains list of stack ids to be inputted.</p>
144    /// <p>Specify either <code>StackIds</code> or <code>StackIdsUrl</code>.</p>
145    pub fn get_stack_ids_url(&self) -> &::std::option::Option<::std::string::String> {
146        &self.stack_ids_url
147    }
148    /// Appends an item to `organizational_unit_ids`.
149    ///
150    /// To override the contents of this collection use [`set_organizational_unit_ids`](Self::set_organizational_unit_ids).
151    ///
152    /// <p>The list of OU ID's to which the stacks being imported has to be mapped as deployment target.</p>
153    pub fn organizational_unit_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154        let mut v = self.organizational_unit_ids.unwrap_or_default();
155        v.push(input.into());
156        self.organizational_unit_ids = ::std::option::Option::Some(v);
157        self
158    }
159    /// <p>The list of OU ID's to which the stacks being imported has to be mapped as deployment target.</p>
160    pub fn set_organizational_unit_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
161        self.organizational_unit_ids = input;
162        self
163    }
164    /// <p>The list of OU ID's to which the stacks being imported has to be mapped as deployment target.</p>
165    pub fn get_organizational_unit_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
166        &self.organizational_unit_ids
167    }
168    /// <p>The user-specified preferences for how CloudFormation performs a stack set operation.</p>
169    /// <p>For more information about maximum concurrent accounts and failure tolerance, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
170    pub fn operation_preferences(mut self, input: crate::types::StackSetOperationPreferences) -> Self {
171        self.operation_preferences = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The user-specified preferences for how CloudFormation performs a stack set operation.</p>
175    /// <p>For more information about maximum concurrent accounts and failure tolerance, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
176    pub fn set_operation_preferences(mut self, input: ::std::option::Option<crate::types::StackSetOperationPreferences>) -> Self {
177        self.operation_preferences = input;
178        self
179    }
180    /// <p>The user-specified preferences for how CloudFormation performs a stack set operation.</p>
181    /// <p>For more information about maximum concurrent accounts and failure tolerance, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html#stackset-ops-options">Stack set operation options</a>.</p>
182    pub fn get_operation_preferences(&self) -> &::std::option::Option<crate::types::StackSetOperationPreferences> {
183        &self.operation_preferences
184    }
185    /// <p>A unique, user defined, identifier for the stack set operation.</p>
186    pub fn operation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
187        self.operation_id = ::std::option::Option::Some(input.into());
188        self
189    }
190    /// <p>A unique, user defined, identifier for the stack set operation.</p>
191    pub fn set_operation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
192        self.operation_id = input;
193        self
194    }
195    /// <p>A unique, user defined, identifier for the stack set operation.</p>
196    pub fn get_operation_id(&self) -> &::std::option::Option<::std::string::String> {
197        &self.operation_id
198    }
199    /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
200    /// <ul>
201    /// <li>
202    /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
203    /// <li>
204    /// <p>For service managed stack sets, specify <code>DELEGATED_ADMIN</code>.</p></li>
205    /// </ul>
206    pub fn call_as(mut self, input: crate::types::CallAs) -> Self {
207        self.call_as = ::std::option::Option::Some(input);
208        self
209    }
210    /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
211    /// <ul>
212    /// <li>
213    /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
214    /// <li>
215    /// <p>For service managed stack sets, specify <code>DELEGATED_ADMIN</code>.</p></li>
216    /// </ul>
217    pub fn set_call_as(mut self, input: ::std::option::Option<crate::types::CallAs>) -> Self {
218        self.call_as = input;
219        self
220    }
221    /// <p>By default, <code>SELF</code> is specified. Use <code>SELF</code> for stack sets with self-managed permissions.</p>
222    /// <ul>
223    /// <li>
224    /// <p>If you are signed in to the management account, specify <code>SELF</code>.</p></li>
225    /// <li>
226    /// <p>For service managed stack sets, specify <code>DELEGATED_ADMIN</code>.</p></li>
227    /// </ul>
228    pub fn get_call_as(&self) -> &::std::option::Option<crate::types::CallAs> {
229        &self.call_as
230    }
231    /// Consumes the builder and constructs a [`ImportStacksToStackSetInput`](crate::operation::import_stacks_to_stack_set::ImportStacksToStackSetInput).
232    pub fn build(
233        self,
234    ) -> ::std::result::Result<
235        crate::operation::import_stacks_to_stack_set::ImportStacksToStackSetInput,
236        ::aws_smithy_types::error::operation::BuildError,
237    > {
238        ::std::result::Result::Ok(crate::operation::import_stacks_to_stack_set::ImportStacksToStackSetInput {
239            stack_set_name: self.stack_set_name,
240            stack_ids: self.stack_ids,
241            stack_ids_url: self.stack_ids_url,
242            organizational_unit_ids: self.organizational_unit_ids,
243            operation_preferences: self.operation_preferences,
244            operation_id: self.operation_id,
245            call_as: self.call_as,
246        })
247    }
248}