Help Center/MapReduce Service/API Reference/API V2/Cluster Management APIs/Changing a Cluster Name - UpdateClusterName
Updated on 2026-01-04 GMT+08:00

Changing a Cluster Name - UpdateClusterName

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 supports sample SDK code debugging.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    mrs:cluster:updateClusterName

    Write

    cluster *

    • g:ResourceTag/<tag-key>

    • g:EnterpriseProjectId

    -

    -

URI

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

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation

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

Constraints

N/A

Value range

The value must consist of 1 to 64 characters. Only letters and digits are allowed.

Default value

N/A

cluster_id

Yes

String

Explanation

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

Constraints

N/A

Value range

The value can contain 1 to 64 characters, including only letters, digits, underscores (_), and hyphens (-).

Default value

N/A

Request Parameters

Table 2 Request body parameter

Parameter

Mandatory

Type

Description

cluster_name

Yes

String

Explanation

New cluster name.

Constraints

N/A

Value range

N/A

Default value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameter

Parameter

Type

Description

result

String

Explanation

Result of the request for updating a mapping.

Constraints

N/A

Value range

  • succeeded: The operation is successful.
  • failed: The operation failed.

Default value

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Explanation

Error code.

Constraints

N/A

Value range

N/A

Default value

N/A

error_msg

String

Explanation

Error message.

Constraints

N/A

Value range

N/A

Default value

N/A

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.