根据指定站点ID和负载均衡器ID,获取单个负载均衡器的详细信息。
接口说明
此 API 允许用户通过提供必要的身份验证信息和资源标识,查询特定负载均衡器的配置详情,包括但不限于名称、会话保持策略、路由策略等。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| Id | long | 是 | 负载均衡器 ID,用于唯一标识要查询的负载均衡器,负载均衡器创建时会直接返回,也可以通 ListLoadBalancers 接口获取站点下所有负载均衡器查询。 | 99867648760**** |
| SiteId | long | 是 | 站点 ID,可通过调用 ListSites 接口获取。 | 1159101787**** |
返回参数
示例
正常返回示例
JSON格式
{
"RequestId": "EEEBE525-F576-1196-8DAF-2D70CA3F4D2F",
"Id": 0,
"Name": "lb.example.com",
"SiteId": 0,
"Enabled": true,
"Ttl": 60,
"SessionAffinity": "ip",
"FallbackPool": 0,
"SteeringPolicy": "order",
"Description": "test",
"AdaptiveRouting": {
"FailoverAcrossPools": true
},
"DefaultPools": [
0
],
"RandomSteering": {
"DefaultWeight": 50,
"PoolWeights": {
"key": 50
}
},
"Rules": [
{
"FixedResponse": {
"ContentType": "application/json",
"Location": "http://www.example.com/index.html",
"MessageBody": "Hello World.",
"StatusCode": 200
},
"Overrides": "{\n \"adaptive_routing\": {\n \"failover_across_pools\": true\n },\n \"sub_region_pools\": {\n \"GB\": [\n 96228666776****\n ],\n \"US\": [\n 96228666776****\n ]\n },\n \"default_pools\": [\n 96228666776****,\n 96228666776****\n ],\n \"fallback_pool\": 96228666776****,\n \"location_strategy\": {\n \"mode\": \"resolver_ip\",\n \"prefer_ecs\": \"always\"\n },\n \"random_steering\": {\n \"default_weight\": 30,\n \"pool_weights\": {\n \"96228666776****\": 70,\n \"96228666776****\": 80\n }\n },\n \"region_pools\": {\n \"ENAM\": [\n 96228666776****,\n 92843536908****\n ],\n \"WNAM\": [\n 92843536908****\n ]\n },\n \"session_affinity\": \"cookie\",\n \"session_affinity_attributes\": {\n \"drain_duration\": 100,\n \"headers\": [\"none\"],\n \"require_all_headers\": false,\n \"samesite\": \"Auto\",\n \"secure\": \"Auto\",\n \"zero_downtime_failover\": \"sticky\"\n },\n \"session_affinity_ttl\": 1800,\n \"steering_policy\": \"dynamic_latency\",\n \"ttl\": 30\n }",
"Rule": "http.request.uri.path contains \"/testing\"",
"RuleName": "r2",
"RuleEnable": "off",
"Sequence": 1,
"Terminates": true
}
],
"Monitor": {
"Type": "HTTP",
"Method": "GET",
"Port": 80,
"Path": "/",
"Interval": 60,
"ExpectedCodes": "200,202",
"FollowRedirects": true,
"ConsecutiveUp": 3,
"ConsecutiveDown": 5,
"Header": {
"host": [
"example1.com",
"example2.com"
]
},
"Timeout": 5,
"MonitoringRegion": "Global"
},
"Status": "healthy",
"SubRegionPools": "{\"AL,MO\": [92298024898****],\"CN-SH,CN-SX,CN-SC\":[92304347804****,92843536908****]}",
"RegionPools": "{\n \"ENAM\": [\n 12345678****\n ],\n \"WNAM\": [\n 23456789****,\n 23456789****\n ]\n}"
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | InternalException | Failed to call the service. Try again later or contact technical support. | 调用服务失败,请稍后重试或联系客服咨询详情。 |
| 400 | LoadBalancerNotExist | The specified load balancer name is invalid or load balancing is not enabled for your website.Make sure that you specify a valid load balancer name and load balancing is enabled. Then, try again. | 传入的站点负载均衡器无效或当前站点尚未开通负载均衡功能。请您检查负载均衡器名称配置的是否正确后重试,若尚未开通负载均衡功能请开通后重试。 |
| 404 | SiteNotFound | The website does not exist or does not belong to you. | 站点不存在,或者不属于你。 |
访问错误中心查看更多错误码。
