• AWS 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
AWS Systems Manager Change Manager availability change.
• The AWS 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 ListAssociationVersions with a CLI
The following code examples show how to use ListAssociationVersions.
- CLI
-
- AWS CLI
-
To list all versions of an association for a specific association ID
The following list-association-versions example lists all versions of the specified associations.
aws ssm list-association-versions \
--association-id "8dfe3659-4309-493a-8755-0123456789ab"
Output:
{
"AssociationVersions": [
{
"AssociationId": "8dfe3659-4309-493a-8755-0123456789ab",
"AssociationVersion": "1",
"CreatedDate": 1550505536.726,
"Name": "AWS-UpdateSSMAgent",
"Parameters": {
"allowDowngrade": [
"false"
],
"version": [
""
]
},
"Targets": [
{
"Key": "InstanceIds",
"Values": [
"i-1234567890abcdef0"
]
}
],
"ScheduleExpression": "cron(0 00 12 ? * SUN *)",
"AssociationName": "UpdateSSMAgent"
}
]
}
For more information, see Working with associations in Systems Manager in the AWS Systems Manager User Guide.
- PowerShell
-
- Tools for PowerShell V4
-
Example 1: This example retrieves all versions of the association provided.
Get-SSMAssociationVersionList -AssociationId 123a45a0-c678-9012-3456-78901234db5e
Output:
AssociationId : 123a45a0-c678-9012-3456-78901234db5e
AssociationName :
AssociationVersion : 2
ComplianceSeverity :
CreatedDate : 3/12/2019 9:21:01 AM
DocumentVersion :
MaxConcurrency :
MaxErrors :
Name : AWS-GatherSoftwareInventory
OutputLocation :
Parameters : {}
ScheduleExpression :
Targets : {InstanceIds}
AssociationId : 123a45a0-c678-9012-3456-78901234db5e
AssociationName : test-case-1234567890
AssociationVersion : 1
ComplianceSeverity :
CreatedDate : 3/2/2019 8:53:29 AM
DocumentVersion :
MaxConcurrency :
MaxErrors :
Name : AWS-GatherSoftwareInventory
OutputLocation :
Parameters : {}
ScheduleExpression : rate(30minutes)
Targets : {InstanceIds}
- Tools for PowerShell V5
-
Example 1: This example retrieves all versions of the association provided.
Get-SSMAssociationVersionList -AssociationId 123a45a0-c678-9012-3456-78901234db5e
Output:
AssociationId : 123a45a0-c678-9012-3456-78901234db5e
AssociationName :
AssociationVersion : 2
ComplianceSeverity :
CreatedDate : 3/12/2019 9:21:01 AM
DocumentVersion :
MaxConcurrency :
MaxErrors :
Name : AWS-GatherSoftwareInventory
OutputLocation :
Parameters : {}
ScheduleExpression :
Targets : {InstanceIds}
AssociationId : 123a45a0-c678-9012-3456-78901234db5e
AssociationName : test-case-1234567890
AssociationVersion : 1
ComplianceSeverity :
CreatedDate : 3/2/2019 8:53:29 AM
DocumentVersion :
MaxConcurrency :
MaxErrors :
Name : AWS-GatherSoftwareInventory
OutputLocation :
Parameters : {}
ScheduleExpression : rate(30minutes)
Targets : {InstanceIds}
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.