最近更新时间:2024.04.22 16:49:57
首次发布时间:2024.04.22 11:34:50
调用 ModifyInstancePlacement 接口在专有宿主机之间迁移实例。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ModifyInstancePlacement | 要执行的操作,取值:ModifyInstancePlacement |
Version | String | 是 | 2020-04-01 | API的版本,取值:2020-04-01 |
Affinity | String | 否 | Host | 实例是否关联专有宿主机,取值:
|
ClientToken | String | 否 | 23fa21A8823nfasd7f**** | 保证请求幂等性。由客户端自动生成一个参数值,确保不同请求间该参数值唯一,避免当调用API超时或服务器内部错误时,客户端多次重试导致重复性操作。 |
DedicatedHostId | String | 否 | dh-ycje2rquioh9l3bn**** | 目标专有宿主机ID,可以调用DescribeDedicatedHosts接口查看可以使用的专有宿主机。 |
InstanceId | String | 是 | i-ycjls76kfam0tptz**** | 待迁移的实例ID。 |
本接口无特有的返回参数。更多信息请见返回结构。
GET /?Action=ModifyInstancePlacement&Version=2020-04-01&DedicatedHostId=dh-ycje2rquioh9l3bn****&InstanceId=i-ycjls76kfam0tptz**** HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "ResponseMetadata": { "RequestId": "202307171626144175A80ADCCEEBB8****", "Action": "ModifyInstancePlacement", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": {} }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | MissingParameter.AccountId | The required parameter AccountId is not supplied. | 账户ID不能为空。 |
400 | MissingParameter.InstanceId | The required parameter InstanceId is not supplied. | 实例ID不能为空。 |
400 | IdempotentParameterMismatch | The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical. | 幂等参数不一致。 |
400 | InvalidStoppedModeForMigrateInstance.Unsupported | The specified StoppedMode instance does not support migration. | 指定的停止计费实例不支持迁移。 |
400 | InvalidPlacementAffinity.Malformed | The specified placement affinity is malformed. | 指定的Placement.Affinity不合法。 |
400 | InvalidInstanceTypeForLiveMigration.Unsupported | The specified InstanceType does not support live migration. | 指定的实例的规格不支持热迁移。 |
400 | InvalidInstanceStatus | The status of the specified instance does not support this request. | 当前实例的状态不支持此操作。 |
400 | InvalidDedicatedHostForMigrate.Unsupported | The specified dedicated host does not support migrate. | 指定的专有物理机不支持迁移操作。 |
400 | InvalidDedicatedHost | The specified dedicated host does not support this request. | 当前专有宿主机不支持此操作。 |
400 | InvalidClientToken.Malformed | The specified ClientToken is malformed. | 指定的ClientToken不合法。 |
404 | InvalidInstanceType.NotFound | The specified InstanceType does not exist. | 指定的实例规格不存在。 |
404 | InvalidInstance.NotFound | The specified instance does not exist. | 指定的实例不存在。 |
404 | InvalidDedicatedHost.NotFound | The specified dedicated host does not exist. | 指定的专有宿主机不存在。 |
404 | InvalidActionOrVersion | Could not find operation %s for version %s. | 请求接口不存在。 |
412 | IdempotentProcessing | The request uses the same client token as a previous one that is still in process. | 先前的幂等请求仍在处理中,请稍后重试。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |
500 | Insufficient.InstanceCapacity | There is not enough capacity to fulfill your request. | 当前资源不足,请稍后重试或选择其它实例规格。 |