阅读325 返回首页    go 搜狐


修改实例网络规格__网络相关接口_API 参考_云服务器 ECS-阿里云

描述

修改实例的带宽配置。当实例现有网络规格不满足要求时,可以通过此接口修改实例的网络规格来提高网络性能。修改后可能影响到实例所产生的账单费用。

  • 操作只修改显式给定的参数,没有给定的参数将不会被修改。
  • 只有实例状态为 Stopped 或 Running 时才可以修改实例的入出公网最大带宽。
  • 被安全控制在实例的 OperationLocks 中标记了 "LockReason" : "security" 的锁定状态时,不能修改实例网络规格。

请求参数

名称 类型 是否必须 描述
Action String 系统规定参数,取值:ModifyInstanceNetworkSpec
InstanceId String 指定的需要实例规格的实例 ID
InternetMaxBandwidthOut Integer 公网出网带宽最大值,单位为 Mbps。按带宽计费:0 ~ 100
按流量计费:1 ~ 100
默认值:无,保持原来的带宽
InternetMaxBandwidthIn Integer 公网入网带宽最大值,单位为 Mbps。按带宽计费:1 ~ 200
按流量计费:1 ~ 200
默认值:无,保持原来的带宽

返回参数

全是公共返回参数,详见公共返回参数

错误码

错误代码 描述 Http 状态码 语义
InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. 404 指定的 InstanceId 不存在
MissingParameter The input parameter "InstanceId" that is mandatory for processing this request is not supplied. 400 缺少 InstanceId 值
InvalidParameter The specified parameter "InternetMaxBandwidthIn" is not valid. 400 指定的 InternetMaxBandwidthIn 不合法(不是数字)
InvalidInternetMaxBandwidthIn.ValueNotSupported The specified InternetMaxBandwidthIn beyond the permitted range. 400 指定的 InternetMaxBandwidthIn 不合法(超出范围)
InvalidParameter The specified parameter "InternetMaxBandwidthOut" is not valid. 400 指定的 InternetMaxBandwidthOut 不合法(不是数字)
InvalidInternetMaxBandwidthOut.ValueNotSupported The specified InternetMaxBandwidthOut beyond the permitted range. 400 指定的 InternetMaxBandwidthOut 不合法(超出范围)
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 该资源目前的状态不支持此操作
InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. 403 该资源目前被安全锁定被拒绝操作
InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode). 403 实例欠费或过期,拒绝操作
InternalError The request processing has failed due to some unknown error. 500 内部错误
ChargeTypeViolation The operation is not permitted due to charge type of the instance. 403 付费方式不支持这个操作

示例

请求示例

https://ecs.aliyuncs.com/?Action=ModifyInstanceNetworkSpec 
&InstanceId=i-23nn22421
&InternetMaxBandwidthOut=20
&<公共请求参数>

返回示例

XML格式

<ReleasePublicIpAddressResponse>
    <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
</ReleasePublicIpAddressResponse>

JSON格式

{
    "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
}

最后更新:2016-11-23 16:03:50

  上一篇:go 分配公网 IP 地址__网络相关接口_API 参考_云服务器 ECS-阿里云
  下一篇:go 申请弹性公网 IP__网络相关接口_API 参考_云服务器 ECS-阿里云