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.DeleteMessage

Description

Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle of the message (not the MessageId which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue.

The ReceiptHandle is associated with a specific instance of receiving a message. If you receive a message more than once, the ReceiptHandle is different each time you receive a message. When you use the DeleteMessage action, you must provide the most recently received ReceiptHandle for the message (otherwise, the request succeeds, but the message might not be deleted).

For standard queues, it is possible to receive a message even after you delete it. This might happen on rare occasions if one of the servers which stores a copy of the message is unavailable when you send the request to delete the message. The copy remains on the server and might be returned to you during a subsequent receive request. You should ensure that your application is idempotent, so that receiving a message more than once does not cause issues.

Synopsis

Creating a Request

data DeleteMessage Source #

See: newDeleteMessage smart constructor.

Constructors

DeleteMessage' 

Fields

  • queueUrl :: Text

    The URL of the Amazon SQS queue from which messages are deleted.

    Queue URLs and names are case-sensitive.

  • receiptHandle :: Text

    The receipt handle associated with the message to delete.

Instances

Instances details
Eq DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Read DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Show DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Generic DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Associated Types

type Rep DeleteMessage :: Type -> Type #

NFData DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Methods

rnf :: DeleteMessage -> () #

Hashable DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

AWSRequest DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Associated Types

type AWSResponse DeleteMessage #

ToHeaders DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

ToPath DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

ToQuery DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

type Rep DeleteMessage Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

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

Defined in Amazonka.SQS.DeleteMessage

newDeleteMessage Source #

Create a value of DeleteMessage 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:DeleteMessage', deleteMessage_queueUrl - The URL of the Amazon SQS queue from which messages are deleted.

Queue URLs and names are case-sensitive.

$sel:receiptHandle:DeleteMessage', deleteMessage_receiptHandle - The receipt handle associated with the message to delete.

Request Lenses

deleteMessage_queueUrl :: Lens' DeleteMessage Text Source #

The URL of the Amazon SQS queue from which messages are deleted.

Queue URLs and names are case-sensitive.

deleteMessage_receiptHandle :: Lens' DeleteMessage Text Source #

The receipt handle associated with the message to delete.

Destructuring the Response

data DeleteMessageResponse Source #

See: newDeleteMessageResponse smart constructor.

Instances

Instances details
Eq DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Read DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Show DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Generic DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Associated Types

type Rep DeleteMessageResponse :: Type -> Type #

NFData DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

Methods

rnf :: DeleteMessageResponse -> () #

type Rep DeleteMessageResponse Source # 
Instance details

Defined in Amazonka.SQS.DeleteMessage

type Rep DeleteMessageResponse = D1 ('MetaData "DeleteMessageResponse" "Amazonka.SQS.DeleteMessage" "libZSservicesZSamazonka-sqsZSamazonka-sqs" 'False) (C1 ('MetaCons "DeleteMessageResponse'" 'PrefixI 'False) (U1 :: Type -> Type))

newDeleteMessageResponse :: DeleteMessageResponse Source #

Create a value of DeleteMessageResponse with all optional fields omitted.

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