azure.servicebus.management.aio package

class azure.servicebus.management.aio.ServiceBusManagementClient(fully_qualified_namespace: str, credential: Union[AsyncTokenCredential, ServiceBusSharedKeyCredential], **kwargs: Dict[str, Any])[source]

Use this client to create, update, list, and delete resources of a ServiceBus namespace.

Parameters
  • fully_qualified_namespace (str) – The fully qualified host name for the Service Bus namespace.

  • credential (Union[TokenCredential, ServiceBusSharedKeyCredential]) – To authenticate to manage the entities of the ServiceBus namespace.

async create_queue(queue: Union[str, azure.servicebus.management._models.QueueDescription], **kwargs) → azure.servicebus.management._models.QueueDescription[source]

Create a queue.

Parameters

queue (Union[str, QueueDescription]) – The queue name or a QueueDescription instance. When it’s a str, it will be the name of the created queue. Other properties of the created queue will have default values decided by the ServiceBus. Use a QueueDescription if you want to set queue properties other than the queue name.

Return type

QueueDescription

async delete_queue(queue_name: str, **kwargs)None[source]

Delete a queue.

Parameters

queue_name (str) – The name of the queue.

Return type

None

classmethod from_connection_string(conn_str: str, **kwargs: Any) → azure.servicebus.management.aio._management_client_async.ServiceBusManagementClient[source]

Create a client from connection string.

Parameters

conn_str (str) – The connection string of the Service Bus Namespace.

Return type

ServiceBusManagementClient

async get_queue(queue_name: str, **kwargs) → azure.servicebus.management._models.QueueDescription[source]

Get a QueueDescription.

Parameters

queue_name (str) – The name of the queue.

Return type

QueueDescription

async get_queue_runtime_info(queue_name: str, **kwargs) → azure.servicebus.management._models.QueueRuntimeInfo[source]

Get the runtime information of a queue.

Parameters

queue_name (str) – The name of the queue.

Return type

QueueRuntimeInfo

async list_queues(*, start_index: int = 0, max_count: int = 100, **kwargs) → List[azure.servicebus.management._models.QueueDescription][source]

List the queues of a ServiceBus namespace.

Keyword Arguments
  • start_index (int) – skip this number of queues.

  • max_count (int) – return at most this number of queues if there are more than this number in the ServiceBus namespace.

Return type

List[QueueDescription]

async list_queues_runtime_info(*, start_index: int = 0, max_count: int = 100, **kwargs) → List[azure.servicebus.management._models.QueueRuntimeInfo][source]

List the runtime info of the queues in a ServiceBus namespace.

Keyword Arguments
  • start_index (int) – skip this number of queues.

  • max_count (int) – return at most this number of queues if there are more than this number in the ServiceBus namespace.

Return type

List[QueueRuntimeInfo]

async update_queue(queue_description: azure.servicebus.management._models.QueueDescription, **kwargs) → azure.servicebus.management._models.QueueDescription[source]

Update a queue.

Parameters

queue_description (QueueDescription) – The properties of this QueueDescription will be applied to the queue in ServiceBus. Only a portion of properties can be updated. Refer to https://docs.microsoft.com/en-us/rest/api/servicebus/update-queue.

Return type

QueueDescription