次の方法で共有


Network Interfaces - List Effective Network Security Groups

ネットワーク インターフェイスに適用されるすべてのネットワーク セキュリティ グループを取得します。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups?api-version=2024-05-01

URI パラメーター

名前 / 必須 説明
networkInterfaceName
path True

string

ネットワーク インターフェイスの名前。

resourceGroupName
path True

string

リソース グループの名前。

subscriptionId
path True

string

Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、すべてのサービス呼び出しの URI の一部を形成します。

api-version
query True

string

クライアント API のバージョン。

応答

名前 説明
200 OK

EffectiveNetworkSecurityGroupListResult

要求が成功しました。 この操作は、NetworkSecurityGroup リソースの一覧を返します。

202 Accepted

受け入れられ、操作は非同期的に完了します。

Other Status Codes

CloudError

操作が失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントを偽装する

List network interface effective network security groups

要求のサンプル

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1/effectiveNetworkSecurityGroups?api-version=2024-05-01

応答のサンプル

{
  "value": [
    {
      "networkSecurityGroup": {
        "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/test-nsg"
      },
      "association": {
        "networkManager": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/nm1"
        },
        "subnet": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/rg1-vnet/subnets/default"
        },
        "networkInterface": {
          "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1"
        }
      },
      "effectiveSecurityRules": [
        {
          "name": "securityRules/rule1",
          "protocol": "Tcp",
          "sourcePortRange": "456-456",
          "destinationPortRange": "6579-6579",
          "sourceAddressPrefix": "0.0.0.0/32",
          "destinationAddressPrefix": "0.0.0.0/32",
          "access": "Allow",
          "priority": 234,
          "direction": "Inbound"
        },
        {
          "name": "securityRules/default-allow-rdp",
          "protocol": "Tcp",
          "sourcePortRange": "0-65535",
          "destinationPortRange": "3389-3389",
          "sourceAddressPrefix": "1.1.1.1/32",
          "destinationAddressPrefix": "0.0.0.0/0",
          "access": "Allow",
          "priority": 1000,
          "direction": "Inbound"
        },
        {
          "name": "defaultSecurityRules/AllowInternetOutBound",
          "protocol": "All",
          "sourcePortRange": "0-65535",
          "destinationPortRange": "0-65535",
          "sourceAddressPrefix": "0.0.0.0/0",
          "destinationAddressPrefix": "Internet",
          "expandedDestinationAddressPrefix": [
            "32.0.0.0/3",
            "4.0.0.0/6",
            "2.0.0.0/7",
            "1.0.0.0/8"
          ],
          "access": "Allow",
          "priority": 65001,
          "direction": "Outbound"
        }
      ]
    }
  ]
}
Location: https://management.azure.com//subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/test-nsg/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-05-01

定義

名前 説明
CloudError

サービスからのエラー応答。

CloudErrorBody

サービスからのエラー応答。

EffectiveNetworkSecurityGroup

有効なネットワーク セキュリティ グループ。

EffectiveNetworkSecurityGroupAssociation

有効なネットワーク セキュリティ グループの関連付け。

EffectiveNetworkSecurityGroupListResult

有効なネットワーク セキュリティ グループ API サービス呼び出しの一覧に対する応答。

EffectiveNetworkSecurityRule

有効なネットワーク セキュリティ規則。

EffectiveSecurityRuleProtocol

この規則が適用されるネットワーク プロトコル。

SecurityRuleAccess

ネットワーク トラフィックが許可されているか拒否されているか。

SecurityRuleDirection

ルールの方向。 方向は、受信トラフィックまたは送信トラフィックでルールを評価するかどうかを指定します。

SubResource

別のサブリソースへの参照。

CloudError

サービスからのエラー応答。

名前 説明
error

CloudErrorBody

クラウド エラー本文。

CloudErrorBody

サービスからのエラー応答。

名前 説明
code

string

エラーの識別子。 コードは不変であり、プログラムで使用することを目的としています。

details

CloudErrorBody[]

エラーに関する追加の詳細の一覧。

message

string

ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。

target

string

特定のエラーのターゲット。 たとえば、エラーが発生したプロパティの名前です。

EffectiveNetworkSecurityGroup

有効なネットワーク セキュリティ グループ。

名前 説明
association

EffectiveNetworkSecurityGroupAssociation

関連付けられているリソース。

effectiveSecurityRules

EffectiveNetworkSecurityRule[]

有効なセキュリティ規則のコレクション。

networkSecurityGroup

SubResource

適用されるネットワーク セキュリティ グループの ID。

tagMap

object

タグ内に含まれる IP アドレスの一覧へのタグのマッピング。

EffectiveNetworkSecurityGroupAssociation

有効なネットワーク セキュリティ グループの関連付け。

名前 説明
networkInterface

SubResource

割り当てられている場合のネットワーク インターフェイスの ID。

networkManager

SubResource

割り当てられている場合の Azure ネットワーク マネージャーの ID。

subnet

SubResource

サブネットが割り当てられている場合の ID。

EffectiveNetworkSecurityGroupListResult

有効なネットワーク セキュリティ グループ API サービス呼び出しの一覧に対する応答。

名前 説明
nextLink

string

次の結果セットを取得する URL。

value

EffectiveNetworkSecurityGroup[]

有効なネットワーク セキュリティ グループの一覧。

EffectiveNetworkSecurityRule

有効なネットワーク セキュリティ規則。

名前 説明
access

SecurityRuleAccess

ネットワーク トラフィックが許可されているか拒否されているか。

destinationAddressPrefix

string

宛先アドレス プレフィックス。

destinationAddressPrefixes

string[]

宛先アドレス プレフィックス。 想定される値には、CIDR IP 範囲、既定のタグ (VirtualNetwork、AzureLoadBalancer、インターネット)、システム タグ、およびアスタリスク (*) が含まれます。

destinationPortRange

string

宛先ポートまたは範囲。

destinationPortRanges

string[]

宛先ポートの範囲。 予期される値には、0 から 65535 までの 1 つの整数、区切り記号として '-' を使用する範囲 (100 から 400 など)、またはアスタリスク (*) が含まれます。

direction

SecurityRuleDirection

ルールの方向。

expandedDestinationAddressPrefix

string[]

展開された宛先アドレス プレフィックス。

expandedSourceAddressPrefix

string[]

展開されたソース アドレス プレフィックス。

name

string

ユーザーによって指定されたセキュリティ規則の名前 (ユーザーによって作成された場合)。

priority

integer (int32)

ルールの優先順位。

protocol

EffectiveSecurityRuleProtocol

この規則が適用されるネットワーク プロトコル。

sourceAddressPrefix

string

送信元アドレス プレフィックス。

sourceAddressPrefixes

string[]

送信元アドレス プレフィックス。 想定される値には、CIDR IP 範囲、既定のタグ (VirtualNetwork、AzureLoadBalancer、インターネット)、システム タグ、およびアスタリスク (*) が含まれます。

sourcePortRange

string

ソース ポートまたは範囲。

sourcePortRanges

string[]

ソース ポートの範囲。 予期される値には、0 から 65535 までの 1 つの整数、区切り記号として '-' を使用する範囲 (100 から 400 など)、またはアスタリスク (*) が含まれます。

EffectiveSecurityRuleProtocol

この規則が適用されるネットワーク プロトコル。

説明
All
Tcp
Udp

SecurityRuleAccess

ネットワーク トラフィックが許可されているか拒否されているか。

説明
Allow
Deny

SecurityRuleDirection

ルールの方向。 方向は、受信トラフィックまたは送信トラフィックでルールを評価するかどうかを指定します。

説明
Inbound
Outbound

SubResource

別のサブリソースへの参照。

名前 説明
id

string

リソース ID。