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.

SnsAction

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

type SnsAction struct { MessageFormat *string `locationName:"messageFormat" type:"string" enum:"MessageFormat"` RoleArn *string `locationName:"roleArn" type:"string" required:"true"` TargetArn *string `locationName:"targetArn" type:"string" required:"true"` }

Describes an action to publish to an Amazon SNS topic.

MessageFormat

Type: *string

(Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html (https://docs.aws.amazon.com/sns/latest/dg/json-formats.html) refer to their official documentation.

RoleArn

Type: *string

The ARN of the IAM role that grants access.

RoleArn is a required field

TargetArn

Type: *string

The ARN of the SNS topic.

TargetArn is a required field

Method

GoString

func (s SnsAction) GoString() string

GoString returns the string representation

SetMessageFormat

func (s *SnsAction) SetMessageFormat(v string) *SnsAction

SetMessageFormat sets the MessageFormat field's value.

SetRoleArn

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

SetRoleArn sets the RoleArn field's value.

SetTargetArn

func (s *SnsAction) SetTargetArn(v string) *SnsAction

SetTargetArn sets the TargetArn field's value.

String

func (s SnsAction) String() string

String returns the string representation

Validate

func (s *SnsAction) Validate() error

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

On this page: