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
      /
      A State Manager association defines the state that you want to maintain on your managed nodes. For example, an association can specify that anti-virus software must be installed and running on your managed nodes, or that certain ports must be closed. For static targets, the association specifies a schedule for when the configuration is reapplied. For dynamic targets, such as an Amazon Web Services resource group or an Amazon Web Services autoscaling group, State Manager, a capability of Amazon Web Services Systems Manager applies the configuration when new managed nodes are added to the group. The association also specifies actions to take when applying the configuration. For example, an association for anti-virus software might run once a day. If the software isn't installed, then State Manager installs it. If the software is installed, but the service isn't running, then the association might instruct State Manager to start the service.
      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 '{
          "Name": "string",
          "DocumentVersion": "string",
          "InstanceId": "string",
          "Parameters": {
              "property1": [
                  "string"
              ],
              "property2": [
                  "string"
              ]
          },
          "Targets": [],
          "ScheduleExpression": "string",
          "OutputLocation": {
              "S3Location": {
                  "OutputS3Region": "string",
                  "OutputS3BucketName": "string",
                  "OutputS3KeyPrefix": "string"
              }
          },
          "AssociationName": "string",
          "AutomationTargetParameterName": "string",
          "MaxErrors": "string",
          "MaxConcurrency": "string",
          "ComplianceSeverity": "CRITICAL",
          "SyncCompliance": "AUTO",
          "ApplyOnlyAtCronInterval": true,
          "CalendarNames": [],
          "TargetLocations": [],
          "ScheduleOffset": 0,
          "TargetMaps": [],
          "Tags": [],
          "AlarmConfiguration": {
              "IgnorePollAlarmFailure": true,
              "Alarms": []
          }
      }'
      Response Response Example
      200 - Example 1
      {
          "AssociationDescription": {
              "Name": "string",
              "InstanceId": "string",
              "AssociationVersion": "string",
              "Date": "string",
              "LastUpdateAssociationDate": "string",
              "Status": {
                  "Date": "string",
                  "Name": "Pending",
                  "Message": "string",
                  "AdditionalInfo": "string"
              },
              "Overview": {
                  "Status": "string",
                  "DetailedStatus": "string",
                  "AssociationStatusAggregatedCount": {
                      "property1": 0,
                      "property2": 0
                  }
              },
              "DocumentVersion": "string",
              "AutomationTargetParameterName": "string",
              "Parameters": {
                  "property1": [
                      "string"
                  ],
                  "property2": [
                      "string"
                  ]
              },
              "AssociationId": "string",
              "Targets": [],
              "ScheduleExpression": "string",
              "OutputLocation": {
                  "S3Location": {
                      "OutputS3Region": "string",
                      "OutputS3BucketName": "string",
                      "OutputS3KeyPrefix": "string"
                  }
              },
              "LastExecutionDate": "string",
              "LastSuccessfulExecutionDate": "string",
              "AssociationName": "string",
              "MaxErrors": "string",
              "MaxConcurrency": "string",
              "ComplianceSeverity": "CRITICAL",
              "SyncCompliance": "AUTO",
              "ApplyOnlyAtCronInterval": true,
              "CalendarNames": [],
              "TargetLocations": [],
              "ScheduleOffset": 0,
              "TargetMaps": [],
              "AlarmConfiguration": {
                  "IgnorePollAlarmFailure": true,
                  "Alarms": []
              },
              "TriggeredAlarms": []
          }
      }

      Request

      Header Params
      X-Amz-Target
      string 
      required
      Body Params application/json
      Name
      string 
      required
      The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.
      You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.
      For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:
      arn:partition:ssm:region:account-id:document/document-name
      For example:
      arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document
      For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, AWS-ApplyPatchBaseline or My-Document.
      Match pattern:
      ^[a-zA-Z0-9_\-.:/]{3,128}$
      DocumentVersion
      string 
      optional
      The document version you want to associate with the target(s). Can be a specific version or the default version.
      Match pattern:
      ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
      InstanceId
      string 
      optional
      The managed node ID.
      Match pattern:
      (^i-(\w{8}|\w{17})$)|(^mi-\w{17}$)
      Parameters
      object 
      optional
      The parameters for the runtime configuration of the document.
      Targets
      array [object] 
      optional
      The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the InstanceIds key with a value of *. For more information about choosing targets for an association, see Using targets and rate controls with State Manager associations in the Amazon Web Services Systems Manager User Guide.
      >= 0 items<= 5 items
      ScheduleExpression
      string 
      optional
      A cron expression when the association will be applied to the target(s).
      >= 1 characters<= 256 characters
      OutputLocation
      object 
      optional
      An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.
      S3Location
      object 
      optional
      An S3 bucket where you want to store the results of this request.
      AssociationName
      string 
      optional
      Specify a descriptive name for the association.
      Match pattern:
      ^[a-zA-Z0-9_\-.]{3,128}$
      AutomationTargetParameterName
      string 
      optional
      Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
      >= 1 characters<= 50 characters
      MaxErrors
      string 
      optional
      The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
      Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      MaxConcurrency
      string 
      optional
      The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
      If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$
      ComplianceSeverity
      enum<string> 
      optional
      The severity level to assign to the association.
      Allowed values:
      CRITICALHIGHMEDIUMLOWUNSPECIFIED
      SyncCompliance
      enum<string> 
      optional
      The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
      In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager. It is managed by your direct call to the PutComplianceItems API operation.
      By default, all associations use AUTO mode.
      Allowed values:
      AUTOMANUAL
      ApplyOnlyAtCronInterval
      boolean 
      optional
      By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
      CalendarNames
      array[string]
      optional
      The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
      TargetLocations
      array[object (TargetLocation) {6}] 
      optional
      A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to create an association in multiple Regions and multiple accounts.
      >= 1 items<= 100 items
      Accounts
      array[string]
      optional
      The Amazon Web Services accounts targeted by the current Automation execution.
      >= 1 items<= 50 items
      Regions
      array[string]
      optional
      The Amazon Web Services Regions targeted by the current Automation execution.
      >= 1 items<= 50 items
      TargetLocationMaxConcurrency
      string 
      optional
      The maximum number of Amazon Web Services Regions and Amazon Web Services accounts allowed to run the Automation concurrently.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$
      TargetLocationMaxErrors
      string 
      optional
      The maximum number of errors allowed before the system stops queueing additional Automation executions for the currently running Automation.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      ExecutionRoleName
      string 
      optional
      The Automation execution role used by the currently running Automation. If not specified, the default value is AWS-SystemsManager-AutomationExecutionRole.
      >= 1 characters<= 64 characters
      Match pattern:
      [\w+=,.@/-]+
      TargetLocationAlarmConfiguration
      object 
      AlarmConfiguration
      optional
      The details for the CloudWatch alarm you want to apply to an automation or command.
      ScheduleOffset
      integer 
      optional
      Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of cron(0 0 ? * THU#2 *), you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see Reference: Cron and rate expressions for Systems Manager in the Amazon Web Services Systems Manager User Guide.
      >= 1<= 6
      TargetMaps
      array[object (TargetMap)] 
      optional
      A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
      >= 0 items<= 300 items
      Tags
      array[object (Tag) {2}] 
      optional
      Adds or overwrites one or more tags for a State Manager association. Tags are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.
      <= 1000 items
      Key
      string 
      required
      The name of the tag.
      >= 1 characters<= 128 characters
      Match pattern:
      ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
      Value
      string 
      required
      The value of the tag.
      >= 0 characters<= 256 characters
      Match pattern:
      ^([\p{L}\p{Z}\p{N}_.:/=+\-@]*)$
      AlarmConfiguration
      object (AlarmConfiguration) 
      optional
      The details for the CloudWatch alarm you want to apply to an automation or 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
      AssociationDescription
      object 
      optional
      Information about the association.
      Name
      string 
      optional
      The name of the SSM document.
      Match pattern:
      ^[a-zA-Z0-9_\-.:/]{3,128}$
      InstanceId
      string 
      optional
      The managed node ID.
      Match pattern:
      (^i-(\w{8}|\w{17})$)|(^mi-\w{17}$)
      AssociationVersion
      string 
      optional
      The association version.
      Match pattern:
      ([$]LATEST)|([1-9][0-9]*)
      Date
      string <date-time>
      optional
      The date when the association was made.
      LastUpdateAssociationDate
      string <date-time>
      optional
      The date when the association was last updated.
      Status
      object 
      optional
      The association status.
      Overview
      object 
      optional
      Information about the association.
      DocumentVersion
      string 
      optional
      The document version.
      Match pattern:
      ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
      AutomationTargetParameterName
      string 
      optional
      Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a capability of Amazon Web Services Systems Manager.
      >= 1 characters<= 50 characters
      Parameters
      object 
      optional
      A description of the parameters for a document.
      AssociationId
      string 
      optional
      The association ID.
      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}
      Targets
      array [object] 
      optional
      The managed nodes targeted by the request.
      >= 0 items<= 5 items
      ScheduleExpression
      string 
      optional
      A cron expression that specifies a schedule when the association runs.
      >= 1 characters<= 256 characters
      OutputLocation
      object 
      optional
      An S3 bucket where you want to store the output details of the request.
      LastExecutionDate
      string <date-time>
      optional
      The date on which the association was last run.
      LastSuccessfulExecutionDate
      string <date-time>
      optional
      The last date on which the association was successfully run.
      AssociationName
      string 
      optional
      The association name.
      Match pattern:
      ^[a-zA-Z0-9_\-.]{3,128}$
      MaxErrors
      string 
      optional
      The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set MaxError to 10%, then the system stops sending the request when the sixth error is received.
      Executions that are already running an association when MaxErrors is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set MaxConcurrency to 1 so that executions proceed one at a time.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[0]|[1-9][0-9]%|[0-9]%|100%)$
      MaxConcurrency
      string 
      optional
      The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.
      If a new managed node starts and attempts to run an association while Systems Manager is running MaxConcurrency associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for MaxConcurrency.
      >= 1 characters<= 7 characters
      Match pattern:
      ^([1-9][0-9]*|[1-9][0-9]%|[1-9]%|100%)$
      ComplianceSeverity
      enum<string> 
      optional
      The severity level that is assigned to the association.
      Allowed values:
      CRITICALHIGHMEDIUMLOWUNSPECIFIED
      SyncCompliance
      enum<string> 
      optional
      The mode for generating association compliance. You can specify AUTO or MANUAL. In AUTO mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is COMPLIANT. If the association execution doesn't run successfully, the association is NON-COMPLIANT.
      In MANUAL mode, you must specify the AssociationId as a parameter for the PutComplianceItems API operation. In this case, compliance data isn't managed by State Manager, a capability of Amazon Web Services Systems Manager. It is managed by your direct call to the PutComplianceItems API operation.
      By default, all associations use AUTO mode.
      Allowed values:
      AUTOMANUAL
      ApplyOnlyAtCronInterval
      boolean 
      optional
      By default, when you create a new associations, the system runs it immediately after it is created and then according to the schedule you specified. Specify this option if you don't want an association to run immediately after you create it. This parameter isn't supported for rate expressions.
      CalendarNames
      array[string]
      optional
      The names or Amazon Resource Names (ARNs) of the Change Calendar type documents your associations are gated under. The associations only run when that change calendar is open. For more information, see Amazon Web Services Systems Manager Change Calendar.
      TargetLocations
      array[object (TargetLocation) {6}] 
      optional
      The combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association.
      >= 1 items<= 100 items
      ScheduleOffset
      integer 
      optional
      Number of days to wait after the scheduled day to run an association.
      >= 1<= 6
      TargetMaps
      array[object (TargetMap)] 
      optional
      A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.
      >= 0 items<= 300 items
      AlarmConfiguration
      object 
      AlarmConfiguration
      optional
      The details for the CloudWatch alarm you want to apply to an automation or command.
      TriggeredAlarms
      array[object (AlarmStateInformation) {2}] 
      optional
      The CloudWatch alarm that was invoked during the association.
      >= 1 items<= 1 items
      đźź 480AssociationAlreadyExists
      đźź 481AssociationLimitExceeded
      đźź 482InternalServerError
      đźź 483InvalidDocument
      đźź 484InvalidDocumentVersion
      đźź 485InvalidInstanceId
      đźź 486UnsupportedPlatformType
      đźź 487InvalidOutputLocation
      đźź 488InvalidParameters
      đźź 489InvalidTarget
      đźź 490InvalidSchedule
      đźź 491InvalidTargetMaps
      đźź 492InvalidTag
      Previous
      /
      Next
      /
      Built with