namespaces
Creates, updates, deletes, gets or lists a namespaces resource.
Overview
| Name | namespaces |
| Type | Resource |
| Id | azure.service_bus.namespaces |
Fields
The following fields are returned by SELECT queries:
- list_keys
- get
- list_by_resource_group
- check_name_availability
- list
| Name | Datatype | Description |
|---|---|---|
aliasPrimaryConnectionString | string | Primary connection string of the alias if GEO DR is enabled. |
aliasSecondaryConnectionString | string | Secondary connection string of the alias if GEO DR is enabled. |
keyName | string | A string that describes the authorization rule. |
primaryConnectionString | string | Primary connection string of the created namespace authorization rule. |
primaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
secondaryConnectionString | string | Secondary connection string of the created namespace authorization rule. |
secondaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
alternateName | string | Alternate name for namespace. |
createdAt | string (date-time) | The time the namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Service Bus namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
location | string | The Geo-location where the resource lives. Required. |
metricId | string | Identifier for Azure Insights metrics. |
minimumTlsVersion | string | The minimum TLS version for the cluster to support, e.g. '1.2'. Known values are: "1.0", "1.1", and "1.2". |
premiumMessagingPartitions | integer | The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the namespace. |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". |
serviceBusEndpoint | string | Endpoint you can use to perform Service Bus operations. |
sku | object | Properties of SKU. |
status | string | Status of the namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
updatedAt | string (date-time) | The time the namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
alternateName | string | Alternate name for namespace. |
createdAt | string (date-time) | The time the namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Service Bus namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
location | string | The Geo-location where the resource lives. Required. |
metricId | string | Identifier for Azure Insights metrics. |
minimumTlsVersion | string | The minimum TLS version for the cluster to support, e.g. '1.2'. Known values are: "1.0", "1.1", and "1.2". |
premiumMessagingPartitions | integer | The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the namespace. |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". |
serviceBusEndpoint | string | Endpoint you can use to perform Service Bus operations. |
sku | object | Properties of SKU. |
status | string | Status of the namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
updatedAt | string (date-time) | The time the namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. |
| Name | Datatype | Description |
|---|---|---|
message | string | The detailed info regarding the reason associated with the namespace. |
nameAvailable | boolean | Value indicating namespace is availability, true if the namespace is available; otherwise, false. |
reason | string | The reason for unavailability of a namespace. Known values are: "None", "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", and "TooManyNamespaceInCurrentSubscription". |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource Id. |
name | string | Resource name. |
alternateName | string | Alternate name for namespace. |
createdAt | string (date-time) | The time the namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Service Bus namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
location | string | The Geo-location where the resource lives. Required. |
metricId | string | Identifier for Azure Insights metrics. |
minimumTlsVersion | string | The minimum TLS version for the cluster to support, e.g. '1.2'. Known values are: "1.0", "1.1", and "1.2". |
premiumMessagingPartitions | integer | The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4. |
privateEndpointConnections | array | List of private endpoint connections. |
provisioningState | string | Provisioning state of the namespace. |
publicNetworkAccess | string | This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". |
serviceBusEndpoint | string | Endpoint you can use to perform Service Bus operations. |
sku | object | Properties of SKU. |
status | string | Status of the namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Resource type. |
updatedAt | string (date-time) | The time the namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones. |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
authorization_rule_name | string | The authorization rule name. Required. |
namespace_name | string | The namespace name. Required. |
resource_group_name | string | Name of the Resource group within the Azure subscription. Required. |
subscription_id | string |
SELECT examples
- list_keys
- get
- list_by_resource_group
- check_name_availability
- list
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
;
Gets a description for the specified namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639379.aspx
SELECT
id,
name,
alternateName,
createdAt,
disableLocalAuth,
encryption,
identity,
location,
metricId,
minimumTlsVersion,
premiumMessagingPartitions,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
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
;
Gets the available namespaces within a resource group. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx
SELECT
id,
name,
alternateName,
createdAt,
disableLocalAuth,
encryption,
identity,
location,
metricId,
minimumTlsVersion,
premiumMessagingPartitions,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
FROM azure.service_bus.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Check the give namespace name availability.
SELECT
message,
nameAvailable,
reason
FROM azure.service_bus.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Gets all the available namespaces within the subscription, irrespective of the resource groups. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639412.aspx
SELECT
id,
name,
alternateName,
createdAt,
disableLocalAuth,
encryption,
identity,
location,
metricId,
minimumTlsVersion,
premiumMessagingPartitions,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
FROM azure.service_bus.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: namespaces
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the namespaces resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the namespaces resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the namespaces resource.
- name: location
value: "{{ location }}"
description: |
The Geo-location where the resource lives. Required.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: sku
description: |
Properties of SKU.
value:
name: "{{ name }}"
tier: "{{ tier }}"
capacity: {{ capacity }}
- name: identity
description: |
Properties of BYOK Identity description.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: properties
value:
minimumTlsVersion: "{{ minimumTlsVersion }}"
zoneRedundant: {{ zoneRedundant }}
encryption:
keyVaultProperties:
- keyName: "{{ keyName }}"
keyVaultUri: "{{ keyVaultUri }}"
keyVersion: "{{ keyVersion }}"
identity:
userAssignedIdentity: "{{ userAssignedIdentity }}"
keySource: "{{ keySource }}"
requireInfrastructureEncryption: {{ requireInfrastructureEncryption }}
privateEndpointConnections:
- id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
location: "{{ location }}"
systemData:
createdBy: "{{ createdBy }}"
createdByType: "{{ createdByType }}"
createdAt: "{{ createdAt }}"
lastModifiedBy: "{{ lastModifiedBy }}"
lastModifiedByType: "{{ lastModifiedByType }}"
lastModifiedAt: "{{ lastModifiedAt }}"
properties:
privateEndpoint:
id: "{{ id }}"
privateLinkServiceConnectionState:
status: "{{ status }}"
description: "{{ description }}"
provisioningState: "{{ provisioningState }}"
disableLocalAuth: {{ disableLocalAuth }}
alternateName: "{{ alternateName }}"
publicNetworkAccess: "{{ publicNetworkAccess }}"
premiumMessagingPartitions: {{ premiumMessagingPartitions }}
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- list_network_rule_sets
- list_authorization_rules
- get_network_rule_set
- create_or_update_network_rule_set
- get_authorization_rule
- create_or_update_authorization_rule
- delete_authorization_rule
- regenerate_keys
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
;
Gets the authorization rules for a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639376.aspx
EXEC azure.service_bus.namespaces.list_authorization_rules
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets NetworkRuleSet for a Namespace.
EXEC azure.service_bus.namespaces.get_network_rule_set
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Create or update NetworkRuleSet for a Namespace.
EXEC azure.service_bus.namespaces.create_or_update_network_rule_set
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Gets an authorization rule for a namespace by rule name. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639392.aspx
EXEC azure.service_bus.namespaces.get_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Creates or updates an authorization rule for a namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639410.aspx
EXEC azure.service_bus.namespaces.create_or_update_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;
Deletes a namespace authorization rule. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt639417.aspx
EXEC azure.service_bus.namespaces.delete_authorization_rule
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerates the primary or secondary connection strings for the namespace. .. seealso:: - https://msdn.microsoft.com/en-us/library/azure/mt718977.aspx
EXEC azure.service_bus.namespaces.regenerate_keys
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@authorization_rule_name='{{ authorization_rule_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"keyType": "{{ keyType }}",
"key": "{{ key }}"
}'
;