aws_sdk_ssm/client/get_maintenance_window_task.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetMaintenanceWindowTask`](crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`window_id(impl Into<String>)`](crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder::window_id) / [`set_window_id(Option<String>)`](crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder::set_window_id):<br>required: **true**<br><p>The maintenance window ID that includes the task to retrieve.</p><br>
7 /// - [`window_task_id(impl Into<String>)`](crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder::window_task_id) / [`set_window_task_id(Option<String>)`](crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder::set_window_task_id):<br>required: **true**<br><p>The maintenance window task ID to retrieve.</p><br>
8 /// - On success, responds with [`GetMaintenanceWindowTaskOutput`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput) with field(s):
9 /// - [`window_id(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::window_id): <p>The retrieved maintenance window ID.</p>
10 /// - [`window_task_id(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::window_task_id): <p>The retrieved maintenance window task ID.</p>
11 /// - [`targets(Option<Vec::<Target>>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::targets): <p>The targets where the task should run.</p>
12 /// - [`task_arn(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::task_arn): <p>The resource that the task used during execution. For <code>RUN_COMMAND</code> and <code>AUTOMATION</code> task types, the value of <code>TaskArn</code> is the SSM document name/ARN. For <code>LAMBDA</code> tasks, the value is the function name/ARN. For <code>STEP_FUNCTIONS</code> tasks, the value is the state machine ARN.</p>
13 /// - [`service_role_arn(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::service_role_arn): <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> <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>
14 /// - [`task_type(Option<MaintenanceWindowTaskType>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::task_type): <p>The type of task to run.</p>
15 /// - [`task_parameters(Option<HashMap::<String, MaintenanceWindowTaskParameterValueExpression>>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::task_parameters): <p>The parameters to pass to the task when it runs.</p><note> <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> </note>
16 /// - [`task_invocation_parameters(Option<MaintenanceWindowTaskInvocationParameters>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::task_invocation_parameters): <p>The parameters to pass to the task when it runs.</p>
17 /// - [`priority(i32)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::priority): <p>The priority of the task when it runs. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.</p>
18 /// - [`max_concurrency(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::max_concurrency): <p>The maximum number of targets allowed to run this task in parallel.</p><note> <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>, which may be reported in the response to this command. This value doesn't affect the running of your task and can be ignored.</p> </note>
19 /// - [`max_errors(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::max_errors): <p>The maximum number of errors allowed before the task stops being scheduled.</p><note> <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>, which may be reported in the response to this command. This value doesn't affect the running of your task and can be ignored.</p> </note>
20 /// - [`logging_info(Option<LoggingInfo>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::logging_info): <p>The location in Amazon Simple Storage Service (Amazon S3) where the task results are logged.</p><note> <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> </note>
21 /// - [`name(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::name): <p>The retrieved task name.</p>
22 /// - [`description(Option<String>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::description): <p>The retrieved task description.</p>
23 /// - [`cutoff_behavior(Option<MaintenanceWindowTaskCutoffBehavior>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::cutoff_behavior): <p>The action to take on tasks when the maintenance window cutoff time is reached. <code>CONTINUE_TASK</code> means that tasks continue to run. For Automation, Lambda, Step Functions tasks, <code>CANCEL_TASK</code> means that currently running task invocations continue, but no new task invocations are started. For Run Command tasks, <code>CANCEL_TASK</code> means the system attempts to stop the task by sending a <code>CancelCommand</code> operation.</p>
24 /// - [`alarm_configuration(Option<AlarmConfiguration>)`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskOutput::alarm_configuration): <p>The details for the CloudWatch alarm you applied to your maintenance window task.</p>
25 /// - On failure, responds with [`SdkError<GetMaintenanceWindowTaskError>`](crate::operation::get_maintenance_window_task::GetMaintenanceWindowTaskError)
26 pub fn get_maintenance_window_task(&self) -> crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder {
27 crate::operation::get_maintenance_window_task::builders::GetMaintenanceWindowTaskFluentBuilder::new(self.handle.clone())
28 }
29}