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
|
--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)
|
--storageTypeCode |
String | Optional | Storage location
|
--storageBucketDirectoryName |
String | Optional | Bucket folder name
|
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"
}
}