最近更新时间:2024.03.26 14:17:57
首次发布时间:2023.07.18 10:22:41
调用CreateMigrationJob接口,创建迁移任务。
说明
如需进行增量数据迁移,请设置SyncConfig.TriggerLastSync
参数为false
,并通过SyncConfig.SyncInterval
参数指定同步增量数据的间隔时间。
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateMigrationJob | 要执行的操作,取值: CreateMigrationJob。 |
Version | String | 是 | 2020-04-01 | API的版本,取值: 2020-04-01。 |
DestinationConfig.DestinationSystem | String | 否 | VeLinux10Centos | 目标操作系统。取值:
说明
|
DestinationConfig.DestinationType | String | 是 | ECSInstance | 目标类型,取值:
|
DestinationConfig.ImageName | String | 否 | image-1 | 镜像名称。
|
DestinationConfig.AutoInstallVirtio11 | Boolean | 否 | true | 是否自动为目标实例或目标镜像安装Virtio1.1驱动。取值:
说明 迁移到Linux云服务器实例、Linux云服务镜像时支持使用。 |
DestinationConfig.AutoInstallBlkNone | Boolean | 否 | true | 是否自动为目标实例或目标镜像安装blk-none。取值:
说明 迁移到Linux云服务器实例、Linux云服务镜像时支持使用。 |
DestinationConfig.InstanceId | String | 否 | i-3teco18f1w5a71**** | 目标实例ID。您可以调用DescribeInstances接口查询获取。
|
DestinationConfig.Region | String | 是 | cn-beijing | 目标地域。 |
DiskConfigs.N.DiskIndex | String | 否 | 0 | 磁盘下标,系统盘为 0 ,数据盘从1 开始。 |
DiskConfigs.N.DiskSize | String | 否 | 10 | 磁盘容量,单位GB。 |
MigrationJobDescription | String | 否 | 用于迁移本地虚拟机 | 任务描述。
|
MigrationJobName | String | 是 | VM迁移至ECS | 任务名。
|
MigrationSourceId | String | 是 | s-iegs1y963vj0**** | 迁移源ID。您可以调用DescribeMigrationSources接口查询获取。 |
NetworkConfig.BandwidthLimit | Integer | 否 | 5 | 传输限速,单位Mbps。最小值(默认)为0 ,表示不限速。 |
NetworkConfig.NetworkTransitionMode | String | 是 | PublicNetwork | 网络模式,取值:
|
NetworkConfig.SubnetId | String | 否 | subnet-**** | 子网ID。您可以调用DescribeSubnets接口查询获取。
|
NetworkConfig.VpcId | String | 否 | vpc-bp15zkdt37pq72zv**** | 私有网络ID。您可以调用DescribeVpcs接口查询获取。
|
ProjectName | String | 否 | project_a | 迁移任务所属项目,一个任务只能归属于一个项目。
|
SyncConfig.SyncInterval | Integer | 否 | 2 | 增量同步时间间隔,单位小时。
说明 若 |
SyncConfig.SyncType | String | 否 | File | 复制类型,取值:
|
SyncConfig.TriggerLastSync | Boolean | 否 | true | 是否开启最后一次增量同步。取值:
|
Tags.N.Key | String | 否 | Tags.1.Key=k1&Tags.2.Key=k2 | 用户标签的标签键。
说明 同一资源的标签键不允许重复。 |
Tags.N.Value | String | 否 | Tags.1.Value=v1&Tags.2.Value=v2 | 用户标签的标签值。
说明 如果传入该参数,则必须先传入 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
MigrationJobId | String | job-3tiegs1y963vj0**** | 迁移任务ID。 |
GET /?Action=CreateMigrationJob&Version=2020-04-01&DestinationConfig.DestinationType =ECSInstance&DestinationConfig.Region=cn-beijing&MigrationJobName=VM迁移至ECS&MigrationSourceId=s-iegs1y963vj0******&NetworkConfig.NetworkTransitionMode=PublicNetwork&SyncConfig.SyncType=File&SyncConfig.TriggerLastSync=true HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: smc
{ "ResponseMetadata":{ "RequestId":"202306021637410F150Dxxxxx", "Action":"CreateMigrationJob", "Version":"2020-04-01", "Service":"smc", "Region":"cn-beijing" }, "Result":{ "MigrationJobId": "job-3tiegs1y963vj0******" } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | Insufficient.Balance | The request is denied due to the lack of balance. | 账户余额不足。 |
400 | InvalidInstanceChargeTypeForMigration.Unsupported | The destination instance charge type does not support migration. | 目的实例计费方式不支持迁移。 |
400 | InvalidInstanceStatusForMigration.Unsupported | The specified destination instance does not support migration. | 指定的目的实例不支持迁移。 |
400 | InvalidMigrationJobDescription.Malformed | The specified MigrationJobDescription is malformed. | 指定的MigrationJobDescription不合法。 |
400 | InvalidMigrationJobName.Malformed | The specified MigrationJobName is malformed. | 指定的MigrationJobName不合法。 |
400 | InvalidMigrationSourceStatus | The status of the specified migration source does not support this request. | 指定的迁移源状态不支持此操作。 |
400 | InvalidRegion.Malformed | The specified Region is malformed. | 指定的Region不合法。 |
400 | InvalidSubnetIdStatus | The specified subnet status error. | 指定的子网状态有误。 |
400 | LimitExceeded.MaximumImageCount | You've reached the limit on the number of image that you can create. | 可创建的自定义镜像个数超过限制。 |
400 | LimitExceeded.MaximumSyncInterval | The number of specified SyncInterval exceeds the maximum limit. | 指定的SyncInterval超过最大限制。 |
400 | LimitExceeded.MaximumSystemDiskSize | The size of specified system disk exceeds the maximum limit | 指定的系统盘大小超过最大限制。 |
400 | LimitExceeded.MinimumBandwidthLimit | The number of specified BandwidthLimit exceeds the minimum limit. | 指定的BandwidthLimit超过最小限制。 |
400 | LimitExceeded.MinimumSyncInterval | The number of specified SyncInterval exceeds the minimum limit. | 指定的SyncInterval超过最小限制。 |
400 | MissingParameter.DestinationConfig | The required parameter DestinationConfig is not supplied. | 参数DestinationConfig不能为空。 |
400 | MissingParameter.InstanceId | The required parameter InstanceId is not supplied. | 参数实例Id不能为空。 |
400 | MissingParameter.MigrationJobName | The required parameter MigrationJobName is not supplied. | 参数MigrationJobName不能为空。 |
400 | MissingParameter.MigrationSourceId | The required parameter MigrationSourceId is not supplied. | 参数MigrationSourceId不能为空。 |
400 | MissingParameter.NetworkConfig | The required parameter NetworkConfig is not supplied. | 参数NetworkConfig不能为空。 |
400 | MissingParameter.Region | The required parameter Region is not supplied. | 参数Region不能为空。 |
400 | MissingParameter.SubnetId | The required parameter SubnetId is not supplied. | 参数子网Id不能为空。 |
400 | MissingParameter.SyncConfig | The required parameter SyncConfig is not supplied. | 参数SyncConfig不能为空。 |
400 | MissingParameter.VpcId | The required parameter VpcId is not supplied. | 参数vpcId不能为空。 |
400 | QuotaExceeded.MaximumMigrationJob | You've reached the limit on the number of migration jobs that you can create, please submit ticket to request an increase in quota. | 迁移任务数量配额不足,请提工单申请提高配额。 |
400 | InvalidProjectName.Malformed | The specified ProjectName is malformed. | 指定的ProjectName不合法。 |
400 | InvalidSyncTypeForMigration.Unsupported | The specified migration job sync type does not support migration. | 指定迁移任务的复制类型不支持迁移。 |
400 | QuotaExceeded.MaximumRunningMigrationJob | You've reached the limit on the number of running migration jobs that you can create, please submit ticket to request an increase in quota. | 运行迁移任务数量配额不足,请提工单申请提高配额。 |
400 | InvalidTagKey.Malformed | The specified TagKey is malformed. | 指定标签的键不合法。 |
400 | InvalidTagValue.Malformed | The specified TagValue is malformed. | 指定的标签的值不合法。 |
400 | LimitExceeded.MaximumTags | You've reached the limit on the number of tags that you can create. | 指定的标签数量超过最大限制。 |
404 | InvalidActionOrVersion | Could not find operation %s for version %s. | 请求接口不存在。 |
404 | InvalidDestinationRegion.NotFound | The specified destination region does not exist. | 指定的迁移区域不存在。 |
404 | InvalidMigrationSource.NotFound | The specified migration source does not exist. | 指定的迁移源不存在。 |
404 | InvalidSourceTransferEip.NotFound | The specified source instance does not associate eip. | 指定的源实例没有绑定EIP。 |
404 | InvalidSourceTransferPrivateIp.NotFound | The specified source instance private ip does not exist. | 指定的源实例没有内网ip。 |
404 | InvalidSubnetId.NotFound | The specified subnet id does not exist. | 指定的子网Id不存在。 |
404 | InvalidTransferEip.NotFound | The specified destination instance does not associate eip. | 指定的目标实例没有绑定EIP。 |
409 | InvalidTagKey.Conflict | The specified TagKey already exists. | 指定的标签键已存在。 |
412 | InvalidArchitecture.MisMatch | The source, destination architecture does not match. | 源、目的实例架构不匹配。 |
412 | InvalidMigrationSource.InUse | The specified migration source is in use. | 指定的迁移源有迁移任务在执行。 |
412 | InvalidVolumeConfig.MisMatch | The source, destination volume config does not match. | 源、目的实例磁盘配置不匹配。 |
412 | InvalidVpcId.SubnetIdMismatch | The specified VpcId does not match subnetId. | vpcId和子网Id不匹配。 |
412 | OperationDenied.AgentNeedUpgrade | The specified migration agent need upgrade | 请升级迁移客户端。 |
412 | OperationDenied.SnapshotServiceUnavailable | The specified operation is denied as Snapshot service is unavailable. | 指定的操作被拒绝,因为快照服务未开通。 |
500 | Insufficient.InstanceTypeCapacity | There is not enough capacity to fulfill your request. | 实例规格资源不足。 |