AssociateOpsItemRelatedItem - AWS Systems Manager


Associates a related item to a Systems Manager OpsCenter OpsItem. For example, you can associate an Incident Manager incident or analysis with an OpsItem. Incident Manager and OpsCenter are capabilities of AWS Systems Manager.

Request Syntax

{ "AssociationType": "string", "OpsItemId": "string", "ResourceType": "string", "ResourceUri": "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.


The type of association that you want to create between an OpsItem and a resource. OpsCenter supports IsParentOf and RelatesTo association types.

Type: String

Required: Yes


The ID of the OpsItem to which you want to associate a resource as a related item.

Type: String

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

Required: Yes


The type of resource that you want to associate with an OpsItem. OpsCenter supports the following types:

AWS::SSMIncidents::IncidentRecord: an Incident Manager incident.

AWS::SSM::Document: a Systems Manager (SSM) document.

Type: String

Required: Yes


The Amazon Resource Name (ARN) of the AWS resource that you want to associate with the OpsItem.

Type: String

Required: Yes

Response Syntax

{ "AssociationId": "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.


The association ID.

Type: String


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


An error occurred on the server side.

HTTP Status Code: 500


The specified OpsItem is in the process of being deleted.

HTTP Status Code: 400


A specified parameter argument isn't valid. Verify the available arguments and try again.

HTTP Status Code: 400


The request caused OpsItems to exceed one or more quotas.

HTTP Status Code: 400


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

HTTP Status Code: 400


The Amazon Resource Name (ARN) is already associated with the OpsItem.

HTTP Status Code: 400



This example illustrates one usage of AssociateOpsItemRelatedItem.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity X-Amz-Target: AmazonSSM.AssociateOpsItemRelatedItem Content-Type: application/x-amz-json-1.1 User-Agent: aws-cli/2.2.4 Python/3.8.8 Linux/5.4.129-72.229.amzn2int.x86_64 exe/x86_64.amzn.2 prompt/off command/ssm.associate-ops-item-related-item X-Amz-Date: 20210804T181929Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20210804/us-east-1/ssm/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=39c3b3042cd2aEXAMPLE Content-Length: 229 { "OpsItemId": "oi-649fExample", "AssociationType": "RelatesTo", "ResourceType": "AWS::SSMIncidents::IncidentRecord", "ResourceUri": "arn:aws:ssm-incidents::111122223333:incident-record/Test/c6bd8931-efae-a4ff-7f98-4490Example" }

Sample Response

{ "AssociationId": "61d7178d-a30d-4bc5-9b4e-a9e74EXAMPLE" }

See Also

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