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

Available in VPC

Enable the flow log of a network interface.

Syntax

The enableFlowLog syntax is as follows:

./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>]

Options

This section describes the options available when running enableFlowLog.

Required options

The following options are required for enableFlowLog.

Options Type Required Description
--networkInterfaceNo String Required Network interface number
--collectActionTypeCode String Required Collection action type code
  • ALLOW | DENY | ALL
    • ALLOW: Allow
    • DENY: Deny
    • ALL: All
--storageBucketName String Required Bucket name

Optional options

These are the optional options for enableFlowLog. Options that are not specified will use their default values.

Options Type Required Description
--collectIntervalMinute Integer Optional Collection unit (minute)
  • 5-15 (default: 15)
--storageTypeCode String Optional Storage location
  • OBJT: Object Storage
--storageBucketDirectoryName String Optional Bucket folder name
  • Enter 3-100 characters by combining lowercase English letters, numbers, and special character _.
  • Default: VPC_FLOW_LOG

Common options

For information about the options common to all vserver subcommands, see Server (VPC) options.

Examples

If the request to enable the flow log is successful, the network interface number and flow log collection settings are returned.

Command

The command example is as follows:

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

Output

The output example is as follows:

{
  "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"
  }
}