Method for getting attributes for the specified queue.

If the queue name ends with the .fifo suffix, the type of the requested queue is FIFO.


Request parameters

Parameter Type Required parameter Description
QueueUrl string Yes URL of a queue.
Attributes.N.* list of attributes No List of queue attributes.


Queue attributes. Attributes are sent as a list. For more information about passing list parameters, see Using the API.

Attribute.N.Name (attribute)
Attribute.N.Value (attribute value)
Attribute Description
All Returns all attributes of a queue.
ApproximateNumberOfMessages Returns the approximate number of enqueued messages that can be received.
ApproximateNumberOfMessagesDelayed Returns the approximate number of messages in the queue that are delayed and not available for reading immediately.
ApproximateNumberOfMessagesNotVisible Returns the approximate number of messages that are in flight: they have been sent to a client but have not yet been deleted or have not yet reached the end of their visibility timeout.
CreatedTimestamp Returns the time when the queue was created in seconds (epoch time).
DelaySeconds Number of seconds to delay the message from being available for processing.
LastModifiedTimestamp Returns the time when the queue was last changed in seconds (epoch time).
MaximumMessageSize Returns the maximum message size in bytes.
MessageRetentionPeriod Returns the length of time, in seconds, for which a message is retained.
QueueArn ARN of the queue used in the RedrivePolicy attribute.
ReceiveMessageWaitTimeSeconds Returns the length of time, in seconds, for which the ReceiveMessage action waits for a message to arrive.
RedrivePolicy Message redrive policy in Dead Letter Queue. The source queue and DLQ must be the same type: for FIFO queues, the DLQ must also be a FIFO queue. It includes two parameters:
  • deadLetterTargetArn is the ARN queue messages are redriven to.
  • maxReceiveCount is the maximum number of attempts to read a message from the queue before redriving it to the DLQ. When the ReceiveCount value for the message exceeds the value of maxReceiveCount, the message is moved to the DLQ.
VisibilityTimeout Returns the visibility timeout for the queue, specified in seconds.

FIFO queue attributes

Attribute Description
FifoQueue Returns whether the queue is FIFO. To determine whether a queue is FIFO, check whether its name ends with the .fifo suffix.
ContentBasedDeduplication Returns whether content-based deduplication.

Non-supported attributes

Attribute Type Description
KmsMasterKeyId string Not supported in Yandex Message Queue.
KmsDataKeyReusePeriodSeconds string Not supported in Yandex Message Queue.


Successful response fields

Field Type Description
Attributes.N.* array Array of queue attributes.

GetQueueAttributes errors

For a list of errors common for all methods, see Common errors.

HTTP code Error ID Description
400 InvalidAttributeName The attribute name is invalid.

Sample request


For more information about forming requests, see General API request format.

Response example