Amazon Simple Systems Manager (SSM)

2017/11/30 - Amazon Simple Systems Manager (SSM) - 1 new 11 updated api methods

Changes  This release updates AWS Systems Manager APIs to enable executing automations at controlled rate, target resources in a resource groups and execute entire automation at once or single step at a time. It is now also possible to use YAML, in addition to JSON, when creating Systems Manager documents.

DescribeAutomationStepExecutions (new) Link ¶

Information about all active and terminated step executions in an Automation workflow.

See also: AWS API Documentation

Request Syntax

client.describe_automation_step_executions(
    AutomationExecutionId='string',
    Filters=[
        {
            'Key': 'StartTimeBefore'|'StartTimeAfter'|'StepExecutionStatus'|'StepExecutionId'|'StepName'|'Action',
            'Values': [
                'string',
            ]
        },
    ],
    NextToken='string',
    MaxResults=123,
    ReverseOrder=True|False
)
type AutomationExecutionId

string

param AutomationExecutionId

[REQUIRED]

The Automation execution ID for which you want step execution descriptions.

type Filters

list

param Filters

One or more filters to limit the number of step executions returned by the request.

  • (dict) --

    A filter to limit the amount of step execution information returned by the call.

    • Key (string) -- [REQUIRED]

      One or more keys to limit the results. Valid filter keys include the following: StepName, Action, StepExecutionId, StepExecutionStatus, StartTimeBefore, StartTimeAfter.

    • Values (list) -- [REQUIRED]

      The values of the filter key.

      • (string) --

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type ReverseOrder

boolean

param ReverseOrder

A boolean that indicates whether to list step executions in reverse order by start time. The default value is false.

rtype

dict

returns

Response Syntax

