• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Nova
  5. ECSs
  6. Updating Server

Updating Server

Function Description

This interface is used to modify ECS information. Only the name and description of an ECS can be modified.

URI

  • URI format

    PUT /v2/{ tenant_id }/servers/{server_id}

    PUT /v2.1/{ tenant_id }/servers/{server_id}

  • Parameter description

    Parameter

    Mandatory

    Description

    tenant_id

    Yes

    Specifies the tenant or project ID.

    server_id

    Yes

    Specifies the ECS ID.

Request

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    server

    Yes

    Dictionary data structure

    Specifies the ECS data structure. For details, see Table 1.

    Table 1 server field description

    Parameter

    Mandatory

    Type

    Description

    name

    No

    String

    Specifies the name of the modified ECS.

    The length is greater than 0 and less than 256

    description

    No

    String

    Describes the ECS. The value contains a maximum of 255 bytes.

    This field is newly added in version 2.19.

  • Example request
    {
        "server": {
            "name": "new-server-test"
        }
    }

Response

  • Example response
    {
        "server": {
        "tenant_id": "7910a6e50b80402ba028c8d96c1b31fe",
        "image": "",
            "accessIPv4": "", 
        "addresses": {
          "03be5c1e-e05d-4905-a105-c3bd9b730bdc": [
            {
              "addr": "192.168.0.72",
              "version": 4
            }
          ]
        },
        "metadata": {},
            "accessIPv6": "", 
        "created": "2018-05-17T03:15:48Z",
        "hostId": "7dc82f6b1d406200fc63e395cf4829cbffcb49de0e9c75c5773f201f",
            "flavor": {
          "links": [
            {
              "rel": "bookmark",
              "href": "https://None/7910a6e50b80402ba028c8d96c1b31fe/flavors/c3.1U1G"
            }
          ],
          "id": "c3.1U1G"
        },
        "OS-DCF:diskConfig": "MANUAL",
        "user_id": "d698a78532ca430f8daec1858f2b500e",
            "name": "new-server-test", 
            "progress": 0, 
        "links": [
          {
            "rel": "self",
            "href": "https://None/v2/7910a6e50b80402ba028c8d96c1b31fe/servers/1a19ef4f-be0a-4526-bf2f-14b4464d536a"
          },
          {
            "rel": "bookmark",
            "href": "https://None/7910a6e50b80402ba028c8d96c1b31fe/servers/1a19ef4f-be0a-4526-bf2f-14b4464d536a"
          }
        ],
        "id": "1a19ef4f-be0a-4526-bf2f-14b4464d536a",
        "updated": "2018-05-21T00:36:27Z",
        "status": "ACTIVE"
      }
    }

Returned Values

See General Request Returned Values.