New-AzNotificationHubsNamespace
Creates a notification hub namespace.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzNotificationHubsNamespace
[-ResourceGroup] <String>
[-Namespace] <String>
[-Location] <String>
[[-Tag] <Hashtable>]
[[-SkuTier] <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzNotificationHubsNamespace cmdlet creates a notification hub namespace. Namespaces are logical containers that help you organize and manage your notification hubs. You must have at least one notification hub namespace. A single namespace can house multiple hubs. You can have multiple namespaces to organize your hubs, or to give specific individuals permission to manage a selected subset of your hubs. To create a namespace, make sure that you specify a unique name for the namespace; specify the datacenter where the namespace will be located; and, specify the resource group that the namespace will be assigned to. After the namespace has been created you can use the New-AzNotificationHubsNamespaceAuthorizationRules cmdlet to assign authorization rules to that namespace. Authorization rules are used to manage permissions to the namespace.
Examples
Example 1: Create a notification hub
PS C:\>New-AzNotificationHubsNamespace -ResourceGroup "ContosoNotificationsGroup" -Location "West US" -Namespace "ContosoPartners"
This command creates a notification hub named ContosoPartners. The namespace will be located in the West US datacenter and be assigned to the ContosoNotificationsGroup resource group.
Example 2: Create a notification hub with tags
PS C:\>New-AzNotificationHubsNamespace -ResourceGroup "ContosoNotificationsGroup" -Location "West US" -Namespace "ContosoPartners" -Tags @{Name="Audience";Value="PartnerOrganizations"}
This command creates a notification hub named ContosoPartners. The namespace will be located in the West US datacenter and be assigned to the ContosoNotificationsGroup resource group. In addition, this command creates a tag with the name Audience and the value PartnerOrganizations and is assigned to the namespace. This ensures that the namespace will be displayed any time you filter for items where the Audience tag is set to PartnerOrganizations.
Parameters
Prompts you for confirmation before running the cmdlet.
| Type: | SwitchParameter |
| Aliases: | cf |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies the display name of the datacenter that will host the Namespace. Although you can set this parameter to any valid location, for optimal performance you might want to use a datacenter located near the majority of your users.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the name of the new namespace. Namespaces provide a way to group and categorize notification hubs.
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies the resource group to which the namespace will be assigned. Resource groups organize items such as namespaces, notification hubs, and authorization rules in ways that help simply inventory management and administration.
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Sku tier of the namespace
| Type: | String |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Specifies name-value pairs that can be used to categorize and organize Azure items. Tags function similar to keywords, and operate across a deployment. For example, if you search for all items with the tag Department:IT the search will return all the Azure items that have that tag, regardless of such things as item type, location, or resource group. An individual tag consists of two parts: the Name and, optionally, the Value. For instance, in Department:IT, the tag name is Department and the tag value is IT. To add a tag, use hash table syntax similar to this, which creates the tag CalendarYear:2016:
| Type: | Hashtable |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
| Type: | SwitchParameter |
| Aliases: | wi |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |