1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>The combination of Amazon Web Services Regions and Amazon Web Services accounts targeted by the current Automation execution.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct TargetLocation {
|
7 + | /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
|
8 + | pub accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
9 + | /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
|
10 + | pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
11 + | /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
|
12 + | pub target_location_max_concurrency: ::std::option::Option<::std::string::String>,
|
13 + | /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
|
14 + | pub target_location_max_errors: ::std::option::Option<::std::string::String>,
|
15 + | /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
|
16 + | pub execution_role_name: ::std::option::Option<::std::string::String>,
|
17 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
18 + | pub target_location_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
19 + | /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
|
20 + | pub include_child_organization_units: bool,
|
21 + | /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
|
22 + | pub exclude_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
23 + | /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
|
24 + | /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
|
25 + | pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
26 + | /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
|
27 + | pub targets_max_concurrency: ::std::option::Option<::std::string::String>,
|
28 + | /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
|
29 + | pub targets_max_errors: ::std::option::Option<::std::string::String>,
|
30 + | }
|
31 + | impl TargetLocation {
|
32 + | /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
|
33 + | ///
|
34 + | /// 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()`.
|
35 + | pub fn accounts(&self) -> &[::std::string::String] {
|
36 + | self.accounts.as_deref().unwrap_or_default()
|
37 + | }
|
38 + | /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
|
39 + | ///
|
40 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.regions.is_none()`.
|
41 + | pub fn regions(&self) -> &[::std::string::String] {
|
42 + | self.regions.as_deref().unwrap_or_default()
|
43 + | }
|
44 + | /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
|
45 + | pub fn target_location_max_concurrency(&self) -> ::std::option::Option<&str> {
|
46 + | self.target_location_max_concurrency.as_deref()
|
47 + | }
|
48 + | /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
|
49 + | pub fn target_location_max_errors(&self) -> ::std::option::Option<&str> {
|
50 + | self.target_location_max_errors.as_deref()
|
51 + | }
|
52 + | /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
|
53 + | pub fn execution_role_name(&self) -> ::std::option::Option<&str> {
|
54 + | self.execution_role_name.as_deref()
|
55 + | }
|
56 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
57 + | pub fn target_location_alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
|
58 + | self.target_location_alarm_configuration.as_ref()
|
59 + | }
|
60 + | /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
|
61 + | pub fn include_child_organization_units(&self) -> bool {
|
62 + | self.include_child_organization_units
|
63 + | }
|
64 + | /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
|
65 + | ///
|
66 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.exclude_accounts.is_none()`.
|
67 + | pub fn exclude_accounts(&self) -> &[::std::string::String] {
|
68 + | self.exclude_accounts.as_deref().unwrap_or_default()
|
69 + | }
|
70 + | /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
|
71 + | /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
|
72 + | ///
|
73 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
|
74 + | pub fn targets(&self) -> &[crate::types::Target] {
|
75 + | self.targets.as_deref().unwrap_or_default()
|
76 + | }
|
77 + | /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
|
78 + | pub fn targets_max_concurrency(&self) -> ::std::option::Option<&str> {
|
79 + | self.targets_max_concurrency.as_deref()
|
80 + | }
|
81 + | /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
|
82 + | pub fn targets_max_errors(&self) -> ::std::option::Option<&str> {
|
83 + | self.targets_max_errors.as_deref()
|
84 + | }
|
85 + | }
|
86 + | static TARGETLOCATION_MEMBER_ACCOUNTS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
87 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Accounts$member", "com.amazonaws.ssm", "Accounts"),
|
88 + | ::aws_smithy_schema::ShapeType::String,
|
89 + | "member",
|
90 + | 0,
|
91 + | );
|
92 + | static TARGETLOCATION_MEMBER_ACCOUNTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
93 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Accounts", "com.amazonaws.ssm", "TargetLocation"),
|
94 + | ::aws_smithy_schema::ShapeType::List,
|
95 + | "Accounts",
|
96 + | 0,
|
97 + | )
|
98 + | .with_list_member(&TARGETLOCATION_MEMBER_ACCOUNTS_MEMBER);
|
99 + | static TARGETLOCATION_MEMBER_REGIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
100 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Regions$member", "com.amazonaws.ssm", "Regions"),
|
101 + | ::aws_smithy_schema::ShapeType::String,
|
102 + | "member",
|
103 + | 0,
|
104 + | );
|
105 + | static TARGETLOCATION_MEMBER_REGIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
106 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Regions", "com.amazonaws.ssm", "TargetLocation"),
|
107 + | ::aws_smithy_schema::ShapeType::List,
|
108 + | "Regions",
|
109 + | 1,
|
110 + | )
|
111 + | .with_list_member(&TARGETLOCATION_MEMBER_REGIONS_MEMBER);
|
112 + | static TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
113 + | ::aws_smithy_schema::ShapeId::from_parts(
|
114 + | "com.amazonaws.ssm#TargetLocation$TargetLocationMaxConcurrency",
|
115 + | "com.amazonaws.ssm",
|
116 + | "TargetLocation",
|
117 + | ),
|
118 + | ::aws_smithy_schema::ShapeType::String,
|
119 + | "TargetLocationMaxConcurrency",
|
120 + | 2,
|
121 + | );
|
122 + | static TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
123 + | ::aws_smithy_schema::ShapeId::from_parts(
|
124 + | "com.amazonaws.ssm#TargetLocation$TargetLocationMaxErrors",
|
125 + | "com.amazonaws.ssm",
|
126 + | "TargetLocation",
|
127 + | ),
|
128 + | ::aws_smithy_schema::ShapeType::String,
|
129 + | "TargetLocationMaxErrors",
|
130 + | 3,
|
131 + | );
|
132 + | static TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
133 + | ::aws_smithy_schema::ShapeId::from_parts(
|
134 + | "com.amazonaws.ssm#TargetLocation$ExecutionRoleName",
|
135 + | "com.amazonaws.ssm",
|
136 + | "TargetLocation",
|
137 + | ),
|
138 + | ::aws_smithy_schema::ShapeType::String,
|
139 + | "ExecutionRoleName",
|
140 + | 4,
|
141 + | );
|
142 + | static TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
143 + | ::aws_smithy_schema::ShapeId::from_parts(
|
144 + | "com.amazonaws.ssm#TargetLocation$TargetLocationAlarmConfiguration",
|
145 + | "com.amazonaws.ssm",
|
146 + | "TargetLocation",
|
147 + | ),
|
148 + | ::aws_smithy_schema::ShapeType::Structure,
|
149 + | "TargetLocationAlarmConfiguration",
|
150 + | 5,
|
151 + | );
|
152 + | static TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
153 + | ::aws_smithy_schema::ShapeId::from_parts(
|
154 + | "com.amazonaws.ssm#TargetLocation$IncludeChildOrganizationUnits",
|
155 + | "com.amazonaws.ssm",
|
156 + | "TargetLocation",
|
157 + | ),
|
158 + | ::aws_smithy_schema::ShapeType::Boolean,
|
159 + | "IncludeChildOrganizationUnits",
|
160 + | 6,
|
161 + | );
|
162 + | static TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
163 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ExcludeAccounts$member", "com.amazonaws.ssm", "ExcludeAccounts"),
|
164 + | ::aws_smithy_schema::ShapeType::String,
|
165 + | "member",
|
166 + | 0,
|
167 + | );
|
168 + | static TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
169 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$ExcludeAccounts", "com.amazonaws.ssm", "TargetLocation"),
|
170 + | ::aws_smithy_schema::ShapeType::List,
|
171 + | "ExcludeAccounts",
|
172 + | 7,
|
173 + | )
|
174 + | .with_list_member(&TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS_MEMBER);
|
175 + | static TARGETLOCATION_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
176 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#AutomationTargets$member", "com.amazonaws.ssm", "AutomationTargets"),
|
177 + | ::aws_smithy_schema::ShapeType::Structure,
|
178 + | "member",
|
179 + | 0,
|
180 + | );
|
181 + | static TARGETLOCATION_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
182 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$Targets", "com.amazonaws.ssm", "TargetLocation"),
|
183 + | ::aws_smithy_schema::ShapeType::List,
|
184 + | "Targets",
|
185 + | 8,
|
186 + | )
|
187 + | .with_list_member(&TARGETLOCATION_MEMBER_TARGETS_MEMBER);
|
188 + | static TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
189 + | ::aws_smithy_schema::ShapeId::from_parts(
|
190 + | "com.amazonaws.ssm#TargetLocation$TargetsMaxConcurrency",
|
191 + | "com.amazonaws.ssm",
|
192 + | "TargetLocation",
|
193 + | ),
|
194 + | ::aws_smithy_schema::ShapeType::String,
|
195 + | "TargetsMaxConcurrency",
|
196 + | 9,
|
197 + | );
|
198 + | static TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
199 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation$TargetsMaxErrors", "com.amazonaws.ssm", "TargetLocation"),
|
200 + | ::aws_smithy_schema::ShapeType::String,
|
201 + | "TargetsMaxErrors",
|
202 + | 10,
|
203 + | );
|
204 + | static TARGETLOCATION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
205 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocation", "com.amazonaws.ssm", "TargetLocation"),
|
206 + | ::aws_smithy_schema::ShapeType::Structure,
|
207 + | &[
|
208 + | &TARGETLOCATION_MEMBER_ACCOUNTS,
|
209 + | &TARGETLOCATION_MEMBER_REGIONS,
|
210 + | &TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY,
|
211 + | &TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS,
|
212 + | &TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME,
|
213 + | &TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION,
|
214 + | &TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS,
|
215 + | &TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS,
|
216 + | &TARGETLOCATION_MEMBER_TARGETS,
|
217 + | &TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY,
|
218 + | &TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS,
|
219 + | ],
|
220 + | );
|
221 + | impl TargetLocation {
|
222 + | /// The schema for this shape.
|
223 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &TARGETLOCATION_SCHEMA;
|
224 + | }
|
225 + | impl ::aws_smithy_schema::serde::SerializableStruct for TargetLocation {
|
226 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
227 + | fn serialize_members(
|
228 + | &self,
|
229 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
230 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
231 + | if let Some(ref val) = self.accounts {
|
232 + | ser.write_list(
|
233 + | &TARGETLOCATION_MEMBER_ACCOUNTS,
|
234 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
235 + | for item in val {
|
236 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
237 + | }
|
238 + | Ok(())
|
239 + | },
|
240 + | )?;
|
241 + | }
|
242 + | if let Some(ref val) = self.regions {
|
243 + | ser.write_list(
|
244 + | &TARGETLOCATION_MEMBER_REGIONS,
|
245 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
246 + | for item in val {
|
247 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
248 + | }
|
249 + | Ok(())
|
250 + | },
|
251 + | )?;
|
252 + | }
|
253 + | if let Some(ref val) = self.target_location_max_concurrency {
|
254 + | ser.write_string(&TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_CONCURRENCY, val)?;
|
255 + | }
|
256 + | if let Some(ref val) = self.target_location_max_errors {
|
257 + | ser.write_string(&TARGETLOCATION_MEMBER_TARGET_LOCATION_MAX_ERRORS, val)?;
|
258 + | }
|
259 + | if let Some(ref val) = self.execution_role_name {
|
260 + | ser.write_string(&TARGETLOCATION_MEMBER_EXECUTION_ROLE_NAME, val)?;
|
261 + | }
|
262 + | if let Some(ref val) = self.target_location_alarm_configuration {
|
263 + | ser.write_struct(&TARGETLOCATION_MEMBER_TARGET_LOCATION_ALARM_CONFIGURATION, val)?;
|
264 + | }
|
265 + | {
|
266 + | let val = &self.include_child_organization_units;
|
267 + | ser.write_boolean(&TARGETLOCATION_MEMBER_INCLUDE_CHILD_ORGANIZATION_UNITS, *val)?;
|
268 + | }
|
269 + | if let Some(ref val) = self.exclude_accounts {
|
270 + | ser.write_list(
|
271 + | &TARGETLOCATION_MEMBER_EXCLUDE_ACCOUNTS,
|
272 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
273 + | for item in val {
|
274 + | ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
|
275 + | }
|
276 + | Ok(())
|
277 + | },
|
278 + | )?;
|
279 + | }
|
280 + | if let Some(ref val) = self.targets {
|
281 + | ser.write_list(
|
282 + | &TARGETLOCATION_MEMBER_TARGETS,
|
283 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
284 + | for item in val {
|
285 + | ser.write_struct(crate::types::Target::SCHEMA, item)?;
|
286 + | }
|
287 + | Ok(())
|
288 + | },
|
289 + | )?;
|
290 + | }
|
291 + | if let Some(ref val) = self.targets_max_concurrency {
|
292 + | ser.write_string(&TARGETLOCATION_MEMBER_TARGETS_MAX_CONCURRENCY, val)?;
|
293 + | }
|
294 + | if let Some(ref val) = self.targets_max_errors {
|
295 + | ser.write_string(&TARGETLOCATION_MEMBER_TARGETS_MAX_ERRORS, val)?;
|
296 + | }
|
297 + | Ok(())
|
298 + | }
|
299 + | }
|
300 + | impl TargetLocation {
|
301 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
302 + | pub fn deserialize(
|
303 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
304 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
305 + | #[allow(unused_variables, unused_mut)]
|
306 + | let mut builder = Self::builder();
|
307 + | #[allow(
|
308 + | unused_variables,
|
309 + | unreachable_code,
|
310 + | clippy::single_match,
|
311 + | clippy::match_single_binding,
|
312 + | clippy::diverging_sub_expression
|
313 + | )]
|
314 + | deserializer.read_struct(&TARGETLOCATION_SCHEMA, &mut |member, deser| {
|
315 + | match member.member_index() {
|
316 + | Some(0) => {
|
317 + | if deser.is_null() {
|
318 + | deser.read_null()?;
|
319 + | } else {
|
320 + | builder.accounts = Some(deser.read_string_list(member)?);
|
321 + | }
|
322 + | }
|
323 + | Some(1) => {
|
324 + | if deser.is_null() {
|
325 + | deser.read_null()?;
|
326 + | } else {
|
327 + | builder.regions = Some(deser.read_string_list(member)?);
|
328 + | }
|
329 + | }
|
330 + | Some(2) => {
|
331 + | if deser.is_null() {
|
332 + | deser.read_null()?;
|
333 + | } else {
|
334 + | builder.target_location_max_concurrency = Some(deser.read_string(member)?);
|
335 + | }
|
336 + | }
|
337 + | Some(3) => {
|
338 + | if deser.is_null() {
|
339 + | deser.read_null()?;
|
340 + | } else {
|
341 + | builder.target_location_max_errors = Some(deser.read_string(member)?);
|
342 + | }
|
343 + | }
|
344 + | Some(4) => {
|
345 + | if deser.is_null() {
|
346 + | deser.read_null()?;
|
347 + | } else {
|
348 + | builder.execution_role_name = Some(deser.read_string(member)?);
|
349 + | }
|
350 + | }
|
351 + | Some(5) => {
|
352 + | if deser.is_null() {
|
353 + | deser.read_null()?;
|
354 + | } else {
|
355 + | builder.target_location_alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
|
356 + | }
|
357 + | }
|
358 + | Some(6) => {
|
359 + | builder.include_child_organization_units = Some(deser.read_boolean(member)?);
|
360 + | }
|
361 + | Some(7) => {
|
362 + | if deser.is_null() {
|
363 + | deser.read_null()?;
|
364 + | } else {
|
365 + | builder.exclude_accounts = Some(deser.read_string_list(member)?);
|
366 + | }
|
367 + | }
|
368 + | Some(8) => {
|
369 + | if deser.is_null() {
|
370 + | deser.read_null()?;
|
371 + | } else {
|
372 + | builder.targets = Some({
|
373 + | let mut container = Vec::new();
|
374 + | deser.read_list(member, &mut |deser| {
|
375 + | container.push(crate::types::Target::deserialize(deser)?);
|
376 + | Ok(())
|
377 + | })?;
|
378 + | container
|
379 + | });
|
380 + | }
|
381 + | }
|
382 + | Some(9) => {
|
383 + | if deser.is_null() {
|
384 + | deser.read_null()?;
|
385 + | } else {
|
386 + | builder.targets_max_concurrency = Some(deser.read_string(member)?);
|
387 + | }
|
388 + | }
|
389 + | Some(10) => {
|
390 + | if deser.is_null() {
|
391 + | deser.read_null()?;
|
392 + | } else {
|
393 + | builder.targets_max_errors = Some(deser.read_string(member)?);
|
394 + | }
|
395 + | }
|
396 + | _ => {}
|
397 + | }
|
398 + | Ok(())
|
399 + | })?;
|
400 + | Ok(builder.build())
|
401 + | }
|
402 + | }
|
403 + | impl TargetLocation {
|
404 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
405 + | pub fn deserialize_with_response(
|
406 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
407 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
408 + | _status: u16,
|
409 + | _body: &[u8],
|
410 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
411 + | Self::deserialize(deserializer)
|
412 + | }
|
413 + | }
|
414 + | impl TargetLocation {
|
415 + | /// Creates a new builder-style object to manufacture [`TargetLocation`](crate::types::TargetLocation).
|
416 + | pub fn builder() -> crate::types::builders::TargetLocationBuilder {
|
417 + | crate::types::builders::TargetLocationBuilder::default()
|
418 + | }
|
419 + | }
|
420 + |
|
421 + | /// A builder for [`TargetLocation`](crate::types::TargetLocation).
|
422 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
423 + | #[non_exhaustive]
|
424 + | pub struct TargetLocationBuilder {
|
425 + | pub(crate) accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
426 + | pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
427 + | pub(crate) target_location_max_concurrency: ::std::option::Option<::std::string::String>,
|
428 + | pub(crate) target_location_max_errors: ::std::option::Option<::std::string::String>,
|
429 + | pub(crate) execution_role_name: ::std::option::Option<::std::string::String>,
|
430 + | pub(crate) target_location_alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
431 + | pub(crate) include_child_organization_units: ::std::option::Option<bool>,
|
432 + | pub(crate) exclude_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
|
433 + | pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
434 + | pub(crate) targets_max_concurrency: ::std::option::Option<::std::string::String>,
|
435 + | pub(crate) targets_max_errors: ::std::option::Option<::std::string::String>,
|
436 + | }
|
437 + | impl TargetLocationBuilder {
|
438 + | /// Appends an item to `accounts`.
|
439 + | ///
|
440 + | /// To override the contents of this collection use [`set_accounts`](Self::set_accounts).
|
441 + | ///
|
442 + | /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
|
443 + | pub fn accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
444 + | let mut v = self.accounts.unwrap_or_default();
|
445 + | v.push(input.into());
|
446 + | self.accounts = ::std::option::Option::Some(v);
|
447 + | self
|
448 + | }
|
449 + | /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
|
450 + | pub fn set_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
451 + | self.accounts = input;
|
452 + | self
|
453 + | }
|
454 + | /// <p>The Amazon Web Services accounts targeted by the current Automation execution.</p>
|
455 + | pub fn get_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
456 + | &self.accounts
|
457 + | }
|
458 + | /// Appends an item to `regions`.
|
459 + | ///
|
460 + | /// To override the contents of this collection use [`set_regions`](Self::set_regions).
|
461 + | ///
|
462 + | /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
|
463 + | pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
464 + | let mut v = self.regions.unwrap_or_default();
|
465 + | v.push(input.into());
|
466 + | self.regions = ::std::option::Option::Some(v);
|
467 + | self
|
468 + | }
|
469 + | /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
|
470 + | pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
471 + | self.regions = input;
|
472 + | self
|
473 + | }
|
474 + | /// <p>The Amazon Web Services Regions targeted by the current Automation execution.</p>
|
475 + | pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
476 + | &self.regions
|
477 + | }
|
478 + | /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
|
479 + | pub fn target_location_max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
480 + | self.target_location_max_concurrency = ::std::option::Option::Some(input.into());
|
481 + | self
|
482 + | }
|
483 + | /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
|
484 + | pub fn set_target_location_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
485 + | self.target_location_max_concurrency = input;
|
486 + | self
|
487 + | }
|
488 + | /// <p>The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently. <code>TargetLocationMaxConcurrency</code> has a default value of 1.</p>
|
489 + | pub fn get_target_location_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
|
490 + | &self.target_location_max_concurrency
|
491 + | }
|
492 + | /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
|
493 + | pub fn target_location_max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
494 + | self.target_location_max_errors = ::std::option::Option::Some(input.into());
|
495 + | self
|
496 + | }
|
497 + | /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
|
498 + | pub fn set_target_location_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
499 + | self.target_location_max_errors = input;
|
500 + | self
|
501 + | }
|
502 + | /// <p>The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation. <code>TargetLocationMaxErrors</code> has a default value of 0.</p>
|
503 + | pub fn get_target_location_max_errors(&self) -> &::std::option::Option<::std::string::String> {
|
504 + | &self.target_location_max_errors
|
505 + | }
|
506 + | /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
|
507 + | pub fn execution_role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
508 + | self.execution_role_name = ::std::option::Option::Some(input.into());
|
509 + | self
|
510 + | }
|
511 + | /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
|
512 + | pub fn set_execution_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
513 + | self.execution_role_name = input;
|
514 + | self
|
515 + | }
|
516 + | /// <p>The Automation execution role used by the currently running Automation. If not specified, the default value is <code>AWS-SystemsManager-AutomationExecutionRole</code>.</p>
|
517 + | pub fn get_execution_role_name(&self) -> &::std::option::Option<::std::string::String> {
|
518 + | &self.execution_role_name
|
519 + | }
|
520 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
521 + | pub fn target_location_alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
|
522 + | self.target_location_alarm_configuration = ::std::option::Option::Some(input);
|
523 + | self
|
524 + | }
|
525 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
526 + | pub fn set_target_location_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
|
527 + | self.target_location_alarm_configuration = input;
|
528 + | self
|
529 + | }
|
530 + | /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
|
531 + | pub fn get_target_location_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
|
532 + | &self.target_location_alarm_configuration
|
533 + | }
|
534 + | /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
|
535 + | pub fn include_child_organization_units(mut self, input: bool) -> Self {
|
536 + | self.include_child_organization_units = ::std::option::Option::Some(input);
|
537 + | self
|
538 + | }
|
539 + | /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
|
540 + | pub fn set_include_child_organization_units(mut self, input: ::std::option::Option<bool>) -> Self {
|
541 + | self.include_child_organization_units = input;
|
542 + | self
|
543 + | }
|
544 + | /// <p>Indicates whether to include child organizational units (OUs) that are children of the targeted OUs. The default is <code>false</code>.</p>
|
545 + | pub fn get_include_child_organization_units(&self) -> &::std::option::Option<bool> {
|
546 + | &self.include_child_organization_units
|
547 + | }
|
548 + | /// Appends an item to `exclude_accounts`.
|
549 + | ///
|
550 + | /// To override the contents of this collection use [`set_exclude_accounts`](Self::set_exclude_accounts).
|
551 + | ///
|
552 + | /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
|
553 + | pub fn exclude_accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
554 + | let mut v = self.exclude_accounts.unwrap_or_default();
|
555 + | v.push(input.into());
|
556 + | self.exclude_accounts = ::std::option::Option::Some(v);
|
557 + | self
|
558 + | }
|
559 + | /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
|
560 + | pub fn set_exclude_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
|
561 + | self.exclude_accounts = input;
|
562 + | self
|
563 + | }
|
564 + | /// <p>Amazon Web Services accounts or organizational units to exclude as expanded targets.</p>
|
565 + | pub fn get_exclude_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
|
566 + | &self.exclude_accounts
|
567 + | }
|
568 + | /// Appends an item to `targets`.
|
569 + | ///
|
570 + | /// To override the contents of this collection use [`set_targets`](Self::set_targets).
|
571 + | ///
|
572 + | /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
|
573 + | /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
|
574 + | pub fn targets(mut self, input: crate::types::Target) -> Self {
|
575 + | let mut v = self.targets.unwrap_or_default();
|
576 + | v.push(input);
|
577 + | self.targets = ::std::option::Option::Some(v);
|
578 + | self
|
579 + | }
|
580 + | /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
|
581 + | /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
|
582 + | pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
|
583 + | self.targets = input;
|
584 + | self
|
585 + | }
|
586 + | /// <p>A list of key-value mappings to target resources. If you specify values for this data type, you must also specify a value for <code>TargetParameterName</code>.</p>
|
587 + | /// <p>This <code>Targets</code> parameter takes precedence over the <code>StartAutomationExecution:Targets</code> parameter if both are supplied.</p>
|
588 + | pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
|
589 + | &self.targets
|
590 + | }
|
591 + | /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
|
592 + | pub fn targets_max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
593 + | self.targets_max_concurrency = ::std::option::Option::Some(input.into());
|
594 + | self
|
595 + | }
|
596 + | /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
|
597 + | pub fn set_targets_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
598 + | self.targets_max_concurrency = input;
|
599 + | self
|
600 + | }
|
601 + | /// <p>The maximum number of targets allowed to run this task in parallel. This <code>TargetsMaxConcurrency</code> takes precedence over the <code>StartAutomationExecution:MaxConcurrency</code> parameter if both are supplied.</p>
|
602 + | pub fn get_targets_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
|
603 + | &self.targets_max_concurrency
|
604 + | }
|
605 + | /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
|
606 + | pub fn targets_max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
607 + | self.targets_max_errors = ::std::option::Option::Some(input.into());
|
608 + | self
|
609 + | }
|
610 + | /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
|
611 + | pub fn set_targets_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
612 + | self.targets_max_errors = input;
|
613 + | self
|
614 + | }
|
615 + | /// <p>The maximum number of errors that are allowed before the system stops running the automation on additional targets. This <code>TargetsMaxErrors</code> parameter takes precedence over the <code>StartAutomationExecution:MaxErrors</code> parameter if both are supplied.</p>
|
616 + | pub fn get_targets_max_errors(&self) -> &::std::option::Option<::std::string::String> {
|
617 + | &self.targets_max_errors
|
618 + | }
|
619 + | /// Consumes the builder and constructs a [`TargetLocation`](crate::types::TargetLocation).
|
620 + | pub fn build(self) -> crate::types::TargetLocation {
|
621 + | crate::types::TargetLocation {
|
622 + | accounts: self.accounts,
|
623 + | regions: self.regions,
|
624 + | target_location_max_concurrency: self.target_location_max_concurrency,
|
625 + | target_location_max_errors: self.target_location_max_errors,
|
626 + | execution_role_name: self.execution_role_name,
|
627 + | target_location_alarm_configuration: self.target_location_alarm_configuration,
|
628 + | include_child_organization_units: self.include_child_organization_units.unwrap_or_default(),
|
629 + | exclude_accounts: self.exclude_accounts,
|
630 + | targets: self.targets,
|
631 + | targets_max_concurrency: self.targets_max_concurrency,
|
632 + | targets_max_errors: self.targets_max_errors,
|
633 + | }
|
634 + | }
|
635 + | }
|