全部文档
当前文档

暂无内容

如果没有找到您期望的内容,请尝试其他搜索词

文档中心

升级实例套餐类型

请求参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见公共请求参数
参数名称
类型
必填
描述
Action String
公共参数,本接口取值:ModifyInstanceType。
Version String
公共参数,本接口取值:2016-03-04。
InstanceId String

待调整配置的实例ID

示例值:13536cc1-0dbd-4741-87d3-f7abbb0db329
InstanceType String

实例目标套餐规格
实例套餐类型有效值
若对应实例为专属虚机,该值需填写DVM1.NONE(专属型)、DVM2.NONE(专属型2.0)、DVM3.NONE(专属型3.0),专属虚机只支持升降配,不支持变更实例类型。
具体套餐信息参考实例套餐类型定义

示例值:C1.1B
InstanceConfigure.VCPU String

目标CPU值;当需变更实例为专属虚机时需填写该值

示例值:-
InstanceConfigure.MemoryGb String

目标内存值

DataDiskGb Int

数据卷容量,单位GB,数据卷只能扩容或者保持不变,且不能低于实例套餐类型定义的最小值。

示例值:1
CrossInstanceMigrate Boolean

当前操作是否为变更实例套餐类型,若当前操作变更实例类型必须指定为true。(变更过程中必须保持云服务器关机状态;变更完成后启动云服务器生效;涉及本地盘类型的机型变更需加白名单) true/false

示例值:-
SystemDisk.DiskType String

不能给默认值,不传默认按价格体系配置systemDisk属性中第一个创建

示例值:-
DataDisk.N Object

目标套餐数据盘类型(当本地盘机型变更为云盘机型时才需填写此参数,此参数仅对源本地数据盘生效)

示例值:-
Type String

是,本地盘变云盘时此参数不可缺省

示例值:-
Size String

是,本地盘变云盘时此参数不可缺省

示例值:-
StopInstance Boolean

是否对运行中的实例选择关机:是-true,否-false(默认)

AutoRestart Boolean

变更实例类型后是否自动重启: 是-true,否-false(默认)

SystemDisk.DiskSize Int

系统盘大小,最大值500,最小值0

SystemDisk.ResizeType String

扩容 offline 离线扩容| online 在线扩容

InstantAccess Boolean

支持快速开盘/快速变更,该参数仅对本地盘/本地盘机型/本地盘快照生效

返回参数

参数名称
类型
描述
RequestId String
示例值:7a6fa859-85e6-40ba-95d2-69deb5e43b6a
Return Boolean
示例值:true

请求示例

curl -X GET|POST
'http://kec.api.ksyun.com/?Action=ModifyInstanceType&Version=2016-03-04'
-H 'authorization: xxx, SignedHeaders=content-type;host;x-amz-date, Signature=xxx'
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'host: kec.api.ksyun.com'
-H 'x-amz-date: 20170720T022802Z'
-d 'InstanceId=xxx&InstanceType=xxx&InstanceConfigure.VCPU=xxx&InstanceConfigure.MemoryGb=xxx&DataDiskGb=xxx&CrossInstanceMigrate=xxx&SystemDisk.DiskType=xxx&DataDisk.N.Type=xxx&DataDisk.N.Size=xxx&StopInstance=xxx&AutoRestart=xxx&SystemDisk.DiskSize=xxx&SystemDisk.ResizeType=xxx&InstantAccess=xxx'

返回示例

JSON格式

{
"RequestId":"7a6fa859-85e6-40ba-95d2-69deb5e43b6a",
"Return":true
}

错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见公共错误码

