次の方法で共有


Network Interfaces - List Effective Network Security Groups

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

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups?api-version=2025-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=2025-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=2025-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

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

説明
Tcp
Udp
All

SecurityRuleAccess

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

説明
Allow
Deny

SecurityRuleDirection

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

説明
Inbound
Outbound

SubResource

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

名前 説明
id

string

リソース ID。