All Products
Search
Document Center

Anti-DDoS:DescribeL7RsPolicy

Last Updated:Feb 02, 2026

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

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

yundun-ddoscoo:DescribeL7RsPolicy

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ResourceGroupId

string

No

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****

Domain

string

Yes

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

RealServers

array

No

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.

1.***.***.1

string

No

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 elements

Element

Type

Description

Example

object

ProxyMode

string

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

UpstreamRetry

integer

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

  • 1: on

  • 0: off

1

RsAttrRwTimeoutMax

integer

The timeout period for a read or write connection.

300

RequestId

string

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

9E7F6B2C-03F2-462F-9076-B782CF0DD502

Attributes

array<object>

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

array<object>

RsType

integer

The address type of the origin server. Valid values:

  • 0: IP address

  • 1: domain name

0

RealServer

string

The address of the origin server.

1.***.***.1

Attribute

object

The parameters for back-to-origin settings.

Weight

integer

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

ConnectTimeout

integer

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

5

FailTimeout

integer

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

MaxFails

integer

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

3

Mode

string

The primary/secondary flag. Valid values:

  • active: primary

  • backup: secondary

active

ReadTimeout

integer

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

120

SendTimeout

integer

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

120

Examples

Success response

JSON format

{
  "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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.