SQS / Client / get_queue_url
get_queue_url#
- SQS.Client.get_queue_url(**kwargs)#
The
GetQueueUrl
API returns the URL of an existing Amazon SQS queue. This is useful when you know the queue’s name but need to retrieve its URL for further operations.To access a queue owned by another Amazon Web Services account, use the
QueueOwnerAWSAccountId
parameter to specify the account ID of the queue’s owner. Note that the queue owner must grant you the necessary permissions to access the queue. For more information about accessing shared queues, see theAddPermission
API or Allow developers to write messages to a shared queue in the Amazon SQS Developer Guide.See also: AWS API Documentation
Request Syntax
response = client.get_queue_url( QueueName='string', QueueOwnerAWSAccountId='string' )
- Parameters:
QueueName (string) –
[REQUIRED]
(Required) The name of the queue for which you want to fetch the URL. The name can be up to 80 characters long and can include alphanumeric characters, hyphens (-), and underscores (_). Queue URLs and names are case-sensitive.
QueueOwnerAWSAccountId (string) – (Optional) The Amazon Web Services account ID of the account that created the queue. This is only required when you are attempting to access a queue owned by another Amazon Web Services account.
- Return type:
dict
- Returns:
Response Syntax
{ 'QueueUrl': 'string' }
Response Structure
(dict) –
For more information, see Interpreting Responses in the Amazon SQS Developer Guide.
QueueUrl (string) –
The URL of the queue.
Exceptions