GetOpsItem - Amazon Systems Manager
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).

GetOpsItem

Get information about an OpsItem by using the ID. You must have permission in Amazon Identity and Access Management (IAM) to view information about an OpsItem. For more information, see Set up OpsCenter in the Amazon Systems Manager User Guide.

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

Request Syntax

{ "OpsItemArn": "string", "OpsItemId": "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.

OpsItemArn

The OpsItem Amazon Resource Name (ARN).

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:(aws[a-zA-Z-]*)?:ssm:[a-z0-9-\.]{0,63}:[0-9]{12}:opsitem.*

Required: No

OpsItemId

The ID of the OpsItem that you want to get.

Type: String

Pattern: ^(oi)-[0-9a-f]{12}$

Required: Yes

Response Syntax

{ "OpsItem": { "ActualEndTime": number, "ActualStartTime": number, "Category": "string", "CreatedBy": "string", "CreatedTime": number, "Description": "string", "LastModifiedBy": "string", "LastModifiedTime": number, "Notifications": [ { "Arn": "string" } ], "OperationalData": { "string" : { "Type": "string", "Value": "string" } }, "OpsItemArn": "string", "OpsItemId": "string", "OpsItemType": "string", "PlannedEndTime": number, "PlannedStartTime": number, "Priority": number, "RelatedOpsItems": [ { "OpsItemId": "string" } ], "Severity": "string", "Source": "string", "Status": "string", "Title": "string", "Version": "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.

OpsItem

The OpsItem.

Type: OpsItem object

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

OpsItemAccessDeniedException

You don't have permission to view OpsItems in the specified account. Verify that your account is configured either as a Systems Manager delegated administrator or that you are logged into the Amazon Organizations management account.

HTTP Status Code: 400

OpsItemNotFoundException

The specified OpsItem ID doesn't exist. Verify the ID and try again.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of GetOpsItem.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-2.amazonaws.com Accept-Encoding: identity X-Amz-Target: AmazonSSM.GetOpsItem 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: 20200330T153712Z 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: 32 { "OpsItemId": "oi-f99f2EXAMPLE" }

Sample Response

{ "OpsItem": { "Category": "Availability", "CreatedBy": "arn:aws:sts::111122223333:assumed-role/OpsCenterRole/af3935bb93783f02aeea51784EXAMPLE", "CreatedTime": 1582701517.193, "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": 1582701517.193, "Notifications": [], "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\"}]" }, "window-execution-id": { "Type": "String", "Value": "e79e904b-0e42-43b8-a83d-b2aedEXAMPLE" }, "window-id": { "Type": "String", "Value": "mw-0e357ebdc6EXAMPLE" } }, "OpsItemId": "oi-f99f2EXAMPLE", "RelatedOpsItems": [], "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 Amazon SDKs, see the following: