Modifies the attributes of a flow log.
Usage notes
- ModifyFlowLogAttribute is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. You can call the DescribeFlowLogs operation to query the status of a flow log:
- If the flow log is in the Modifying state, the flow log is being modified.
- If the flow log is in the Active or Inactive state, the flow log is modified.
- You cannot repeatedly call the ModifyFlowLogAttribute operation to modify a flow log within the specified period of time.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyFlowLogAttribute | The operation that you want to perform. Set the value to ModifyFlowLogAttribute. |
RegionId | String | Yes | cn-qingdao | The ID of the region where the flow log is created. You can call the DescribeRegions operation to query the most recent region list. |
FlowLogId | String | Yes | fl-m5e8vhz2t21sel1nq**** | The ID of the flow log. |
FlowLogName | String | No | myFlowlog | The new name of the flow log. The name must be 1 to 128 characters in length and cannot start with |
Description | String | No | This is my Flowlog. | The new description of the flow log. The description must be 1 to 256 characters in length and cannot start with |
AggregationInterval | Integer | No | 1 | The new sampling interval of the flow log. Unit: minutes. Valid values: 1, 5, and 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Success | String | true | Indicates whether the call is successful. Valid values:
|
RequestId | String | F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1 | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ModifyFlowLogAttribute
&RegionId=cn-qingdao
&FlowLogId=fl-m5e8vhz2t21sel1nq****
&FlowLogName=myFlowlog
&Description=This is my Flowlog.
&AggregationInterval=1
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyFlowLogAttributeResponse>
<Success>true</Success>
<RequestId>F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1</RequestId>
</ModifyFlowLogAttributeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Success" : true,
"RequestId" : "F7DDDC17-FA06-4AC2-8F35-59D2470FCFC1"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IncorrectBusinessStatus.FlowLog | The business status of flowLog is incorrect. | The error message returned because you cannot create flow logs in the current business state. |
400 | InvalidInstanceId | Instance does not exist. | The error message returned because the specified instance does not exist. |
400 | ProjectOrLogstoreNotExist | The specified project or logstore does not exist. | The error message returned because the specified project or Logstore does not exist. |
400 | SourceProjectNotExist | The Source Project or logstore does not exist. | The error message returned because the source project or Logstore does not exist. |
400 | Unauthorized | This api does not support sub user or role. | The error message returned because you cannot call this operation as a RAM user. |
400 | IncorrectStatus.flowlog | Invalid flowlog status. | The error message returned because the flow log is in an invalid state and cannot be disabled. |
400 | IllegalParam.AggregationInterval | The param of aggregationInterval is illegal. | The error message returned because the sampling interval is invalid. |
400 | Forbidden.OperateManagedFlowLog | Authentication is failed for operate managed flowlog. | The error message returned because authentication failed when the system handles the managed flow log. |
For a list of error codes, see Service error codes.