- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListAlarmModelVersionsCommand
Lists all the versions of an alarm model. The operation returns only the metadata associated with each alarm model version.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTEventsClient, ListAlarmModelVersionsCommand } from "@aws-sdk/client-iot-events"; // ES Modules import
// const { IoTEventsClient, ListAlarmModelVersionsCommand } = require("@aws-sdk/client-iot-events"); // CommonJS import
const client = new IoTEventsClient(config);
const input = { // ListAlarmModelVersionsRequest
alarmModelName: "STRING_VALUE", // required
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListAlarmModelVersionsCommand(input);
const response = await client.send(command);
// { // ListAlarmModelVersionsResponse
// alarmModelVersionSummaries: [ // AlarmModelVersionSummaries
// { // AlarmModelVersionSummary
// alarmModelName: "STRING_VALUE",
// alarmModelArn: "STRING_VALUE",
// alarmModelVersion: "STRING_VALUE",
// roleArn: "STRING_VALUE",
// creationTime: new Date("TIMESTAMP"),
// lastUpdateTime: new Date("TIMESTAMP"),
// status: "ACTIVE" || "ACTIVATING" || "INACTIVE" || "FAILED",
// statusMessage: "STRING_VALUE",
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListAlarmModelVersionsCommand Input
See ListAlarmModelVersionsCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
alarmModelName Required | string | undefined | The name of the alarm model. |
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. |
ListAlarmModelVersionsCommand Output
See ListAlarmModelVersionsCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
alarmModelVersionSummaries | AlarmModelVersionSummary[] | undefined | A list that summarizes each alarm model version. |
nextToken | string | undefined | The token that you can use to return the next set of results, or |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalFailureException | server | An internal failure occurred. |
InvalidRequestException | client | The request was invalid. |
ResourceNotFoundException | client | The resource was not found. |
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. |