AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

DynamoDBAction

import "github.com/aws/aws-sdk-go/service/iot"

type DynamoDBAction struct { HashKeyField *string `locationName:"hashKeyField" type:"string" required:"true"` HashKeyType *string `locationName:"hashKeyType" type:"string" enum:"DynamoKeyType"` HashKeyValue *string `locationName:"hashKeyValue" type:"string" required:"true"` Operation *string `locationName:"operation" type:"string"` PayloadField *string `locationName:"payloadField" type:"string"` RangeKeyField *string `locationName:"rangeKeyField" type:"string"` RangeKeyType *string `locationName:"rangeKeyType" type:"string" enum:"DynamoKeyType"` RangeKeyValue *string `locationName:"rangeKeyValue" type:"string"` RoleArn *string `locationName:"roleArn" type:"string" required:"true"` TableName *string `locationName:"tableName" type:"string" required:"true"` }

Describes an action to write to a DynamoDB table.

The tableName, hashKeyField, and rangeKeyField values must match the values used when you created the table.

The hashKeyValue and rangeKeyvalue fields use a substitution template syntax. These templates provide data at runtime. The syntax is as follows: ${sql-expression}.

You can specify any valid expression in a WHERE or SELECT clause, including JSON properties, comparisons, calculations, and functions. For example, the following field uses the third level of the topic:

"hashKeyValue": "${topic(3)}"

The following field uses the timestamp:

"rangeKeyValue": "${timestamp()}"

HashKeyField

Type: *string

The hash key name.

HashKeyField is a required field

HashKeyType

Type: *string

The hash key type. Valid values are "STRING" or "NUMBER"

HashKeyValue

Type: *string

The hash key value.

HashKeyValue is a required field

Operation

Type: *string

The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.

PayloadField

Type: *string

The action payload. This name can be customized.

RangeKeyField

Type: *string

The range key name.

RangeKeyType

Type: *string

The range key type. Valid values are "STRING" or "NUMBER"

RangeKeyValue

Type: *string

The range key value.

RoleArn

Type: *string

The ARN of the IAM role that grants access to the DynamoDB table.

RoleArn is a required field

TableName

Type: *string

The name of the DynamoDB table.

TableName is a required field

Method

GoString

func (s DynamoDBAction) GoString() string

GoString returns the string representation

SetHashKeyField

func (s *DynamoDBAction) SetHashKeyField(v string) *DynamoDBAction

SetHashKeyField sets the HashKeyField field's value.

SetHashKeyType

func (s *DynamoDBAction) SetHashKeyType(v string) *DynamoDBAction

SetHashKeyType sets the HashKeyType field's value.

SetHashKeyValue

func (s *DynamoDBAction) SetHashKeyValue(v string) *DynamoDBAction

SetHashKeyValue sets the HashKeyValue field's value.

SetOperation

func (s *DynamoDBAction) SetOperation(v string) *DynamoDBAction

SetOperation sets the Operation field's value.

SetPayloadField

func (s *DynamoDBAction) SetPayloadField(v string) *DynamoDBAction

SetPayloadField sets the PayloadField field's value.

SetRangeKeyField

func (s *DynamoDBAction) SetRangeKeyField(v string) *DynamoDBAction

SetRangeKeyField sets the RangeKeyField field's value.

SetRangeKeyType

func (s *DynamoDBAction) SetRangeKeyType(v string) *DynamoDBAction

SetRangeKeyType sets the RangeKeyType field's value.

SetRangeKeyValue

func (s *DynamoDBAction) SetRangeKeyValue(v string) *DynamoDBAction

SetRangeKeyValue sets the RangeKeyValue field's value.

SetRoleArn

func (s *DynamoDBAction) SetRoleArn(v string) *DynamoDBAction

SetRoleArn sets the RoleArn field's value.

SetTableName

func (s *DynamoDBAction) SetTableName(v string) *DynamoDBAction

SetTableName sets the TableName field's value.

String

func (s DynamoDBAction) String() string

String returns the string representation

Validate

func (s *DynamoDBAction) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: