SQS / Client / get_queue_url

get_queue_url#

SQS.Client.get_queue_url(**kwargs)#

Returns the URL of an existing Amazon 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 see 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]

    The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values: alphanumeric characters, hyphens ( -), and underscores ( _).

    Queue URLs and names are case-sensitive.

  • QueueOwnerAWSAccountId (string) – The Amazon Web Services account ID of the account that created the queue.

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