ModifyInstanceNetworkSpec

Last Updated: Sep 13, 2017

Description

This operation allows you to modify the bandwidth configuration of an instance. When the existing network specification of an instance does not meet requirements, this interface can be used to modify the network specification to improve network performance. After the modification, the expenses billed for the instance may be affected. When modifying instance network types, consider the following:

  • Only specified parameters are modified; unspecified parameters are not modified.
  • The parameters InternetMaxBandwidthIn and InternetMaxBandwidthOut can only be changed when the instance is in Stopped or Running status.
  • If OperationLocks of the instance indicates LockReason: security, the network specification of the instance cannot be modified.

Request parameters

Name Type Required Description
Action String Yes Value: ModifyInstanceNetworkSpec.
InstanceId String Yes Indicates the specified ID of the instance which requires an instance type.
InternetMaxBandwidthOut Integer No Indicates the maximum outgoing bandwidth to the public network, measured in Mbps.
  • PayByBandwidth: 1 - 100 Mbps
  • PayByTraffic: 1 - 100 Mbps
The default value is None. This indicates that the original bandwidth is retained.
InternetMaxBandwidthIn Integer No Indicates the maximum incoming bandwidth from the public network, measured in Mbps.
  • PayByBandwidth: 1 - 200 Mbps
  • PayByTraffic: 1 - 200 Mbps
The default value is None. This indicates that the original bandwidth is retained.

Return parameters

All parameters are public return parameters. For details, refer to Public Return Parameters.

Error code

Error code Description Http status code Meaning
InvalidInstanceId.NotFound The specified InstanceId does not exist. 404 The specified InstanceId does not exist.
MissingParameter The input parameter InstanceId that is mandatory for processing this request is not supplied. 400 The InstanceId value is missing.
InvalidParameter The specified parameter InternetMaxBandwidthIn is not valid. 400 The specified InternetMaxBandwidthIn is invalid (not a number).
InvalidInternetMaxBandwidthIn.ValueNotSupported The specified InternetMaxBandwidthIn beyond the permitted range. 400 The specified InternetMaxBandwidthIn is invalid (exceeds the range).
InvalidParameter The specified parameter InternetMaxBandwidthOut is not valid. 400 The specified InternetMaxBandwidthOut is invalid (not a number).
InvalidInternetMaxBandwidthOut.ValueNotSupported The specified InternetMaxBandwidthOut beyond the permitted range. 400 The specified InternetMaxBandwidthOut is invalid (exceeds the range).
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 The current status of the resource does not support this operation.
InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. 403 The operation is denied because the resource is locked for security reasons.
InstanceExpiredOrInArrears The specified operation is denied as your prepay instance is expired (prepay mode) or in overdue payment (afterpay mode). 403 The instance cannot be initiated because the account balance is insufficient or the instance is in overdue payment.
InternalError The request processing has failed due to some unknown error. 500 Internal error.
ChargeTypeViolation The operation is not permitted due to charge type of the instance. 403 The charge type of the instance does not support this operation.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=ModifyInstanceNetworkSpec
  2. &InstanceId=i-23nn22421
  3. &InternetMaxBandwidthOut=20
  4. &<Public Request Parameters>

Return example

XML format

  1. <ReleasePublicIpAddressResponse>
  2. <RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BA984</RequestId>
  3. </ReleasePublicIpAddressResponse>

JSON format

  1. {
  2. "RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BA984"
  3. }
Thank you! We've received your feedback.