Use DescribeAssociationExecutions
with a CLI
The following code examples show how to use DescribeAssociationExecutions
.
- CLI
-
- AWS CLI
-
Example 1: To get details of all executions for an association
The following
describe-association-executions
example describes all executions of the specified association.aws ssm describe-association-executions \ --association-id
"8dfe3659-4309-493a-8755-0123456789ab"
Output:
{ "AssociationExecutions": [ { "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "AssociationVersion": "1", "ExecutionId": "474925ef-1249-45a2-b93d-0123456789ab", "Status": "Success", "DetailedStatus": "Success", "CreatedTime": 1550505827.119, "ResourceCountByStatus": "{Success=1}" }, { "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "AssociationVersion": "1", "ExecutionId": "7abb6378-a4a5-4f10-8312-0123456789ab", "Status": "Success", "DetailedStatus": "Success", "CreatedTime": 1550505536.843, "ResourceCountByStatus": "{Success=1}" }, ... ] }
For more information, see Viewing association histories in the AWS Systems Manager User Guide.
Example 2: To get details of all executions for an association after a specific date and time
The following
describe-association-executions
example describes all executions of an association after the specified date and time.aws ssm describe-association-executions \ --association-id
"8dfe3659-4309-493a-8755-0123456789ab"
\ --filters"Key=CreatedTime,Value=2019-02-18T16:00:00Z,Type=GREATER_THAN"
Output:
{ "AssociationExecutions": [ { "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "AssociationVersion": "1", "ExecutionId": "474925ef-1249-45a2-b93d-0123456789ab", "Status": "Success", "DetailedStatus": "Success", "CreatedTime": 1550505827.119, "ResourceCountByStatus": "{Success=1}" }, { "AssociationId": "8dfe3659-4309-493a-8755-0123456789ab", "AssociationVersion": "1", "ExecutionId": "7abb6378-a4a5-4f10-8312-0123456789ab", "Status": "Success", "DetailedStatus": "Success", "CreatedTime": 1550505536.843, "ResourceCountByStatus": "{Success=1}" }, ... ] }
For more information, see Viewing association histories in the AWS Systems Manager User Guide.
-
For API details, see DescribeAssociationExecutions
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example returns the executions for the association ID provided
Get-SSMAssociationExecution -AssociationId 123a45a0-c678-9012-3456-78901234db5e
Output:
AssociationId : 123a45a0-c678-9012-3456-78901234db5e AssociationVersion : 2 CreatedTime : 3/2/2019 8:53:29 AM DetailedStatus : ExecutionId : 123a45a0-c678-9012-3456-78901234db5e LastExecutionDate : 1/1/0001 12:00:00 AM ResourceCountByStatus : {Success=4} Status : Success
-
For API details, see DescribeAssociationExecutions in AWS Tools for PowerShell Cmdlet Reference.
-
For a complete list of AWS SDK developer guides and code examples, see Using this service with an AWS SDK. This topic also includes information about getting started and details about previous SDK versions.