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)]
|
5 + | pub struct RegisterTargetWithMaintenanceWindowInput {
|
6 + | /// <p>The ID of the maintenance window the target should be registered with.</p>
|
7 + | pub window_id: ::std::option::Option<::std::string::String>,
|
8 + | /// <p>The type of target being registered with the maintenance window.</p>
|
9 + | pub resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
|
10 + | /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
|
11 + | /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
|
12 + | /// </note>
|
13 + | /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
|
14 + | /// <p><b>Example 1</b>: Specify managed node IDs</p>
|
15 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
16 + | /// ,
|
17 + | /// <instance-id-2>
|
18 + | /// ,
|
19 + | /// <instance-id-3></instance-id-3>
|
20 + | /// </instance-id-2>
|
21 + | /// </instance-id-1></code></p>
|
22 + | /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
|
23 + | /// <p><code>Key=tag:<my-tag-key>
|
24 + | /// ,Values=
|
25 + | /// <my-tag-value-1>
|
26 + | /// ,
|
27 + | /// <my-tag-value-2></my-tag-value-2>
|
28 + | /// </my-tag-value-1>
|
29 + | /// </my-tag-key></code></p>
|
30 + | /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
|
31 + | /// <p><code>Key=tag-key,Values=<my-tag-key-1>
|
32 + | /// ,
|
33 + | /// <my-tag-key-2></my-tag-key-2>
|
34 + | /// </my-tag-key-1></code></p>
|
35 + | /// <p><b>Example 4</b>: Use resource group names</p>
|
36 + | /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
|
37 + | /// <p><b>Example 5</b>: Use filters for resource group types</p>
|
38 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
|
39 + | /// ,
|
40 + | /// <resource-type-2></resource-type-2>
|
41 + | /// </resource-type-1></code></p><note>
|
42 + | /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
|
43 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
|
44 + | /// </note>
|
45 + | /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
46 + | pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
47 + | /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
|
48 + | pub owner_information: ::std::option::Option<::std::string::String>,
|
49 + | /// <p>An optional name for the target.</p>
|
50 + | pub name: ::std::option::Option<::std::string::String>,
|
51 + | /// <p>An optional description for the target.</p>
|
52 + | pub description: ::std::option::Option<::std::string::String>,
|
53 + | /// <p>User-provided idempotency token.</p>
|
54 + | pub client_token: ::std::option::Option<::std::string::String>,
|
55 + | }
|
56 + | impl RegisterTargetWithMaintenanceWindowInput {
|
57 + | /// <p>The ID of the maintenance window the target should be registered with.</p>
|
58 + | pub fn window_id(&self) -> ::std::option::Option<&str> {
|
59 + | self.window_id.as_deref()
|
60 + | }
|
61 + | /// <p>The type of target being registered with the maintenance window.</p>
|
62 + | pub fn resource_type(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowResourceType> {
|
63 + | self.resource_type.as_ref()
|
64 + | }
|
65 + | /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
|
66 + | /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
|
67 + | /// </note>
|
68 + | /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
|
69 + | /// <p><b>Example 1</b>: Specify managed node IDs</p>
|
70 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
71 + | /// ,
|
72 + | /// <instance-id-2>
|
73 + | /// ,
|
74 + | /// <instance-id-3></instance-id-3>
|
75 + | /// </instance-id-2>
|
76 + | /// </instance-id-1></code></p>
|
77 + | /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
|
78 + | /// <p><code>Key=tag:<my-tag-key>
|
79 + | /// ,Values=
|
80 + | /// <my-tag-value-1>
|
81 + | /// ,
|
82 + | /// <my-tag-value-2></my-tag-value-2>
|
83 + | /// </my-tag-value-1>
|
84 + | /// </my-tag-key></code></p>
|
85 + | /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
|
86 + | /// <p><code>Key=tag-key,Values=<my-tag-key-1>
|
87 + | /// ,
|
88 + | /// <my-tag-key-2></my-tag-key-2>
|
89 + | /// </my-tag-key-1></code></p>
|
90 + | /// <p><b>Example 4</b>: Use resource group names</p>
|
91 + | /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
|
92 + | /// <p><b>Example 5</b>: Use filters for resource group types</p>
|
93 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
|
94 + | /// ,
|
95 + | /// <resource-type-2></resource-type-2>
|
96 + | /// </resource-type-1></code></p><note>
|
97 + | /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
|
98 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
|
99 + | /// </note>
|
100 + | /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
101 + | ///
|
102 + | /// 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()`.
|
103 + | pub fn targets(&self) -> &[crate::types::Target] {
|
104 + | self.targets.as_deref().unwrap_or_default()
|
105 + | }
|
106 + | /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
|
107 + | pub fn owner_information(&self) -> ::std::option::Option<&str> {
|
108 + | self.owner_information.as_deref()
|
109 + | }
|
110 + | /// <p>An optional name for the target.</p>
|
111 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
112 + | self.name.as_deref()
|
113 + | }
|
114 + | /// <p>An optional description for the target.</p>
|
115 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
116 + | self.description.as_deref()
|
117 + | }
|
118 + | /// <p>User-provided idempotency token.</p>
|
119 + | pub fn client_token(&self) -> ::std::option::Option<&str> {
|
120 + | self.client_token.as_deref()
|
121 + | }
|
122 + | }
|
123 + | impl ::std::fmt::Debug for RegisterTargetWithMaintenanceWindowInput {
|
124 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
125 + | let mut formatter = f.debug_struct("RegisterTargetWithMaintenanceWindowInput");
|
126 + | formatter.field("window_id", &self.window_id);
|
127 + | formatter.field("resource_type", &self.resource_type);
|
128 + | formatter.field("targets", &self.targets);
|
129 + | formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
|
130 + | formatter.field("name", &self.name);
|
131 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
132 + | formatter.field("client_token", &self.client_token);
|
133 + | formatter.finish()
|
134 + | }
|
135 + | }
|
136 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
137 + | ::aws_smithy_schema::ShapeId::from_parts(
|
138 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$WindowId",
|
139 + | "com.amazonaws.ssm.synthetic",
|
140 + | "RegisterTargetWithMaintenanceWindowInput",
|
141 + | ),
|
142 + | ::aws_smithy_schema::ShapeType::String,
|
143 + | "WindowId",
|
144 + | 0,
|
145 + | );
|
146 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
147 + | ::aws_smithy_schema::ShapeId::from_parts(
|
148 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$ResourceType",
|
149 + | "com.amazonaws.ssm.synthetic",
|
150 + | "RegisterTargetWithMaintenanceWindowInput",
|
151 + | ),
|
152 + | ::aws_smithy_schema::ShapeType::String,
|
153 + | "ResourceType",
|
154 + | 1,
|
155 + | );
|
156 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
157 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
|
158 + | ::aws_smithy_schema::ShapeType::Structure,
|
159 + | "member",
|
160 + | 0,
|
161 + | );
|
162 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
163 + | ::aws_smithy_schema::ShapeId::from_parts(
|
164 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Targets",
|
165 + | "com.amazonaws.ssm.synthetic",
|
166 + | "RegisterTargetWithMaintenanceWindowInput",
|
167 + | ),
|
168 + | ::aws_smithy_schema::ShapeType::List,
|
169 + | "Targets",
|
170 + | 2,
|
171 + | )
|
172 + | .with_list_member(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER);
|
173 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION: ::aws_smithy_schema::Schema<'static> =
|
174 + | ::aws_smithy_schema::Schema::new_member(
|
175 + | ::aws_smithy_schema::ShapeId::from_parts(
|
176 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$OwnerInformation",
|
177 + | "com.amazonaws.ssm.synthetic",
|
178 + | "RegisterTargetWithMaintenanceWindowInput",
|
179 + | ),
|
180 + | ::aws_smithy_schema::ShapeType::String,
|
181 + | "OwnerInformation",
|
182 + | 3,
|
183 + | );
|
184 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
185 + | ::aws_smithy_schema::ShapeId::from_parts(
|
186 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Name",
|
187 + | "com.amazonaws.ssm.synthetic",
|
188 + | "RegisterTargetWithMaintenanceWindowInput",
|
189 + | ),
|
190 + | ::aws_smithy_schema::ShapeType::String,
|
191 + | "Name",
|
192 + | 4,
|
193 + | );
|
194 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
195 + | ::aws_smithy_schema::ShapeId::from_parts(
|
196 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$Description",
|
197 + | "com.amazonaws.ssm.synthetic",
|
198 + | "RegisterTargetWithMaintenanceWindowInput",
|
199 + | ),
|
200 + | ::aws_smithy_schema::ShapeType::String,
|
201 + | "Description",
|
202 + | 5,
|
203 + | );
|
204 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
205 + | ::aws_smithy_schema::ShapeId::from_parts(
|
206 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput$ClientToken",
|
207 + | "com.amazonaws.ssm.synthetic",
|
208 + | "RegisterTargetWithMaintenanceWindowInput",
|
209 + | ),
|
210 + | ::aws_smithy_schema::ShapeType::String,
|
211 + | "ClientToken",
|
212 + | 6,
|
213 + | );
|
214 + | static REGISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
215 + | ::aws_smithy_schema::ShapeId::from_parts(
|
216 + | "com.amazonaws.ssm.synthetic#RegisterTargetWithMaintenanceWindowInput",
|
217 + | "com.amazonaws.ssm.synthetic",
|
218 + | "RegisterTargetWithMaintenanceWindowInput",
|
219 + | ),
|
220 + | ::aws_smithy_schema::ShapeType::Structure,
|
221 + | &[
|
222 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID,
|
223 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE,
|
224 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
|
225 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION,
|
226 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME,
|
227 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION,
|
228 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN,
|
229 + | ],
|
230 + | )
|
231 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
232 + | .with_original_name("RegisterTargetWithMaintenanceWindowRequest");
|
233 + | impl RegisterTargetWithMaintenanceWindowInput {
|
234 + | /// The schema for this shape.
|
235 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA;
|
236 + | }
|
237 + | impl ::aws_smithy_schema::serde::SerializableStruct for RegisterTargetWithMaintenanceWindowInput {
|
238 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
239 + | fn serialize_members(
|
240 + | &self,
|
241 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
242 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
243 + | if let Some(ref val) = self.window_id {
|
244 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID, val)?;
|
245 + | }
|
246 + | if let Some(ref val) = self.resource_type {
|
247 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_RESOURCE_TYPE, val.as_str())?;
|
248 + | }
|
249 + | if let Some(ref val) = self.targets {
|
250 + | ser.write_list(
|
251 + | ®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
|
252 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
253 + | for item in val {
|
254 + | ser.write_struct(crate::types::Target::SCHEMA, item)?;
|
255 + | }
|
256 + | Ok(())
|
257 + | },
|
258 + | )?;
|
259 + | }
|
260 + | if let Some(ref val) = self.owner_information {
|
261 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_OWNER_INFORMATION, val)?;
|
262 + | }
|
263 + | if let Some(ref val) = self.name {
|
264 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME, val)?;
|
265 + | }
|
266 + | if let Some(ref val) = self.description {
|
267 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION, val)?;
|
268 + | }
|
269 + | if let Some(ref val) = self.client_token {
|
270 + | ser.write_string(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN, val)?;
|
271 + | }
|
272 + | Ok(())
|
273 + | }
|
274 + | }
|
275 + | impl RegisterTargetWithMaintenanceWindowInput {
|
276 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
277 + | pub fn deserialize(
|
278 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
279 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
280 + | #[allow(unused_variables, unused_mut)]
|
281 + | let mut builder = Self::builder();
|
282 + | #[allow(
|
283 + | unused_variables,
|
284 + | unreachable_code,
|
285 + | clippy::single_match,
|
286 + | clippy::match_single_binding,
|
287 + | clippy::diverging_sub_expression
|
288 + | )]
|
289 + | deserializer.read_struct(®ISTERTARGETWITHMAINTENANCEWINDOWINPUT_SCHEMA, &mut |member, deser| {
|
290 + | match member.member_index() {
|
291 + | Some(0) => {
|
292 + | if deser.is_null() {
|
293 + | deser.read_null()?;
|
294 + | } else {
|
295 + | builder.window_id = Some(deser.read_string(member)?);
|
296 + | }
|
297 + | }
|
298 + | Some(1) => {
|
299 + | if deser.is_null() {
|
300 + | deser.read_null()?;
|
301 + | } else {
|
302 + | builder.resource_type = Some(crate::types::MaintenanceWindowResourceType::from(deser.read_string(member)?.as_str()));
|
303 + | }
|
304 + | }
|
305 + | Some(2) => {
|
306 + | if deser.is_null() {
|
307 + | deser.read_null()?;
|
308 + | } else {
|
309 + | builder.targets = Some({
|
310 + | let mut container = Vec::new();
|
311 + | deser.read_list(member, &mut |deser| {
|
312 + | container.push(crate::types::Target::deserialize(deser)?);
|
313 + | Ok(())
|
314 + | })?;
|
315 + | container
|
316 + | });
|
317 + | }
|
318 + | }
|
319 + | Some(3) => {
|
320 + | if deser.is_null() {
|
321 + | deser.read_null()?;
|
322 + | } else {
|
323 + | builder.owner_information = Some(deser.read_string(member)?);
|
324 + | }
|
325 + | }
|
326 + | Some(4) => {
|
327 + | if deser.is_null() {
|
328 + | deser.read_null()?;
|
329 + | } else {
|
330 + | builder.name = Some(deser.read_string(member)?);
|
331 + | }
|
332 + | }
|
333 + | Some(5) => {
|
334 + | if deser.is_null() {
|
335 + | deser.read_null()?;
|
336 + | } else {
|
337 + | builder.description = Some(deser.read_string(member)?);
|
338 + | }
|
339 + | }
|
340 + | Some(6) => {
|
341 + | if deser.is_null() {
|
342 + | deser.read_null()?;
|
343 + | } else {
|
344 + | builder.client_token = Some(deser.read_string(member)?);
|
345 + | }
|
346 + | }
|
347 + | _ => {}
|
348 + | }
|
349 + | Ok(())
|
350 + | })?;
|
351 + | builder.window_id = builder.window_id.or(Some(String::new()));
|
352 + | builder.targets = builder.targets.or(Some(Vec::new()));
|
353 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
354 + | }
|
355 + | }
|
356 + | impl RegisterTargetWithMaintenanceWindowInput {
|
357 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
358 + | pub fn deserialize_with_response(
|
359 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
360 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
361 + | _status: u16,
|
362 + | _body: &[u8],
|
363 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
364 + | Self::deserialize(deserializer)
|
365 + | }
|
366 + | }
|
367 + | impl RegisterTargetWithMaintenanceWindowInput {
|
368 + | /// Creates a new builder-style object to manufacture [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
|
369 + | pub fn builder() -> crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder {
|
370 + | crate::operation::register_target_with_maintenance_window::builders::RegisterTargetWithMaintenanceWindowInputBuilder::default()
|
371 + | }
|
372 + | }
|
373 + |
|
374 + | /// A builder for [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
|
375 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
376 + | #[non_exhaustive]
|
377 + | pub struct RegisterTargetWithMaintenanceWindowInputBuilder {
|
378 + | pub(crate) window_id: ::std::option::Option<::std::string::String>,
|
379 + | pub(crate) resource_type: ::std::option::Option<crate::types::MaintenanceWindowResourceType>,
|
380 + | pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
381 + | pub(crate) owner_information: ::std::option::Option<::std::string::String>,
|
382 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
383 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
384 + | pub(crate) client_token: ::std::option::Option<::std::string::String>,
|
385 + | }
|
386 + | impl RegisterTargetWithMaintenanceWindowInputBuilder {
|
387 + | /// <p>The ID of the maintenance window the target should be registered with.</p>
|
388 + | /// This field is required.
|
389 + | pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
390 + | self.window_id = ::std::option::Option::Some(input.into());
|
391 + | self
|
392 + | }
|
393 + | /// <p>The ID of the maintenance window the target should be registered with.</p>
|
394 + | pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
395 + | self.window_id = input;
|
396 + | self
|
397 + | }
|
398 + | /// <p>The ID of the maintenance window the target should be registered with.</p>
|
399 + | pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
|
400 + | &self.window_id
|
401 + | }
|
402 + | /// <p>The type of target being registered with the maintenance window.</p>
|
403 + | /// This field is required.
|
404 + | pub fn resource_type(mut self, input: crate::types::MaintenanceWindowResourceType) -> Self {
|
405 + | self.resource_type = ::std::option::Option::Some(input);
|
406 + | self
|
407 + | }
|
408 + | /// <p>The type of target being registered with the maintenance window.</p>
|
409 + | pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowResourceType>) -> Self {
|
410 + | self.resource_type = input;
|
411 + | self
|
412 + | }
|
413 + | /// <p>The type of target being registered with the maintenance window.</p>
|
414 + | pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowResourceType> {
|
415 + | &self.resource_type
|
416 + | }
|
417 + | /// Appends an item to `targets`.
|
418 + | ///
|
419 + | /// To override the contents of this collection use [`set_targets`](Self::set_targets).
|
420 + | ///
|
421 + | /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
|
422 + | /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
|
423 + | /// </note>
|
424 + | /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
|
425 + | /// <p><b>Example 1</b>: Specify managed node IDs</p>
|
426 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
427 + | /// ,
|
428 + | /// <instance-id-2>
|
429 + | /// ,
|
430 + | /// <instance-id-3></instance-id-3>
|
431 + | /// </instance-id-2>
|
432 + | /// </instance-id-1></code></p>
|
433 + | /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
|
434 + | /// <p><code>Key=tag:<my-tag-key>
|
435 + | /// ,Values=
|
436 + | /// <my-tag-value-1>
|
437 + | /// ,
|
438 + | /// <my-tag-value-2></my-tag-value-2>
|
439 + | /// </my-tag-value-1>
|
440 + | /// </my-tag-key></code></p>
|
441 + | /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
|
442 + | /// <p><code>Key=tag-key,Values=<my-tag-key-1>
|
443 + | /// ,
|
444 + | /// <my-tag-key-2></my-tag-key-2>
|
445 + | /// </my-tag-key-1></code></p>
|
446 + | /// <p><b>Example 4</b>: Use resource group names</p>
|
447 + | /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
|
448 + | /// <p><b>Example 5</b>: Use filters for resource group types</p>
|
449 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
|
450 + | /// ,
|
451 + | /// <resource-type-2></resource-type-2>
|
452 + | /// </resource-type-1></code></p><note>
|
453 + | /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
|
454 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
|
455 + | /// </note>
|
456 + | /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
457 + | pub fn targets(mut self, input: crate::types::Target) -> Self {
|
458 + | let mut v = self.targets.unwrap_or_default();
|
459 + | v.push(input);
|
460 + | self.targets = ::std::option::Option::Some(v);
|
461 + | self
|
462 + | }
|
463 + | /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
|
464 + | /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
|
465 + | /// </note>
|
466 + | /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
|
467 + | /// <p><b>Example 1</b>: Specify managed node IDs</p>
|
468 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
469 + | /// ,
|
470 + | /// <instance-id-2>
|
471 + | /// ,
|
472 + | /// <instance-id-3></instance-id-3>
|
473 + | /// </instance-id-2>
|
474 + | /// </instance-id-1></code></p>
|
475 + | /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
|
476 + | /// <p><code>Key=tag:<my-tag-key>
|
477 + | /// ,Values=
|
478 + | /// <my-tag-value-1>
|
479 + | /// ,
|
480 + | /// <my-tag-value-2></my-tag-value-2>
|
481 + | /// </my-tag-value-1>
|
482 + | /// </my-tag-key></code></p>
|
483 + | /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
|
484 + | /// <p><code>Key=tag-key,Values=<my-tag-key-1>
|
485 + | /// ,
|
486 + | /// <my-tag-key-2></my-tag-key-2>
|
487 + | /// </my-tag-key-1></code></p>
|
488 + | /// <p><b>Example 4</b>: Use resource group names</p>
|
489 + | /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
|
490 + | /// <p><b>Example 5</b>: Use filters for resource group types</p>
|
491 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
|
492 + | /// ,
|
493 + | /// <resource-type-2></resource-type-2>
|
494 + | /// </resource-type-1></code></p><note>
|
495 + | /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
|
496 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
|
497 + | /// </note>
|
498 + | /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
499 + | pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
|
500 + | self.targets = input;
|
501 + | self
|
502 + | }
|
503 + | /// <p>The targets to register with the maintenance window. In other words, the managed nodes to run commands on when the maintenance window runs.</p><note>
|
504 + | /// <p>If a single maintenance window task is registered with multiple targets, its task invocations occur sequentially and not in parallel. If your task must run on multiple targets at the same time, register a task for each target individually and assign each task the same priority level.</p>
|
505 + | /// </note>
|
506 + | /// <p>You can specify targets using managed node IDs, resource group names, or tags that have been applied to managed nodes.</p>
|
507 + | /// <p><b>Example 1</b>: Specify managed node IDs</p>
|
508 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
509 + | /// ,
|
510 + | /// <instance-id-2>
|
511 + | /// ,
|
512 + | /// <instance-id-3></instance-id-3>
|
513 + | /// </instance-id-2>
|
514 + | /// </instance-id-1></code></p>
|
515 + | /// <p><b>Example 2</b>: Use tag key-pairs applied to managed nodes</p>
|
516 + | /// <p><code>Key=tag:<my-tag-key>
|
517 + | /// ,Values=
|
518 + | /// <my-tag-value-1>
|
519 + | /// ,
|
520 + | /// <my-tag-value-2></my-tag-value-2>
|
521 + | /// </my-tag-value-1>
|
522 + | /// </my-tag-key></code></p>
|
523 + | /// <p><b>Example 3</b>: Use tag-keys applied to managed nodes</p>
|
524 + | /// <p><code>Key=tag-key,Values=<my-tag-key-1>
|
525 + | /// ,
|
526 + | /// <my-tag-key-2></my-tag-key-2>
|
527 + | /// </my-tag-key-1></code></p>
|
528 + | /// <p><b>Example 4</b>: Use resource group names</p>
|
529 + | /// <p><code>Key=resource-groups:Name,Values=<resource-group-name></resource-group-name></code></p>
|
530 + | /// <p><b>Example 5</b>: Use filters for resource group types</p>
|
531 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=<resource-type-1>
|
532 + | /// ,
|
533 + | /// <resource-type-2></resource-type-2>
|
534 + | /// </resource-type-1></code></p><note>
|
535 + | /// <p>For <code>Key=resource-groups:ResourceTypeFilters</code>, specify resource types in the following format</p>
|
536 + | /// <p><code>Key=resource-groups:ResourceTypeFilters,Values=AWS::EC2::INSTANCE,AWS::EC2::VPC</code></p>
|
537 + | /// </note>
|
538 + | /// <p>For more information about these examples formats, including the best use case for each one, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/mw-cli-tutorial-targets-examples.html">Examples: Register targets with a maintenance window</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
539 + | pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
|
540 + | &self.targets
|
541 + | }
|
542 + | /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
|
543 + | pub fn owner_information(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
544 + | self.owner_information = ::std::option::Option::Some(input.into());
|
545 + | self
|
546 + | }
|
547 + | /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
|
548 + | pub fn set_owner_information(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
549 + | self.owner_information = input;
|
550 + | self
|
551 + | }
|
552 + | /// <p>User-provided value that will be included in any Amazon CloudWatch Events events raised while running tasks for these targets in this maintenance window.</p>
|
553 + | pub fn get_owner_information(&self) -> &::std::option::Option<::std::string::String> {
|
554 + | &self.owner_information
|
555 + | }
|
556 + | /// <p>An optional name for the target.</p>
|
557 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
558 + | self.name = ::std::option::Option::Some(input.into());
|
559 + | self
|
560 + | }
|
561 + | /// <p>An optional name for the target.</p>
|
562 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
563 + | self.name = input;
|
564 + | self
|
565 + | }
|
566 + | /// <p>An optional name for the target.</p>
|
567 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
568 + | &self.name
|
569 + | }
|
570 + | /// <p>An optional description for the target.</p>
|
571 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
572 + | self.description = ::std::option::Option::Some(input.into());
|
573 + | self
|
574 + | }
|
575 + | /// <p>An optional description for the target.</p>
|
576 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
577 + | self.description = input;
|
578 + | self
|
579 + | }
|
580 + | /// <p>An optional description for the target.</p>
|
581 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
582 + | &self.description
|
583 + | }
|
584 + | /// <p>User-provided idempotency token.</p>
|
585 + | pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
586 + | self.client_token = ::std::option::Option::Some(input.into());
|
587 + | self
|
588 + | }
|
589 + | /// <p>User-provided idempotency token.</p>
|
590 + | pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
591 + | self.client_token = input;
|
592 + | self
|
593 + | }
|
594 + | /// <p>User-provided idempotency token.</p>
|
595 + | pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
|
596 + | &self.client_token
|
597 + | }
|
598 + | /// Consumes the builder and constructs a [`RegisterTargetWithMaintenanceWindowInput`](crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput).
|
599 + | pub fn build(
|
600 + | self,
|
601 + | ) -> ::std::result::Result<
|
602 + | crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput,
|
603 + | ::aws_smithy_types::error::operation::BuildError,
|
604 + | > {
|
605 + | ::std::result::Result::Ok(
|
606 + | crate::operation::register_target_with_maintenance_window::RegisterTargetWithMaintenanceWindowInput {
|
607 + | window_id: self.window_id,
|
608 + | resource_type: self.resource_type,
|
609 + | targets: self.targets,
|
610 + | owner_information: self.owner_information,
|
611 + | name: self.name,
|
612 + | description: self.description,
|
613 + | client_token: self.client_token,
|
614 + | },
|
615 + | )
|
616 + | }
|
617 + | }
|
618 + | impl ::std::fmt::Debug for RegisterTargetWithMaintenanceWindowInputBuilder {
|
619 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
620 + | let mut formatter = f.debug_struct("RegisterTargetWithMaintenanceWindowInputBuilder");
|
621 + | formatter.field("window_id", &self.window_id);
|
622 + | formatter.field("resource_type", &self.resource_type);
|
623 + | formatter.field("targets", &self.targets);
|
624 + | formatter.field("owner_information", &"*** Sensitive Data Redacted ***");
|
625 + | formatter.field("name", &self.name);
|
626 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
627 + | formatter.field("client_token", &self.client_token);
|
628 + | formatter.finish()
|
629 + | }
|
630 + | }
|