Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

New-AzServiceBusNamespace

Creates a new ServiceBus namespace.

Syntax

Default (Default)

New-AzServiceBusNamespace
 -Name <String>
 -ResourceGroupName <String>
 [-SubscriptionId <String>]
 -Location <String>
 [-AlternateName <String>]
 [-DisableLocalAuth]
 [-KeyVaultProperty <IKeyVaultProperties[]>]
 [-PremiumMessagingPartition <Int32>]
 [-RequireInfrastructureEncryption]
 [-IdentityType <String>]
 [-ZoneRedundant]
 [-UserAssignedIdentityId <String[]>]
 [-MinimumTlsVersion <String>]
 [-PublicNetworkAccess <String>]
 [-SkuName <String>]
 [-SkuCapacity <Int32>]
 [-Tag <Hashtable>]
 [-DefaultProfile <PSObject>]
 [-AsJob]
 [-NoWait]
 [-WhatIf]
 [-Confirm]
 [<CommonParameters>]

Description

Creates a new ServiceBus namespace.

Examples

Example 1: Create a new ServiceBus namespace with UserAssignedIdentity Encryption

$id1 = "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$id2 = "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity"
$keyVaultProperty1 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key4 -KeyVaultUri https://testkeyvault.vault.azure.net/ -UserAssignedIdentity "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$keyVaultProperty2 = New-AzServiceBusKeyVaultPropertiesObject -KeyName key5 -KeyVaultUri https://testkeyvault.vault.azure.net/ -UserAssignedIdentity "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityID $id1,$id2 -KeyVaultProperty $keyVaultProperty1,$keyVaultProperty2
AlternateName :
CreatedAt : 11/21/2022 5:15:41 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/provide
 rs/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType : UserAssigned
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
 "identity": {
 "userAssignedIdentity": "/subscriptions/000000000000000/reso
 urceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity
 "
 },
 "keyName": "key4",
 "keyVaultUri": "https://testkeyvault.vault.azure.net",
 "keyVersion": ""
 }, {
 "identity": {
 "userAssignedIdentity": "/subscriptions/000000000000000/reso
 urceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity
 "
 },
 "keyName": "key5",
 "keyVaultUri": "https://testkeyvault.vault.azure.net",
 "keyVersion": ""
 }}
Location : North Europe
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId :
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption : False
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 1
SkuName : Premium
SkuTier : Premium
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
 }
TenantId :
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 5:23:01 AM
UserAssignedIdentity : {
 "/subscriptions/000000000000000/resourceGroups/myResourceGroup/prov
 iders/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity": {
 },
 "/subscriptions/000000000000000/resourceGroups/myResourceGroup/prov
 iders/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity": {
 }
 }
ZoneRedundant : False

Creates a new Premium ServiceBus namespace with UserAssignedIdentity encryption.

Example 2: Create a new ServiceBus namespace with System Assigned Identity enabled.

New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType SystemAssigned
AlternateName :
CreatedAt : 11/21/2022 5:33:10 AM
DisableLocalAuth : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/provide
 rs/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType : SystemAssigned
KeySource :
KeyVaultProperty :
Location : North Europe
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId : 000000000000
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 1
SkuName : Premium
SkuTier : Premium
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
 }
TenantId : 000000000000000
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/21/2022 5:40:18 AM
UserAssignedIdentity : {
 }
ZoneRedundant : False

Create an ServiceBus namespace with SystemAssigned identity.

Example 3: Create a new Standard ServiceBus namespace with DisableLocalAuth enabled

New-AzServiceBusNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -DisableLocalAuth
AlternateName :
CreatedAt : 11/18/2022 6:06:22 AM
DisableLocalAuth : True
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace
IdentityType :
KeySource :
KeyVaultProperty :
Location : South Central US
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.1
Name : myNamespace
PrincipalId :
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity :
SkuName : Standard
SkuTier : Standard
Status : Active
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Tag : {
 "k1": "v1",
 "k2": "v2"
 }
TenantId :
Type : Microsoft.ServiceBus/Namespaces
UpdatedAt : 11/18/2022 6:07:06 AM
UserAssignedIdentity : {
 }
ZoneRedundant : False

Create a standard ServiceBus namespace myNamespace with DisableLocalAuth enabled.

Parameters

-AlternateName

Alternate name for namespace

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-AsJob

Run the command as a job

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

-DisableLocalAuth

This property disables SAS authentication for the Service Bus namespace.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-IdentityType

Type of managed service identity.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-KeyVaultProperty

Properties of KeyVault

Parameter properties

Type:

IKeyVaultProperties[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Location

Resource Location.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-MinimumTlsVersion

The minimum TLS version for the cluster to support, e.g. '1.2'

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-Name

The name of ServiceBusNamespace

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-NoWait

Run the command asynchronously

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PremiumMessagingPartition

The number of partitions of a Service Bus namespace. This property is only applicable to Premium SKU namespaces. The default value is 1 and possible values are 1, 2 and 4

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-PublicNetworkAccess

This determines if traffic is allowed over public network. By default it is enabled.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-RequireInfrastructureEncryption

Enable Infrastructure Encryption (Double Encryption)

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-ResourceGroupName

The name of the ResourceGroupName.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SkuCapacity

The specified messaging units for the tier. For Premium tier, capacity are 1,2 and 4.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SkuName

Name of this SKU.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-SubscriptionId

The ID of the target subscription.

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

-Tag

Resource tags.

Parameter properties

Type:Hashtable
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-UserAssignedIdentityId

Properties for User Assigned Identities

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

-ZoneRedundant

Enabling this property creates a Premium Service Bus Namespace in regions supported availability zones.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

ISbNamespace

Notes

ALIASES

New-AzServiceBusNamespaceV2


Feedback

Was this page helpful?