Classic環境で利用できます。
Secure Zone Firewallで発生したトラフィックの使用量を照会します。
リクエスト
リクエスト形式を説明します。リクエスト形式は次の通りです。
メソッド | URI |
---|---|
POST | /{type}/{zone}/getTrafficUsage |
リクエストヘッダ
Secure Zone APIで共通して使用されるヘッダの詳細は、Secure Zoneのリクエストヘッダをご参照ください。
リクエストパスパラメータ
パラメータの説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
type |
String | Required | Secure Zoneで提供するファイアウォールタイプ
|
zone |
String | Required | Secure Zoneを構成したゾーン
|
リクエストボディ
リクエストボディの説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
status |
String | Optional | ユーザーの状態
|
page |
Integer | Optional | ページインデックス
|
countPerPage |
Integer | Optional | ページごとの項目数
|
fromDate |
Date | Required | 照会期間の開始日 |
toDate |
Date | Required | 照会期間の終了日 |
timeZone |
String | Optional | タイムゾーン
|
リクエスト例
リクエストのサンプルコードは次の通りです。
curl --location --request POST 'https://securezonefirewall.apigw.ntruss.com/api/v2/szfw/kr2/getTrafficUsage'
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'x-ncp-mbr_no: {User number}' \
--header 'Content-Type: application/json' \
--data '{
"fromDate": "2024-07-01T00:32:14.953Z",
"toDate": "2024-07-03T05:32:24.223Z"
}'
レスポンス
レスポンス形式を説明します。
レスポンスボディ
レスポンスボディの説明は次の通りです。
フィールド | タイプ | 必須の有無 | 説明 |
---|---|---|---|
action |
String | - | リクエストタイプ |
returnCode |
Integer | - | レスポンスコード |
returnMessage |
String | - | レスポンスメッセージ |
trafficUsageList[] |
Array | - | トラフィック使用量データリスト |
trafficUsageList[].memberNo |
String | - | ユーザーの NAVERクラウドプラットフォーム会員番号 |
trafficUsageList[].instanceNo |
String | - | インスタンス作成時に付与された契約番号 |
trafficUsageList[].secureZoneName |
String | - | Secure Zone名 |
trafficUsageList[].checkDate |
String | - | メンテナンス日(yyyy-MM-dd) |
trafficUsageList[].checkTime |
String | - | メンテナンス時点(hh:mm:ss) |
trafficUsageList[].checkHour |
String | - | メンテナンス時間(hh) |
trafficUsageList[].rxBytes |
Integer | - | 受信したデータ容量 |
trafficUsageList[].txBytes |
Integer | - | 送信したデータ容量 |
trafficUsageList[].rxBytesIncrement |
Integer | - | 受信データの増加量 |
trafficUsageList[].txBytesIncrement |
Integer | - | 送信データの増加量 |
trafficUsageList[].totalIncrement |
Integer | - | 総データ増加量 |
trafficUsageList[].regYmdt |
Date | - | 登録日 |
trafficUsageList[].status |
String | - | ユーザーの状態 |
trafficUsageList[].memberLastModifyYmdt |
Date | - | ユーザー情報の最終更新日 |
totalCount |
Integer | - | トラフィック使用量データ数 |
レスポンスステータスコード
NAVERクラウドプラットフォームで共通して使用されるレスポンスステータスコードの詳細は、Ncloud APIのレスポンスステータスコードをご参照ください。
レスポンス例
レスポンスのサンプルコードは次の通りです。
{
"action": "getTrafficUsage",
"returnCode": 0,
"returnMessage": "success",
"trafficUsageList": [
{
"memberNo": "27***85",
"instanceNo": "25****11",
"secureZoneName": "Secure",
"checkDate": "2024-07-01",
"checkTime": "09:40:13",
"checkHour": "09",
"rxBytes": 0,
"txBytes": 752,
"rxBytesIncrement": 0,
"txBytesIncrement": 0,
"totalIncrement": 277,
"regYmdt": 1719794413000,
"status": "USE",
"memberLastModifyYmdt": 1719379274000
}
],
"totalCount": 318
}