Modifies the bandwidth configuration of your ECS instance. If the network specification of your ECS instance is not suitable for your business scale, you can change the bandwidth configuration accordingly. When you call this interface, consider the following:
When you change the bandwidth configuration of a Subscription instance, consider the following:
The configuration of bandwidth billed by
PayByTrafficcan be upgraded or downgraded.
An Internet IP is automatically assigned to an ECS instance when its bandwidth configurations is upgraded from zero Mbps.
When you change the bandwidth configuration of a Pay-As-You-Go instance, consider the following:
The bandwidth configuration can be upgraded or downgraded.
The Internet IP is not assigned to an ECS instance when its bandwidth configurations is upgraded from zero Mbps. However, you can call AllocatePublicIpAddress to assign an Internet IP for a Pay-As-You-Go instance.
InternetMaxBandwidthOutcan only be modified when the instance is in the
After you upgrade the bandwidth configuration for a Classic network instance from zero Mbps, the instance must be restarted to make the change effective.
Before going ahead with an upgrade, you must make sure that you have registered a valid credit card, once you upgrade the bandwidth configuration, auto-payment is initiated. If the payment is unsuccessful, an abnormal order is returned and can only be nullified.
If your registered credit card is invalid, you can set the
falseto cancel the automatic bill payment. Thus, an unpaid order is returned and you can complete the order by making the payment in the ECS console.
The bandwidth cannot be changed again within five minutes after the action is performed.
|Action||String||Yes||The name of this interface. Value: ModifyInstanceNetworkSpec.|
|InstanceId||String||Yes||ID of the instance.|
|InternetMaxBandwidthOut||Integer||No||The maximum outbound bandwidth to the Internet, measured in Mbps. Value range: |
|InternetMaxBandwidthIn||Integer||No||The maximum inbound bandwidth from the Internet, measured in Mbps. Value range: |
|NetworkChargeType||String||No||The billing method of the bandwidth. Optional values: |
|AutoPay||Boolean||No||Whether the payment is automatically completed or not. Optional values: |
|ClientToken||String||No||To guarantee the idempotence of the request. The value is generated by a client. It must be unique among all requests and contains a maximum of 64 ASCII characters. For more information, see How to ensure idempotence.|
All parameters are common response parameters. For more information, see Common parameters.
&<Common Request Parameters>
|Error code||Error message||HTTP status code||Meaning|
|Account.Arrearage||Your account has an outstanding payment.||400||Your account has an outstanding payment.|
|DecreasedBandWidthNotAllowed||A higher bandwidth than the current one is required.||400||You need a bandwidth upgrade.|
|InvalidInstance.UnpaidOrder||The specified instance has unpaid order.||400||An unpaid order exist for the specified instance.|
|InvalidInstanceStatus.NotStopped||The specified Instance status is not Stopped.||400||The specified instance must be in the |
|InvalidInternetChargeType.ValueNotSupported||The specified InternetChargeType is invalid.||400||The specified InternetChargeType does not exist.|
|InvalidInternetMaxBandwidthIn.ValueNotSupported||The specified InternetMaxBandwidthIn is beyond the permitted range.||400||The value range of InternetMaxBandwidthIn is [1, 200].|
|InvalidInternetMaxBandwidthOut.ValueNotSupported||The specified InternetMaxBandwidthOut is beyond the permitted range.||400||The value range of InternetMaxBandwidthIn is [0, 100].|
|MissingParameter||The input parameter “InstanceId” that is mandatory for processing this request is not supplied.||400||You must specify the InstanceId.|
|OperationDenied||Specified instance is in VPC.||400||A VPC instance does not support this operation.|
|ChargeTypeViolation||The operation is not permitted due to billing method of the instance.||403||The billing method of the instance does not support this operation.|
|IncorrectInstanceStatus||The current status of the instance does not support this operation.||403||The status of the instance does not support this operation.|
|InstanceExpiredOrInArrears||The specified operation is denied as your prepay instance is expired (prepay mode) or in arrears (afterpay mode).||403||Your subscription ECS instance has expired. Or your Pay-As-You-Go instance has an overdue payment.|
|InstanceLockedForSecurity||The specified operation is denied as your instance is locked for security reasons.||403||The instance is locked for security reasons.|
|InvalidAccountStatus.NotEnoughBalance||Your account does not have enough balance.||403||Your registered credit card is invalid or you have insufficient balance in your PayPal account.|
|OperationDenied||The operation is denied due to the instance is PrePaid.||403||The operation is denied for a Subscription instance.|
|InvalidInstanceId.NotFound||The specified InstanceId does not exist.||404||The specified InstanceId does not exist.|
|InternalError||The request processing has failed due to some unknown error, exception or failure.||500||Internal error, please try again later.|