You need to enable JavaScript to run this app.
文档中心
服务器迁移中心

服务器迁移中心

复制全文
下载 pdf
迁移任务
DescribeMigrationJobs - 查询迁移任务信息
复制全文
下载 pdf
DescribeMigrationJobs - 查询迁移任务信息
调用 DescribeMigrationJobs 接口,查询迁移任务信息。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:DescribeMigrationJobs​
要执行的操作,取值:DescribeMigrationJobs。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
MigrationSourceIds.N string[] 可选 示例值:MigrationSourceIds.1=s-3tiegs1y963vj0******&MigrationSourceIds.2=s-9ksguxl923******​
迁移源ID,传入后将按照迁移源筛选对应的迁移任务,最多支持50个ID。您可以调用DescribeMigrationSources接口查询获取。​
  • 参数 -N:表示迁移源的序号。​
  • 多个迁移源ID之间用&分隔。​
​
DestinationRegion string 可选 示例值:cn-beijing​
目标地域,最大长度为255个字符。您可以调用DescribeRegions接口查询获取。​
说明​
根据目的区域查询时,需要传入该参数。​
​
DestinationType.N string[] 可选 示例值:DestinationType.1=ECSInstance&DestinationType.2=ECSImage​
迁移目标类型,最多支持5个类型。取值:​
  • ECSInstance:云服务器实例。​
  • ECSImage:云服务器镜像。​
  • ECSSystem:云服务器操作系统。​
说明​
  • 参数 - N:表示迁移目标类型的序号。​
  • 多个DestinationType之间用&分隔。​
  • 根据迁移目标类型查询时,需要传入该参数。​
​
MigrationJobId string 可选 示例值:job-3tiegs1y963vj0******​
迁移任务ID。​
说明​
根据迁移任务ID查询时,需要传入该参数。​
​
MigrationJobName string 可选 示例值:VM migration to ECS​
迁移任务名,最大长度为255个字符。​
说明​
根据迁移任务名称查询时,需要传入该参数。​
​
MigrationJobState string 可选 示例值:Success​
迁移任务状态,取值:​
  • Preparing:准备中。​
  • Replicating:迁移中。​
  • Success:已完成。​
  • Failed:失败。​
  • Waiting:等待中。​
  • Cleaning:清理中。​
  • Terminated:已终止。​
  • Terminating:终止中。​
  • Warning:异常。​
  • Pausing:暂停中。​
  • Paused:已暂停。​
  • Pending:待开始。​
​
PageNumber integer 可选 示例值:1​
分页数。​
​
PageSize integer 可选 示例值:10​
页表大小。​
  • 取值范围:1~50​
  • 默认为:10​
​
ProjectName string 可选 示例值:project_a​
迁移任务所属项目,一个任务只能归属于一个项目。​
  • 只能包含字母、数字、下划线“_”、点“.”和中划线“-”。​
  • 长度限制在64个字符以内。​
​
TagFilters.N.Key string[] 可选 示例值:TagFilters.1.Key=k1​
根据标签查询资源时指定的标签键。​
  • 参数 - N:表示标签键的序号,取值范围:1~10。​
  • 多个标签键之间用&分隔,不允许重复。​
说明​
  • 不传则表示查询所有标签。​
  • 传入空字符串时,则返回错误码InvalidTagFilterKey.Malformed。​
​
TagFilters.N.Values.N string[] 可选 示例值:TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2​
根据标签查询资源时指定的标签值。​
  • 第一个N:表示标签键的序号,取值范围:1~10。​
  • 第二个N:表示标签值的序号,取值范围:1~3。​
  • 多个标签值之间用&分隔。​
说明​
  • 如果传入该参数,则必须先传入TagFilters.N.Key。​
  • 不传则表示查询同一标签键下的所有标签值。​
  • 传入空字符串时,表示查询标签值为空的标签。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
