
# 查询指定ID的源端服务器 - ShowServer
#### 功能介绍
迁移Agent将源端服务器信息上报到主机迁移服务后，主机迁移服务会对迁移的可行性进行检测，该接口返回源端服务器的基本信息和检查结果。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-sms/sms_api_0007.html)。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-sms/sms_api_8001.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项            | 访问级别 | 资源类型（\*为必须） | 条件键                   | 别名                     | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | sms:server:get | Read | server \*   | -                     | sms:server:queryServer | -      |
  | sms:server:get | Read | -           | g:EnterpriseProjectId | sms:server:queryServer | -      |
     
  
 
#### URI
GET /v3/sources/{source_id}
表1路径参数 
| 参数        | 是否必选 | 参数类型   | 描述                                                                                                  |
|:---|:---|:---|:---|
| source_id | 是    | String | 源端服务器在主机迁移服务中的ID 最小长度：**1** 最大长度：**36** |
   
#### 请求参数
表2请求Header参数 
| 参数           | 是否必选 | 参数类型   | 描述                                                                                                                                                                            |
|:---|:---|:---|:---|
| X-Auth-Token | 是    | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 最小长度：**1** 最大长度：**16384** |
   
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数                    | 参数类型                                                                        | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| id                    | String                                                                      | 源端服务器ID 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ip                    | String                                                                      | 源端服务器的IP 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| name                  | String                                                                      | 用来区分不同源端服务器的名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| hostname              | String                                                                      | 源端主机名，注册源端必选，更新非必选 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| enterprise_project_id | String                                                                      | 企业项目ID 最小长度：**1** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| add_date              | Long                                                                        | 源端服务器注册的时间 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| os_type               | String                                                                      | 源端服务器的OS类型，分为Windows和Linux，注册必选，更新非必选 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| os_version            | String                                                                      | 操作系统版本，注册必选，更新非必选 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| oem_system            | Boolean                                                                     | 是否是OEM操作系统(Windows)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| state                 | String                                                                      | 源端服务器状态 unavailable：环境校验不通过 waiting：等待 initialize：初始化 replicate：复制 syncing：持续同步 stopping：暂停中 stopped：已暂停 skipping：跳过中 deleting：删除中 clearing: 清理快照资源中 cleared：清理快照资源完成 clearfailed：清理快照资源失败 premigready：迁移演练就绪 premiged：迁移演练完成 premigfailed：迁移演练失败 cloning：等待克隆完成 cutovering：启动目的端中 finished：启动目的端完成 error：错误 枚举值： - **unavailable**   - **waiting**   - **initialize**   - **replicate**   - **syncing**   - **stopping**   - **stopped**   - **skipping**   - **deleting**   - **clearing**   - **cleared**   - **clearfailed**   - **premigready**   - **premiged**   - **premigfailed**   - **cloning**   - **cutovering**   - **finished**   - **error**    |
| connected             | Boolean                                                                     | 与Agent连接状态                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| firmware              | String                                                                      | 源端服务器启动类型，如BIOS或者UEFI 枚举值： - **BIOS**   - **UEFI**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| init_target_server    | [InitTargetServer] object           | 推荐的目的端服务器配置                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| cpu_quantity          | Integer                                                                     | 源端CPU核心数 最小值：**0** 最大值：**65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| memory                | Long                                                                        | 源端服务器物理内存大小，单位MB 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| current_task          | [TaskByServerSource] object       | 源端列表中关联的任务                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| disks                 | Array of [ServerDisk] objects             | 源端服务器磁盘信息 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| volume_groups         | Array of [VolumeGroups] objects         | 源端服务器的卷组信息，Linux必选，如果没有卷组，输入\[\] 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| btrfs_list            | Array of [BtrfsFileSystem] objects   | Linux 必选，源端的Btrfs信息。如果源端不存在Btrfs，则为\[\] 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| networks              | Array of [NetWork] objects                   | 源端服务器的网卡信息 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| checks                | Array of [EnvironmentCheck] objects | 源端环境校验信息 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| migration_cycle       | String                                                                      | 迁移周期 cutovering:启动目的端中 cutovered:启动目的端完成 checking:检查中 setting:设置中 replicating:复制中 syncing:同步中 最小长度：**0** 最大长度：**255** 枚举值： - **cutovering**   - **cutovered**   - **checking**   - **setting**   - **replicating**   - **syncing**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| state_action_time     | Long                                                                        | 源端状态（state）上次发生变化的时间戳 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| replicatesize         | Long                                                                        | 已经完成迁移的大小（B） 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| totalsize             | Long                                                                        | 需要迁移的数据量总大小（B） 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| last_visit_time       | Long                                                                        | agent上一次连接状态发生变化的时间戳 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| stage_action_time     | Long                                                                        | 迁移周期（migration_cycle）上一次变化的时间戳 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| agent_version         | String                                                                      | Agent版本信息 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| has_tc                | Boolean                                                                     | 是否安装tc组件，Linux系统此参数为必选                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| start_type            | String                                                                      | 启动方式 可以取值MANUAL、AUTO或者空，不进行校验。 默认值取值MANUAL，其余则表示从MGC平台启动 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
   
 表4InitTargetServer 
