هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.
Querying Forwarding Policies
Function
This API is used to query all forwarding policies.
Constraints
This API has the following constraints:
-
Parameters marker, limit, and page_reverse are used for pagination query.
-
Parameters marker and page_reverse take effect only when they are used together with parameter limit.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/elb/l7policies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
Specifies the ID of the last record on the previous page. Note:
|
limit |
No |
Integer |
Specifies the number of records on each page. Value range: 0–2000 Default value: 2000 |
page_reverse |
No |
Boolean |
Specifies whether to use reverse query. Value options:
Note:
|
enterprise_project_id |
No |
Array of strings |
Specifies the ID of the enterprise project.
Multiple values can be queried in the format of enterprise_project_id=xxx&enterprise_project_id=xxx. |
id |
No |
Array of strings |
Specifies the forwarding policy ID. Multiple IDs can be queried in the format of id=xxx&id=xxx. |
name |
No |
Array of strings |
Specifies the forwarding policy name. Multiple names can be queried in the format of name=xxx&name=xxx. |
description |
No |
Array of strings |
Provides supplementary information about the forwarding policy. Multiple descriptions can be queried in the format of description=xxx&description=xxx. |
admin_state_up |
No |
Boolean |
Specifies the administrative status of the forwarding policy. This parameter is unsupported. Please do not use it. |
listener_id |
No |
Array of strings |
Specifies the ID of the listener to which the forwarding policy is added. Multiple IDs can be queried in the format of listener_id=xxx&listener_id=xxx. |
position |
No |
Array of integers |
Specifies the forwarding policy priority. Multiple priorities can be queried in the format of position=xxx&position=xxx. This parameter is unsupported. Please do not use it. |
action |
No |
Array of strings |
Specifies where requests are forwarded. Value options:
Multiple values can be queried in the format of action=xxx&action=xxx. |
redirect_url |
No |
Array of strings |
Specifies the URL to which requests will be forwarded. Multiple URLs can be queried in the format of redirect_url=xxx&redirect_url=xxx. This parameter is unsupported. Please do not use it. |
redirect_pool_id |
No |
Array of strings |
Specifies the ID of the backend server group to which requests will be forwarded. Multiple IDs can be queried in the format of redirect_pool_id=xxx&redirect_pool_id=xxx. |
redirect_listener_id |
No |
Array of strings |
Specifies the ID of the listener to which requests are redirected. Multiple IDs can be queried in the format of redirect_listener_id=xxx&redirect_listener_id=xxx. |
provisioning_status |
No |
Array of strings |
Specifies the provisioning status of the forwarding policy.
Multiple provisioning statuses can be queried in the format of provisioning_status=xxx&provisioning_status=xxx. |
display_all_rules |
No |
Boolean |
Specifies whether to display details about the forwarding rule in the forwarding policy. Value options:
|
priority |
No |
Array of integers |
Specifies the forwarding policy priority. A smaller value indicates a higher priority. Multiple priorities can be queried in the format of position=xxx&position=xxx. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the token used for IAM authentication. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Specifies the request ID. Note: The value is automatically generated. |
page_info |
PageInfo object |
Shows pagination information. |
l7policies |
Array of L7Policy objects |
Lists the forwarding policies. |
Parameter |
Type |
Description |
---|---|---|
previous_marker |
String |
Specifies the ID of the first record in the pagination query result. When page_reverse is set to true, this parameter is used together to query resources on the previous page. |
next_marker |
String |
Specifies the ID of the last record in the pagination query result. |
current_count |
Integer |
Specifies the number of records. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Specifies where requests will be forwarded. Value options:
Note:
|
admin_state_up |
Boolean |
Specifies the administrative status of the forwarding policy. Note: The value can only be true. |
description |
String |
Provides supplementary information about the forwarding policy. |
id |
String |
Specifies the forwarding policy ID. |
listener_id |
String |
Specifies the ID of the listener to which the forwarding policy is added. |
name |
String |
Specifies the forwarding policy name. |
position |
Integer |
Specifies the forwarding policy priority. This parameter cannot be updated. This parameter is unsupported. Please do not use it. |
priority |
Integer |
Specifies the forwarding policy priority. A smaller value indicates a higher priority. Value ranges:
Default value options:
Note:
This parameter is supported by forwarding policies of shared load balancers. |
project_id |
String |
Specifies the project ID of the forwarding policy. |
provisioning_status |
String |
Specifies the provisioning status of the forwarding policy. The value can be ACTIVE or ERROR.
|
redirect_pool_id |
String |
Specifies the ID of the backend server group to which the requests are forwarded. Note: This parameter is valid only when action is set to REDIRECT_TO_POOL. |
redirect_listener_id |
String |
Specifies the ID of the listener to which requests are redirected. Note:
|
redirect_url |
String |
Specifies the URL to which requests are forwarded. Format: protocol://host:port/path?query This parameter is unsupported. Please do not use it. |
rules |
Array of RuleRef objects |
Lists the forwarding rules in the forwarding policy. |
redirect_url_config |
RedirectUrlConfig object |
Specifies the URL to which requests are forwarded. Note:
Value format: protocol://host:port/path?query |
redirect_pools_extend_config |
RedirectPoolsExtendConfig object |
Specifies the backend server group that requests are forwarded to. Note: This parameter takes effect only when action is set to REDIRECT_TO_POOL. |
fixed_response_config |
FixtedResponseConfig object |
Specifies the configuration of the page that will be returned. Note:
|
created_at |
String |
Specifies the time when the forwarding policy was added. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time). This is a new field in this version, and it will not be returned for resources associated with existing dedicated load balancers and for resources associated with existing and new shared load balancers. |
updated_at |
String |
Specifies the time when the forwarding policy was updated. The format is yyyy-MM-dd'T'HH:mm:ss'Z' (UTC time). This is a new field in this version, and it will not be returned for resources associated with existing dedicated load balancers and for resources associated with existing and new shared load balancers. |
enterprise_project_id |
String |
Specifies the ID of the enterprise project. |
Parameter |
Type |
Description |
---|---|---|
protocol |
String |
Specifies the protocol for redirection. The value can be HTTP, HTTPS, or ${protocol}. ${protocol} indicates that the protocol of the request will be used. |
host |
String |
Specifies the name of the host that requests are redirected to. The value can contain only letters, digits, hyphens (-), and periods (.) and must start with a letter or digit. The default value is ${host}, indicating that the host of the request will be used. |
port |
String |
Specifies the port that requests are redirected to. The default value is ${port}, indicating that the port of the request will be used. |
path |
String |
Specifies the path that requests are redirected to. The value can contain only letters, digits, and special characters: _~';@^-%#&$.*+?,=!:|\/()[]{} and must start with a slash (/). $1, $2, $3, and all the way to $9 match the wildcard asterisk (*) in the request URL. The default value is ${path}, indicating that the path of the request will be used. |
query |
String |
Specifies the query string set in the URL for redirection. The value is case-sensitive and can contain only letters, digits, and special characters: !$&'()*+,-./:;=?@^_`. $1, $2, $3, and all the way to $9 match the wildcard asterisk (*) in the request URL. The default value is ${query}, indicating that the query string of the request will be used. For example, in the URL https://www.example.com:8080/elb?type=loadbalancer, ${query} indicates 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. |
status_code |
String |
Specifies the status code returned after the requests are redirected. The value can be 301, 302, 303, 307, or 308. |
Parameter |
Type |
Description |
---|---|---|
rewrite_url_enable |
Boolean |
Specifies whether to set rewrite_url_enable to true. |
rewrite_url_config |
RewriteUrlConfig object |
Specifies the URL for the backend server group that requests are forwarded to. This parameter takes effect only when action is set to REDIRECT_TO_POOL. |
Parameter |
Type |
Description |
---|---|---|
host |
String |
Specifies the domain name of the host that requests are redirected to. The domain name can contain only letters, digits, hyphens (-), and periods (.), and must start with a letter or digit. The default value is ${host}, indicating that the host of the request will be used. |
path |
String |
Specifies the path that requests are redirected to. The default value is ${path}, indicating that the path of the request will be used. The value can contain only letters, digits, and special characters: _~';@^-%#&$.+?,=!:|/() and must start with a slash (/). $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 $#. |
query |
String |
Specifies the query string set in the URL for redirection. The value is case-sensitive and can contain only letters, digits, and special characters: !$&'()+,-./:;=?@^_`. $1, $2, $3, and all the way to $9 match the wildcard asterisk () in the request URL. The default value is ${query}, indicating that the query string of the request will be used. 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 $#. |
Parameter |
Type |
Description |
---|---|---|
status_code |
String |
Specifies the HTTP status code configured in the forwarding policy. The value can be any integer in the range of 200–299, 400–499, or 500–599. |
content_type |
String |
Specifies the format of the response body. The value can be text/plain, text/css, text/html, application/javascript, or application/json. |
message_body |
String |
Specifies the content of the response message body. |
Example Requests
Querying forwarding policies
GET https://{ELB_Endpoint}/v3/99a3fff0d03c428eac3678da6a7d0f24/elb/l7policies?display_all_rules=true
Example Responses
Status code: 200
Successful request.
{ "request_id" : "d3c67339-be91-4813-bb24-85728a5d326a", "l7policies" : [ { "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" : null, "redirect_listener_id" : null, "action" : "REDIRECT_TO_POOL", "position" : 100, "priority" : null, "provisioning_status" : "ACTIVE", "id" : "01832d99-bbd8-4340-9d0c-6ff8f7a37307", "name" : "l7policy-67" }, { "redirect_pool_id" : null, "description" : "", "admin_state_up" : true, "rules" : [ { "id" : "390f3a9f-670d-4ca6-b72c-6be8a48a8a00" } ], "project_id" : "7a9941d34fc1497d8d0797429ecfd354", "listener_id" : "bd782cbf-fb5e-411a-9295-530bdec05058", "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" : "FIXED_RESPONSE", "position" : 6, "priority" : 2, "provisioning_status" : "ACTIVE", "id" : "049a8635-9754-444e-94aa-678993b39cd6", "name" : "l7policy-67" } ], "page_info" : { "next_marker" : "2587d8b1-9e8d-459c-9081-7bccaa075d2b", "previous_marker" : "01832d99-bbd8-4340-9d0c-6ff8f7a37307", "current_count" : 2 } }
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot