namespaces
Creates, updates, deletes, gets or lists a namespaces resource.
Overview
| Name | namespaces |
| Type | Resource |
| Id | azure.notification_hubs.namespaces |
Fields
The following fields are returned by SELECT queries:
- list_keys
- get
- list
- check_availability
- list_all
| Name | Datatype | Description |
|---|---|---|
keyName | string | Gets or sets keyName of the created AuthorizationRule. |
primaryConnectionString | string | Gets or sets primaryConnectionString of the AuthorizationRule. |
primaryKey | string | Gets or sets primaryKey of the created AuthorizationRule. |
secondaryConnectionString | string | Gets or sets secondaryConnectionString of the created AuthorizationRule. |
secondaryKey | string | Gets or sets secondaryKey of the created AuthorizationRule. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
createdAt | string (date-time) | Time when the namespace was created. |
critical | boolean | Gets or sets whether or not the namespace is set as Critical. |
dataCenter | string | Deprecated. |
enabled | boolean | Gets or sets whether or not the namespace is currently enabled. |
location | string | The geo-location where the resource lives. Required. |
metricId | string | Azure Insights Metrics id. |
namespaceType | string | Defines values for NamespaceType. Known values are: "Messaging" and "NotificationHub". |
networkAcls | object | A collection of network authorization rules. |
pnsCredentials | object | Collection of Notification Hub or Notification Hub Namespace PNS credentials. |
privateEndpointConnections | array | Private Endpoint Connections for namespace. |
provisioningState | string | Defines values for OperationProvisioningState. Known values are: "Unknown", "InProgress", "Succeeded", "Failed", "Canceled", "Pending", and "Disabled". |
publicNetworkAccess | string | Type of public network access. Known values are: "Enabled" and "Disabled". |
region | string | Region. The value is always set to the same value as Namespace.Location, so we are deprecating this property. |
replicationRegion | string | Allowed replication region. Known values are: "Default", "WestUs2", "NorthEurope", "AustraliaEast", "BrazilSouth", "SouthEastAsia", "SouthAfricaNorth", and "None". |
scaleUnit | string | Gets or sets scaleUnit where the namespace gets created. |
serviceBusEndpoint | string | Gets or sets endpoint you can use to perform NotificationHub operations. |
sku | object | The Sku description for a namespace. Required. |
status | string | Namespace status. Known values are: "Created", "Creating", "Suspended", and "Deleting". |
subscriptionId | string | Namespace subscription id. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | Time when the namespace was updated. |
zoneRedundancy | string | Namespace SKU name. Known values are: "Disabled" and "Enabled". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
createdAt | string (date-time) | Time when the namespace was created. |
critical | boolean | Gets or sets whether or not the namespace is set as Critical. |
dataCenter | string | Deprecated. |
enabled | boolean | Gets or sets whether or not the namespace is currently enabled. |
location | string | The geo-location where the resource lives. Required. |
metricId | string | Azure Insights Metrics id. |
namespaceType | string | Defines values for NamespaceType. Known values are: "Messaging" and "NotificationHub". |
networkAcls | object | A collection of network authorization rules. |
pnsCredentials | object | Collection of Notification Hub or Notification Hub Namespace PNS credentials. |
privateEndpointConnections | array | Private Endpoint Connections for namespace. |
provisioningState | string | Defines values for OperationProvisioningState. Known values are: "Unknown", "InProgress", "Succeeded", "Failed", "Canceled", "Pending", and "Disabled". |
publicNetworkAccess | string | Type of public network access. Known values are: "Enabled" and "Disabled". |
region | string | Region. The value is always set to the same value as Namespace.Location, so we are deprecating this property. |
replicationRegion | string | Allowed replication region. Known values are: "Default", "WestUs2", "NorthEurope", "AustraliaEast", "BrazilSouth", "SouthEastAsia", "SouthAfricaNorth", and "None". |
scaleUnit | string | Gets or sets scaleUnit where the namespace gets created. |
serviceBusEndpoint | string | Gets or sets endpoint you can use to perform NotificationHub operations. |
sku | object | The Sku description for a namespace. Required. |
status | string | Namespace status. Known values are: "Created", "Creating", "Suspended", and "Deleting". |
subscriptionId | string | Namespace subscription id. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | Time when the namespace was updated. |
zoneRedundancy | string | Namespace SKU name. Known values are: "Disabled" and "Enabled". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
isAvailiable | boolean | Gets or sets true if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false. |
location | string | Deprecated - only for compatibility. |
sku | object | The Sku description for a namespace. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Deprecated - only for compatibility. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long |
name | string | The name of the resource. |
createdAt | string (date-time) | Time when the namespace was created. |
critical | boolean | Gets or sets whether or not the namespace is set as Critical. |
dataCenter | string | Deprecated. |
enabled | boolean | Gets or sets whether or not the namespace is currently enabled. |
location | string | The geo-location where the resource lives. Required. |
metricId | string | Azure Insights Metrics id. |
namespaceType | string | Defines values for NamespaceType. Known values are: "Messaging" and "NotificationHub". |
networkAcls | object | A collection of network authorization rules. |
pnsCredentials | object | Collection of Notification Hub or Notification Hub Namespace PNS credentials. |
privateEndpointConnections | array | Private Endpoint Connections for namespace. |
provisioningState | string | Defines values for OperationProvisioningState. Known values are: "Unknown", "InProgress", "Succeeded", "Failed", "Canceled", "Pending", and "Disabled". |
publicNetworkAccess | string | Type of public network access. Known values are: "Enabled" and "Disabled". |
region | string | Region. The value is always set to the same value as Namespace.Location, so we are deprecating this property. |
replicationRegion | string | Allowed replication region. Known values are: "Default", "WestUs2", "NorthEurope", "AustraliaEast", "BrazilSouth", "SouthEastAsia", "SouthAfricaNorth", and "None". |
scaleUnit | string | Gets or sets scaleUnit where the namespace gets created. |
serviceBusEndpoint | string | Gets or sets endpoint you can use to perform NotificationHub operations. |
sku | object | The Sku description for a namespace. Required. |
status | string | Namespace status. Known values are: "Created", "Creating", "Suspended", and "Deleting". |
subscriptionId | string | Namespace subscription id. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updatedAt | string (date-time) | Time when the namespace was updated. |
zoneRedundancy | string | Namespace SKU name. Known values are: "Disabled" and "Enabled". |
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 ConnectionStrings to the namespace. Gets the Primary and Secondary ConnectionStrings to the namespace. | |
get | select | resource_group_name, namespace_name, subscription_id | Returns the given namespace. Returns the given namespace. | |
list | select | resource_group_name, subscription_id | $skipToken, $top | Lists the available namespaces within a resource group. Lists the available namespaces within a resource group. |
check_availability | select | subscription_id | Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. | |
list_all | select | subscription_id | $skipToken, $top | Lists all the available namespaces within the subscription. Lists all the available namespaces within the subscription. |
create_or_update | insert | resource_group_name, namespace_name, subscription_id, location, sku | Creates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent. | |
update | update | resource_group_name, namespace_name, subscription_id | Patches the existing namespace. Patches the existing namespace. | |
create_or_update | replace | resource_group_name, namespace_name, subscription_id, location, sku | Creates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent. | |
delete | delete | resource_group_name, namespace_name, subscription_id | Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. | |
list_authorization_rules | exec | resource_group_name, namespace_name, subscription_id | Gets the authorization rules for a namespace. Gets the authorization rules for a namespace. | |
get_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Gets an authorization rule for a namespace by name. Gets an authorization rule for a namespace by name. | |
create_or_update_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Creates an authorization rule for a namespace. Creates an authorization rule for a namespace. | |
delete_authorization_rule | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id | Deletes a namespace authorization rule. Deletes a namespace authorization rule. | |
get_pns_credentials | exec | resource_group_name, namespace_name, subscription_id | Lists the PNS credentials associated with a namespace. Lists the PNS credentials associated with a namespace. | |
regenerate_keys | exec | resource_group_name, namespace_name, authorization_rule_name, subscription_id, policyKey | Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. |
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 | Authorization Rule Name. Required. |
namespace_name | string | Namespace name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$skipToken | string | Skip token for subsequent requests. Default value is None. |
$top | integer | Maximum number of results to return. Default value is 100. |
SELECT examples
- list_keys
- get
- list
- check_availability
- list_all
Gets the Primary and Secondary ConnectionStrings to the namespace. Gets the Primary and Secondary ConnectionStrings to the namespace.
SELECT
keyName,
primaryConnectionString,
primaryKey,
secondaryConnectionString,
secondaryKey
FROM azure.notification_hubs.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
;
Returns the given namespace. Returns the given namespace.
SELECT
id,
name,
createdAt,
critical,
dataCenter,
enabled,
location,
metricId,
namespaceType,
networkAcls,
pnsCredentials,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
region,
replicationRegion,
scaleUnit,
serviceBusEndpoint,
sku,
status,
subscriptionId,
systemData,
tags,
type,
updatedAt,
zoneRedundancy
FROM azure.notification_hubs.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. Lists the available namespaces within a resource group.
SELECT
id,
name,
createdAt,
critical,
dataCenter,
enabled,
location,
metricId,
namespaceType,
networkAcls,
pnsCredentials,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
region,
replicationRegion,
scaleUnit,
serviceBusEndpoint,
sku,
status,
subscriptionId,
systemData,
tags,
type,
updatedAt,
zoneRedundancy
FROM azure.notification_hubs.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $skipToken = '{{ $skipToken }}'
AND $top = '{{ $top }}'
;
Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name. Checks the availability of the given service namespace across all Azure subscriptions. This is useful because the domain name is created based on the service namespace name.
SELECT
id,
name,
isAvailiable,
location,
sku,
systemData,
tags,
type
FROM azure.notification_hubs.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
;
Lists all the available namespaces within the subscription. Lists all the available namespaces within the subscription.
SELECT
id,
name,
createdAt,
critical,
dataCenter,
enabled,
location,
metricId,
namespaceType,
networkAcls,
pnsCredentials,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
region,
replicationRegion,
scaleUnit,
serviceBusEndpoint,
sku,
status,
subscriptionId,
systemData,
tags,
type,
updatedAt,
zoneRedundancy
FROM azure.notification_hubs.namespaces
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $skipToken = '{{ $skipToken }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Creates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent.
INSERT INTO azure.notification_hubs.namespaces (
tags,
location,
sku,
properties,
resource_group_name,
namespace_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ sku }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
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: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: sku
description: |
The Sku description for a namespace. Required.
value:
name: "{{ name }}"
tier: "{{ tier }}"
size: "{{ size }}"
family: "{{ family }}"
capacity: {{ capacity }}
- name: properties
value:
provisioningState: "{{ provisioningState }}"
status: "{{ status }}"
namespaceType: "{{ namespaceType }}"
replicationRegion: "{{ replicationRegion }}"
zoneRedundancy: "{{ zoneRedundancy }}"
networkAcls:
ipRules:
- ipMask: "{{ ipMask }}"
rights: "{{ rights }}"
publicNetworkRule:
rights:
- "{{ rights }}"
pnsCredentials:
admCredential:
properties:
clientId: "{{ clientId }}"
clientSecret: "{{ clientSecret }}"
authTokenUrl: "{{ authTokenUrl }}"
apnsCredential:
properties:
apnsCertificate: "{{ apnsCertificate }}"
certificateKey: "{{ certificateKey }}"
endpoint: "{{ endpoint }}"
thumbprint: "{{ thumbprint }}"
keyId: "{{ keyId }}"
appName: "{{ appName }}"
appId: "{{ appId }}"
token: "{{ token }}"
baiduCredential:
properties:
baiduApiKey: "{{ baiduApiKey }}"
baiduEndPoint: "{{ baiduEndPoint }}"
baiduSecretKey: "{{ baiduSecretKey }}"
browserCredential:
properties:
subject: "{{ subject }}"
vapidPrivateKey: "{{ vapidPrivateKey }}"
vapidPublicKey: "{{ vapidPublicKey }}"
gcmCredential:
properties:
gcmEndpoint: "{{ gcmEndpoint }}"
googleApiKey: "{{ googleApiKey }}"
mpnsCredential:
properties:
mpnsCertificate: "{{ mpnsCertificate }}"
certificateKey: "{{ certificateKey }}"
thumbprint: "{{ thumbprint }}"
wnsCredential:
properties:
packageSid: "{{ packageSid }}"
secretKey: "{{ secretKey }}"
windowsLiveEndpoint: "{{ windowsLiveEndpoint }}"
certificateKey: "{{ certificateKey }}"
wnsCertificate: "{{ wnsCertificate }}"
xiaomiCredential:
properties:
appSecret: "{{ appSecret }}"
endpoint: "{{ endpoint }}"
fcmV1Credential:
properties:
clientEmail: "{{ clientEmail }}"
privateKey: "{{ privateKey }}"
projectId: "{{ projectId }}"
scaleUnit: "{{ scaleUnit }}"
dataCenter: "{{ dataCenter }}"
publicNetworkAccess: "{{ publicNetworkAccess }}"
UPDATE examples
- update
Patches the existing namespace. Patches the existing namespace.
UPDATE azure.notification_hubs.namespaces
SET
sku = '{{ sku }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
sku,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Creates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent.
REPLACE azure.notification_hubs.namespaces
SET
tags = '{{ tags }}',
location = '{{ location }}',
sku = '{{ sku }}',
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
AND sku = '{{ sku }}' --required
RETURNING
id,
name,
location,
properties,
sku,
systemData,
tags,
type;
DELETE examples
- delete
Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace. Deletes an existing namespace. This operation also removes all associated notificationHubs under the namespace.
DELETE FROM azure.notification_hubs.namespaces
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- list_authorization_rules
- get_authorization_rule
- create_or_update_authorization_rule
- delete_authorization_rule
- get_pns_credentials
- regenerate_keys
Gets the authorization rules for a namespace. Gets the authorization rules for a namespace.
EXEC azure.notification_hubs.namespaces.list_authorization_rules
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets an authorization rule for a namespace by name. Gets an authorization rule for a namespace by name.
EXEC azure.notification_hubs.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 an authorization rule for a namespace. Creates an authorization rule for a namespace.
EXEC azure.notification_hubs.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=
'{
"location": "{{ location }}",
"tags": "{{ tags }}",
"properties": "{{ properties }}"
}'
;
Deletes a namespace authorization rule. Deletes a namespace authorization rule.
EXEC azure.notification_hubs.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
;
Lists the PNS credentials associated with a namespace. Lists the PNS credentials associated with a namespace.
EXEC azure.notification_hubs.namespaces.get_pns_credentials
@resource_group_name='{{ resource_group_name }}' --required,
@namespace_name='{{ namespace_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule. Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule.
EXEC azure.notification_hubs.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=
'{
"policyKey": "{{ policyKey }}"
}'
;