ModifyInstanceType
1. API Description
This API is used to modify the specifications of a virtual machine instance.
2. Input Parameters
The following request parameter list only provides API request parameters.
instanceId
Yes
String
ID of the instance to be modified.
To obtain the instance ID, you can call DescribeInstances
and look for instanceId
in the response.
instanceTypeId
Yes
String
ID of the target model to change.
To obtain the model ID, you can call DescribeZoneInstanceConfigInfos
and look for instanceType
in the response.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
orderNumber
String
Number of order.
4. Code Example
Modify the model of an instance.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
404
INVALID_INSTANCE_NOT_FOUND
Instance does not exist.
403
INVALID_INSTANCE_TYPE_NOT_CHANGED
Instance model does not changed.
400
OPERATION_FAILED_INSTANCE_TYPE_UNSUPPORTED
Unsupported model for the current instance.
403
OPERATION_DENIED_INSTANCE_EXIST_PLAN
A scheduling change exists.
403
OPERATION_DENIED_INSTANCE_PLAN_PROCESSING
A processing change exists.
400
UNSUPPORTED_OPERATION_INSTANCE_STATUS
Only operations on instances in RUNNING
or STOPPED
status are supported.
400
UNSUPPORTED_OPERATION_ZONE_NOT_SUPPORT
Specification change is not supported in the current zone.
400
UNSUPPORTED_OPERATION_INSTANCE_BEING_RECYCLE
Operations on instances in recycle bin are not supported.
404
INVALID_PRODUCT_NOT_FOUND
Model does not exist.
Last updated