All Products
Search
Document Center

Container Service for Kubernetes:ModifyCluster

Last Updated:Apr 22, 2024

You can call the ModifyCluster operation to modify the cluster configurations by cluster ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cs:ModifyClusterWrite
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
  • cs:EnableApiServerEip
  • cs:ApiServerEipId
none

Request syntax

PUT /api/v2/clusters/{ClusterId}

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

cb95aa626a47740afbf6aa099b65****
bodyobjectNo

The request parameters.

api_server_eipbooleanNo

Specifies whether to associate an elastic IP address (EIP) with the cluster API server. This enables Internet access for the cluster. Valid values:

  • true: associates an EIP with the cluster API server.
  • false: does not associate an EIP with the cluster API server.
true
api_server_eip_idstringNo

The ID of the EIP that you want to associate with the cluster API server. The parameter takes effect only if api_server_eip is set to true.

eip-wz9fnasl6dsfhmvci****
deletion_protectionbooleanNo

Specifies whether to enable deletion protection for the cluster. If deletion protection is enabled, the cluster cannot be deleted in the ACK console or by calling API operations. Valid values:

  • true: enables deletion protection for the cluster. This way, the cluster cannot be deleted in the ACK console or by calling API operations.
  • false: disables deletion protection for the cluster. This way, the cluster can be deleted in the ACK console or by calling API operations.

Default value: false.

true
instance_deletion_protectionbooleanNo

Specifies whether to enable deletion protection for the instances in the cluster. If deletion protection is enabled, the instances in the cluster cannot be deleted in the console or by calling the API. Valid values:

  • true: enables deletion protection for the instances in the cluster. You cannot delete the instances in the cluster in the console or by calling the API.
  • false: disables deletion protection for the instances in the cluster. You can delete the instances in the cluster in the console or by calling the API.

Default value: false.

true
ingress_domain_rebindingstringNo

Specifies whether to remap the test domain name of the cluster. Valid values:

  • true: remaps the test domain name of the cluster.
  • false: does not remap the test domain name of the cluster.

Default value: false.

true
ingress_loadbalancer_idstringNo

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

lb-wz97kes8tnndkpodw****
resource_group_idstringNo

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

rg-acfmyvw3wjm****
maintenance_windowmaintenance_windowNo

The maintenance window of the cluster. This parameter takes effect only in ACK Pro clusters.

enable_rrsabooleanNo

Specifies whether to enable the RAM Roles for Service Accounts (RRSA) feature. Valid values:

  • true: enables the RRSA feature.
  • false: disables the RRSA feature.
true
access_control_listarrayNo

The network access control list (ACL) of the SLB instance associated with the API server if the cluster is a registered cluster.

stringNo

The network access control list (ACL) of the SLB instance associated with the API server if the cluster is a registered cluster.

Note: Do not enter 0.0.0.0/0.

192.168.1.0/24
cluster_namestringNo

The cluster name.

The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). The name cannot start with a hyphen (-).

cluster-new-name

Response parameters

ParameterTypeDescriptionExample
object

The returned data.

cluster_idstring

The cluster ID.

cb95aa626a47740afbf6aa09****
request_idstring

The request ID.

687C5BAA-D103-4993-884B-C35E4314****
task_idstring

The task ID.

T-5a54309c80282e39ea00****

Examples

Sample success responses

JSONformat

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

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-01-11The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-10-18The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-10-10The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-08-21The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.
2023-08-18The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.