aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
825 lines • 119 kB
TypeScript
import * as cdk from "../../core";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
/**
* Represents an alarm model to monitor an AWS IoT Events input attribute.
*
* You can use the alarm to get notified when the value is outside a specified range. For more information, see [Create an alarm model](https://docs.aws.amazon.com/iotevents/latest/developerguide/create-alarms.html) in the *AWS IoT Events Developer Guide* .
*
* @cloudformationResource AWS::IoTEvents::AlarmModel
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-alarmmodel.html
*/
export declare class CfnAlarmModel extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnAlarmModel from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAlarmModel;
/**
* Contains the configuration information of alarm state changes.
*/
alarmCapabilities?: CfnAlarmModel.AlarmCapabilitiesProperty | cdk.IResolvable;
/**
* Contains information about one or more alarm actions.
*/
alarmEventActions?: CfnAlarmModel.AlarmEventActionsProperty | cdk.IResolvable;
/**
* The description of the alarm model.
*/
alarmModelDescription?: string;
/**
* The name of the alarm model.
*/
alarmModelName?: string;
/**
* Defines when your alarm is invoked.
*/
alarmRule: CfnAlarmModel.AlarmRuleProperty | cdk.IResolvable;
/**
* An input attribute used as a key to create an alarm.
*/
key?: string;
/**
* The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.
*/
roleArn: string;
/**
* A non-negative integer that reflects the severity level of the alarm.
*/
severity?: number;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* A list of key-value pairs that contain metadata for the alarm model.
*/
tagsRaw?: Array<cdk.CfnTag>;
/**
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnAlarmModelProps);
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnAlarmModel {
/**
* Defines when your alarm is invoked.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmrule.html
*/
interface AlarmRuleProperty {
/**
* A rule that compares an input property value to a threshold value with a comparison operator.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmrule.html#cfn-iotevents-alarmmodel-alarmrule-simplerule
*/
readonly simpleRule?: cdk.IResolvable | CfnAlarmModel.SimpleRuleProperty;
}
/**
* A rule that compares an input property value to a threshold value with a comparison operator.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-simplerule.html
*/
interface SimpleRuleProperty {
/**
* The comparison operator.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-simplerule.html#cfn-iotevents-alarmmodel-simplerule-comparisonoperator
*/
readonly comparisonOperator: string;
/**
* The value on the left side of the comparison operator.
*
* You can specify an AWS IoT Events input attribute as an input property.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-simplerule.html#cfn-iotevents-alarmmodel-simplerule-inputproperty
*/
readonly inputProperty: string;
/**
* The value on the right side of the comparison operator.
*
* You can enter a number or specify an AWS IoT Events input attribute.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-simplerule.html#cfn-iotevents-alarmmodel-simplerule-threshold
*/
readonly threshold: string;
}
/**
* Contains the configuration information of alarm state changes.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmcapabilities.html
*/
interface AlarmCapabilitiesProperty {
/**
* Specifies whether to get notified for alarm state changes.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmcapabilities.html#cfn-iotevents-alarmmodel-alarmcapabilities-acknowledgeflow
*/
readonly acknowledgeFlow?: CfnAlarmModel.AcknowledgeFlowProperty | cdk.IResolvable;
/**
* Specifies the default alarm state.
*
* The configuration applies to all alarms that were created based on this alarm model.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmcapabilities.html#cfn-iotevents-alarmmodel-alarmcapabilities-initializationconfiguration
*/
readonly initializationConfiguration?: CfnAlarmModel.InitializationConfigurationProperty | cdk.IResolvable;
}
/**
* Specifies whether to get notified for alarm state changes.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-acknowledgeflow.html
*/
interface AcknowledgeFlowProperty {
/**
* The value must be `TRUE` or `FALSE` .
*
* If `TRUE` , you receive a notification when the alarm state changes. You must choose to acknowledge the notification before the alarm state can return to `NORMAL` . If `FALSE` , you won't receive notifications. The alarm automatically changes to the `NORMAL` state when the input property value returns to the specified range.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-acknowledgeflow.html#cfn-iotevents-alarmmodel-acknowledgeflow-enabled
*/
readonly enabled?: boolean | cdk.IResolvable;
}
/**
* Specifies the default alarm state.
*
* The configuration applies to all alarms that were created based on this alarm model.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-initializationconfiguration.html
*/
interface InitializationConfigurationProperty {
/**
* The value must be `TRUE` or `FALSE` .
*
* If `FALSE` , all alarm instances created based on the alarm model are activated. The default value is `TRUE` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-initializationconfiguration.html#cfn-iotevents-alarmmodel-initializationconfiguration-disabledoninitialization
*/
readonly disabledOnInitialization: boolean | cdk.IResolvable;
}
/**
* Contains information about one or more alarm actions.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmeventactions.html
*/
interface AlarmEventActionsProperty {
/**
* Specifies one or more supported actions to receive notifications when the alarm state changes.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmeventactions.html#cfn-iotevents-alarmmodel-alarmeventactions-alarmactions
*/
readonly alarmActions?: Array<CfnAlarmModel.AlarmActionProperty | cdk.IResolvable> | cdk.IResolvable;
}
/**
* Specifies one of the following actions to receive notifications when the alarm state changes.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html
*/
interface AlarmActionProperty {
/**
* Defines an action to write to the Amazon DynamoDB table that you created.
*
* The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
*
* You must use expressions for all parameters in `DynamoDBAction` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `hashKeyType` parameter can be `'STRING'` .
* - For references, you must specify either variables or input values. For example, the value for the `hashKeyField` parameter can be `$input.GreenhouseInput.name` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `hashKeyValue` parameter uses a substitution template.
*
* `'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'`
* - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `tableName` parameter uses a string concatenation.
*
* `'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* If the defined payload type is a string, `DynamoDBAction` writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the `payloadField` parameter is `<payload-field>_raw` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-dynamodb
*/
readonly dynamoDb?: CfnAlarmModel.DynamoDBProperty | cdk.IResolvable;
/**
* Defines an action to write to the Amazon DynamoDB table that you created.
*
* The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
*
* You must use expressions for all parameters in `DynamoDBv2Action` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `tableName` parameter can be `'GreenhouseTemperatureTable'` .
* - For references, you must specify either variables or input values. For example, the value for the `tableName` parameter can be `$variable.ddbtableName` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `contentExpression` parameter in `Payload` uses a substitution template.
*
* `'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'`
* - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `tableName` parameter uses a string concatenation.
*
* `'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* The value for the `type` parameter in `Payload` must be `JSON` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-dynamodbv2
*/
readonly dynamoDBv2?: CfnAlarmModel.DynamoDBv2Property | cdk.IResolvable;
/**
* Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-firehose
*/
readonly firehose?: CfnAlarmModel.FirehoseProperty | cdk.IResolvable;
/**
* Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iotevents
*/
readonly iotEvents?: CfnAlarmModel.IotEventsProperty | cdk.IResolvable;
/**
* Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .
*
* You must use expressions for all parameters in `IotSiteWiseAction` . The expressions accept literals, operators, functions, references, and substitutions templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `propertyAlias` parameter can be `'/company/windfarm/3/turbine/7/temperature'` .
* - For references, you must specify either variables or input values. For example, the value for the `assetId` parameter can be `$input.TurbineInput.assetId1` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `propertyAlias` parameter uses a substitution template.
*
* `'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'`
*
* You must specify either `propertyAlias` or both `assetId` and `propertyId` to identify the target asset property in AWS IoT SiteWise .
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iotsitewise
*/
readonly iotSiteWise?: CfnAlarmModel.IotSiteWiseProperty | cdk.IResolvable;
/**
* Information required to publish the MQTT message through the AWS IoT message broker.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-iottopicpublish
*/
readonly iotTopicPublish?: CfnAlarmModel.IotTopicPublishProperty | cdk.IResolvable;
/**
* Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-lambda
*/
readonly lambda?: cdk.IResolvable | CfnAlarmModel.LambdaProperty;
/**
* Information required to publish the Amazon SNS message.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-sns
*/
readonly sns?: cdk.IResolvable | CfnAlarmModel.SnsProperty;
/**
* Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-alarmaction.html#cfn-iotevents-alarmmodel-alarmaction-sqs
*/
readonly sqs?: cdk.IResolvable | CfnAlarmModel.SqsProperty;
}
/**
* Defines an action to write to the Amazon DynamoDB table that you created.
*
* The default action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . A separate column of the DynamoDB table receives one attribute-value pair in the payload that you specify.
*
* You must use expressions for all parameters in `DynamoDBv2Action` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `tableName` parameter can be `'GreenhouseTemperatureTable'` .
* - For references, you must specify either variables or input values. For example, the value for the `tableName` parameter can be `$variable.ddbtableName` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `contentExpression` parameter in `Payload` uses a substitution template.
*
* `'{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}'`
* - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `tableName` parameter uses a string concatenation.
*
* `'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* The value for the `type` parameter in `Payload` must be `JSON` .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodbv2.html
*/
interface DynamoDBv2Property {
/**
* Information needed to configure the payload.
*
* By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use `contentExpression` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodbv2.html#cfn-iotevents-alarmmodel-dynamodbv2-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
/**
* The name of the DynamoDB table.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodbv2.html#cfn-iotevents-alarmmodel-dynamodbv2-tablename
*/
readonly tableName: string;
}
/**
* Information needed to configure the payload.
*
* By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use `contentExpression` .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-payload.html
*/
interface PayloadProperty {
/**
* The content of the payload.
*
* You can use a string expression that includes quoted strings ( `'<string>'` ), variables ( `$variable.<variable-name>` ), input values ( `$input.<input-name>.<path-to-datum>` ), string concatenations, and quoted strings that contain `${}` as the content. The recommended maximum size of a content expression is 1 KB.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-payload.html#cfn-iotevents-alarmmodel-payload-contentexpression
*/
readonly contentExpression: string;
/**
* The value of the payload type can be either `STRING` or `JSON` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-payload.html#cfn-iotevents-alarmmodel-payload-type
*/
readonly type: string;
}
/**
* Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotevents.html
*/
interface IotEventsProperty {
/**
* The name of the AWS IoT Events input where the data is sent.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotevents.html#cfn-iotevents-alarmmodel-iotevents-inputname
*/
readonly inputName: string;
/**
* You can configure the action payload when you send a message to an AWS IoT Events input.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotevents.html#cfn-iotevents-alarmmodel-iotevents-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
}
/**
* Sends information about the detector model instance and the event that triggered the action to a specified asset property in AWS IoT SiteWise .
*
* You must use expressions for all parameters in `IotSiteWiseAction` . The expressions accept literals, operators, functions, references, and substitutions templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `propertyAlias` parameter can be `'/company/windfarm/3/turbine/7/temperature'` .
* - For references, you must specify either variables or input values. For example, the value for the `assetId` parameter can be `$input.TurbineInput.assetId1` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `propertyAlias` parameter uses a substitution template.
*
* `'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ ${$input.TemperatureInput.sensorData.turbineID}/temperature'`
*
* You must specify either `propertyAlias` or both `assetId` and `propertyId` to identify the target asset property in AWS IoT SiteWise .
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html
*/
interface IotSiteWiseProperty {
/**
* The ID of the asset that has the specified property.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html#cfn-iotevents-alarmmodel-iotsitewise-assetid
*/
readonly assetId?: string;
/**
* A unique identifier for this entry.
*
* You can use the entry ID to track which data entry causes an error in case of failure. The default is a new unique identifier.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html#cfn-iotevents-alarmmodel-iotsitewise-entryid
*/
readonly entryId?: string;
/**
* The alias of the asset property.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html#cfn-iotevents-alarmmodel-iotsitewise-propertyalias
*/
readonly propertyAlias?: string;
/**
* The ID of the asset property.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html#cfn-iotevents-alarmmodel-iotsitewise-propertyid
*/
readonly propertyId?: string;
/**
* The value to send to the asset property.
*
* This value contains timestamp, quality, and value (TQV) information.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iotsitewise.html#cfn-iotevents-alarmmodel-iotsitewise-propertyvalue
*/
readonly propertyValue?: CfnAlarmModel.AssetPropertyValueProperty | cdk.IResolvable;
}
/**
* A structure that contains value information. For more information, see [AssetPropertyValue](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetPropertyValue.html) in the *AWS IoT SiteWise API Reference* .
*
* You must use expressions for all parameters in `AssetPropertyValue` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `quality` parameter can be `'GOOD'` .
* - For references, you must specify either variables or input values. For example, the value for the `quality` parameter can be `$input.TemperatureInput.sensorData.quality` .
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvalue.html
*/
interface AssetPropertyValueProperty {
/**
* The quality of the asset property value.
*
* The value must be `'GOOD'` , `'BAD'` , or `'UNCERTAIN'` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvalue.html#cfn-iotevents-alarmmodel-assetpropertyvalue-quality
*/
readonly quality?: string;
/**
* The timestamp associated with the asset property value.
*
* The default is the current event time.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvalue.html#cfn-iotevents-alarmmodel-assetpropertyvalue-timestamp
*/
readonly timestamp?: CfnAlarmModel.AssetPropertyTimestampProperty | cdk.IResolvable;
/**
* The value to send to an asset property.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvalue.html#cfn-iotevents-alarmmodel-assetpropertyvalue-value
*/
readonly value: CfnAlarmModel.AssetPropertyVariantProperty | cdk.IResolvable;
}
/**
* A structure that contains an asset property value.
*
* For more information, see [Variant](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_Variant.html) in the *AWS IoT SiteWise API Reference* .
*
* You must use expressions for all parameters in `AssetPropertyVariant` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `integerValue` parameter can be `'100'` .
* - For references, you must specify either variables or parameters. For example, the value for the `booleanValue` parameter can be `$variable.offline` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `doubleValue` parameter uses a substitution template.
*
* `'${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}'`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* You must specify one of the following value types, depending on the `dataType` of the specified asset property. For more information, see [AssetProperty](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetProperty.html) in the *AWS IoT SiteWise API Reference* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvariant.html
*/
interface AssetPropertyVariantProperty {
/**
* The asset property value is a Boolean value that must be `'TRUE'` or `'FALSE'` .
*
* You must use an expression, and the evaluated result should be a Boolean value.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvariant.html#cfn-iotevents-alarmmodel-assetpropertyvariant-booleanvalue
*/
readonly booleanValue?: string;
/**
* The asset property value is a double.
*
* You must use an expression, and the evaluated result should be a double.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvariant.html#cfn-iotevents-alarmmodel-assetpropertyvariant-doublevalue
*/
readonly doubleValue?: string;
/**
* The asset property value is an integer.
*
* You must use an expression, and the evaluated result should be an integer.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvariant.html#cfn-iotevents-alarmmodel-assetpropertyvariant-integervalue
*/
readonly integerValue?: string;
/**
* The asset property value is a string.
*
* You must use an expression, and the evaluated result should be a string.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertyvariant.html#cfn-iotevents-alarmmodel-assetpropertyvariant-stringvalue
*/
readonly stringValue?: string;
}
/**
* A structure that contains timestamp information. For more information, see [TimeInNanos](https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TimeInNanos.html) in the *AWS IoT SiteWise API Reference* .
*
* You must use expressions for all parameters in `AssetPropertyTimestamp` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `timeInSeconds` parameter can be `'1586400675'` .
* - For references, you must specify either variables or input values. For example, the value for the `offsetInNanos` parameter can be `$variable.time` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `timeInSeconds` parameter uses a substitution template.
*
* `'${$input.TemperatureInput.sensorData.timestamp / 1000}'`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertytimestamp.html
*/
interface AssetPropertyTimestampProperty {
/**
* The nanosecond offset converted from `timeInSeconds` .
*
* The valid range is between 0-999999999.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertytimestamp.html#cfn-iotevents-alarmmodel-assetpropertytimestamp-offsetinnanos
*/
readonly offsetInNanos?: string;
/**
* The timestamp, in seconds, in the Unix epoch format.
*
* The valid range is between 1-31556889864403199.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-assetpropertytimestamp.html#cfn-iotevents-alarmmodel-assetpropertytimestamp-timeinseconds
*/
readonly timeInSeconds: string;
}
/**
* Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sqs.html
*/
interface SqsProperty {
/**
* You can configure the action payload when you send a message to an Amazon SQS queue.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sqs.html#cfn-iotevents-alarmmodel-sqs-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
/**
* The URL of the SQS queue where the data is written.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sqs.html#cfn-iotevents-alarmmodel-sqs-queueurl
*/
readonly queueUrl: string;
/**
* Set this to TRUE if you want the data to be base-64 encoded before it is written to the queue.
*
* Otherwise, set this to FALSE.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sqs.html#cfn-iotevents-alarmmodel-sqs-usebase64
*/
readonly useBase64?: boolean | cdk.IResolvable;
}
/**
* Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-firehose.html
*/
interface FirehoseProperty {
/**
* The name of the Kinesis Data Firehose delivery stream where the data is written.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-firehose.html#cfn-iotevents-alarmmodel-firehose-deliverystreamname
*/
readonly deliveryStreamName: string;
/**
* You can configure the action payload when you send a message to an Amazon Data Firehose delivery stream.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-firehose.html#cfn-iotevents-alarmmodel-firehose-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
/**
* A character separator that is used to separate records written to the Kinesis Data Firehose delivery stream.
*
* Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-firehose.html#cfn-iotevents-alarmmodel-firehose-separator
*/
readonly separator?: string;
}
/**
* Defines an action to write to the Amazon DynamoDB table that you created.
*
* The standard action payload contains all the information about the detector model instance and the event that triggered the action. You can customize the [payload](https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html) . One column of the DynamoDB table receives all attribute-value pairs in the payload that you specify.
*
* You must use expressions for all parameters in `DynamoDBAction` . The expressions accept literals, operators, functions, references, and substitution templates.
*
* **Examples** - For literal values, the expressions must contain single quotes. For example, the value for the `hashKeyType` parameter can be `'STRING'` .
* - For references, you must specify either variables or input values. For example, the value for the `hashKeyField` parameter can be `$input.GreenhouseInput.name` .
* - For a substitution template, you must use `${}` , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `hashKeyValue` parameter uses a substitution template.
*
* `'${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit'`
* - For a string concatenation, you must use `+` . A string concatenation can also contain a combination of literals, operators, functions, references, and substitution templates.
*
* In the following example, the value for the `tableName` parameter uses a string concatenation.
*
* `'GreenhouseTemperatureTable ' + $input.GreenhouseInput.date`
*
* For more information, see [Expressions](https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) in the *AWS IoT Events Developer Guide* .
*
* If the defined payload type is a string, `DynamoDBAction` writes non-JSON data to the DynamoDB table as binary data. The DynamoDB console displays the data as Base64-encoded text. The value for the `payloadField` parameter is `<payload-field>_raw` .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html
*/
interface DynamoDBProperty {
/**
* The name of the hash key (also called the partition key).
*
* The `hashKeyField` value must match the partition key of the target DynamoDB table.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-hashkeyfield
*/
readonly hashKeyField: string;
/**
* The data type for the hash key (also called the partition key). You can specify the following values:.
*
* - `'STRING'` - The hash key is a string.
* - `'NUMBER'` - The hash key is a number.
*
* If you don't specify `hashKeyType` , the default value is `'STRING'` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-hashkeytype
*/
readonly hashKeyType?: string;
/**
* The value of the hash key (also called the partition key).
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-hashkeyvalue
*/
readonly hashKeyValue: string;
/**
* The type of operation to perform. You can specify the following values:.
*
* - `'INSERT'` - Insert data as a new item into the DynamoDB table. This item uses the specified hash key as a partition key. If you specified a range key, the item uses the range key as a sort key.
* - `'UPDATE'` - Update an existing item of the DynamoDB table with new data. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.
* - `'DELETE'` - Delete an existing item of the DynamoDB table. This item's partition key must match the specified hash key. If you specified a range key, the range key must match the item's sort key.
*
* If you don't specify this parameter, AWS IoT Events triggers the `'INSERT'` operation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-operation
*/
readonly operation?: string;
/**
* Information needed to configure the payload.
*
* By default, AWS IoT Events generates a standard payload in JSON for any action. This action payload contains all attribute-value pairs that have the information about the detector model instance and the event triggered the action. To configure the action payload, you can use `contentExpression` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
/**
* The name of the DynamoDB column that receives the action payload.
*
* If you don't specify this parameter, the name of the DynamoDB column is `payload` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-payloadfield
*/
readonly payloadField?: string;
/**
* The name of the range key (also called the sort key).
*
* The `rangeKeyField` value must match the sort key of the target DynamoDB table.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-rangekeyfield
*/
readonly rangeKeyField?: string;
/**
* The data type for the range key (also called the sort key), You can specify the following values:.
*
* - `'STRING'` - The range key is a string.
* - `'NUMBER'` - The range key is number.
*
* If you don't specify `rangeKeyField` , the default value is `'STRING'` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-rangekeytype
*/
readonly rangeKeyType?: string;
/**
* The value of the range key (also called the sort key).
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-rangekeyvalue
*/
readonly rangeKeyValue?: string;
/**
* The name of the DynamoDB table.
*
* The `tableName` value must match the table name of the target DynamoDB table.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-dynamodb.html#cfn-iotevents-alarmmodel-dynamodb-tablename
*/
readonly tableName: string;
}
/**
* Information required to publish the MQTT message through the AWS IoT message broker.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iottopicpublish.html
*/
interface IotTopicPublishProperty {
/**
* The MQTT topic of the message.
*
* You can use a string expression that includes variables ( `$variable.<variable-name>` ) and input values ( `$input.<input-name>.<path-to-datum>` ) as the topic string.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iottopicpublish.html#cfn-iotevents-alarmmodel-iottopicpublish-mqtttopic
*/
readonly mqttTopic: string;
/**
* You can configure the action payload when you publish a message to an AWS IoT Core topic.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-iottopicpublish.html#cfn-iotevents-alarmmodel-iottopicpublish-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
}
/**
* Information required to publish the Amazon SNS message.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sns.html
*/
interface SnsProperty {
/**
* You can configure the action payload when you send a message as an Amazon SNS push notification.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sns.html#cfn-iotevents-alarmmodel-sns-payload
*/
readonly payload?: cdk.IResolvable | CfnAlarmModel.PayloadProperty;
/**
* The ARN of the Amazon SNS target where the message is sent.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-sns.html#cfn-iotevents-alarmmodel-sns-targetarn
*/
readonly targetArn: string;
}
/**
* Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotevents-alarmmodel-lambda.h