| 参数            | 参数类型                                                                            | 描述                                                                     |
|:---|:---|:---|
| disks         | Array of [DiskIntargetServer] objects | 推荐的目的端服务器的磁盘信息 数组长度：**0 - 65535**        |
| volume_groups | Array of [VolumeGroups] objects             | Linux必选，如果没有卷组，输入\[\] 数组长度：**0 - 65535** |
   
 表5DiskIntargetServer 
| 参数               | 参数类型                                                                      | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| name             | String                                                                    | 磁盘名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| size             | Long                                                                      | 磁盘大小，单位：字节 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| device_use       | String                                                                    | 磁盘的作用 BOOT：BOOT设备 OS：系统设备 NORMAL:平常 最小长度：**0** 最大长度：**255** 枚举值： - **BOOT**   - **OS**   - **NORMAL**    |
| used_size        | Long                                                                      | 磁盘已使用大小，以字节为单位 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| physical_volumes | Array of [PhysicalVolumes] objects | 物理卷信息 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
   
 表6PhysicalVolumes 
| 参数          | 参数类型    | 描述                                                                                                            |
|:---|:---|:---|
| device_use  | String  | 分区类型，普通分区，启动分区，系统分区 最小长度：**0** 最大长度：**255**       |
| file_system | String  | 文件系统类型 最小长度：**0** 最大长度：**255**                    |
| index       | Integer | 顺序 最小值：**0** 最大值：**2147483647**                   |
| mount_point | String  | 挂载点 最小长度：**0** 最大长度：**255**                       |
| name        | String  | 名称，windows表示盘符，Linux表示设备号 最小长度：**0** 最大长度：**255** |
| size        | Long    | 大小 最小值：**0** 最大值：**9223372036854775807**          |
| inode_size  | Long    | inode数量 最小值：**0** 最大值：**9223372036854775807**     |
| used_size   | Long    | 使用大小 最小值：**0** 最大值：**9223372036854775807**        |
| uuid        | String  | GUID，可从源端查询 最小长度：**0** 最大长度：**255**               |
   
 表7TaskByServerSource 
| 参数                  | 参数类型                                                              | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|
| id                  | String                                                            | 任务ID 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| name                | String                                                            | 任务名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| type                | String                                                            | 迁移项目类型 MIGRATE_BLOCK:块级迁移 MIGRATE_FILE:文件级迁移 枚举值： - **MIGRATE_BLOCK**   - **MIGRATE_FILE**                                                                                                                                                                                                                                                                                                                               |
| state               | String                                                            | 任务状态 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| start_date          | Long                                                              | 开始时间 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| speed_limit         | Integer                                                           | 限速 最小值：**0** 最大值：**10000**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| migrate_speed       | Double                                                            | 迁移速率 最小值：**0** 最大值：**10000**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| start_target_server | Boolean                                                           | 是否启动虚拟机                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| vm_template_id      | String                                                            | 虚拟机模板ID 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| region_id           | String                                                            | region_id 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| project_name        | String                                                            | 项目名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| project_id          | String                                                            | 项目ID 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| target_server       | [TargetServerById] object | 目的端                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| log_collect_status  | String                                                            | 日志收集状态 INIT:就绪 UPLOADING:上传中 UPLOAD_FAIL:上传失败 UPLOADED:已上传 枚举值： - **INIT**   - **UPLOADING**   - **UPLOAD_FAIL**   - **UPLOADED**    |
| exist_server        | Boolean                                                           | 是否使用已有虚拟机                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| use_public_ip       | Boolean                                                           | 是否使用公网IP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| clone_server        | [CloneServer] object           | 克隆服务器类                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| subtask_info        | String                                                            | 当前子任务及进度 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
 表8TargetServerById 
