最近更新时间:2024.05.23 10:12:41
首次发布时间: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.AutoInstallBlkNone | Boolean | 否 | false | 是否自动为目标实例或目标镜像安装blk-none。取值:
说明 仅迁移至Linux云服务器实例、Linux云服务镜像时有效。 |
DestinationConfig.AutoInstallVirtio11 | Boolean | 否 | false | 是否自动为目标实例或目标镜像安装Virtio1.1驱动。取值:
说明 仅迁移至Linux云服务器实例、Linux云服务镜像时有效。 |
DestinationConfig.DestinationSystem | String | 否 | VeLinux10Centos | 目标操作系统。取值:
说明
|
DestinationConfig.DestinationType | String | 是 | ECSInstance | 目标类型,取值:
|
DestinationConfig.ImageName | String | 否 | image-1 | 镜像名称。
说明 迁移到云服务器镜像时,本参数必填。 |
DestinationConfig.InstanceId | String | 否 | i-3teco18f1w5a71**** | 目标实例ID。您可以调用DescribeInstances接口查询获取。 说明 迁移到云服务器实例时,本参数必填。 |
DestinationConfig.Region | String | 是 | cn-beijing | 目标地域。 |
DiskConfigs.N.DiskIndex | Array of Integer | 是 | 0 | 磁盘下标,从 |
DiskConfigs.N.DiskSize | Array of Integer | 否 | 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-h49ihs***** | 子网ID。您可以调用DescribeSubnets接口查询获取。 说明 迁移到云服务器镜像,且通过内网传输时必填。 |
NetworkConfig.VpcId | String | 否 | vpc-bp15zkdt37pq72zv**** | 私有网络ID。您可以调用DescribeVpcs接口查询获取。 |
ProjectName | String | 否 | project_a | 迁移任务所属项目,一个任务只能归属于一个项目。
|
SyncConfig.SyncInterval | Integer | 否 | 2 | 增量同步时间间隔,单位小时。 说明 若 |
SyncConfig.SyncTimes | Integer | 否 | 3 | 增量同步次数。取值:
说明 仅“一键迁移”支持使用本参数。 |
SyncConfig.SyncType | String | 否 | File | 复制类型,取值:
|
SyncConfig.TriggerLastSync | Boolean | 否 | true | 是否只进行一次全量同步。取值:
|
Tags.N.Key | Array of String | 是 | Tags.1.Key=k1&Tags.2.Key=k2 | 用户标签的标签键。
说明 同一资源的标签键不允许重复。 |
Tags.N.Value | Array of 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******" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
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.Common | You've reached the limit of cpu, volume and general cpu that you can create, please submit ticket to request an increase in quota. | 已达到可创建的cpu、云盘和通用性cpu和数量上限,迁移服务到镜像会在目的地区创建云盘和云服务器,请确保目的地区至少存在一个可用区的云盘和cpu余额能满足迁移服务要求。 |
400 | QuotaExceeded.Cpu | You've reached the limit of cpu that you can create, please submit ticket to request an increase in quota. | 已达到可创建的cpu数量上限,迁移服务会创建临时实例,请确保目的可用区cpu数目未达到上限。 |
400 | QuotaExceeded.Eip | You've reached the limit on the number of eip that you can create, please submit ticket to request an increase in quota. | 已达到可申请公网IP数量上限,迁移服务会创建临时公网IP,请确保目的地区公网IP数目未达到上限。 |
400 | QuotaExceeded.GeneralCpu | You've reached the limit of general cpu that you can create, please submit ticket to request an increase in quota. | 已达到可创建的通用性cpu数量上限,迁移服务会创建临时实例,请确保目的可用区通用性cpu数目未达到上限。 |
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 | 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 | QuotaExceeded.SecurityGroup | You've reached the limit on the number of SecurityGroup that you can create, please submit ticket to request an increase in quota. | 已达到可创建安全组的数量上限,迁移服务会创建临时安全组,请确保目的地区安全组数目未达到上限。 |
400 | QuotaExceeded.SelfImage | You've reached the limit on the number of image that you can create, please submit ticket to request an increase in quota. | 已达到可创建自定义镜像的数量上限,迁移服务会创建临时自定义镜像,请确保自定义镜像数目未达到上限。 |
400 | QuotaExceeded.Volume | You've reached the limit of volume that you can create, please submit ticket to request an increase in quota. | 已达到可创建的云盘容量上限,迁移服务会创建临时云盘,请确保目的地区该类型云盘容量未达到上限。 |
400 | QuotaExceeded.Vpc | You've reached the limit on the number of vpc that you can create, please submit ticket to request an increase in quota. | 已达到可创建私有网络的数量上限,迁移服务会创建临时私有网络,请确保目的地区私有网络数目未达到上限。 |
400 | MissingParameter.MigrationSourceId | The required parameter MigrationSourceId is not supplied. | 参数MigrationSourceId不能为空。 |
400 | InvalidTagKey.Malformed | The specified TagKey is malformed. | 指定的标签的键不合法。 |
400 | InvalidFilesystemType.Unsupported | The file system type does not support file sync type. | 源环境使用的文件系统不支持文件复制。 |
400 | InvalidInstanceChargeTypeForMigration.Unsupported | The destination instance charge type does not support migration. | 目的实例计费方式不支持迁移。 |
400 | InvalidInstanceStatusForMigration.Unsupported | The specified destination instance does not support migration. | 指定的目的实例不支持迁移。 |
400 | InvalidLVMStatus.Unsupported | The lvm status does not support file sync type. | 源环境存在LVM,不支持文件复制。 |
400 | InvalidMigrationCheckResult.Unsupported | The specified migration source check result is invalid, please make sure that completing migration source check before creating an migration job. | 迁移预检结果未通过,请创建迁移任务之前先确保迁移预检完成。 |
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 | InvalidProjectName.Malformed | The specified ProjectName is malformed. | 指定的ProjectName不合法。 |
400 | InvalidRegion.Malformed | The specified Region is malformed. | 指定的Region不合法。 |
400 | InvalidRsyncStatus.Unsupported | The rsync status does not support file sync type. | 源环境Rsync不满足文件复制要求,请确保Rsync存在且版本不小于3.1。 |
400 | InvalidSecurityGroupPermission.Conflict | The security group permission is invalid. | 迁移服务需要目的实例开启8080、22以及5986端口,请检查目的实例安全组规则。 |
400 | InvalidSubnetIdStatus | The specified subnet status error. | 指定的子网状态有误。 |
400 | InvalidSyncTypeForMigration.Unsupported | The specified migration job sync type does not support migration. | 指定迁移任务的复制类型不支持迁移。 |
400 | Insufficient.Balance | The request is denied due to the lack of balance. | 账户余额不足。 |
400 | InvalidTagValue.Malformed | The specified TagValue is malformed. | 指定的标签的值不合法。 |
400 | LimitExceeded.MaximumDiskSize | The size of disk exceeds the maximum limit. | 指定的迁移源盘大小超过最大限制。 |
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.MaximumSyncTimes | The number of specified SyncTimes exceeds the maximum limit. | 指定的SyncTimes超过最大限制。 |
400 | LimitExceeded.MaximumSystemDiskSize | The size of specified system disk exceeds the maximum limit | 指定的系统盘大小超过最大限制。 |
400 | LimitExceeded.MaximumTags | You've reached the limit on the number of tags that you can create. | 指定的标签数量超过最大限制。 |
400 | LimitExceeded.MinimumBandwidthLimit | The number of specified BandwidthLimit exceeds the minimum limit. | 指定的BandwidthLimit超过最小限制。 |
400 | LimitExceeded.MinimumPartitionSize | The number of specified PartitionSize exceeds the minimum limit. | 指定的PartitionSize超过最小限制。 |
400 | LimitExceeded.MinimumSyncInterval | The number of specified SyncInterval exceeds the minimum limit. | 指定的SyncInterval超过最小限制。 |
400 | LimitExceeded.MinimumSyncTimes | The number of specified SyncTimes exceeds the minimum limit. | 指定的SyncTimes超过最小限制。 |
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不能为空。 |
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. | 实例规格资源不足。 |