Creates a flow log instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
smartag:CreateFlowLog |
create |
*FlowLog
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the flow log. Call DescribeRegions to query available regions. |
cn-shanghai |
| Description |
string |
No |
The flow log description. |
test |
| Name |
string |
No |
The flow log name. |
sag-flowlog-1 |
| ActiveAging |
integer |
No |
The output interval for active connections, in seconds. Valid values: 60 to 6000. Default value: 300. |
300 |
| InactiveAging |
integer |
No |
The output interval for inactive connections, in seconds. Valid values: 10 to 600. Default value: 15. |
15 |
| OutputType |
string |
No |
The output type of the flow log. Valid values:
|
all |
| SlsRegionId |
string |
No |
The region ID of the Log Service deployment. Required when OutputType is set to sls or all. |
cn-shanghai |
| ProjectName |
string |
No |
The Log Service project. Required when OutputType is set to sls or all. |
sag-flowlog-shanghai |
| LogstoreName |
string |
No |
The Log Service Logstore. Required when OutputType is set to sls or all. |
config-operation-log |
| NetflowServerIp |
string |
No |
The IP address of the NetFlow collector. Required when OutputType is set to netflow or all. |
192.168.0.2 |
| NetflowServerPort |
integer |
No |
The port of the NetFlow collector. Default value: 9995. Required when OutputType is set to netflow or all. |
9995 |
| NetflowVersion |
string |
No |
The NetFlow protocol version. Valid values: V5, V9, and V10. Default value: V9. Required when OutputType is set to netflow or all. |
V9 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
650CB9E8-20F3-4538-A4FC-1DA1B36E42D9 |
| FlowLogId |
string |
The flow log ID. |
fl-7a56mar1kfw9vj**** |
| ResourceGroupId |
string |
The resource group ID of the flow log. |
rg-acfm2iu4f**** |
Examples
Success response
JSON format
{
"RequestId": "650CB9E8-20F3-4538-A4FC-1DA1B36E42D9",
"FlowLogId": "fl-7a56mar1kfw9vj****",
"ResourceGroupId": "rg-acfm2iu4f****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | DependencyViolation.FlowLog | This FlowLog instance is bound to an SAG instance. | This flow log associated with a resource. |
| 400 | IncorrectStatus.FlowLog | The current FlowLog instance status does not support this operation. | The status of the flow log is invalid. |
| 400 | InvalidFlowLogId.NotFound | The specified FlowLogId does not exist. | The specified FlowLogId does not exist. |
| 400 | MissingParam.FlowLogId | Specify the FlowLogId parameter. | You must set the FlowLogId parameter. |
| 400 | OperationFailed.AssociateFlowLog | The operation failed. The specified SAG instance has already been associated with another FlowLog instance. | The operation failed. The specified SAG instance has already been associated with another flow log. |
| 400 | OperationUnsupported.AssociateFlowLog | You cannot bind the SAG device of the current version or model to a FlowLog instance. | The version or model of the SAG device does not allow you to associate it with a flow log. |
| 400 | QuotaExceeded.Flowlog | The maximum number of FlowLog instances is exceeded. | The number of flow logs has reached the upper limit. |
| 400 | MissingParam.LogstoreName | Specify the LogstoreName parameter. | You must set the LogstoreName parameter. |
| 400 | MissingParam.NetflowServerIp | Specify the NetflowServerIp parameter. | You must set the NetflowServerIp parameter. |
| 400 | MissingParam.NetflowServerPort | Specify the NetflowServerPort parameter. | You must set the NetflowServerPort parameter. |
| 400 | MissingParam.NetflowVersion | Specify the NetflowVersion parameter. | You must set the NetflowVersion parameter. |
| 400 | MissingParam.ProjectName | Specify the ProjectName parameter. | You must set the ProjectName parameter. |
| 400 | MissingParam.SlsRegionId | Specify the SlsRegionId parameter. | You must set the SlsRegionId parameter. |
| 400 | IllegalParam.ActiveAging | The specified ActiveAging is invalid. | The ActiveAging parameter is set to an invalid value. |
| 400 | IllegalParam.InactiveAging | The specified InactiveAging is invalid. | The InactiveAging parameter is set to an invalid value. |
| 400 | IllegalParam.NetflowServerIp | The specified NetflowServerIp is invalid. | The NetflowServerIp parameter is set to an invalid value. |
| 400 | IllegalParam.NetflowServerPort | The specified NetflowServerPort is invalid. | The NetflowServerPort parameter is set to an invalid value. |
| 400 | IllegalParam.NetflowVersion | The specified NetflowVersion is invalid. | The NetflowVersion parameter is set to an invalid value. |
| 400 | IllegalParam.OutputType | The specified OutputType is invalid. | The OutputType parameter is set to an invalid value. |
| 400 | IllegalParam.RegionId | The specified RegionId is invalid. | The RegionId parameter is set to an invalid value. |
| 400 | IllegalParam.SlsRegionId | The specified SlsRegionId is invalid. | The SlsRegionId parameter is set to an invalid value. |
| 400 | IllegalParam.Status | The specified Status parameter is invalid. | The Status parameter is set to an invalid value. |
| 403 | FeatureNotSupport | The current edition of the smart access gateway does not support this feature. | The current version of Smart Access Gateway does not support this feature. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.