Jobs object[] 示例值:--​
符合条件的迁移任务信息。​
LvmInfo object 示例值:--​
迁移任务LVM信息。​
VgInfos object[] 示例值:--​
迁移任务卷组列表。​
Format string 示例值:lvm2​
逻辑卷组格式。​
​
VgName string 示例值:vg_01​
逻辑卷组名称。​
​
VgSize long 示例值:1019215872​
逻辑卷组大小,单位Bytes。​
​
VgUUID string 示例值:Y2apS5-w7yK-*****​
逻辑卷组UUID。​
​
PvInfos object[] 示例值:--​
逻辑卷组下物理卷信息列表。​
PvName string 示例值:/dev/vdb1​
物理卷名称。​
​
PvSize long 示例值:1019215872​
物理卷大小,单位Bytes。​
​
PvUUID string 示例值:h3ey9f-VJAi*****​
物理卷UUID。​
​
VgName string 示例值:vg_01​
物理卷所在卷组名称。​
​
​
LvInfos object[] 示例值:--​
逻辑卷组下逻辑卷信息列表。​
FsType string 示例值:--​
逻辑卷被格式化的文件系统类型。​
​
BlockDevices string[] 示例值:["/dev/vdb1"]​
逻辑卷使用的磁盘块设备列表。​
​
LvName string 示例值:lv01​
逻辑卷名称。​
​
LvPath string 示例值:/dev/vg_01/lv01​
逻辑卷路径。​
​
LvSize long 示例值:943718400​
逻辑卷大小,单位Bytes。​
​
LvUUID string 示例值:VlMqHc-iZfE-Vo*****​
逻辑卷UUID。​
​
LvUsedSize long 示例值:--​
逻辑卷已使用大小,单位Bytes。​
​
MountPoint string 示例值:--​
逻辑卷挂载点。​
​
VgName string 示例值:vg_01​
逻辑卷所在卷组名称。​
​
​
​
​
MigrationSourceInfo object 示例值:--​
迁移源信息。​
MigrationSourceName string 示例值:s-ydgrjgha*****​
迁移源主机名。​
​
SourceProjectName string 示例值:project_a​
迁移源所属项目。​
​
MigrationSourceOS string 示例值:Linux​
迁移源操作系统。取值:​
  • Windows。​
  • Linux。​
​
MigrationSourcePlatform string 示例值:CentOS​
迁移源操作系统平台。​
​
MigrationSourcePlatformVersion string 示例值:7.9​
迁移源操作系统版本。​
​
MigrationSourcePrivateIp string 示例值:192.xxx.x.x​
迁移源私网IP。​
​
MigrationSourcePublicIp string 示例值:10.2xx.xxx.xx​
迁移源公网IP。​
​
MigrationSourceState string 示例值:Offline​
迁移源状态,取值:​
  • Online:在线。​
  • Offline:离线。​
  • Migrating:迁移中。​
  • Error:异常。​
​
​
CreatedAt string 示例值:2024-11-05T16:14:03+08:00​
迁移任务创建时间。​
​
DestinationConfig object 示例值:--​
目标配置。​
AutoInstallBlkNone boolean 示例值:true​
是否自动为目标实例或目标镜像安装blk-none。取值:​
true:自动安装。​
false:不自动安装。​
​
AutoInstallVirtio11 boolean 示例值:true​
是否自动为目标实例或目标镜像安装Virtio1.1驱动。取值:​
true:自动安装。​
false:不自动安装。​
​
AutoReplicate boolean 示例值:false​
迁移任务通过预检后是否自动开始迁移。取值:​
  • false:不自动迁移。​
  • true:自动迁移。​
说明​
仅迁移到云服务器实例、云服务镜像时有效。​
​
DestinationSystem string 示例值:VeLinux10Centos​
目标操作系统。取值:​
  • Unknown:未知。​
  • VeLinux10Centos:表示迁移为veLinux 1.0 CentOS兼容版操作系统。​
