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.

MessageAttributeValue

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

type MessageAttributeValue struct { BinaryListValues [][]byte `locationName:"BinaryListValue" locationNameList:"BinaryListValue" type:"list" flattened:"true"` BinaryValue []byte `type:"blob"` DataType *string `type:"string" required:"true"` StringListValues []*string `locationName:"StringListValue" locationNameList:"StringListValue" type:"list" flattened:"true"` StringValue *string `type:"string"` }

The user-specified message attribute value. For string data types, the Value attribute has the same restrictions on the content as the message body. For more information, see SendMessage.

Name, type, value and the message body must not be empty or null. All parts of the message attribute, including Name, Type, and Value, are part of the message size restriction (256 KB or 262,144 bytes).

BinaryListValues

Type: [][]byte

Not implemented. Reserved for future use.

BinaryValue

Type: []byte

Binary type attributes can store any binary data, such as compressed data, encrypted data, or images.

BinaryValue is automatically base64 encoded/decoded by the SDK.

DataType

Type: *string

Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.

You can also append custom labels. For more information, see Amazon SQS Message Attributes (https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-message-attributes.html) in the Amazon Simple Queue Service Developer Guide.

DataType is a required field

StringListValues

Type: []*string

Not implemented. Reserved for future use.

StringValue

Type: *string

Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable Characters (http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters).

Method

GoString

func (s MessageAttributeValue) GoString() string

GoString returns the string representation

SetBinaryListValues

func (s *MessageAttributeValue) SetBinaryListValues(v [][]byte) *MessageAttributeValue

SetBinaryListValues sets the BinaryListValues field's value.

SetBinaryValue

func (s *MessageAttributeValue) SetBinaryValue(v []byte) *MessageAttributeValue

SetBinaryValue sets the BinaryValue field's value.

SetDataType

func (s *MessageAttributeValue) SetDataType(v string) *MessageAttributeValue

SetDataType sets the DataType field's value.

SetStringListValues

func (s *MessageAttributeValue) SetStringListValues(v []*string) *MessageAttributeValue

SetStringListValues sets the StringListValues field's value.

SetStringValue

func (s *MessageAttributeValue) SetStringValue(v string) *MessageAttributeValue

SetStringValue sets the StringValue field's value.

String

func (s MessageAttributeValue) String() string

String returns the string representation

Validate

func (s *MessageAttributeValue) Validate() error

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

On this page: