Add-AzServiceFabricManagedClusterNetworkSecurityRule
クラスター リソースにネットワーク セキュリティ規則を追加します。
構文
Add-AzServiceFabricManagedClusterNetworkSecurityRule
[-InputObject] <PSManagedCluster>
-Access <NetworkSecurityAccess>
[-Description <String>]
-DestinationAddressPrefix <String[]>
-DestinationPortRange <String[]>
-Direction <NetworkSecurityDirection>
-Name <String>
-Priority <Int32>
-Protocol <NetworkSecurityProtocol>
-SourceAddressPrefix <String[]>
-SourcePortRange <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzServiceFabricManagedClusterNetworkSecurityRule
[-ResourceGroupName] <String>
[-ClusterName] <String>
-Access <NetworkSecurityAccess>
[-Description <String>]
-DestinationAddressPrefix <String[]>
-DestinationPortRange <String[]>
-Direction <NetworkSecurityDirection>
-Name <String>
-Priority <Int32>
-Protocol <NetworkSecurityProtocol>
-SourceAddressPrefix <String[]>
-SourcePortRange <String[]>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
説明
クラスター リソースにネットワーク セキュリティ規則を追加します。 これにより、指定されたプロパティを持つネットワーク セキュリティ規則が追加されます
例
例 1
$resourceGroupName = "sfmcps-test-rg"
$clusterName = "sfmcps-test-cluster"
$NSRName = "testSecRule1"
$sourcePortRanges = "1-1000"
$destinationPortRanges = "1-65535"
$destinationAddressPrefixes = "194.69.104.0/25", "194.69.119.64/26", "167.220.249.128/26", "255.255.255.255/32"
$sourceAddressPrefixes = "167.220.242.0/27", "167.220.0.0/23", "131.107.132.16/28", "167.220.81.128/26"
$cluster = Add-AzServiceFabricManagedClusterNetworkSecurityRule -ResourceGroupName $resourceGroupName -ClusterName $clusterName `
-Name $NSRName -Access Allow -Direction Outbound -Protocol tcp -Priority 1200 -SourcePortRange $sourcePortRange -DestinationPortRange $destinationPortRanges -DestinationAddressPrefix $destinationAddressPrefixes -SourceAddressPrefix $sourceAddressPrefixes -Verbose
このコマンドは、上記のプロパティを持つネットワーク セキュリティ規則を追加します。
例 2
$resourceGroupName = "sfmcps-test-rg"
$clusterName = "sfmcps-test-cluster"
$NSRName = "testSecRule2"
$sourcePortRanges = "1-1000"
$destinationPortRanges = "1-65535"
$destinationAddressPrefixes = "194.69.104.0/25", "194.69.119.64/26", "167.220.249.128/26", "255.255.255.255/32"
$sourceAddressPrefixes = "167.220.242.0/27", "167.220.0.0/23", "131.107.132.16/28", "167.220.81.128/26"
$cluster = Add-AzServiceFabricManagedClusterNetworkSecurityRule -ResourceGroupName $resourceGroupName -ClusterName $clusterName `
-Name $NSRName -Access Deny -Direction Outbound -Protocol udp -Priority 1300 -SourcePortRange $sourcePortRange -DestinationPortRange $destinationPortRanges -DestinationAddressPrefix $destinationAddressPrefixes -SourceAddressPrefix $sourceAddressPrefixes -Verbose
プロパティが異なる Example1 に似ています。
例 3
$resourceGroupName = "sfmcps-test-rg"
$clusterName = "sfmcps-test-cluster"
$NSRName = "testSecRule3"
$description = "test network security rule"
$sourcePortRanges = "1-1000"
$destinationPortRanges = "1-65535"
$destinationAddressPrefixes = "194.69.104.0/25", "194.69.119.64/26", "167.220.249.128/26", "255.255.255.255/32"
$sourceAddressPrefixes = "167.220.242.0/27", "167.220.0.0/23", "131.107.132.16/28", "167.220.81.128/26"
$cluster = $clusterFromGet | Add-AzServiceFabricManagedClusterNetworkSecurityRule `
-Name $NSRName -Access Allow -Description $description -Direction Outbound -Protocol tcp -Priority 1400 -SourcePortRange $sourcePortRanges -DestinationPortRange $destinationPortRanges -DestinationAddressPrefix $destinationAddressPrefixes -SourceAddressPrefix $sourceAddressPrefixes -Verbose
このコマンドは、パイプ付きのクラスター オブジェクトを使用してネットワーク セキュリティ規則を追加します。
パラメーター
-Access
ネットワーク トラフィックの許可または拒否を取得または設定します。 使用可能な値は次のとおりです。許可、拒否
型: | NetworkSecurityAccess |
承認された値: | Allow, Deny |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
バックグラウンドでコマンドレットを実行し、ジョブを返して進行状況を追跡する
型: | SwitchParameter |
Position: | Named |
既定値: | None |
必須: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClusterName
クラスターの名前を指定します。
型: | String |
Position: | 1 |
既定値: | None |
必須: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
コマンドレットの実行前に確認を求めるメッセージが表示されます。
型: | SwitchParameter |
Aliases: | cf |
Position: | Named |
既定値: | None |
必須: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure との通信のために使用される資格情報、アカウント、テナント、サブスクリプションです。
型: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
既定値: | None |
必須: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
ネットワーク セキュリティ規則の説明を取得または設定します。
型: | String |
Position: | Named |
既定値: | None |
必須: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationAddressPrefix
宛先アドレス プレフィックスを取得または設定します。 CIDR または宛先 IP 範囲
型: | String[] |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DestinationPortRange
宛先ポート範囲を取得または設定します。
型: | String[] |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Direction
ネットワーク セキュリティ規則の方向を取得または設定します。 指定できる値は、Inbound、Outbound です。
型: | NetworkSecurityDirection |
承認された値: | Inbound, Outbound |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
マネージド クラスター リソース
型: | PSManagedCluster |
Position: | 0 |
既定値: | None |
必須: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
ネットワーク セキュリティ規則の名前
型: | String |
Aliases: | NetworkSecurityRuleName |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Priority
規則の優先順位を取得または設定します。 値の範囲は 1000 ~ 3000 です。 この範囲外の値は、Service Fabric ManagerCluster リソース プロバイダー用に予約されています。 優先順位番号は、コレクション内の各ルールで一意である必要があります。 優先度の数値が小さいと、ルールの優先度が高くなります。
型: | Int32 |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Protocol
この規則が適用されるネットワーク プロトコルを取得または設定します。 指定できる値は、http、https、tcp、udp、icmp、ah、esp、any
型: | NetworkSecurityProtocol |
承認された値: | https, http, udp, tcp, esp, icmp, ah, any |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
リソース グループの名前を指定します。
型: | String |
Position: | 0 |
既定値: | None |
必須: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SourceAddressPrefix
CIDR またはソース IP 範囲を取得または設定します。
型: | String[] |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SourcePortRange
バックグラウンドでコマンドレットを実行し、ジョブを返して進行状況を追跡する
型: | String[] |
Position: | Named |
既定値: | None |
必須: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
コマンドレットの実行時に発生する内容を示します。 このコマンドレットは実行されません。
型: | SwitchParameter |
Aliases: | wi |
Position: | Named |
既定値: | None |
必須: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
入力
出力
Azure PowerShell
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示