Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Message Queue
  • Access management
  • Pricing policy
  • Terraform reference
    • Overview
      • CreateQueue
      • DeleteQueue
      • GetQueueAttributes
      • GetQueueUrl
      • ListQueues
      • PurgeQueue
      • SetQueueAttributes
      • TagQueue
      • UntagQueue
      • ListQueueTags
    • Common errors
  • Audit Trails events
  • Monitoring metrics
  • Public materials
  • FAQ

In this article:

  • Request
  • Request parameters
  • Response
  • Successful response fields
  • GetQueueAttributes errors
  • Request example
  • Response example
  1. API reference
  2. Queue
  3. GetQueueAttributes

GetQueueAttributes

Written by
Yandex Cloud
Updated at July 7, 2026
View in Markdown
  • Request
    • Request parameters
  • Response
    • Successful response fields
    • GetQueueAttributes errors
  • Request example
  • Response example

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.

RequestRequest

Request parametersRequest parameters

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

AttributesAttributes

Queue attributes. Attributes are sent as a list. For the rules of providing listed attributes, 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 stamp when the queue was created, in seconds (epoch time).
DelaySeconds Time in seconds the messages will remain hidden after they are sent.
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 Queue ARN used in the RedrivePolicy attribute.
ReceiveMessageWaitTimeSeconds Returns the wait time for the ReceiveMessage method, in seconds.
RedrivePolicy Redirect policy for moving messages to a 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: ARN of the DLQ the messages will be moved to.
  • maxReceiveCount: Maximum number of attempts to read a message from a queue before redirecting it to the DLQ. When ReceiveCount exceeds maxReceiveCount for a given message, the message is moved to the DLQ.
VisibilityTimeout Returns the visibility timeout for the queue, specified in seconds.

FIFO queue attributesFIFO queue attributes

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

Non-supported attributesNon-supported attributes

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

ResponseResponse

Successful response fieldsSuccessful response fields

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

GetQueueAttributes errorsGetQueueAttributes 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.

Request exampleRequest example

Action=GetQueueAttributes
&Version=2012-11-05
&QueueUrl=https://message-queue.api.cloud.yandex.net/b1g8ad42m6he********/dj6000000000********/sample-queue
&AttributeName.1=All

For more on request formatting, see General API request format.

Response exampleResponse example

<GetQueueAttributesResponse>
    <GetQueueAttributesResult>
        <Attribute>
            <Name>ApproximateNumberOfMessages</Name>
            <Value>0</Value>
        </Attribute>
        <Attribute>
            <Name>ApproximateNumberOfMessagesDelayed</Name>
            <Value>0</Value>
        </Attribute>
        <Attribute>
            <Name>ApproximateNumberOfMessagesNotVisible</Name>
            <Value>0</Value>
        </Attribute>
        <Attribute>
            <Name>CreatedTimestamp</Name>
            <Value>1548345183</Value>
        </Attribute>
        <Attribute>
            <Name>DelaySeconds</Name>
            <Value>0</Value>
        </Attribute>
        <Attribute>
            <Name>MaximumMessageSize</Name>
            <Value>262144</Value>
        </Attribute>
        <Attribute>
            <Name>MessageRetentionPeriod</Name>
            <Value>345600</Value>
        </Attribute>
        <Attribute>
            <Name>ReceiveMessageWaitTimeSeconds</Name>
            <Value>0</Value>
        </Attribute>
        <Attribute>
            <Name>VisibilityTimeout</Name>
            <Value>30</Value>
        </Attribute>
    </GetQueueAttributesResult>
    <ResponseMetadata>
        <RequestId>a69769e7-d07122f-147f09c0-e1f9d20-2e4fd5bae005ef4e6d639f79********</RequestId>
    </ResponseMetadata>
</GetQueueAttributesResponse>

Was the article helpful?

Previous
DeleteQueue
Next
GetQueueUrl
© 2026 Direct Cursus Technology L.L.C.