public static final class ModifyHeadersRequest.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ModifyHeadersRequest |
build() |
ModifyHeadersRequest.Builder |
customHeaders(String customHeaders)
The key-value pair of the custom header.
|
ModifyHeadersRequest.Builder |
domain(String domain)
The domain name of the website.
|
ModifyHeadersRequest.Builder |
embeddedHeaders(String embeddedHeaders)
EmbeddedHeaders.
|
ModifyHeadersRequest.Builder |
regionId(String regionId)
RegionId.
|
ModifyHeadersRequest.Builder |
resourceGroupId(String resourceGroupId)
The ID of the resource group to which the instance belongs.
|
public ModifyHeadersRequest.Builder regionId(String regionId)
public ModifyHeadersRequest.Builder customHeaders(String customHeaders)
The key-value pair of the custom header. The key specifies the header name, and the value specifies the header value. You can specify up to five key-value pairs. The key-value pairs can be up to 200 characters in length.
Take note of the following items:
Do not use the following default HTTP headers:
Do not use standard HTTP headers or specific widely used custom HTTP headers. The standard HTTP headers include Host, User-Agent, Connection, and Upgrade, and the widely used custom HTTP headers include X-Real-IP, X-True-IP, X-Client-IP, Web-Server-Type, WL-Proxy-Client-IP, eEagleEye-RpcID, EagleEye-TraceID, X-Forwarded-Cluster, and X-Forwarded-Proto. If the preceding headers are used, the original content of the headers is overwritten.
If you specify a key of X-Forwarded-ClientSrcPort, the system obtains the originating ports of clients that access Anti-DDoS Proxy (a Layer 7 proxy). In this case, the value is an empty string.
This parameter is required.
example:{"X-Forwarded-ClientSrcPort":""}
public ModifyHeadersRequest.Builder domain(String domain)
The domain name of the website.
A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query all domain names.
This parameter is required.
example:example.aliyundoc.com
public ModifyHeadersRequest.Builder embeddedHeaders(String embeddedHeaders)
public ModifyHeadersRequest.Builder resourceGroupId(String resourceGroupId)
The ID of the resource group to which the instance belongs.
You can query resource group IDs in the Anti-DDoS Pro or Anti-DDoS Premium console or by calling the ListResourceGroups operation. For more information, see View basic information of a resource group.
Before you modify the resource group to which an instance belongs, you can call the ListResources operation to view the current resource group of the instance.
rg-acfmz6jbof5****
public ModifyHeadersRequest build()
Copyright © 2026. All rights reserved.