This interface is used to modify BMS information. Currently, only the name of the BMS can be changed.
PUT /v2.1/{project_id}/servers/{server_id}
Table 1 lists the parameters.
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For how to obtain the project ID, see Obtaining Required Information. |
server_id |
Yes |
Specifies the BMS ID. You can obtain the BMS ID from the BMS console or using the Querying BMSs (Native OpenStack API) API. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
server |
Yes |
Object |
Specifies the BMS data structure. For details, see Table 2. |
1 | PUT https://{ECS Endpoint}/v2.1/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd
|
1 2 3 4 5 | {
"server": {
"name": "new-server-test"
}
}
|
Parameter |
Type |
Description |
---|---|---|
name |
String |
Specifies the BMS name. |
id |
String |
Specifies the unique ID of the BMS. |
status |
String |
Specifies the current status of the BMS.
|
created |
String |
Specifies the time when the BMS was created. The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T03:30:52Z. |
updated |
String |
Specifies the time when the BMS was last updated. The timestamp format is YYYY-MM-DDTHH:MM:SSZ (ISO 8601), for example, 2019-05-22T04:30:52Z. |
flavor |
Object |
Specifies the BMS flavor information. For details, see Table 3. |
image |
Object |
Specifies the BMS image. For details, see Table 4. |
tenant_id |
String |
Specifies the ID of the tenant owning the BMS. The ID is in UUID format. This parameter specifies the same meaning as project_id. |
user_id |
String |
Specifies the ID of the user to which the BMS belongs. |
metadata |
Object |
Specifies the BMS metadata. For details, see Table 5. |
hostId |
String |
Specifies the host ID of the BMS. |
addresses |
Object |
Specifies the BMS network address. For details, see Table 7. |
links |
Array of objects |
Specifies the shortcut links of the BMS. For details, see Table 6. |
accessIPv4 |
String |
This is a reserved attribute. |
accessIPv6 |
String |
This is a reserved attribute. |
OS-DCF:diskConfig |
String |
Specifies the disk configuration method. This is an extended attribute. The value can be:
|
progress |
Integer |
This is a reserved attribute. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the flavor ID. |
links |
Array of objects |
Specifies the shortcut link of the BMS flavor. For details, see Table 6. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the BMS image. |
links |
Array of objects |
Specifies the shortcut links of the BMS image. For details, see Table 6. |
Parameter |
Type |
Description |
---|---|---|
User-defined field key and value pair |
String |
Specifies the key and value pair of the metadata. Each key or value contains a maximum of 255 characters. |
Parameter |
Type |
Description |
---|---|---|
rel |
String |
Specifies the shortcut link marker name. The value can be:
|
href |
String |
Specifies the corresponding shortcut link. |
Parameter |
Type |
Description |
---|---|---|
vpc_id |
Array of objects |
Specifies the VPC used by the BMS.
|
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 47 48 49 50 51 52 53 54 55 | {
"server": {
"tenant_id": "c685484a8cc2416b97260938705deb65",
"image": {
"links": [
{
"rel": "bookmark",
"href": "https://openstack.example.com/c685484a8cc2416b97260938705deb65/images/1a6635d8-afea-4f2b-abb6-27a202bad319"
}
],
"id": "1a6635d8-afea-4f2b-abb6-27a202bad319"
},
"accessIPv4": "",
"addresses": {
"08a7715f-7de6-4ff9-a343-95ba4209f24a": [
{
"addr": "192.168.0.107",
"version": 4
}
]
},
"metadata": {
"op_svc_userid": "1311c433dd9b408886f57d695c229cbe"
},
"accessIPv6": "",
"created": "2017-05-24T06:14:05Z",
"hostId": "e9c3ee0fcc58ab6085cf30df70b5544eab958858fb50d925f023e53e",
"flavor": {
"links": [
{
"rel": "bookmark",
"href": "https://openstack.example.com/c685484a8cc2416b97260938705deb65/flavors/physical.83.medium"
}
],
"id": "physical.83.medium"
},
"OS-DCF:diskConfig": "MANUAL",
"user_id": "1311c433dd9b408886f57d695c229cbe",
"name": "new-server-test",
"progress": 0,
"links": [
{
"rel": "self",
"href": "https://openstack.example.com/v2/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd"
},
{
"rel": "bookmark",
"href": "https://openstack.example.com/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd"
}
],
"id": "95bf2490-5428-432c-ad9b-5e3406f869dd",
"updated": "2017-05-25T03:40:25Z",
"status": "ACTIVE"
}
}
|
Returned Values |
Description |
---|---|
200 |
The request has been successfully processed. |
For details about other returned values, see Status Codes.
See Error Codes.