Modifies the client IP and cookie settings of a protected object.
Operation description
Before you invoke this operation, make sure that a protected object has been added to WAF. You can invoke the CreateDomain operation to create a CNAME-based resource, invoke the CreateCloudResource operation to create a cloud native mode resource, or invoke the CreateDefenseResource operation to create a custom protected object. You can invoke the DescribeDefenseResources operation to query the protected objects that have been added to WAF.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-waf:ModifyDefenseResourceXff |
update |
*DefenseResource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| XffStatus |
integer |
Yes |
Specifies whether a Layer 7 proxy (Anti-DDoS Pro, CDN, or similar) is deployed in front of WAF. Valid values:
|
0 |
| InstanceId |
string |
Yes |
Instance ID of the WAF instance. Note
You can call the DescribeInstance operation to query instance ID of the WAF instance. |
waf_v2_public_cn-wwo****ek07 |
| CustomHeaders |
array |
No |
The list of specified header fields. Note
The first IP address in the specified header field is used as the client source IP address to prevent XFF spoofing. If multiple headers are specified, the system attempts to obtain the source IP address from the headers in order. If the first header does not contain an IP address, the system tries the second header, and so on. If none of the specified headers contain an IP address, the first IP address in the X-Forwarded-For header is used. |
|
|
string |
No |
The specified header field. |
x-forwarded-for |
|
| Resource |
string |
Yes |
The name of the protected object. Note
The protected object must have been added to WAF. You can call the DescribeDefenseResources operation to query the name of the protected object. |
alb-4pxu81fgagx3h6y****-alb |
| AcwCookieStatus |
integer |
No |
The status of the tracking cookie switch.
|
0 |
| AcwSecureStatus |
integer |
No |
The status of the secure attribute of the tracking cookie.
|
0 |
| AcwV3SecureStatus |
integer |
No |
The status of the secure attribute of the slider cookie.
|
0 |
| RegionId |
string |
No |
The region where the WAF instance is deployed. Valid values:
|
cn-hangzhou |
| ResponseHeaders |
array<object> |
No |
The response header parameters. |
|
|
object |
No |
The response header parameters. |
||
| Key |
string |
No |
The key of the custom response header. |
Header-Key |
| Value |
string |
No |
The value of the custom response header. |
Header-Value |
| ResourceManagerResourceGroupId |
string |
No |
The ID of the Alibaba Cloud resource group. |
rg-acfm2ki****miwq |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
6C094583-9B3F-5BD8-8748-DC638E48**** |
Examples
Success response
JSON format
{
"RequestId": "6C094583-9B3F-5BD8-8748-DC638E48****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Waf.Pullin.AbnormalStatus | The status of the access resource is abnormal. Resource:%s. | The status of the access resource is abnormal. Resource:%s. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.