You can call ModifyCluster to modify the configurations of a cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses the common request header only. For more information, see Common parameters.

Request syntax

PUT /api/v2/clusters/[ClusterId] HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
api_server_eip Boolean Yes true

Specifies whether to assign an Elastic IP address to the API server of the cluster.

api_server_eip_id String Yes eip-wz9fnasl6dsfhmvcixdup

The ID of the Elastic IP address that is assigned to the API server of the cluster.

ClusterId String Yes cb95aa626a47740afbf6aa099b65****

The ID of the cluster.

deletion_protection Boolean Yes true

Specifies whether to enable deletion protection for the cluster.

ingress_loadbalancer_id String Yes lb-wz97kes8tnndkpodwtfve

The ID of the load balancer used by the ingresses of the cluster.

resource_group_id String Yes ""

The ID of the resource group to which the cluster belongs.

Response parameters

Parameter Type Example Description
cluster_id String cb95aa626a47740afbf6aa099b65****

The ID of the cluster.

instanceId String i-wz9e0fhnb46eb7b5lads

The ID of the instance.

request_id String 687C5BAA-D103-4993-884B-C35E4314****

The ID of the request.

task_id String T-5a54309c80282e39ea00****

The ID of the task.

Examples

Sample requests

PUT /api/v2/clusters/[ClusterId] HTTP/1.1
Common request header
{
"api\_server\_eip": "true",
"api\_server\_eip\_id": "eip-wz9fnasl6dsfhmvcixdup",
"ClusterId": "cb95aa626a47740afbf6aa099b65****",
"deletion\_protection": "true",
"ingress\_loadbalancer\_id": "lb-wz97kes8tnndkpodwtfve",
"resource\_group\_id": ""
}

Sample success responses

XML format

<cluster_id>cb95aa626a47740afbf6aa099b65****</cluster_id>
<instanceId>i-wz9e0fhnb46eb7b5lads</instanceId>
<task_id>T-5a54309c80282e39ea00****</task_id>
<request_id>687C5BAA-D103-4993-884B-C35E4314****</request_id>

JSON format

{
    "cluster_id":"cb95aa626a47740afbf6aa099b65****",
    "instanceId":"i-wz9e0fhnb46eb7b5lads",
    "task_id":"T-5a54309c80282e39ea00****",
    "request_id":"687C5BAA-D103-4993-884B-C35E4314****"
}

Error codes

For a list of error codes, visit the API Error Center.