aws_sdk_cloudformation/types/_deployment_targets.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specifies the Organizations accounts where you want to create, update, or delete stack instances. You can target either your entire organization or specific accounts using organizational units (OUs) and account filter options.</p>
4/// <p>CloudFormation doesn't deploy stack instances to the organization management account, even if the organization management account is in your organization or in an OU in your organization.</p>
5/// <p>When performing create operations, if you specify both <code>OrganizationalUnitIds</code> and <code>Accounts</code>, you must also specify the <code>AccountFilterType</code> property.</p>
6#[non_exhaustive]
7#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
8pub struct DeploymentTargets {
9 /// <p>The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the <code>AccountFilterType</code> property.</p>
10 /// <p>If you have many account numbers, you can provide those accounts using the <code>AccountsUrl</code> property instead.</p>
11 pub accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12 /// <p>The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either <code>.csv</code> or <code>.txt</code>, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).</p>
13 /// <p>This property serves the same purpose as <code>Accounts</code> but allows you to specify a large number of accounts.</p>
14 pub accounts_url: ::std::option::Option<::std::string::String>,
15 /// <p>The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs.</p>
16 pub organizational_unit_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
17 /// <p>Refines which accounts will have stack operations performed on them by specifying how to use the <code>Accounts</code> and <code>OrganizationalUnitIds</code> properties together.</p>
18 /// <p>The following values determine how CloudFormation selects target accounts:</p>
19 /// <ul>
20 /// <li>
21 /// <p><code>INTERSECTION</code>: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the <code>Accounts</code> property and belong to the specified OUs will be targeted.</p></li>
22 /// <li>
23 /// <p><code>DIFFERENCE</code>: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the <code>Accounts</code> property. This enables you to exclude certain accounts within an OU, such as suspended accounts.</p></li>
24 /// <li>
25 /// <p><code>UNION</code>: Performs stack operations on the specified OUs plus additional individual accounts listed in the <code>Accounts</code> property. This is the default value if <code>AccountFilterType</code> is not provided. This lets you target an entire OU and individual accounts from a different OU in one request. Note that <code>UNION</code> is not supported for <code>CreateStackInstances</code> operations.</p></li>
26 /// <li>
27 /// <p><code>NONE</code>: Performs stack operations on all accounts in the specified organizational units (OUs).</p></li>
28 /// </ul>
29 pub account_filter_type: ::std::option::Option<crate::types::AccountFilterType>,
30}
31impl DeploymentTargets {
32 /// <p>The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the <code>AccountFilterType</code> property.</p>
33 /// <p>If you have many account numbers, you can provide those accounts using the <code>AccountsUrl</code> property instead.</p>
34 ///
35 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accounts.is_none()`.
36 pub fn accounts(&self) -> &[::std::string::String] {
37 self.accounts.as_deref().unwrap_or_default()
38 }
39 /// <p>The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either <code>.csv</code> or <code>.txt</code>, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).</p>
40 /// <p>This property serves the same purpose as <code>Accounts</code> but allows you to specify a large number of accounts.</p>
41 pub fn accounts_url(&self) -> ::std::option::Option<&str> {
42 self.accounts_url.as_deref()
43 }
44 /// <p>The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs.</p>
45 ///
46 /// 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()`.
47 pub fn organizational_unit_ids(&self) -> &[::std::string::String] {
48 self.organizational_unit_ids.as_deref().unwrap_or_default()
49 }
50 /// <p>Refines which accounts will have stack operations performed on them by specifying how to use the <code>Accounts</code> and <code>OrganizationalUnitIds</code> properties together.</p>
51 /// <p>The following values determine how CloudFormation selects target accounts:</p>
52 /// <ul>
53 /// <li>
54 /// <p><code>INTERSECTION</code>: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the <code>Accounts</code> property and belong to the specified OUs will be targeted.</p></li>
55 /// <li>
56 /// <p><code>DIFFERENCE</code>: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the <code>Accounts</code> property. This enables you to exclude certain accounts within an OU, such as suspended accounts.</p></li>
57 /// <li>
58 /// <p><code>UNION</code>: Performs stack operations on the specified OUs plus additional individual accounts listed in the <code>Accounts</code> property. This is the default value if <code>AccountFilterType</code> is not provided. This lets you target an entire OU and individual accounts from a different OU in one request. Note that <code>UNION</code> is not supported for <code>CreateStackInstances</code> operations.</p></li>
59 /// <li>
60 /// <p><code>NONE</code>: Performs stack operations on all accounts in the specified organizational units (OUs).</p></li>
61 /// </ul>
62 pub fn account_filter_type(&self) -> ::std::option::Option<&crate::types::AccountFilterType> {
63 self.account_filter_type.as_ref()
64 }
65}
66impl DeploymentTargets {
67 /// Creates a new builder-style object to manufacture [`DeploymentTargets`](crate::types::DeploymentTargets).
68 pub fn builder() -> crate::types::builders::DeploymentTargetsBuilder {
69 crate::types::builders::DeploymentTargetsBuilder::default()
70 }
71}
72
73/// A builder for [`DeploymentTargets`](crate::types::DeploymentTargets).
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
75#[non_exhaustive]
76pub struct DeploymentTargetsBuilder {
77 pub(crate) accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
78 pub(crate) accounts_url: ::std::option::Option<::std::string::String>,
79 pub(crate) organizational_unit_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
80 pub(crate) account_filter_type: ::std::option::Option<crate::types::AccountFilterType>,
81}
82impl DeploymentTargetsBuilder {
83 /// Appends an item to `accounts`.
84 ///
85 /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
86 ///
87 /// <p>The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the <code>AccountFilterType</code> property.</p>
88 /// <p>If you have many account numbers, you can provide those accounts using the <code>AccountsUrl</code> property instead.</p>
89 pub fn accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90 let mut v = self.accounts.unwrap_or_default();
91 v.push(input.into());
92 self.accounts = ::std::option::Option::Some(v);
93 self
94 }
95 /// <p>The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the <code>AccountFilterType</code> property.</p>
96 /// <p>If you have many account numbers, you can provide those accounts using the <code>AccountsUrl</code> property instead.</p>
97 pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
98 self.accounts = input;
99 self
100 }
101 /// <p>The Amazon Web Services account IDs where you want to perform stack operations. How these accounts are used depends on the <code>AccountFilterType</code> property.</p>
102 /// <p>If you have many account numbers, you can provide those accounts using the <code>AccountsUrl</code> property instead.</p>
103 pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
104 &self.accounts
105 }
106 /// <p>The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either <code>.csv</code> or <code>.txt</code>, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).</p>
107 /// <p>This property serves the same purpose as <code>Accounts</code> but allows you to specify a large number of accounts.</p>
108 pub fn accounts_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109 self.accounts_url = ::std::option::Option::Some(input.into());
110 self
111 }
112 /// <p>The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either <code>.csv</code> or <code>.txt</code>, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).</p>
113 /// <p>This property serves the same purpose as <code>Accounts</code> but allows you to specify a large number of accounts.</p>
114 pub fn set_accounts_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115 self.accounts_url = input;
116 self
117 }
118 /// <p>The Amazon S3 URL path to a file that contains a list of Amazon Web Services account IDs. The file format must be either <code>.csv</code> or <code>.txt</code>, and the data can be comma-separated or new-line-separated. There is currently a 10MB limit for the data (approximately 800,000 accounts).</p>
119 /// <p>This property serves the same purpose as <code>Accounts</code> but allows you to specify a large number of accounts.</p>
120 pub fn get_accounts_url(&self) -> &::std::option::Option<::std::string::String> {
121 &self.accounts_url
122 }
123 /// Appends an item to `organizational_unit_ids`.
124 ///
125 /// To override the contents of this collection use [`set_organizational_unit_ids`](Self::set_organizational_unit_ids).
126 ///
127 /// <p>The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs.</p>
128 pub fn organizational_unit_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129 let mut v = self.organizational_unit_ids.unwrap_or_default();
130 v.push(input.into());
131 self.organizational_unit_ids = ::std::option::Option::Some(v);
132 self
133 }
134 /// <p>The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs.</p>
135 pub fn set_organizational_unit_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
136 self.organizational_unit_ids = input;
137 self
138 }
139 /// <p>The organization root ID or organizational unit (OU) IDs where you want to perform stack operations. CloudFormation will perform operations on accounts within these OUs and their child OUs.</p>
140 pub fn get_organizational_unit_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
141 &self.organizational_unit_ids
142 }
143 /// <p>Refines which accounts will have stack operations performed on them by specifying how to use the <code>Accounts</code> and <code>OrganizationalUnitIds</code> properties together.</p>
144 /// <p>The following values determine how CloudFormation selects target accounts:</p>
145 /// <ul>
146 /// <li>
147 /// <p><code>INTERSECTION</code>: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the <code>Accounts</code> property and belong to the specified OUs will be targeted.</p></li>
148 /// <li>
149 /// <p><code>DIFFERENCE</code>: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the <code>Accounts</code> property. This enables you to exclude certain accounts within an OU, such as suspended accounts.</p></li>
150 /// <li>
151 /// <p><code>UNION</code>: Performs stack operations on the specified OUs plus additional individual accounts listed in the <code>Accounts</code> property. This is the default value if <code>AccountFilterType</code> is not provided. This lets you target an entire OU and individual accounts from a different OU in one request. Note that <code>UNION</code> is not supported for <code>CreateStackInstances</code> operations.</p></li>
152 /// <li>
153 /// <p><code>NONE</code>: Performs stack operations on all accounts in the specified organizational units (OUs).</p></li>
154 /// </ul>
155 pub fn account_filter_type(mut self, input: crate::types::AccountFilterType) -> Self {
156 self.account_filter_type = ::std::option::Option::Some(input);
157 self
158 }
159 /// <p>Refines which accounts will have stack operations performed on them by specifying how to use the <code>Accounts</code> and <code>OrganizationalUnitIds</code> properties together.</p>
160 /// <p>The following values determine how CloudFormation selects target accounts:</p>
161 /// <ul>
162 /// <li>
163 /// <p><code>INTERSECTION</code>: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the <code>Accounts</code> property and belong to the specified OUs will be targeted.</p></li>
164 /// <li>
165 /// <p><code>DIFFERENCE</code>: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the <code>Accounts</code> property. This enables you to exclude certain accounts within an OU, such as suspended accounts.</p></li>
166 /// <li>
167 /// <p><code>UNION</code>: Performs stack operations on the specified OUs plus additional individual accounts listed in the <code>Accounts</code> property. This is the default value if <code>AccountFilterType</code> is not provided. This lets you target an entire OU and individual accounts from a different OU in one request. Note that <code>UNION</code> is not supported for <code>CreateStackInstances</code> operations.</p></li>
168 /// <li>
169 /// <p><code>NONE</code>: Performs stack operations on all accounts in the specified organizational units (OUs).</p></li>
170 /// </ul>
171 pub fn set_account_filter_type(mut self, input: ::std::option::Option<crate::types::AccountFilterType>) -> Self {
172 self.account_filter_type = input;
173 self
174 }
175 /// <p>Refines which accounts will have stack operations performed on them by specifying how to use the <code>Accounts</code> and <code>OrganizationalUnitIds</code> properties together.</p>
176 /// <p>The following values determine how CloudFormation selects target accounts:</p>
177 /// <ul>
178 /// <li>
179 /// <p><code>INTERSECTION</code>: Performs stack operations only on specific individual accounts within the selected OUs. Only accounts that are both specified in the <code>Accounts</code> property and belong to the specified OUs will be targeted.</p></li>
180 /// <li>
181 /// <p><code>DIFFERENCE</code>: Performs stack operations on all accounts in the selected OUs except for specific accounts listed in the <code>Accounts</code> property. This enables you to exclude certain accounts within an OU, such as suspended accounts.</p></li>
182 /// <li>
183 /// <p><code>UNION</code>: Performs stack operations on the specified OUs plus additional individual accounts listed in the <code>Accounts</code> property. This is the default value if <code>AccountFilterType</code> is not provided. This lets you target an entire OU and individual accounts from a different OU in one request. Note that <code>UNION</code> is not supported for <code>CreateStackInstances</code> operations.</p></li>
184 /// <li>
185 /// <p><code>NONE</code>: Performs stack operations on all accounts in the specified organizational units (OUs).</p></li>
186 /// </ul>
187 pub fn get_account_filter_type(&self) -> &::std::option::Option<crate::types::AccountFilterType> {
188 &self.account_filter_type
189 }
190 /// Consumes the builder and constructs a [`DeploymentTargets`](crate::types::DeploymentTargets).
191 pub fn build(self) -> crate::types::DeploymentTargets {
192 crate::types::DeploymentTargets {
193 accounts: self.accounts,
194 accounts_url: self.accounts_url,
195 organizational_unit_ids: self.organizational_unit_ids,
196 account_filter_type: self.account_filter_type,
197 }
198 }
199}