ListOpsItemEventsCommand

Returns a list of all OpsItem events in the current Amazon Web Services Region and Amazon Web Services account. You can limit the results to events associated with specific OpsItems by specifying a filter.

Example Syntax

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

import { SSMClient, ListOpsItemEventsCommand } from "@aws-sdk/client-ssm"; // ES Modules import
// const { SSMClient, ListOpsItemEventsCommand } = require("@aws-sdk/client-ssm"); // CommonJS import
const client = new SSMClient(config);
const input = { // ListOpsItemEventsRequest
  Filters: [ // OpsItemEventFilters
    { // OpsItemEventFilter
      Key: "OpsItemId", // required
      Values: [ // OpsItemEventFilterValues // required
        "STRING_VALUE",
      ],
      Operator: "Equal", // required
    },
  ],
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
};
const command = new ListOpsItemEventsCommand(input);
const response = await client.send(command);
// { // ListOpsItemEventsResponse
//   NextToken: "STRING_VALUE",
//   Summaries: [ // OpsItemEventSummaries
//     { // OpsItemEventSummary
//       OpsItemId: "STRING_VALUE",
//       EventId: "STRING_VALUE",
//       Source: "STRING_VALUE",
//       DetailType: "STRING_VALUE",
//       Detail: "STRING_VALUE",
//       CreatedBy: { // OpsItemIdentity
//         Arn: "STRING_VALUE",
//       },
//       CreatedTime: new Date("TIMESTAMP"),
//     },
//   ],
// };

ListOpsItemEventsCommand Input

See ListOpsItemEventsCommandInput for more details

Parameter
Type
Description
Filters
OpsItemEventFilter[] | undefined

One or more OpsItem filters. Use a filter to return a more specific list of results.

MaxResults
number | undefined

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.

NextToken
string | undefined

A token to start the list. Use this token to get the next set of results.

ListOpsItemEventsCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
NextToken
string | undefined

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

Summaries
OpsItemEventSummary[] | undefined

A list of event information for the specified OpsItems.

Throws

Name
Fault
Details
InternalServerError
server

An error occurred on the server side.

OpsItemInvalidParameterException
client

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

OpsItemLimitExceededException
client

The request caused OpsItems to exceed one or more quotas.

OpsItemNotFoundException
client

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

SSMServiceException
Base exception class for all service exceptions from SSM service.