| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
The GetQueueUrl action returns the Uniform Resource Locater (URL) of a queue.
This action provides a simple way to retrieve the URL of an SQS queue.
To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId
parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to
access the queue. For more information about shared queue access, see
AddPermission or go to
Shared Queues
in the Amazon SQS Developer Guide.
The following table lists the special request parameters the
GetQueueUrl action uses in addition to the common request parameters
all actions use. For more information, see Common Query Parameters.
| Name | Description | Required |
|---|---|---|
|
|
The name of an existing queue. Type: String Constraints: Maximum 80 characters; alphanumeric characters, hyphens (-), and underscores (_) are allowed. |
Yes |
|
|
The AWS account ID of the account that created the queue. Type: String |
No |
The following table lists the response elements the GetQueueUrl
action returns in addition to the common response elements all actions return. For more
information, see Responses
section in the Amazon SQS Developer Guidee.
| Name | Description |
|---|---|
|
|
The queue URL for the queue that you created. Type: String Ancestor: |
A special error can result if you attempt to access a queue that doesn't exist in the named account or if you don't have permission to access the queue.
The following example Query request gets the URL for the specified queue.
http://sqs.us-east-1.amazonaws.com/ ?Action=GetQueueUrl &QueueName=testQueue &Version=2011-10-01 &SignatureMethod=HmacSHA256 &Expires=2011-10-24T22%3A52%3A43PST &AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE &SignatureVersion=2 &Signature=Dqlp3Sd6ljTUA9Uf6SGtEExwUQEXAMPLE
<GetQueueUrlResponse>
<GetQueueUrlResult>
<QueueUrl>
http://sqs.us-east-1.amazonaws.com/123456789012/testQueue
</QueueUrl>
</GetQueueUrlResult>
<ResponseMetadata>
<RequestId>470a6f13-2ed9-4181-ad8a-2fdea142988e</RequestId>
</ResponseMetadata>
</GetQueueUrlResponse>