Modifying Source Server Information
Function
This API is used to modify the information of a source server in SMS to facilitate server management.
Calling Method
For details, see Calling APIs.
URI
PUT /v3/sources/{source_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
source_id |
Yes |
String |
The ID of the source server in SMS. Minimum length: 1 character Maximum length: 36 |
Request
|
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 |
|
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 |
|
volume_groups |
No |
Array of PutVolumeGroups objects |
The volume group information. Array length: 0 to 65,535 |
|
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 modified volume information. Array length: 0 to 65,535 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
No |
String |
The database record ID. Minimum length: 0 characters Maximum length: 255 characters |
|
need_migration |
No |
Boolean |
Indicates 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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
logical_volumes |
No |
Array of PutLogicalVolume objects |
The logical volume information. Array length: 0 to 65,535 |
|
id |
Yes |
String |
The volume group ID. Minimum length: 0 characters Maximum length: 255 characters |
|
need_migration |
No |
Boolean |
Indicates 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 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
Yes |
String |
The logical volume ID. Minimum length: 0 characters Maximum length: 255 characters |
|
need_migration |
No |
Boolean |
Indicates 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
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
The information about the source server with a specified ID was modified successfully. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
The error code. Minimum length: 0 characters Maximum length: 255 characters |
|
error_msg |
String |
The error message. Minimum length: 0 characters Maximum length: 255 characters |
|
encoded_authorization_message |
String |
The encrypted authorization information. Minimum length: 0 characters Maximum length: 65,535 characters |
|
error_param |
Array of strings |
Invalid parameters. Minimum length: 0 characters Maximum length: 65,535 characters Array length: 1 to 20 |
|
details |
Array of details objects |
The error details. Array length: 1 to 20 |
Example Request
This example changes the name of the source server with ID dcdbe339-b02d-4578-95a1-9c9c547dxxxx to abcd.
PUT https://{endpoint}/v3/sources/dcdbe339-b02d-4578-95a1-9c9c547dxxxx
{
"name" : "abcd"
}
Example Response
Status code: 200
The information about the source server with a specified ID was modified successfully.
{ }
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."
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The information about the source server with a specified ID was modified successfully. |
|
403 |
Authentication failed. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.