全部产品
Search
文档中心

服务器迁移中心:DescribeSourceServers - 查询一个或多个迁移源信息

更新时间:Mar 03, 2024

调用DescribeSourceServers查询一个或多个迁移源信息。

接口说明

请求参数的作用类似于一个过滤器,过滤器为逻辑与(AND)关系。如果某一参数为空,则过滤器不起作用。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
smc:DescribeSourceServersRead
  • SourceServer
    acs:smc:{#regionId}:{#accountId}:sourceserver/{#SourceServerId}

请求参数

名称类型必填描述示例值
JobIdstring

迁移任务 ID。

j-bp19vlwm0tyigbmj****
Statestring

迁移源状态。取值范围:

  • Unavailable:不可用,包括离线和出错。
  • Available:在线。
  • InUse:迁移中。
  • Deleting:删除中。
Available
Namestring

迁移源名称。长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以 http://和 https://开头。可以包含数字、半角冒号(:)、下划线(_)或者连字符(-)。

默认值:空

testSourceServerName
PageNumberinteger

返回的迁移源列表的页码。起始值:1。

默认值:1。

1
PageSizeinteger

分页查询时设置的每页行数。最大值:50。

默认值:10。

10
SourceIdarray

迁移源 ID,可以输入多个。

string

迁移源 ID,可以输入多个。

s-bp1e2fsl57knvuug****
ResourceGroupIdstring

资源组 ID。

rg-acfmw3ty5y7****
Tagobject []

标签。

Keystring

为 SMC 资源指定的标签键。N 的取值范围:1~20

一旦传入该值,则不允许为空字符串。最多支持 64 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。

TestKey
Valuestring

为 SMC 资源指定的标签值。N 的取值范围:1~20。

一旦传入该值,可以为空字符串。最多支持 64 个字符,不能包含 http://或者 https://。

TestValue

返回参数

名称类型描述示例值
object

信息集合。

SourceServersobject []

迁移源数组。

CreationTimestring

迁移源的注册时间。

2019-06-27T02:58:09Z
HeartbeatRateinteger

SMC 客户端(SMC Agent)心跳频率。单位:秒。

30
Statestring

迁移源状态。

InUse
DataDisksobject []

迁移源的数据盘数组。

Indexinteger

数据盘顺序。

1
Sizeinteger

数据盘 N 大小。单位:GiB。

20
Partsobject []

数据盘分区信息。

CanBlockboolean

数据盘分区是否支持块复制。

false
SizeByteslong

数据盘分区大小。单位:Byte。

21474836480
Needboolean

数据盘分区是否必须选择。

false
Devicestring

数据盘分区设备标识。

1_0
Pathstring

数据盘分区路径。

/home/data
Pathstring

数据盘 N 路径。

/home/data
SystemDiskPartsobject []

系统盘分区信息。

CanBlockboolean

系统盘分区是否支持块复制。

true
SizeByteslong

系统盘分区大小。单位:Byte。

254803968
Needboolean

系统盘分区是否必须选择。

true
Devicestring

系统盘分区设备标识符。

0_0
Pathstring

系统盘分区路径。

/boot
KernelLevelinteger

内核版本级别。

1
SourceIdstring

迁移源 ID。

s-bp1e2fsl57knvuug****
AgentVersionstring

SMC 客户端版本号。

1.5.2.3
StatusInfostring

迁移源状态详细信息。该参数在迁移源状态为异常时返回。JSON 格式键值对,如:

error_code 错误码
error_msg 错误信息
{"error_code": "S1", "error_msg": "Rsync not found. Please install rsync."}
SystemDiskSizeinteger

迁移源的系统盘大小。单位:GiB

40
Descriptionstring

迁移源描述。

Server Source Imported By GotoAliyun.
ErrorCodestring

迁移源状态错误码。

SourceServer.Offline
JobIdstring

最近一次的迁移任务 ID。

j-bp19vlwm0tyigbmj****
Platformstring

迁移源的系统平台。

OpenSUSE
ReplicationDriverstring

复制驱动器。默认值:SMT(迁云工具)

SMT
Namestring

迁移源的名称。

SourceServerName
SystemInfostring

迁移源系统信息。JSON 格式键值对,可扩展,键值固定。大小不超过 1 KB。如:

agent_mode:运行模式。
agent_type:运行类型。
client_type:客户端类型。
hostname :主机名。
ipv4:IPv4 地址。
ipv6: IPv6 地址。
cores:CPU 核数。
cpu_usage: CPU 使用率。
memory:内存。
memory_usage:内存使用率。
{\"agent_mode\":\"daemon\",\"agent_type\":\"aliyun\",\"client_type\":\"\",\"cores\":\"2\",\"cpu_usage\":\"0.00\",\"hostname\":\"ixxxxxxxxxx\",\"ipv4\":\"10.0.0.1\",\"memory\":\"8.00\",\"memory_usage\":\"3.61\"}
Architecturestring

迁移源的系统架构。

x86_64
ResourceGroupIdstring

资源组 ID。

rg-acfmw3ty5y7****
Tagsobject []

标签信息。

Keystring

为 SMC 资源指定的标签键。N 的取值范围:1~20。

一旦传入该值,则不允许为空字符串。最多支持 64 个字符,不能以 aliyun 和 acs:开头,不能包含 http://或者 https://。

TestKey
Valuestring

为 SMC 资源指定的标签值。N 的取值范围:1~20。

一旦传入该值,可以为空字符串。最多支持 64 个字符,不能包含 http://或者 https://。

TestValue
TotalCountinteger

迁移源总数。

1
PageSizeinteger

每页行数。

10
RequestIdstring

请求 ID。

410E6073-66D0-45D3-AB3E-4DC3F5E4****
PageNumberinteger

迁移源列表的页码。

1

示例

正常返回示例

JSON格式

{
  "SourceServers": {
    "SourceServer": [
      {
        "CreationTime": "2019-06-27T02:58:09Z",
        "HeartbeatRate": 30,
        "State": "InUse",
        "DataDisks": {
          "DataDisk": [
            {
              "Index": 1,
              "Size": 20,
              "Parts": {
                "Part": [
                  {
                    "CanBlock": false,
                    "SizeBytes": 21474836480,
                    "Need": false,
                    "Device": "1_0",
                    "Path": "/home/data"
                  }
                ]
              },
              "Path": "/home/data"
            }
          ]
        },
        "SystemDiskParts": {
          "SystemDiskPart": [
            {
              "CanBlock": true,
              "SizeBytes": 254803968,
              "Need": true,
              "Device": "0_0",
              "Path": "/boot"
            }
          ]
        },
        "KernelLevel": 1,
        "SourceId": "s-bp1e2fsl57knvuug****",
        "AgentVersion": "1.5.2.3",
        "StatusInfo": "{\"error_code\": \"S1\", \"error_msg\": \"Rsync not found. Please install rsync.\"}",
        "SystemDiskSize": 40,
        "Description": "Server Source Imported By GotoAliyun.",
        "ErrorCode": "SourceServer.Offline",
        "JobId": "j-bp19vlwm0tyigbmj****",
        "Platform": "OpenSUSE",
        "ReplicationDriver": "SMT",
        "Name": "SourceServerName",
        "SystemInfo": "{\\\"agent_mode\\\":\\\"daemon\\\",\\\"agent_type\\\":\\\"aliyun\\\",\\\"client_type\\\":\\\"\\\",\\\"cores\\\":\\\"2\\\",\\\"cpu_usage\\\":\\\"0.00\\\",\\\"hostname\\\":\\\"ixxxxxxxxxx\\\",\\\"ipv4\\\":\\\"10.0.0.1\\\",\\\"memory\\\":\\\"8.00\\\",\\\"memory_usage\\\":\\\"3.61\\\"}",
        "Architecture": "x86_64",
        "ResourceGroupId": "rg-acfmw3ty5y7****",
        "Tags": {
          "Tag": [
            {
              "Key": "TestKey",
              "Value": "TestValue"
            }
          ]
        }
      }
    ]
  },
  "TotalCount": 1,
  "PageSize": 10,
  "RequestId": "410E6073-66D0-45D3-AB3E-4DC3F5E4****",
  "PageNumber": 1
}

错误码

HTTP status code错误码错误信息描述
403Forbidden.UnauthorizedA required authorization for the specified action is not supplied.用户未授权操作指定的资源。
500InternalErrorAn error occurred while processing your request. Please try again. If the problem still exists, please submit a ticket.内部错误,请重试。如果多次尝试失败,请提交工单。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-07-28OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:403
    删除错误码:500