调用DescribeBandwidthLimitation查询不同实例规格可以购买、升级或降配的公网带宽上限。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:DescribeBandwidthLimitation |
get |
*Instance
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
目标地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| InstanceChargeType |
string |
否 |
实例的计费方式。更多详情,请参见计费概览。取值范围:
默认值:PostPaid。 |
PostPaid |
| SpotStrategy |
string |
否 |
按量付费实例的抢占策略。取值范围:
默认值:NoSpot。 说明
当参数 InstanceChargeType 取值为 PostPaid 时,参数 SpotStrategy 才有效。 |
NoSpot |
| InstanceType |
string |
是 |
实例规格。取值请参见实例规格族。 |
ecs.g5.large |
| ResourceId |
string |
否 |
资源 ID。 说明
当您将参数 OperationType 设置为 Upgrade 或者 Downgrade 时,参数 ResourceId 为必选参数。 |
i-bp67acfmxazb4ph*** |
| OperationType |
string |
否 |
查询不同操作方式的公网带宽规格限制。取值范围:
默认值:Create。 |
Upgrade |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| Bandwidths |
object |
||
| Bandwidth |
array<object> |
公网带宽上限信息组成的集合。 |
|
|
object |
公网带宽上限信息组成的集合。 |
||
| InternetChargeType |
string |
公网带宽的计费方式。可能值:
|
PayByTraffic |
| Max |
integer |
公网带宽最大值。 |
100 |
| Min |
integer |
公网带宽最小值。 |
0 |
| Unit |
string |
公网带宽单位。 |
Mbps |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"Bandwidths": {
"Bandwidth": [
{
"InternetChargeType": "PayByTraffic",
"Max": 100,
"Min": 0,
"Unit": "Mbps"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Invalid.InstanceChargeType | The specified InstanceChargeType is not valid. | 指定的参数 InstanceChargeType 无效。 |
| 400 | InvalidParam | The input parameter DestinationResource that is mandatory for processing this request is not supplied. | |
| 400 | InvalidInstanceType.ValueNotSupported | The specified InstanceType beyond the permitted range. | 指定的实例规格不合法(超出可选范围)。 |
| 400 | InvalidInstanceId.NotFound | The specified ecs instance not found. | |
| 404 | Invalid.ResourceType.NotFound | The ResourceType provided does not exist in our records. | |
| 404 | Invalid.NetworkCategory | The specified NetworkCategory is not valid. | 指定的参数 NetworkCategory 无效。 |
| 404 | Invalid.SpotStrategy | The specified SpotStrategy is not valid. | 竞价策略参数无效。 |
| 404 | Invalid.IoOptimized | The specified IoOptimized is not valid. | 指定的参数 IoOptimized 无效。 |
| 404 | Invalid.ResourceId | The specified ResourceId is not valid. | 指定的参数 ResourceId 无效。 |
| 404 | Invalid.InstancePayType | The specified InstancePayType is not valid. | 指定的参数 InstanceChargeType 无效。 |
| 404 | Invalid.OperationType | The specified OperationType is not valid. | 指定的参数OperationType无效。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。