ListAlarmModelsCommand

Lists the alarm models that you created. The operation returns only the metadata associated with each alarm model.

Example Syntax

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

import { IoTEventsClient, ListAlarmModelsCommand } from "@aws-sdk/client-iot-events"; // ES Modules import
// const { IoTEventsClient, ListAlarmModelsCommand } = require("@aws-sdk/client-iot-events"); // CommonJS import
const client = new IoTEventsClient(config);
const input = { // ListAlarmModelsRequest
  nextToken: "STRING_VALUE",
  maxResults: Number("int"),
};
const command = new ListAlarmModelsCommand(input);
const response = await client.send(command);
// { // ListAlarmModelsResponse
//   alarmModelSummaries: [ // AlarmModelSummaries
//     { // AlarmModelSummary
//       creationTime: new Date("TIMESTAMP"),
//       alarmModelDescription: "STRING_VALUE",
//       alarmModelName: "STRING_VALUE",
//     },
//   ],
//   nextToken: "STRING_VALUE",
// };

ListAlarmModelsCommand Input

See ListAlarmModelsCommandInput for more details

Parameter
Type
Description
maxResults
number | undefined

The maximum number of results to be returned per request.

nextToken
string | undefined

The token that you can use to return the next set of results.

ListAlarmModelsCommand Output

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

A list that summarizes each alarm model.

nextToken
string | undefined

The token that you can use to return the next set of results, or null if there are no more results.

Throws

Name
Fault
Details
InternalFailureException
server

An internal failure occurred.

InvalidRequestException
client

The request was invalid.

ServiceUnavailableException
server

The service is currently unavailable.

ThrottlingException
client

The request could not be completed due to throttling.

IoTEventsServiceException
Base exception class for all service exceptions from IoTEvents service.