All Products
Search
Document Center

Anti-DDoS:DescribeL7RsPolicy

Last Updated:Oct 24, 2024

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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-ddoscoo:DescribeL7RsPolicyget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

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.

rg-acfm2pz25js****
DomainstringYes

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.
example.com
RealServersarrayNo

An array that consists of N addresses of origin servers to query. The maximum value of N is 200. You can specify up to 200 addresses.

stringNo

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

1.***.***.1

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

ParameterTypeDescriptionExample
object
ProxyModestring

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.
rr
UpstreamRetryinteger

The back-to-origin retry switch. Valid values:

  • 1: on
  • 0: off
1
RsAttrRwTimeoutMaxlong

The timeout period for a read or write connection.

300
RequestIdstring

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

9E7F6B2C-03F2-462F-9076-B782CF0DD502
Attributesarray<object>

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

AttributeItemobject
RsTypeinteger

The address type of the origin server. Valid values:

  • 0: IP address
  • 1: domain name
0
RealServerstring

The address of the origin server.

1.***.***.1
Attributeobject

The parameters for back-to-origin settings.

Weightinteger

The weight of the origin server. This parameter takes effect only if the value of ProxyMode is rr or ip_hash.****

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

100
ConnectTimeoutinteger

The timeout period for a new connection. Valid values: 1 to 10. Unit: seconds. Default value: 5.

5
FailTimeoutinteger

The expiration time of a connection, in seconds. If the number of failures at the origin server exceeds the MaxFails value, the address of the origin server is set to down and the expiration time is FailTimeout. The final value is the maximum value of ConnectTimeout and FailTimeout. Valid values: 1 to 3600. Unit: seconds. Default value: 10.

10
MaxFailsinteger

The maximum number of failures. This parameter is related to health check. Valid values: 1 to 10. Unit: seconds. Default value: 3.

3
Modestring

The primary/secondary flag. Valid values:

  • active: primary
  • backup: secondary
active
ReadTimeoutinteger

The timeout period for a read connection. Valid values: 10 to 300. Unit: seconds. Default value: 120.

120
SendTimeoutinteger

The timeout period for a write connection. Valid values: 10 to 300. Unit: seconds. Default value: 120.

120

Examples

Sample success responses

JSONformat

{
  "ProxyMode": "rr",
  "UpstreamRetry": 1,
  "RsAttrRwTimeoutMax": 300,
  "RequestId": "9E7F6B2C-03F2-462F-9076-B782CF0DD502",
  "Attributes": [
    {
      "RsType": 0,
      "RealServer": "1.***.***.1",
      "Attribute": {
        "Weight": 100,
        "ConnectTimeout": 5,
        "FailTimeout": 10,
        "MaxFails": 3,
        "Mode": "active",
        "ReadTimeout": 120,
        "SendTimeout": 120
      }
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-09-18The response structure of the API has changedView Change Details
2024-05-09The response structure of the API has changedView Change Details