Set-AzEventHubNamespace
Updates the specified Event Hubs namespace.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Set-AzEventHubNamespace
[-ResourceGroupName] <String>
[-Name] <String>
[[-Location] <String>]
[[-SkuName] <String>]
[[-SkuCapacity] <Int32>]
[[-State] <NamespaceState>]
[[-Tag] <Hashtable>]
[-EnableKafka]
[-DisableLocalAuth]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-EncryptionConfig <PSEncryptionConfigAttributes[]>]
[-Identity]
[-IdentityUserDefined <String>]
[-KeySource <String>]
[-KeyProperty <System.Collections.Generic.List`1[System.String[]]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzEventHubNamespace
[-ResourceGroupName] <String>
[-Name] <String>
[[-Location] <String>]
[[-SkuName] <String>]
[[-SkuCapacity] <Int32>]
[[-State] <NamespaceState>]
[[-Tag] <Hashtable>]
[-EnableAutoInflate]
[-MaximumThroughputUnits <Int32>]
[-EnableKafka]
[-DisableLocalAuth]
[-IdentityType <String>]
[-IdentityId <String[]>]
[-EncryptionConfig <PSEncryptionConfigAttributes[]>]
[-Identity]
[-IdentityUserDefined <String>]
[-KeySource <String>]
[-KeyProperty <System.Collections.Generic.List`1[System.String[]]>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzEventHubNamespace
[-ResourceGroupName] <String>
[-Name] <String>
[[-Location] <String>]
[[-SkuName] <String>]
[[-SkuCapacity] <Int32>]
[[-Tag] <Hashtable>]
[-EnableAutoInflate]
[-MaximumThroughputUnits <Int32>]
[-EnableKafka]
[-Identity]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Set-AzEventHubNamespace cmdlet updates the properties of the specified Event Hubs namespace.
Examples
Example 1
Set-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location "WestUS" -Tag @{Tag1='TagValue1'; Tag2='TagValue2'}
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 : {Tag2, TagValue2, Tag1, TagValue1}
ProvisioningState : Succeeded
Status : Active
CreatedAt : 5/24/2019 12:47:27 AM
UpdatedAt : 5/24/2019 12:48:14 AM
ServiceBusEndpoint : #########
Enabled : True
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
Updates the Tags for namespace `MyNamespaceName` to Created .
Example 2
Set-AzEventHubNamespace -ResourceGroupName MyResourceGroupName -NamespaceName MyNamespaceName -Location "WestUS" -State Created -EnableAutoInflate -MaximumThroughputUnits 10
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/Default-EventHub-WestCentralUS/providers/Microsoft.EventHub/namespaces/MyNamespaceName
ResourceGroup : Default-EventHub-WestCentralUS
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
KafkaEnabled : True
IsAutoInflateEnabled : True
MaximumThroughputUnits : 10
Updates the state of namespace `MyNamespaceName` with AutoInflate = enabled and MaximumThroughputUnits = 10
Example 3
Updates the specified Event Hubs namespace. (autogenerated)
Set-AzEventHubNamespace -Location 'WestUS' -Name MyNamespaceName -ResourceGroupName MyResourceGroupName -SkuName Basic
Example 4: Enable system assigned identity encryption on namespace
New-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -Location northeurope -SkuName Premium -IdentityType SystemAssigned
$ec1 = New-AzEventHubEncryptionConfig -KeyName key1 -KeyVaultUri https://myvaultname.vault.azure.net
$ec2 = New-AzEventHubEncryptionConfig -KeyName key2 -KeyVaultUri https://myvaultname.vault.azure.net
Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $ec1,$ec2
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/myresourcegroup/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 : 000000,
TenantId: 000000,
Type: SystemAssigned,
UserAssignedIdentity:
IdentityType : SystemAssigned
IdentityId :
EncryptionConfig : {{ KeyName: key1,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity:
},
{
KeyName: key2,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity:
}}
Create namespace with System Assigned Identity enabled and then use the Set Command to add encryption configs.
Example 5: Add another encryption config to the namespace in Example 4
$namespace = Get-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName
$ec3 = New-AzEventHubEncryptionConfig -KeyName key3 -KeyVaultUri https://myvaultname.vault.azure.net
$namespace.EncryptionConfig += $ec3
Set-AzEventHubNamespace -ResourceGroupName myresourcegroup -Name MyNamespaceName -EncryptionConfig $namespace.EncryptionConfig
Name : MyNamespaceName
Id : /subscriptions/{subscriptionId}/resourceGroups/myresourcegroup/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 : 000000,
TenantId: 000000,
Type: SystemAssigned,
UserAssignedIdentity:
IdentityType : SystemAssigned
IdentityId :
EncryptionConfig : {{ KeyName: key1,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity:
},
{
KeyName: key2,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity:
},
{
KeyName: key3,
KeyVaultUri: https://myvaultname.vault.azure.net,
KeyVersion: ,
UserAssignedIdentity:
}}
If you have to append encryption config to a namespace. Do a Get on the namespace and query the result to include the new encryptionconfig.
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 |
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 |
User defined Identity or None
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
List of Key Properties, @(@(KeyName,KeyVaultUri,Keyversion),@(KeyName,KeyVaultUri,Keyversion))
| Type: | List<T>[String[]] |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Key Source
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| 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: | Named |
| 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 |
Disable/Enable Namespace.
| Type: | Nullable<T>[NamespaceState] |
| Accepted values: | Unknown, Active, Disabled |
| Position: | 5 |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
Hashtables which represents resource Tag.
| Type: | Hashtable |
| Position: | 6 |
| 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 |
Inputs
Nullable<T>[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
Nullable<T>[[Microsoft.Azure.Commands.EventHub.Models.NamespaceState, Microsoft.Azure.PowerShell.Cmdlets.EventHub, Version=1.9.1.0, Culture=neutral, PublicKeyToken=null]]
String[]
PSEncryptionConfigAttributes[]