错误码
错误信息
Http状态码
描述
CrossInstanceMigrateQueueNoSettingcross instance migrate queue no setting.400变更实例类型队列未进行配置.
MinProductInvalidNo additional microflavor quota is available for the specified instance type in this region.400可开小套餐虚机数量超过该机型该地域的配额上限
EbsProductPermissionDeniedThe EBS package cannot be used400用户不能使用该EBS套餐
SystemDiskInfoInvalidThis systemDiskInfo is not valid.400系统盘信息无效或不完整
InstanceBeforeMigrateStateNotSupportedMigrateThis instance is not in the correct pre-migrated state for change operations.400该实例预迁移状态不正确, 无法进行变更操作.
BindingEBSNumberInvalidbinding EBS number is invalid.400超过实例绑定ebs数据盘数量限制
BindingEBSTypeInvalidParameterValuebinding EBS type is required.400EBS盘类型不允许为空
ImageIdInvalidParameterValueAn invalid or out-of-range value was supplied for the "ImageId" parameter.400“镜像ID”参数的取值无效或者超出有效范围
SystemDiskSizeInvalidAn invalid or out-of-range value was supplied for the "SystemDisk.DiskSize" parameter.400“系统盘大小”参数的取值无效或者超出有效范围.
SystemDiskTypeNotChangeAllowedThe systemDiskType cannot be changed,from [{0}] to [{1}].400系统盘类型不允许变更,从 [{0}] 到 [{1}].
SubOrderBindedInstancesubOrder already bound instance400子订单已经绑定实例
InstanceTypeNotSupportBindingEBSInstanceType does not support binding EBS.400实例类型不支持绑定ebs数据盘
InstanceTypeNotSupportUpgradeThis InstanceType does not support adjustment configuration.400该机型不支持调整配置
EbsSystemDiskProductSellOutInvalidebs system disk [{0}] product already sell out.400此ebs系统盘[{0}]商品在该机房已售罄.
DataDiskParamInvalidDataDisk param is invalid.400DataDisk.n.Type/DataDisk.n.Size 参数格式填写错误
SystemDiskTypeInvalidAn invalid or out-of-range value was supplied for the "SystemDisk.DiskType" parameter.400“系统盘类型”参数的取值无效或者超出有效范围.
InstanceTypeInvalidParameterValueAn invalid or out-of-range value was supplied for the "InstanceType" parameter.400“实例套餐类型”参数的取值无效或者超出有效范围
InstanceStateNotSupportedLiveUpgradeThe Instance state is not support live upgrade.400只有运行中的主机支持热升级
BindingEBSTypeInvalidbinding EBS type is invalid.400该实例不支持绑定此类型的ebs数据盘
TargetInstanceNotSupportIPV6ForModifyInstanceTypeThe change is not allowed because the target instance type does not support IPv6.400因目标实例类型不支持IPv6,不允许变更
OperationDeniedSpotInstance暂无400暂无
BindingEBSSizeParamInvalidThe size of the EBS disk out-of-range, should be [{0} - {1}], and the multiple of [{2}].400EBS数据盘大小超出有效范围:[{0} - {1}],且为[{2}]的倍数。
InstanceType DataDisk Config Invalid暂无400暂无
ExceedHotUpgradeMemoryLimitMaximum 64 G memory per expansion and 128 G total memory to support expansion.400单次扩容内存数量最大32G,累计扩容内存数量最大128G,如超出范围请使用普通调整配置功能
InstanceTypeUpgradeNotSupported.DiskThe disk size of upgraded InstanceType should be more than that of old one.400升级目标实例类型的磁盘卷容量要大于旧实例的磁盘卷容量
InstanceOrderMustInUseThe "InstanceOrder" parameter must be used when calling directly from console.400使用控制台调用必须传递“实例订单”参数
InvalidImageForOnlineResizeThe specified image does not support online resizing.400指定的镜像不支持在线扩容 .
InvalidInstanceStatusForOnlineResizeThe instance must be running for resizing system disk online.400指定的主机状态不支持在线扩容
InstanceType Net Config Invalid暂无400暂无
InstanceIdInvalidInstance Resource id is invalid400实例资源ID无效
InstanceConfigureGPUInvalidAn invalid or out-of-range value was supplied for the "InstanceConfigure.GPU" parameter.400"InstanceConfigure.GPU"参数范围无效
InstanceTypeUpgradeNotSupportedDisk暂无400暂无
InstanceStateNotSupportedMigrateThe current status of the resource does not support this operation.400本操作执行时“实例状态”不支持
InstanceTypeUpgradeNotSupportedTypeSameThe Configuration of upgraded InstanceType should not be the same with the old one.400升级目标实例类型的配置不能与原来一致
InstanceTypeUpgradeNotSupportedThe upgraded InstanceType is not in the same type with the old InstanceType.400升级目标实例类型与源实例类型不属于同一类型
InsufficientDedicatedHostResourcesForMigrateInstance expansion is not allowed because the dedicated host resource is insufficient.400所在宿主机资源不足,实例无法升配。
GPUVMConfigurationReductionNotSupportedThe GPUVM does not allow configuration reduction.400GPUVM不允许降配
InternalErrorInternal Error400暂无
ResetDiskSizeLessThanCurrentSizeResetDiskSizeLessThanCurrentSize400重装系统时系统盘大小不能调小
ProductSellOutInvalidproduct already sell out.400此商品在该机房已售罄.
CrossInstanceNotSupportBillTypeThis bill type does not support cross the instance type.400该计费方式不支持变更实例类型
InstanceType CPU Or Mem Config Invalid暂无400暂无
InstanceTypeNoneInvalidCreate or upgrade does not support non-standard instancetype.400创建、升配不支持非标套餐.
CrossInstanceNotSupportBindingEBSThe Instance has already mounted EBS2.0 disk, do not support cross the instance type!400云主机已经挂载EBS2.0云盘,不支持变更实例类型!
ReservePreMigrateParamNotMatchThe reservation type of this instance does not match the parameters400此实例的预约类型与参数不匹配.
InstanceTypeNotFound暂无400暂无
DataDiskGbInvalidParameterValueAn invalid or out-of-range value was supplied for the "DataDiskGb" parameter.400“数据卷容量”参数的取值无效或者超出有效范围
ProductTypeNotSupportDiskModifyThe specified instance type does not support resizing datadisk volume.400该机型不支持调整数据盘大小
InstanceOpLockNotObtainInstanceOpLockNotObtain400当前实例在操作处理中,请稍后重试
InstanceOrderNotInUseThe "InstanceOrder" parameter should not be used when calling directly from SDK or OpCenter.400使用SDK或者运营平台调用不应该传递“实例订单”参数
BindingEBSSizeInvalidParameterValuebinding EBS size is required.400EBS盘大小不允许为空
OnlineExpansionNotSupportChangeInstanceTypeChange InstanceType are not supported for online expansion.400在线扩容不支持变更套餐.
纯净模式常规模式

纯净模式

点击可全屏预览文档内容