Querying the Details of a Forwarding Policy
Function
This API is used to view the details of a forwarding policy.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/elb/l7policies/{l7policy_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. Constraints: N/A Range: The value can contain a maximum of 32 characters, including digits and lowercase letters. Default value: N/A |
l7policy_id |
Yes |
String |
Definition: Specifies the forwarding policy ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Specifies the token used for IAM authentication. Constraints: N/A Range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Definition: Specifies the request ID. Range: The value is automatically generated, and can contain characters including digits, lowercase letters, and hyphens (-). |
l7policy |
L7Policy object |
Definition: Specifies the forwarding policy. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Definition: Specifies the action of the forwarding policy. Constraints:
Range:
|
admin_state_up |
Boolean |
Definition: Specifies the administrative status of the forwarding policy. Constraints: The value can only be true. |
description |
String |
Definition: Provides supplementary information about the forwarding policy. |
id |
String |
Definition: Specifies the forwarding policy ID. |
listener_id |
String |
Definition: Specifies the ID of the listener with which the forwarding policy is associated. |
name |
String |
Definition: Specifies the forwarding policy name. |
position |
Integer |
Definition: Specifies the priority of the forwarding policy. The priority cannot be updated. This parameter is unsupported. Please do not use it. |
priority |
Integer |
Definition: Specifies the priority of the forwarding policy. A smaller value indicates a higher priority. Constraints:
Range:
Default value:
|
project_id |
String |
Definition: Specifies the ID of the project where the forwarding policy is used. |
provisioning_status |
String |
Definition: Specifies the provisioning status of the forwarding policy. Range:
|
redirect_pool_id |
String |
Definition: Specifies the ID of the backend server group to which requests will be forwarded. Constraints: This parameter takes effect only when action is set to REDIRECT_TO_POOL. |
redirect_listener_id |
String |
Definition: Specifies the ID of the listener to which requests are redirected. Constraints:
|
redirect_url |
String |
Definition: Specifies the URL to which requests will be forwarded. Range: The value must be in the format of protocol://host:port/path?query. This parameter is unsupported. Please do not use it. |
rules |
Array of RuleRef objects |
Definition: Lists the forwarding rules in the forwarding policy. |
redirect_url_config |
RedirectUrlConfig object |
Definition: Specifies the URL to which requests are forwarded. Constraints:
Default value: The value must be in the format of protocol://host:port/path?query. At least one of the four parameters (protocol, host, port, and path) must be passed, or their values cannot be set to ${xxx} at the same time. ${xxx} indicates that the value in the request will be used. For example, ${host} indicates the host in the URL to be redirected. The values of protocol and port cannot be the same as those of the associated listener, and either host or path must be passed or their values cannot be ${xxx} at the same time. |
redirect_pools_config |
Array of RedirectPoolsConfig objects |
Definition: Specifies the backend server groups that the requests are forwarded to. Constraints: A maximum of five backend server groups can be configured for a forwarding policy. |
redirect_pools_sticky_session_config |
Definition: Specifies whether to enable sticky session for backend server groups configured for a forwarding policy. The load balancer generates a cookie after it receives a request from a client. All subsequent requests with the same cookie are routed to the same backend server group. |
|
redirect_pools_extend_config |
RedirectPoolsExtendConfig object |
Definition: Specifies the backend server group that requests are forwarded to. Constraints: This parameter takes effect only when action is set to REDIRECT_TO_POOL. |
fixed_response_config |
FixtedResponseConfig object |
Definition: Specifies the configuration of the page that will be returned. Constraints:
|
created_at |
String |
Definition: Specifies the creation time. Range: The value must be a UTC time in the yyyy-MM-dd'T'HH:mm:ss'Z' format. |
updated_at |
String |
Definition: Specifies the update time. Range: The value must be a UTC time in the yyyy-MM-dd'T'HH:mm:ss'Z' format. |
enterprise_project_id |
String |
Definition: Specifies the enterprise project ID. |
Parameter |
Type |
Description |
---|---|---|
protocol |
String |
Definition: Specifies the protocol for redirection. Range:
|
host |
String |
Definition: Specifies the name of the host that requests are redirected to. Range: The value can contain only letters, digits, hyphens (-), and periods (.) and must start with a letter or digit. Default value: ${host}, indicating that the host in the request will be used. |
port |
String |
Definition: Specifies the port that requests are redirected to. Default value: ${port}, indicating that the port in the request will be used. |
path |
String |
Definition: Specifies the path that requests are redirected to. Range: The value can contain only letters, digits, and special characters: _~';@^-%#&$.*+?,=!:|\/()[]{} and must start with a slash (/). Default value: ${path}, indicating that the path in the request will be used. |
query |
String |
Definition: Specifies the query string set in the URL for redirection. The following is an example: In the URL https://www.example.com:8080/elb?type=loadbalancer, if this parameter is set to ${query}&name=my_name, the URL will be redirected to https://www.example.com:8080/elb?type=loadbalancer&name=my_name. In the example, ${query} indicates type=loadbalancer. Range: The value can contain only letters, digits, and the special characters: !$&'()*+,-./:;=?@^_`. The letters are case-sensitive. $1, $2, $3, and all the way to $9 match the wildcard asterisk (*) in the requested URL. Default value: ${query}, indicating that the query string in the request will be used. |
status_code |
String |
Definition: Specifies the status code returned after the requests are redirected. Range:
|
Parameter |
Type |
Description |
---|---|---|
pool_id |
String |
Definition: Specifies the backend server group ID. |
weight |
Integer |
Definition: Specifies the weight of the backend server group. Requests are routed to backend server groups based on their weights. The larger the weight is, the higher proportion of requests the backend server group receives. If the weight is set to 0, the backend server group will not accept new requests. Range: 0 to 100 |
Parameter |
Type |
Description |
---|---|---|
enable |
Boolean |
Definition: Specifies whether to enable sticky session for backend server groups configured in a forwarding policy. Default value: false, indicating that sticky session is disabled. |
timeout |
Integer |
Definition: Specifies the stickiness duration, in minutes. Range: 1 to 1440, in minutes Default value: 1440 |
Parameter |
Type |
Description |
---|---|---|
rewrite_url_enable |
Boolean |
Definition: Specifies whether to set rewrite_url_enable to true. |
rewrite_url_config |
RewriteUrlConfig object |
Definition: Specifies the URL for the backend server group that requests are forwarded to. Constraints: This parameter takes effect only when action is set to REDIRECT_TO_POOL. |
Parameter |
Type |
Description |
---|---|---|
host |
String |
Definition: Specifies the domain name of the host that requests are redirected to. Range: The value can contain letters, digits, hyphens (-), and periods (.), and must start with a letter or digit. Default value: ${host}, indicating that the host in the request will be used. |
path |
String |
Definition: Specifies the path that requests are redirected to. $1, $2, $3, and all the way to $9 match the wildcard asterisk (*) in the request URL. If the number of regular expression match groups is less than the specified number, ${path} is empty. If the dollar sign ($) is followed by a letter, the matching result is empty until the next special character appears, for example, $abc#123, and the matching result is #123. If the dollar sign ($) is followed by a special character, for example, $#, the matching result is $#. Range: The value must start with a slash (/) and can contain only letters, digits, and special characters: _~';@^-%#&$.+?,=!:|/() Default value: ${path}, indicating that the path in the request will be used. |
query |
String |
Definition: Specifies the query string set in the URL for redirection. $1, $2, $3, and all the way to $9 match the wildcard asterisk (*) in the request URL. If the number of regular expression match groups is less than the specified number, ${path} is empty. If the dollar sign ($) is followed by a letter, the matching result is empty until the next special character appears, for example, $abc#123, and the matching result is #123. If the dollar sign ($) is followed by a special character, for example, $#, the matching result is $#. Range: The value can contain only letters, digits, and the special characters: !$&'()+,-./:;=?@^_`. The letters are case-sensitive. Default value: ${query}, indicating that the query string in the request will be used. |
Parameter |
Type |
Description |
---|---|---|
status_code |
String |
Definition: Specifies the HTTP status code. The value can be any integer in the range of 200–299, 400–499, or 500–599. |
content_type |
String |
Definition: Specifies the format of the returned body. Range:
|
message_body |
String |
Definition: Specifies the content of the response message body. |
Example Requests
Querying the details of a forwarding policy
GET https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/l7policies/cf4360fd-8631-41ff-a6f5-b72c35da74be
Example Responses
Status code: 200
Successful request.
{ "l7policy" : { "redirect_pool_id" : "768e9e8c-e7cb-4fef-b24b-af9399dbb240", "description" : "", "admin_state_up" : true, "rules" : [ { "id" : "c5c2d625-676b-431e-a4c7-c59cc2664881" } ], "project_id" : "7a9941d34fc1497d8d0797429ecfd354", "listener_id" : "cdb03a19-16b7-4e6b-bfec-047aeec74f56", "redirect_url" : null, "redirect_url_config" : null, "redirect_pools_config" : { "pool_id" : "722e9e8c-e7cb-4fef-b24b-af9399dbb240", "weight" : 12 }, "redirect_pools_sticky_session_config" : { "timeout" : 23, "enable" : false }, "fixed_response_config" : { "content_type" : "text/plain", "message_body" : "", "status_code" : "207" }, "redirect_listener_id" : null, "action" : "REDIRECT_TO_POOL", "position" : 100, "priority" : 1, "provisioning_status" : "ACTIVE", "id" : "01832d99-bbd8-4340-9d0c-6ff8f7a37307", "name" : "l7policy-67" }, "request_id" : "6be83ec4-623e-4840-a417-2fcdf8ad5dfa" }
Status Codes
Status Code |
Description |
---|---|
200 |
Successful request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.