ModifyInstanceNetworkSpec_云服务器 ECS_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

接口说明

调用该接口时,您需要注意:

  • 修改包年包月(PrePaid)实例的带宽配置时,公网出带宽(InternetMaxBandwidthOut)从 0 Mbit/s 升级到一个非零值时会自动分配一个公网 IP。

  • 修改按量付费(PostPaid)实例的带宽配置时,公网出带宽(InternetMaxBandwidthOut)从 0 Mbit/s 升级到一个非零值时不会自动分配公网 IP。您需要指定参数AllocatePublicIptrue分配公网 IP。

  • 对于经典网络(Classic)类型实例,当公网出带宽(InternetMaxBandwidthOut)从 0 Mbit/s 升级到一个非零值时,实例必须处于已停止(Stopped)状态。

说明 单个地域下,单个阿里云账号按固定带宽计费的公网带宽峰值总和存在限制,请参见公网带宽限制
  • 费用:

    • 升级带宽后,默认自动扣费。您需要确保支付方式余额充足,否则会生成异常订单,此时只能作废订单。如果您的账户余额不足,可以将参数 AutoPay 置为 false,此时会生成正常的未支付订单,您可以登录 ECS 管理控制台支付。

    • 降低带宽后,价格差退款将原路退还,已使用的代金券不退回。

流控信息

请求速率为1000/60(s)。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
ecs:ModifyInstanceNetworkSpec
Update
Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

请求参数

字段名称字段详情
InstanceIdstring

待修改网络配置的实例 ID。

示例值:i-bp67acfmxazb4****参考取值来源:
    RunInstances
    StopInstances
    StartInstances
    CreateInstance
    RebootInstances
    DescribeInstances
    ModifyManagedInstance
    RenewReservedInstances
    AttachInstanceRamRole
    DetachInstanceRamRole
    DeregisterManagedInstance
    PurchaseReservedInstancesOffering
InternetMaxBandwidthOutinteger<int32>

公网出带宽最大值,单位:Mbit/s(Megabit per second)。取值范围:展开详情

示例值:10
InternetMaxBandwidthIninteger<int32>

公网入带宽最大值,单位:Mbit/s(Megabit per second)。取值范围:展开详情

示例值:10取值 <= 200
ISPstring
说明 该参数正在邀测中,暂未开放使用。
示例值:null
NetworkChargeTypestring

转换网络计费方式。取值范围:展开详情

示例值:PayByTraffic
AllocatePublicIpboolean

是否分配公网 IP 地址。展开详情

示例值:false
StartTimestring

临时带宽升级开始时间。按照ISO 8601标准表示,并使用 UTC+0 时间,格式为 yyyy-MM-ddThh:mmZ。精确到分钟(mm)。

示例值:2017-12-05T22:40Z
EndTimestring

临时带宽升级结束时间。按照ISO 8601标准表示,并使用 UTC+0 时间,格式为 yyyy-MM-ddThhZ。精确到小时(hh)。展开详情

示例值:2017-12-06T22Z
AutoPayboolean

是否自动支付。取值范围: 展开详情

示例值:true
ClientTokenstring

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性

示例值:123e4567-e89b-12d3-a456-426655440000

返回参数

字段名称字段详情
OrderIdstring

生成的订单 ID。

示例值:123457890
RequestIdstring

请求 ID。

