Viewing aggregated counts of change requests (command line)
You can view aggregated counts of change requests in Change Manager, a tool in Amazon Systems Manager, by using the GetOpsSummary API operation. This API operation can return counts for a single Amazon Web Services account in a single Amazon Web Services Region or for multiple accounts and multiple Regions.
Note
If you want to view aggregated counts of change requests for multiple Amazon Web Services accounts and multiple Amazon Web Services Regions, you must set up and configure a resource data sync. For more information, see Creating a resource data sync for Inventory.
The following procedure describes how to use the Amazon Command Line Interface (Amazon CLI) (on Linux, macOS, or Windows) to view aggregated counts of change requests.
To view aggregated counts of change requests
Install and configure the Amazon Command Line Interface (Amazon CLI), if you haven't already.
For information, see Installing or updating the latest version of the Amazon CLI.
-
Run one of the following commands.
Single account and Region
This command returns a count of all change requests for the Amazon Web Services account and Amazon Web Services Region for which your Amazon CLI session is configured.
The call returns information like the following.
{ "Entities": [ { "Data": { "AWS:OpsItem": { "Content": [ { "Count": "38", "Status": "Open" } ] } } } ] }
Multiple accounts and/or Regions
This command returns a count of all change requests for the Amazon Web Services accounts and Amazon Web Services Regions specified in the resource data sync.
The call returns information like the following.
{ "Entities": [ { "Data": { "AWS:OpsItem": { "Content": [ { "Count": "43", "Status": "Open" }, { "Count": "2", "Status": "Resolved" } ] } } } ] }
Multiple accounts and a specific Region
This command returns a count of all change requests for the Amazon Web Services accounts specified in the resource data sync. However, it only returns data from the Region specified in the command.
Multiple accounts and Regions with output grouped by Region
This command returns a count of all change requests for the Amazon Web Services accounts and Amazon Web Services Regions specified in the resource data sync. The output displays count information per Region.
The call returns information like the following.
{ "Entities": [ { "Data": { "AWS:OpsItem": { "Content": [ { "Count": "38", "SourceRegion": "us-east-1", "Status": "Open" }, { "Count": "4", "SourceRegion": "us-east-2", "Status": "Open" }, { "Count": "1", "SourceRegion": "us-west-1", "Status": "Open" }, { "Count": "2", "SourceRegion": "us-east-2", "Status": "Resolved" } ] } } } ] }
Multiple accounts and Regions with output grouped by accounts and Regions
This command returns a count of all change requests for the Amazon Web Services accounts and Amazon Web Services Regions specified in the resource data sync. The output groups the count information by accounts and Regions.
The call returns information like the following.
{ "Entities": [ { "Data": { "AWS:OpsItem": { "Content": [ { "Count": "38", "SourceAccountId": "123456789012", "SourceRegion": "us-east-1", "Status": "Open" }, { "Count": "4", "SourceAccountId": "111122223333", "SourceRegion": "us-east-2", "Status": "Open" }, { "Count": "1", "SourceAccountId": "111122223333", "SourceRegion": "us-west-1", "Status": "Open" }, { "Count": "2", "SourceAccountId": "444455556666", "SourceRegion": "us-east-2", "Status": "Resolved" }, { "Count": "1", "SourceAccountId": "222222222222", "SourceRegion": "us-east-1", "Status": "Open" } ] } } } ] }