Querying Forwarding Policies
Function
This API is used to query all the forwarding policies. Filter query and pagination query are supported. Unless otherwise specified, exact match is applied.
URI
GET /v2/{project_id}/elb/l7policies
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Specifies the project ID. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
marker |
No |
String |
Specifies the ID of the forwarding policy from which pagination query starts, that is, the ID of the last forwarding policy on the previous page. This parameter must be used together with limit. |
limit |
No |
Integer |
Specifies the number of forwarding policies on each page. If this parameter is not set, all forwarding policies are queried by default. |
page_reverse |
No |
Boolean |
Specifies the page direction. The value can be true or false, and the default value is false. The last page in the list requested with page_reverse set to false will not contain the "next" link, and the last page in the list requested with page_reverse set to true will not contain the "previous" link. This parameter must be used together with limit. |
id |
No |
String |
Specifies the forwarding policy ID. |
tenant_id |
No |
String |
Specifies the ID of the project where the forwarding policy is used. The value contains a maximum of 255 characters. |
name |
No |
String |
Specifies the forwarding policy name. The value contains a maximum of 255 characters. |
admin_state_up |
No |
Boolean |
Specifies the administrative status of the forwarding policy. The value can be true or false. This parameter is reserved. The default value is true. |
description |
No |
String |
Provides supplementary information about the forwarding policy. The value contains a maximum of 255 characters. |
listener_id |
No |
String |
Specifies the ID of the listener to which the forwarding policy is added. |
action |
No |
String |
Specifies whether requests are forwarded to another backend server group or redirected to another HTTPS listener. The value range varies depending on the protocol of the backend server group:
|
redirect_pool_id |
No |
String |
Specifies the ID of the backend server group to which traffic is forwarded. |
redirect_listener_id |
No |
String |
Specifies the ID of the listener to which the traffic is redirected. |
redirect_url |
No |
String |
Specifies the URL to which traffic is redirected. This parameter is reserved. The value contains a maximum of 255 characters. |
position |
No |
Integer |
Specifies the forwarding priority. The value ranges from 1 to 100. The default value is 100. This parameter is reserved. |
provisioning_status |
No |
String |
Specifies the provisioning status of the forwarding policy. The value can be ACTIVE, PENDING_CREATE, or ERROR. The default value is ACTIVE. This parameter is reserved. The value contains a maximum of 16 characters. |
enterprise_project_id |
No |
String |
Specifies the enterprise project ID. The value is character string 0 or a UUID with hyphens (-). Value 0 indicates the default enterprise project. If an IAM user is used to query the forwarding policies, the value of enterprise_project_id must be set to all_granted_eps or a specific enterprise project ID. |
Response
Parameter |
Type |
Description |
---|---|---|
l7policies |
Array |
Lists the forwarding policies. For details, see Table 4 l7policy parameter description. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the forwarding policy ID. |
tenant_id |
String |
Specifies the ID of the project where the forwarding policy is used. |
name |
String |
Specifies the forwarding policy name. |
admin_state_up |
Boolean |
Specifies the administrative status of the forwarding policy. The value can be true or false. This parameter is reserved. The default value is true. |
description |
String |
Provides supplementary information about the forwarding policy. |
listener_id |
String |
Specifies the ID of the listener to which the forwarding policy is added. |
action |
String |
Specifies whether requests are forwarded to another backend server group or redirected to another HTTPS listener. The value range varies depending on the protocol of the backend server group:
|
redirect_pool_id |
String |
Specifies the ID of the backend server group to which traffic is forwarded. |
redirect_listener_id |
String |
Specifies the ID of the listener to which the traffic is redirected. |
redirect_url |
String |
Specifies the URL to which traffic is redirected. This parameter is reserved. |
rules |
Array |
Lists the forwarding rules of the forwarding policy. |
position |
Integer |
Specifies the forwarding priority. The value ranges from 1 to 100. The default value is 100. This parameter is reserved. |
provisioning_status |
String |
Specifies the provisioning status of the forwarding policy. The value can be ACTIVE, PENDING_CREATE, or ERROR. The default value is ACTIVE. This parameter is reserved. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the associated forwarding rule. |
Example Request
- Example request 1: Querying all forwarding policies
GET https://{Endpoint}/v2/a31d2bdcf7604c0faaddb058e1e08819/elb/l7policies
- Example request 2: Querying forwarding policies through which requests are forwarded to the backend server group
GET https://{Endpoint}/v2/a31d2bdcf7604c0faaddb058e1e08819/elb/l7policies?action=REDIRECT_TO_POOL
Example Response
- Example response 1
{ "l7policies": [ { "redirect_pool_id": "431a03eb-81bb-408e-ae37-7ce19023692b", "redirect_listener_id": null, "description": "", "admin_state_up": true, "rules": [ { "id": "67d8a8fa-b0dd-4bd4-a85b-671db19b2ef3" }, { "id": "f02b3bca-69d2-4335-a3fa-a8054e996213" } ], "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819", "listener_id": "26058b64-6185-4e06-874e-4bd68b7633d0", "redirect_url": null, "action": "REDIRECT_TO_POOL", "position": 2, "provisioning_status": "ACTIVE", "id": "5ae0e1e7-5f0f-47a1-b39f-5d4c428a1586", "name": "" }, { "redirect_pool_id": "59eebd7b-c68f-4f8a-aa7f-e062e84c0690", "redirect_listener_id": null, "description": "", "admin_state_up": true, "rules": [ { "id": "f4499f48-de3d-4efe-926d-926aa4d6aaf5" } ], "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819", "listener_id": "e1310063-00de-4867-ab55-ccac4d9db364", "redirect_url": null, "action": "REDIRECT_TO_POOL", "position": 1, "provisioning_status": "ACTIVE", "id": "6cfd9d89-1d7e-4d84-ae1f-a8c5ff126f72", "name": "" } ] }
- Example response 2
{ "l7policies": [ { "redirect_pool_id": "431a03eb-81bb-408e-ae37-7ce19023692b", "redirect_listener_id": null, "description": "", "admin_state_up": true, "rules": [ { "id": "67d8a8fa-b0dd-4bd4-a85b-671db19b2ef3" }, { "id": "f02b3bca-69d2-4335-a3fa-a8054e996213" } ], "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819", "listener_id": "26058b64-6185-4e06-874e-4bd68b7633d0", "redirect_url": null, "action": "REDIRECT_TO_POOL", "position": 2, "provisioning_status": "ACTIVE", "id": "5ae0e1e7-5f0f-47a1-b39f-5d4c428a1586", "name": "" }, { "redirect_pool_id": "59eebd7b-c68f-4f8a-aa7f-e062e84c0690", "redirect_listener_id": null, "description": "", "admin_state_up": true, "rules": [ { "id": "f4499f48-de3d-4efe-926d-926aa4d6aaf5" } ], "tenant_id": "a31d2bdcf7604c0faaddb058e1e08819", "listener_id": "e1310063-00de-4867-ab55-ccac4d9db364", "redirect_url": null, "action": "REDIRECT_TO_POOL", "position": 1, "provisioning_status": "ACTIVE", "id": "6cfd9d89-1d7e-4d84-ae1f-a8c5ff126f72", "name": "" } ] }
Status Code
For details, see HTTP Status Codes of Load Balancers.
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