New-AzEventHubNamespace
Creates an Event Hubs namespace.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
New-AzEventHubNamespace
[-ResourceGroupName] <String>
[-Name] <String>
[-Location] <String>
[[-SkuName] <String>]
[[-SkuCapacity] <Int32>]
[[-Tag] <Hashtable>]
[-EnableKafka]
[-ZoneRedundant]
[[-ClusterARMId] <String>]
[-Identity]
[-DisableLocalAuth]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-EncryptionConfig <PSEncryptionConfigAttributes[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzEventHubNamespace
[-ResourceGroupName] <String>
[-Name] <String>
[-Location] <String>
[[-SkuName] <String>]
[[-SkuCapacity] <Int32>]
[[-Tag] <Hashtable>]
[-EnableAutoInflate]
[[-MaximumThroughputUnits] <Int32>]
[-EnableKafka]
[-ZoneRedundant]
[[-ClusterARMId] <String>]
[-Identity]
[-DisableLocalAuth]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-EncryptionConfig <PSEncryptionConfigAttributes[]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzEventHubNamespace cmdlet creates a new namespace of type Event Hubs.
Examples
Example 1
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location MyLocation
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 6/14/2020 9:02:16 PM
UpdatedAt : 6/14/2020 9:03:04 PM
ServiceBusEndpoint : https://testingnew2018.servicebus.windows.net:443/
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : False
MaximumThroughputUnits : 0
ZoneRedundant : False
ClusterArmId :
Identity : Microsoft.Azure.Commands.EventHub.Models.PSIdentityAttributes
Identity.PrincipalId :
Identity.TenantId :
Identity.Type :
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource :
Encryption.KeyVaultProperties :
Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in resource group `MyResourceGroupName`.
Example 2
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location MyLocation -EnableAutoInflate -MaximumThroughputUnits 10
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
ZoneRedundant : False
ClusterArmId :
Identity : Microsoft.Azure.Commands.EventHub.Models.PSIdentityAttributes
Identity.PrincipalId :
Identity.TenantId :
Identity.Type :
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource :
Encryption.KeyVaultProperties :
Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in resource group `MyResourceGroupName` and AutoInflate is enabled with MaximumThroughputUnits 10.
Example 3: Kafka enabled namespace
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location MyLocation -EnableAutoInflate -EnableKafka
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
ZoneRedundant : False
ClusterArmId :
Identity : Microsoft.Azure.Commands.EventHub.Models.PSIdentityAttributes
Identity.PrincipalId :
Identity.TenantId :
Identity.Type :
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource :
Encryption.KeyVaultProperties :
Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in resource group `MyResourceGroupName` with Kafka and AutoInflate enabled.
Example 4: ZoneRedundant enabled namespace
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location MyLocation -EnableAutoInflate -ZoneRedundant
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
ZoneRedundant : True
ClusterArmId :
Identity : Microsoft.Azure.Commands.EventHub.Models.PSIdentityAttributes
Identity.PrincipalId :
Identity.TenantId :
Identity.Type :
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource :
Encryption.KeyVaultProperties :
Creates an Event Hubs namespace `MyNamespaceName` in the specified geographic location `MyLocation`, in resource group `MyResourceGroupName` with Kafka and AutoInflate enabled.
Example 5: Creating Namespace with Manage Identity in a cluster
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location MyLocation --EnableAutoInflate -MaximumThroughputUnits 12 -EnableKafka -ZoneRedundant -IdentityType SystemAssigned
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 12
ZoneRedundant : True
ClusterArmId : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/clusters/TestCluster
Identity.PrincipalId : ##########
Identity.TenantId : ##########
Identity.Type : SystemAssigned
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource :
Encryption.KeyVaultProperties :
Example 6: Creating Namespace with UserAssigned identity encryption enabled
# Create encryption config that will create an in memory config object
$config1 = New-AzEventHubEncryptionConfig -KeyName key1 -KeyVaultUri https://myvaultname.vault.azure.net -UserAssignedIdentity /subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName
# Create encryption config that will create an in memory config object
$config2 = New-AzEventHubEncryptionConfig -KeyName key2 -KeyVaultUri https://myvaultname.vault.azure.net -UserAssignedIdentity /subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName
$id1 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
$id2 = '/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName'
# Update Namespace with KeyVault properties
New-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -Name MyNamespaceName -Location westus -IdentityType "UserAssigned" -IdentityId $id1,$id2 -EncryptionConfig $config1,$config2
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroupName : Default-EventHub-WestCentralUS
Location : West US
Sku : Name : Standard , Capacity : 1 , Tier : Standard
Tags :
ProvisioningState : Succeeded
Status : Active
CreatedAt : 6/12/2020 4:00:29 AM
UpdatedAt : 6/14/2020 11:33:12 PM
ServiceBusEndpoint : #########
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
ZoneRedundant : False
ClusterArmId : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/clusters/TestCluster
Encryption : Microsoft.Azure.Commands.EventHub.Models.PSEncryptionAttributes
Encryption.KeySource : MicrosoftKeyVault
Identity : PrinicipalId : ,
TenantId: ,
Type: UserAssigned,
UserAssignedIdentity: /subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName
/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName2
IdentityType : UserAssigned
IdentityId : /subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName
/subscriptions/{subscriptionId}/resourceGroups/{resourcegroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName2
EncryptionConfig : {{ KeyName: key1,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName
},
{
KeyName: key2,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/MSIName2
}}
Parameters
ARM ID of Cluster where namespace is to be created
| Type: | String |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
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 |
enabling or disabling SAS authentication for namespace
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Indicates whether AutoInflate is enabled
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
enabling or disabling Kafka for namespace
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Key Property
| Type: | PSEncryptionConfigAttributes[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
enabling or disabling Identity for namespace
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
List of user assigned Identity Ids
| Type: | String[] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Identity Type ('SystemAssigned', 'UserAssigned', 'SystemAssigned', 'UserAssigned', 'None')
| Type: | String |
| Accepted values: | SystemAssigned, UserAssigned, SystemAssigned, UserAssigned, None |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
EventHub Namespace Location.
| Type: | String |
| Position: | 2 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units.
| Type: | Nullable<T>[Int32] |
| Position: | 7 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
EventHub Namespace Name.
| Type: | String |
| Aliases: | NamespaceName |
| Position: | 1 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Resource Group Name
| Type: | String |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The eventhub throughput units.
| Type: | Nullable<T>[Int32] |
| Position: | 4 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Namespace Sku Name.
| Type: | String |
| Accepted values: | Basic, Standard, Premium |
| Position: | 3 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Hashtables which represents resource Tags.
| Type: | Hashtable |
| Position: | 5 |
| 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 |
enabling or disabling Zone Redundant for namespace
| Type: | SwitchParameter |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Inputs
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
String[]
PSEncryptionConfigAttributes[]