GetOpsSummary - AWS Systems Manager

GetOpsSummary

View a summary of OpsItems based on specified filters and aggregators.

Request Syntax

{ "Aggregators": [ { "Aggregators": [ "OpsAggregator" ], "AggregatorType": "string", "AttributeName": "string", "Filters": [ { "Key": "string", "Type": "string", "Values": [ "string" ] } ], "TypeName": "string", "Values": { "string" : "string" } } ], "Filters": [ { "Key": "string", "Type": "string", "Values": [ "string" ] } ], "MaxResults": number, "NextToken": "string", "ResultAttributes": [ { "TypeName": "string" } ], "SyncName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Aggregators

Optional aggregators that return counts of OpsItems based on one or more expressions.

Type: Array of OpsAggregator objects

Array Members: Minimum number of 1 item. Maximum number of 12 items.

Required: No

Filters

Optional filters used to scope down the returned OpsItems.

Type: Array of OpsFilter objects

Array Members: Minimum number of 1 item. Maximum number of 5 items.

Required: No

MaxResults

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

NextToken

A token to start the list. Use this token to get the next set of results.

Type: String

Required: No

ResultAttributes

The OpsItem data type to return.

Type: Array of OpsResultAttribute objects

Array Members: Minimum number of 1 item.

Required: No

SyncName

Specify the name of a resource data sync to get.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

Response Syntax

{ "Entities": [ { "Data": { "string" : { "CaptureTime": "string", "Content": [ { "string" : "string" } ] } }, "Id": "string" } ], "NextToken": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Entities

The list of aggregated and filtered OpsItems.

Type: Array of OpsEntity objects

NextToken

The token for the next set of items to return. Use this token to get the next set of results.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

InvalidAggregatorException

The specified aggregator is not valid for inventory groups. Verify that the aggregator uses a valid inventory type such as AWS:Application or AWS:InstanceInformation.

HTTP Status Code: 400

InvalidFilter

The filter name is not valid. Verify the you entered the correct name and try again.

HTTP Status Code: 400

InvalidNextToken

The specified token is not valid.

HTTP Status Code: 400

InvalidTypeNameException

The parameter type name is not valid.

HTTP Status Code: 400

ResourceDataSyncNotFoundException

The specified sync name was not found.

HTTP Status Code: 400

Example

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonSSM.GetOpsSummary Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/1.17.12 Python/3.6.8 Darwin/18.7.0 botocore/1.14.12 X-Amz-Date: 20200330T152044Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20200330/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 2

Sample Response

{ "Entities":[ { "Data":{ "AWS:OpsItem":{ "CaptureTime":"2020-02-26T05:59:57.430Z", "Content":[ { "AccountId":"111122223333", "Category":"Availability", "CreatedBy":"arn:aws:sts::111122223333:assumed-role/OpsCenterRole/af3935bb93783f02aeea51784EXAMPLE", "CreatedTime":"2020-02-26T07:18:37.193Z", "Description":"CloudWatch Event Rule SSMOpsItems-SSM-maintenance-window-execution-failed was triggered. Your SSM Maintenance Window execution has failed. See below for more details.", "LastModifiedBy":"arn:aws:sts::111122223333:assumed-role/OpsCenterRole/af3935bb93783f02aeea51784EXAMPLE", "LastModifiedTime":"2020-02-26T07:18:37.193Z", "Notifications":"", "OperationalData":"{\"/aws/resources\":{\"type\":\"SearchableString\",\"value\":\"[{\\\"arn\\\":\\\"arn:aws:ssm:us-east-2:111122223333:maintenancewindow/mw-0e357ebdc6EXAMPLE\\\"}]\"},\"/aws/dedup\":{\"type\":\"SearchableString\",\"value\":\"{\\\"dedupString\\\":\\\"SSMOpsItems-SSM-maintenance-window-execution-failed\\\"}\"}}", "OpsItemId":"oi-f99f2EXAMPLE", "RelatedItems":"", "Severity":"3", "Source":"SSM", "Status":"Open", "Title":"SSM Maintenance Window execution failed" } ] } }, "Id":"oi-f99f2EXAMPLE" },--truncated-- ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: