1. Packages
  2. Azure Classic
  3. API Docs
  4. notificationhub
  5. Namespace

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.notificationhub.Namespace

Explore with Pulumi AI

Manages a Notification Hub Namespace.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "notificationhub-resources",
    location: "West Europe",
});
const exampleNamespace = new azure.notificationhub.Namespace("example", {
    name: "myappnamespace",
    resourceGroupName: example.name,
    location: example.location,
    namespaceType: "NotificationHub",
    skuName: "Free",
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="notificationhub-resources",
    location="West Europe")
example_namespace = azure.notificationhub.Namespace("example",
    name="myappnamespace",
    resource_group_name=example.name,
    location=example.location,
    namespace_type="NotificationHub",
    sku_name="Free")
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/notificationhub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("notificationhub-resources"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = notificationhub.NewNamespace(ctx, "example", &notificationhub.NamespaceArgs{
			Name:              pulumi.String("myappnamespace"),
			ResourceGroupName: example.Name,
			Location:          example.Location,
			NamespaceType:     pulumi.String("NotificationHub"),
			SkuName:           pulumi.String("Free"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "notificationhub-resources",
        Location = "West Europe",
    });

    var exampleNamespace = new Azure.NotificationHub.Namespace("example", new()
    {
        Name = "myappnamespace",
        ResourceGroupName = example.Name,
        Location = example.Location,
        NamespaceType = "NotificationHub",
        SkuName = "Free",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.notificationhub.Namespace;
import com.pulumi.azure.notificationhub.NamespaceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("notificationhub-resources")
            .location("West Europe")
            .build());

        var exampleNamespace = new Namespace("exampleNamespace", NamespaceArgs.builder()
            .name("myappnamespace")
            .resourceGroupName(example.name())
            .location(example.location())
            .namespaceType("NotificationHub")
            .skuName("Free")
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: notificationhub-resources
      location: West Europe
  exampleNamespace:
    type: azure:notificationhub:Namespace
    name: example
    properties:
      name: myappnamespace
      resourceGroupName: ${example.name}
      location: ${example.location}
      namespaceType: NotificationHub
      skuName: Free
Copy

Create Namespace Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Namespace(name: string, args: NamespaceArgs, opts?: CustomResourceOptions);
@overload
def Namespace(resource_name: str,
              args: NamespaceArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def Namespace(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              namespace_type: Optional[str] = None,
              resource_group_name: Optional[str] = None,
              sku_name: Optional[str] = None,
              enabled: Optional[bool] = None,
              location: Optional[str] = None,
              name: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None)
func NewNamespace(ctx *Context, name string, args NamespaceArgs, opts ...ResourceOption) (*Namespace, error)
public Namespace(string name, NamespaceArgs args, CustomResourceOptions? opts = null)
public Namespace(String name, NamespaceArgs args)
public Namespace(String name, NamespaceArgs args, CustomResourceOptions options)
type: azure:notificationhub:Namespace
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. NamespaceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var azureNamespaceResource = new Azure.NotificationHub.Namespace("azureNamespaceResource", new()
{
    NamespaceType = "string",
    ResourceGroupName = "string",
    SkuName = "string",
    Enabled = false,
    Location = "string",
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := notificationhub.NewNamespace(ctx, "azureNamespaceResource", &notificationhub.NamespaceArgs{
	NamespaceType:     pulumi.String("string"),
	ResourceGroupName: pulumi.String("string"),
	SkuName:           pulumi.String("string"),
	Enabled:           pulumi.Bool(false),
	Location:          pulumi.String("string"),
	Name:              pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var azureNamespaceResource = new Namespace("azureNamespaceResource", NamespaceArgs.builder()
    .namespaceType("string")
    .resourceGroupName("string")
    .skuName("string")
    .enabled(false)
    .location("string")
    .name("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
azure_namespace_resource = azure.notificationhub.Namespace("azureNamespaceResource",
    namespace_type="string",
    resource_group_name="string",
    sku_name="string",
    enabled=False,
    location="string",
    name="string",
    tags={
        "string": "string",
    })
Copy
const azureNamespaceResource = new azure.notificationhub.Namespace("azureNamespaceResource", {
    namespaceType: "string",
    resourceGroupName: "string",
    skuName: "string",
    enabled: false,
    location: "string",
    name: "string",
    tags: {
        string: "string",
    },
});
Copy
type: azure:notificationhub:Namespace
properties:
    enabled: false
    location: string
    name: string
    namespaceType: string
    resourceGroupName: string
    skuName: string
    tags:
        string: string
Copy

Namespace Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Namespace resource accepts the following input properties:

NamespaceType
This property is required.
Changes to this property will trigger replacement.
string
The Type of Namespace - possible values are Messaging or NotificationHub.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
SkuName This property is required. string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
Enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
Location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
NamespaceType
This property is required.
Changes to this property will trigger replacement.
string
The Type of Namespace - possible values are Messaging or NotificationHub.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
SkuName This property is required. string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
Enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
Location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
namespaceType
This property is required.
Changes to this property will trigger replacement.
String
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
skuName This property is required. String
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
enabled Changes to this property will trigger replacement. Boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. String
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
namespaceType
This property is required.
Changes to this property will trigger replacement.
string
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
skuName This property is required. string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
enabled Changes to this property will trigger replacement. boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
namespace_type
This property is required.
Changes to this property will trigger replacement.
str
The Type of Namespace - possible values are Messaging or NotificationHub.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
sku_name This property is required. str
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. str
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
namespaceType
This property is required.
Changes to this property will trigger replacement.
String
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
skuName This property is required. String
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
enabled Changes to this property will trigger replacement. Boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. String
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Namespace resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
ServicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
Id string
The provider-assigned unique ID for this managed resource.
ServicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
id String
The provider-assigned unique ID for this managed resource.
servicebusEndpoint String
The ServiceBus Endpoint for this Notification Hub Namespace.
id string
The provider-assigned unique ID for this managed resource.
servicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
id str
The provider-assigned unique ID for this managed resource.
servicebus_endpoint str
The ServiceBus Endpoint for this Notification Hub Namespace.
id String
The provider-assigned unique ID for this managed resource.
servicebusEndpoint String
The ServiceBus Endpoint for this Notification Hub Namespace.

Look up Existing Namespace Resource

Get an existing Namespace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: NamespaceState, opts?: CustomResourceOptions): Namespace
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        namespace_type: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        servicebus_endpoint: Optional[str] = None,
        sku_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> Namespace
func GetNamespace(ctx *Context, name string, id IDInput, state *NamespaceState, opts ...ResourceOption) (*Namespace, error)
public static Namespace Get(string name, Input<string> id, NamespaceState? state, CustomResourceOptions? opts = null)
public static Namespace get(String name, Output<String> id, NamespaceState state, CustomResourceOptions options)
resources:  _:    type: azure:notificationhub:Namespace    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
Location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
NamespaceType Changes to this property will trigger replacement. string
The Type of Namespace - possible values are Messaging or NotificationHub.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
ServicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
SkuName string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
Enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
Location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
Name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
NamespaceType Changes to this property will trigger replacement. string
The Type of Namespace - possible values are Messaging or NotificationHub.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
ServicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
SkuName string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
Tags map[string]string
A mapping of tags to assign to the resource.
enabled Changes to this property will trigger replacement. Boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. String
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
namespaceType Changes to this property will trigger replacement. String
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName Changes to this property will trigger replacement. String
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
servicebusEndpoint String
The ServiceBus Endpoint for this Notification Hub Namespace.
skuName String
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
tags Map<String,String>
A mapping of tags to assign to the resource.
enabled Changes to this property will trigger replacement. boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. string
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. string
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
namespaceType Changes to this property will trigger replacement. string
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
servicebusEndpoint string
The ServiceBus Endpoint for this Notification Hub Namespace.
skuName string
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
enabled Changes to this property will trigger replacement. bool
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. str
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. str
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
namespace_type Changes to this property will trigger replacement. str
The Type of Namespace - possible values are Messaging or NotificationHub.
resource_group_name Changes to this property will trigger replacement. str
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
servicebus_endpoint str
The ServiceBus Endpoint for this Notification Hub Namespace.
sku_name str
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
enabled Changes to this property will trigger replacement. Boolean
Is this Notification Hub Namespace enabled? Defaults to true.
location Changes to this property will trigger replacement. String
The Azure Region in which this Notification Hub Namespace should be created. Changing this forces a new resource to be created.
name Changes to this property will trigger replacement. String
The name to use for this Notification Hub Namespace. Changing this forces a new resource to be created.
namespaceType Changes to this property will trigger replacement. String
The Type of Namespace - possible values are Messaging or NotificationHub.
resourceGroupName Changes to this property will trigger replacement. String
The name of the Resource Group in which the Notification Hub Namespace should exist. Changing this forces a new resource to be created.
servicebusEndpoint String
The ServiceBus Endpoint for this Notification Hub Namespace.
skuName String
The name of the SKU to use for this Notification Hub Namespace. Possible values are Free, Basic or Standard.
tags Map<String>
A mapping of tags to assign to the resource.

Import

Notification Hub Namespaces can be imported using the resource id, e.g.

$ pulumi import azure:notificationhub/namespace:Namespace namespace1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.NotificationHubs/namespaces/namespace1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.