QueuesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ServiceBusManagementClient's

<xref:queues> attribute.

Inheritance
builtins.object
QueuesOperations

Constructor

QueuesOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a Service Bus queue. This operation is idempotent.

create_or_update_authorization_rule

Creates an authorization rule for a queue.

delete

Deletes a queue from the specified namespace in a resource group.

delete_authorization_rule

Deletes a queue authorization rule.

get

Returns a description for the specified queue.

get_authorization_rule

Gets an authorization rule for a queue by rule name.

list_authorization_rules

Gets all authorization rules for a queue.

list_by_namespace

Gets the queues within a namespace.

list_keys

Primary and secondary connection strings to the queue.

regenerate_keys

Regenerates the primary or secondary connection strings to the queue.

create_or_update

Creates or updates a Service Bus queue. This operation is idempotent.

create_or_update(resource_group_name: str, namespace_name: str, queue_name: str, parameters: _models.SBQueue, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SBQueue

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

parameters
Required
SBQueue or IO

Parameters supplied to create or update a queue resource. Is either a SBQueue type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

SBQueue or the result of cls(response)

Exceptions

Type Description
See also

create_or_update_authorization_rule

Creates an authorization rule for a queue.

create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, queue_name: str, authorization_rule_name: str, parameters: _models.SBAuthorizationRule, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SBAuthorizationRule

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

parameters
Required

The shared access authorization rule. Is either a SBAuthorizationRule type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

SBAuthorizationRule or the result of cls(response)

Exceptions

Type Description

delete

Deletes a queue from the specified namespace in a resource group.

delete(resource_group_name: str, namespace_name: str, queue_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description
See also

delete_authorization_rule

Deletes a queue authorization rule.

delete_authorization_rule(resource_group_name: str, namespace_name: str, queue_name: str, authorization_rule_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description
See also

get

Returns a description for the specified queue.

get(resource_group_name: str, namespace_name: str, queue_name: str, **kwargs: Any) -> SBQueue

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

SBQueue or the result of cls(response)

Exceptions

Type Description
See also

get_authorization_rule

Gets an authorization rule for a queue by rule name.

get_authorization_rule(resource_group_name: str, namespace_name: str, queue_name: str, authorization_rule_name: str, **kwargs: Any) -> SBAuthorizationRule

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

SBAuthorizationRule or the result of cls(response)

Exceptions

Type Description
See also

list_authorization_rules

Gets all authorization rules for a queue.

list_authorization_rules(resource_group_name: str, namespace_name: str, queue_name: str, **kwargs: Any) -> Iterable[SBAuthorizationRule]

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either SBAuthorizationRule or the result of cls(response)

Exceptions

Type Description
See also

list_by_namespace

Gets the queues within a namespace.

list_by_namespace(resource_group_name: str, namespace_name: str, skip: int | None = None, top: int | None = None, **kwargs: Any) -> Iterable[SBQueue]

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

skip
Required
int

Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. Default value is None.

top
Required
int

May be used to limit the number of results to the most recent N usageDetails. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either SBQueue or the result of cls(response)

Exceptions

Type Description
See also

list_keys

Primary and secondary connection strings to the queue.

list_keys(resource_group_name: str, namespace_name: str, queue_name: str, authorization_rule_name: str, **kwargs: Any) -> AccessKeys

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

AccessKeys or the result of cls(response)

Exceptions

Type Description
See also

regenerate_keys

Regenerates the primary or secondary connection strings to the queue.

regenerate_keys(resource_group_name: str, namespace_name: str, queue_name: str, authorization_rule_name: str, parameters: _models.RegenerateAccessKeyParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AccessKeys

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. Required.

namespace_name
Required
str

The namespace name. Required.

queue_name
Required
str

The queue name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

parameters
Required

Parameters supplied to regenerate the authorization rule. Is either a RegenerateAccessKeyParameters type or a IO type. Required.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

A custom type or function that will be passed the direct response

Returns

Type Description

AccessKeys or the result of cls(response)

Exceptions

Type Description
See also

Attributes

models

models = <module 'azure.mgmt.servicebus.v2022_10_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\servicebus\\v2022_10_01_preview\\models\\__init__.py'>