​
DestinationType string 示例值:ECSInstance​
目标类型。​
​
ImageId string 示例值:image-3tefr6wgx63vj0****​
目标镜像ID。​
​
ImageName string 示例值:testImage​
目标镜像名称。​
​
InstanceId string 示例值:i-3tigy72q3u3vj0x2****​
目标实例ID。​
​
InstanceName string 示例值:instance-test​
目标实例名称。​
​
Region string 示例值:cn-beijing​
目标地域。​
​
​
FinishedAt string 示例值:2024-11-05T16:46:29+08:00​
迁移任务完成时间。​
​
LastSyncTime string 示例值:2024-11-05T16:14:03+08:00​
最近一次同步时间。​
​
MigrationJobDescription string 示例值:迁移本地虚拟机​
迁移任务描述。​
​
MigrationJobId string 示例值:job-3tiegs1y963vj0******​
迁移任务ID。​
​
MigrationJobName string 示例值:VM迁移至ECS​
迁移任务名。​
​
MigrationSourceId string 示例值:s-iegs1y963vj0******​
迁移源ID。​
​
MigrationSourceName string 示例值:s-iegs1y963vj0****​
迁移源名称。​
​
MigrationStateTips string 示例值:--​
迁移任务状态提示信息。​
​
NetworkConfig object 示例值:--​
网络迁移配置。​
BandwidthLimit integer 示例值:5​
网络传输带宽,单位Mbps。​
​
NetworkTransitionMode string 示例值:PublicNetwork​
网络传输模式。取值:​
  • PublicNetwork:公网传输。​
  • VPC:内网传输。​
​
SubnetId string 示例值:subnet-3tispp1nai4e8i****​
子网ID。​
​
TransferIP string 示例值:172.0.**.**​
网络传输IP。​
​
VpcId string 示例值:vpc-bp15zkdt37pq72zv****​
私有网络ID。​
​
​
Progress integer 示例值:10​
迁移任务进度,以百分比为单位,例如:10表示任务进度为10%。​
​
ProjectName string 示例值:project_a​
迁移任务所属项目。​
​
SourceProjectName string 示例值:project_a​
迁移任务对应的迁移源所属项目。​
​
SourceType string 示例值:Normal​
迁移源来源类型。取值:​
  • Normal:普通迁移。​
  • Batch:一键迁移。​
​
StartedAt string 示例值:2024-11-05T16:14:03+08:00​
迁移任务开始时间。​
​
State string 示例值:Success​
迁移任务状态。取值:​
  • Preparing:准备中。​
  • Replicating:迁移中。​
  • Success:已完成。​
  • Failed:失败。​
  • Waiting:等待中。​
  • Cleaning:清理中。​
  • Terminated:已终止。​
  • Terminating:终止中。​
  • Warning:异常。​
  • Pending:待开始。​
​
SyncConfig object 示例值:--​
迁移配置。​
SyncInterval integer 示例值:2​
增量同步时间间隔,单位小时。​
取值范围:1~168。​
​
SyncTimes integer 示例值:1​
增量同步次数。​
​
SyncType string 示例值:File​
复制类型。取值:​
  • File:文件复制。​
  • Block:块复制。​
​
TriggerLastSync boolean 示例值:true​
是否只进行一次全量同步。取值:​
  • true:表示仅进行一次全量数据同步,不进行增量数据同步。​
  • false:表示进行一次全量数据同步后,还将按SyncConfig.SyncInterval参数指定的间隔进行增量数据同步。​
​
​
SystemConfig object 示例值:--​
操作系统配置。​
SourceImageInfo object 示例值:--​
迁移前实例镜像信息。​
OS string 示例值:Linux​
操作系统。取值:​
  • Linux:表示实例使用Linux系列操作系统。​
  • Windows:表示实例使用Windows系列操作系统。​