| 参数    | 参数类型   | 描述                                                                                           |
|:---|:---|:---|
| vm_id | String | 目的端服务器ID 最小长度：**0** 最大长度：**255** |
| name  | String | 目的端服务器名称 最小长度：**0** 最大长度：**255** |
   
 表9CloneServer 
| 参数          | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|
| vm_id       | String | 克隆服务器ID 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| name        | String | 克隆虚拟机的名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| clone_error | String | 克隆错误信息 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| clone_state | String | 克隆状态 NOT_READY: 未准备好 READY: 就绪 PREPARING: 准备创建中 CREATING: 创建中 ERROR: 克隆错误 FINISHED: 克隆结束 枚举值： - **NOT_READY**   - **READY**   - **PREPARING**   - **CREATING**   - **ERROR**   - **FINISHED**    |
| error_msg   | String | 克隆错误信息描述 最小长度：**0** 最大长度：**1024**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
   
 表10ServerDisk 
| 参数               | 参数类型                                                                    | 描述                                                                                                                                                                                                                                                                                                                                                                        |
|:---|:---|:---|
| name             | String                                                                  | 磁盘名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                  |
| partition_style  | String                                                                  | 磁盘的分区类型，添加源端时源端磁盘必选，否则无法通过后续环境检查 （非枚举数据，来源于EVS服务） 常见类型如：MBR：主启动记录分区，GPT：Guid Partition Table，全局分区表。 详细类型请参考EVS服务API文档中"MBR和GPT分区形式有何区别"部分描述 最小长度：**0** 最大长度：**255**                                                 |
| device_use       | String                                                                  | 磁盘类型。 无强约束，可为空值，常见取值如下 NORMAL：平常 OS：系统设备 BOOT：BOOT设备 VOLUME_GROUP：VolumeGroup组成设备 BTRFS：BTRFS组成设备 最小长度：**0** 最大长度：**255** |
| size             | Long                                                                    | 磁盘总大小，以字节为单位 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                            |
| used_size        | Long                                                                    | 磁盘已使用大小，以字节为单位 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                          |
| physical_volumes | Array of [PhysicalVolume] objects | 磁盘上的物理分区信息 数组长度：**0 - 50**                                                                                                                                                                                                                                                                                                                  |
| os_disk          | Boolean                                                                 | 是否为系统盘                                                                                                                                                                                                                                                                                                                                                                    |
| relation_name    | String                                                                  | Linux系统 目的端ECS中与源端关联的磁盘名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                             |
| inode_size       | Integer                                                                 | inode大小 最小值：**0** 最大值：**2147483647**                                                                                                                                                                                                                                                                          |
   
 表11PhysicalVolume 
| 参数               | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                        |
|:---|:---|:---|
| device_use       | String  | 磁盘类型。 无强约束，可为空值，常见取值如下 NORMAL：平常 OS：系统设备 BOOT：BOOT设备 VOLUME_GROUP：VolumeGroup组成设备 BTRFS：BTRFS组成设备 最小长度：**0** 最大长度：**255** |
| file_system      | String  | 文件系统类型 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                |
| index            | Integer | 顺序 最小值：**0** 最大值：**2147483647**                                                                                                                                                                                                                                                                               |
| mount_point      | String  | 挂载点 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                   |
| name             | String  | 名称，windows表示盘符，Linux表示设备号 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                             |
| size             | Long    | 大小 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                      |
| used_size        | Long    | 使用大小 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                    |
| inode_size       | Integer | inode数量 最小值：**0** 最大值：**2147483647**                                                                                                                                                                                                                                                                          |
| inode_nums       | Long    | inode节点数量 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                               |
| uuid             | String  | GUID，可从源端查询 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                           |
| size_per_cluster | Integer | 每个cluster大小 最小值：**0** 最大值：**2147483647**                                                                                                                                                                                                                                                                      |
   
 表12VolumeGroups 
