Enables or disables HTTP/2 for the forwarding rule of a website.

Note This API operation is suitable only for Anti-DDoS Pro.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifyHttp2Enable

The operation that you want to perform. Set the value to ModifyHttp2Enable.

Domain String Yes www.aliyun.com

The domain name of the website.

Note A forwarding rule must be configured for the domain name, and the domain name must be protected by an Anti-DDoS Pro instance that uses the enhanced function plan. You can call the DescribeDomains operation to query all domain names.
Enable Integer Yes 1

Specifies whether to enable HTTP/2. Valid values:

  • 0: disables HTTP/2.
  • 1: enables HTTP/2.
RegionId String No cn-hangzhou

The region ID of the instance. Set the value to cn-hangzhou, which indicates an Anti-DDoS Pro instance.

ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

Response parameters

Parameter Type Example Description
RequestId String C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "RequestId": "C33EB3D5-AF96-43CA-9C7E-37A81BC06A1E"

Error codes

For a list of error codes, visit the API Error Center.