Updated on 2023-11-23 GMT+08:00

Updating an Edge Node

Function

This API is used to update an edge node.

URI

PUT /v2/{project_id}/edgemgr/nodes/{node_id}

Table 1 Path parameters

Parameter

Mandatory

Description

project_id

Yes

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

node_id

Yes

Edge node ID.

Request

Request parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

The default value application/json is recommended.

X-Auth-Token

Yes

String

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.

Table 3 Parameters in the request body

Parameter

Mandatory

Type

Description

description

No

String

Edge node description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\

log_configs

No

Table 2 object

Log configuration of an edge node.

ntp_servers

No

Array of strings

NTP server address. Each node can be configured with a maximum of two NTP server addresses.

attributes

No

Array of Table 26 objects

Properties of the edge node. An edge node can be associated with a maximum of 32 properties.

Example request

{
    "node": {
        "description": "This is a new test node"
    }
}

Response

Response parameters
Table 4 Parameters in the response body

Parameter

Type

Description

node

Table 1 object

Details about the edge node.

Example response

{ 
       "node":{
               "edged_version":null, 
               "ca":null, 
               "updated_at":"2018-11-08T04:11:02.138839+08:00", 
               "device_infos":[ ], 
               "upgrade_history":[ ], 
               "pause_docker_image":null, 
               "ief_node_version":null, 
               "id":"59710cd5-2ade-4b87-b2f8-5752f308a25b", 
               "device_num":1, 
               "certificate":null, 
               "gpu_num":null, 
               "os_version":null, 
               "state":"UNCONNECTED", 
               "memory":null, 
               "project_id":"", 
               "private_key":null, 
               "os_name":null, 
               "description":"This is a new test node.", 
               "gpu_info":[ ], 
               "arch":null, 
               "host_ips":[ ], 
               "enable_gpu":false, 
               "name":"node_test7",
               "deployment_num":0, 
               "package":null, 
               "container_runtime_version":null, 
               "created_at":"2018-11-08T04:03:43.215561+08:00", 
               "cpu":null, 
               "host_name":null, 
               "os_type":null, 
               "log_configs":[ {
                            "level":"off", 
                            "rotate_num":null, 
                            "component":"app", 
                            "rotate_period":null, 
                            "type":"LTS", 
                            "id":"79a1d6fb-4411-4e7e-8d15-b3d5c1b8612b", 
                            "size":null 
                        }, 
                        { 
                            "level":null, 
                            "rotate_num":5, 
                            "component":"system", 
                            "rotate_period":"daily", 
                            "type":"local", 
                            "id":"7e6419ac-05e8-4264-a082-f0824cbcd3bb", 
                            "size":50 
                        }, 
                       { 
                            "level":"off", 
                            "rotate_num":null, 
                            "component":"system", 
                            "rotate_period":null, 
                            "type":"LTS", 
                            "id":"b5150a39-325a-4872-8b1c-d4585424875e", 
                            "size":null 
                       }, 
                       { 
                            "level":"on", 
                            "rotate_num":5, 
                            "component":"app", 
                            "rotate_period":"daily", 
                            "type":"local", 
                            "id":"4a19d570-05b6-49e5-9851-cc25f33eb1c3", 
                            "size":100 
                        }
                   ] 
               } 
           }

Error Codes

For details, see Error Codes.