Queries the back-to-origin policies for the forwarding rule of a website.

Debugging

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 DescribeL7RsPolicy

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

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: Chinese mainland, which indicates Anti-DDoS Pro instances.
  • ap-southeast-1: outside the Chinese mainland, which indicates Anti-DDoS Premium instances.
ResourceGroupId String No rg-acfm2pz25js****

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.

For more information about resource groups, see Create a resource group.

Domain String Yes example.com

The domain name of the website to query.

Note A forwarding rule must be configured for the domain name. You can call the DescribeDomains operation to query the domain names for which forwarding rules are configured.
RealServers.N String No 1.***.***.1

The address of origin server N to query. The maximum value of N is 200. You can specify up to 200 addresses. Separate multiple addresses with commas (,).

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
ProxyMode String rr

The scheduling algorithm for back-to-origin traffic. Valid values:

  • ip_hash: the IP hash algorithm. This algorithm is used to redirect the requests from the same IP address to the same origin server.
  • rr: the round-robin algorithm. This algorithm is used to redirect requests to origin servers in turn.
  • least_time: the least response time algorithm. This algorithm is used to minimize the latency when requests are forwarded from Anti-DDoS Pro or Anti-DDoS Premium instances to origin servers based on the intelligent DNS resolution feature.
RequestId String 9E7F6B2C-03F2-462F-9076-B782CF0DD502

The ID of the request, which is used to locate and troubleshoot issues.

Attributes Array of AttributeItem

The details about the parameters for back-to-origin.

RsType Integer 0

The address type of the origin server. Valid values:

  • 0: IP address
  • 1: domain name
RealServer String 1.***.***.1

The address of the origin server.

Attribute Object

The parameter for back-to-origin.

Weight Integer 100

The weight of the origin server. This parameter takes effect only when ProxyMode is set to rr.

Valid values: 1 to 100. Default value: 100. An origin server with a higher weight receives more requests.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeL7RsPolicy
&ResourceGroupId=rg-acfm2pz25js****
&Domain=example.com
&RealServers=["1.***.***.1"]
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeL7RsPolicyResponse>
    <ProxyMode>rr</ProxyMode>
    <RequestId>9E7F6B2C-03F2-462F-9076-B782CF0DD502</RequestId>
    <Attributes>
        <RsType>0</RsType>
        <RealServer>1.***.***.1</RealServer>
        <Attribute>
            <Weight>100</Weight>
        </Attribute>
    </Attributes>
</DescribeL7RsPolicyResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "ProxyMode" : "rr",
  "RequestId" : "9E7F6B2C-03F2-462F-9076-B782CF0DD502",
  "Attributes" : [ {
    "RsType" : 0,
    "RealServer" : "1.***.***.1",
    "Attribute" : {
      "Weight" : 100
    }
  } ]
}

Error codes

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