| 参数              | 参数类型                                                                    | 描述                                                                                                     |
|:---|:---|:---|
| components      | String                                                                  | Pv信息 最小长度：**0** 最大长度：**255**               |
| free_size       | Long                                                                    | 剩余空间 最小值：**0** 最大值：**9223372036854775807** |
| logical_volumes | Array of [LogicalVolumes] objects | lv信息 数组长度：**0 - 50**                                                     |
| name            | String                                                                  | 名称 最小长度：**0** 最大长度：**255**                 |
| size            | Long                                                                    | 大小 最小值：**0** 最大值：**9223372036854775807**   |
   
 表13LogicalVolumes 
| 参数          | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| block_count | Integer | 块数量 最小值：**0** 最大值：**2147483647** 缺省值：**0**                                                                                                                                                                                                                                     |
| block_size  | Long    | 块大小 最小值：**0** 最大值：**1048576** 缺省值：**0**                                                                                                                                                                                                                                        |
| file_system | String  | 文件系统 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                 |
| inode_size  | Integer | inode数量 最小值：**0** 最大值：**2147483647**                                                                                                                                                                                                                                                                         |
| inode_nums  | Long    | inode节点数量 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                              |
| device_use  | String  | 分区类型 无强约束，可为空值，常见取值如下 NORMAL：平常 OS：系统设备 BOOT：BOOT设备 VOLUME_GROUP：VolumeGroup组成设备 BTRFS：BTRFS组成设备 最小长度：**0** 最大长度：**255** |
| mount_point | String  | 挂载点 最小长度：**0** 最大长度：**256**                                                                                                                                                                                                                                                                                  |
| name        | String  | 名称 最小长度：**0** 最大长度：**1024**                                                                                                                                                                                                                                                                                  |
| size        | Long    | 大小 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                     |
| used_size   | Long    | 使用大小 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                   |
| free_size   | Long    | 剩余空间 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                   |
   
 表14BtrfsFileSystem 
| 参数                       | 参数类型                                                                    | 描述                                                                                                              |
|:---|:---|:---|
| name                     | String                                                                  | 文件系统名称 最小长度：**0** 最大长度：**255**                      |
| label                    | String                                                                  | 文件系统标签，若无标签为空字符串 最小长度：**0** 最大长度：**255**            |
| uuid                     | String                                                                  | 文件系统的uuid 最小长度：**0** 最大长度：**255**                   |
| device                   | String                                                                  | btrfs包含的设备名称 最小长度：**0** 最大长度：**255**                |
| size                     | Long                                                                    | 文件系统数据占用大小 最小值：**0** 最大值：**9223372036854775807**    |
| nodesize                 | Long                                                                    | btrfs节点大小 最小值：**0** 最大值：**9223372036854775807**     |
| sectorsize               | Integer                                                                 | 扇区大小 最小值：**0** 最大值：**2147483647**                   |
| data_profile             | String                                                                  | 数据配置（RAD） 最小长度：**0** 最大长度：**255**                   |
| system_profile           | String                                                                  | 文件系统配置（RAD） 最小长度：**0** 最大长度：**255**                 |
| metadata_profile         | String                                                                  | 元数据配置（RAD） 最小长度：**0** 最大长度：**255**                  |
| global_reserve1          | String                                                                  | Btrfs文件系统信息 最小长度：**0** 最大长度：**255**                 |
| g_vol_used_size          | Long                                                                    | Btrfs卷已使用空间大小 最小值：**0** 最大值：**9223372036854775807** |
| default_subvolid         | String                                                                  | 默认子卷ID 最小长度：**0** 最大长度：**255**                      |
| default_subvol_name      | String                                                                  | 默认子卷名称 最小长度：**0** 最大长度：**255**                      |
| default_subvol_mountpath | String                                                                  | 默认子卷挂载路径/BTRFS文件系统的挂载路径 最小长度：**0** 最大长度：**255**     |
| subvolumn                | Array of [BtrfsSubvolumn] objects | 子卷信息 数组长度：**0 - 65535**                                                           |
   
 表15BtrfsSubvolumn 
