- 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.
DescribeAlarmCommand
Retrieves information about an alarm.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTEventsDataClient, DescribeAlarmCommand } from "@aws-sdk/client-iot-events-data"; // ES Modules import
// const { IoTEventsDataClient, DescribeAlarmCommand } = require("@aws-sdk/client-iot-events-data"); // CommonJS import
const client = new IoTEventsDataClient(config);
const input = { // DescribeAlarmRequest
alarmModelName: "STRING_VALUE", // required
keyValue: "STRING_VALUE",
};
const command = new DescribeAlarmCommand(input);
const response = await client.send(command);
// { // DescribeAlarmResponse
// alarm: { // Alarm
// alarmModelName: "STRING_VALUE",
// alarmModelVersion: "STRING_VALUE",
// keyValue: "STRING_VALUE",
// alarmState: { // AlarmState
// stateName: "DISABLED" || "NORMAL" || "ACTIVE" || "ACKNOWLEDGED" || "SNOOZE_DISABLED" || "LATCHED",
// ruleEvaluation: { // RuleEvaluation
// simpleRuleEvaluation: { // SimpleRuleEvaluation
// inputPropertyValue: "STRING_VALUE",
// operator: "GREATER" || "GREATER_OR_EQUAL" || "LESS" || "LESS_OR_EQUAL" || "EQUAL" || "NOT_EQUAL",
// thresholdValue: "STRING_VALUE",
// },
// },
// customerAction: { // CustomerAction
// actionName: "SNOOZE" || "ENABLE" || "DISABLE" || "ACKNOWLEDGE" || "RESET",
// snoozeActionConfiguration: { // SnoozeActionConfiguration
// snoozeDuration: Number("int"),
// note: "STRING_VALUE",
// },
// enableActionConfiguration: { // EnableActionConfiguration
// note: "STRING_VALUE",
// },
// disableActionConfiguration: { // DisableActionConfiguration
// note: "STRING_VALUE",
// },
// acknowledgeActionConfiguration: { // AcknowledgeActionConfiguration
// note: "STRING_VALUE",
// },
// resetActionConfiguration: { // ResetActionConfiguration
// note: "STRING_VALUE",
// },
// },
// systemEvent: { // SystemEvent
// eventType: "STATE_CHANGE",
// stateChangeConfiguration: { // StateChangeConfiguration
// triggerType: "SNOOZE_TIMEOUT",
// },
// },
// },
// severity: Number("int"),
// creationTime: new Date("TIMESTAMP"),
// lastUpdateTime: new Date("TIMESTAMP"),
// },
// };
DescribeAlarmCommand Input
See DescribeAlarmCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
alarmModelName Required | string | undefined | The name of the alarm model. |
keyValue | string | undefined | The value of the key used as a filter to select only the alarms associated with the key . |
DescribeAlarmCommand Output
See DescribeAlarmCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
alarm | Alarm | undefined | Contains information about an alarm. |
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. |
IoTEventsDataServiceException | Base exception class for all service exceptions from IoTEventsData service. |