查询带宽列表
功能介绍
查询带宽列表。
URI
GET /v1/{project_id}/bandwidths
| 名称 | 是否必选 | 参数类型 | 说明 |
|---|---|---|---|
| project_id | 是 | String | 项目ID,获取项目ID请参见获取项目ID。 |
| marker | 否 | String | 分页查询的起始资源ID,表示从指定资源的下一条记录开始查询。 marker需要和limit配合使用:
|
| limit | 否 | Integer | 分页查询每页返回的记录个数,取值范围为0~2000,默认值2000。 limit需要和marker配合使用,详细规则请见marker的参数说明。 |
| share_type | 否 | String |
|
| enterprise_project_id | 否 | String |
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 |
请求样例
GET https://{Endpoint}/v1/{project_id}/bandwidths?limit={limit}&marker={marker} 响应参数
| 名称 | 参数类型 | 说明 |
|---|---|---|
| bandwidths | Array of bandwidths objects | 带宽列表对象,请参见表3。 |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| name | String |
|
| size | Integer |
|
| id | String | 带宽唯一标识 |
| share_type | String |
不设置时,默认返回所有带宽列表。 |
| publicip_info | Array of publicip_info objects |
|
| tenant_id | String | 项目ID |
| bandwidth_type | String |
|
| charge_mode | String |
|
| billing_info | String | 账单信息 如果billing_info不为空,说明是包周期的带宽 |
| enterprise_project_id | String |
说明: 关于企业项目ID的获取及企业项目特性的详细信息,请参见《企业管理用户指南》。 |
| status | String |
|
| created_at | String |
|
| updated_at | String |
|
| enable_bandwidth_rules | boolean |
|
| rule_quota | integer | 功能说明:带宽支持的最大分组规则数 |
| bandwidth_rules | Array of bandwidth_rules objects | 功能说明:带宽规则对象 |
| public_border_group | String | 功能说明:表示中心站点资源或者边缘站点资源。 取值范围:
约束限制:只能绑定与该字段相同的publicip资源 |
| 名称 | 参数类型 | 说明 |
|---|---|---|
| publicip_id | String | 功能说明:带宽对应的弹性公网IP的唯一标识 |
| publicip_address | String | 功能说明:IPv4时是申请到的弹性公网IP地址 |
| publicipv6_address | String | 功能说明:IPv4时无此字段,IPv6时为申请到的弹性公网IP地址 |
| ip_version | Integer |
|
| publicip_type | String |
|
| 字段名称 | 类型 | 描述 |
|---|---|---|
| id | string | 带宽规则ID |
| name | string | 带宽规则名称 |
| admin_state_up | boolean | 配置状态,为False时配置不生效 |
| egress_size | integer |
|
| egress_guarented_size | integer |
|
| publicip_info | Array of publicip_info objects |
|
响应样例
{
"bandwidths": [
{
"id": "09b99c91-da7c-449f-94e2-f4934c5b2a71",
"name": "test-f632a7b0-ef50-4ac5-97e9-ddc56b3d5977",
"size": 200,
"share_type": "PER",
"public_border_group": "center",
"created_at": "2024-04-27T00:14:36Z",
"updated_at": "2024-04-27T00:14:36Z",
"publicip_info": [
{
"publicip_id": "2a65923c-7133-415d-ae3b-cf9635a942c5",
"publicip_address": "10.xx.xx.3",
"ip_version": 4,
"publicip_type": "5_bgp"
}
],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"bandwidth_type": "bgp",
"charge_mode": "bandwidth",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"enable_bandwidth_rules": false,
"rule_quota": 0,
"bandwidth_rules": []
},
{
"id": "0a583ff1-b43e-4000-ade3-e7af0097f832",
"name": "test-7e880d5b-f458-40ad-a7e5-735c44cd8b7d",
"size": 300,
"share_type": "PER",
"public_border_group": "center",
"created_at": "2024-04-27T00:14:36Z",
"updated_at": "2024-04-27T00:14:36Z",
"publicip_info": [
{
"publicip_id": "c754bc9a-16d5-4763-9674-d7561917aa80",
"publicip_address": "10.xx.xx.9",
"ip_version": 4,
"publicip_type": "5_bgp"
}
],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"bandwidth_type": "bgp",
"charge_mode": "bandwidth",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"enable_bandwidth_rules": false,
"rule_quota": 0,
"bandwidth_rules": []
},
{
"id": "0a673f00-3640-4a13-949e-7049b2916baf",
"name": "bandwidth123",
"size": 10,
"share_type": "PER",
"public_border_group": "center",
"created_at": "2024-04-27T00:14:36Z",
"updated_at": "2024-04-27T00:14:36Z",
"publicip_info": [
{
"publicip_id": "cec7fb70-2f82-4561-bd83-2121fb642fdc",
"publicip_address": "10.xx.xx.184",
"ip_version": 4,
"publicip_type": "5_bgp"
}
],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"bandwidth_type": "bgp",
"charge_mode": "bandwidth",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"enable_bandwidth_rules": false,
"rule_quota": 0,
"bandwidth_rules": []
},
{
"id": "0dde1eae-1783-46dc-998c-930fbe261ff9",
"name": "bandwidth123",
"size": 100,
"share_type": "PER",
"public_border_group": "center",
"created_at": "2024-04-27T00:14:36Z",
"updated_at": "2024-04-27T00:14:36Z",
"publicip_info": [
{
"publicip_id": "24232038-e178-40ad-80e4-5abb75db84be",
"publicip_address": "10.xx.xx.101",
"ip_version": 4,
"publicip_type": "5_bgp"
}
],
"tenant_id": "26ae5181a416420998eb2093aaed84d9",
"bandwidth_type": "bgp",
"charge_mode": "bandwidth",
"billing_info": "",
"enterprise_project_id": "0",
"status": "NORMAL",
"enable_bandwidth_rules": false,
"rule_quota": 0,
"bandwidth_rules": []
}
]
} 状态码
请参见状态码。
错误码
请参考错误码。