​
Platform string 示例值:CentOS​
操作系统的发行版本。​
​
PlatformVersion string 示例值:7.6​
操作系统版本号。​
​
​
TargetImageInfo object 示例值:--​
迁移后实例镜像信息。​
OS string 示例值:Linux​
操作系统。取值:​
  • Linux:表示实例使用Linux系列操作系统。​
  • Windows:表示实例使用Windows系列操作系统。​
​
Platform string 示例值:CentOS​
操作系统的发行版本。​
​
PlatformVersion string 示例值:7.6​
操作系统版本号。​
​
​
​
Tags object[] 示例值:--​
资源的标签信息。​
Key string 示例值:Key=k1​
根据标签查询资源时指定的标签键。​
​
Value string 示例值:Value=v1​
根据标签查询资源时指定的标签值。​
​
​
TemporaryResources object[] 示例值:--​
临时资源信息。​
说明​
仅传入MigrationJobId(迁移任务ID)参数查询具体任务信息时,才会返回本参数。​
AssociatedResource object[] 示例值:--​
已绑定该临时资源的云资源。​
ResourceId string 示例值:i-3tigy72q3u3vj0x2****​
绑定该临时资源的云资源ID。​
​
ResourceType string 示例值:Instance​
绑定该临时资源的云资源类型。取值:​
  • Instance:实例。​
  • KeyPair:密钥对。​
  • Image:镜像。​
  • Volume:云盘。​
  • SecurityGroup:安全组。​
  • Subnet:子网。​
  • Vpc:私有网络。​
  • Eip:公网IP 。​
​
​
ProjectName string 示例值:default​
临时资源所属的项目。​
​
ResourceId string 示例值:kp-ybp0x6i30gep29******​
临时资源ID。​
​
ResourceName string 示例值:MigrationKey-job-yd0d5s8n*****​
临时资源名称。​
​
ResourceStatus string 示例值:Exist​
临时资源状态。取值:​
  • Exist:未删除。​
  • Deleted:已删除。​
​
ResourceType string 示例值:KeyPair​
临时资源类型。取值:​
  • Instance:实例。​
  • KeyPair:密钥对。​
  • Image:镜像。​
  • Volume:云盘。​
  • SecurityGroup:安全组。​
  • Subnet:子网。​
  • Vpc:私有网络。​
  • Eip:公网IP 。​
