ListRelatedItemsCommand

List all related items for an incident record.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { SSMIncidentsClient, ListRelatedItemsCommand } from "@aws-sdk/client-ssm-incidents"; // ES Modules import
// const { SSMIncidentsClient, ListRelatedItemsCommand } = require("@aws-sdk/client-ssm-incidents"); // CommonJS import
const client = new SSMIncidentsClient(config);
const input = { // ListRelatedItemsInput
  incidentRecordArn: "STRING_VALUE", // required
  maxResults: Number("int"),
  nextToken: "STRING_VALUE",
};
const command = new ListRelatedItemsCommand(input);
const response = await client.send(command);
// { // ListRelatedItemsOutput
//   relatedItems: [ // RelatedItemList // required
//     { // RelatedItem
//       identifier: { // ItemIdentifier
//         value: { // ItemValue Union: only one key present
//           arn: "STRING_VALUE",
//           url: "STRING_VALUE",
//           metricDefinition: "STRING_VALUE",
//           pagerDutyIncidentDetail: { // PagerDutyIncidentDetail
//             id: "STRING_VALUE", // required
//             autoResolve: true || false,
//             secretId: "STRING_VALUE",
//           },
//         },
//         type: "STRING_VALUE", // required
//       },
//       title: "STRING_VALUE",
//       generatedId: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListRelatedItemsCommand Input

See ListRelatedItemsCommandInput for more details

Parameter
Type
Description
incidentRecordArn
Required
string | undefined

The Amazon Resource Name (ARN) of the incident record containing the listed related items.

maxResults
number | undefined

The maximum number of related items per page.

nextToken
string | undefined

The pagination token for the next set of items to return. (You received this token from a previous call.)

ListRelatedItemsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
relatedItems
Required
RelatedItem[] | undefined

Details about each related item.

nextToken
string | undefined

The pagination token to use when requesting the next set of items. If there are no additional items to return, the string is null.

Throws

Name
Fault
Details
AccessDeniedException
client

You don't have sufficient access to perform this operation.

InternalServerException
server

The request processing has failed because of an unknown error, exception or failure.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by an Amazon Web Services service.

SSMIncidentsServiceException
Base exception class for all service exceptions from SSMIncidents service.