Class CfnAlarmModel.AlarmActionProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarmModel.AlarmActionProperty>
- Enclosing interface:
CfnAlarmModel.AlarmActionProperty
CfnAlarmModel.AlarmActionProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.dynamoDb
(IResolvable dynamoDb) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDb()
dynamoDb
(CfnAlarmModel.DynamoDBProperty dynamoDb) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDb()
dynamoDBv2
(IResolvable dynamoDBv2) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
dynamoDBv2
(CfnAlarmModel.DynamoDBv2Property dynamoDBv2) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
firehose
(IResolvable firehose) Sets the value ofCfnAlarmModel.AlarmActionProperty.getFirehose()
firehose
(CfnAlarmModel.FirehoseProperty firehose) Sets the value ofCfnAlarmModel.AlarmActionProperty.getFirehose()
iotEvents
(IResolvable iotEvents) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotEvents()
iotEvents
(CfnAlarmModel.IotEventsProperty iotEvents) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotEvents()
iotSiteWise
(IResolvable iotSiteWise) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotSiteWise()
iotSiteWise
(CfnAlarmModel.IotSiteWiseProperty iotSiteWise) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotSiteWise()
iotTopicPublish
(IResolvable iotTopicPublish) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
iotTopicPublish
(CfnAlarmModel.IotTopicPublishProperty iotTopicPublish) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
lambda
(IResolvable lambda) Sets the value ofCfnAlarmModel.AlarmActionProperty.getLambda()
lambda
(CfnAlarmModel.LambdaProperty lambda) Sets the value ofCfnAlarmModel.AlarmActionProperty.getLambda()
sns
(IResolvable sns) Sets the value ofCfnAlarmModel.AlarmActionProperty.getSns()
Sets the value ofCfnAlarmModel.AlarmActionProperty.getSns()
sqs
(IResolvable sqs) Sets the value ofCfnAlarmModel.AlarmActionProperty.getSqs()
Sets the value ofCfnAlarmModel.AlarmActionProperty.getSqs()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
dynamoDb
Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDb()
- Parameters:
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'
.- 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 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 thepayloadField
parameter is<payload-field>_raw
.- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
dynamoDb
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder dynamoDb(CfnAlarmModel.DynamoDBProperty dynamoDb) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDb()
- Parameters:
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'
.- 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 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 thepayloadField
parameter is<payload-field>_raw
.- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
dynamoDBv2
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder dynamoDBv2(IResolvable dynamoDBv2) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
- Parameters:
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'
.- 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 inPayload
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 in the AWS IoT Events Developer Guide .
The value for the
type
parameter inPayload
must beJSON
.- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
dynamoDBv2
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder dynamoDBv2(CfnAlarmModel.DynamoDBv2Property dynamoDBv2) Sets the value ofCfnAlarmModel.AlarmActionProperty.getDynamoDBv2()
- Parameters:
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'
.- 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 inPayload
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 in the AWS IoT Events Developer Guide .
The value for the
type
parameter inPayload
must beJSON
.- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
firehose
Sets the value ofCfnAlarmModel.AlarmActionProperty.getFirehose()
- Parameters:
firehose
- Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.- Returns:
this
-
firehose
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder firehose(CfnAlarmModel.FirehoseProperty firehose) Sets the value ofCfnAlarmModel.AlarmActionProperty.getFirehose()
- Parameters:
firehose
- Sends information about the detector model instance and the event that triggered the action to an Amazon Kinesis Data Firehose delivery stream.- Returns:
this
-
iotEvents
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotEvents(IResolvable iotEvents) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotEvents()
- Parameters:
iotEvents
- Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.- Returns:
this
-
iotEvents
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotEvents(CfnAlarmModel.IotEventsProperty iotEvents) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotEvents()
- Parameters:
iotEvents
- Sends an AWS IoT Events input, passing in information about the detector model instance and the event that triggered the action.- Returns:
this
-
iotSiteWise
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotSiteWise(IResolvable iotSiteWise) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotSiteWise()
- Parameters:
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 inIotSiteWiseAction
. 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 bothassetId
andpropertyId
to identify the target asset property in AWS IoT SiteWise .For more information, see Expressions in the AWS IoT Events Developer Guide .
- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
iotSiteWise
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotSiteWise(CfnAlarmModel.IotSiteWiseProperty iotSiteWise) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotSiteWise()
- Parameters:
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 inIotSiteWiseAction
. 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 bothassetId
andpropertyId
to identify the target asset property in AWS IoT SiteWise .For more information, see Expressions in the AWS IoT Events Developer Guide .
- For references, you must specify either variables or input values. For example, the value for the
- Returns:
this
-
iotTopicPublish
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotTopicPublish(IResolvable iotTopicPublish) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
- Parameters:
iotTopicPublish
- Information required to publish the MQTT message through the AWS IoT message broker.- Returns:
this
-
iotTopicPublish
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder iotTopicPublish(CfnAlarmModel.IotTopicPublishProperty iotTopicPublish) Sets the value ofCfnAlarmModel.AlarmActionProperty.getIotTopicPublish()
- Parameters:
iotTopicPublish
- Information required to publish the MQTT message through the AWS IoT message broker.- Returns:
this
-
lambda
Sets the value ofCfnAlarmModel.AlarmActionProperty.getLambda()
- Parameters:
lambda
- Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.- Returns:
this
-
lambda
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder lambda(CfnAlarmModel.LambdaProperty lambda) Sets the value ofCfnAlarmModel.AlarmActionProperty.getLambda()
- Parameters:
lambda
- Calls a Lambda function, passing in information about the detector model instance and the event that triggered the action.- Returns:
this
-
sns
Sets the value ofCfnAlarmModel.AlarmActionProperty.getSns()
- Parameters:
sns
- Information required to publish the Amazon SNS message.- Returns:
this
-
sns
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder sns(CfnAlarmModel.SnsProperty sns) Sets the value ofCfnAlarmModel.AlarmActionProperty.getSns()
- Parameters:
sns
- Information required to publish the Amazon SNS message.- Returns:
this
-
sqs
Sets the value ofCfnAlarmModel.AlarmActionProperty.getSqs()
- Parameters:
sqs
- Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.- Returns:
this
-
sqs
@Stability(Stable) public CfnAlarmModel.AlarmActionProperty.Builder sqs(CfnAlarmModel.SqsProperty sqs) Sets the value ofCfnAlarmModel.AlarmActionProperty.getSqs()
- Parameters:
sqs
- Sends information about the detector model instance and the event that triggered the action to an Amazon SQS queue.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAlarmModel.AlarmActionProperty>
- Returns:
- a new instance of
CfnAlarmModel.AlarmActionProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-