DescribeOpsItems - AWS Systems Manager

DescribeOpsItems

Query a set of OpsItems. You must have permission in AWS Identity and Access Management (IAM) to query a list of OpsItems. For more information, see Set up OpsCenter in the AWS Systems Manager User Guide.

Operations engineers and IT professionals use AWS Systems Manager OpsCenter to view, investigate, and remediate operational issues impacting the performance and health of their AWS resources. For more information, see AWS Systems Manager OpsCenter in the AWS Systems Manager User Guide.

Request Syntax

{ "MaxResults": number, "NextToken": "string", "OpsItemFilters": [ { "Key": "string", "Operator": "string", "Values": [ "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.

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

OpsItemFilters

One or more filters to limit the response.

  • Key: CreatedTime

    Operations: GreaterThan, LessThan

  • Key: LastModifiedBy

    Operations: Contains, Equals

  • Key: LastModifiedTime

    Operations: GreaterThan, LessThan

  • Key: Priority

    Operations: Equals

  • Key: Source

    Operations: Contains, Equals

  • Key: Status

    Operations: Equals

  • Key: Title*

    Operations: Equals,Contains

  • Key: OperationalData**

    Operations: Equals

  • Key: OperationalDataKey

    Operations: Equals

  • Key: OperationalDataValue

    Operations: Equals, Contains

  • Key: OpsItemId

    Operations: Equals

  • Key: ResourceId

    Operations: Contains

  • Key: AutomationId

    Operations: Equals

  • Key: AccountId

    Operations: Equals

*The Equals operator for Title matches the first 100 characters. If you specify more than 100 characters, they system returns an error that the filter value exceeds the length limit.

**If you filter the response by using the OperationalData operator, specify a key-value pair by using the following JSON format: {"key":"key_name","value":"a_value"}

Type: Array of OpsItemFilter objects

Required: No

Response Syntax

{ "NextToken": "string", "OpsItemSummaries": [ { "ActualEndTime": number, "ActualStartTime": number, "Category": "string", "CreatedBy": "string", "CreatedTime": number, "LastModifiedBy": "string", "LastModifiedTime": number, "OperationalData": { "string" : { "Type": "string", "Value": "string" } }, "OpsItemId": "string", "OpsItemType": "string", "PlannedEndTime": number, "PlannedStartTime": number, "Priority": number, "Severity": "string", "Source": "string", "Status": "string", "Title": "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.

NextToken

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

Type: String

OpsItemSummaries

A list of OpsItems.

Type: Array of OpsItemSummary objects

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

Examples

Example

This example illustrates one usage of DescribeOpsItems.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonSSM.DescribeOpsItems 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: 20240401T163154Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240401/us-east-2/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 80 { "OpsItemFilters": [ { "Key": "Status", "Values": [ "Open" ], "Operator": "Equal" } ] }

Sample Response

{ "OpsItemSummaries": [ { "CreatedBy": "arn:aws:iam::111122223333:user/example", "CreatedTime": 1585757579.218, "LastModifiedBy": "arn:aws:iam::111122223333:user/example", "LastModifiedTime": 1585757579.218, "OpsItemId": "oi-1f050EXAMPLE", "Source": "SSM", "Status": "Open", "Title": "DocumentDeleted" }, { "Category": "Availability", "CreatedBy": "arn:aws:sts::111122223333:assumed-role/OpsCenterRole/af3935bb93783f02aeea51784EXAMPLE", "CreatedTime": 1582701517.193, "LastModifiedBy": "arn:aws:sts::111122223333:assumed-role/OpsCenterRole/af3935bb93783f02aeea51784EXAMPLE", "LastModifiedTime": 1582701517.193, "OperationalData": { "/aws/dedup": { "Type": "SearchableString", "Value": "{\"dedupString\":\"SSMOpsItems-SSM-maintenance-window-execution-failed\"}" }, "/aws/resources": { "Type": "SearchableString", "Value": "[{\"arn\":\"arn:aws:ssm:us-east-2:111122223333:maintenancewindow/mw-0e357ebdc6EXAMPLE\"}]" } }, "OpsItemId": "oi-f99f2EXAMPLE", "Severity": "3", "Source": "SSM", "Status": "Open", "Title": "SSM Maintenance Window execution failed" } ] }

See Also

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