| 参数                | 参数类型   | 描述                                                                                          |
|:---|:---|:---|
| uuid              | String | 父卷的uuid 最小长度：**0** 最大长度：**255** |
| is_snapshot       | String | 子卷是否为快照 最小长度：**0** 最大长度：**255** |
| subvol_id         | String | 子卷的ID 最小长度：**0** 最大长度：**255**   |
| parent_id         | String | 父卷ID 最小长度：**0** 最大长度：**255**    |
| subvol_name       | String | 子卷的名称 最小长度：**0** 最大长度：**255**   |
| subvol_mount_path | String | 子卷的挂载路径 最小长度：**0** 最大长度：**255** |
   
 表16NetWork 
| 参数      | 参数类型    | 描述                                                                                                      |
|:---|:---|:---|
| name    | String  | 网卡的名称 最小长度：**0** 最大长度：**255**               |
| ip      | String  | 该网卡绑定的IP 最小长度：**0** 最大长度：**255**            |
| ipv6    | String  | IPv6地址 最小长度：**0** 最大长度：**255**              |
| netmask | String  | 掩码 最小长度：**0** 最大长度：**255**                  |
| gateway | String  | 网关 最小长度：**0** 最大长度：**255**                  |
| mtu     | Integer | Linux必选，网卡的MTU 最小值：**0** 最大值：**2147483647** |
| mac     | String  | 列表中第一个Mac地址必须非空 最小长度：**0** 最大长度：**255**     |
| id      | String  | 数据库ID 最小长度：**0** 最大长度：**255**               |
   
 表17EnvironmentCheck 
| 参数            | 参数类型             | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| id            | Long             | 该检查项的ID 最小值：**0** 最大值：**9223372036854775807**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| params        | Array of strings | 参数 最小长度：**0** 最大长度：**255** 数组长度：**0 - 65535**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| name          | String           | 检查项名称 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| result        | String           | 检查结果 OK：检查通过 WARN：警告 ERROR:检查不通过 最小长度：**0** 最大长度：**255** 枚举值： - **OK**   - **WARN**   - **ERROR**    |
| error_code    | String           | 检查不通过的错误码 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| error_or_warn | String           | 检查的错误或者警告 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| error_params  | String           | 检查不通过的错误参数 最小长度：**0** 最大长度：**255**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
**状态码：403**
表18响应Body参数 
| 参数                            | 参数类型                                                      | 描述                                                                                                                                       |
|:---|:---|:---|
| error_code                    | String                                                    | 错误代码 最小长度：**0** 最大长度：**255**                                                 |
| error_msg                     | String                                                    | 错误信息 最小长度：**0** 最大长度：**255**                                                 |
| encoded_authorization_message | String                                                    | 加密授权信息 最小长度：**0** 最大长度：**65535**                                             |
| error_param                   | Array of strings                                          | 错误参数 最小长度：**0** 最大长度：**65535** 数组长度：**1 - 20** |
| details                       | Array of [details] objects | 详细错误信息 数组长度：**1 - 20**                                                                                     |
   
 表19details 
| 参数         | 参数类型   | 描述                                                                                            |
|:---|:---|:---|
| error_code | String | SMS错误代码 最小长度：**0** 最大长度：**65535** |
| error_msg  | String | SMS错误信息 最小长度：**0** 最大长度：**65535** |
   