示例值:473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
InvalidInternetMaxBandwidthIn.ValueNotSupported
The specified InternetMaxBandwidthIn is beyond the permitted range.诊断
400
InvalidInternetMaxBandwidthOut.ValueNotSupported
The specified InternetMaxBandwidthOut is beyond the permitted range.诊断
400
OperationDenied
Specified instance is in VPC.诊断
400
InvalidParameter.Conflict
%s诊断
400
InvalidStartTime.ValueNotSupported
The specified StartTime is out of the permitted range.诊断
400
InvalidEndTime.ValueNotSupported
The specified EndTime is out of the permitted range.诊断
400
ChargeTypeViolation
The operation is not permitted due to billing method of the instance.诊断
400
Account.Arrearage
Your account has an outstanding payment.诊断
400
InvalidInternetChargeType.ValueNotSupported
The specified InternetChargeType is invalid.诊断
400
DecreasedBandwidthNotAllowed
%s诊断
400
BandwidthUpgradeDenied.EipBoundInstance
The specified VPC instance has bound EIP, temporary bandwidth upgrade is denied.诊断
400
InvalidClientToken.ValueNotSupported
The ClientToken provided is invalid.诊断
400
Throttling
Request was denied due to request throttling, please try again after 5 minutes.诊断
400
InvalidInstanceStatus.NotStopped
The specified Instance status is not Stopped.诊断
400
InvalidAction
Specified action is not valid.诊断
400
IpAllocationError
Allocate public ip failed.诊断
400
InvalidParam.AllocatePublicIp
The specified param AllocatePublicIp is invalid.诊断
400
InstanceDowngrade.QuotaExceed
Quota of instance downgrade is exceed.诊断
400
InvalidBandwidth.ValueNotSupported
Instance upgrade bandwidth of temporary not allow less then existed.诊断
400
InvalidInstanceStatus
The specified instance status does not support this action.诊断
400
InvalidInstance.UnPaidOrder
Unpaid order exists in your account, please complete or cancel the payment in the expense center.诊断
400
LastOrderProcessing
The previous order is still processing, please try again later.诊断
400
LastRequestProcessing
The previous request is still processing, please try again later.诊断
400
InvalidStartTime.BeyondLifeCycle
The specified start time exceeds the expiration time.诊断
400
InvalidEndTime.BeyondLifeCycle
The specified end time exceeds the expiration time.诊断
400
InvalidPayMethod.SyncPaymentNotSupport
Synchronous payment is not supported. Use another payment method.诊断
400
InvalidBandwidthOut.LessThanZero
The bandwidth must be larger than 0 when specifying isp.诊断
400
InvalidParameter.BandwidthBiggerThanBaseBandwidth
%s诊断
400
InvalidAction.WithActiveElasticUpgrade
The instance has active Elastic Upgrade.诊断
400
InvalidParameter.CloudboxNotSupported
%s诊断
400
InvalidParameter.Bandwidth
%s诊断
400
NoPermission.Price
The operation requires price permission. Please either apply for permission from your main account, or set the parameter AutoPay as true.诊断
400
NoPermission.Refund
The operation requires refund permission. Please apply for permission from your main account.诊断
400
InvalidParameter.DedicatedRegionNotSupported
The specified action is rejected because the specified ECS instance in the dedicated region does not support public IP.诊断
400
InvalidOperation.InstanceStatusUnsupported
The specified instance status is not supported for this operation, expect status is Running or Stopped.诊断
400
QuotaExceeded.InternetBandwidth
%s.诊断
400
UnsupportedIspNetworkChargeType
The network charge type is not supported when specifying ISP.诊断
400
IncorrectInstanceStatus
Current instance status does not support this operation.诊断
400
TaskConflict
The operation is too frequent, please wait a moment and try again.诊断
403
IncorrectInstanceStatus
The current status of the instance 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
ChargeTypeViolation
The operation is not permitted due to billing method of the instance.诊断
403
OperationDenied
The operation is denied due to the instance is PrePaid.诊断
403
InvalidAccountStatus.NotEnoughBalance
Your account does not have enough balance.诊断
403
InvalidInstance.UnPaidOrder
The specified Instance has unpaid order.诊断
403
Throttling
Request was denied due to request throttling, please try again after 5 minutes.诊断
403
InvalidInstance.InstanceNotSupported
The special vpc instance with eip not need bandwidth.诊断
403
InstanceDowngrade.QuotaExceed
Quota of instance downgrade is exceed.诊断
403
InvalidInstanceStatus
The current status of the instance does not support this operation.诊断
403
InvalidOperation.StarterPackage
StarterPackage not support modification.诊断
403
NAT_PUBLIC_IP_BINDING_FAILED
Binding nat public ip failed.诊断
403
InvalidInstance.EipNotSupport
The specified instance with eip is not supported, please unassociate eip first.诊断
403
InvalidInstance.NatPortMapNotSupport
The special instance with nat port map not support operate, please remove nat port map first.诊断
403
OperationDenied.UnpaidOrder
The specified instance has unpaid order.诊断
403
Mayi.InternalError
The request processing has failed due to some unknown error.诊断
403
InvalidNetworkType.ValueNotSupported
The specified parameter NetworkType is not valid.诊断
403
OperationDenied.ImageNotValid
The specified image is not authorized.诊断
403
InvalidInstanceChargeType.ValueNotSupported
The specified parameter ChargeType is not valid.诊断
403
InvalidIspType.ValueNotSupported
%s诊断
403
UnsupportedIspChargeType
%s诊断
403
UnsupportedIspClassicNetwork
%s诊断
403
InvalidIspBandwidthOut
%s诊断
403
UnsupportedChangeIsp
%s诊断
403
InvalidIspUID
%s诊断
403
UnsupportedIspRegion
%s诊断
403
BandIncreaseNotSupportIsp
%s诊断
403
SecurityRisk.3DVerification
We have detected a security risk with your default credit or debit card. Please proceed with verification via the link in your email.诊断
403
InvalidOperation.PublicIpAddressNoStock
The public IP address for the specified Region or ChargeType of the instance is out of stock. Please try another Region or ChargeType.诊断
404
InvalidInstanceId.NotFound
The specified InstanceId does not exist.诊断
500
InternalError
The request processing has failed due to some unknown error.诊断
500
Image.OrderFailed
Create marketplace image order failed.诊断

变更历史

变更时间变更内容概要操作
2025-03-13
变更错误码400
2024-12-02
变更错误码400
变更错误码403
2024-09-27
变更错误码400
2024-09-23
变更错误码500
2024-01-30
变更错误码403
  • 1
  • 2
  • 10 条/页

相关示例

2024年08月20日