Modifies the default field configuration of the log service for a user.
Operation description
Before calling this operation, make sure that the log service is activated for the WAF instance. Call the DescribeInstance operation to query instance details. If the Details.LogService response parameter is true, the log service is activated. If the log service is not activated, log on to the WAF console and upgrade the instance to activate the log service.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:ModifyUserLogFieldConfig |
update |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID of the WAF instance. Note
You can call the DescribeInstance operation to query instance ID of the current WAF instance. |
waf_v2_public_cn-fou**** |
| FieldList |
string |
Yes |
The list of log fields to deliver. Specify the fields in the "a,b,c,..." format. Note
|
account,acl_action,acl_rule_id,acl_rule_type,acl_test,antiscan_action,antiscan_rule_id,antiscan_rule_type,antiscan_test,body_bytes_sent,bypass_matched_ids |
| ExtendConfig |
string |
No |
The extended configuration for log delivery. The value is a JSON string constructed from a set of parameters. Note
For more information, see the Log delivery extended configuration parameter description. |
{\"request_header\":\"App-Id,channelCode\"} |
| DeliveryType |
string |
No |
The delivery type. Valid values:
|
sls |
| LogDeliveryStrategy |
string |
No |
The log delivery strategy. Multiple strategies are supported. The value is a JSON array string constructed from a set of parameters. Note
For more information, see the Log delivery strategy parameter description. |
[{\"logType\":\"blockLog\",\"rate\":100},{\"logType\":\"normalRequestLog\",\"rate\":100},{\"logType\":\"checkLog\",\"rate\":100}] |
| RegionId |
string |
No |
The region where the WAF instance resides. Valid values:
|
cn-hangzhou |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
Log delivery strategy (LogDeliveryStrategy) parameter description.
Parameter description
| Name | Type | Required | Example | Description |
| logType | String | Yes | blockLog | The log type. Valid values: - blockLog: block log. - normalRequestLog: normal request log. - checkLog: detection log. |
| rate | Integer | Yes | 90 | The log sampling ratio. Valid values: 1 to 100. |
Log delivery extended configuration (ExtendConfig) parameter description.
Parameter description
| Name | Type | Required | Example | Description |
| request_header | String | Yes | blockLog | The request headers for log delivery. A maximum of five request headers are supported. Specify the headers in the "a,b,c,..." format. Important If the log fields to deliver include request_header, this parameter is required. Otherwise, the default configurations modification for all fields fails. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
E2D63742-9BAA-***** |
Examples
Success response
JSON format
{
"RequestId": "E2D63742-9BAA-*****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.