次の方法で共有


Security Rules - List

ネットワーク セキュリティ グループ内のすべてのセキュリティ規則を取得します。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
networkSecurityGroupName
path True

string

ネットワーク セキュリティ グループの名前。

resourceGroupName
path True

string

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

subscriptionId
path True

string

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

api-version
query True

string

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

応答

名前 説明
200 OK

SecurityRuleListResult

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

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 security rules in network security group

要求のサンプル

GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/testnsg/securityRules?api-version=2023-11-01

応答のサンプル

{
  "value": [
    {
      "name": "rule1",
      "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityGroups/testnsg/securityRules/rule1",
      "properties": {
        "provisioningState": "Succeeded",
        "protocol": "*",
        "sourcePortRange": "*",
        "destinationPortRange": "80",
        "sourceAddressPrefix": "*",
        "destinationAddressPrefix": "*",
        "access": "Allow",
        "priority": 130,
        "direction": "Inbound"
      }
    }
  ]
}

定義

名前 説明
ApplicationSecurityGroup

リソース グループ内のアプリケーション セキュリティ グループ。

CloudError

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

CloudErrorBody

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

ProvisioningState

現在のプロビジョニング状態。

SecurityRule

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

SecurityRuleAccess

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

SecurityRuleDirection

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

SecurityRuleListResult

ListSecurityRule API サービス呼び出しの応答。 ネットワーク セキュリティ グループに属するすべてのセキュリティ規則を取得します。

SecurityRuleProtocol

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

ApplicationSecurityGroup

リソース グループ内のアプリケーション セキュリティ グループ。

名前 説明
etag

string

リソースが更新されるたびに変更される一意の読み取り専用文字列。

id

string

リソース ID。

location

string

リソースの場所。

name

string

リソース名。

properties.provisioningState

ProvisioningState

アプリケーション セキュリティ グループ リソースのプロビジョニング状態。

properties.resourceGuid

string

アプリケーション セキュリティ グループ リソースのリソース GUID プロパティ。 ユーザーが名前を変更したり、サブスクリプションまたはリソース グループ間でリソースを移行したりした場合でも、リソースを一意に識別します。

tags

object

リソース タグ。

type

string

リソースの種類。

CloudError

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

名前 説明
error

CloudErrorBody

クラウド エラー本文。

CloudErrorBody

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

名前 説明
code

string

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

details

CloudErrorBody[]

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

message

string

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

target

string

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

ProvisioningState

現在のプロビジョニング状態。

名前 説明
Deleting

string

Failed

string

Succeeded

string

Updating

string

SecurityRule

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

名前 説明
etag

string

リソースが更新されるたびに変更される一意の読み取り専用文字列。

id

string

リソース ID。

name

string

リソース グループ内で一意であるリソースの名前。 この名前は、リソースへのアクセスに使用できます。

properties.access

SecurityRuleAccess

ネットワーク トラフィックは許可または拒否されます。

properties.description

string

このルールの説明。 140 文字に制限されます。

properties.destinationAddressPrefix

string

宛先アドレス プレフィックス。 CIDR または宛先 IP 範囲。 アスタリスク '*' を使用して、すべてのソース IP を照合することもできます。 "VirtualNetwork"、"AzureLoadBalancer"、"Internet" などの既定のタグも使用できます。

properties.destinationAddressPrefixes

string[]

宛先アドレス プレフィックス。 CIDR または宛先 IP 範囲。

properties.destinationApplicationSecurityGroups

ApplicationSecurityGroup[]

宛先として指定されたアプリケーション セキュリティ グループ。

properties.destinationPortRange

string

宛先ポートまたは範囲。 整数または 0 ~ 65535 の範囲。 アスタリスク '*' は、すべてのポートとの照合にも使用できます。

properties.destinationPortRanges

string[]

宛先ポートの範囲。

properties.direction

SecurityRuleDirection

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

properties.priority

integer

ルールの優先順位。 値は 100 から 4096 の間で指定できます。 優先順位番号は、コレクション内の各ルールで一意である必要があります。 優先度の数値が小さいと、ルールの優先度が高くなります。

properties.protocol

SecurityRuleProtocol

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

properties.provisioningState

ProvisioningState

セキュリティ 規則リソースのプロビジョニング状態。

properties.sourceAddressPrefix

string

CIDR またはソース IP 範囲。 アスタリスク '*' を使用して、すべてのソース IP を照合することもできます。 "VirtualNetwork"、"AzureLoadBalancer"、"Internet" などの既定のタグも使用できます。 これがイングレス ルールの場合は、ネットワーク トラフィックの発信元を指定します。

properties.sourceAddressPrefixes

string[]

CIDR またはソース IP 範囲。

properties.sourceApplicationSecurityGroups

ApplicationSecurityGroup[]

ソースとして指定されたアプリケーション セキュリティ グループ。

properties.sourcePortRange

string

ソース ポートまたは範囲。 整数または 0 ~ 65535 の範囲。 アスタリスク '*' は、すべてのポートとの照合にも使用できます。

properties.sourcePortRanges

string[]

ソース ポートの範囲。

type

string

リソースの種類。

SecurityRuleAccess

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

名前 説明
Allow

string

Deny

string

SecurityRuleDirection

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

名前 説明
Inbound

string

Outbound

string

SecurityRuleListResult

ListSecurityRule API サービス呼び出しの応答。 ネットワーク セキュリティ グループに属するすべてのセキュリティ規則を取得します。

名前 説明
nextLink

string

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

value

SecurityRule[]

ネットワーク セキュリティ グループのセキュリティ規則。

SecurityRuleProtocol

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

名前 説明
*

string

Ah

string

Esp

string

Icmp

string

Tcp

string

Udp

string