閱讀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-阿裏雲