ListAlertsCommand

Lists the alerts that are associated with a MediaTailor channel assembly resource.

Example Syntax

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

import { MediaTailorClient, ListAlertsCommand } from "@aws-sdk/client-mediatailor"; // ES Modules import
// const { MediaTailorClient, ListAlertsCommand } = require("@aws-sdk/client-mediatailor"); // CommonJS import
const client = new MediaTailorClient(config);
const input = { // ListAlertsRequest
  MaxResults: Number("int"),
  NextToken: "STRING_VALUE",
  ResourceArn: "STRING_VALUE", // required
};
const command = new ListAlertsCommand(input);
const response = await client.send(command);
// { // ListAlertsResponse
//   Items: [ // __listOfAlert
//     { // Alert
//       AlertCode: "STRING_VALUE", // required
//       AlertMessage: "STRING_VALUE", // required
//       LastModifiedTime: new Date("TIMESTAMP"), // required
//       RelatedResourceArns: [ // __listOf__string // required
//         "STRING_VALUE",
//       ],
//       ResourceArn: "STRING_VALUE", // required
//       Category: "SCHEDULING_ERROR" || "PLAYBACK_WARNING" || "INFO",
//     },
//   ],
//   NextToken: "STRING_VALUE",
// };

ListAlertsCommand Input

See ListAlertsCommandInput for more details

Parameter
Type
Description
ResourceArn
Required
string | undefined

The Amazon Resource Name (ARN) of the resource.

MaxResults
number | undefined

The maximum number of alerts that you want MediaTailor to return in response to the current request. If there are more than MaxResults alerts, use the value of NextToken in the response to get the next page of results.

NextToken
string | undefined

Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

ListAlertsCommand Output

See ListAlertsCommandOutput for details

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

A list of alerts that are associated with this resource.

NextToken
string | undefined

Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results.

Throws

Name
Fault
Details
MediaTailorServiceException
Base exception class for all service exceptions from MediaTailor service.