All Products
Search
Document Center

Container Service for Kubernetes:ModifyCluster

更新時間:Nov 07, 2024

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

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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:ModifyClusterupdate
  • Cluster
    acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId}
  • cs:EnableApiServerEip
  • cs:ApiServerEipId
none

Request syntax

PUT /api/v2/clusters/{ClusterId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
ClusterIdstringYes

The cluster ID.

cb95aa626a47740afbf6aa099b65****
bodyobjectNo

The request body parameters.

api_server_eipbooleanNo

Specifies whether to associate an elastic IP address (EIP) with the cluster. This EIP is used to enable access to the API server over the Internet. Valid values:

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

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

eip-wz9fnasl6dsfhmvci****
deletion_protectionbooleanNo

Specifies whether to enable cluster deletion protection. If you enable this option, the cluster cannot be deleted in the console or by calling API operations. Valid values:

  • true: enables cluster deletion protection.
  • false: disables cluster deletion protection.

Default value: false.

true
instance_deletion_protectionbooleanNo

Specifies whether to enable instance deletion protection. If you enable this option, the instance cannot be deleted in the console or by calling API operations. Valid values:

  • true: enables instance deletion protection.
  • false: disables instance deletion protection.

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 of the cluster to be modified.

lb-wz97kes8tnndkpodw****
resource_group_idstringNo

The cluster resource group ID.

rg-acfmyvw3wjm****
maintenance_windowmaintenance_windowNo

The cluster maintenance window. This feature takes effect only for ACK Pro clusters.

enable_rrsabooleanNo

Specifies whether to enable the RAM Roles for Service Accounts (RRSA) feature. This parameter is available only for ACK managed clusters. Valid values:

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

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

stringNo

The ACL of the SLB instance associated with the API server if the cluster is a registered cluster.

Note: Do not specify the 0.0.0.0/0 CIDR block.

192.168.1.0/24
cluster_namestringNo

The name of the cluster.

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

cluster-new-name
system_events_loggingobjectNo

The storage configurations of system events.

enabledbooleanNo

Specifies whether to enable system event storage.

true
logging_projectstringNo

The name of the Simple Log Service project that stores system events.

k8s-log-cb95aa626a47740afbf6aa099b65****
operation_policyobjectNo

The automatic O&M policy of the cluster.

cluster_auto_upgradeobjectNo

The configurations of auto cluster update.

enabledbooleanNo

Specifies whether to enable auto cluster update.

true
channelstringNo

The frequency of auto cluster updates. Valid values:

  • patch
  • stable
  • rapid
patch
api_server_custom_cert_sansobjectNo

The custom subject alternative names (SANs) for the API server certificate to accept requests from specified IP addresses or domain names. This parameter is available only for ACK managed clusters.

actionstringNo

Specifies whether to overwrite or add SANs. Valid values:

  • overwrite: overwrites SANs.
  • append: adds SANs.
append
subject_alternative_namesarrayNo

The SANs.

stringNo

The SAN.

192.168.0.119

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-10-18The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-04-24The internal configuration of the API is changed, but the call is not affectedView Change Details
2024-01-11The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-18The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-10-10The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-08-21The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-08-18The internal configuration of the API is changed, but the call is not affectedView Change Details