Documentation Index

Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

enableFlowLog

Prev Next

VPC環境で利用できます。

ネットワークインターフェースの Flow Logを有効化します。

構文

enableFlowLog構文は次の通りです。

./ncloud vserver enableFlowLog \
    --networkInterfaceNo <nic-no> \
    --collectActionTypeCode <ALLOW|DENY|ALL> \
    --storageBucketName <bucket-name> \
    [--collectIntervalMinute <interval-minute>] \
    [--storageTypeCode <OBJT>] \
    [--storageBucketDirectoryName <bucket-directory-name>] \
    [--regionCode <KR|SGN|JPN>] \
    [--output <json|xml>]

オプション

enableFlowLogの実行時に指定できるオプションについて説明します。

必須オプション

enableFlowLogの必須オプションです。

オプション タイプ 必須の有無 説明
--networkInterfaceNo String Required ネットワークインターフェース番号
--collectActionTypeCode String Required 収集アクションタイプコード
  • ALLOW | DENY | ALL
    • ALLOW: 許可
    • DENY: 拒否
    • ALL: すべて
--storageBucketName String Required バケット名

任意オプション

enableFlowLogの任意オプションです。指定しない場合、オプションにはデフォルト値が適用されます。

オプション タイプ 必須の有無 説明
--collectIntervalMinute Integer Optional 収集単位 (分)
  • 5~15 (デフォルト: 15)
--storageTypeCode String Optional 保存場所
  • OBJT: Object Storage
--storageBucketDirectoryName String Optional バケットのフォルダ名
  • 英字の小文字、数字、記号の_を組み合わせて3~100文字以内で入力
  • デフォルト: VPC_FLOW_LOG

共通オプション

vserverコマンドで共通して使用するオプションについては、Server (VPC)のオプションをご参照ください。

Flow Logの有効化リクエストが成功すると、ネットワークインターフェース番号と Flow Logの収集設定が返されます。

コマンド

コマンドの例は次の通りです。

./ncloud vserver enableFlowLog \
    --networkInterfaceNo 56789012 \
    --collectActionTypeCode ALL \
    --storageBucketName my-test-bucket \
    --collectIntervalMinute 5 \
    --storageTypeCode OBJT \
    --storageBucketDirectoryName myflowlog \
    --regionCode KR \
    --output json

出力

出力の例は次の通りです。

{
  "enableFlowLogResponse": {
    "totalRows": 1,
    "flowLogConfigurationList": [
      {
        "networkInterfaceNo": "56789012",
        "collectActionType": {
          "code": "ALL",
          "codeName": "All"
        },
        "collectIntervalMinute": 5,
        "storageType": {
          "code": "OBJT",
          "codeName": "Object Storage"
        },
        "storageBucketName": "my-test-bucket",
        "storageBucketDirectoryName": "myflowlog"
      }
    ],
    "requestId": "39012345-6789-0123-3456-901234567890",
    "returnCode": "0",
    "returnMessage": "success"
  }
}