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:
- For mandatory resource types, indicate with a prefix of * .
- 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 |
---|
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
cs:ModifyCluster | update | *Cluster acs:cs:{#regionId}:{#accountId}:cluster/{#ClusterId} |
| none |
Request syntax
PUT /api/v2/clusters/{ClusterId} HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|
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 resource group ID of the cluster. | 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 list (ACL) 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 automatic update. | |
enabled | boolean | No | Specifies whether to enable automatic update. | true |
channel | string | No | The frequency of automatic cluster updates. For more information, see Update frequency. 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 list of SANs. | |
string | No | The SAN. | 192.168.0.119 | |
vswitch_ids | array | No | The vSwitches of the control plane. This parameter can be used to change the vSwitches of the control plane in an ACK managed cluster. Take note of the following items:
| |
string | No | The vSwitches of the control plane. | vsw-2ze4jvvvade1yk899**** | |
control_plane_config | object | No | The control plane configurations of an ACK dedicated cluster. | |
charge_type | string | No | The billing method of the instance. Valid values:
Default value: | PrePaid |
period | long | No | The subscription duration of the instance. This parameter takes effect and is required only when If | 1 |
period_unit | string | No | The billing cycle of the instance. This parameter takes effect only when Valid value: | Month |
auto_renew | boolean | No | Specifies whether to enable auto-renewal for the instance. This parameter takes effect only when
Default value: | true |
auto_renew_period | long | No | The auto-renewal period of the instance. Valid values: 1, 2, 3, 6, and 12. Default value: 1. | 1 |
instance_types | array | No | The instance type. For more information, see Overview of ECS instance families. | |
string | No | The instance type. | ecs.g6.large | |
image_type | string | No | The type of the OS image. Valid values:
| AliyunLinux3 |
image_id | string | No | The custom image ID. You must configure this parameter if you use a custom image. | aliyun_3_x64_20G_alibase_20240819.vhd |
key_pair | string | No | The name of the key pair. You must configure either this parameter or the | ack |
login_password | string | No | The password for SSH logon. You must configure either this parameter or the | Ack@2000. |
system_disk_category | string | No | The type of the node system disk. Valid values:
| cloud_essd |
system_disk_size | long | No | The type of the system disk. Valid values: [40,500]. Unit: GiB. | 120 |
system_disk_snapshot_policy_id | string | No | The ID of the automatic snapshot policy applied to the node system disk. | sp-2zej1nogjvovnz4z**** |
system_disk_performance_level | string | No | The performance level (PL) of the system disk that you want to use for the node. This parameter is effective only for ESSDs. This parameter is related to the disk size. For more information, see ESSDs . | PL1 |
system_disk_provisioned_iops | long | No | The preset read/write input/output operations per second (IOPS) of the system disk. Valid values: 0 to min{50,000, 1,000 × Capacity - Baseline IOPS} Baseline IOPS = min{1,800 + 50 × Capacity, 50,000}. This parameter is effective only when | 1000 |
system_disk_bursting_enabled | boolean | No | Specifies whether to enable the burst feature for the system disk. Valid values:
This parameter is effective only when | true |
deploymentset_id | string | No | The ID of the deployment set. | ds-bp10b35imuam5amw**** |
cloud_monitor_flags | boolean | No | Specifies whether to install the CloudMonitor agent. Valid values:
| true |
soc_enabled | boolean | No | Specifies whether to enable Multi-Level Protection Scheme (MLPS) security hardening. For more information, see ACK security hardening based on MLPS. Valid values:
Default value: | false |
security_hardening_os | boolean | No | Specifies whether to enable Alibaba Cloud Linux Security Hardening. Valid values:
Default value: | true |
cpu_policy | string | No | The CPU management policy of nodes in the node pool. The following policies are supported if the Kubernetes version of the cluster is 1.12.6 or later:
Default value: | none |
runtime | string | No | The type of the container runtime. Valid values:
Default value: containerd. | containerd |
node_port_range | string | No | The node port range. | 30000-32767 |
size | long | No | The number of control plane nodes. If you want to scale out the control plane in an ACK dedicated cluster, set this parameter to the desired number of nodes. This parameter must be greater than the current number of nodes. | 5 |
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 |
---|
Change time | Summary of changes | Operation |
---|---|---|
2024-11-19 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
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 |