Modifies the log field configuration of a protected object.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:ModifyResourceLogFieldConfig |
update |
*All Resource
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the WAF instance. Note
Call DescribeInstance to query the ID of the current WAF instance. |
waf_v3prepaid_public_cn-uax****3k0e |
| FieldList |
string |
Yes |
The list of log fields to deliver. Use 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 extension configuration for log delivery. This is a JSON object converted to a string. Note
For more information, see the description of the ExtendConfig parameter. |
{\"request_header\":\"Ali-Cdn-Real-Ip\"} |
| DeliveryType |
string |
Yes |
The log delivery type. Valid values:
|
sls |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm***q |
| RegionId |
string |
No |
The region where the WAF instance resides. Valid values:
|
cn-hangzhou |
| Resource |
string |
Yes |
The protected object to modify. |
cwaf-***-waf |
| LogDeliveryStrategy |
string |
No |
The log delivery policies. Multiple policies are supported. This is a JSON array of policy objects converted to a string. Note
For more information, see the description of the LogDeliveryStrategy parameter. |
[{\"logType\":\"blockLog\",\"rate\":100},{\"logType\":\"normalRequestLog\",\"rate\":100},{\"logType\":\"checkLog\",\"rate\":100}] |
The LogDeliveryStrategy parameter
Parameters
| Name | Type | Required | Example | Description |
| logType | String | Yes | blockLog | The log type. Valid values: - blockLog: Blocked request logs. - normalRequestLog: Normal request logs. - checkLog: Detection logs. |
| rate | Integer | Yes | 90 | The log sampling ratio. The value must be between 1 and 100. |
The ExtendConfig parameter
Parameters
| Name | Type | Required | Example | Description |
| request_header | String | Yes | blockLog | The request headers for log delivery. You can specify up to five headers. Use the `a,b,c,...` format. Important If the log fields to deliver include `request_header`, this parameter is required. Otherwise, the modification of the default configurations for all fields fails. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
D7861F61-5B61-46CE-A47C-6B**** |
Examples
Success response
JSON format
{
"RequestId": "D7861F61-5B61-46CE-A47C-6B****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.