get_queue_by_name

SQS.ServiceResource.get_queue_by_name(**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

queue = sqs.get_queue_by_name(
    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

sqs.Queue

Returns

Queue resource