#### 请求示例
查询ID为211d7878-d7ba-4cac-acf1-a02ccfb8xxxx的源端信息
```
GET https://{endpoint}/v3/sources/211d7878-d7ba-4cac-acf1-a02ccfb8xxxx
X-Auth-Token: XXXX
```
#### 响应示例
**状态码：200**
查询指定ID的源端服务器成功
```
{
  "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
  "ip" : "192.168.0.154",
  "name" : "sms-win16",
  "hostname" : "sms-win16",
  "add_date" : 1598435769000,
  "os_type" : "WINDOWS",
  "os_version" : "WINDOWS2016_64BIT",
  "oem_system" : false,
  "state" : "initialize",
  "connected" : true,
  "firmware" : "BIOS",
  "cpu_quantity" : 1,
  "memory" : 2146553856,
  "current_task" : {
    "id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
    "name" : "MigrationTask",
    "type" : "MIGRATE_BLOCK",
    "state" : "RUNNING",
    "speed_limit" : 0,
    "start_target_server" : true,
    "vm_template_id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
    "region_id" : "region_id",
    "project_name" : "project_name",
    "project_id" : "xxxxxxxxxxxxxxxxxxxxxxxx00000001",
    "target_server" : {
      "vm_id" : "",
      "name" : ""
    },
    "log_collect_status" : "INIT",
    "exist_server" : false,
    "use_public_ip" : true,
    "clone_server" : null
  },
  "disks" : [ {
    "name" : "Disk 0",
    "relation_name" : null,
    "partition_style" : "MBR",
    "size" : 42949672960,
    "used_size" : 42947575808,
    "device_use" : "BOOT",
    "os_disk" : false,
    "physical_volumes" : [ {
      "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-100000000000}\\",
      "index" : 1,
      "name" : "(Reserved)",
      "device_use" : "BOOT",
      "file_system" : "NTFS",
      "mount_point" : null,
      "size" : 524288000,
      "used_size" : 410275840
    }, {
      "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-501f00000000}\\",
      "index" : 2,
      "name" : "C:\\",
      "device_use" : "OS",
      "file_system" : "NTFS",
      "mount_point" : null,
      "size" : 42423287808,
      "used_size" : 23170301952
    } ]
  } ],
  "volume_groups" : [ ],
  "networks" : [ {
    "name" : null,
    "ip" : null,
    "netmask" : null,
    "gateway" : null,
    "mtu" : 0,
    "mac" : "dac20cd4f6318ca6458673b0046ddcc89e936df292d0806cb868ba63a817853c"
  } ],
  "checks" : [ {
    "id" : 524146,
    "params" : [ "" ],
    "name" : "OS_VERSION",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524147,
    "params" : [ "" ],
    "name" : "FIRMWARE",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524148,
    "params" : [ "" ],
    "name" : "CPU",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524149,
    "params" : [ "" ],
    "name" : "MEMORY",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524150,
    "params" : [ "" ],
    "name" : "SYSTEM_ROOT",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524151,
    "params" : [ "" ],
    "name" : "PARTITION_STYLE",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524152,
    "params" : [ "" ],
    "name" : "FILE_SYSTEM",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524153,
    "params" : [ "" ],
    "name" : "FREE_SPACE",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524154,
    "params" : [ "" ],
    "name" : "OEM_SYSTEM",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524155,
    "params" : [ "" ],
    "name" : "DRIVER_FILE",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524156,
    "params" : [ "" ],
    "name" : "SERVICE",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  }, {
    "id" : 524157,
    "params" : [ "" ],
    "name" : "ACCOUNT_RIGHTS",
    "result" : "OK",
    "error_code" : null,
    "error_or_warn" : null,
    "error_params" : ""
  } ],
  "init_target_server" : {
    "disks" : [ {
      "name" : "Disk 0",
      "size" : 42949672960,
      "used_size" : 42947575808,
      "device_use" : "OS",
      "physical_volumes" : [ {
        "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-100000000000}\\",
        "index" : 1,
        "name" : "(Reserved)",
        "device_use" : "BOOT",
        "file_system" : "NTFS",
        "mount_point" : null,
        "size" : 524288000,
        "used_size" : 410275840
      }, {
        "uuid" : "\\\\?\\Volume{586b7157-0000-0000-0000-501f00000000}\\",
        "index" : 2,
        "name" : "C:\\",
        "device_use" : "OS",
        "file_system" : "NTFS",
        "mount_point" : null,
        "size" : 42423287808,
        "used_size" : 23170301952
      } ]
    } ],
    "volume_groups" : [ ]
  },
  "replicatesize" : 0,
  "stage_action_time" : 1598435768945,
  "totalsize" : 0,
  "last_visit_time" : 1598435801422,
  "agent_version" : "6.1.8",
  "migration_cycle" : "replicating",
  "state_action_time" : 1598435783569
}
```
**状态码：403**
鉴权失败
```
{
  "error_code" : "SMS.9004",
  "error_msg" : "The current account does not have the permission to execute policy. You do not have permission to perform action XXX on resource XXX.",
  "encoded_authorization_message" : "XXXXXX",
  "error_param" : [ "You do not have permission to perform action XXX on resource XXX." ],
  "details" : [ {
    "error_code" : "SMS.9004",
    "error_msg" : "You do not have permission to perform action XXX on resource XXX."
  } ]
}
```
#### SDK代码示例
SDK代码示例如下。
- [Java]
  ```
  package com.huaweicloud.sdk.test;
  import com.huaweicloud.sdk.core.auth.ICredential;
  import com.huaweicloud.sdk.core.auth.GlobalCredentials;
  import com.huaweicloud.sdk.core.exception.ConnectionException;
  import com.huaweicloud.sdk.core.exception.RequestTimeoutException;
  import com.huaweicloud.sdk.core.exception.ServiceResponseException;
  import com.huaweicloud.sdk.sms.v3.region.SmsRegion;
  import com.huaweicloud.sdk.sms.v3.*;
  import com.huaweicloud.sdk.sms.v3.model.*;
  public class ShowServerSolution {
      public static void main(String[] args) {
          // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
          // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
          String ak = System.getenv("CLOUD_SDK_AK");
          String sk = System.getenv("CLOUD_SDK_SK");
          ICredential auth = new GlobalCredentials()
                  .withAk(ak)
                  .withSk(sk);
          SmsClient client = SmsClient.newBuilder()
                  .withCredential(auth)
                  .withRegion(SmsRegion.valueOf("<YOUR REGION>"))
                  .build();
          ShowServerRequest request = new ShowServerRequest();
          request.withSourceId("{source_id}");
          try {
              ShowServerResponse response = client.showServer(request);
              System.out.println(response.toString());
          } catch (ConnectionException e) {
              e.printStackTrace();
          } catch (RequestTimeoutException e) {
              e.printStackTrace();
          } catch (ServiceResponseException e) {
              e.printStackTrace();
              System.out.println(e.getHttpStatusCode());
              System.out.println(e.getRequestId());
              System.out.println(e.getErrorCode());
              System.out.println(e.getErrorMsg());
          }
      }
  }
  ```
