ポート優先度ルール

実際のネットワーク要件に基づいて、ポート優先度の値を設定できます。
nfa1000
実際のネットワーク要件に基づいて、ポート優先度の値を設定できます。
このセクションでは、ポート優先度ルールでサポートされている、API を使用した以下の操作について説明します。
ポート優先度ルールの取得
この API を使用すると、ポート優先度ルールのリストを取得できます。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules
メソッド
GET
サンプル リクエスト
http://127.0.0.1:8981/odata/api/portPriorityRules
サンプル レスポンス
{ "@odata.context": "http://localhost:8981/odata/api/$metadata#portPriorityRules(ID,portType,startPort,endPort,Description)", "value": [ { "startPort": 1080, "portType": "TCP", "Description": "Socks", "ID": 1, "endPort": 1080 }, { "startPort": 1352, "portType": "TCP", "Description": "Lotus Notes", "ID": 2, "endPort": 1352 }, { "startPort": 1352, "portType": "UDP", "Description": "Lotus Notes", "ID": 3, "endPort": 1352 }, { "startPort": 1433, "portType": "TCP", "Description": "Microsoft SQL Server DBMS Server", "ID": 4, "endPort": 1433 }, { "startPort": 1434, "portType": "UDP", "Description": "Microsoft SQL Server DBMS Monitor", "ID": 5, "endPort": 1434 }, { "startPort": 1494, "portType": "UDP", "Description": "ICA", "ID": 6, "endPort": 1494 }, { "startPort": 1494, "portType": "TCP", "Description": "ICA", "ID": 7, "endPort": 1494 }, { "startPort": 1521, "portType": "TCP", "Description": "Oracle", "ID": 8, "endPort": 1521 }, { "startPort": 2000, "portType": "TCP", "Description": "SCCP (CM Encore)", "ID": 9, "endPort": 2002 }, { "startPort": 2049, "portType": "TCP", "Description": "NFS", "ID": 10, "endPort": 2049 } ], "@odata.nextLink": http://localhost:8981/odata/api/portPriorityRules?timeout=120&$skiptoken=10
単一のポート優先度ルールの取得
この API を使用すると、単一のポート優先度ルールを取得できます。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules(portPriorityRuleID)
メソッド
GET
サンプル リクエスト
http://127.0.0.1:8981/odata/api/portPriorityRules(168)
サンプル レスポンス
{ "@odata.context": "$metadata#portPriorityRules", "ID": 168, "portType": "UDP", "startPort": 1080, "endPort": 1080, "Description": "Socks" }
ポート優先度ルールの作成
この API を使用すると、ポート優先度ルールを作成できます。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules
メソッド
POST
ペイロード
{ "startPort": <start port value>, "portType": "<port type value>", "endPort": <end port value>, "Description": "<description details>" }
サンプル リクエスト
http://127.0.0.1:8981/odata/api/portPriorityRules
サンプル ペイロード
{ "startPort": 1080, "portType": "UDP", "endPort": 1080, "Description": "Socks" }
サンプル レスポンス
{ "@odata.context": "$metadata#portPriorityRules", "ID": 168, "portType": "UDP", "startPort": 1080, "endPort": 1080, "Description": "Socks" }
ポート優先度ルールの更新
この API を使用すると、単一のポート優先度ルールを更新できます。この API は、一括編集をサポートしていません。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules(portPriorityRuleID)
メソッド
PATCH
ペイロード
{ "startPort": <start port value>, "portType": "<port type value>", "endPort": <end port value>, "Description": "<description details>" }
サンプル リクエスト
http://127.0.0.1:8981/odata/api/portPriorityRules(168)
サンプル ペイロード
{ "startPort": 1080, "portType": "UDP", "endPort": 1080, "Description": "Socks_Change" }
サンプル レスポンス
この API に対するレスポンスはありません。
ポート優先度ルールの削除
この API を使用すると、単一のポート優先度ルールを削除できます。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules(portPriorityRuleID)
メソッド
DELETE
サンプル リクエスト
以下のリクエストは、ポート優先度ルール ID 168 を削除するためのアクションを示しています。
http://127.0.0.1:8981/odata/api/portPriorityRules(168)
サンプル レスポンス
この API に対するレスポンスはありません。
ポート優先度ルールの一括削除
以下のコードは、ポート優先度ルールの一括削除に関する参照メタデータ セクションです。
リソース
URI
http://<nfa odata host>:<nfa odata port>/odata/api/portPriorityRules/com.ca.nfa.deletePortPriorityRules
メソッド
POST
ペイロード
"RuleIds":[<List of rule_ids separated by a comma>]
サンプル リクエスト
以下のリクエストは、ポート優先度ルールを一括で削除するための削除アクションを示しています。
http://127.0.0.1:8981/odata/api/portPriorityRules/com.ca.nfa.deletePortPriorityRules
サンプル ペイロード
{ "RuleIds": [106,107] }
サンプル レスポンス
{ "@odata.context": "$metadata#Collection(com.ca.nfa.odata.portPriorityRules)", "value": [ { "ID": 106, "portType": "TCP", "startPort": 1000, "endPort": 1050, "Description": "Uday3" }, { "ID": 107, "portType": "TCP", "startPort": 1000, "endPort": 1010, "Description": "" } ] }
検証チェック
値を入力する際は、以下のデータ検証を考慮する必要があります。
  • PortType、StartPort、および EndPort の組み合わせは一意である必要があります。
  • PortType の値は、「TCP」または「UDP」のいずれかにする必要があります。
  • ポートの値は 0 から 65535 までの値にする必要があります。
  • 説明の長さは 120 文字未満にする必要があります。