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.

Action

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

type Action struct { CloudwatchAlarm *CloudwatchAlarmAction `locationName:"cloudwatchAlarm" type:"structure"` CloudwatchMetric *CloudwatchMetricAction `locationName:"cloudwatchMetric" type:"structure"` DynamoDB *DynamoDBAction `locationName:"dynamoDB" type:"structure"` DynamoDBv2 *DynamoDBv2Action `locationName:"dynamoDBv2" type:"structure"` Elasticsearch *ElasticsearchAction `locationName:"elasticsearch" type:"structure"` Firehose *FirehoseAction `locationName:"firehose" type:"structure"` IotAnalytics *IotAnalyticsAction `locationName:"iotAnalytics" type:"structure"` IotEvents *IotEventsAction `locationName:"iotEvents" type:"structure"` Kinesis *KinesisAction `locationName:"kinesis" type:"structure"` Lambda *LambdaAction `locationName:"lambda" type:"structure"` Republish *RepublishAction `locationName:"republish" type:"structure"` S3 *S3Action `locationName:"s3" type:"structure"` Salesforce *SalesforceAction `locationName:"salesforce" type:"structure"` Sns *SnsAction `locationName:"sns" type:"structure"` Sqs *SqsAction `locationName:"sqs" type:"structure"` StepFunctions *StepFunctionsAction `locationName:"stepFunctions" type:"structure"` }

Describes the actions associated with a rule.

CloudwatchAlarm

Describes an action that updates a CloudWatch alarm.

CloudwatchMetric

Describes an action that captures a CloudWatch metric.

DynamoDB

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()}"

DynamoDBv2

Describes an action to write to a DynamoDB table.

This DynamoDB action writes each attribute in the message payload into it's own column in the DynamoDB table.

Elasticsearch

Describes an action that writes data to an Amazon Elasticsearch Service domain.

Firehose

Describes an action that writes data to an Amazon Kinesis Firehose stream.

IotAnalytics

Sends messge data to an AWS IoT Analytics channel.

IotEvents

Sends an input to an AWS IoT Events detector.

Kinesis

Describes an action to write data to an Amazon Kinesis stream.

Lambda

Describes an action to invoke a Lambda function.

Republish

Describes an action to republish to another topic.

S3

Describes an action to write data to an Amazon S3 bucket.

Salesforce

Describes an action to write a message to a Salesforce IoT Cloud Input Stream.

Sns

Describes an action to publish to an Amazon SNS topic.

Sqs

Describes an action to publish data to an Amazon SQS queue.

StepFunctions

Starts execution of a Step Functions state machine.

Method

GoString

func (s Action) GoString() string

GoString returns the string representation

SetCloudwatchAlarm

func (s *Action) SetCloudwatchAlarm(v *CloudwatchAlarmAction) *Action

SetCloudwatchAlarm sets the CloudwatchAlarm field's value.

SetCloudwatchMetric

func (s *Action) SetCloudwatchMetric(v *CloudwatchMetricAction) *Action

SetCloudwatchMetric sets the CloudwatchMetric field's value.

SetDynamoDB

func (s *Action) SetDynamoDB(v *DynamoDBAction) *Action

SetDynamoDB sets the DynamoDB field's value.

SetDynamoDBv2

func (s *Action) SetDynamoDBv2(v *DynamoDBv2Action) *Action

SetDynamoDBv2 sets the DynamoDBv2 field's value.

SetElasticsearch

func (s *Action) SetElasticsearch(v *ElasticsearchAction) *Action

SetElasticsearch sets the Elasticsearch field's value.

SetFirehose

func (s *Action) SetFirehose(v *FirehoseAction) *Action

SetFirehose sets the Firehose field's value.

SetIotAnalytics

func (s *Action) SetIotAnalytics(v *IotAnalyticsAction) *Action

SetIotAnalytics sets the IotAnalytics field's value.

SetIotEvents

func (s *Action) SetIotEvents(v *IotEventsAction) *Action

SetIotEvents sets the IotEvents field's value.

SetKinesis

func (s *Action) SetKinesis(v *KinesisAction) *Action

SetKinesis sets the Kinesis field's value.

SetLambda

func (s *Action) SetLambda(v *LambdaAction) *Action

SetLambda sets the Lambda field's value.

SetRepublish

func (s *Action) SetRepublish(v *RepublishAction) *Action

SetRepublish sets the Republish field's value.

SetS3

func (s *Action) SetS3(v *S3Action) *Action

SetS3 sets the S3 field's value.

SetSalesforce

func (s *Action) SetSalesforce(v *SalesforceAction) *Action

SetSalesforce sets the Salesforce field's value.

SetSns

func (s *Action) SetSns(v *SnsAction) *Action

SetSns sets the Sns field's value.

SetSqs

func (s *Action) SetSqs(v *SqsAction) *Action

SetSqs sets the Sqs field's value.

SetStepFunctions

func (s *Action) SetStepFunctions(v *StepFunctionsAction) *Action

SetStepFunctions sets the StepFunctions field's value.

String

func (s Action) String() string

String returns the string representation

Validate

func (s *Action) Validate() error

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

On this page: