Updated on 2023-06-20 GMT+08:00

Changing a Cluster Name

Function

This API is used to change a cluster name.

Constraints

None

Debugging

You can debug this API through automatic authentication in API Explorer. API Explorer can automatically generate sample SDK code and provide the sample SDK code debugging.

URI

PUT /v2/{project_id}/clusters/{cluster_id}/cluster-name

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

cluster_id

Yes

String

The cluster ID. For details about how to obtain the cluster ID, see Obtaining a Cluster ID.

Request Parameters

Table 2 Request body parameter

Parameter

Mandatory

Type

Description

cluster_name

Yes

String

The new cluster name.

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

result

String

The operation result of the mapping update request. Value **succeeded** indicates that the operation is successful, and value **failed** indicates that the operation fails.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

The error code.

error_msg

String

The error message.

Example Request

Change the MRS cluster name to mrs_jdRU_dm01.

{
  "cluster_name" : "mrs_jdRU_dm01"
}

Example Response

Status code: 200

The cluster name is changed.

{
  "result" : "succeeded"
}

Status Codes

See Status Codes.

Error Codes

See Error Codes.