- [Python]
  ```
  # coding: utf-8
  import os
  from huaweicloudsdkcore.auth.credentials import GlobalCredentials
  from huaweicloudsdksms.v3.region.sms_region import SmsRegion
  from huaweicloudsdkcore.exceptions import exceptions
  from huaweicloudsdksms.v3 import *
  if __name__ == "__main__":
      # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak = os.environ["CLOUD_SDK_AK"]
      sk = os.environ["CLOUD_SDK_SK"]
      credentials = GlobalCredentials(ak, sk)
      client = SmsClient.new_builder() \
          .with_credentials(credentials) \
          .with_region(SmsRegion.value_of("<YOUR REGION>")) \
          .build()
      try:
          request = ShowServerRequest()
          request.source_id = "{source_id}"
          response = client.show_server(request)
          print(response)
      except exceptions.ClientRequestException as e:
          print(e.status_code)
          print(e.request_id)
          print(e.error_code)
          print(e.error_msg)
  ```
- [Go]
  ```
  package main
  import (
  "fmt"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/global"
      sms "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/sms/v3"
  "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/sms/v3/model"
      region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/sms/v3/region"
  )
  func main() {
      // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security.
      // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment
      ak := os.Getenv("CLOUD_SDK_AK")
      sk := os.Getenv("CLOUD_SDK_SK")
      auth, err := global.NewCredentialsBuilder().
          WithAk(ak).
          WithSk(sk).
          SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      hcClient, err := sms.SmsClientBuilder().
           WithRegion(region.ValueOf("<YOUR REGION>")).
           WithCredential(auth).
           SafeBuild()
      if err != nil {
          fmt.Println(err)
          return
      }
      client := sms.NewSmsClient(hcClient)
      request := &model.ShowServerRequest{}
  request.SourceId = "{source_id}"
  response, err := client.ShowServer(request)
  if err == nil {
          fmt.Printf("%+v\n", response)
      } else {
          fmt.Println(err)
      }
  }
  ```
- [更多]
  更多编程语言的SDK代码示例，请参见[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/SMS/sdk?api=ShowServer)的代码示例页签，可生成自动对应的SDK代码示例。
#### 状态码
| 状态码 | 描述             |
|:---|:---|
| 200 | 查询指定ID的源端服务器成功 |
| 403 | 鉴权失败           |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-sms/ErrorCode.html)。
