选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

AssociateOpsItemRelatedItem - AWS Systems Manager
此页面尚未翻译为您的语言。 请求翻译

AssociateOpsItemRelatedItem

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 tools in 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.

AssociationType

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

OpsItemId

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

ResourceType

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

ResourceUri

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.

AssociationId

The association ID.

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

OpsItemConflictException

The specified OpsItem is in the process of being deleted.

HTTP Status Code: 400

OpsItemInvalidParameterException

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

HTTP Status Code: 400

OpsItemLimitExceededException

The request caused OpsItems to exceed one or more quotas.

HTTP Status Code: 400

OpsItemNotFoundException

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

HTTP Status Code: 400

OpsItemRelatedItemAlreadyExistsException

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

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of AssociateOpsItemRelatedItem.

Sample Request

POST / HTTP/1.1 Host: ssm.us-east-1.amazonaws.com 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: 20240804T181929Z Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20240804/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:

隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。