namespaces
Creates, updates, deletes, gets or lists a namespaces resource.
Overview
| Name | namespaces |
| Type | Resource |
| Id | azure.event_hub.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 AuthorizationRule. |
primaryConnectionString | string | Primary connection string of the created namespace AuthorizationRule. |
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 AuthorizationRule. |
secondaryKey | string | A base64-encoded 256-bit primary key for signing and validating the SAS token. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alternateName | string | Alternate name specified when alias and namespace names are same. |
clusterArmId | string | Cluster ARM ID of the Namespace. |
createdAt | string (date-time) | The time the Namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Event Hubs namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
isAutoInflateEnabled | boolean | Value that indicates whether AutoInflate is enabled for eventhub namespace. |
kafkaEnabled | boolean | Value that indicates whether Kafka is enabled for eventhub namespace. |
location | string | Resource location. |
maximumThroughputUnits | integer | Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). |
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". |
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 resource. |
status | string | Status of the Namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | The time the Namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alternateName | string | Alternate name specified when alias and namespace names are same. |
clusterArmId | string | Cluster ARM ID of the Namespace. |
createdAt | string (date-time) | The time the Namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Event Hubs namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
isAutoInflateEnabled | boolean | Value that indicates whether AutoInflate is enabled for eventhub namespace. |
kafkaEnabled | boolean | Value that indicates whether Kafka is enabled for eventhub namespace. |
location | string | Resource location. |
maximumThroughputUnits | integer | Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). |
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". |
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 resource. |
status | string | Status of the Namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | The time the Namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Standard Event Hubs 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 | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
alternateName | string | Alternate name specified when alias and namespace names are same. |
clusterArmId | string | Cluster ARM ID of the Namespace. |
createdAt | string (date-time) | The time the Namespace was created. |
disableLocalAuth | boolean | This property disables SAS authentication for the Event Hubs namespace. |
encryption | object | Properties of BYOK Encryption description. |
identity | object | Properties of BYOK Identity description. |
isAutoInflateEnabled | boolean | Value that indicates whether AutoInflate is enabled for eventhub namespace. |
kafkaEnabled | boolean | Value that indicates whether Kafka is enabled for eventhub namespace. |
location | string | Resource location. |
maximumThroughputUnits | integer | Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). |
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". |
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 resource. |
status | string | Status of the Namespace. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | The time the Namespace was updated. |
zoneRedundant | boolean | Enabling this property creates a Standard Event Hubs Namespace in regions supported availability zones. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_keys | select | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Gets the primary and secondary connection strings for the Namespace. | |
get | select | resource_group_name, namespace_name, subscription_id | Gets the description of the specified namespace. | |
list_by_resource_group | select | resource_group_name, subscription_id | Lists the available Namespaces within a resource group. | |
check_name_availability | select | subscription_id | Check the give Namespace name availability. | |
list | select | subscription_id | Lists all the available Namespaces within a subscription, irrespective of the resource groups. | |
create_or_update | insert | resource_group_name, namespace_name, subscription_id | Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. | |
update | update | resource_group_name, namespace_name, subscription_id | Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. | |
create_or_update | replace | resource_group_name, namespace_name, subscription_id | Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. | |
delete | delete | resource_group_name, namespace_name, subscription_id | Deletes an existing namespace. This operation also removes all associated resources under the namespace. | |
list_network_rule_set | exec | resource_group_name, namespace_name, subscription_id | Gets NetworkRuleSet for a Namespace. | |
list_authorization_rules | exec | resource_group_name, namespace_name, subscription_id | Gets a list of authorization rules for a Namespace. | |
get_network_rule_set | exec | resource_group_name, namespace_name, subscription_id | Gets NetworkRuleSet for a Namespace. | |
create_or_update_network_rule_set | exec | resource_group_name, namespace_name, subscription_id | Create or update NetworkRuleSet for a Namespace. | |
get_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Gets an AuthorizationRule for a Namespace by rule name. | |
create_or_update_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Creates or updates an AuthorizationRule for a Namespace. | |
delete_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Deletes an AuthorizationRule for a Namespace. | |
regenerate_keys | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id, keyType | Regenerates the primary or secondary connection strings for the specified Namespace. |
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.
SELECT
aliasPrimaryConnectionString,
aliasSecondaryConnectionString,
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.event_hub.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 the description of the specified namespace.
SELECT
id,
name,
alternateName,
clusterArmId,
createdAt,
disableLocalAuth,
encryption,
identity,
isAutoInflateEnabled,
kafkaEnabled,
location,
maximumThroughputUnits,
metricId,
minimumTlsVersion,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
FROM azure.event_hub.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the available Namespaces within a resource group.
SELECT
id,
name,
alternateName,
clusterArmId,
createdAt,
disableLocalAuth,
encryption,
identity,
isAutoInflateEnabled,
kafkaEnabled,
location,
maximumThroughputUnits,
metricId,
minimumTlsVersion,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
FROM azure.event_hub.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.event_hub.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Lists all the available Namespaces within a subscription, irrespective of the resource groups.
SELECT
id,
name,
alternateName,
clusterArmId,
createdAt,
disableLocalAuth,
encryption,
identity,
isAutoInflateEnabled,
kafkaEnabled,
location,
maximumThroughputUnits,
metricId,
minimumTlsVersion,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
serviceBusEndpoint,
sku,
status,
systemData,
tags,
type,
updatedAt,
zoneRedundant
FROM azure.event_hub.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
INSERT INTO azure.event_hub.namespaces (
location,
tags,
sku,
identity,
properties,
resource_group_name,
namespace_name,
subscription_id
)
SELECT
'{{ location }}',
'{{ 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: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: sku
description: |
Properties of sku resource.
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 }}"
clusterArmId: "{{ clusterArmId }}"
isAutoInflateEnabled: {{ isAutoInflateEnabled }}
publicNetworkAccess: "{{ publicNetworkAccess }}"
maximumThroughputUnits: {{ maximumThroughputUnits }}
kafkaEnabled: {{ kafkaEnabled }}
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 }}"
UPDATE examples
- update
Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
UPDATE azure.event_hub.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 namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent.
REPLACE azure.event_hub.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;
DELETE examples
- delete
Deletes an existing namespace. This operation also removes all associated resources under the namespace.
DELETE FROM azure.event_hub.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_set
- 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 NetworkRuleSet for a Namespace.
EXEC azure.event_hub.namespaces.list_network_rule_set
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets a list of authorization rules for a Namespace.
EXEC azure.event_hub.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.event_hub.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.event_hub.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 AuthorizationRule for a Namespace by rule name.
EXEC azure.event_hub.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 AuthorizationRule for a Namespace.
EXEC azure.event_hub.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 an AuthorizationRule for a Namespace.
EXEC azure.event_hub.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 specified Namespace.
EXEC azure.event_hub.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 }}"
}'
;