Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The namespaces resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NotificationHubs/namespaces resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.NotificationHubs/namespaces@2017-04-01' = {
scope: resourceSymbolicName or scope
location: 'string'
name: 'string'
properties: {
createdAt: 'string'
critical: bool
dataCenter: 'string'
enabled: bool
name: 'string'
namespaceType: 'string'
provisioningState: 'string'
region: 'string'
scaleUnit: 'string'
serviceBusEndpoint: 'string'
status: 'string'
subscriptionId: 'string'
updatedAt: 'string'
}
sku: {
capacity: int
family: 'string'
name: 'string'
size: 'string'
tier: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.NotificationHubs/namespaces
| Name | Description | Value |
|---|---|---|
| location | Resource location | string |
| name | The resource name | string (required) |
| properties | Properties of the Namespace. | NamespaceProperties |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| sku | The sku of the created namespace | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
NamespaceProperties
| Name | Description | Value |
|---|---|---|
| createdAt | The time the namespace was created. | string |
| critical | Whether or not the namespace is set as Critical. | bool |
| dataCenter | Data center for the namespace | string |
| enabled | Whether or not the namespace is currently enabled. | bool |
| name | The name of the namespace. | string |
| namespaceType | The namespace type. | 'Messaging' 'NotificationHub' |
| provisioningState | Provisioning state of the Namespace. | string |
| region | Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe | string |
| scaleUnit | ScaleUnit where the namespace gets created | string |
| serviceBusEndpoint | Endpoint you can use to perform NotificationHub operations. | string |
| status | Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting | string |
| subscriptionId | The Id of the Azure subscription associated with the namespace. | string |
| updatedAt | The time the namespace was updated. | string |
ResourceTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The capacity of the resource | int |
| family | The Sku Family | string |
| name | Name of the notification hub sku | 'Basic' 'Free' 'Standard' (required) |
| size | The Sku size | string |
| tier | The tier of particular sku | string |
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Create Azure Notification Hub | Creates an Azure Notification Hub, Template originally authored by John Downs. |
ARM template resource definition
The namespaces resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NotificationHubs/namespaces resource, add the following JSON to your template.
{
"type": "Microsoft.NotificationHubs/namespaces",
"apiVersion": "2017-04-01",
"name": "string",
"location": "string",
"properties": {
"createdAt": "string",
"critical": "bool",
"dataCenter": "string",
"enabled": "bool",
"name": "string",
"namespaceType": "string",
"provisioningState": "string",
"region": "string",
"scaleUnit": "string",
"serviceBusEndpoint": "string",
"status": "string",
"subscriptionId": "string",
"updatedAt": "string"
},
"sku": {
"capacity": "int",
"family": "string",
"name": "string",
"size": "string",
"tier": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.NotificationHubs/namespaces
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2017-04-01' |
| location | Resource location | string |
| name | The resource name | string (required) |
| properties | Properties of the Namespace. | NamespaceProperties |
| sku | The sku of the created namespace | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.NotificationHubs/namespaces' |
NamespaceProperties
| Name | Description | Value |
|---|---|---|
| createdAt | The time the namespace was created. | string |
| critical | Whether or not the namespace is set as Critical. | bool |
| dataCenter | Data center for the namespace | string |
| enabled | Whether or not the namespace is currently enabled. | bool |
| name | The name of the namespace. | string |
| namespaceType | The namespace type. | 'Messaging' 'NotificationHub' |
| provisioningState | Provisioning state of the Namespace. | string |
| region | Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe | string |
| scaleUnit | ScaleUnit where the namespace gets created | string |
| serviceBusEndpoint | Endpoint you can use to perform NotificationHub operations. | string |
| status | Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting | string |
| subscriptionId | The Id of the Azure subscription associated with the namespace. | string |
| updatedAt | The time the namespace was updated. | string |
ResourceTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The capacity of the resource | int |
| family | The Sku Family | string |
| name | Name of the notification hub sku | 'Basic' 'Free' 'Standard' (required) |
| size | The Sku size | string |
| tier | The tier of particular sku | string |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Create Azure Notification Hub |
Creates an Azure Notification Hub, Template originally authored by John Downs. |
| Provision a Mobile App with a SQL Database |
This template provisions a Mobile App, SQL Database, and Notification Hub. It configures a connection string in the mobile app for the database and notification hub. |
Terraform (AzAPI provider) resource definition
The namespaces resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.NotificationHubs/namespaces resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.NotificationHubs/namespaces@2017-04-01"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
createdAt = "string"
critical = bool
dataCenter = "string"
enabled = bool
name = "string"
namespaceType = "string"
provisioningState = "string"
region = "string"
scaleUnit = "string"
serviceBusEndpoint = "string"
status = "string"
subscriptionId = "string"
updatedAt = "string"
}
sku = {
capacity = int
family = "string"
name = "string"
size = "string"
tier = "string"
}
}
}
Property Values
Microsoft.NotificationHubs/namespaces
| Name | Description | Value |
|---|---|---|
| location | Resource location | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | Properties of the Namespace. | NamespaceProperties |
| sku | The sku of the created namespace | Sku |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.NotificationHubs/namespaces@2017-04-01" |
NamespaceProperties
| Name | Description | Value |
|---|---|---|
| createdAt | The time the namespace was created. | string |
| critical | Whether or not the namespace is set as Critical. | bool |
| dataCenter | Data center for the namespace | string |
| enabled | Whether or not the namespace is currently enabled. | bool |
| name | The name of the namespace. | string |
| namespaceType | The namespace type. | 'Messaging' 'NotificationHub' |
| provisioningState | Provisioning state of the Namespace. | string |
| region | Specifies the targeted region in which the namespace should be created. It can be any of the following values: Australia East, Australia Southeast, Central US, East US, East US 2, West US, North Central US, South Central US, East Asia, Southeast Asia, Brazil South, Japan East, Japan West, North Europe, West Europe | string |
| scaleUnit | ScaleUnit where the namespace gets created | string |
| serviceBusEndpoint | Endpoint you can use to perform NotificationHub operations. | string |
| status | Status of the namespace. It can be any of these values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting | string |
| subscriptionId | The Id of the Azure subscription associated with the namespace. | string |
| updatedAt | The time the namespace was updated. | string |
ResourceTags
| Name | Description | Value |
|---|
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The capacity of the resource | int |
| family | The Sku Family | string |
| name | Name of the notification hub sku | 'Basic' 'Free' 'Standard' (required) |
| size | The Sku size | string |
| tier | The tier of particular sku | string |
Usage Examples
Terraform Samples
A basic example of deploying Notification Hub Namespace.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "namespace" {
type = "Microsoft.NotificationHubs/namespaces@2017-04-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
enabled = true
namespaceType = "NotificationHub"
region = "westeurope"
}
sku = {
name = "Free"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}