Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
• Amazon Systems Manager Change Manager is no longer open to new customers. Existing customers can continue to use the service as normal. For more information, see
Amazon Systems Manager Change Manager availability change.
• The Amazon Systems Manager CloudWatch Dashboard will no longer be available after April 30, 2026. Customers can continue to use Amazon CloudWatch console to view, create, and manage their Amazon CloudWatch dashboards, just as they do today. For more information, see
Amazon CloudWatch Dashboard documentation.
Use DescribeInstanceAssociationsStatus with a CLI
The following code examples show how to use DescribeInstanceAssociationsStatus.
- CLI
-
- Amazon CLI
-
To describe the status of an instance's associations
This example shows details of the associations for an instance.
Command:
aws ssm describe-instance-associations-status --instance-id "i-1234567890abcdef0"
Output:
{
"InstanceAssociationStatusInfos": [
{
"AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
"Name": "AWS-GatherSoftwareInventory",
"DocumentVersion": "1",
"AssociationVersion": "1",
"InstanceId": "i-1234567890abcdef0",
"ExecutionDate": 1550501886.0,
"Status": "Success",
"ExecutionSummary": "1 out of 1 plugin processed, 1 success, 0 failed, 0 timedout, 0 skipped. ",
"AssociationName": "Inventory-Association"
},
{
"AssociationId": "5c5a31f6-6dae-46f9-944c-0123456789ab",
"Name": "AWS-UpdateSSMAgent",
"DocumentVersion": "1",
"AssociationVersion": "1",
"InstanceId": "i-1234567890abcdef0",
"ExecutionDate": 1550505828.548,
"Status": "Success",
"DetailedStatus": "Success",
"AssociationName": "UpdateSSMAgent"
}
]
}
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example shows details of the associations for an instance.
Get-SSMInstanceAssociationsStatus -InstanceId "i-0000293ffd8c57862"
Output:
AssociationId : d8617c07-2079-4c18-9847-1655fc2698b0
DetailedStatus : Pending
DocumentVersion : 1
ErrorCode :
ExecutionDate : 2/20/2015 8:31:11 AM
ExecutionSummary : temp_status_change
InstanceId : i-0000293ffd8c57862
Name : AWS-UpdateSSMAgent
OutputUrl :
Status : Pending
Example 2: This example checks the instance association status for the given instance id and further, displays the execution status of those associations
Get-SSMInstanceAssociationsStatus -InstanceId i-012e3cb4df567e8aa | ForEach-Object {Get-SSMAssociationExecution -AssociationId .AssociationId}
Output:
AssociationId : 512a34a5-c678-1234-1234-12345678db9e
AssociationVersion : 2
CreatedTime : 3/2/2019 8:53:29 AM
DetailedStatus :
ExecutionId : 512a34a5-c678-1234-1234-12345678db9e
LastExecutionDate : 1/1/0001 12:00:00 AM
ResourceCountByStatus : {Success=9}
Status : Success
- Tools for PowerShell V5
-
Example 1: This example shows details of the associations for an instance.
Get-SSMInstanceAssociationsStatus -InstanceId "i-0000293ffd8c57862"
Output:
AssociationId : d8617c07-2079-4c18-9847-1655fc2698b0
DetailedStatus : Pending
DocumentVersion : 1
ErrorCode :
ExecutionDate : 2/20/2015 8:31:11 AM
ExecutionSummary : temp_status_change
InstanceId : i-0000293ffd8c57862
Name : AWS-UpdateSSMAgent
OutputUrl :
Status : Pending
Example 2: This example checks the instance association status for the given instance id and further, displays the execution status of those associations
Get-SSMInstanceAssociationsStatus -InstanceId i-012e3cb4df567e8aa | ForEach-Object {Get-SSMAssociationExecution -AssociationId .AssociationId}
Output:
AssociationId : 512a34a5-c678-1234-1234-12345678db9e
AssociationVersion : 2
CreatedTime : 3/2/2019 8:53:29 AM
DetailedStatus :
ExecutionId : 512a34a5-c678-1234-1234-12345678db9e
LastExecutionDate : 1/1/0001 12:00:00 AM
ResourceCountByStatus : {Success=9}
Status : Success
For a complete list of Amazon SDK developer guides and code examples, see
Using this service with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.