Class CfnAlarmModel.DynamoDBProperty.Builder
java.lang.Object
software.amazon.awscdk.services.iotevents.CfnAlarmModel.DynamoDBProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnAlarmModel.DynamoDBProperty>
- Enclosing interface:
CfnAlarmModel.DynamoDBProperty
@Stability(Stable)
public static final class CfnAlarmModel.DynamoDBProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnAlarmModel.DynamoDBProperty>
A builder for
CfnAlarmModel.DynamoDBProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.hashKeyField
(String hashKeyField) Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyField()
hashKeyType
(String hashKeyType) Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyType()
hashKeyValue
(String hashKeyValue) Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyValue()
Sets the value ofCfnAlarmModel.DynamoDBProperty.getOperation()
payload
(IResolvable payload) Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayload()
payload
(CfnAlarmModel.PayloadProperty payload) Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayload()
payloadField
(String payloadField) Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayloadField()
rangeKeyField
(String rangeKeyField) Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyField()
rangeKeyType
(String rangeKeyType) Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyType()
rangeKeyValue
(String rangeKeyValue) Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyValue()
Sets the value ofCfnAlarmModel.DynamoDBProperty.getTableName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
hashKeyField
Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyField()
- Parameters:
hashKeyField
- The name of the hash key (also called the partition key). This parameter is required. ThehashKeyField
value must match the partition key of the target DynamoDB table.- Returns:
this
-
hashKeyValue
Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyValue()
- Parameters:
hashKeyValue
- The value of the hash key (also called the partition key). This parameter is required.- Returns:
this
-
tableName
Sets the value ofCfnAlarmModel.DynamoDBProperty.getTableName()
- Parameters:
tableName
- The name of the DynamoDB table. This parameter is required. ThetableName
value must match the table name of the target DynamoDB table.- Returns:
this
-
hashKeyType
Sets the value ofCfnAlarmModel.DynamoDBProperty.getHashKeyType()
- Parameters:
hashKeyType
- 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'
.- Returns:
this
-
operation
Sets the value ofCfnAlarmModel.DynamoDBProperty.getOperation()
- Parameters:
operation
- 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.- Returns:
this
-
payload
Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayload()
- Parameters:
payload
- 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 usecontentExpression
.- Returns:
this
-
payload
@Stability(Stable) public CfnAlarmModel.DynamoDBProperty.Builder payload(CfnAlarmModel.PayloadProperty payload) Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayload()
- Parameters:
payload
- 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 usecontentExpression
.- Returns:
this
-
payloadField
Sets the value ofCfnAlarmModel.DynamoDBProperty.getPayloadField()
- Parameters:
payloadField
- The name of the DynamoDB column that receives the action payload. If you don't specify this parameter, the name of the DynamoDB column ispayload
.- Returns:
this
-
rangeKeyField
@Stability(Stable) public CfnAlarmModel.DynamoDBProperty.Builder rangeKeyField(String rangeKeyField) Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyField()
- Parameters:
rangeKeyField
- The name of the range key (also called the sort key). TherangeKeyField
value must match the sort key of the target DynamoDB table.- Returns:
this
-
rangeKeyType
Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyType()
- Parameters:
rangeKeyType
- 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'
.- Returns:
this
-
rangeKeyValue
@Stability(Stable) public CfnAlarmModel.DynamoDBProperty.Builder rangeKeyValue(String rangeKeyValue) Sets the value ofCfnAlarmModel.DynamoDBProperty.getRangeKeyValue()
- Parameters:
rangeKeyValue
- The value of the range key (also called the sort key).- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnAlarmModel.DynamoDBProperty>
- Returns:
- a new instance of
CfnAlarmModel.DynamoDBProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-