Set-AzServiceBusNetworkRuleSet
Memperbarui NetworkRuleSet dari namespace ServiceBus
Sintaks
Set-AzServiceBusNetworkRuleSet
-NamespaceName <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-PublicNetworkAccess <String>]
[-TrustedServiceAccessEnabled]
[-DefaultAction <String>]
[-IPRule <INwRuleSetIPRules[]>]
[-VirtualNetworkRule <INwRuleSetVirtualNetworkRules[]>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzServiceBusNetworkRuleSet
-InputObject <IServiceBusIdentity>
[-PublicNetworkAccess <String>]
[-TrustedServiceAccessEnabled]
[-DefaultAction <String>]
[-IPRule <INwRuleSetIPRules[]>]
[-VirtualNetworkRule <INwRuleSetVirtualNetworkRules[]>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Deskripsi
Memperbarui NetworkRuleSet dari namespace ServiceBus
Contoh
Contoh 1: Menambahkan Aturan IP dan Aturan Jaringan Virtual ke Seperangkat Aturan Jaringan
$ipRule1 = New-AzServiceBusIPRuleConfig -IPMask 2.2.2.2 -Action Allow
$ipRule2 = New-AzServiceBusIPRuleConfig -IPMask 3.3.3.3 -Action Allow
$virtualNetworkRule1 = New-AzServiceBusVirtualNetworkRuleConfig -SubnetId /subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default
$networkRuleSet = Get-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName myNamespace
$networkRuleSet.IPRule += $ipRule1
$networkRuleSet.IPRule += $ipRule2
$networkRuleSet.VirtualNetworkRule += $virtualNetworkRule1
Set-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName myNamespace -IPRule $ipRule1,$ipRule2 -VirtualNetworkRule $virtualNetworkRule1,$virtualNetworkRule2,$virtualNetworkRule3
DefaultAction : Deny
IPRule : {{
"ipMask": "1.1.1.1",
"action": "Allow"
}, {
"ipMask": "2.2.2.2",
"action": "Allow"
}, {
"ipMask": "3.3.3.3",
"action": "Allow"
}}
Id : /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/networkRuleSets/
default
Location : Australia East
Name : default
PublicNetworkAccess : Enabled
ResourceGroupName : myResourceGroup
TrustedServiceAccessEnabled :
Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSets
VirtualNetworkRule : {{
"subnet": {
"id": "/subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default"
},
"ignoreMissingVnetServiceEndpoint": false
},{
"subnet": {
"id": "/subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet"
},
"ignoreMissingVnetServiceEndpoint": false
}}
Menambahkan aturan jaringan virtual dan IPRules ke aturan yang ada.
Contoh 2: Mengaktifkan Akses Layanan Tepercaya pada namespace layanan
Set-AzServiceBusNetworkRuleSet -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TrustedServiceAccessEnabled
DefaultAction : Deny
IPRule : {{
"ipMask": "1.1.1.1",
"action": "Allow"
}, {
"ipMask": "2.2.2.2",
"action": "Allow"
}, {
"ipMask": "3.3.3.3",
"action": "Allow"
}}
Id : /subscriptions/subscriptionId/resourceGroups/myResourceGroup/providers/Microsoft.ServiceBus/namespaces/myNamespace/networkRuleSets/
default
Location : Australia East
Name : default
PublicNetworkAccess : Enabled
ResourceGroupName : myResourceGroup
TrustedServiceAccessEnabled : True
Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSets
VirtualNetworkRule : {{
"subnet": {
"id": "/subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/default"
},
"ignoreMissingVnetServiceEndpoint": false
},{
"subnet": {
"id": "/subscriptions/subscriptionId/resourcegroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork/subnets/mySubnet"
},
"ignoreMissingVnetServiceEndpoint": false
}}
Mengaktifkan Akses Layanan Tepercaya pada namespace myNamespace
ServiceBus .
Parameter
-AsJob
Jalankan perintah sebagai pekerjaan
Jenis: | SwitchParameter |
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 |
-DefaultAction
Tindakan Default untuk Seperangkat Aturan Jaringan
Jenis: | String |
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 |
-InputObject
Parameter identitas. Untuk membuat, lihat bagian CATATAN untuk properti INPUTOBJECT dan membuat tabel hash.
Jenis: | IServiceBusIdentity |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-IPRule
Daftar IpRules
Jenis: | INwRuleSetIPRules[] |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-NamespaceName
Nama namespace ServiceBus
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-NoWait
Jalankan perintah secara asinkron
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-PublicNetworkAccess
Ini menentukan apakah lalu lintas diizinkan melalui jaringan publik. Secara default diaktifkan. Jika nilainya adalah SecuredByPerimeter, komunikasi Masuk dan Keluar dikontrol oleh perimeter keamanan jaringan dan aturan akses profil.
Jenis: | String |
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 |
-SubscriptionId
ID langganan target.
Jenis: | String |
Position: | Named |
Nilai default: | (Get-AzContext).Subscription.Id |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-TrustedServiceAccessEnabled
Nilai yang menunjukkan apakah Akses Layanan Tepercaya Diaktifkan atau tidak.
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-VirtualNetworkRule
Daftar Aturan VirtualNetwork
Jenis: | INwRuleSetVirtualNetworkRules[] |
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 |