Querying the Topology of a Load Balancer
Function
This API is used to query the topology of a load balancer. The topology includes the load balancer and its listeners and backend server groups.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/elb/loadbalancers/{loadbalancer_id}/topology
|
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 |
|
loadbalancer_id |
Yes |
String |
Definition: Specifies the load balancer ID. Constraints: N/A Range: N/A Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
listener_id |
No |
String |
Specifies the listener ID. Multiple values can be used for query in the format of listener_id=xxx&listener_id=xxx. |
|
pool_id |
No |
String |
Specifies the ID of the backend server group. Multiple values can be used for query in the format of pool_id=xxx&pool_id=xxx. |
|
listener_name |
No |
String |
Specifies the listener name. Multiple values can be used for query in the format of listener_name=xxx&listener_name=xxx. |
|
listener_protocol |
No |
String |
Specifies the listener protocol. Multiple values can be used for query in the format of listener_protocol=xxx&listener_protocol=xxx. |
|
listener_protocol_port |
No |
Integer |
Specifies the listener port. Multiple values can be used for query in the format of listener_protocol_port=xxx&listener_protocol_port=xxx. |
|
pool_name |
No |
String |
Specifies the name of the backend server group. Multiple values can be used for query in the format of pool_name=xxx&pool_name=xxx. |
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 |
|---|---|---|
|
topology |
LoadBalancerTopologyResult object |
Definition: Load balancer topology. |
|
request_id |
String |
Definition: Specifies the request ID. Range: The value is automatically generated, and can contain characters including digits, lowercase letters, and hyphens (-). |
|
Parameter |
Type |
Description |
|---|---|---|
|
nodes |
TopologyNodes object |
Definition: Topology node information. |
|
edges |
Array of TopologyEdge objects |
Definition: Edge information in the topology. |
|
labels |
TopologyLabels object |
Definition: Label information in the topology. |
|
Parameter |
Type |
Description |
|---|---|---|
|
loadbalancers |
Array of LoadBalancerNode objects |
Definition: Load balancer information in the topology. |
|
eips |
Array of EipNode objects |
Definition: EIP information in the topology. |
|
listeners |
Array of ListenerNode objects |
Definition: Listener information in the topology. |
|
pools |
Array of PoolNode objects |
Definition: Backend server group information in the topology. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Specifies the load balancer ID. Range: N/A |
|
name |
String |
Definition: Specifies the load balancer name. Range: N/A |
|
guaranteed |
Boolean |
Definition: Specifies whether the load balancer is a dedicated load balancer. Range:
|
|
l4_flavor_id |
String |
Definition: Specifies the ID of a flavor at Layer 4. Range: N/A |
|
l7_flavor_id |
String |
Definition: Specifies the ID of a flavor at Layer 7. Range: N/A |
|
vip_address |
String |
Definition: Specifies the private IPv4 address. Range: N/A |
|
ipv6_vip_address |
String |
Definition: Specifies the private IPv6 address. Range: N/A |
|
availability_zone_list |
Array of strings |
Definition: Specifies the list of AZs where the load balancers are created. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Specifies the EIP ID. Range: N/A |
|
ip_address |
String |
Definition: Specifies the EIP. Range: N/A |
|
ip_version |
Integer |
Definition: Specifies the EIP version. Range:
|
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Specifies the listener ID. Range: N/A |
|
name |
String |
Definition: Specifies the listener name. Range: N/A |
|
protocol |
String |
Definition: Specifies the listener protocol. Range: N/A |
|
protocol_port |
Integer |
Definition: Specifies the listening port. Range: N/A |
|
port_ranges |
Array of PortRange objects |
Definition: Specifies one or more port ranges, including the start and end port numbers. A maximum of 10 port ranges can be specified. Port ranges cannot overlap with each other.
NOTE:
This parameter can be specified only when protocol_port is set to 0 or protocol_port is not specified.
|
|
Parameter |
Type |
Description |
|---|---|---|
|
start_port |
Integer |
Definition: Specifies the start port number. Constraints: N/A Range: 1-65535 Default value: N/A |
|
end_port |
Integer |
Definition: Specifies the end port number. Constraints: The value must be greater than or equal to the start port number. Range: 1-65535 Default value: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Specifies the backend server group ID. Range: N/A |
|
name |
String |
Definition: Specifies the backend server group name. Range: N/A |
|
protocol |
String |
Definition: Specifies the backend server group protocol. Range: N/A |
|
type |
String |
Definition: Specifies the backend server group type. Range: N/A |
|
lb_algorithm |
String |
Definition: Specifies the load balancing algorithm of the backend server group. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
source |
String |
Definition: Specifies the ID of the source resource. Range: N/A |
|
target |
String |
Definition: Specifies the ID of the target resource. Range: N/A |
|
source_type |
String |
Definition: Specifies the type of the source resource. Range: N/A |
|
target_type |
String |
Definition: Specifies the type of the target resource. Range: N/A |
|
label |
String |
Definition: Specifies the edge label information. Range: N/A |
|
label_id |
String |
Definition: Specifies the label ID. Range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
l7policies |
Array of PolicyLabel objects |
Definition: Specifies the forwarding policy details. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Definition: Specifies the forwarding policy ID. Range: N/A |
|
name |
String |
Definition: Specifies the forwarding policy name. Range: N/A |
|
priority |
String |
Definition: Specifies the forwarding policy priority. Range: N/A |
|
action |
String |
Definition: Specifies the forwarding policy action. Range: N/A |
|
admin_state_up |
Boolean |
Definition: Specifies whether to enable the forwarding policy. Range: N/A |
|
rules |
Array of L7Rule objects |
Definition: Lists the forwarding rules. |
|
Parameter |
Type |
Description |
|---|---|---|
|
admin_state_up |
Boolean |
Definition: Specifies the administrative status of the forwarding rule. Range: The value can only be true. This parameter is unsupported. Please do not use it. |
|
compare_type |
String |
Definition: Specifies how requests are matched with the forwarding rule. Range: If type is set to HOST_NAME, this parameter can only be set to EQUAL_TO. If type is set to PATH, the value can be REGEX, STARTS_WITH, or EQUAL_TO. |
|
key |
String |
Definition: Specifies the key of the match content. Range: N/A |
|
project_id |
String |
Definition: Specifies the ID of the project where the forwarding rule is used. Range: N/A |
|
type |
String |
Definition: Specifies the forwarding rule type. Range:
|
|
value |
String |
Definition: Specifies the value of the match item. Range:
|
|
provisioning_status |
String |
Definition: Specifies the provisioning status of the forwarding rule. This parameter is invalid. The default value is ACTIVE. Range: ACTIVE, PENDING_CREATE, or ERROR. |
|
invert |
Boolean |
Definition: Specifies whether reverse matching is supported. Range: N/A |
|
id |
String |
Definition: Specifies the forwarding rule ID. Range: N/A |
|
conditions |
Array of RuleCondition objects |
Definition: Specifies the conditions contained in a forwarding rule. Range: N/A |
|
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. Note: This parameter 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 |
Definition: Specifies the update time. Range: The value must be a UTC time in the yyyy-MM-dd'T'HH:mm:ss'Z' format. Note: This parameter will not be returned for resources associated with existing dedicated load balancers and for resources associated with existing and new shared load balancers. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Definition: Specifies the key of match item. Constraints: All keys in the conditions list in the same rule must be the same. Range:
Default value: N/A |
|
value |
String |
Definition: Specifies the value of the match item. Constraints: The value of each condition in a forwarding rule must be unique. Range:
Default value: N/A |
Example Requests
Querying the topology of a load balancer
GET https://{ELB_Endpoint}/v3/{project_id}/elb/loadbalancers/38278031-cfca-44be-81be-a412f618773b/topology
Example Responses
Status code: 200
Successful request.
{
"topology" : {
"nodes" : {
"loadbalancers" : [ {
"id" : "10000000-0000-0000-0000-000000000001",
"name" : "elb-topology",
"guaranteed" : true,
"l4_flavor_id" : "c5dc2b58-d5b7-40d3-8646-485aff8b70bd",
"l7_flavor_id" : "1b333094-bd31-4cb8-97e2-ea762fde3576",
"vip_address" : "172.16.8.148",
"ipv6_vip_address" : "2420:2023:410:230:2188:8eb:f42b:d3b5",
"provisioning_status" : "ACTIVE",
"availability_zone_list" : [ "AZ1", "AZ2" ]
} ],
"eips" : [ {
"id" : "24000000-0000-0000-0000-100000000001",
"ip_address" : "2420:2023:410:230:2188:8eb:f42b:d3b5",
"ip_version" : 6
}, {
"id" : "26000000-0000-0000-0000-000000000001",
"ip_address" : "10.185.106.199",
"ip_version" : 4
} ],
"listeners" : [ {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "test-listener",
"protocol" : "TCP",
"protocol_port" : 8080,
"port_ranges" : null
} ],
"pools" : [ {
"id" : "40000000-0000-0000-0000-000000000001",
"name" : "test-pool",
"protocol" : "TCP",
"type" : "instance",
"lb_algorithm" : "ROUND_ROBIN"
} ]
}
},
"edges" : [ {
"source" : "24000000-0000-0000-0000-100000000001",
"target" : "10000000-0000-0000-0000-000000000001",
"label" : null,
"label_id" : null,
"source_type" : "eips",
"target_type" : "loadbalancers"
}, {
"source" : "24000000-0000-0000-0000-100000000001",
"target" : "10000000-0000-0000-0000-000000000001",
"label" : null,
"label_id" : null,
"source_type" : "eips",
"target_type" : "loadbalancers"
}, {
"source" : "24000000-0000-0000-0000-100000000001",
"target" : "20000000-0000-0000-0000-000000000001",
"label" : null,
"label_id" : null,
"source_type" : "loadbalancers",
"target_type" : "listeners"
}, {
"source" : "20000000-0000-0000-0000-000000000001",
"target" : "40000000-0000-0000-0000-000000000001",
"label" : "default_pool",
"label_id" : null,
"source_type" : "listeners",
"target_type" : "pools"
} ],
"labels" : {
"l7policies" : [ {
"id" : "50000000-0000-0000-0000-000000000001",
"name" : "test-l7policy",
"priority" : 1,
"action" : "REDIRECT_TO_POOL",
"admin_state_up" : true,
"rules" : [ {
"id" : "60000000-0000-0000-0000-000000000001",
"compare_type" : "EQUAL_TO",
"value" : "www.test.com",
"type" : "HOST_NAME",
"conditions" : [ {
"key" : null
}, {
"value" : "www.test.com"
} ]
} ]
} ]
}
}
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