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.

Message

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

type Message struct { Attributes map[string]*string `locationName:"Attribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` Body *string `type:"string"` MD5OfBody *string `type:"string"` MD5OfMessageAttributes *string `type:"string"` MessageAttributes map[string]*MessageAttributeValue `locationName:"MessageAttribute" locationNameKey:"Name" locationNameValue:"Value" type:"map" flattened:"true"` MessageId *string `type:"string"` ReceiptHandle *string `type:"string"` }

An Amazon SQS message.

Attributes

Type: map[string]*string

A map of the attributes requested in ReceiveMessage to their respective values. Supported attributes:

  • ApproximateReceiveCount

  • ApproximateFirstReceiveTimestamp

  • MessageDeduplicationId

  • MessageGroupId

  • SenderId

  • SentTimestamp

  • SequenceNumber

ApproximateFirstReceiveTimestamp and SentTimestamp are each returned as an integer representing the epoch time (http://en.wikipedia.org/wiki/Unix_time) in milliseconds.

Body

Type: *string

The message's contents (not URL-encoded).

MD5OfBody

Type: *string

An MD5 digest of the non-URL-encoded message body string.

MD5OfMessageAttributes

Type: *string

An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321 (https://www.ietf.org/rfc/rfc1321.txt).

MessageAttributes

Type: map[string]*MessageAttributeValue

Each message attribute consists of a Name, Type, and Value. 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.

MessageId

Type: *string

A unique identifier for the message. A MessageIdis considered unique across all AWS accounts for an extended period of time.

ReceiptHandle

Type: *string

An identifier associated with the act of receiving the message. A new receipt handle is returned every time you receive a message. When deleting a message, you provide the last received receipt handle to delete the message.

Method

GoString

func (s Message) GoString() string

GoString returns the string representation

SetAttributes

func (s *Message) SetAttributes(v map[string]*string) *Message

SetAttributes sets the Attributes field's value.

SetBody

func (s *Message) SetBody(v string) *Message

SetBody sets the Body field's value.

SetMD5OfBody

func (s *Message) SetMD5OfBody(v string) *Message

SetMD5OfBody sets the MD5OfBody field's value.

SetMD5OfMessageAttributes

func (s *Message) SetMD5OfMessageAttributes(v string) *Message

SetMD5OfMessageAttributes sets the MD5OfMessageAttributes field's value.

SetMessageAttributes

func (s *Message) SetMessageAttributes(v map[string]*MessageAttributeValue) *Message

SetMessageAttributes sets the MessageAttributes field's value.

SetMessageId

func (s *Message) SetMessageId(v string) *Message

SetMessageId sets the MessageId field's value.

SetReceiptHandle

func (s *Message) SetReceiptHandle(v string) *Message

SetReceiptHandle sets the ReceiptHandle field's value.

String

func (s Message) String() string

String returns the string representation

On this page: