New-AzEventHubNamespace
Membuat Namespace Layanan EventHub
Sintaks
New-AzEventHubNamespace
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-Location <String>
[-AlternateName <String>]
[-ClusterArmId <String>]
[-DisableLocalAuth]
[-RequireInfrastructureEncryption]
[-ZoneRedundant]
[-KeyVaultProperty <IKeyVaultProperties[]>]
[-IdentityType <String>]
[-UserAssignedIdentityId <String[]>]
[-EnableAutoInflate]
[-MaximumThroughputUnit <Int64>]
[-MinimumTlsVersion <String>]
[-SkuName <String>]
[-PublicNetworkAccess <String>]
[-SkuCapacity <Int64>]
[-Tag <Hashtable>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Membuat Namespace Layanan EventHub
Contoh
Contoh 1: Membuat namespace Layanan EventHub baru dengan UserAssignedIdentity Encryption
$keyVaultProperty1 = New-AzEventHubKeyVaultPropertiesObject -KeyName key1 -KeyVaultUri https://testkeyvault.vault.azure.net -UserAssignedIdentity "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity"
$keyVaultProperty2 = New-AzEventHubKeyVaultPropertiesObject -KeyName key2 -KeyVaultUri https://testkeyvault.vault.azure.net -UserAssignedIdentity "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity"
New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType UserAssigned -UserAssignedIdentityId "/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myFirstIdentity","/subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mySecondIdentity" -KeyVaultProperty $keyVaultProperty1,$keyVaultProperty2
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
Membuat namespace Layanan EventHub Premium baru dengan enkripsi UserAssignedIdentity
Contoh 2: Membuat namespace Layanan EventHub baru dengan Identitas yang Ditetapkan Sistem diaktifkan
New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuName Premium -Location northeurope -IdentityType SystemAssigned
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 3:14:09 PM
DisableLocalAuth : False
EnableAutoInflate : False
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType : SystemAssigned
KafkaEnabled : True
KeySource :
KeyVaultProperty :
Location : North Europe
MaximumThroughputUnit : 0
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId : 000000000000000000
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 1
SkuName : Premium
SkuTier : Premium
Status : Active
Tag : {
}
TenantId : 00000000000
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:21:19 PM
UserAssignedIdentity : {
}
ZoneRedundant : True
Buat namespace Layanan EventHub dengan identitas SystemAssigned.
Contoh 3: Buat namespace Layanan EventHub Standar baru dengan AutoInflate diaktifkan
New-AzEventHubNamespace -ResourceGroupName myResourceGroup -Name myNamespace -SkuCapacity 10 -MaximumThroughputUnit 18 -SkuName Standard -Location southcentralus -Tag @{k1='v1'; k2='v2'} -EnableAutoInflate -DisableLocalAuth
AlternateName :
ClusterArmId :
CreatedAt : 11/17/2022 3:14:09 PM
DisableLocalAuth : True
EnableAutoInflate : True
Id : /subscriptions/000000000000000/resourceGroups/myResourceGroup/providers/Microsoft.EventHub/namespaces/myNamespace
IdentityType :
KafkaEnabled : True
KeySource :
KeyVaultProperty :
Location : South Central US
MaximumThroughputUnit : 0
MetricId : 000000000000000:myNamespace
MinimumTlsVersion : 1.2
Name : myNamespace
PrincipalId : 000000000000000000
PrivateEndpointConnection :
ProvisioningState : Succeeded
PublicNetworkAccess : Enabled
RequireInfrastructureEncryption :
ResourceGroupName : myResourceGroup
ServiceBusEndpoint : https://myNamespace.servicebus.windows.net:443/
SkuCapacity : 1
SkuName : Standard
SkuTier : Standard
Status : Active
Tag : {
}
TenantId : 00000000000
Type : Microsoft.EventHub/Namespaces
UpdatedAt : 11/17/2022 3:21:19 PM
UserAssignedIdentity : {
}
ZoneRedundant : True
Buat namespace myNamespace
Layanan EventHub standar dengan Auto Inflate diaktifkan.
Parameter
-AlternateName
Nama alternatif yang ditentukan ketika nama alias dan namespace layanan sama
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-AsJob
Jalankan perintah sebagai pekerjaan
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ClusterArmId
ID ARM kluster Namespace.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Confirm
Meminta Anda mengonfirmasi sebelum menjalankan cmdlet.
Jenis: | SwitchParameter |
Alias: | cf |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan Azure.
Jenis: | PSObject |
Alias: | AzureRMContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DisableLocalAuth
Properti ini menonaktifkan autentikasi SAS untuk namespace Layanan Pusat Aktivitas.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-EnableAutoInflate
Nilai yang menunjukkan apakah AutoInflate diaktifkan untuk namespace layanan eventhub.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-IdentityType
Jenis identitas layanan terkelola.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-KeyVaultProperty
Properti untuk mengonfigurasi Enkripsi
Jenis: | IKeyVaultProperties[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Location
ID ARM kluster Namespace.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-MaximumThroughputUnit
Batas atas unit throughput saat AutoInflate diaktifkan, nilai harus dalam 0 hingga 20 unit throughput. ( '0' jika AutoInflateEnabled = true)
Jenis: | Int64 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-MinimumTlsVersion
Versi TLS minimum untuk didukung kluster, misalnya '1.2'
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Name
Nama namespace Layanan EventHub.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-PublicNetworkAccess
Ini menentukan apakah lalu lintas diizinkan melalui jaringan publik. Secara default diaktifkan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-RequireInfrastructureEncryption
Mengaktifkan Enkripsi Infrastruktur (Enkripsi Ganda)
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Nama grup sumber daya. Nama tidak peka huruf besar/kecil.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SkuCapacity
Unit throughput Azure Event Hubs untuk tingkat Dasar atau Standar, di mana nilainya harus 0 hingga 20 unit throughput. Unit premium Azure Event Hubs untuk tingkat Premium, di mana nilainya harus 0 hingga 10 unit premium.
Jenis: | Int64 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SkuName
Versi TLS minimum untuk didukung kluster, misalnya '1.2'
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-SubscriptionId
ID langganan target.
Jenis: | String |
Position: | Named |
Nilai default: | (Get-AzContext).Subscription.Id |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Tag
Tag Namespace Layanan EventHub.
Jenis: | Hashtable |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-UserAssignedIdentityId
Properti untuk Identitas yang Ditetapkan Pengguna
Jenis: | String[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-WhatIf
Menunjukkan apa yang akan terjadi jika cmdlet berjalan. Cmdlet tidak dijalankan.
Jenis: | SwitchParameter |
Alias: | wi |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ZoneRedundant
Mengaktifkan properti ini membuat Namespace Layanan Azure Event Hubs Standar di wilayah yang didukung zona ketersediaan.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
Output
Catatan
ALIAS
New-AzEventHubNamespaceV2