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