更新时间:2024-09-26 GMT+08:00
分页查询
操作步骤
以GET /v2/{project _id}/elb/loadbalancers接口为例,示例账号下有5个ELB对象,每页查询2个,示范分页查询遍历所有ELB对象的过程。
示例代码
2中请求体如下:
GET https://elb.region-1.mycloud.com:443/v2/e2e095f1a31c467c89d4251cae136fa1/elb/loadbalancers?limit=2&marker=42aa24dd-32f7-482d-8612-6a4a23320457
2中响应体如下:
{ "loadbalancers": [ { "id": "84328656-33c6-431b-ac86-e876219e1aa7", "name": "ulb-vg7d", "description": "21212", "provider": "vlb", "listeners": [ { "id": "8bad548d-740f-44db-bc91-c10271a0c750" } ], "pools": [ { "id": "bc632a6f-b691-4f07-8523-2c4c7009d28e" }, { "id": "599a4c5b-c00c-4491-9860-f322200c72a3" } ], "tags": [], "tenant_id": "e2e095f1a31c467c89d4251cae136fa1", "project_id": "e2e095f1a31c467c89d4251cae136fa1", "vip_subnet_id": "0d11891d-92b3-4a89-af39-fad71c6481a7", "vip_port_id": "475890b6-2e31-440b-a2a7-907a71d62c3b", "vip_address": "192.168.40.191", "provisioning_status": "ACTIVE", "operating_status": "ONLINE", "admin_state_up": true, "created_at": "2018-10-11T14:11:19", "updated_at": "2018-11-07T07:38:54", "enterprise_project_id": "0" }, { "id": "992fd704-1e38-4975-a04a-a4e7982146de", "name": "ulb-8yrd", "description": "", "provider": "vlb", "listeners": [ { "id": "ad49e548-1466-43de-9247-10f56e1f2e0e" }, { "id": "bdba3fa8-574f-4c6e-a808-8f21b54b9b1a" } ], "pools": [ { "id": "10977afc-dfb9-40fa-afa5-2177aa8f8529" }, { "id": "18238c04-5b33-4e5c-8069-8728dece4b54" }, { "id": "5389884f-e884-4c98-9e5f-1b8da5cb3fd0" } ], "tags": [], "tenant_id": "e2e095f1a31c467c89d4251cae136fa1", "project_id": "e2e095f1a31c467c89d4251cae136fa1", "vip_subnet_id": "f15e603b-49d3-4b4d-9a26-1f24ea20d443", "vip_port_id": "3421dbcd-5d25-4cb0-b472-e9dfca260bf6", "vip_address": "192.168.0.29", "provisioning_status": "ACTIVE", "operating_status": "ONLINE", "admin_state_up": true, "created_at": "", "updated_at": "", "enterprise_project_id": "0" } ] }