SSMClient.register_task_with_maintenance_window
rboto-ssm==0.4.0 · Service index · Types
Model summary (excerpt): Adds a new task to a maintenance window.
Install and imports
from rboto import SSMClient
from collections.abc import Sequence
from rboto_ssm.types import (
AlarmConfiguration,
LoggingInfo,
MaintenanceWindowTaskCutoffBehavior,
MaintenanceWindowTaskInvocationParameters,
MaintenanceWindowTaskParameterValueExpression,
MaintenanceWindowTaskType,
RegisterTaskWithMaintenanceWindowOutput,
Target,
)
Signature
async def register_task_with_maintenance_window(
*,
window_id: str,
task_arn: str,
task_type: MaintenanceWindowTaskType,
targets: Sequence[Target] | 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,
client_token: str | None = None,
cutoff_behavior: MaintenanceWindowTaskCutoffBehavior | None = None,
alarm_configuration: AlarmConfiguration | None = None,
) -> RegisterTaskWithMaintenanceWindowOutput: ...
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 ID of the maintenance window the task should be added to. |
task_arn |
Yes | The ARN of the task to run. |
task_type |
Yes | The type of task being registered. |
targets |
No | The targets (either managed nodes or maintenance window targets). 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 Registering maintenance window tasks without... |
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 that should be passed to the task when it is run. 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 . |
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. |
priority |
No | 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. |
max_concurrency |
No | The maximum number of targets this task can be run for, 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 value for this option. Instead, the system inserts a placeholder value... |
max_errors |
No | The maximum number of errors allowed before this 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 for this option. Instead, the system inserts a placeholder... |
logging_info |
No | A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to. 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... |
name |
No | An optional name for the task. |
description |
No | An optional description for the task. |
client_token |
No | User-provided idempotency token. |
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
RegisterTaskWithMaintenanceWindowOutput.
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_task_id |
str | None |
Always present | — |
| 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, MaintenanceWindowTaskType, RegisterTaskWithMaintenanceWindowOutput, Target
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, FeatureNotAvailableError, IdempotentParameterMismatchError, InternalServerError, ResourceLimitExceededError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.