Updated on 2024-07-08 GMT+08:00

Modifying a Source Server Name

Function

This API is used to modify the source name of the source server on the SMS server so that users can manage the source servers through SMS.

Calling Method

For details, see Calling APIs.

URI

PUT /v3/sources/{source_id}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

source_id

Yes

String

The ID of the source server displayed on the SMS console.

Minimum length: 0 characters

Maximum length: 255 characters

Request

Table 2 Request header parameter

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.

Minimum length: 1 character

Maximum length: 16,384 characters

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

No

String

The new name of the source server.

Minimum length: 0 characters

Maximum length: 255 characters

migprojectid

No

String

The ID of the migration project to which the source server belongs after the modification.

Minimum length: 0 characters

Maximum length: 255 characters

disks

No

Array of PutDisk objects

The disk information.

Array length: 0 to 65,535 characters

volume_groups

No

Array of PutVolumeGroups objects

The volume group information.

Array length: 0 to 65,535 characters

Table 4 PutDisk field description

Parameter

Mandatory

Type

Description

need_migration

No

Boolean

The disk name.

Default value: true

id

Yes

String

The disk ID.

Minimum length: 0 characters

Maximum length: 255 characters

adjust_size

Yes

Long

The new size.

Minimum value: 0

Maximum value: 9223372036854775807

Default value: 0

physical_volumes

No

Array of PutVolume objects

The information about the volume to be modified.

Array length: 0 to 65,535 characters

Table 5 PutVolume field description

Parameter

Mandatory

Type

Description

id

No

String

The database ID.

Minimum length: 0 characters

Maximum length: 255 characters

need_migration

No

Boolean

Specifies whether the volume needs to be migrated.

Default value: true

adjust_size

No

Long

The new size.

Minimum value: 0

Maximum value: 9223372036854775807

Default value: 0

Table 6 PutVolumeGroups field description

Parameter

Mandatory

Type

Description

logical_volumes

No

Array of PutLogicalVolume objects

The logical volume information.

Array length: 0 to 65,535 characters

id

Yes

String

The volume group ID.

Minimum length: 0 characters

Maximum length: 255 characters

need_migration

No

Boolean

Specifies whether the volume needs to be migrated.

Default value: true

adjust_size

No

Long

The new size.

Minimum value: 0

Maximum value: 9223372036854775807

Default value: 0

Table 7 PutLogicalVolume field description

Parameter

Mandatory

Type

Description

id

Yes

String

The logical volume ID.

Minimum length: 0 characters

Maximum length: 255 characters

need_migration

No

Boolean

Specifies whether the volume needs to be migrated.

Default value: true

adjust_size

No

Long

The new size.

Minimum value: 0

Maximum value: 9223372036854775807

Default value: 0

Response

None

Example Request

This example changes the name of the source server whose ID is dcdbe339-b02d-4578-95a1-9c9c547dxxxx to abcd.

PUT https://{endpoint}/v3/sources/dcdbe339-b02d-4578-95a1-9c9c547dxxxx

{
  "name" : "abcd"
}

Example Response

None

Status Codes

Status Code

Description

200

Response returned.

Error Codes

For details, see Error Codes.