​
​
​
PageNumber integer 示例值:1​
分页数。​
​
PageSize integer 示例值:10​
页表大小。​
​
TotalCount integer 示例值:30​
迁移任务总数。​
​
​
​
请求示例​
​
GET /?Action=DescribeMigrationJobs&Version=2020-04-01&MigrationJobId=job-ycg7dvqn59b5oz**** HTTP/1.1​
Host: smc.volcengineapi.com​
Region: cn-beijing​
Service: smc​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202306051605204303A34A*****",​
"Action": "DescribeMigrationJobs",​
"Version": "2020-04-01",​
"Service": "smc",​
"Region": "cn-beijing"​
},​
"Result": {​
"TotalCount": 16,​
"PageNumber": 1,​
"PageSize": 10,​
"Jobs": [​
{​
"MigrationJobId": "job-ycg79lm7wg7grbxxxx",​
"MigrationJobName": "VM migration to ECS",​
"MigrationJobDescription": "",​
"SourceProjectName": "project_a",​
"CreatedAt": "2024-11-05T16:14:03+08:00",​
"StartedAt": "2024-11-05T16:14:03+08:00",​
"FinishedAt": "",​
"State": "Replicating",​
"Progress": 0,​
"MigrationSourceId": "s-ycg79jgyp8b5ozxxxx",​
"MigrationSourceName": "s-ycg79jgyp8b5oxxxx",​
"Tags": [​
{​
"Key": "k1",​
"Value": "v1"​
}​
],​
"DestinationConfig": {​
"AutoReplicate": false,​
"Region": "cn-beijing",​
"DestinationType": "ECSInstance",​
"InstanceId": "i-ycg4zh1r13ebgy4xxxx",​
"InstanceName": "VMwareMigrationTarget",​
"ImageId": "",​
"ImageName": "",​
"AutoInstallVirtio11": true,​
"AutoInstallBlkNone": true​
},​
"NetworkConfig": {​
"NetworkTransitionMode": "PublicNetwork",​
"BandwidthLimit": 0,​
"TransferIP": "180.xxx.xx.xxx",​
"VpcId": "",​
"SubnetId": ""​
},​
"SyncConfig": {​
"SyncInterval": 1,​
"TriggerLastSync": false,​
"SyncType": "Block",​
"HasSyncedTimes": ""​
},​
"SystemConfig": {​
"SourceImageInfo": {​
"OS": "Linux",​
"Platform": "CentOS",​
"PlatformVersion": "7.6"​
},​
"TargetImageInfo": {​
"OS": "Linux",​
"Platform": "veLinux",​
"PlatformVersion": "1.0"​
}​
},​
"LvmInfo": {​
"VgInfos": []​
},​
"TemporaryResources": [​
{​
"AssociatedResource": {​
"ResourceId": "i-3tigy72q3u3vj0x2****",​
"ResourceType": "Instance"​
},​
"ProjectName": "default",​
"ResourceId": "kp-ybp0x6i30gep29******",​
"ResourceName": "MigrationKey-job-yd0d5s8n*****",​
"ResourceStatus": "Exist",​
"ResourceType": "KeyPair"​
}​
],​
"MigrationSourceInfo": {​
"MigrationSourceState": "Error",​
"MigrationSourcePublicIp": "10.xxx.xxx.5",​
"MigrationSourcePrivateIp": "192.xxx.xx.2",​
"MigrationSourcePlatform": "CentOS",​
"MigrationSourcePlatformVersion": "7.9",​
"MigrationSourceOS": "Linux",​
"MigrationSourceName": "s-ydajtznkgpgh9xxfab55",​
"SourceProjectName": "default"​
},​
"MigrationStateTips": "",​
"LastSyncTime": "2024-11-05T16:14:03+08:00"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidDestinationRegion.Malformed​
The specified DestinationRegion is malformed.​
指定的DestinationRegion不合法。​
400​
InvalidMigrationJobName.Malformed​
The specified MigrationJobName is malformed.​
指定的MigrationJobName不合法。​
400​
InvalidMigrationJobState.Malformed​
The specified MigrationJobState is malformed.​
指定的MigrationJobState不合法。​
400​
InvalidProjectName.Malformed​
The specified ProjectName is malformed.​
指定的ProjectName不合法。​
400​
InvalidTagFilterKey.Conflict​
The specified TagFilterKey already exists.​
指定的过滤标签键已存在。​
400​
InvalidTagFilterKey.Malformed​
The specified TagFilterKey is malformed.​
指定的标签键不合法。​
400​
InvalidTagFilterValue.Malformed​
The specified TagFilterValue already exists.​
指定的过滤标签值已存在。​
400​
LimitExceeded.MaximumResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
指定的资源ID数量超过最大限制。​
400​
LimitExceeded.MaximumTagFilterKeys​
You've reached the limit on the number of TagFilterKeys that you can set.​
指定的标签过滤键超过最大限制。​
400​
LimitExceeded.MaximumTagFilterResults​
You've reached the limit on the number of resources that you can describe by TagFilters.​
通过标签过滤出的资源数量超过上限。​
400​
LimitExceeded.MaximumTagFilterValues​
You've reached the limit on the number of TagFilterValues that you can set.​
指定的标签过滤值超过最大限制。​
404​
InvalidMigrationSource.NotFound​
The specified migration source does not exist.​
指定的迁移源不存在。​
​
​
最近更新时间:2025.11.24 10:37:51
这个页面对您有帮助吗?
有用
有用
无用
无用