Skip to main content

namespaces

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

Overview

Namenamespaces
TypeResource
Idazure.notification_hubs.namespaces

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
keyNamestringGets or sets keyName of the created AuthorizationRule.
primaryConnectionStringstringGets or sets primaryConnectionString of the AuthorizationRule.
primaryKeystringGets or sets primaryKey of the created AuthorizationRule.
secondaryConnectionStringstringGets or sets secondaryConnectionString of the created AuthorizationRule.
secondaryKeystringGets or sets secondaryKey of the created AuthorizationRule.

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 ConnectionStrings to the namespace. Gets the Primary and Secondary ConnectionStrings to the namespace.
getselectresource_group_name, namespace_name, subscription_idReturns the given namespace. Returns the given namespace.
listselectresource_group_name, subscription_id$skipToken, $topLists the available namespaces within a resource group. Lists the available namespaces within a resource group.
check_availabilityselectsubscription_idChecks 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_allselectsubscription_id$skipToken, $topLists all the available namespaces within the subscription. Lists all the available namespaces within the subscription.
create_or_updateinsertresource_group_name, namespace_name, subscription_id, location, skuCreates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent.
updateupdateresource_group_name, namespace_name, subscription_idPatches the existing namespace. Patches the existing namespace.
create_or_updatereplaceresource_group_name, namespace_name, subscription_id, location, skuCreates / Updates a Notification Hub namespace. This operation is idempotent. Creates / Updates a Notification Hub namespace. This operation is idempotent.
deletedeleteresource_group_name, namespace_name, subscription_idDeletes 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_rulesexecresource_group_name, namespace_name, subscription_idGets the authorization rules for a namespace. Gets the authorization rules for a namespace.
get_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idGets an authorization rule for a namespace by name. Gets an authorization rule for a namespace by name.
create_or_update_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idCreates an authorization rule for a namespace. Creates an authorization rule for a namespace.
delete_authorization_ruleexecresource_group_name, namespace_name, authorization_rule_name, subscription_idDeletes a namespace authorization rule. Deletes a namespace authorization rule.
get_pns_credentialsexecresource_group_name, namespace_name, subscription_idLists the PNS credentials associated with a namespace. Lists the PNS credentials associated with a namespace.
regenerate_keysexecresource_group_name, namespace_name, authorization_rule_name, subscription_id, policyKeyRegenerates 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.

NameDatatypeDescription
authorization_rule_namestringAuthorization Rule Name. Required.
namespace_namestringNamespace name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$skipTokenstringSkip token for subsequent requests. Default value is None.
$topintegerMaximum number of results to return. Default value is 100.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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

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
;