Set-AzEventHubNamespace
Aktualisiert einen EventHub-Namespace
Syntax
Set-AzEventHubNamespace
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <ManagedServiceIdentityType>]
[-UserAssignedIdentityId <String[]>]
[-EnableAutoInflate]
[-MaximumThroughputUnit <Int32>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <PublicNetworkAccess>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzEventHubNamespace
-InputObject <IEventHubIdentity>
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <ManagedServiceIdentityType>]
[-UserAssignedIdentityId <String[]>]
[-EnableAutoInflate]
[-MaximumThroughputUnit <Int32>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <PublicNetworkAccess>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Aktualisiert einen EventHub-Namespace
Beispiele
Beispiel 1: Hinzufügen einer ManagedIdentity zu einem EventHub-Namespace
$eventHubNamespace = Get-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace
$identityId = $eventHubNamespace.UserAssignedIdentity.Keys
$identityId += "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity"
Set-AzEventHubNamespace -InputObject $eventHubNamespace -UserAssignedIdentityId $identityId
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 2:56:32 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType : UserAssigned
KafkaEnabled : True
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key1",
"keyVaultUri": "https://testkeyvault.vault.azure.net/",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key2",
"keyVaultUri": "https://testkeyvault.vault.azure.net/",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key3",
"keyVaultUri": "https://testkeyvault.vault.azure.net/",
"keyVersion": ""
}}
Location : North Europe
MaximumThroughputUnit : 0
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
Tag : {
}
TenantId :
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:03:50 PM
UserAssignedIdentity : {
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity": {
},
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity": {
}
}
ZoneRedundant : True
Der Ausgabetyp der Cmdlets "Neu" und "Set" IEhNamespace
hat eine Eigenschaft namens UserAssignedIdentity
"Hashtable".
Die Schlüssel dieser Hastable sind die Ressourcen-IDs der verwalteten Identitäten, zu denen der Namespace gehört.
Um eine IdentityId hinzuzufügen oder zu entfernen, extrahieren Sie die Schlüssel aus der Hashtabelle, was zu einem Array von Zeichenfolgen führen würde, das dann abgefragt und als Eingabe zum Festlegen des Cmdlets wie oben dargestellt gespeist werden kann.
Beispiel 2: Hinzufügen eines KeyVaultProperty zu einem vorhandenen EventHub-Namespace
$eventHubNamespace = Get-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace
$newKeyVaultProperty = New-AzEventHubKeyVaultPropertiesObject -KeyName key3 -KeyVaultUri https://testkeyvault.vault.azure.net -UserAssignedIdentity "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$eventHubNamespace.KeyVaultProperty += $newKeyVaultProperty
Set-AzEventHubNamespace -InputObject $eventHubNamespace -KeyVaultProperty $eventHubNamespace.KeyVaultProperty
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 2:56:32 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType : UserAssigned
KafkaEnabled : True
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key1",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key2",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key3",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}}
Location : North Europe
MaximumThroughputUnit : 0
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
Tag : {
}
TenantId :
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:03:50 PM
UserAssignedIdentity : {
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity": {
},
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity": {
}
}
ZoneRedundant : True
Fügt einen neuen KeyVaultProperty zum EventHub-Namespace myNamespace
hinzu.
Beispiel 3: Entfernen einer KeyVaultProperty aus einem vorhandenen EventHub-Namespace
$eventHubNamespace = Get-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace
# Remove the last KeyVaultProperty from the list of KeyVaultProperties
$eventHubNamespace.KeyVaultProperty = $eventHubNamespace.KeyVaultProperty | Where-Object { $_ -ne $eventHubNamespace.KeyVaultProperty[2] }
Set-AzEventHubNamespace -InputObject $eventHubNamespace -KeyVaultProperty $eventHubNamespace.KeyVaultProperty
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 2:56:32 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType : UserAssigned
KafkaEnabled : True
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key1",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key2",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}}
Location : North Europe
MaximumThroughputUnit : 0
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
Tag : {
}
TenantId :
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:03:50 PM
UserAssignedIdentity : {
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity": {
},
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity": {
}
}
ZoneRedundant : True
Entfernt einen neuen KeyVaultProperty -Namespace myNamespace
zu EventHub .
Beispiel 4: Festlegen von DisableLocalAuth auf "true" für einen vorhandenen EventHub-Namespace
Set-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -DisableLocalAuth
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 2:56:32 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType : UserAssigned
KafkaEnabled : True
KeySource : Microsoft.KeyVault
KeyVaultProperty : {{
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key1",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}, {
"identity": {
"userAssignedIdentity": "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
},
"keyName": "key2",
"keyVaultUri": "https://testkeyvault.vault.azure.net",
"keyVersion": ""
}}
Location : North Europe
MaximumThroughputUnit : 0
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
Tag : {
}
TenantId :
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:03:50 PM
UserAssignedIdentity : {
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity": {
},
"/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity": {
}
}
ZoneRedundant : True
Legt DisableLocalAuth
auf "true" für einen EventHub-Namespace myNamespace
fest.
Beispiel 5: # Erstellen Sie einen Namespace mit UserAssignedIdentity, und verwenden Sie das Set-Az-Cmdlet, um IdentityType auf "None" festzulegen.
$eventHubNamespace = New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$eventHubNamespace = Set-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -IdentityType None -UserAssignedIdentityId @()
AlternateName :
ClusterArmId :
CreatedAt : 11/21/2022 3:21:29 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/provide
rs/Microsoft.EventHub/namespaces/myNamespace
IdentityType :
KafkaEnabled : True
KeySource :
KeyVaultProperty :
Location : North Europe
MaximumThroughputUnit : 0
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId :
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 :
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/21/2022 3:31:03 PM
UserAssignedIdentity : {
}
ZoneRedundant : True
Erstellt einen Namespace mit UserAssignedIdentity und verwenden Sie das Set-Az-Cmdlet, um IdentityType auf None festzulegen.
Parameter
-AlternateName
Alternativer Name, der angegeben wird, wenn Alias- und Namespacenamen identisch sind
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Ausführen des Befehls als Auftrag
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DisableLocalAuth
Diese Eigenschaft deaktiviert die SAS-Authentifizierung für den Event Hubs-Namespace.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableAutoInflate
Wert, der angibt, ob AutoInflate für eventhub-Namespace aktiviert ist.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-IdentityType
Typ der verwalteten Dienstidentität.
Type: | ManagedServiceIdentityType |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity-Parameter. Informationen zum Erstellen finden Sie im Abschnitt "NOTES" für INPUTOBJECT-Eigenschaften und erstellen eine Hashtabelle.
Type: | IEventHubIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-KeyVaultProperty
Eigenschaften zum Konfigurieren von Encryption To construct, see NOTES section for KEYVAULTPROPERTY properties and create a hash table.
Type: | IKeyVaultProperties[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MaximumThroughputUnit
Obergrenze der Durchsatzeinheiten, wenn AutoInflate aktiviert ist, sollte der Wert innerhalb von 0 bis 20 Durchsatzeinheiten liegen. ( '0', wenn AutoInflateEnabled = true)
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinimumTlsVersion
Die mindeste TLS-Version für den Cluster, die unterstützt werden soll, z. B. "1.2"
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Der Name des EventHub-Namespace.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PublicNetworkAccess
Dadurch wird ermittelt, ob Datenverkehr über das öffentliche Netzwerk zulässig ist. Standardmäßig ist sie aktiviert.
Type: | PublicNetworkAccess |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RequireInfrastructureEncryption
Aktivieren der Infrastrukturverschlüsselung (Doppelte Verschlüsselung)
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Der Name der Ressourcengruppe. Für den Namen wird die Groß-/Kleinschreibung nicht beachtet.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SkuCapacity
Die Event Hubs-Durchsatzeinheiten für Standard- oder Standardebenen, wobei der Wert 0 bis 20 Durchsatzeinheiten sein soll. Die Event Hubs Premium-Einheiten für die Premium-Stufe, wobei der Wert 0 bis 10 Premium-Einheiten sein soll.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Hierbei handelt es sich um die ID des Zielabonnements.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
Tag des EventHub-Namespace.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-UserAssignedIdentityId
Eigenschaften für vom Benutzer zugewiesene Identitäten
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Ausgaben
Hinweise
ALIASE
Set-AzEventHubNamespaceV2
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für