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 parameter types

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

Request syntax

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

Request parameters

Parameter Type Required Example Description
ClusterId String Yes cb95aa626a47740afbf6aa099b65****

The ID of the cluster.

deletion_protection Boolean No true

Specifies whether to enable deletion protection for the cluster.

ingress_loadbalancer_id String No lb-wz97kes8tnndkpodw****

The ID of the Server Load Balancer (SLB) instance associated with the ingresses of the cluster.

api_server_eip Boolean No true

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

api_server_eip_id String No eip-wz9fnasl6dsfhmvci****

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

resource_group_id String No ""

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

ingress_domain_rebinding String No true

Specifies whether to rebind the default domain name of the cluster to the public IP address of the SLB instance associated with the ingresses of the cluster.

Response parameters

Parameter Type Example Description
RequestId String 687C5BAA-D103-4993-884B-C35E4314****

The ID of the request.

cluster_id String cb95aa626a47740afbf6aa099b65****

The ID of the cluster.

task_id String T-5a54309c80282e39ea00****

The ID of the task.

Examples

Sample requests

PUT /api/v2/clusters/[ClusterId] HTTP/1.1
Common request parameters
{
"api_server_eip": "true",
"api_server_eip_id": "eip-wz9fnasl6dsfhmvci****",
"ClusterId": "cb95aa626a47740afbf6aa099b65****",
"deletion_protection": "true",
"ingress_loadbalancer_id": "lb-wz97kes8tnndkpodw****",
"resource_group_id": ""
}

Sample success responses

XML format

<cluster_id>cb95aa626a47740afbf6aa099b65****</cluster_id>
<RequestId>687C5BAA-D103-4993-884B-C35E4314****</RequestId>
<task_id>T-5a54309c80282e39ea00****</task_id>

JSON format

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

Error codes

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