libZSservicesZSamazonka-sqsZSamazonka-sqs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SQS.SendMessageBatch

Description

Delivers up to ten messages to the specified queue. This is a batch version of SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued in the order they are sent.

The result of sending each message is reported individually in the response. Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

The maximum allowed individual message size and the maximum total payload size (the sum of the individual lengths of all of the batched messages) are both 256 KB (262,144 bytes).

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

#x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default value for the queue.

Some actions take lists of parameters. These lists are specified using the param.n notation. Values of n are integers starting from 1. For example, a parameter list with two elements looks like this:

&AttributeName.1=first
&AttributeName.2=second
Synopsis

Creating a Request

data SendMessageBatch Source #

See: newSendMessageBatch smart constructor.

Constructors

SendMessageBatch' 

Fields

Instances

Instances details
Eq SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Read SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Show SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Generic SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Associated Types

type Rep SendMessageBatch :: Type -> Type #

NFData SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Methods

rnf :: SendMessageBatch -> () #

Hashable SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

AWSRequest SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Associated Types

type AWSResponse SendMessageBatch #

ToHeaders SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

ToPath SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

ToQuery SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

type Rep SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

type Rep SendMessageBatch = D1 ('MetaData "SendMessageBatch" "Amazonka.SQS.SendMessageBatch" "libZSservicesZSamazonka-sqsZSamazonka-sqs" 'False) (C1 ('MetaCons "SendMessageBatch'" 'PrefixI 'True) (S1 ('MetaSel ('Just "queueUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "entries") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SendMessageBatchRequestEntry])))
type AWSResponse SendMessageBatch Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

newSendMessageBatch Source #

Create a value of SendMessageBatch with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:queueUrl:SendMessageBatch', sendMessageBatch_queueUrl - The URL of the Amazon SQS queue to which batched messages are sent.

Queue URLs and names are case-sensitive.

$sel:entries:SendMessageBatch', sendMessageBatch_entries - A list of SendMessageBatchRequestEntry items.

Request Lenses

sendMessageBatch_queueUrl :: Lens' SendMessageBatch Text Source #

The URL of the Amazon SQS queue to which batched messages are sent.

Queue URLs and names are case-sensitive.

sendMessageBatch_entries :: Lens' SendMessageBatch [SendMessageBatchRequestEntry] Source #

A list of SendMessageBatchRequestEntry items.

Destructuring the Response

data SendMessageBatchResponse Source #

For each message in the batch, the response contains a SendMessageBatchResultEntry tag if the message succeeds or a BatchResultErrorEntry tag if the message fails.

See: newSendMessageBatchResponse smart constructor.

Constructors

SendMessageBatchResponse' 

Fields

Instances

Instances details
Eq SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Read SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Show SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Generic SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

Associated Types

type Rep SendMessageBatchResponse :: Type -> Type #

NFData SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

type Rep SendMessageBatchResponse Source # 
Instance details

Defined in Amazonka.SQS.SendMessageBatch

type Rep SendMessageBatchResponse = D1 ('MetaData "SendMessageBatchResponse" "Amazonka.SQS.SendMessageBatch" "libZSservicesZSamazonka-sqsZSamazonka-sqs" 'False) (C1 ('MetaCons "SendMessageBatchResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "successful") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SendMessageBatchResultEntry]) :*: S1 ('MetaSel ('Just "failed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [BatchResultErrorEntry]))))

newSendMessageBatchResponse Source #

Create a value of SendMessageBatchResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:SendMessageBatchResponse', sendMessageBatchResponse_httpStatus - The response's http status code.

$sel:successful:SendMessageBatchResponse', sendMessageBatchResponse_successful - A list of SendMessageBatchResultEntry items.

$sel:failed:SendMessageBatchResponse', sendMessageBatchResponse_failed - A list of BatchResultErrorEntry items with error details about each message that can't be enqueued.

Response Lenses

sendMessageBatchResponse_failed :: Lens' SendMessageBatchResponse [BatchResultErrorEntry] Source #

A list of BatchResultErrorEntry items with error details about each message that can't be enqueued.