{
    'StepExecutions': [
        {
            'StepName': 'string',
            'Action': 'string',
            'TimeoutSeconds': 123,
            'OnFailure': 'string',
            'MaxAttempts': 123,
            'ExecutionStartTime': datetime(2015, 1, 1),
            'ExecutionEndTime': datetime(2015, 1, 1),
            'StepStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed',
            'ResponseCode': 'string',
            'Inputs': {
                'string': 'string'
            },
            'Outputs': {
                'string': [
                    'string',
                ]
            },
            'Response': 'string',
            'FailureMessage': 'string',
            'FailureDetails': {
                'FailureStage': 'string',
                'FailureType': 'string',
                'Details': {
                    'string': [
                        'string',
                    ]
                }
            },
            'StepExecutionId': 'string',
            'OverriddenParameters': {
                'string': [
                    'string',
                ]
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • StepExecutions (list) --

      A list of details about the current state of all steps that make up an execution.

      • (dict) --

        Detailed information about an the execution state of an Automation step.

        • StepName (string) --

          The name of this execution step.

        • Action (string) --

          The action this step performs. The action determines the behavior of the step.

        • TimeoutSeconds (integer) --

          The timeout seconds of the step.

        • OnFailure (string) --

          The action to take if the step fails. The default value is Abort.

        • MaxAttempts (integer) --

          The maximum number of tries to run the action of the step. The default value is 1.

        • ExecutionStartTime (datetime) --

          If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field is not populated.

        • ExecutionEndTime (datetime) --

          If a step has finished execution, this contains the time the execution ended. If the step has not yet concluded, this field is not populated.

        • StepStatus (string) --

          The execution status for this step. Valid values include: Pending, InProgress, Success, Cancelled, Failed, and TimedOut.

        • ResponseCode (string) --

          The response code returned by the execution of the step.

        • Inputs (dict) --

          Fully-resolved values passed into the step before execution.

          • (string) --

            • (string) --

        • Outputs (dict) --

          Returned values from the execution of the step.

          • (string) --

            • (list) --

              • (string) --

        • Response (string) --

          A message associated with the response code for an execution.

        • FailureMessage (string) --

          If a step failed, this message explains why the execution failed.

        • FailureDetails (dict) --

          Information about the Automation failure.

          • FailureStage (string) --

            The stage of the Automation execution when the failure occurred. The stages include the following: InputValidation, PreVerification, Invocation, PostVerification.

          • FailureType (string) --

            The type of Automation failure. Failure types include the following: Action, Permission, Throttling, Verification, Internal.

          • Details (dict) --

            Detailed information about the Automation step failure.

            • (string) --

              • (list) --

                • (string) --

        • StepExecutionId (string) --

          The unique ID of a step execution.

        • OverriddenParameters (dict) --

          A user-specified list of parameters to override when executing a step.

          • (string) --

            • (list) --

              • (string) --

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

CreateDocument (updated) Link ¶
Changes (request, response)
Request
{'DocumentFormat': 'YAML | JSON', 'TargetType': 'string'}
Response
{'DocumentDescription': {'DocumentFormat': 'YAML | JSON',
                         'TargetType': 'string'}}

Creates a Systems Manager document.

After you create a document, you can use CreateAssociation to associate it with one or more running instances.

See also: AWS API Documentation

Request Syntax

client.create_document(
    Content='string',
    Name='string',
    DocumentType='Command'|'Policy'|'Automation',
    DocumentFormat='YAML'|'JSON',
    TargetType='string'
)
type Content

string

param Content

[REQUIRED]

A valid JSON or YAML string.

type Name

string

param Name

[REQUIRED]

A name for the Systems Manager document.

type DocumentType

string

param DocumentType

The type of document to create. Valid document types include: Policy, Automation, and Command.

type DocumentFormat

string

param DocumentFormat

Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.

type TargetType

string

param TargetType

Specify a target type to define the kinds of resources the document can run on. For example, to run a document on EC2 instances, specify the following value: /AWS::EC2::Instance. If you specify a value of '/' the document can run on all types of resources. If you don't specify a value, the document can't run on any resources. For a list of valid resource types, see AWS Resource Types Reference in the AWS CloudFormation User Guide .

rtype

dict

returns

Response Syntax

{
    'DocumentDescription': {
        'Sha1': 'string',
        'Hash': 'string',
        'HashType': 'Sha256'|'Sha1',
        'Name': 'string',
        'Owner': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'Status': 'Creating'|'Active'|'Updating'|'Deleting',
        'DocumentVersion': 'string',
        'Description': 'string',
        'Parameters': [
            {
                'Name': 'string',
                'Type': 'String'|'StringList',
                'Description': 'string',
                'DefaultValue': 'string'
            },
        ],
        'PlatformTypes': [
            'Windows'|'Linux',
        ],
        'DocumentType': 'Command'|'Policy'|'Automation',
        'SchemaVersion': 'string',
        'LatestVersion': 'string',
        'DefaultVersion': 'string',
        'DocumentFormat': 'YAML'|'JSON',
        'TargetType': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • DocumentDescription (dict) --

      Information about the Systems Manager document.

      • Sha1 (string) --

        The SHA1 hash of the document, which you can use for verification.

      • Hash (string) --

        The Sha256 or Sha1 hash created by the system when the document was created.

        Note

        Sha1 hashes have been deprecated.

      • HashType (string) --

        Sha256 or Sha1.

        Note

        Sha1 hashes have been deprecated.

      • Name (string) --

        The name of the Systems Manager document.

      • Owner (string) --

        The AWS user account that created the document.

      • CreatedDate (datetime) --

        The date when the document was created.

      • Status (string) --

        The status of the Systems Manager document.

      • DocumentVersion (string) --

        The document version.

      • Description (string) --

        A description of the document.

      • Parameters (list) --

        A description of the parameters for a document.

        • (dict) --

          Parameters specified in a System Manager document that execute on the server when the command is run.

          • Name (string) --

            The name of the parameter.

          • Type (string) --

            The type of parameter. The type can be either String or StringList.

          • Description (string) --

            A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.

          • DefaultValue (string) --

            If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.

      • PlatformTypes (list) --

        The list of OS platforms compatible with this Systems Manager document.

        • (string) --

      • DocumentType (string) --

        The type of document.

      • SchemaVersion (string) --

        The schema version.

      • LatestVersion (string) --

        The latest version of the document.

      • DefaultVersion (string) --

        The default version.

      • DocumentFormat (string) --

        The document format, either JSON or YAML.

      • TargetType (string) --

        The target type which defines the kinds of resources the document can run on. For example, /AWS::EC2::Instance. For a list of valid resource types, see AWS Resource Types Reference in the AWS CloudFormation User Guide .

      • Tags (list) --

        The tags, or metadata, that have been applied to the document.

        • (dict) --

          Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, Maintenance Windows, Parameter Store parameters, and patch baselines.

          • Key (string) --

            The name of the tag.

          • Value (string) --

            The value of the tag.

DescribeAutomationExecutions (updated) Link ¶
Changes (request, response)
Request
{'Filters': {'Key': {'CurrentAction',
                     'ExecutionId',
                     'ParentExecutionId',
                     'StartTimeAfter',
                     'StartTimeBefore'}}}
Response
{'AutomationExecutionMetadataList': {'AutomationExecutionStatus': {'Cancelling'},
                                     'CurrentAction': 'string',
                                     'CurrentStepName': 'string',
                                     'FailureMessage': 'string',
                                     'MaxConcurrency': 'string',
                                     'MaxErrors': 'string',
                                     'Mode': 'Auto | Interactive',
                                     'ParentAutomationExecutionId': 'string',
                                     'ResolvedTargets': {'ParameterValues': ['string'],
                                                         'Truncated': 'boolean'},
                                     'Target': 'string',
                                     'TargetParameterName': 'string',
                                     'Targets': [{'Key': 'string',
                                                  'Values': ['string']}]}}

Provides details about all active and terminated Automation executions.

See also: AWS API Documentation

Request Syntax

client.describe_automation_executions(
    Filters=[
        {
            'Key': 'DocumentNamePrefix'|'ExecutionStatus'|'ExecutionId'|'ParentExecutionId'|'CurrentAction'|'StartTimeBefore'|'StartTimeAfter',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type Filters

list

param Filters

Filters used to limit the scope of executions that are requested.

  • (dict) --

    A filter used to match specific automation executions. This is used to limit the scope of Automation execution information returned.

    • Key (string) -- [REQUIRED]

      One or more keys to limit the results. Valid filter keys include the following: DocumentNamePrefix, ExecutionStatus, ExecutionId, ParentExecutionId, CurrentAction, StartTimeBefore, StartTimeAfter.

    • Values (list) -- [REQUIRED]

      The values used to limit the execution information associated with the filter's key.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

rtype

dict

returns

Response Syntax

{
    'AutomationExecutionMetadataList': [
        {
            'AutomationExecutionId': 'string',
            'DocumentName': 'string',
            'DocumentVersion': 'string',
            'AutomationExecutionStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed',
            'ExecutionStartTime': datetime(2015, 1, 1),
            'ExecutionEndTime': datetime(2015, 1, 1),
            'ExecutedBy': 'string',
            'LogFile': 'string',
            'Outputs': {
                'string': [
                    'string',
                ]
            },
            'Mode': 'Auto'|'Interactive',
            'ParentAutomationExecutionId': 'string',
            'CurrentStepName': 'string',
            'CurrentAction': 'string',
            'FailureMessage': 'string',
            'TargetParameterName': 'string',
            'Targets': [
                {
                    'Key': 'string',
                    'Values': [
                        'string',
                    ]
                },
            ],
            'ResolvedTargets': {
                'ParameterValues': [
                    'string',
                ],
                'Truncated': True|False
            },
            'MaxConcurrency': 'string',
            'MaxErrors': 'string',
            'Target': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • AutomationExecutionMetadataList (list) --

      The list of details about each automation execution which has occurred which matches the filter specification, if any.

      • (dict) --

        Details about a specific Automation execution.

        • AutomationExecutionId (string) --

          The execution ID.

        • DocumentName (string) --

          The name of the Automation document used during execution.

        • DocumentVersion (string) --

          The document version used during the execution.

        • AutomationExecutionStatus (string) --

          The status of the execution. Valid values include: Running, Succeeded, Failed, Timed out, or Cancelled.

        • ExecutionStartTime (datetime) --

          The time the execution started.>

        • ExecutionEndTime (datetime) --

          The time the execution finished. This is not populated if the execution is still in progress.

        • ExecutedBy (string) --

          The IAM role ARN of the user who executed the Automation.

        • LogFile (string) --

          An Amazon S3 bucket where execution information is stored.

        • Outputs (dict) --

          The list of execution outputs as defined in the Automation document.

          • (string) --

            • (list) --

              • (string) --

        • Mode (string) --

          The Automation execution mode.

        • ParentAutomationExecutionId (string) --

          The ExecutionId of the parent Automation.

        • CurrentStepName (string) --

          The name of the currently executing step.

        • CurrentAction (string) --

          The action of the currently executing step.

        • FailureMessage (string) --

          The list of execution outputs as defined in the Automation document.

        • TargetParameterName (string) --

          The list of execution outputs as defined in the Automation document.

        • Targets (list) --

          The targets defined by the user when starting the Automation.

          • (dict) --

            An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.

            • Key (string) --

              User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

            • Values (list) --

              User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

              • (string) --

        • ResolvedTargets (dict) --

          A list of targets that resolved during the execution.

          • ParameterValues (list) --

            A list of parameter values sent to targets that resolved during the Automation execution.

            • (string) --

          • Truncated (boolean) --

            A boolean value indicating whether the resolved target list is truncated.

        • MaxConcurrency (string) --

          The MaxConcurrency value specified by the user when starting the Automation.

        • MaxErrors (string) --

          The MaxErrors value specified by the user when starting the Automation.

        • Target (string) --

          The list of execution outputs as defined in the Automation document.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

DescribeDocument (updated) Link ¶
Changes (response)
{'Document': {'DocumentFormat': 'YAML | JSON', 'TargetType': 'string'}}

Describes the specified Systems Manager document.

See also: AWS API Documentation

Request Syntax

client.describe_document(
    Name='string',
    DocumentVersion='string'
)
type Name

string

param Name

[REQUIRED]

The name of the Systems Manager document.

type DocumentVersion

string

param DocumentVersion

The document version for which you want information. Can be a specific version or the default version.

rtype

dict

returns

Response Syntax

{
    'Document': {
        'Sha1': 'string',
        'Hash': 'string',
        'HashType': 'Sha256'|'Sha1',
        'Name': 'string',
        'Owner': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'Status': 'Creating'|'Active'|'Updating'|'Deleting',
        'DocumentVersion': 'string',
        'Description': 'string',
        'Parameters': [
            {
                'Name': 'string',
                'Type': 'String'|'StringList',
                'Description': 'string',
                'DefaultValue': 'string'
            },
        ],
        'PlatformTypes': [
            'Windows'|'Linux',
        ],
        'DocumentType': 'Command'|'Policy'|'Automation',
        'SchemaVersion': 'string',
        'LatestVersion': 'string',
        'DefaultVersion': 'string',
        'DocumentFormat': 'YAML'|'JSON',
        'TargetType': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Document (dict) --

      Information about the Systems Manager document.

      • Sha1 (string) --

        The SHA1 hash of the document, which you can use for verification.

      • Hash (string) --

        The Sha256 or Sha1 hash created by the system when the document was created.

        Note

        Sha1 hashes have been deprecated.

      • HashType (string) --

        Sha256 or Sha1.

        Note

        Sha1 hashes have been deprecated.

      • Name (string) --

        The name of the Systems Manager document.

      • Owner (string) --

        The AWS user account that created the document.

      • CreatedDate (datetime) --

        The date when the document was created.

      • Status (string) --

        The status of the Systems Manager document.

      • DocumentVersion (string) --

        The document version.

      • Description (string) --

        A description of the document.

      • Parameters (list) --

        A description of the parameters for a document.

        • (dict) --

          Parameters specified in a System Manager document that execute on the server when the command is run.

          • Name (string) --

            The name of the parameter.

          • Type (string) --

            The type of parameter. The type can be either String or StringList.

          • Description (string) --

            A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.

          • DefaultValue (string) --

            If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.

      • PlatformTypes (list) --

        The list of OS platforms compatible with this Systems Manager document.

        • (string) --

      • DocumentType (string) --

        The type of document.

      • SchemaVersion (string) --

        The schema version.

      • LatestVersion (string) --

        The latest version of the document.

      • DefaultVersion (string) --

        The default version.

      • DocumentFormat (string) --

        The document format, either JSON or YAML.

      • TargetType (string) --

        The target type which defines the kinds of resources the document can run on. For example, /AWS::EC2::Instance. For a list of valid resource types, see AWS Resource Types Reference in the AWS CloudFormation User Guide .

      • Tags (list) --

        The tags, or metadata, that have been applied to the document.

        • (dict) --

          Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, Maintenance Windows, Parameter Store parameters, and patch baselines.

          • Key (string) --

            The name of the tag.

          • Value (string) --

            The value of the tag.

GetAutomationExecution (updated) Link ¶
Changes (response)
{'AutomationExecution': {'AutomationExecutionStatus': {'Cancelling'},
                         'CurrentAction': 'string',
                         'CurrentStepName': 'string',
                         'ExecutedBy': 'string',
                         'MaxConcurrency': 'string',
                         'MaxErrors': 'string',
                         'Mode': 'Auto | Interactive',
                         'ParentAutomationExecutionId': 'string',
                         'ResolvedTargets': {'ParameterValues': ['string'],
                                             'Truncated': 'boolean'},
                         'StepExecutions': {'MaxAttempts': 'integer',
                                            'OnFailure': 'string',
                                            'OverriddenParameters': {'string': ['string']},
                                            'StepExecutionId': 'string',
                                            'StepStatus': {'Cancelling'},
                                            'TimeoutSeconds': 'long'},
                         'StepExecutionsTruncated': 'boolean',
                         'Target': 'string',
                         'TargetParameterName': 'string',
                         'Targets': [{'Key': 'string', 'Values': ['string']}]}}

Get detailed information about a particular Automation execution.

See also: AWS API Documentation

Request Syntax

client.get_automation_execution(
    AutomationExecutionId='string'
)
type AutomationExecutionId

string

param AutomationExecutionId

[REQUIRED]

The unique identifier for an existing automation execution to examine. The execution ID is returned by StartAutomationExecution when the execution of an Automation document is initiated.

rtype

dict

returns

Response Syntax

{
    'AutomationExecution': {
        'AutomationExecutionId': 'string',
        'DocumentName': 'string',
        'DocumentVersion': 'string',
        'ExecutionStartTime': datetime(2015, 1, 1),
        'ExecutionEndTime': datetime(2015, 1, 1),
        'AutomationExecutionStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed',
        'StepExecutions': [
            {
                'StepName': 'string',
                'Action': 'string',
                'TimeoutSeconds': 123,
                'OnFailure': 'string',
                'MaxAttempts': 123,
                'ExecutionStartTime': datetime(2015, 1, 1),
                'ExecutionEndTime': datetime(2015, 1, 1),
                'StepStatus': 'Pending'|'InProgress'|'Waiting'|'Success'|'TimedOut'|'Cancelling'|'Cancelled'|'Failed',
                'ResponseCode': 'string',
                'Inputs': {
                    'string': 'string'
                },
                'Outputs': {
                    'string': [
                        'string',
                    ]
                },
                'Response': 'string',
                'FailureMessage': 'string',
                'FailureDetails': {
                    'FailureStage': 'string',
                    'FailureType': 'string',
                    'Details': {
                        'string': [
                            'string',
                        ]
                    }
                },
                'StepExecutionId': 'string',
                'OverriddenParameters': {
                    'string': [
                        'string',
                    ]
                }
            },
        ],
        'StepExecutionsTruncated': True|False,
        'Parameters': {
            'string': [
                'string',
            ]
        },
        'Outputs': {
            'string': [
                'string',
            ]
        },
        'FailureMessage': 'string',
        'Mode': 'Auto'|'Interactive',
        'ParentAutomationExecutionId': 'string',
        'ExecutedBy': 'string',
        'CurrentStepName': 'string',
        'CurrentAction': 'string',
        'TargetParameterName': 'string',
        'Targets': [
            {
                'Key': 'string',
                'Values': [
                    'string',
                ]
            },
        ],
        'ResolvedTargets': {
            'ParameterValues': [
                'string',
            ],
            'Truncated': True|False
        },
        'MaxConcurrency': 'string',
        'MaxErrors': 'string',
        'Target': 'string'
    }
}

Response Structure

  • (dict) --

    • AutomationExecution (dict) --

      Detailed information about the current state of an automation execution.

      • AutomationExecutionId (string) --

        The execution ID.

      • DocumentName (string) --

        The name of the Automation document used during the execution.

      • DocumentVersion (string) --

        The version of the document to use during execution.

      • ExecutionStartTime (datetime) --

        The time the execution started.

      • ExecutionEndTime (datetime) --

        The time the execution finished.

      • AutomationExecutionStatus (string) --

        The execution status of the Automation.

      • StepExecutions (list) --

        A list of details about the current state of all steps that comprise an execution. An Automation document contains a list of steps that are executed in order.

        • (dict) --

          Detailed information about an the execution state of an Automation step.

          • StepName (string) --

            The name of this execution step.

          • Action (string) --

            The action this step performs. The action determines the behavior of the step.

          • TimeoutSeconds (integer) --

            The timeout seconds of the step.

          • OnFailure (string) --

            The action to take if the step fails. The default value is Abort.

          • MaxAttempts (integer) --

            The maximum number of tries to run the action of the step. The default value is 1.

          • ExecutionStartTime (datetime) --

            If a step has begun execution, this contains the time the step started. If the step is in Pending status, this field is not populated.

          • ExecutionEndTime (datetime) --

            If a step has finished execution, this contains the time the execution ended. If the step has not yet concluded, this field is not populated.

          • StepStatus (string) --

            The execution status for this step. Valid values include: Pending, InProgress, Success, Cancelled, Failed, and TimedOut.

          • ResponseCode (string) --

            The response code returned by the execution of the step.

          • Inputs (dict) --

            Fully-resolved values passed into the step before execution.

            • (string) --

              • (string) --

          • Outputs (dict) --

            Returned values from the execution of the step.

            • (string) --

              • (list) --

                • (string) --

          • Response (string) --

            A message associated with the response code for an execution.

          • FailureMessage (string) --

            If a step failed, this message explains why the execution failed.

          • FailureDetails (dict) --

            Information about the Automation failure.

            • FailureStage (string) --

              The stage of the Automation execution when the failure occurred. The stages include the following: InputValidation, PreVerification, Invocation, PostVerification.

            • FailureType (string) --

              The type of Automation failure. Failure types include the following: Action, Permission, Throttling, Verification, Internal.

            • Details (dict) --

              Detailed information about the Automation step failure.

              • (string) --

                • (list) --

                  • (string) --

          • StepExecutionId (string) --

            The unique ID of a step execution.

          • OverriddenParameters (dict) --

            A user-specified list of parameters to override when executing a step.

            • (string) --

              • (list) --

                • (string) --

      • StepExecutionsTruncated (boolean) --

        A boolean value that indicates if the response contains the full list of the Automation step executions. If true, use the DescribeAutomationStepExecutions API action to get the full list of step executions.

      • Parameters (dict) --

        The key-value map of execution parameters, which were supplied when calling StartAutomationExecution.

        • (string) --

          • (list) --

            • (string) --

      • Outputs (dict) --

        The list of execution outputs as defined in the automation document.

        • (string) --

          • (list) --

            • (string) --

      • FailureMessage (string) --

        A message describing why an execution has failed, if the status is set to Failed.

      • Mode (string) --

        The automation execution mode.

      • ParentAutomationExecutionId (string) --

        The AutomationExecutionId of the parent automation.

      • ExecutedBy (string) --

        The Amazon Resource Name (ARN) of the user who executed the automation.

      • CurrentStepName (string) --

        The name of the currently executing step.

      • CurrentAction (string) --

        The action of the currently executing step.

      • TargetParameterName (string) --

        The parameter name.

      • Targets (list) --

        The specified targets.

        • (dict) --

          An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.

          • Key (string) --

            User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

          • Values (list) --

            User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

            • (string) --

      • ResolvedTargets (dict) --

        A list of resolved targets in the rate control execution.

        • ParameterValues (list) --

          A list of parameter values sent to targets that resolved during the Automation execution.

          • (string) --

        • Truncated (boolean) --

          A boolean value indicating whether the resolved target list is truncated.

      • MaxConcurrency (string) --

        The MaxConcurrency value specified by the user when the execution started.

      • MaxErrors (string) --

        The MaxErrors value specified by the user when the execution started.

      • Target (string) --

        The target of the execution.

GetDocument (updated) Link ¶
Changes (both)
{'DocumentFormat': 'YAML | JSON'}

Gets the contents of the specified Systems Manager document.

See also: AWS API Documentation

Request Syntax

client.get_document(
    Name='string',
    DocumentVersion='string',
    DocumentFormat='YAML'|'JSON'
)
type Name

string

param Name

[REQUIRED]

The name of the Systems Manager document.

type DocumentVersion

string

param DocumentVersion

The document version for which you want information.

type DocumentFormat

string

param DocumentFormat

Returns the document in the specified format. The document format can be either JSON or YAML. JSON is the default format.

rtype

dict

returns

Response Syntax

{
    'Name': 'string',
    'DocumentVersion': 'string',
    'Content': 'string',
    'DocumentType': 'Command'|'Policy'|'Automation',
    'DocumentFormat': 'YAML'|'JSON'
}

Response Structure

  • (dict) --

    • Name (string) --

      The name of the Systems Manager document.

    • DocumentVersion (string) --

      The document version.

    • Content (string) --

      The contents of the Systems Manager document.

    • DocumentType (string) --

      The document type.

    • DocumentFormat (string) --

      The document format, either JSON or YAML.

ListDocumentVersions (updated) Link ¶
Changes (response)
{'DocumentVersions': {'DocumentFormat': 'YAML | JSON'}}

List all versions for a document.

See also: AWS API Documentation

Request Syntax

client.list_document_versions(
    Name='string',
    MaxResults=123,
    NextToken='string'
)
type Name

string

param Name

[REQUIRED]

The name of the document about which you want version information.

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

rtype

dict

returns

Response Syntax

{
    'DocumentVersions': [
        {
            'Name': 'string',
            'DocumentVersion': 'string',
            'CreatedDate': datetime(2015, 1, 1),
            'IsDefaultVersion': True|False,
            'DocumentFormat': 'YAML'|'JSON'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DocumentVersions (list) --

      The document versions.

      • (dict) --

        Version information about the document.

        • Name (string) --

          The document name.

        • DocumentVersion (string) --

          The document version.

        • CreatedDate (datetime) --

          The date the document was created.

        • IsDefaultVersion (boolean) --

          An identifier for the default version of the document.

        • DocumentFormat (string) --

          The document format, either JSON or YAML.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

ListDocuments (updated) Link ¶
Changes (response)
{'DocumentIdentifiers': {'DocumentFormat': 'YAML | JSON',
                         'TargetType': 'string'}}

Describes one or more of your Systems Manager documents.

See also: AWS API Documentation

Request Syntax

client.list_documents(
    DocumentFilterList=[
        {
            'key': 'Name'|'Owner'|'PlatformTypes'|'DocumentType',
            'value': 'string'
        },
    ],
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxResults=123,
    NextToken='string'
)
type DocumentFilterList

list

param DocumentFilterList

One or more filters. Use a filter to return a more specific list of results.

  • (dict) --

    Describes a filter.

    • key (string) -- [REQUIRED]

      The name of the filter.

    • value (string) -- [REQUIRED]

      The value of the filter.

type Filters

list

param Filters

One or more filters. Use a filter to return a more specific list of results.

  • (dict) --

    One or more filters. Use a filter to return a more specific list of documents.

    For keys, you can specify one or more tags that have been applied to a document.

    Other valid values include Owner, Name, PlatformTypes, and DocumentType.

    Note that only one Owner can be specified in a request. For example: Key=Owner,Values=Self .

    If you use Name as a key, you can use a name prefix to return a list of documents. For example, in the AWS CLI, to return a list of all documents that begin with Te , run the following command:

    aws ssm list-documents --filters Key=Name,Values=Te

    If you specify more than two keys, only documents that are identified by all the tags are returned in the results. If you specify more than two values for a key, documents that are identified by any of the values are returned in the results.

    To specify a custom key and value pair, use the format Key=tag:[tagName],Values=[valueName] .

    For example, if you created a Key called region and are using the AWS CLI to call the list-documents command:

    aws ssm list-documents --filters Key=tag:region,Values=east,west Key=Owner,Values=Self

    • Key (string) --

      The name of the filter key.

    • Values (list) --

      The value for the filter key.

      • (string) --

type MaxResults

integer

param MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

type NextToken

string

param NextToken

The token for the next set of items to return. (You received this token from a previous call.)

rtype

dict

returns

Response Syntax

{
    'DocumentIdentifiers': [
        {
            'Name': 'string',
            'Owner': 'string',
            'PlatformTypes': [
                'Windows'|'Linux',
            ],
            'DocumentVersion': 'string',
            'DocumentType': 'Command'|'Policy'|'Automation',
            'SchemaVersion': 'string',
            'DocumentFormat': 'YAML'|'JSON',
            'TargetType': 'string',
            'Tags': [
                {
                    'Key': 'string',
                    'Value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • DocumentIdentifiers (list) --

      The names of the Systems Manager documents.

      • (dict) --

        Describes the name of a Systems Manager document.

        • Name (string) --

          The name of the Systems Manager document.

        • Owner (string) --

          The AWS user account that created the document.

        • PlatformTypes (list) --

          The operating system platform.

          • (string) --

        • DocumentVersion (string) --

          The document version.

        • DocumentType (string) --

          The document type.

        • SchemaVersion (string) --

          The schema version.

        • DocumentFormat (string) --

          The document format, either JSON or YAML.

        • TargetType (string) --

          The target type which defines the kinds of resources the document can run on. For example, /AWS::EC2::Instance. For a list of valid resource types, see AWS Resource Types Reference in the AWS CloudFormation User Guide .

        • Tags (list) --

          The tags, or metadata, that have been applied to the document.

          • (dict) --

            Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, Maintenance Windows, Parameter Store parameters, and patch baselines.

            • Key (string) --

              The name of the tag.

            • Value (string) --

              The value of the tag.

    • NextToken (string) --

      The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.

SendAutomationSignal (updated) Link ¶
Changes (request)
{'SignalType': {'Resume', 'StartStep', 'StopStep'}}

Sends a signal to an Automation execution to change the current behavior or status of the execution.

See also: AWS API Documentation

Request Syntax

client.send_automation_signal(
    AutomationExecutionId='string',
    SignalType='Approve'|'Reject'|'StartStep'|'StopStep'|'Resume',
    Payload={
        'string': [
            'string',
        ]
    }
)
type AutomationExecutionId

string

param AutomationExecutionId

[REQUIRED]

The unique identifier for an existing Automation execution that you want to send the signal to.

type SignalType

string

param SignalType

[REQUIRED]

The type of signal. Valid signal types include the following: Approve and Reject

type Payload

dict

param Payload

The data sent with the signal. The data schema depends on the type of signal used in the request.

  • (string) --

    • (list) --

      • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

StartAutomationExecution (updated) Link ¶
Changes (request)
{'MaxConcurrency': 'string',
 'MaxErrors': 'string',
 'Mode': 'Auto | Interactive',
 'TargetParameterName': 'string',
 'Targets': [{'Key': 'string', 'Values': ['string']}]}

Initiates execution of an Automation document.

See also: AWS API Documentation

Request Syntax

client.start_automation_execution(
    DocumentName='string',
    DocumentVersion='string',
    Parameters={
        'string': [
            'string',
        ]
    },
    ClientToken='string',
    Mode='Auto'|'Interactive',
    TargetParameterName='string',
    Targets=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    MaxConcurrency='string',
    MaxErrors='string'
)
type DocumentName

string

param DocumentName

[REQUIRED]

The name of the Automation document to use for this execution.

type DocumentVersion

string

param DocumentVersion

The version of the Automation document to use for this execution.

type Parameters

dict

param Parameters

A key-value map of execution parameters, which match the declared parameters in the Automation document.

  • (string) --

    • (list) --

      • (string) --

type ClientToken

string

param ClientToken

User-provided idempotency token. The token must be unique, is case insensitive, enforces the UUID format, and can't be reused.

type Mode

string

param Mode

The execution mode of the automation. Valid modes include the following: Auto and Interactive. The default mode is Auto.

type TargetParameterName

string

param TargetParameterName

The name of the parameter used as the target resource for the rate-controlled execution. Required if you specify Targets.

type Targets

list

param Targets

A key-value mapping to target resources. Required if you specify TargetParameterName.

  • (dict) --

    An array of search criteria that targets instances using a Key,Value combination that you specify. Targets is required if you don't provide one or more instance IDs in the call.

    • Key (string) --

      User-defined criteria for sending commands that target instances that meet the criteria. Key can be tag:<Amazon EC2 tag> or InstanceIds. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

    • Values (list) --

      User-defined criteria that maps to Key. For example, if you specified tag:ServerRole, you could specify value:WebServer to execute a command on instances that include Amazon EC2 tags of ServerRole,WebServer. For more information about how to send commands that target instances using Key,Value parameters, see Executing a Command Using Systems Manager Run Command.

      • (string) --

type MaxConcurrency

string

param MaxConcurrency

The maximum number of targets allowed to run this task in parallel. You can specify a number, such as 10, or a percentage, such as 10%. The default value is 10.

type MaxErrors

string

param MaxErrors

The number of errors that are allowed before the system stops running the automation 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 running the automation when the fourth error is received. If you specify 0, then the system stops running the automation on additional targets after the first error result is returned. If you run an automation on 50 resources and set max-errors to 10%, then the system stops running the automation on additional targets when the sixth error is received.

Executions that are already running an automation when max-errors 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 max-concurrency to 1 so the executions proceed one at a time.

rtype

dict

returns

Response Syntax

{
    'AutomationExecutionId': 'string'
}

Response Structure

  • (dict) --

    • AutomationExecutionId (string) --

      The unique ID of a newly scheduled automation execution.

StopAutomationExecution (updated) Link ¶
Changes (request)
{'Type': 'Complete | Cancel'}

Stop an Automation that is currently executing.

See also: AWS API Documentation

Request Syntax

client.stop_automation_execution(
    AutomationExecutionId='string',
    Type='Complete'|'Cancel'
)
type AutomationExecutionId

string

param AutomationExecutionId

[REQUIRED]

The execution ID of the Automation to stop.

type Type

string

param Type

The stop request type. Valid types include the following: Cancel and Complete. The default type is Cancel.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UpdateDocument (updated) Link ¶
Changes (request, response)
Request
{'DocumentFormat': 'YAML | JSON', 'TargetType': 'string'}
Response
{'DocumentDescription': {'DocumentFormat': 'YAML | JSON',
                         'TargetType': 'string'}}

The document you want to update.

See also: AWS API Documentation

Request Syntax

client.update_document(
    Content='string',
    Name='string',
    DocumentVersion='string',
    DocumentFormat='YAML'|'JSON',
    TargetType='string'
)
type Content

string

param Content

[REQUIRED]

The content in a document that you want to update.

type Name

string

param Name

[REQUIRED]

The name of the document that you want to update.

type DocumentVersion

string

param DocumentVersion

The version of the document that you want to update.

type DocumentFormat

string

param DocumentFormat

Specify the document format for the new document version. Systems Manager supports JSON and YAML documents. JSON is the default format.

type TargetType

string

param TargetType

Specify a new target type for the document.

rtype

dict

returns

Response Syntax

{
    'DocumentDescription': {
        'Sha1': 'string',
        'Hash': 'string',
        'HashType': 'Sha256'|'Sha1',
        'Name': 'string',
        'Owner': 'string',
        'CreatedDate': datetime(2015, 1, 1),
        'Status': 'Creating'|'Active'|'Updating'|'Deleting',
        'DocumentVersion': 'string',
        'Description': 'string',
        'Parameters': [
            {
                'Name': 'string',
                'Type': 'String'|'StringList',
                'Description': 'string',
                'DefaultValue': 'string'
            },
        ],
        'PlatformTypes': [
            'Windows'|'Linux',
        ],
        'DocumentType': 'Command'|'Policy'|'Automation',
        'SchemaVersion': 'string',
        'LatestVersion': 'string',
        'DefaultVersion': 'string',
        'DocumentFormat': 'YAML'|'JSON',
        'TargetType': 'string',
        'Tags': [
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • DocumentDescription (dict) --

      A description of the document that was updated.

      • Sha1 (string) --

        The SHA1 hash of the document, which you can use for verification.

      • Hash (string) --

        The Sha256 or Sha1 hash created by the system when the document was created.

        Note

        Sha1 hashes have been deprecated.

      • HashType (string) --

        Sha256 or Sha1.

        Note

        Sha1 hashes have been deprecated.

      • Name (string) --

        The name of the Systems Manager document.

      • Owner (string) --

        The AWS user account that created the document.

      • CreatedDate (datetime) --

        The date when the document was created.

      • Status (string) --

        The status of the Systems Manager document.

      • DocumentVersion (string) --

        The document version.

      • Description (string) --

        A description of the document.

      • Parameters (list) --

        A description of the parameters for a document.

        • (dict) --

          Parameters specified in a System Manager document that execute on the server when the command is run.

          • Name (string) --

            The name of the parameter.

          • Type (string) --

            The type of parameter. The type can be either String or StringList.

          • Description (string) --

            A description of what the parameter does, how to use it, the default value, and whether or not the parameter is optional.

          • DefaultValue (string) --

            If specified, the default values for the parameters. Parameters without a default value are required. Parameters with a default value are optional.

      • PlatformTypes (list) --

        The list of OS platforms compatible with this Systems Manager document.

        • (string) --

      • DocumentType (string) --

        The type of document.

      • SchemaVersion (string) --

        The schema version.

      • LatestVersion (string) --

        The latest version of the document.

      • DefaultVersion (string) --

        The default version.

      • DocumentFormat (string) --

        The document format, either JSON or YAML.

      • TargetType (string) --

        The target type which defines the kinds of resources the document can run on. For example, /AWS::EC2::Instance. For a list of valid resource types, see AWS Resource Types Reference in the AWS CloudFormation User Guide .

      • Tags (list) --

        The tags, or metadata, that have been applied to the document.

        • (dict) --

          Metadata that you assign to your AWS resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. In Systems Manager, you can apply tags to documents, managed instances, Maintenance Windows, Parameter Store parameters, and patch baselines.

          • Key (string) --

            The name of the tag.

          • Value (string) --

            The value of the tag.