NamespacesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ServiceBusManagementClient's

<xref:namespaces> attribute.

Inheritance
builtins.object
NamespacesOperations

Constructor

NamespacesOperations(*args, **kwargs)

Methods

begin_create_or_update

Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.

begin_delete

Deletes an existing namespace. This operation also removes all associated resources under the namespace.

check_name_availability

Check the give namespace name availability.

create_or_update_authorization_rule

Creates or updates an authorization rule for a namespace.

create_or_update_network_rule_set

Create or update NetworkRuleSet for a Namespace.

delete_authorization_rule

Deletes a namespace authorization rule.

get

Gets a description for the specified namespace.

get_authorization_rule

Gets an authorization rule for a namespace by rule name.

get_network_rule_set

Gets NetworkRuleSet for a Namespace.

list

Gets all the available namespaces within the subscription, irrespective of the resource groups.

list_authorization_rules

Gets the authorization rules for a namespace.

list_by_resource_group

Gets the available namespaces within a resource group.

list_keys

Gets the primary and secondary connection strings for the namespace.

list_network_rule_sets

Gets list of NetworkRuleSet for a Namespace.

migrate

This operation Migrate the given namespace to provided name type.

regenerate_keys

Regenerates the primary or secondary connection strings for the namespace.

update

Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.

begin_create_or_update

Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.

async begin_create_or_update(resource_group_name: str, namespace_name: str, parameters: _models.SBNamespace, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.SBNamespace]

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.

parameters
Required

Parameters supplied to create a namespace resource. Is either a SBNamespace 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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of AsyncLROPoller that returns either SBNamespace or the result of cls(response)

Exceptions

Type Description
See also

begin_delete

Deletes an existing namespace. This operation also removes all associated resources under the namespace.

async begin_delete(resource_group_name: str, namespace_name: str, **kwargs: Any) -> AsyncLROPoller[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.

Keyword-Only Parameters

Name Description
cls

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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of AsyncLROPoller that returns either None or the result of cls(response)

Exceptions

Type Description
See also

check_name_availability

Check the give namespace name availability.

async check_name_availability(parameters: _models.CheckNameAvailability, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CheckNameAvailabilityResult

Parameters

Name Description
parameters
Required

Parameters to check availability of the given namespace name. Is either a CheckNameAvailability 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

CheckNameAvailabilityResult or the result of cls(response)

Exceptions

Type Description

create_or_update_authorization_rule

Creates or updates an authorization rule for a namespace.

async create_or_update_authorization_rule(resource_group_name: str, namespace_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.

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
See also

create_or_update_network_rule_set

Create or update NetworkRuleSet for a Namespace.

async create_or_update_network_rule_set(resource_group_name: str, namespace_name: str, parameters: _models.NetworkRuleSet, *, content_type: str = 'application/json', **kwargs: Any) -> _models.NetworkRuleSet

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.

parameters
Required

The Namespace IpFilterRule. Is either a NetworkRuleSet 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

NetworkRuleSet or the result of cls(response)

Exceptions

Type Description

delete_authorization_rule

Deletes a namespace authorization rule.

async delete_authorization_rule(resource_group_name: str, namespace_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.

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

Gets a description for the specified namespace.

async get(resource_group_name: str, namespace_name: str, **kwargs: Any) -> SBNamespace

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.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

SBNamespace or the result of cls(response)

Exceptions

Type Description
See also

get_authorization_rule

Gets an authorization rule for a namespace by rule name.

async get_authorization_rule(resource_group_name: str, namespace_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.

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

get_network_rule_set

Gets NetworkRuleSet for a Namespace.

async get_network_rule_set(resource_group_name: str, namespace_name: str, **kwargs: Any) -> NetworkRuleSet

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.

Keyword-Only Parameters

Name Description
cls

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

Returns

Type Description

NetworkRuleSet or the result of cls(response)

Exceptions

Type Description

list

Gets all the available namespaces within the subscription, irrespective of the resource groups.

list(**kwargs: Any) -> AsyncIterable[SBNamespace]

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 SBNamespace or the result of cls(response)

Exceptions

Type Description
See also

list_authorization_rules

Gets the authorization rules for a namespace.

list_authorization_rules(resource_group_name: str, namespace_name: str, **kwargs: Any) -> AsyncIterable[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.

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_resource_group

Gets the available namespaces within a resource group.

list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncIterable[SBNamespace]

Parameters

Name Description
resource_group_name
Required
str

Name of the Resource group within the Azure subscription. 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 SBNamespace or the result of cls(response)

Exceptions

Type Description
See also

list_keys

Gets the primary and secondary connection strings for the namespace.

async list_keys(resource_group_name: str, namespace_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.

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

list_network_rule_sets

Gets list of NetworkRuleSet for a Namespace.

list_network_rule_sets(resource_group_name: str, namespace_name: str, **kwargs: Any) -> AsyncIterable[NetworkRuleSet]

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.

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 NetworkRuleSet or the result of cls(response)

Exceptions

Type Description

migrate

This operation Migrate the given namespace to provided name type.

async migrate(resource_group_name: str, namespace_name: str, parameters: _models.SBNamespaceMigrate, *, content_type: str = 'application/json', **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.

parameters
Required

Parameters supplied to migrate namespace type. Is either a SBNamespaceMigrate 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

None or the result of cls(response)

Exceptions

Type Description

regenerate_keys

Regenerates the primary or secondary connection strings for the namespace.

async regenerate_keys(resource_group_name: str, namespace_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.

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

update

Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.

async update(resource_group_name: str, namespace_name: str, parameters: _models.SBNamespaceUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SBNamespace | 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.

parameters
Required

Parameters supplied to update a namespace resource. Is either a SBNamespaceUpdateParameters 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

SBNamespace or None or the result of cls(response)

Exceptions

Type Description

Attributes

models

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