You can call the ModifyCluster operation to modify the cluster configurations by cluster ID.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:ModifyCluster | update |
|
| none |
Request syntax
PUT /api/v2/clusters/{ClusterId} HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ClusterId | string | Yes | The cluster ID. | cb95aa626a47740afbf6aa099b65**** |
body | object | No | The request body parameters. | |
api_server_eip | boolean | No | 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 |
api_server_eip_id | string | No | The ID of the EIP that you want to associate with the API server of the cluster. This parameter takes effect when | eip-wz9fnasl6dsfhmvci**** |
deletion_protection | boolean | No | 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:
Default value: | true |
instance_deletion_protection | boolean | No | 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:
Default value: | true |
ingress_domain_rebinding | string | No | Specifies whether to remap the test domain name of the cluster. Valid values:
Default value: | true |
ingress_loadbalancer_id | string | No | The ID of the Server Load Balancer (SLB) instance of the cluster to be modified. | lb-wz97kes8tnndkpodw**** |
resource_group_id | string | No | The cluster resource group ID. | rg-acfmyvw3wjm**** |
maintenance_window | maintenance_window | No | The cluster maintenance window. This feature takes effect only for ACK Pro clusters. | |
enable_rrsa | boolean | No | Specifies whether to enable the RAM Roles for Service Accounts (RRSA) feature. This parameter is available only for ACK managed clusters. Valid values:
| true |
access_control_list | array | No | The network access control lists (ACLs) of the SLB instance associated with the API server if the cluster is a registered cluster. | |
string | No | 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_name | string | No | 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_logging | object | No | The storage configurations of system events. | |
enabled | boolean | No | Specifies whether to enable system event storage. | true |
logging_project | string | No | The name of the Simple Log Service project that stores system events. | k8s-log-cb95aa626a47740afbf6aa099b65**** |
operation_policy | object | No | The automatic O&M policy of the cluster. | |
cluster_auto_upgrade | object | No | The configurations of auto cluster update. | |
enabled | boolean | No | Specifies whether to enable auto cluster update. | true |
channel | string | No | The frequency of auto cluster updates. Valid values:
| patch |
api_server_custom_cert_sans | object | No | 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. | |
action | string | No | Specifies whether to overwrite or add SANs. Valid values:
| append |
subject_alternative_names | array | No | The SANs. | |
string | No | The SAN. | 192.168.0.119 |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 time | Summary of changes | Operation |
---|---|---|
2024-10-18 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-04-24 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2024-01-11 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-10-18 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-10-10 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-08-21 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2023-08-18 | The internal configuration of the API is changed, but the call is not affected | View Change Details |