Skip to content

get_queue_url

Operation

get_queue_url

get_queue_url(request: GetQueueUrlInput | GetQueueUrlInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetQueueUrlInputDict]) -> GetQueueUrlOutput

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 the ``AddPermission`` API or Allow developers to write messages to a shared queue in the Amazon SQS Developer Guide.

Parameters:

Name Type Description Default
request GetQueueUrlInput | GetQueueUrlInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetQueueUrlInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetQueueUrlOutput

An instance of GetQueueUrlOutput.

get_queue_url async

get_queue_url(request: GetQueueUrlInput | GetQueueUrlInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetQueueUrlInputDict]) -> GetQueueUrlOutput

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 the ``AddPermission`` API or Allow developers to write messages to a shared queue in the Amazon SQS Developer Guide.

Parameters:

Name Type Description Default
request GetQueueUrlInput | GetQueueUrlInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[GetQueueUrlInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
GetQueueUrlOutput

An instance of GetQueueUrlOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

GetQueueUrlInputDict

Bases: TypedDict

Dictionary form of GetQueueUrlInput.

Attributes

queue_name instance-attribute
queue_name: Required[str]

(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.

queue_owner_aws_account_id instance-attribute
queue_owner_aws_account_id: str | None

(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.

GetQueueUrlInput dataclass

Bases: _SerdeShape

Retrieves the URL of an existing queue based on its name and, optionally, the Amazon Web Services account ID.

Attributes

queue_name class-attribute instance-attribute
queue_name: str | None = ...

(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.

queue_owner_aws_account_id class-attribute instance-attribute
queue_owner_aws_account_id: str | None = ...

(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.

Output

GetQueueUrlOutput dataclass

Bases: _SerdeShape

For more information, see Interpreting Responses in the Amazon SQS Developer Guide.

Attributes

queue_url class-attribute instance-attribute
queue_url: str | None = ...

The URL of the queue.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.