最近更新时间:2024.05.23 10:12:41
首次发布时间:2023.07.18 10:22:41
调用 DescribeMigrationSources 接口,查询迁移源信息。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeMigrationSources | 要执行的操作,取值:DescribeMigrationSources。 |
Version | String | 是 | 2020-04-01 | API的版本,取值:2020-04-01。 |
Order | String | 否 | Desc | 排序顺序,取值:
|
OrderByColumn | String | 否 | CreatedAt | 排序字段,取值:
|
PageNumber | Integer | 否 | 1 | 分页数。 |
PageSize | Integer | 否 | 10 | 页表大小。
|
ProjectName | String | 否 | project_a | 迁移源所属项目,一个迁移源只能归属于一个项目。
|
SourceId | String | 否 | s-3tiegs1y963vj0****** | 迁移源ID,可在导入迁移源时或调用本接口查询获取。 说明 根据迁移源ID查询迁移源信息时,需要传入该参数。 |
SourceName | String | 否 | 本地VM | 迁移源名称,最大长度为255个字符。 说明 根据迁移源名称查询迁移源信息时,需要传入该参数。 |
SourceState | String | 否 | Online | 迁移源状态,取值:
|
SourceType | String | 否 | Normal | 迁移源来源类型。取值:
|
TagFilters.N.Key | Array of String | 是 | TagFilters.1.Key=k1&Tags.2.Key=k2 | 根据标签查询资源时指定的标签键。
说明
|
TagFilters.N.Values.N | Array of String | 否 | TagFilters.1.Values.1=v1&TagFilters.1.Values.2=v2 | 根据标签查询资源时指定的标签值。
说明
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
PageNumber | Integer | 1 | 分页数。 |
PageSize | Integer | 10 | 页表大小。 |
Sources | Array of SourcesForDescribeMigrationSources | -- | 符合条件的迁移源信息。 |
TotalCount | Integer | 1 | 迁移源总数。 |
GET /?Action=DescribeMigrationSources&Version=2020-04-01 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: smc
{ "ResponseMetadata": { "RequestId": "202306021637410F150D*****", "Action": "DescribeMigrationSources", "Version": "2020-04-01", "Service": "smc", "Region": "cn-beijing" }, "Result": { "TotalCount": 1, "PageNumber": 1, "PageSize": 10, "Sources": [ { "SourceId": "s-ycg9hd3nfb8rx6****", "SourceName": "s-ycg9hd3nfb8r****", "Hostname": "localhost.localdomain", "CreatedAt": "2023-06-01T10:27:16+08:00", "SourceState": "Migrating", "PublicIpAddress": "119.x.xxx.xxx", "PrivateIpAddress": "172.xx.xx.xxx", "AgentVersion": "linux-1.4", "ProjectName": "project_a", "SourceType": "Normal", "SystemInfo": { "CPU": 1, "Memory": 1019027456, "CPUUsage": 4, "MemoryUsage": 47.86, "Architecture": "x86_64" }, "ImageInfo": { "OS": "Linux", "Platform": "CentOS", "PlatformVersion": "7.9.2009", "BootMode": "UEFI", "VirtualizationSystem": "", "KernelVersion": "3.10.0-1160.102.1.el7.x86_64" }, "InstanceInfo": { "InnerInstance": "true", "InstanceId": "i-3teco18f1w5a71****", "RegionId": "cn-beijing", "Virtio11Install": true, "BlkNoneCanInstall": true }, "DiskInfo": [ { "DiskIndex": 0, "DiskSize": 20, "Partitions": [ { "PartitionIndex": 0, "PartitionSize": 209715200, "Mountpoint": "/boot/efi", "FileSystemFormat": "vfat" }, { "PartitionIndex": 1, "PartitionSize": 1073741824, "Mountpoint": "/boot", "FileSystemFormat": "xfs" } ], "FileSystemFormat": "", "DiskName": "vda", "IsSystemDisk": true } ], "Tags": [ { "Key": "k1", "Value": "v1" } ], "LvmInfo": { "VgInfos": [] }, "LastMigrationJobInfo": { "DestinationType": "ECSInstance", "ProjectName": "project_a", "MigrationJobId": "job-ycg9hghuv7****", "MigrationJobName": "VMware迁移", "MigrationJobState": "Replicating" } } ] } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidOrder.Malformed | The specified Order is malformed. | 指定的Order不合法。 |
400 | InvalidOrderByColumn.Malformed | The specified OrderByColumn is malformed. | 指定的OrderByColumn不合法。 |
400 | InvalidProjectName.Malformed | The specified ProjectName is malformed. | 指定的ProjectName不合法。 |
400 | InvalidSourceName.Malformed | The specified SourceName is malformed. | 指定的SourceName不合法。 |
400 | InvalidSourceState.Malformed | The specified SourceState is malformed. | 指定的SourceState不合法。 |
400 | InvalidSourceType.Malformed | The specified SourceType is malformed. | 指定的SourceType不合法。 |
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.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. | 指定的标签过滤值超过最大限制。 |