• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. API Reference 2.0
  4. API
  5. Cluster Management
  6. Updating Information about a Specified Node

Updating Information about a Specified Node

Function

This API is used to update information about a specified node.

URI

PUT /api/v3/projects/{project_id}/clusters/{cluster_id}/nodes/{node_id}

Table 1 describes the parameters of the API.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID.

cluster_id

Yes

Cluster ID.

node_id

Yes

Node ID.

Request

Request parameters:

Table 2 describes the request parameters.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

metadata

Table 3

No

Node metadata.

Table 3 Data structure of the metadata field

Parameter

Mandatory

Type

Description

name

String

No

Node name. After the node name is changed, the VM name in the ECS is changed accordingly.

Example request:

{
   "metadata": {
        "name": "new-hostname"
   }
}

Response

Response parameters:

For details about the response parameters, see Response.

Example response:

{
    "kind": "Node",
    "apiVersion": "v3",
    "metadata": {
        "name": "node-demo",
        "uid": "c33b6898-38c9-11e9-b246-0255ac101413",
        "creationTimestamp": "2019-02-25 01:39:38.91603 +0000 UTC",
        "updateTimestamp": "2019-02-25 07:12:06.269769 +0000 UTC",
        "annotations": {
            "kubernetes.io/node-pool.id": "eu-de-02#s2.large.1#EulerOS 2.2"
        }
    },
    "spec": {
        "flavor": "s2.large.1",
        "az": "eu-de-02",
        "os": "EulerOS 2.2",
        "login": {
            "sshKey": "KeyPair-demo",
        },
        "rootVolume": {
            "volumetype": "SATA",
            "size": 40
        },
        "dataVolumes": [
            {
                "volumetype": "SATA",
                "size": 100
            }
        ],
        "publicIP": {
            "eip": {
                "bandwidth": {}
            }
        },
        "billingMode": 0
    },
    "status": {
        "phase": "Active",
        "serverId": "99de97f0-a10a-4215-ace7-817de0136ff5",
        "privateIP": "192.168.0.218",
        "publicIP": "10.154.50.127"
    }
}

Status Code

Table 4 describes the status code of the API.

Table 4 Status code

Status Code

Description

200

Information about the specified node is successfully updated.

For details about error status codes, see Status Codes.