You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::SSM::Types::RegisterTaskWithMaintenanceWindowRequest

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing RegisterTaskWithMaintenanceWindowRequest as input to an Aws::Client method, you can use a vanilla Hash:

{
  window_id: "MaintenanceWindowId", # required
  targets: [ # required
    {
      key: "TargetKey",
      values: ["TargetValue"],
    },
  ],
  task_arn: "MaintenanceWindowTaskArn", # required
  service_role_arn: "ServiceRole",
  task_type: "RUN_COMMAND", # required, accepts RUN_COMMAND, AUTOMATION, STEP_FUNCTIONS, LAMBDA
  task_parameters: {
    "MaintenanceWindowTaskParameterName" => {
      values: ["MaintenanceWindowTaskParameterValue"],
    },
  },
  task_invocation_parameters: {
    run_command: {
      comment: "Comment",
      cloud_watch_output_config: {
        cloud_watch_log_group_name: "CloudWatchLogGroupName",
        cloud_watch_output_enabled: false,
      },
      document_hash: "DocumentHash",
      document_hash_type: "Sha256", # accepts Sha256, Sha1
      document_version: "DocumentVersion",
      notification_config: {
        notification_arn: "NotificationArn",
        notification_events: ["All"], # accepts All, InProgress, Success, TimedOut, Cancelled, Failed
        notification_type: "Command", # accepts Command, Invocation
      },
      output_s3_bucket_name: "S3BucketName",
      output_s3_key_prefix: "S3KeyPrefix",
      parameters: {
        "ParameterName" => ["ParameterValue"],
      },
      service_role_arn: "ServiceRole",
      timeout_seconds: 1,
    },
    automation: {
      document_version: "DocumentVersion",
      parameters: {
        "AutomationParameterKey" => ["AutomationParameterValue"],
      },
    },
    step_functions: {
      input: "MaintenanceWindowStepFunctionsInput",
      name: "MaintenanceWindowStepFunctionsName",
    },
    lambda: {
      client_context: "MaintenanceWindowLambdaClientContext",
      qualifier: "MaintenanceWindowLambdaQualifier",
      payload: "data",
    },
  },
  priority: 1,
  max_concurrency: "MaxConcurrency", # required
  max_errors: "MaxErrors", # required
  logging_info: {
    s3_bucket_name: "S3BucketName", # required
    s3_key_prefix: "S3KeyPrefix",
    s3_region: "S3Region", # required
  },
  name: "MaintenanceWindowName",
  description: "MaintenanceWindowDescription",
  client_token: "ClientToken",
}

Instance Attribute Summary collapse

Instance Attribute Details

#client_tokenString

User-provided idempotency token.

Returns:

  • (String)

    User-provided idempotency token.

#descriptionString

An optional description for the task.

Returns:

  • (String)

    An optional description for the task.

#logging_infoTypes::LoggingInfo

A structure containing information about an S3 bucket to write instance-level logs to.

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.

Returns:

  • (Types::LoggingInfo)

    A structure containing information about an S3 bucket to write instance-level logs to.

#max_concurrencyString

The maximum number of targets this task can be run for in parallel.

Returns:

  • (String)

    The maximum number of targets this task can be run for in parallel.

#max_errorsString

The maximum number of errors allowed before this task stops being scheduled.

Returns:

  • (String)

    The maximum number of errors allowed before this task stops being scheduled.

#nameString

An optional name for the task.

Returns:

  • (String)

    An optional name for the task.

#priorityInteger

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.

Returns:

  • (Integer)

    The priority of the task in the maintenance window, the lower the number the higher the priority.

#service_role_arnString

The ARN of the IAM service role for Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses your account\'s service-linked role. If no service-linked role for Systems Manager exists in your account, it is created when you run RegisterTaskWithMaintenanceWindow.

For more information, see the following topics in the in the AWS Systems Manager User Guide:

Returns:

  • (String)

    The ARN of the IAM service role for Systems Manager to assume when running a maintenance window task.

#targetsArray<Types::Target>

The targets (either instances or maintenance window targets).

Specify instances using the following format:

Key=InstanceIds,Values=<instance-id-1>,<instance-id-2>

Specify maintenance window targets using the following format:

Key=WindowTargetIds;,Values=<window-target-id-1>,<window-target-id-2>

Returns:

  • (Array<Types::Target>)

    The targets (either instances or maintenance window targets).

#task_arnString

The ARN of the task to run.

Returns:

  • (String)

    The ARN of the task to run.

#task_invocation_parametersTypes::MaintenanceWindowTaskInvocationParameters

The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.

Returns:

#task_parametersHash<String,Types::MaintenanceWindowTaskParameterValueExpression>

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.

Returns:

#task_typeString

The type of task being registered.

Possible values:

  • RUN_COMMAND
  • AUTOMATION
  • STEP_FUNCTIONS
  • LAMBDA

Returns:

  • (String)

    The type of task being registered.

#window_idString

The ID of the maintenance window the task should be added to.

Returns:

  • (String)

    The ID of the maintenance window the task should be added to.