更新带宽 - UpdateBandwidth
功能介绍
更新带宽。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
PUT /v1/bandwidths/{bandwidth_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
bandwidth_id |
是 |
String |
带宽id。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
bandwidth |
是 |
UpdateBandwidthOption object |
更新带宽参数。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
bandwidth |
Bandwidth object |
带宽对象。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
bandwidth_type |
String |
带宽类型。 |
|
charge_mode |
String |
计费模式,当前只支持峰值95计费。 取值范围:
|
|
create_time |
String |
创建时间。 |
|
id |
String |
带宽ID。 |
|
name |
String |
带宽名称。 |
|
operator |
Operator object |
运营商信息。 |
|
publicip_info |
Array of PublicipInfo objects |
弹性公网IP信息。 |
|
share_type |
String |
共享带宽类型,标识是否是共享带宽。 取值范围:
|
|
site_id |
String |
边缘站点ID。 |
|
site_info |
String |
站点信息。 |
|
size |
Integer |
带宽大小。 |
|
status |
String |
带宽的状态。 取值范围:
|
|
update_time |
String |
更新时间。 |
|
pool_id |
String |
线路ID。 |
请求示例
更新带宽名称或大小
PUT https://{endpoint}/v1/bandwidths/1b0ec107-f6d4-4507-a1f4-7d7721bdbc7b
{
"bandwidth" : {
"name" : "new-bandwidth-name"
}
}
响应示例
状态码:200
OK
{
"bandwidth" : {
"id" : "1b0ec107-f6d4-4507-a1f4-7d7721bdbc7b",
"name" : "Bandwidth_test",
"size" : 300,
"share_type" : "WHOLE",
"publicip_info" : [ {
"publicip_id" : "39daeb51-3ea9-4c75-86b9-8298fec7018c",
"publicip_address" : "122.9.251.60",
"publicip_type" : "5_bgp_900e",
"ip_version" : 4
} ],
"bandwidth_type" : "share",
"charge_mode" : "95peak_plus",
"site_id" : "db175dab-acb5-11ea-9310-fa165cf67eaf",
"status" : "NORMAL",
"create_time" : "0001-01-01T00:00:00Z",
"site_info" : "中国/华东地区/浙江/杭州市",
"operator" : {
"id" : "99",
"i18n_name" : "bgp",
"sa" : "BGP"
},
"update_time" : "0001-01-01T00:00:00Z"
}
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server Error |
错误码
请参见错误码。