SSMClient.update_maintenance_window_task
rboto-ssm==0.4.0 · Service index · Types
Model summary (excerpt): Modifies a task assigned to a maintenance window. You can't change the task type, but you can change the following values: TaskARN . For example, you can change a RUN_COMMAND task from AWS-RunPowerShellScript to AWS-RunShellScript . ServiceRoleArn TaskInvocationParameters Priority MaxConcurrency MaxErrors One or more targets must be specified for maintenance window Run Command-type tasks....
Install and imports
from rboto import SSMClient
from collections.abc import Sequence
from rboto_ssm.types import (
AlarmConfiguration,
LoggingInfo,
MaintenanceWindowTaskCutoffBehavior,
MaintenanceWindowTaskInvocationParameters,
MaintenanceWindowTaskParameterValueExpression,
Target,
UpdateMaintenanceWindowTaskOutput,
)
Signature
async def update_maintenance_window_task(
*,
window_id: str,
window_task_id: str,
targets: Sequence[Target] | None = None,
task_arn: str | None = None,
service_role_arn: str | None = None,
task_parameters: dict[str, MaintenanceWindowTaskParameterValueExpression] | None = None,
task_invocation_parameters: MaintenanceWindowTaskInvocationParameters | None = None,
priority: int | None = None,
max_concurrency: str | None = None,
max_errors: str | None = None,
logging_info: LoggingInfo | None = None,
name: str | None = None,
description: str | None = None,
replace: bool | None = None,
cutoff_behavior: MaintenanceWindowTaskCutoffBehavior | None = None,
alarm_configuration: AlarmConfiguration | None = None,
) -> UpdateMaintenanceWindowTaskOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
window_id |
Yes | The maintenance window ID that contains the task to modify. |
window_task_id |
Yes | The task ID to modify. |
targets |
No | The targets (either managed nodes or tags) to modify. Managed nodes are specified using the format Key=instanceids,Values=instanceID_1,instanceID_2 . Tags are specified using the format Key=tag_name,Values=tag_value . 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... |
task_arn |
No | The task ARN to modify. |
service_role_arn |
No | 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 RegisterTaskWithMaintenanceWindow .... |
task_parameters |
No | The parameters to modify. TaskParameters has been deprecated. To specify parameters to pass to a task when it runs, instead use the Parameters option in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see MaintenanceWindowTaskInvocationParameters . The map has the following format: Key:... |
task_invocation_parameters |
No | The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty. When you update a maintenance window task that has options specified in TaskInvocationParameters , you must provide again all the TaskInvocationParameters values that you want to retain. The values you don't specify again are removed. For example,... |
priority |
No | The new task priority to specify. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel. |
max_concurrency |
No | The new MaxConcurrency value you want to specify. MaxConcurrency is the number of targets that are allowed to run this task, in parallel. Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases. For maintenance window tasks without a target specified, you can't supply a... |
max_errors |
No | The new MaxErrors value to specify. MaxErrors is the maximum number of errors that are allowed before the task stops being scheduled. Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a targetless task You must provide a value in all other cases. For maintenance window tasks without a target specified, you can't supply a value... |
logging_info |
No | The new logging location in Amazon S3 to specify. LoggingInfo has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task... |
name |
No | The new task name to specify. |
description |
No | The new task description to specify. |
replace |
No | If True, then all fields that are required by the RegisterTaskWithMaintenanceWindow operation are also required for this API request. Optional fields that aren't specified are set to null. |
cutoff_behavior |
No | Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached. CONTINUE_TASK : When the cutoff time is reached, any tasks that are running continue. The default value. CANCEL_TASK : For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task... |
alarm_configuration |
No | The CloudWatch alarm you want to apply to your maintenance window task. |
Output
UpdateMaintenanceWindowTaskOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
window_id |
str | None |
Always present | — |
window_task_id |
str | None |
Always present | — |
targets |
list[TargetOutput] | None |
Always present | TargetOutput |
task_arn |
str | None |
Always present | — |
service_role_arn |
str | None |
Always present | — |
task_parameters |
dict[str, MaintenanceWindowTaskParameterValueExpressionOutput] | None |
Always present | MaintenanceWindowTaskParameterValueExpressionOutput |
task_invocation_parameters |
MaintenanceWindowTaskInvocationParametersOutput | None |
Always present | MaintenanceWindowTaskInvocationParametersOutput |
priority |
int |
Always present | — |
max_concurrency |
str | None |
Always present | — |
max_errors |
str | None |
Always present | — |
logging_info |
LoggingInfoOutput | None |
Always present | LoggingInfoOutput |
name |
str | None |
Always present | — |
description |
str | None |
Always present | — |
cutoff_behavior |
MaintenanceWindowTaskCutoffBehaviorOutput | None |
Always present | MaintenanceWindowTaskCutoffBehaviorOutput |
alarm_configuration |
AlarmConfigurationOutput | None |
Always present | AlarmConfigurationOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
AlarmConfiguration, LoggingInfo, MaintenanceWindowTaskCutoffBehavior, MaintenanceWindowTaskInvocationParameters, MaintenanceWindowTaskParameterValueExpression, Target, UpdateMaintenanceWindowTaskOutput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_ssm.exceptions:
DoesNotExistError, InternalServerError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.