Skip to main content

namespaces

Creates, updates, deletes, gets or lists a namespaces resource.

Overview

Namenamespaces
TypeResource
Idazure.service_bus.namespaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
aliasPrimaryConnectionStringstringPrimary connection string of the alias if GEO DR is enabled.
aliasSecondaryConnectionStringstringSecondary connection string of the alias if GEO DR is enabled.
keyNamestringA string that describes the authorization rule.
primaryConnectionStringstringPrimary connection string of the created namespace authorization rule.
primaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.
secondaryConnectionStringstringSecondary connection string of the created namespace authorization rule.
secondaryKeystringA base64-encoded 256-bit primary key for signing and validating the SAS token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_keysselectresource_group_name, namespace_name, authorization_rule_name, subscription_idGets the primary and secondary connection strings for the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx
getselectresource_group_name, namespace_name, subscription_idGets a description for the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx
list_by_resource_groupselectresource_group_name, subscription_idGets the available namespaces within a resource group. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx
check_name_availabilityselectsubscription_idCheck the give namespace name availability.
listselectsubscription_idGets all the available namespaces within the subscription, irrespective of the resource groups. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx
create_or_updateinsertresource_group_name, namespace_name, subscription_id, locationCreates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx
updateupdateresource_group_name, namespace_name, subscription_idUpdates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
create_or_updatereplaceresource_group_name, namespace_name, subscription_id, locationCreates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx
deletedeleteresource_group_name, namespace_name, subscription_idDeletes an existing namespace. This operation also removes all associated resources under the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx
list_network_rule_setsexecresource_group_name, namespace_name, subscription_idGets list of NetworkRuleSet for a Namespace.
list_authorization_rulesexecresource_group_name, namespace_name, subscription_idGets the authorization rules for a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx
get_network_rule_setexecresource_group_name, namespace_name, subscription_idGets NetworkRuleSet for a Namespace.
create_or_update_network_rule_setexecresource_group_name, namespace_name, subscription_idCreate or update NetworkRuleSet for a Namespace.
get_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idGets an authorization rule for a namespace by rule name. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx
create_or_update_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idCreates or updates an authorization rule for a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx
delete_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idDeletes a namespace authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx
regenerate_keysexecresource_group_name, namespace_name, authorization_rule_name, subscription_id, keyTypeRegenerates the primary or secondary connection strings for the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
authorization_rule_namestringThe authorization rule name. Required.
namespace_namestringThe namespace name. Required.
resource_group_namestringName of the Resource group within the Azure subscription. Required.
subscription_idstring

SELECT examples

Gets the primary and secondary connection strings for the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639398.aspx

SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.service_bus.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND authorization_rule_name = '{{ authorization_rule_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx

INSERT INTO azure.service_bus.namespaces (
location,
tags,
sku,
identity,
properties,
resource_group_name,
namespace_name,
subscription_id
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ sku }}',
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

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

UPDATE azure.service_bus.namespaces
SET
location = '{{ location }}',
tags = '{{ tags }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Creates or updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639408.aspx

REPLACE azure.service_bus.namespaces
SET
location = '{{ location }}',
tags = '{{ tags }}',
sku = '{{ sku }}',
identity = '{{ identity }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes an existing namespace. This operation also removes all associated resources under the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639389.aspx

DELETE FROM azure.service_bus.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets list of NetworkRuleSet for a Namespace.

EXEC azure.service_bus.namespaces.list_network_rule_sets 
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;