Amazon Simple Systems Manager (SSM)
    Amazon Simple Systems Manager (SSM)
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST
    • /
      POST

      /

      The Amazon SSM multi-region endpoint
      http://ssm.{region}.amazonaws.com
      The Amazon SSM multi-region endpoint
      http://ssm.{region}.amazonaws.com
      POST
      /
      Adds a new task to a maintenance window.
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location -g --request POST 'http://ssm.{region}.amazonaws.com/' \
      --header 'X-Amz-Target;' \
      --header 'Content-Type: application/json' \
      --data-raw '{
          "WindowId": "string",
          "Targets": [],
          "TaskArn": "string",
          "ServiceRoleArn": "string",
          "TaskType": "RUN_COMMAND",
          "TaskParameters": {
              "property1": {
                  "Values": []
              }
          },
          "TaskInvocationParameters": {
              "RunCommand": {},
              "Automation": {
                  "DocumentVersion": "string",
                  "Parameters": {
                      "property1": [
                          "string"
                      ],
                      "property2": [
                          "string"
                      ]
                  }
              },
              "StepFunctions": {},
              "Lambda": {}
          },
          "Priority": 0,
          "MaxConcurrency": "string",
          "MaxErrors": "string",
          "LoggingInfo": {},
          "Name": "string",
          "Description": "string",
          "ClientToken": "string",
          "CutoffBehavior": "CONTINUE_TASK",
          "AlarmConfiguration": {
              "IgnorePollAlarmFailure": true,
              "Alarms": []
          }
      }'
      Response Response Example
      200 - Example 1
      {
          "WindowTaskId": "string"
      }

      Request

      Header Params
      X-Amz-Target
      string 
      required
      Body Params application/json
      WindowId
      string 
      required
      The ID of the maintenance window the task should be added to.
      >= 20 characters<= 20 characters
      Match pattern:
      ^mw-[0-9a-f]{17}$
      Targets
      array [object] 
      optional
      The targets (either managed nodes or maintenance window targets).
      Specify managed nodes 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>
      >= 0 items<= 5 items
      TaskArn
      string 
      required
      The ARN of the task to run.
      >= 1 characters<= 1600 characters
      ServiceRoleArn
      string 
      optional
      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 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 Amazon Web Services Systems Manager User Guide:
      • Using service-linked roles for Systems Manager
      • Should I use a service-linked role or a custom service role to run maintenance window tasks?
      TaskType
      enum<string> 
      required
      The type of task being registered.
      Allowed values:
      RUN_COMMANDAUTOMATIONSTEP_FUNCTIONSLAMBDA
      TaskParameters
      object 
      optional
      The parameters that should be passed to the task when it is run.
      TaskInvocationParameters
      object 
      optional
      The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.
      RunCommand
      object 
      optional
      The parameters for a RUN_COMMAND task type.
      Automation
      object 
      optional
      The parameters for an AUTOMATION task type.
      StepFunctions
      object 
      optional
      The parameters for a STEP_FUNCTIONS task type.
      Lambda
      object 
      optional
      The parameters for a LAMBDA task type.
      Priority
      integer 
      optional
      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.
      >= 0
      MaxConcurrency
      string 
      optional
      The maximum number of targets this task can be run for, in parallel.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$
      MaxErrors
      string 
      optional
      The maximum number of errors allowed before this task stops being scheduled.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      LoggingInfo
      object 
      optional
      A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.
      Name
      string 
      optional
      An optional name for the task.
      >= 3 characters<= 128 characters
      Match pattern:
      ^[a-zA-Z0-9_\-.]{3,128}$
      Description
      string <password>
      optional
      An optional description for the task.
      >= 1 characters<= 128 characters
      ClientToken
      string 
      optional
      User-provided idempotency token.
      >= 1 characters<= 64 characters
      CutoffBehavior
      enum<string> 
      optional
      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 invocations are started.
        • For Run Command tasks: When the cutoff time is reached, the system sends a CancelCommand operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.
        The status for tasks that are not completed is TIMED_OUT.
      Allowed values:
      CONTINUE_TASKCANCEL_TASK
      AlarmConfiguration
      object 
      optional
      The CloudWatch alarm you want to apply to your maintenance window task.
      IgnorePollAlarmFailure
      boolean 
      optional
      When this value is true, your automation or command continues to run in cases where we can’t retrieve alarm status information from CloudWatch. In cases where we successfully retrieve an alarm status of OK or INSUFFICIENT_DATA, the automation or command continues to run, regardless of this value. Default is false.
      Alarms
      array[object (Alarm) {1}] 
      required
      The name of the CloudWatch alarm specified in the configuration.
      >= 1 items<= 1 items
      Examples

      Responses

      🟢200Success
      application/json
      Body
      WindowTaskId
      string 
      optional
      The ID of the task in the maintenance window.
      >= 36 characters<= 36 characters
      Match pattern:
      ^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$
      đźź 480IdempotentParameterMismatch
      đźź 481DoesNotExistException
      đźź 482ResourceLimitExceededException
      đźź 483FeatureNotAvailableException
      đźź 484InternalServerError
      Previous
      /
      Next
      /
      Built with