Updated on 2025-11-11 GMT+08:00

Querying a Source Server

Function

After the migration Agent reports the source server information to SMS, SMS checks the migration feasibility. This API returns the basic information and check results of the source server.

Calling Method

For details, see Calling APIs.

Authorization

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    sms:server:get

    Read

    server *

    -

    • sms:server:queryServer

    -

    -

    g:EnterpriseProjectId

URI

GET /v3/sources/{source_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

source_id

Yes

String

The ID of the source server in SMS.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The user token.

The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

The source server ID.

ip

String

The IP address of the source server.

name

String

The source server name in SMS.

hostname

String

The hostname of the source server. This parameter is mandatory for source server registration and optional for source server updates.

enterprise_project_id

String

The enterprise project ID.

add_date

Long

The time when the source server was registered.

Range

0 to 9223372036854775807

os_type

String

The OS type of the source server, which can be Windows or Linux. This parameter is mandatory for source server registration and optional for source server updates.

os_version

String

The OS version. This parameter is mandatory for source server registration and optional for source server updates.

oem_system

Boolean

Indicates whether the OS is an OEM version (Windows).

state

String

The source server status.

unavailable: The source server fails the environment check.

waiting: The source server is waiting for migration.

initialize: The migration of the source server is being initialized.

replicate: The source server is being replicated.

syncing: The source server is being synchronized.

stopping: The migration of the source server is being stopped.

stopped: The migration of the source server is stopped.

skipping: The operation is being skipped.

deleting: The source server record is being deleted.

error: An error occurs during the migration of the source server.

cloning: The paired target server is being cloned.

testing: The test is in progress.

finished: The paired target server is launched.

clearing: The snapshot resources are being cleared.

cleared: The snapshot resources have been cleared.

clearfailed: The snapshot resources fail to be cleared.

premigready: The migration drill is ready.

premiging: The migration drill is in progress.

premiged: The migration drill has been completed.

premigfailed: The migration drill fails.

The value can be:

  • unavailable

  • waiting

  • initialize

  • replicate

  • syncing

  • stopping

  • stopped

  • skipping

  • deleting

  • error

  • cloning

  • testing

  • finished

  • clearing

  • cleared

  • clearfailed

  • premigready

  • premiging

  • premiged

  • premigfailed

connected

Boolean

Indicate whether the Agent installed on the source server is connected to SMS.

firmware

String

The boot mode of the source server, which can be BIOS or UEFI.

The value can be:

  • BIOS

  • UEFI

init_target_server

InitTargetServer object

The recommended configuration for the target server.

cpu_quantity

Integer

The number of CPUs on the source server.

Range

0 to 65535

memory

Long

The physical memory size (MB) of the source server.

Range

0 to 9223372036854775807

current_task

TaskByServerSource object

The migration task associated with the source server.

disks

Array of ServerDisk objects

The disk information of the source server.

volume_groups

Array of VolumeGroups objects

The volume group information of the source server. This parameter is mandatory for Linux. If there are no volume groups, the value is an empty array [].

btrfs_list

Array of BtrfsFileSystem objects

The information about Btrfs file systems on the source server. This parameter is mandatory for Linux. If there are no Btrfs file systems on the source server, the value is an empty array [].

networks

Array of NetWork objects

The information about NICs on the source server.

checks

Array of EnvironmentCheck objects

The environment check information for the source server.

migration_cycle

String

The current migration stage of the source server.

cutovering: The paired target server is being launched.

cutovered: The paired target server is launched.

checking: The check is in progress.

setting: The configuration is in progress.

replicating: The data is being replicated.

syncing: The incremental data is being synchronized.

The value can be:

  • cutovering

  • cutovered

  • checking

  • setting

  • replicating

  • syncing

state_action_time

Long

The timestamp when the status of the source server last changed. The source server status is defined by state.

Range

0 to 9223372036854775807

replicatesize

Long

The volume of data that has been migrated, in bytes.

Range

0 to 9223372036854775807

totalsize

Long

The volume of data to be migrated, in bytes.

Range

0 to 9223372036854775807

last_visit_time

Long

The timestamp when the Agent connection status last changed.

Range

0 to 9223372036854775807

stage_action_time

Long

The timestamp when the migration stage of the source server last changed. The migration stage is defined by migration_cycle.

Range

0 to 9223372036854775807

agent_version

String

The Agent version.

has_tc

Boolean

Indicates whether TC is installed. This parameter is mandatory for Linux.

Table 4 InitTargetServer field description

Parameter

Type

Description

disks

Array of DiskIntargetServer objects

The information about the recommended target server disks.

volume_groups

Array of VolumeGroups objects

This parameter is mandatory for Linux. If there are no volume groups, the value is an empty array [].

Table 5 DiskIntargetServer field description

Parameter

Type

Description

name

String

The disk name.

size

Long

The disk size, in bytes.

Range

0 to 9223372036854775807

device_use

String

The disk function.

BOOT: boot device

OS: system device

NORMAL: general device

The value can be:

  • BOOT

  • OS

  • NORMAL

used_size

Long

The used disk space, in bytes.

Range

0 to 9223372036854775807

physical_volumes

Array of PhysicalVolumes objects

The physical volume information.

Table 6 PhysicalVolumes field description

Parameter

Type

Description

device_use

String

The partition function. The partition can be a general, boot, or OS partition.

file_system

String

The file system type.

index

Integer

The serial number.

Range

0 to 2147483647

mount_point

String

The mount point.

name

String

The volume name. In Windows, it indicates the drive letter, and in Linux, it indicates the device ID.

size

Long

The size.

Range

0 to 9223372036854775807

inode_size

Long

The number of inodes.

Range

0 to 9223372036854775807

used_size

Long

The used space.

Range

0 to 9223372036854775807

uuid

String

The GUID, which can be obtained from the source server.

Table 7 TaskByServerSource field description

Parameter

Type

Description

id

String

The task ID.

name

String

The task name.

type

String

The task type.

state

String

The task status.

start_date

Long

The start time.

Range

0 to 9223372036854775807

speed_limit

Integer

The migration rate limit.

Range

0 to 10000

migrate_speed

Double

The migration rate.

Range

0 to 10000

start_target_server

Boolean

Indicates whether the target server is started.

vm_template_id

String

The server template ID.

region_id

String

The region ID.

project_name

String

The project name.

project_id

String

The project ID.

target_server

TargetServerById object

The information about the target server.

log_collect_status

String

The log collection status.

exist_server

Boolean

Indicates whether an existing server is used as the target server.

use_public_ip

Boolean

Indicates whether a public IP address is used for migration.

clone_server

CloneServer object

The information about the cloned server.

subtask_info

String

The current subtask and progress.

Table 8 TargetServerById field description

Parameter

Type

Description

vm_id

String

The ID of the target server.

name

String

The name of the target server.

Table 9 CloneServer field description

Parameter

Type

Description

vm_id

String

The ID of the cloned server.

name

String

The name of the cloned server.

clone_error

String

The error returned for a clone failure.

clone_state

String

The clone status.

error_msg

String

The error message returned for a clone failure.

Table 10 ServerDisk field description

Parameter

Type

Description

name

String

The disk name.

partition_style

String

The disk partition type. This parameter is mandatory for source server registration.

MBR: Master Boot Record (MBR)

GPT: GUID Partition Table (GPT)

The value can be:

  • MBR

  • GPT

device_use

String

The disk function.

BOOT: boot device

OS: system device

The value can be:

  • BOOT

  • OS

size

Long

The disk size, in bytes.

Range

0 to 9223372036854775807

used_size

Long

The used disk space, in bytes.

Range

0 to 9223372036854775807

physical_volumes

Array of PhysicalVolume objects

The information about physical partitions on the disk.

os_disk

Boolean

Indicates whether the disk is the system disk.

relation_name

String

The name of the paired disk on the Linux target server.

inode_size

Integer

The inode size.

Range

0 to 2147483647

Table 11 PhysicalVolume field description

Parameter

Type

Description

device_use

String

The partition function. The partition can be a general, boot, or OS partition.

file_system

String

The file system type.

index

Integer

The serial number.

Range

0 to 2147483647

mount_point

String

The mount point.

name

String

The volume name. In Windows, it indicates the drive letter, and in Linux, it indicates the device ID.

size

Long

The size.

Range

0 to 9223372036854775807

used_size

Long

The used space.

Range

0 to 9223372036854775807

inode_size

Integer

The number of inodes.

Range

0 to 2147483647

inode_nums

Long

The number of inodes.

Range

0 to 9223372036854775807

uuid

String

The GUID, which can be obtained from the source server.

size_per_cluster

Integer

The size of each cluster.

Range

0 to 2147483647

Table 12 VolumeGroups field description

Parameter

Type

Description

components

String

The physical volume information.

free_size

Long

The available space.

Range

0 to 9223372036854775807

logical_volumes

Array of LogicalVolumes objects

The logical volume information.

name

String

The name.

size

Long

The size.

Range

0 to 9223372036854775807

Table 13 LogicalVolumes field description

Parameter

Type

Description

block_count

Integer

The number of blocks.

Range

0 to 2147483647

Default Value

0

block_size

Long

The block size.

Range

0 to 1048576

Default Value

0

file_system

String

The file system.

inode_size

Integer

The number of inodes.

Range

0 to 2147483647

inode_nums

Long

The number of inodes.

Range

0 to 9223372036854775807

device_use

String

The partition function. The partition can be a general, boot, or OS partition.

mount_point

String

The mount point.

name

String

The name.

size

Long

The size.

Range

0 to 9223372036854775807

used_size

Long

The used space.

Range

0 to 9223372036854775807

free_size

Long

The available space.

Range

0 to 9223372036854775807

Table 14 BtrfsFileSystem field description

Parameter

Type

Description

name

String

The file system name.

label

String

The file system tags. If no tag exists, the value is an empty string.

uuid

String

The UUID of the file system.

device

String

The device names of the Btrfs file system.

size

Long

The space occupied by the file system data.

Range

0 to 9223372036854775807

nodesize

Long

The Btrfs node size.

Range

0 to 9223372036854775807

sectorsize

Integer

The sector size.

Range

0 to 2147483647

data_profile

String

The data profile (RAD).

system_profile

String

The file system profile (RAD).

metadata_profile

String

The metadata profile (RAD).

global_reserve1

String

The Btrfs file system information.

g_vol_used_size

Long

The used space of the Btrfs volume.

Range

0 to 9223372036854775807

default_subvolid

String

The ID of the default subvolume.

default_subvol_name

String

The name of the default subvolume.

default_subvol_mountpath

String

The mount path of the default subvolume or Btrfs file system.

subvolumn

Array of BtrfsSubvolumn objects

The subvolume information.

Table 15 BtrfsSubvolumn field description

Parameter

Type

Description

uuid

String

The UUID of the parent volume.

is_snapshot

String

Indicates whether the subvolume is a snapshot.

subvol_id

String

The subvolume ID.

parent_id

String

The parent volume ID.

subvol_name

String

The subvolume name.

subvol_mount_path

String

The mount path of the subvolume.

Table 16 NetWork field description

Parameter

Type

Description

name

String

The NIC name.

ip

String

The IP address bound to the NIC.

ipv6

String

The IPv6 address.

netmask

String

The subnet mask.

gateway

String

The gateway.

mtu

Integer

The NIC MTU. This parameter is mandatory for Linux.

Range

0 to 2147483647

mac

String

The MAC address.

id

String

The database record ID.

Table 17 EnvironmentCheck field description

Parameter

Type

Description

id

Long

The check item ID.

Range

0 to 9223372036854775807

params

Array of strings

Parameter

name

String

The check item name.

result

String

The check result.

OK: The check is passed.

WARN: A warning is generated.

ERROR: The check fails.

The value can be:

  • OK

  • WARN

  • ERROR

error_code

String

The error code returned for a failed check item.

error_or_warn

String

The returned error or warning.

error_params

String

The parameters that failed the check.

Status code: 403

Table 18 Response body parameters

Parameter

Type

Description

error_code

String

The error code.

error_msg

String

The error message.

encoded_authorization_message

String

The encrypted authorization information.

error_param

Array of strings

Invalid parameters.

details

Array of details objects

The error details.

Table 19 details field description

Parameter

Type

Description

error_code

String

The SMS error code.

error_msg

String

The SMS error message.

Example Request

This example queries the information about the source server with ID 211d7878-d7ba-4cac-acf1-a02ccfb8xxxx.

GET https://{endpoint}/v3/sources/211d7878-d7ba-4cac-acf1-a02ccfb8xxxx

Example Response

Status code: 200

The details about a source server were obtained.

{
  "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
}

Status code: 403

Authentication failed.

{
  "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 Sample Code

The sample code is as follows.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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 := global.NewCredentialsBuilder().
        WithAk(ak).
        WithSk(sk).
        Build()

    client := sms.NewSmsClient(
        sms.SmsClientBuilder().
            WithRegion(region.ValueOf("<YOUR REGION>")).
            WithCredential(auth).
            Build())

    request := &model.ShowServerRequest{}
	request.SourceId = "{source_id}"
	response, err := client.ShowServer(request)
	if err == nil {
        fmt.Printf("%+v\n", response)
    } else {
        fmt.Println(err)
    }
}

For SDK code examples in more programming languages, visit API Explorer and click the Sample Code tab. Example code can be automatically generated.

Status Codes

Status Code

Description

200

The details about a source server were obtained.

403

Authentication failed.

Error Codes

For details, see Error Codes.