All Products
Search
Document Center

Web Application Firewall:ModifyDefenseResourceXff

Last Updated:Sep 13, 2024

Modifies the cookie settings of a protected object and the method to identify the originating IP addresses of clients.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-waf:ModifyDefenseResourceXff
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
XffStatusintegerYes

Specifies whether a Layer 7 proxy is deployed in front of WAF. Layer 7 proxies include Anti-DDoS Proxy and Alibaba Cloud CDN. Valid values:

  • 0: No Layer 7 proxies are deployed. This is the default value.
  • 1: A Layer 7 proxy is deployed.
0
InstanceIdstringYes

The ID of the Web Application Firewall (WAF) instance.

Note You can call the DescribeInstance operation to query the ID of the WAF instance.
waf_v2_public_cn-wwo3c****07
CustomHeadersarrayNo

The custom header fields.

Note The first IP address in the specified custom header field is used as the originating IP address of the client to prevent X-Forwarded-For forgery. If you specify multiple header fields, WAF reads the values of the header fields in sequence until the originating IP address is obtained. If the originating IP address cannot be obtained, the first IP address in the X-Forwarded-For header is used as the originating IP address of the client.
stringNo

The custom header field.

x-forwarded-for
ResourcestringYes

The name of the protected object.

alb-4pxu81fgagx3****mz-alb
AcwCookieStatusintegerNo

The status of the tracking cookie.

  • 0: disabled
  • 1: enabled. This is the default value.
0
AcwSecureStatusintegerNo

The status of the secure attribute of the tracking cookie.

  • 0: disabled. This is the default value.
  • 1: enabled.
0
AcwV3SecureStatusintegerNo

The status of the secure attribute of the slider CAPTCHA cookie.

  • 0: disabled. This is the default value.
  • 1: enabled.
0
ResourceManagerResourceGroupIdstringNo

The ID of the Alibaba Cloud resource group.

rg-acfm2kie2****wq
RegionIdstringNo

The region in which the WAF instance is deployed. Valid values:

  • cn-hangzhou: Chinese mainland.
  • ap-southeast-1: outside the Chinese mainland.
cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

6C094583-9B3F-5BD8-8748-DC638E****BF

Examples

Sample success responses

JSONformat

{
  "RequestId": "6C094583-9B3F-5BD8-8748-DC638E****BF"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-08-29The request parameters of the API has changedView Change Details