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 RegisterTaskWithMaintenanceWindowInput {
|
6 + | /// <p>The ID of the maintenance window the task should be added to.</p>
|
7 + | pub window_id: ::std::option::Option<::std::string::String>,
|
8 + | /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
|
9 + | /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
10 + | /// </note>
|
11 + | /// <p>Specify managed nodes using the following format:</p>
|
12 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
13 + | /// ,
|
14 + | /// <instance-id-2></instance-id-2>
|
15 + | /// </instance-id-1></code></p>
|
16 + | /// <p>Specify maintenance window targets using the following format:</p>
|
17 + | /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
|
18 + | /// ,
|
19 + | /// <window-target-id-2></window-target-id-2>
|
20 + | /// </window-target-id-1></code></p>
|
21 + | pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
22 + | /// <p>The ARN of the task to run.</p>
|
23 + | pub task_arn: ::std::option::Option<::std::string::String>,
|
24 + | /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
|
25 + | /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
26 + | pub service_role_arn: ::std::option::Option<::std::string::String>,
|
27 + | /// <p>The type of task being registered.</p>
|
28 + | pub task_type: ::std::option::Option<crate::types::MaintenanceWindowTaskType>,
|
29 + | /// <p>The parameters that should be passed to the task when it is run.</p><note>
|
30 + | /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
31 + | /// </note>
|
32 + | pub task_parameters:
|
33 + | ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
|
34 + | /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
|
35 + | pub task_invocation_parameters: ::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters>,
|
36 + | /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
|
37 + | pub priority: ::std::option::Option<i32>,
|
38 + | /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
|
39 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
40 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
41 + | /// </note>
|
42 + | pub max_concurrency: ::std::option::Option<::std::string::String>,
|
43 + | /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
|
44 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
45 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
46 + | /// </note>
|
47 + | pub max_errors: ::std::option::Option<::std::string::String>,
|
48 + | /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
|
49 + | /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
50 + | /// </note>
|
51 + | pub logging_info: ::std::option::Option<crate::types::LoggingInfo>,
|
52 + | /// <p>An optional name for the task.</p>
|
53 + | pub name: ::std::option::Option<::std::string::String>,
|
54 + | /// <p>An optional description for the task.</p>
|
55 + | pub description: ::std::option::Option<::std::string::String>,
|
56 + | /// <p>User-provided idempotency token.</p>
|
57 + | pub client_token: ::std::option::Option<::std::string::String>,
|
58 + | /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
|
59 + | /// <ul>
|
60 + | /// <li>
|
61 + | /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
|
62 + | /// <li>
|
63 + | /// <p><code>CANCEL_TASK</code>:</p>
|
64 + | /// <ul>
|
65 + | /// <li>
|
66 + | /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
|
67 + | /// <li>
|
68 + | /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
|
69 + | /// </ul>
|
70 + | /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
|
71 + | /// </ul>
|
72 + | pub cutoff_behavior: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>,
|
73 + | /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
|
74 + | pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
75 + | }
|
76 + | impl RegisterTaskWithMaintenanceWindowInput {
|
77 + | /// <p>The ID of the maintenance window the task should be added to.</p>
|
78 + | pub fn window_id(&self) -> ::std::option::Option<&str> {
|
79 + | self.window_id.as_deref()
|
80 + | }
|
81 + | /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
|
82 + | /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
83 + | /// </note>
|
84 + | /// <p>Specify managed nodes using the following format:</p>
|
85 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
86 + | /// ,
|
87 + | /// <instance-id-2></instance-id-2>
|
88 + | /// </instance-id-1></code></p>
|
89 + | /// <p>Specify maintenance window targets using the following format:</p>
|
90 + | /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
|
91 + | /// ,
|
92 + | /// <window-target-id-2></window-target-id-2>
|
93 + | /// </window-target-id-1></code></p>
|
94 + | ///
|
95 + | /// 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()`.
|
96 + | pub fn targets(&self) -> &[crate::types::Target] {
|
97 + | self.targets.as_deref().unwrap_or_default()
|
98 + | }
|
99 + | /// <p>The ARN of the task to run.</p>
|
100 + | pub fn task_arn(&self) -> ::std::option::Option<&str> {
|
101 + | self.task_arn.as_deref()
|
102 + | }
|
103 + | /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
|
104 + | /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
105 + | pub fn service_role_arn(&self) -> ::std::option::Option<&str> {
|
106 + | self.service_role_arn.as_deref()
|
107 + | }
|
108 + | /// <p>The type of task being registered.</p>
|
109 + | pub fn task_type(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowTaskType> {
|
110 + | self.task_type.as_ref()
|
111 + | }
|
112 + | /// <p>The parameters that should be passed to the task when it is run.</p><note>
|
113 + | /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
114 + | /// </note>
|
115 + | pub fn task_parameters(
|
116 + | &self,
|
117 + | ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>> {
|
118 + | self.task_parameters.as_ref()
|
119 + | }
|
120 + | /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
|
121 + | pub fn task_invocation_parameters(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowTaskInvocationParameters> {
|
122 + | self.task_invocation_parameters.as_ref()
|
123 + | }
|
124 + | /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
|
125 + | pub fn priority(&self) -> ::std::option::Option<i32> {
|
126 + | self.priority
|
127 + | }
|
128 + | /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
|
129 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
130 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
131 + | /// </note>
|
132 + | pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
|
133 + | self.max_concurrency.as_deref()
|
134 + | }
|
135 + | /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
|
136 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
137 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
138 + | /// </note>
|
139 + | pub fn max_errors(&self) -> ::std::option::Option<&str> {
|
140 + | self.max_errors.as_deref()
|
141 + | }
|
142 + | /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
|
143 + | /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
144 + | /// </note>
|
145 + | pub fn logging_info(&self) -> ::std::option::Option<&crate::types::LoggingInfo> {
|
146 + | self.logging_info.as_ref()
|
147 + | }
|
148 + | /// <p>An optional name for the task.</p>
|
149 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
150 + | self.name.as_deref()
|
151 + | }
|
152 + | /// <p>An optional description for the task.</p>
|
153 + | pub fn description(&self) -> ::std::option::Option<&str> {
|
154 + | self.description.as_deref()
|
155 + | }
|
156 + | /// <p>User-provided idempotency token.</p>
|
157 + | pub fn client_token(&self) -> ::std::option::Option<&str> {
|
158 + | self.client_token.as_deref()
|
159 + | }
|
160 + | /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
|
161 + | /// <ul>
|
162 + | /// <li>
|
163 + | /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
|
164 + | /// <li>
|
165 + | /// <p><code>CANCEL_TASK</code>:</p>
|
166 + | /// <ul>
|
167 + | /// <li>
|
168 + | /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
|
169 + | /// <li>
|
170 + | /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
|
171 + | /// </ul>
|
172 + | /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
|
173 + | /// </ul>
|
174 + | pub fn cutoff_behavior(&self) -> ::std::option::Option<&crate::types::MaintenanceWindowTaskCutoffBehavior> {
|
175 + | self.cutoff_behavior.as_ref()
|
176 + | }
|
177 + | /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
|
178 + | pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
|
179 + | self.alarm_configuration.as_ref()
|
180 + | }
|
181 + | }
|
182 + | impl ::std::fmt::Debug for RegisterTaskWithMaintenanceWindowInput {
|
183 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
184 + | let mut formatter = f.debug_struct("RegisterTaskWithMaintenanceWindowInput");
|
185 + | formatter.field("window_id", &self.window_id);
|
186 + | formatter.field("targets", &self.targets);
|
187 + | formatter.field("task_arn", &self.task_arn);
|
188 + | formatter.field("service_role_arn", &self.service_role_arn);
|
189 + | formatter.field("task_type", &self.task_type);
|
190 + | formatter.field("task_parameters", &"*** Sensitive Data Redacted ***");
|
191 + | formatter.field("task_invocation_parameters", &self.task_invocation_parameters);
|
192 + | formatter.field("priority", &self.priority);
|
193 + | formatter.field("max_concurrency", &self.max_concurrency);
|
194 + | formatter.field("max_errors", &self.max_errors);
|
195 + | formatter.field("logging_info", &self.logging_info);
|
196 + | formatter.field("name", &self.name);
|
197 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
198 + | formatter.field("client_token", &self.client_token);
|
199 + | formatter.field("cutoff_behavior", &self.cutoff_behavior);
|
200 + | formatter.field("alarm_configuration", &self.alarm_configuration);
|
201 + | formatter.finish()
|
202 + | }
|
203 + | }
|
204 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
205 + | ::aws_smithy_schema::ShapeId::from_parts(
|
206 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$WindowId",
|
207 + | "com.amazonaws.ssm.synthetic",
|
208 + | "RegisterTaskWithMaintenanceWindowInput",
|
209 + | ),
|
210 + | ::aws_smithy_schema::ShapeType::String,
|
211 + | "WindowId",
|
212 + | 0,
|
213 + | );
|
214 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
215 + | ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
|
216 + | ::aws_smithy_schema::ShapeType::Structure,
|
217 + | "member",
|
218 + | 0,
|
219 + | );
|
220 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
221 + | ::aws_smithy_schema::ShapeId::from_parts(
|
222 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$Targets",
|
223 + | "com.amazonaws.ssm.synthetic",
|
224 + | "RegisterTaskWithMaintenanceWindowInput",
|
225 + | ),
|
226 + | ::aws_smithy_schema::ShapeType::List,
|
227 + | "Targets",
|
228 + | 1,
|
229 + | )
|
230 + | .with_list_member(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS_MEMBER);
|
231 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
232 + | ::aws_smithy_schema::ShapeId::from_parts(
|
233 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$TaskArn",
|
234 + | "com.amazonaws.ssm.synthetic",
|
235 + | "RegisterTaskWithMaintenanceWindowInput",
|
236 + | ),
|
237 + | ::aws_smithy_schema::ShapeType::String,
|
238 + | "TaskArn",
|
239 + | 2,
|
240 + | );
|
241 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_SERVICE_ROLE_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
242 + | ::aws_smithy_schema::ShapeId::from_parts(
|
243 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$ServiceRoleArn",
|
244 + | "com.amazonaws.ssm.synthetic",
|
245 + | "RegisterTaskWithMaintenanceWindowInput",
|
246 + | ),
|
247 + | ::aws_smithy_schema::ShapeType::String,
|
248 + | "ServiceRoleArn",
|
249 + | 3,
|
250 + | );
|
251 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
252 + | ::aws_smithy_schema::ShapeId::from_parts(
|
253 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$TaskType",
|
254 + | "com.amazonaws.ssm.synthetic",
|
255 + | "RegisterTaskWithMaintenanceWindowInput",
|
256 + | ),
|
257 + | ::aws_smithy_schema::ShapeType::String,
|
258 + | "TaskType",
|
259 + | 4,
|
260 + | );
|
261 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS_KEY: ::aws_smithy_schema::Schema<'static> =
|
262 + | ::aws_smithy_schema::Schema::new_member(
|
263 + | ::aws_smithy_schema::ShapeId::from_parts(
|
264 + | "com.amazonaws.ssm#MaintenanceWindowTaskParameters$key",
|
265 + | "com.amazonaws.ssm",
|
266 + | "MaintenanceWindowTaskParameters",
|
267 + | ),
|
268 + | ::aws_smithy_schema::ShapeType::String,
|
269 + | "key",
|
270 + | 0,
|
271 + | );
|
272 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS_VALUE: ::aws_smithy_schema::Schema<'static> =
|
273 + | ::aws_smithy_schema::Schema::new_member(
|
274 + | ::aws_smithy_schema::ShapeId::from_parts(
|
275 + | "com.amazonaws.ssm#MaintenanceWindowTaskParameters$value",
|
276 + | "com.amazonaws.ssm",
|
277 + | "MaintenanceWindowTaskParameters",
|
278 + | ),
|
279 + | ::aws_smithy_schema::ShapeType::Structure,
|
280 + | "value",
|
281 + | 1,
|
282 + | );
|
283 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
284 + | ::aws_smithy_schema::ShapeId::from_parts(
|
285 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$TaskParameters",
|
286 + | "com.amazonaws.ssm.synthetic",
|
287 + | "RegisterTaskWithMaintenanceWindowInput",
|
288 + | ),
|
289 + | ::aws_smithy_schema::ShapeType::Map,
|
290 + | "TaskParameters",
|
291 + | 5,
|
292 + | )
|
293 + | .with_map_members(
|
294 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS_KEY,
|
295 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS_VALUE,
|
296 + | );
|
297 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_INVOCATION_PARAMETERS: ::aws_smithy_schema::Schema<'static> =
|
298 + | ::aws_smithy_schema::Schema::new_member(
|
299 + | ::aws_smithy_schema::ShapeId::from_parts(
|
300 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$TaskInvocationParameters",
|
301 + | "com.amazonaws.ssm.synthetic",
|
302 + | "RegisterTaskWithMaintenanceWindowInput",
|
303 + | ),
|
304 + | ::aws_smithy_schema::ShapeType::Structure,
|
305 + | "TaskInvocationParameters",
|
306 + | 6,
|
307 + | );
|
308 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_PRIORITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
309 + | ::aws_smithy_schema::ShapeId::from_parts(
|
310 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$Priority",
|
311 + | "com.amazonaws.ssm.synthetic",
|
312 + | "RegisterTaskWithMaintenanceWindowInput",
|
313 + | ),
|
314 + | ::aws_smithy_schema::ShapeType::Integer,
|
315 + | "Priority",
|
316 + | 7,
|
317 + | );
|
318 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
319 + | ::aws_smithy_schema::ShapeId::from_parts(
|
320 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$MaxConcurrency",
|
321 + | "com.amazonaws.ssm.synthetic",
|
322 + | "RegisterTaskWithMaintenanceWindowInput",
|
323 + | ),
|
324 + | ::aws_smithy_schema::ShapeType::String,
|
325 + | "MaxConcurrency",
|
326 + | 8,
|
327 + | );
|
328 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
329 + | ::aws_smithy_schema::ShapeId::from_parts(
|
330 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$MaxErrors",
|
331 + | "com.amazonaws.ssm.synthetic",
|
332 + | "RegisterTaskWithMaintenanceWindowInput",
|
333 + | ),
|
334 + | ::aws_smithy_schema::ShapeType::String,
|
335 + | "MaxErrors",
|
336 + | 9,
|
337 + | );
|
338 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_LOGGING_INFO: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
339 + | ::aws_smithy_schema::ShapeId::from_parts(
|
340 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$LoggingInfo",
|
341 + | "com.amazonaws.ssm.synthetic",
|
342 + | "RegisterTaskWithMaintenanceWindowInput",
|
343 + | ),
|
344 + | ::aws_smithy_schema::ShapeType::Structure,
|
345 + | "LoggingInfo",
|
346 + | 10,
|
347 + | );
|
348 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
349 + | ::aws_smithy_schema::ShapeId::from_parts(
|
350 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$Name",
|
351 + | "com.amazonaws.ssm.synthetic",
|
352 + | "RegisterTaskWithMaintenanceWindowInput",
|
353 + | ),
|
354 + | ::aws_smithy_schema::ShapeType::String,
|
355 + | "Name",
|
356 + | 11,
|
357 + | );
|
358 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
359 + | ::aws_smithy_schema::ShapeId::from_parts(
|
360 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$Description",
|
361 + | "com.amazonaws.ssm.synthetic",
|
362 + | "RegisterTaskWithMaintenanceWindowInput",
|
363 + | ),
|
364 + | ::aws_smithy_schema::ShapeType::String,
|
365 + | "Description",
|
366 + | 12,
|
367 + | );
|
368 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
369 + | ::aws_smithy_schema::ShapeId::from_parts(
|
370 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$ClientToken",
|
371 + | "com.amazonaws.ssm.synthetic",
|
372 + | "RegisterTaskWithMaintenanceWindowInput",
|
373 + | ),
|
374 + | ::aws_smithy_schema::ShapeType::String,
|
375 + | "ClientToken",
|
376 + | 13,
|
377 + | );
|
378 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF_BEHAVIOR: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
379 + | ::aws_smithy_schema::ShapeId::from_parts(
|
380 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$CutoffBehavior",
|
381 + | "com.amazonaws.ssm.synthetic",
|
382 + | "RegisterTaskWithMaintenanceWindowInput",
|
383 + | ),
|
384 + | ::aws_smithy_schema::ShapeType::String,
|
385 + | "CutoffBehavior",
|
386 + | 14,
|
387 + | );
|
388 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> =
|
389 + | ::aws_smithy_schema::Schema::new_member(
|
390 + | ::aws_smithy_schema::ShapeId::from_parts(
|
391 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput$AlarmConfiguration",
|
392 + | "com.amazonaws.ssm.synthetic",
|
393 + | "RegisterTaskWithMaintenanceWindowInput",
|
394 + | ),
|
395 + | ::aws_smithy_schema::ShapeType::Structure,
|
396 + | "AlarmConfiguration",
|
397 + | 15,
|
398 + | );
|
399 + | static REGISTERTASKWITHMAINTENANCEWINDOWINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
400 + | ::aws_smithy_schema::ShapeId::from_parts(
|
401 + | "com.amazonaws.ssm.synthetic#RegisterTaskWithMaintenanceWindowInput",
|
402 + | "com.amazonaws.ssm.synthetic",
|
403 + | "RegisterTaskWithMaintenanceWindowInput",
|
404 + | ),
|
405 + | ::aws_smithy_schema::ShapeType::Structure,
|
406 + | &[
|
407 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID,
|
408 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
|
409 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_ARN,
|
410 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_SERVICE_ROLE_ARN,
|
411 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_TYPE,
|
412 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS,
|
413 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_INVOCATION_PARAMETERS,
|
414 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_PRIORITY,
|
415 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_CONCURRENCY,
|
416 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_ERRORS,
|
417 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_LOGGING_INFO,
|
418 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME,
|
419 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION,
|
420 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN,
|
421 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF_BEHAVIOR,
|
422 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_ALARM_CONFIGURATION,
|
423 + | ],
|
424 + | )
|
425 + | .with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
|
426 + | .with_original_name("RegisterTaskWithMaintenanceWindowRequest");
|
427 + | impl RegisterTaskWithMaintenanceWindowInput {
|
428 + | /// The schema for this shape.
|
429 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_SCHEMA;
|
430 + | }
|
431 + | impl ::aws_smithy_schema::serde::SerializableStruct for RegisterTaskWithMaintenanceWindowInput {
|
432 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
433 + | fn serialize_members(
|
434 + | &self,
|
435 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
436 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
437 + | if let Some(ref val) = self.window_id {
|
438 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_WINDOW_ID, val)?;
|
439 + | }
|
440 + | if let Some(ref val) = self.targets {
|
441 + | ser.write_list(
|
442 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TARGETS,
|
443 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
444 + | for item in val {
|
445 + | ser.write_struct(crate::types::Target::SCHEMA, item)?;
|
446 + | }
|
447 + | Ok(())
|
448 + | },
|
449 + | )?;
|
450 + | }
|
451 + | if let Some(ref val) = self.task_arn {
|
452 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_ARN, val)?;
|
453 + | }
|
454 + | if let Some(ref val) = self.service_role_arn {
|
455 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_SERVICE_ROLE_ARN, val)?;
|
456 + | }
|
457 + | if let Some(ref val) = self.task_type {
|
458 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_TYPE, val.as_str())?;
|
459 + | }
|
460 + | if let Some(ref val) = self.task_parameters {
|
461 + | ser.write_map(
|
462 + | ®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_PARAMETERS,
|
463 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
464 + | for (key, value) in val {
|
465 + | ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;
|
466 + | ser.write_struct(crate::types::MaintenanceWindowTaskParameterValueExpression::SCHEMA, value)?;
|
467 + | }
|
468 + | Ok(())
|
469 + | },
|
470 + | )?;
|
471 + | }
|
472 + | if let Some(ref val) = self.task_invocation_parameters {
|
473 + | ser.write_struct(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_TASK_INVOCATION_PARAMETERS, val)?;
|
474 + | }
|
475 + | if let Some(ref val) = self.priority {
|
476 + | ser.write_integer(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_PRIORITY, *val)?;
|
477 + | }
|
478 + | if let Some(ref val) = self.max_concurrency {
|
479 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_CONCURRENCY, val)?;
|
480 + | }
|
481 + | if let Some(ref val) = self.max_errors {
|
482 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_MAX_ERRORS, val)?;
|
483 + | }
|
484 + | if let Some(ref val) = self.logging_info {
|
485 + | ser.write_struct(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_LOGGING_INFO, val)?;
|
486 + | }
|
487 + | if let Some(ref val) = self.name {
|
488 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_NAME, val)?;
|
489 + | }
|
490 + | if let Some(ref val) = self.description {
|
491 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_DESCRIPTION, val)?;
|
492 + | }
|
493 + | if let Some(ref val) = self.client_token {
|
494 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CLIENT_TOKEN, val)?;
|
495 + | }
|
496 + | if let Some(ref val) = self.cutoff_behavior {
|
497 + | ser.write_string(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_CUTOFF_BEHAVIOR, val.as_str())?;
|
498 + | }
|
499 + | if let Some(ref val) = self.alarm_configuration {
|
500 + | ser.write_struct(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_MEMBER_ALARM_CONFIGURATION, val)?;
|
501 + | }
|
502 + | Ok(())
|
503 + | }
|
504 + | }
|
505 + | impl RegisterTaskWithMaintenanceWindowInput {
|
506 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
507 + | pub fn deserialize(
|
508 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
509 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
510 + | #[allow(unused_variables, unused_mut)]
|
511 + | let mut builder = Self::builder();
|
512 + | #[allow(
|
513 + | unused_variables,
|
514 + | unreachable_code,
|
515 + | clippy::single_match,
|
516 + | clippy::match_single_binding,
|
517 + | clippy::diverging_sub_expression
|
518 + | )]
|
519 + | deserializer.read_struct(®ISTERTASKWITHMAINTENANCEWINDOWINPUT_SCHEMA, &mut |member, deser| {
|
520 + | match member.member_index() {
|
521 + | Some(0) => {
|
522 + | if deser.is_null() {
|
523 + | deser.read_null()?;
|
524 + | } else {
|
525 + | builder.window_id = Some(deser.read_string(member)?);
|
526 + | }
|
527 + | }
|
528 + | Some(1) => {
|
529 + | if deser.is_null() {
|
530 + | deser.read_null()?;
|
531 + | } else {
|
532 + | builder.targets = Some({
|
533 + | let mut container = Vec::new();
|
534 + | deser.read_list(member, &mut |deser| {
|
535 + | container.push(crate::types::Target::deserialize(deser)?);
|
536 + | Ok(())
|
537 + | })?;
|
538 + | container
|
539 + | });
|
540 + | }
|
541 + | }
|
542 + | Some(2) => {
|
543 + | if deser.is_null() {
|
544 + | deser.read_null()?;
|
545 + | } else {
|
546 + | builder.task_arn = Some(deser.read_string(member)?);
|
547 + | }
|
548 + | }
|
549 + | Some(3) => {
|
550 + | if deser.is_null() {
|
551 + | deser.read_null()?;
|
552 + | } else {
|
553 + | builder.service_role_arn = Some(deser.read_string(member)?);
|
554 + | }
|
555 + | }
|
556 + | Some(4) => {
|
557 + | if deser.is_null() {
|
558 + | deser.read_null()?;
|
559 + | } else {
|
560 + | builder.task_type = Some(crate::types::MaintenanceWindowTaskType::from(deser.read_string(member)?.as_str()));
|
561 + | }
|
562 + | }
|
563 + | Some(5) => {
|
564 + | if deser.is_null() {
|
565 + | deser.read_null()?;
|
566 + | } else {
|
567 + | builder.task_parameters = Some({
|
568 + | let mut container = std::collections::HashMap::new();
|
569 + | deser.read_map(member, &mut |key, deser| {
|
570 + | container.insert(key, crate::types::MaintenanceWindowTaskParameterValueExpression::deserialize(deser)?);
|
571 + | Ok(())
|
572 + | })?;
|
573 + | container
|
574 + | });
|
575 + | }
|
576 + | }
|
577 + | Some(6) => {
|
578 + | if deser.is_null() {
|
579 + | deser.read_null()?;
|
580 + | } else {
|
581 + | builder.task_invocation_parameters = Some(crate::types::MaintenanceWindowTaskInvocationParameters::deserialize(deser)?);
|
582 + | }
|
583 + | }
|
584 + | Some(7) => {
|
585 + | if deser.is_null() {
|
586 + | deser.read_null()?;
|
587 + | } else {
|
588 + | builder.priority = Some(deser.read_integer(member)?);
|
589 + | }
|
590 + | }
|
591 + | Some(8) => {
|
592 + | if deser.is_null() {
|
593 + | deser.read_null()?;
|
594 + | } else {
|
595 + | builder.max_concurrency = Some(deser.read_string(member)?);
|
596 + | }
|
597 + | }
|
598 + | Some(9) => {
|
599 + | if deser.is_null() {
|
600 + | deser.read_null()?;
|
601 + | } else {
|
602 + | builder.max_errors = Some(deser.read_string(member)?);
|
603 + | }
|
604 + | }
|
605 + | Some(10) => {
|
606 + | if deser.is_null() {
|
607 + | deser.read_null()?;
|
608 + | } else {
|
609 + | builder.logging_info = Some(crate::types::LoggingInfo::deserialize(deser)?);
|
610 + | }
|
611 + | }
|
612 + | Some(11) => {
|
613 + | if deser.is_null() {
|
614 + | deser.read_null()?;
|
615 + | } else {
|
616 + | builder.name = Some(deser.read_string(member)?);
|
617 + | }
|
618 + | }
|
619 + | Some(12) => {
|
620 + | if deser.is_null() {
|
621 + | deser.read_null()?;
|
622 + | } else {
|
623 + | builder.description = Some(deser.read_string(member)?);
|
624 + | }
|
625 + | }
|
626 + | Some(13) => {
|
627 + | if deser.is_null() {
|
628 + | deser.read_null()?;
|
629 + | } else {
|
630 + | builder.client_token = Some(deser.read_string(member)?);
|
631 + | }
|
632 + | }
|
633 + | Some(14) => {
|
634 + | if deser.is_null() {
|
635 + | deser.read_null()?;
|
636 + | } else {
|
637 + | builder.cutoff_behavior = Some(crate::types::MaintenanceWindowTaskCutoffBehavior::from(
|
638 + | deser.read_string(member)?.as_str(),
|
639 + | ));
|
640 + | }
|
641 + | }
|
642 + | Some(15) => {
|
643 + | if deser.is_null() {
|
644 + | deser.read_null()?;
|
645 + | } else {
|
646 + | builder.alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
|
647 + | }
|
648 + | }
|
649 + | _ => {}
|
650 + | }
|
651 + | Ok(())
|
652 + | })?;
|
653 + | builder.window_id = builder.window_id.or(Some(String::new()));
|
654 + | builder.task_arn = builder.task_arn.or(Some(String::new()));
|
655 + | builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
|
656 + | }
|
657 + | }
|
658 + | impl RegisterTaskWithMaintenanceWindowInput {
|
659 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
660 + | pub fn deserialize_with_response(
|
661 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
662 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
663 + | _status: u16,
|
664 + | _body: &[u8],
|
665 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
666 + | Self::deserialize(deserializer)
|
667 + | }
|
668 + | }
|
669 + | impl RegisterTaskWithMaintenanceWindowInput {
|
670 + | /// Creates a new builder-style object to manufacture [`RegisterTaskWithMaintenanceWindowInput`](crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput).
|
671 + | pub fn builder() -> crate::operation::register_task_with_maintenance_window::builders::RegisterTaskWithMaintenanceWindowInputBuilder {
|
672 + | crate::operation::register_task_with_maintenance_window::builders::RegisterTaskWithMaintenanceWindowInputBuilder::default()
|
673 + | }
|
674 + | }
|
675 + |
|
676 + | /// A builder for [`RegisterTaskWithMaintenanceWindowInput`](crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput).
|
677 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
|
678 + | #[non_exhaustive]
|
679 + | pub struct RegisterTaskWithMaintenanceWindowInputBuilder {
|
680 + | pub(crate) window_id: ::std::option::Option<::std::string::String>,
|
681 + | pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
|
682 + | pub(crate) task_arn: ::std::option::Option<::std::string::String>,
|
683 + | pub(crate) service_role_arn: ::std::option::Option<::std::string::String>,
|
684 + | pub(crate) task_type: ::std::option::Option<crate::types::MaintenanceWindowTaskType>,
|
685 + | pub(crate) task_parameters:
|
686 + | ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
|
687 + | pub(crate) task_invocation_parameters: ::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters>,
|
688 + | pub(crate) priority: ::std::option::Option<i32>,
|
689 + | pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
|
690 + | pub(crate) max_errors: ::std::option::Option<::std::string::String>,
|
691 + | pub(crate) logging_info: ::std::option::Option<crate::types::LoggingInfo>,
|
692 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
693 + | pub(crate) description: ::std::option::Option<::std::string::String>,
|
694 + | pub(crate) client_token: ::std::option::Option<::std::string::String>,
|
695 + | pub(crate) cutoff_behavior: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>,
|
696 + | pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
|
697 + | }
|
698 + | impl RegisterTaskWithMaintenanceWindowInputBuilder {
|
699 + | /// <p>The ID of the maintenance window the task should be added to.</p>
|
700 + | /// This field is required.
|
701 + | pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
702 + | self.window_id = ::std::option::Option::Some(input.into());
|
703 + | self
|
704 + | }
|
705 + | /// <p>The ID of the maintenance window the task should be added to.</p>
|
706 + | pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
707 + | self.window_id = input;
|
708 + | self
|
709 + | }
|
710 + | /// <p>The ID of the maintenance window the task should be added to.</p>
|
711 + | pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
|
712 + | &self.window_id
|
713 + | }
|
714 + | /// Appends an item to `targets`.
|
715 + | ///
|
716 + | /// To override the contents of this collection use [`set_targets`](Self::set_targets).
|
717 + | ///
|
718 + | /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
|
719 + | /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
720 + | /// </note>
|
721 + | /// <p>Specify managed nodes using the following format:</p>
|
722 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
723 + | /// ,
|
724 + | /// <instance-id-2></instance-id-2>
|
725 + | /// </instance-id-1></code></p>
|
726 + | /// <p>Specify maintenance window targets using the following format:</p>
|
727 + | /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
|
728 + | /// ,
|
729 + | /// <window-target-id-2></window-target-id-2>
|
730 + | /// </window-target-id-1></code></p>
|
731 + | pub fn targets(mut self, input: crate::types::Target) -> Self {
|
732 + | let mut v = self.targets.unwrap_or_default();
|
733 + | v.push(input);
|
734 + | self.targets = ::std::option::Option::Some(v);
|
735 + | self
|
736 + | }
|
737 + | /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
|
738 + | /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
739 + | /// </note>
|
740 + | /// <p>Specify managed nodes using the following format:</p>
|
741 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
742 + | /// ,
|
743 + | /// <instance-id-2></instance-id-2>
|
744 + | /// </instance-id-1></code></p>
|
745 + | /// <p>Specify maintenance window targets using the following format:</p>
|
746 + | /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
|
747 + | /// ,
|
748 + | /// <window-target-id-2></window-target-id-2>
|
749 + | /// </window-target-id-1></code></p>
|
750 + | pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
|
751 + | self.targets = input;
|
752 + | self
|
753 + | }
|
754 + | /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
|
755 + | /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
756 + | /// </note>
|
757 + | /// <p>Specify managed nodes using the following format:</p>
|
758 + | /// <p><code>Key=InstanceIds,Values=<instance-id-1>
|
759 + | /// ,
|
760 + | /// <instance-id-2></instance-id-2>
|
761 + | /// </instance-id-1></code></p>
|
762 + | /// <p>Specify maintenance window targets using the following format:</p>
|
763 + | /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
|
764 + | /// ,
|
765 + | /// <window-target-id-2></window-target-id-2>
|
766 + | /// </window-target-id-1></code></p>
|
767 + | pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
|
768 + | &self.targets
|
769 + | }
|
770 + | /// <p>The ARN of the task to run.</p>
|
771 + | /// This field is required.
|
772 + | pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
773 + | self.task_arn = ::std::option::Option::Some(input.into());
|
774 + | self
|
775 + | }
|
776 + | /// <p>The ARN of the task to run.</p>
|
777 + | pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
778 + | self.task_arn = input;
|
779 + | self
|
780 + | }
|
781 + | /// <p>The ARN of the task to run.</p>
|
782 + | pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
|
783 + | &self.task_arn
|
784 + | }
|
785 + | /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
|
786 + | /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
787 + | pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
788 + | self.service_role_arn = ::std::option::Option::Some(input.into());
|
789 + | self
|
790 + | }
|
791 + | /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
|
792 + | /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
793 + | pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
794 + | self.service_role_arn = input;
|
795 + | self
|
796 + | }
|
797 + | /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
|
798 + | /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
|
799 + | pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
|
800 + | &self.service_role_arn
|
801 + | }
|
802 + | /// <p>The type of task being registered.</p>
|
803 + | /// This field is required.
|
804 + | pub fn task_type(mut self, input: crate::types::MaintenanceWindowTaskType) -> Self {
|
805 + | self.task_type = ::std::option::Option::Some(input);
|
806 + | self
|
807 + | }
|
808 + | /// <p>The type of task being registered.</p>
|
809 + | pub fn set_task_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskType>) -> Self {
|
810 + | self.task_type = input;
|
811 + | self
|
812 + | }
|
813 + | /// <p>The type of task being registered.</p>
|
814 + | pub fn get_task_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskType> {
|
815 + | &self.task_type
|
816 + | }
|
817 + | /// Adds a key-value pair to `task_parameters`.
|
818 + | ///
|
819 + | /// To override the contents of this collection use [`set_task_parameters`](Self::set_task_parameters).
|
820 + | ///
|
821 + | /// <p>The parameters that should be passed to the task when it is run.</p><note>
|
822 + | /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
823 + | /// </note>
|
824 + | pub fn task_parameters(
|
825 + | mut self,
|
826 + | k: impl ::std::convert::Into<::std::string::String>,
|
827 + | v: crate::types::MaintenanceWindowTaskParameterValueExpression,
|
828 + | ) -> Self {
|
829 + | let mut hash_map = self.task_parameters.unwrap_or_default();
|
830 + | hash_map.insert(k.into(), v);
|
831 + | self.task_parameters = ::std::option::Option::Some(hash_map);
|
832 + | self
|
833 + | }
|
834 + | /// <p>The parameters that should be passed to the task when it is run.</p><note>
|
835 + | /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
836 + | /// </note>
|
837 + | pub fn set_task_parameters(
|
838 + | mut self,
|
839 + | input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
|
840 + | ) -> Self {
|
841 + | self.task_parameters = input;
|
842 + | self
|
843 + | }
|
844 + | /// <p>The parameters that should be passed to the task when it is run.</p><note>
|
845 + | /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
846 + | /// </note>
|
847 + | pub fn get_task_parameters(
|
848 + | &self,
|
849 + | ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>> {
|
850 + | &self.task_parameters
|
851 + | }
|
852 + | /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
|
853 + | pub fn task_invocation_parameters(mut self, input: crate::types::MaintenanceWindowTaskInvocationParameters) -> Self {
|
854 + | self.task_invocation_parameters = ::std::option::Option::Some(input);
|
855 + | self
|
856 + | }
|
857 + | /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
|
858 + | pub fn set_task_invocation_parameters(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters>) -> Self {
|
859 + | self.task_invocation_parameters = input;
|
860 + | self
|
861 + | }
|
862 + | /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
|
863 + | pub fn get_task_invocation_parameters(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters> {
|
864 + | &self.task_invocation_parameters
|
865 + | }
|
866 + | /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
|
867 + | pub fn priority(mut self, input: i32) -> Self {
|
868 + | self.priority = ::std::option::Option::Some(input);
|
869 + | self
|
870 + | }
|
871 + | /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
|
872 + | pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
|
873 + | self.priority = input;
|
874 + | self
|
875 + | }
|
876 + | /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
|
877 + | pub fn get_priority(&self) -> &::std::option::Option<i32> {
|
878 + | &self.priority
|
879 + | }
|
880 + | /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
|
881 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
882 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
883 + | /// </note>
|
884 + | pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
885 + | self.max_concurrency = ::std::option::Option::Some(input.into());
|
886 + | self
|
887 + | }
|
888 + | /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
|
889 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
890 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
891 + | /// </note>
|
892 + | pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
893 + | self.max_concurrency = input;
|
894 + | self
|
895 + | }
|
896 + | /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
|
897 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
898 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
899 + | /// </note>
|
900 + | pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
|
901 + | &self.max_concurrency
|
902 + | }
|
903 + | /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
|
904 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
905 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
906 + | /// </note>
|
907 + | pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
908 + | self.max_errors = ::std::option::Option::Some(input.into());
|
909 + | self
|
910 + | }
|
911 + | /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
|
912 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
913 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
914 + | /// </note>
|
915 + | pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
916 + | self.max_errors = input;
|
917 + | self
|
918 + | }
|
919 + | /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
|
920 + | /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
|
921 + | /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
|
922 + | /// </note>
|
923 + | pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
|
924 + | &self.max_errors
|
925 + | }
|
926 + | /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
|
927 + | /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
928 + | /// </note>
|
929 + | pub fn logging_info(mut self, input: crate::types::LoggingInfo) -> Self {
|
930 + | self.logging_info = ::std::option::Option::Some(input);
|
931 + | self
|
932 + | }
|
933 + | /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
|
934 + | /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
935 + | /// </note>
|
936 + | pub fn set_logging_info(mut self, input: ::std::option::Option<crate::types::LoggingInfo>) -> Self {
|
937 + | self.logging_info = input;
|
938 + | self
|
939 + | }
|
940 + | /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
|
941 + | /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
|
942 + | /// </note>
|
943 + | pub fn get_logging_info(&self) -> &::std::option::Option<crate::types::LoggingInfo> {
|
944 + | &self.logging_info
|
945 + | }
|
946 + | /// <p>An optional name for the task.</p>
|
947 + | pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
948 + | self.name = ::std::option::Option::Some(input.into());
|
949 + | self
|
950 + | }
|
951 + | /// <p>An optional name for the task.</p>
|
952 + | pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
953 + | self.name = input;
|
954 + | self
|
955 + | }
|
956 + | /// <p>An optional name for the task.</p>
|
957 + | pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
|
958 + | &self.name
|
959 + | }
|
960 + | /// <p>An optional description for the task.</p>
|
961 + | pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
962 + | self.description = ::std::option::Option::Some(input.into());
|
963 + | self
|
964 + | }
|
965 + | /// <p>An optional description for the task.</p>
|
966 + | pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
967 + | self.description = input;
|
968 + | self
|
969 + | }
|
970 + | /// <p>An optional description for the task.</p>
|
971 + | pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
|
972 + | &self.description
|
973 + | }
|
974 + | /// <p>User-provided idempotency token.</p>
|
975 + | pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
976 + | self.client_token = ::std::option::Option::Some(input.into());
|
977 + | self
|
978 + | }
|
979 + | /// <p>User-provided idempotency token.</p>
|
980 + | pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
981 + | self.client_token = input;
|
982 + | self
|
983 + | }
|
984 + | /// <p>User-provided idempotency token.</p>
|
985 + | pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
|
986 + | &self.client_token
|
987 + | }
|
988 + | /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
|
989 + | /// <ul>
|
990 + | /// <li>
|
991 + | /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
|
992 + | /// <li>
|
993 + | /// <p><code>CANCEL_TASK</code>:</p>
|
994 + | /// <ul>
|
995 + | /// <li>
|
996 + | /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
|
997 + | /// <li>
|
998 + | /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
|
999 + | /// </ul>
|
1000 + | /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
|
1001 + | /// </ul>
|
1002 + | pub fn cutoff_behavior(mut self, input: crate::types::MaintenanceWindowTaskCutoffBehavior) -> Self {
|
1003 + | self.cutoff_behavior = ::std::option::Option::Some(input);
|
1004 + | self
|
1005 + | }
|
1006 + | /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
|
1007 + | /// <ul>
|
1008 + | /// <li>
|
1009 + | /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
|
1010 + | /// <li>
|
1011 + | /// <p><code>CANCEL_TASK</code>:</p>
|
1012 + | /// <ul>
|
1013 + | /// <li>
|
1014 + | /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
|
1015 + | /// <li>
|
1016 + | /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
|
1017 + | /// </ul>
|
1018 + | /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
|
1019 + | /// </ul>
|
1020 + | pub fn set_cutoff_behavior(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>) -> Self {
|
1021 + | self.cutoff_behavior = input;
|
1022 + | self
|
1023 + | }
|
1024 + | /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
|
1025 + | /// <ul>
|
1026 + | /// <li>
|
1027 + | /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
|
1028 + | /// <li>
|
1029 + | /// <p><code>CANCEL_TASK</code>:</p>
|
1030 + | /// <ul>
|
1031 + | /// <li>
|
1032 + | /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
|
1033 + | /// <li>
|
1034 + | /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
|
1035 + | /// </ul>
|
1036 + | /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
|
1037 + | /// </ul>
|
1038 + | pub fn get_cutoff_behavior(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior> {
|
1039 + | &self.cutoff_behavior
|
1040 + | }
|
1041 + | /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
|
1042 + | pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
|
1043 + | self.alarm_configuration = ::std::option::Option::Some(input);
|
1044 + | self
|
1045 + | }
|
1046 + | /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
|
1047 + | pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
|
1048 + | self.alarm_configuration = input;
|
1049 + | self
|
1050 + | }
|
1051 + | /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
|
1052 + | pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
|
1053 + | &self.alarm_configuration
|
1054 + | }
|
1055 + | /// Consumes the builder and constructs a [`RegisterTaskWithMaintenanceWindowInput`](crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput).
|
1056 + | pub fn build(
|
1057 + | self,
|
1058 + | ) -> ::std::result::Result<
|
1059 + | crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput,
|
1060 + | ::aws_smithy_types::error::operation::BuildError,
|
1061 + | > {
|
1062 + | ::std::result::Result::Ok(
|
1063 + | crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowInput {
|
1064 + | window_id: self.window_id,
|
1065 + | targets: self.targets,
|
1066 + | task_arn: self.task_arn,
|
1067 + | service_role_arn: self.service_role_arn,
|
1068 + | task_type: self.task_type,
|
1069 + | task_parameters: self.task_parameters,
|
1070 + | task_invocation_parameters: self.task_invocation_parameters,
|
1071 + | priority: self.priority,
|
1072 + | max_concurrency: self.max_concurrency,
|
1073 + | max_errors: self.max_errors,
|
1074 + | logging_info: self.logging_info,
|
1075 + | name: self.name,
|
1076 + | description: self.description,
|
1077 + | client_token: self.client_token,
|
1078 + | cutoff_behavior: self.cutoff_behavior,
|
1079 + | alarm_configuration: self.alarm_configuration,
|
1080 + | },
|
1081 + | )
|
1082 + | }
|
1083 + | }
|
1084 + | impl ::std::fmt::Debug for RegisterTaskWithMaintenanceWindowInputBuilder {
|
1085 + | fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
|
1086 + | let mut formatter = f.debug_struct("RegisterTaskWithMaintenanceWindowInputBuilder");
|
1087 + | formatter.field("window_id", &self.window_id);
|
1088 + | formatter.field("targets", &self.targets);
|
1089 + | formatter.field("task_arn", &self.task_arn);
|
1090 + | formatter.field("service_role_arn", &self.service_role_arn);
|
1091 + | formatter.field("task_type", &self.task_type);
|
1092 + | formatter.field("task_parameters", &"*** Sensitive Data Redacted ***");
|
1093 + | formatter.field("task_invocation_parameters", &self.task_invocation_parameters);
|
1094 + | formatter.field("priority", &self.priority);
|
1095 + | formatter.field("max_concurrency", &self.max_concurrency);
|
1096 + | formatter.field("max_errors", &self.max_errors);
|
1097 + | formatter.field("logging_info", &self.logging_info);
|
1098 + | formatter.field("name", &self.name);
|
1099 + | formatter.field("description", &"*** Sensitive Data Redacted ***");
|
1100 + | formatter.field("client_token", &self.client_token);
|
1101 + | formatter.field("cutoff_behavior", &self.cutoff_behavior);
|
1102 + | formatter.field("alarm_configuration", &self.alarm_configuration);
|
1103 + | formatter.finish()
|
1104 + | }
|
1105 + | }
|