public static final class CfnAlarmModel.AlarmActionProperty.Builder
extends java.lang.Object
CfnAlarmModel.AlarmActionProperty
Constructor and Description |
---|
Builder() |
public CfnAlarmModel.AlarmActionProperty.Builder dynamoDb(IResolvable dynamoDb)
CfnAlarmModel.AlarmActionProperty.getDynamoDb()
dynamoDb
- 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 . 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'
.
hashKeyField
parameter can be $input.GreenhouseInput.name
.${}
, 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'
+
. 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 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
.
this
public CfnAlarmModel.AlarmActionProperty.Builder dynamoDb(CfnAlarmModel.DynamoDBProperty dynamoDb)
CfnAlarmModel.AlarmActionProperty.getDynamoDb()
dynamoDb
- 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 . 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'
.
hashKeyField
parameter can be $input.GreenhouseInput.name
.${}
, 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'
+
. 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 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
.
this
public CfnAlarmModel.AlarmActionProperty.Builder dynamoDBv2(IResolvable dynamoDBv2)
CfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
dynamoDBv2
- 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 . 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'
.
tableName
parameter can be $variable.ddbtableName
.${}
, 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}\"}'
+
. 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 in the AWS IoT Events Developer Guide .
The value for the type
parameter in Payload
must be JSON
.
this
public CfnAlarmModel.AlarmActionProperty.Builder dynamoDBv2(CfnAlarmModel.DynamoDBv2Property dynamoDBv2)
CfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
dynamoDBv2
- 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 . 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'
.
tableName
parameter can be $variable.ddbtableName
.${}
, 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}\"}'
+
. 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 in the AWS IoT Events Developer Guide .
The value for the type
parameter in Payload
must be JSON
.
this
public CfnAlarmModel.AlarmActionProperty.Builder firehose(IResolvable firehose)
CfnAlarmModel.AlarmActionProperty.getFirehose()
firehose
- Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.this
public CfnAlarmModel.AlarmActionProperty.Builder firehose(CfnAlarmModel.FirehoseProperty firehose)
CfnAlarmModel.AlarmActionProperty.getFirehose()
firehose
- Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.this
public CfnAlarmModel.AlarmActionProperty.Builder iotEvents(IResolvable iotEvents)
CfnAlarmModel.AlarmActionProperty.getIotEvents()
iotEvents
- Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.this
public CfnAlarmModel.AlarmActionProperty.Builder iotEvents(CfnAlarmModel.IotEventsProperty iotEvents)
CfnAlarmModel.AlarmActionProperty.getIotEvents()
iotEvents
- Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.this
public CfnAlarmModel.AlarmActionProperty.Builder iotSiteWise(IResolvable iotSiteWise)
CfnAlarmModel.AlarmActionProperty.getIotSiteWise()
iotSiteWise
- 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'
.
assetId
parameter can be $input.TurbineInput.assetId1
.${}
, 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 in the AWS IoT Events Developer Guide .
this
public CfnAlarmModel.AlarmActionProperty.Builder iotSiteWise(CfnAlarmModel.IotSiteWiseProperty iotSiteWise)
CfnAlarmModel.AlarmActionProperty.getIotSiteWise()
iotSiteWise
- 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'
.
assetId
parameter can be $input.TurbineInput.assetId1
.${}
, 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 in the AWS IoT Events Developer Guide .
this
public CfnAlarmModel.AlarmActionProperty.Builder iotTopicPublish(IResolvable iotTopicPublish)
CfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
iotTopicPublish
- Information required to publish the MQTT message through the AWS IoT message broker.this
public CfnAlarmModel.AlarmActionProperty.Builder iotTopicPublish(CfnAlarmModel.IotTopicPublishProperty iotTopicPublish)
CfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
iotTopicPublish
- Information required to publish the MQTT message through the AWS IoT message broker.this
public CfnAlarmModel.AlarmActionProperty.Builder lambda(IResolvable lambda)
CfnAlarmModel.AlarmActionProperty.getLambda()
lambda
- Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.this
public CfnAlarmModel.AlarmActionProperty.Builder lambda(CfnAlarmModel.LambdaProperty lambda)
CfnAlarmModel.AlarmActionProperty.getLambda()
lambda
- Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.this
public CfnAlarmModel.AlarmActionProperty.Builder sns(IResolvable sns)
CfnAlarmModel.AlarmActionProperty.getSns()
sns
- `CfnAlarmModel.AlarmActionProperty.Sns`.this
public CfnAlarmModel.AlarmActionProperty.Builder sns(CfnAlarmModel.SnsProperty sns)
CfnAlarmModel.AlarmActionProperty.getSns()
sns
- `CfnAlarmModel.AlarmActionProperty.Sns`.this
public CfnAlarmModel.AlarmActionProperty.Builder sqs(IResolvable sqs)
CfnAlarmModel.AlarmActionProperty.getSqs()
sqs
- Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.this
public CfnAlarmModel.AlarmActionProperty.Builder sqs(CfnAlarmModel.SqsProperty sqs)
CfnAlarmModel.AlarmActionProperty.getSqs()
sqs
- Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.this
public CfnAlarmModel.AlarmActionProperty build()
CfnAlarmModel.AlarmActionProperty
java.lang.NullPointerException
- if any required attribute was not provided