Skip to content

purge_queue

Operation

purge_queue

purge_queue(request: PurgeQueueInput | PurgeQueueInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PurgeQueueInputDict]) -> PurgeQueueOutput

Deletes available messages in a queue (including in-flight messages) specified by the QueueURL parameter.

Warning

When you use the PurgeQueue action, you can't retrieve any messages deleted from a queue.

The message deletion process takes up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's size.

Messages sent to the queue before you call PurgeQueue might be received but are deleted within the next minute.

Messages sent to the queue after you call PurgeQueue might be deleted while the queue is being purged.

Parameters:

Name Type Description Default
request PurgeQueueInput | PurgeQueueInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PurgeQueueInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PurgeQueueOutput

An instance of PurgeQueueOutput.

purge_queue async

purge_queue(request: PurgeQueueInput | PurgeQueueInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[PurgeQueueInputDict]) -> PurgeQueueOutput

Deletes available messages in a queue (including in-flight messages) specified by the QueueURL parameter.

Warning

When you use the PurgeQueue action, you can't retrieve any messages deleted from a queue.

The message deletion process takes up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's size.

Messages sent to the queue before you call PurgeQueue might be received but are deleted within the next minute.

Messages sent to the queue after you call PurgeQueue might be deleted while the queue is being purged.

Parameters:

Name Type Description Default
request PurgeQueueInput | PurgeQueueInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[PurgeQueueInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
PurgeQueueOutput

An instance of PurgeQueueOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

PurgeQueueInputDict

Bases: TypedDict

Dictionary form of PurgeQueueInput.

Attributes

queue_url instance-attribute
queue_url: Required[str]

The URL of the queue from which the PurgeQueue action deletes messages.

Queue URLs and names are case-sensitive.

PurgeQueueInput dataclass

Bases: _SerdeShape

Attributes

queue_url class-attribute instance-attribute
queue_url: str | None = ...

The URL of the queue from which the PurgeQueue action deletes messages.

Queue URLs and names are case-sensitive.

Output

PurgeQueueOutput dataclass

Bases: _SerdeShape

Dataclass for PurgeQueueOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.