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
      /
      Runs commands on one or more managed nodes.
      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 '{
          "InstanceIds": [],
          "Targets": [],
          "DocumentName": "string",
          "DocumentVersion": "string",
          "DocumentHash": "string",
          "DocumentHashType": "Sha256",
          "TimeoutSeconds": 0,
          "Comment": "string",
          "Parameters": {
              "property1": [
                  "string"
              ],
              "property2": [
                  "string"
              ]
          },
          "OutputS3Region": "string",
          "OutputS3BucketName": "string",
          "OutputS3KeyPrefix": "string",
          "MaxConcurrency": "string",
          "MaxErrors": "string",
          "ServiceRoleArn": "string",
          "NotificationConfig": {
              "NotificationArn": "string",
              "NotificationEvents": [],
              "NotificationType": "Command"
          },
          "CloudWatchOutputConfig": {
              "CloudWatchLogGroupName": "string",
              "CloudWatchOutputEnabled": true
          },
          "AlarmConfiguration": {
              "IgnorePollAlarmFailure": true,
              "Alarms": []
          }
      }'
      Response Response Example
      200 - Example 1
      {
          "Command": {
              "CommandId": "string",
              "DocumentName": "string",
              "DocumentVersion": "string",
              "Comment": "string",
              "ExpiresAfter": "string",
              "Parameters": {
                  "property1": [
                      "string"
                  ],
                  "property2": [
                      "string"
                  ]
              },
              "InstanceIds": [],
              "Targets": [],
              "RequestedDateTime": "string",
              "Status": "Pending",
              "StatusDetails": "string",
              "OutputS3Region": "string",
              "OutputS3BucketName": "string",
              "OutputS3KeyPrefix": "string",
              "MaxConcurrency": "string",
              "MaxErrors": "string",
              "TargetCount": 0,
              "CompletedCount": 0,
              "ErrorCount": 0,
              "DeliveryTimedOutCount": 0,
              "ServiceRole": "string",
              "NotificationConfig": {
                  "NotificationArn": "string",
                  "NotificationEvents": [],
                  "NotificationType": "Command"
              },
              "CloudWatchOutputConfig": {
                  "CloudWatchLogGroupName": "string",
                  "CloudWatchOutputEnabled": true
              },
              "TimeoutSeconds": 0,
              "AlarmConfiguration": {
                  "IgnorePollAlarmFailure": true,
                  "Alarms": []
              },
              "TriggeredAlarms": []
          }
      }

      Request

      Header Params
      X-Amz-Target
      string 
      required
      Body Params application/json
      InstanceIds
      array[string]
      optional
      The IDs of the managed nodes where the command should run. Specifying managed node IDs is most useful when you are targeting a limited number of managed nodes, though you can specify up to 50 IDs.
      To target a larger number of managed nodes, or if you prefer not to list individual node IDs, we recommend using the Targets option instead. Using Targets, which accepts tag key-value pairs to identify the managed nodes to send commands to, you can a send command to tens, hundreds, or thousands of nodes at once.
      For more information about how to use targets, see Using targets and rate controls to send commands to a fleet in the Amazon Web Services Systems Manager User Guide.
      >= 0 items<= 50 items
      Targets
      array [object] 
      optional
      An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Specifying targets is most useful when you want to send a command to a large number of managed nodes at once. Using Targets, which accepts tag key-value pairs to identify managed nodes, you can send a command to tens, hundreds, or thousands of nodes at once.
      To send a command to a smaller number of managed nodes, you can use the InstanceIds option instead.
      For more information about how to use targets, see Sending commands to a fleet in the Amazon Web Services Systems Manager User Guide.
      >= 0 items<= 5 items
      DocumentName
      string 
      required
      The name of the Amazon Web Services Systems Manager document (SSM document) to run. This can be a public document or a custom document. To run a shared document belonging to another account, specify the document Amazon Resource Name (ARN). For more information about how to use shared documents, see Using shared SSM documents in the Amazon Web Services Systems Manager User Guide.
      Match pattern:
      ^[a-zA-Z0-9_\-.:/]{3,128}$
      DocumentVersion
      string 
      optional
      The SSM document version to use in the request. You can specify DEFAULT,LATEST, or a specific version number. If you run commands by using the Command Line Interface (Amazon Web Services CLI), then you must escape the first two options by using a backslash. If you specify a version number, then you don't need to use the backslash. For example:
      --document-version "$DEFAULT"
      --document-version "$LATEST"
      --document-version "3"
      Match pattern:
      ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
      DocumentHash
      string 
      optional
      The Sha256 or Sha1 hash created by the system when the document was created.
      <= 256 characters
      DocumentHashType
      enum<string> 
      optional
      Sha256 or Sha1.
      Allowed values:
      Sha256Sha1
      TimeoutSeconds
      integer 
      optional
      If this time is reached and the command hasn't already started running, it won't run.
      >= 30<= 2592000
      Comment
      string 
      optional
      User-specified information about the command, such as a brief description of what the command should do.
      <= 100 characters
      Parameters
      object 
      optional
      The required and optional parameters specified in the document being run.
      OutputS3Region
      string 
      optional
      (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.
      >= 3 characters<= 20 characters
      OutputS3BucketName
      string 
      optional
      The name of the S3 bucket where command execution responses should be stored.
      >= 3 characters<= 63 characters
      OutputS3KeyPrefix
      string 
      optional
      The directory structure within the S3 bucket where the responses should be stored.
      <= 500 characters
      MaxConcurrency
      string 
      optional
      (Optional) The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number such as 10 or a percentage such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Using concurrency controls in the Amazon Web Services Systems Manager User Guide.
      >= 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 without the command failing. When the command fails one more time beyond the value of MaxErrors, the systems stops sending the command to additional targets. You can specify a number like 10 or a percentage like 10%. The default value is 0. For more information about how to use MaxErrors, see Using error controls in the Amazon Web Services Systems Manager User Guide.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      ServiceRoleArn
      string 
      optional
      The ARN of the Identity and Access Management (IAM) service role to use to publish Amazon Simple Notification Service (Amazon SNS) notifications for Run Command commands.
      This role must provide the sns:Publish permission for your notification topic. For information about creating and using this service role, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.
      NotificationConfig
      object 
      optional
      Configurations for sending notifications.
      NotificationArn
      string 
      optional
      An Amazon Resource Name (ARN) for an Amazon Simple Notification Service (Amazon SNS) topic. Run Command pushes notifications about command status changes to this topic.
      NotificationEvents
      array[string]
      optional
      The different events for which you can receive notifications. To learn more about these events, see Monitoring Systems Manager status changes using Amazon SNS notifications in the Amazon Web Services Systems Manager User Guide.
      Allowed values:
      AllInProgressSuccessTimedOutCancelledFailed
      NotificationType
      enum<string> 
      optional
      The type of notification.
      • Command: Receive notification when the status of a command changes.
      • Invocation: For commands sent to multiple managed nodes, receive notification on a per-node basis when the status of a command changes.
      Allowed values:
      CommandInvocation
      CloudWatchOutputConfig
      object 
      optional
      Enables Amazon Web Services Systems Manager to send Run Command output to Amazon CloudWatch Logs. Run Command is a capability of Amazon Web Services Systems Manager.
      CloudWatchLogGroupName
      string 
      optional
      The name of the CloudWatch Logs log group where you want to send command output. If you don't specify a group name, Amazon Web Services Systems Manager automatically creates a log group for you. The log group uses the following naming format:
      aws/ssm/SystemsManagerDocumentName
      >= 1 characters<= 512 characters
      CloudWatchOutputEnabled
      boolean 
      optional
      Enables Systems Manager to send command output to CloudWatch Logs.
      AlarmConfiguration
      object 
      optional
      The CloudWatch alarm you want to apply to your command.
      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
      Command
      object 
      optional
      The request as it was received by Systems Manager. Also provides the command ID which can be used future references to this request.
      CommandId
      string 
      optional
      A unique identifier for this command.
      >= 36 characters<= 36 characters
      DocumentName
      string 
      optional
      The name of the document requested for execution.
      Match pattern:
      ^[a-zA-Z0-9_\-.]{3,128}$
      DocumentVersion
      string 
      optional
      The Systems Manager document (SSM document) version.
      Match pattern:
      ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
      Comment
      string 
      optional
      User-specified information about the command, such as a brief description of what the command should do.
      <= 100 characters
      ExpiresAfter
      string <date-time>
      optional
      If a command expires, it changes status to DeliveryTimedOut for all invocations that have the status InProgress, Pending, or Delayed. ExpiresAfter is calculated based on the total timeout for the overall command. For more information, see Understanding command timeout values in the Amazon Web Services Systems Manager User Guide.
      Parameters
      object 
      optional
      The parameter values to be inserted in the document when running the command.
      InstanceIds
      array[string]
      optional
      The managed node IDs against which this command was requested.
      >= 0 items<= 50 items
      Targets
      array [object] 
      optional
      An array of search criteria that targets managed nodes using a Key,Value combination that you specify. Targets is required if you don't provide one or more managed node IDs in the call.
      >= 0 items<= 5 items
      RequestedDateTime
      string <date-time>
      optional
      The date and time the command was requested.
      Status
      enum<string> 
      optional
      The status of the command.
      Allowed values:
      PendingInProgressSuccessCancelledFailedTimedOutCancelling
      StatusDetails
      string 
      optional
      A detailed status of the command execution. StatusDetails includes more information than Status because it includes states resulting from error and concurrency control parameters. StatusDetails can show different results than Status. For more information about these statuses, see Understanding command statuses in the Amazon Web Services Systems Manager User Guide. StatusDetails can be one of the following values:
      • Pending: The command hasn't been sent to any managed nodes.
      • In Progress: The command has been sent to at least one managed node but hasn't reached a final state on all managed nodes.
      • Success: The command successfully ran on all invocations. This is a terminal state.
      • Delivery Timed Out: The value of MaxErrors or more command invocations shows a status of Delivery Timed Out. This is a terminal state.
      • Execution Timed Out: The value of MaxErrors or more command invocations shows a status of Execution Timed Out. This is a terminal state.
      • Failed: The value of MaxErrors or more command invocations shows a status of Failed. This is a terminal state.
      • Incomplete: The command was attempted on all managed nodes and one or more invocations doesn't have a value of Success but not enough invocations failed for the status to be Failed. This is a terminal state.
      • Cancelled: The command was terminated before it was completed. This is a terminal state.
      • Rate Exceeded: The number of managed nodes targeted by the command exceeded the account limit for pending invocations. The system has canceled the command before running it on any managed node. This is a terminal state.
      • Delayed: The system attempted to send the command to the managed node but wasn't successful. The system retries again.
      >= 0 characters<= 100 characters
      OutputS3Region
      string 
      optional
      (Deprecated) You can no longer specify this parameter. The system ignores it. Instead, Systems Manager automatically determines the Amazon Web Services Region of the S3 bucket.
      >= 3 characters<= 20 characters
      OutputS3BucketName
      string 
      optional
      The S3 bucket where the responses to the command executions should be stored. This was requested when issuing the command.
      >= 3 characters<= 63 characters
      OutputS3KeyPrefix
      string 
      optional
      The S3 directory path inside the bucket where the responses to the command executions should be stored. This was requested when issuing the command.
      <= 500 characters
      MaxConcurrency
      string 
      optional
      The maximum number of managed nodes that are allowed to run the command at the same time. You can specify a number of managed nodes, such as 10, or a percentage of nodes, such as 10%. The default value is 50. For more information about how to use MaxConcurrency, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
      >= 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 the system stops sending the command to additional targets. You can specify a number of errors, such as 10, or a percentage or errors, such as 10%. The default value is 0. For more information about how to use MaxErrors, see Running commands using Systems Manager Run Command in the Amazon Web Services Systems Manager User Guide.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      TargetCount
      integer 
      optional
      The number of targets for the command.
      CompletedCount
      integer 
      optional
      The number of targets for which the command invocation reached a terminal state. Terminal states include the following: Success, Failed, Execution Timed Out, Delivery Timed Out, Cancelled, Terminated, or Undeliverable.
      ErrorCount
      integer 
      optional
      The number of targets for which the status is Failed or Execution Timed Out.
      DeliveryTimedOutCount
      integer 
      optional
      The number of targets for which the status is Delivery Timed Out.
      ServiceRole
      string 
      optional
      The Identity and Access Management (IAM) service role that Run Command, a capability of Amazon Web Services Systems Manager, uses to act on your behalf when sending notifications about command status changes.
      NotificationConfig
      object 
      optional
      Configurations for sending notifications about command status changes.
      CloudWatchOutputConfig
      object 
      optional
      Amazon CloudWatch Logs information where you want Amazon Web Services Systems Manager to send the command output.
      TimeoutSeconds
      integer 
      optional
      The TimeoutSeconds value specified for a command.
      >= 30<= 2592000
      AlarmConfiguration
      object 
      optional
      The details for the CloudWatch alarm applied to your command.
      TriggeredAlarms
      array[object (AlarmStateInformation) {2}] 
      optional
      The CloudWatch alarm that was invoked by the command.
      >= 1 items<= 1 items
      đźź 480DuplicateInstanceId
      đźź 481InternalServerError
      đźź 482InvalidInstanceId
      đźź 483InvalidDocument
      đźź 484InvalidDocumentVersion
      đźź 485InvalidOutputFolder
      đźź 486InvalidParameters
      đźź 487UnsupportedPlatformType
      đźź 488MaxDocumentSizeExceeded
      đźź 489InvalidRole
      đźź 490InvalidNotificationConfig
      Previous
      /
      Next
      /
      Built with