Set-AzEventHubNamespace
Een EventHub-naamruimte bijwerken
Syntaxis
Set-AzEventHubNamespace
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <String>]
[-UserAssignedIdentityId <String[]>]
[-EnableAutoInflate]
[-MaximumThroughputUnit <Int32>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <String>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzEventHubNamespace
-InputObject <IEventHubIdentity>
[-AlternateName <String>]
[-DisableLocalAuth]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-RequireInfrastructureEncryption]
[-IdentityType <String>]
[-UserAssignedIdentityId <String[]>]
[-EnableAutoInflate]
[-MaximumThroughputUnit <Int32>]
[-MinimumTlsVersion <String>]
[-PublicNetworkAccess <String>]
[-SkuCapacity <Int32>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Een EventHub-naamruimte bijwerken
Voorbeelden
Voorbeeld 1: Een ManagedIdentity toevoegen aan een EventHub-naamruimte
$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
Het uitvoertype nieuwe en set-cmdlets IEhNamespace
heeft een eigenschap met de naam UserAssignedIdentity
die een hashtabel is.
De sleutels van deze hastable zijn de resource-id's van de beheerde identiteiten waarvan de naamruimte deel uitmaakt.
Als u een IdentityId wilt toevoegen of verwijderen, extraheert u de sleutels uit de hashtabel, wat zou resulteren in een matrix met tekenreeksen die vervolgens kunnen worden opgevraagd en ingevoerd als invoer om cmdlet in te stellen zoals hierboven wordt weergegeven.
Voorbeeld 2: Een KeyVaultProperty toevoegen aan een bestaande EventHub-naamruimte
$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
Voegt een nieuwe KeyVaultProperty toe aan EventHub-naamruimte myNamespace
.
Voorbeeld 3: Een KeyVaultProperty verwijderen uit een bestaande EventHub-naamruimte
$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
Hiermee verwijdert u een nieuwe KeyVaultProperty naar EventHub-naamruimte myNamespace
.
Voorbeeld 4: DisableLocalAuth instellen op waar in een bestaande EventHub-naamruimte
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
Hiermee stelt u DisableLocalAuth
in op waar in een EventHub-naamruimte myNamespace
.
Voorbeeld 5: # Maak een naamruimte met UserAssignedIdentity en gebruik Set-Az cmdlet om IdentityType in te stellen op Geen.
$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
Er is een naamruimte gemaakt met UserAssignedIdentity en Set-Az cmdlet gebruikt om IdentityType in te stellen op Geen.
Parameters
-AlternateName
Alternatieve naam die is opgegeven wanneer alias- en naamruimtenamen hetzelfde zijn
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-AsJob
De opdracht uitvoeren als een taak
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Confirm
U wordt gevraagd om bevestiging voordat u de cmdlet uitvoert.
Type: | SwitchParameter |
Aliassen: | cf |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DefaultProfile
De referenties, accounts, tenants en abonnementen die worden gebruikt voor communicatie met Azure.
Type: | PSObject |
Aliassen: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-DisableLocalAuth
Met deze eigenschap wordt SAS-verificatie voor de Event Hubs-naamruimte uitgeschakeld.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-EnableAutoInflate
Waarde die aangeeft of AutoInflate is ingeschakeld voor eventhub-naamruimte.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-IdentityType
Type beheerde service-identiteit.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-InputObject
Identiteitsparameter. Zie de sectie NOTES voor INPUTOBJECT-eigenschappen en maak een hash-tabel om deze samen te stellen.
Type: | IEventHubIdentity |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | True |
Jokertekens accepteren: | False |
-KeyVaultProperty
Eigenschappen voor het configureren van versleuteling
Type: | IKeyVaultProperties[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-MaximumThroughputUnit
Bovengrens van doorvoereenheden wanneer AutoInflate is ingeschakeld, moet de waarde binnen 0 tot 20 doorvoereenheden zijn. ( '0' als AutoInflateEnabled = true)
Type: | Int32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-MinimumTlsVersion
De minimale TLS-versie voor het cluster dat moet worden ondersteund, bijvoorbeeld '1.2'
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Name
De naam van de EventHub-naamruimte.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-PublicNetworkAccess
Hiermee wordt bepaald of verkeer via een openbaar netwerk is toegestaan. Deze functie is standaard ingeschakeld.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-RequireInfrastructureEncryption
Infrastructuurversleuteling inschakelen (dubbele versleuteling)
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-ResourceGroupName
De naam van de resourcegroep. De naam is niet hoofdlettergevoelig.
Type: | String |
Position: | Named |
Default value: | None |
Vereist: | True |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-SkuCapacity
De Event Hubs-doorvoereenheden voor Basic- of Standard-lagen, waarbij de waarde 0 tot 20 doorvoereenheden moet zijn. De Event Hubs Premium-eenheden voor de Premium-laag, waarbij de waarde 0 tot 10 premium-eenheden moet zijn.
Type: | Int32 |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-SubscriptionId
De id van het doelabonnement.
Type: | String |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-Tag
Tag van EventHub-naamruimte.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-UserAssignedIdentityId
Eigenschappen voor door de gebruiker toegewezen identiteiten
Type: | String[] |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
-WhatIf
Toont wat er zou gebeuren als de cmdlet wordt uitgevoerd. De cmdlet wordt niet uitgevoerd.
Type: | SwitchParameter |
Aliassen: | wi |
Position: | Named |
Default value: | None |
Vereist: | False |
Pijplijninvoer accepteren: | False |
Jokertekens accepteren: | False |
Invoerwaarden
Uitvoerwaarden
Notities
ALIASSEN
Set-AzEventHubNamespaceV2
Azure PowerShell