paws.management (version 0.1.0)

ssm_update_maintenance_window_task: Modifies a task assigned to a Maintenance Window

Description

Modifies a task assigned to a Maintenance Window. You can't change the task type, but you can change the following values:

Usage

ssm_update_maintenance_window_task(WindowId, WindowTaskId, Targets,
  TaskArn, ServiceRoleArn, TaskParameters, TaskInvocationParameters,
  Priority, MaxConcurrency, MaxErrors, LoggingInfo, Name, Description,
  Replace)

Arguments

WindowId

[required] The Maintenance Window ID that contains the task to modify.

WindowTaskId

[required] The task ID to modify.

Targets

The targets (either instances or tags) to modify. Instances are specified using Key=instanceids,Values=instanceID\_1,instanceID\_2. Tags are specified using Key=tag\_name,Values=tag\_value.

TaskArn

The task ARN to modify.

ServiceRoleArn

The IAM service role ARN to modify. The system assumes this role during task execution.

If you do not specify a service role ARN, Systems Manager will use your account's service-linked role for Systems Manager by default. If no service-linked role for Systems Manager exists in your account, it will be created when you run RegisterTaskWithMaintenanceWindow without specifying a service role ARN.

For more information, see Service-Linked Role Permissions for Systems Manager and Should I Use a Service-Linked Role or a Custom Service Role to Run Maintenance Window Tasks? in the AWS Systems Manager User Guide.

TaskParameters

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: string, between 1 and 255 characters

Value: an array of strings, each string is between 1 and 255 characters

TaskInvocationParameters

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

The new task priority to specify. The lower the number, the higher the priority. Tasks that have the same priority are scheduled in parallel.

MaxConcurrency

The new MaxConcurrency value you want to specify. MaxConcurrency is the number of targets that are allowed to run this task in parallel.

MaxErrors

The new MaxErrors value to specify. MaxErrors is the maximum number of errors that are allowed before the task stops being scheduled.

LoggingInfo

The new logging location in Amazon S3 to specify.

LoggingInfo has been deprecated. To specify an S3 bucket to contain logs, instead use the OutputS3BucketName and OutputS3KeyPrefix options in the TaskInvocationParameters structure. For information about how Systems Manager handles these options for the supported Maintenance Window task types, see MaintenanceWindowTaskInvocationParameters.

Name

The new task name to specify.

Description

The new task description to specify.

Replace

If True, then all fields that are required by the RegisterTaskWithMaintenanceWndow action are also required for this API request. Optional fields that are not specified are set to null.

Request syntax

svc$update_maintenance_window_task(
  WindowId = "string",
  WindowTaskId = "string",
  Targets = list(
    list(
      Key = "string",
      Values = list(
        "string"
      )
    )
  ),
  TaskArn = "string",
  ServiceRoleArn = "string",
  TaskParameters = list(
    list(
      Values = list(
        "string"
      )
    )
  ),
  TaskInvocationParameters = list(
    RunCommand = list(
      Comment = "string",
      DocumentHash = "string",
      DocumentHashType = "Sha256"|"Sha1",
      NotificationConfig = list(
        NotificationArn = "string",
        NotificationEvents = list(
          "All"|"InProgress"|"Success"|"TimedOut"|"Cancelled"|"Failed"
        ),
        NotificationType = "Command"|"Invocation"
      ),
      OutputS3BucketName = "string",
      OutputS3KeyPrefix = "string",
      Parameters = list(
        list(
          "string"
        )
      ),
      ServiceRoleArn = "string",
      TimeoutSeconds = 123
    ),
    Automation = list(
      DocumentVersion = "string",
      Parameters = list(
        list(
          "string"
        )
      )
    ),
    StepFunctions = list(
      Input = "string",
      Name = "string"
    ),
    Lambda = list(
      ClientContext = "string",
      Qualifier = "string",
      Payload = raw
    )
  ),
  Priority = 123,
  MaxConcurrency = "string",
  MaxErrors = "string",
  LoggingInfo = list(
    S3BucketName = "string",
    S3KeyPrefix = "string",
    S3Region = "string"
  ),
  Name = "string",
  Description = "string",
  Replace = TRUE|FALSE
)

Details

  • TaskARN. For example, you can change a RUN\_COMMAND task from AWS-RunPowerShellScript to AWS-RunShellScript.

  • ServiceRoleArn

  • TaskInvocationParameters

  • Priority

  • MaxConcurrency

  • MaxErrors

If a parameter is null, then the corresponding field is not modified. Also, if you set Replace to true, then all fields required by the RegisterTaskWithMaintenanceWindow action are required for this request. Optional fields that aren't specified are set to null.