2017/05/15 - Amazon Simple Systems Manager (SSM) - 2 updated api methods
Changes Update ssm client to latest version
{'AutomationExecution': {'StepExecutions': {'FailureDetails': {'Details': {'string': ['string']}, 'FailureStage': 'string', 'FailureType': 'string'}}}}
Get detailed information about a particular Automation execution.
See also: AWS API Documentation
Request Syntax
client.get_automation_execution( AutomationExecutionId='string' )
string
[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.
dict
Response Syntax
{ 'AutomationExecution': { 'AutomationExecutionId': 'string', 'DocumentName': 'string', 'DocumentVersion': 'string', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'AutomationExecutionStatus': 'Pending'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'StepExecutions': [ { 'StepName': 'string', 'Action': 'string', 'ExecutionStartTime': datetime(2015, 1, 1), 'ExecutionEndTime': datetime(2015, 1, 1), 'StepStatus': 'Pending'|'InProgress'|'Success'|'TimedOut'|'Cancelled'|'Failed', 'ResponseCode': 'string', 'Inputs': { 'string': 'string' }, 'Outputs': { 'string': [ 'string', ] }, 'Response': 'string', 'FailureMessage': 'string', 'FailureDetails': { 'FailureStage': 'string', 'FailureType': 'string', 'Details': { 'string': [ 'string', ] } } }, ], 'Parameters': { 'string': [ 'string', ] }, 'Outputs': { 'string': [ 'string', ] }, 'FailureMessage': '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.
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) --
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.
{'Name': 'string', 'Targets': [{'Key': 'string', 'Values': ['string']}]}
Updates an association. You can only update the document version, schedule, parameters, and Amazon S3 output of an association.
See also: AWS API Documentation
Request Syntax
client.update_association( AssociationId='string', Parameters={ 'string': [ 'string', ] }, DocumentVersion='string', ScheduleExpression='string', OutputLocation={ 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, Name='string', Targets=[ { 'Key': 'string', 'Values': [ 'string', ] }, ] )
string
[REQUIRED]
The ID of the association you want to update.
dict
The parameters you want to update for the association. If you create a parameter using Parameter Store, you can reference the parameter using {{ssm:parameter-name}}
(string) --
(list) --
(string) --
string
The document version you want update for the association.
string
The cron expression used to schedule the association that you want to update.
dict
An Amazon S3 bucket where you want to store the results of this request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
string
The name of the association document.
list
The targets of the association.
(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) --
dict
Response Syntax
{ 'AssociationDescription': { 'Name': 'string', 'InstanceId': 'string', 'Date': datetime(2015, 1, 1), 'LastUpdateAssociationDate': datetime(2015, 1, 1), 'Status': { 'Date': datetime(2015, 1, 1), 'Name': 'Pending'|'Success'|'Failed', 'Message': 'string', 'AdditionalInfo': 'string' }, 'Overview': { 'Status': 'string', 'DetailedStatus': 'string', 'AssociationStatusAggregatedCount': { 'string': 123 } }, 'DocumentVersion': 'string', 'Parameters': { 'string': [ 'string', ] }, 'AssociationId': 'string', 'Targets': [ { 'Key': 'string', 'Values': [ 'string', ] }, ], 'ScheduleExpression': 'string', 'OutputLocation': { 'S3Location': { 'OutputS3Region': 'string', 'OutputS3BucketName': 'string', 'OutputS3KeyPrefix': 'string' } }, 'LastExecutionDate': datetime(2015, 1, 1), 'LastSuccessfulExecutionDate': datetime(2015, 1, 1) } }
Response Structure
(dict) --
AssociationDescription (dict) --
The description of the association that was updated.
Name (string) --
The name of the SSM document.
InstanceId (string) --
The ID of the instance.
Date (datetime) --
The date when the association was made.
LastUpdateAssociationDate (datetime) --
The date when the association was last updated.
Status (dict) --
The association status.
Date (datetime) --
The date when the status changed.
Name (string) --
The status.
Message (string) --
The reason for the status.
AdditionalInfo (string) --
A user-defined string.
Overview (dict) --
Information about the association.
Status (string) --
The status of the association. Status can be: Pending, Success, or Failed.
DetailedStatus (string) --
A detailed status of the association.
AssociationStatusAggregatedCount (dict) --
Returns the number of targets for the association status. For example, if you created an association with two instances, and one of them was successful, this would return the count of instances by status.
(string) --
(integer) --
DocumentVersion (string) --
The document version.
Parameters (dict) --
A description of the parameters for a document.
(string) --
(list) --
(string) --
AssociationId (string) --
The association ID.
Targets (list) --
The instances targeted by the request.
(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) --
ScheduleExpression (string) --
A cron expression that specifies a schedule when the association runs.
OutputLocation (dict) --
An Amazon S3 bucket where you want to store the output details of the request.
S3Location (dict) --
An Amazon S3 bucket where you want to store the results of this request.
OutputS3Region (string) --
The Amazon S3 region where the association information is stored.
OutputS3BucketName (string) --
The name of the Amazon S3 bucket.
OutputS3KeyPrefix (string) --
The Amazon S3 bucket subfolder.
LastExecutionDate (datetime) --
The date on which the association was last run.
LastSuccessfulExecutionDate (datetime) --
The last date on which the association was successfully run.