All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.cs20151215.models.DescribeClusterNodePoolsResponseBody Maven / Gradle / Ivy

There is a newer version: 2.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.cs20151215.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link DescribeClusterNodePoolsResponseBody} extends {@link TeaModel}
 *
 * 

DescribeClusterNodePoolsResponseBody

*/ public class DescribeClusterNodePoolsResponseBody extends TeaModel { @com.aliyun.core.annotation.NameInMap("nodepools") private java.util.List < Nodepools> nodepools; private DescribeClusterNodePoolsResponseBody(Builder builder) { this.nodepools = builder.nodepools; } public static Builder builder() { return new Builder(); } public static DescribeClusterNodePoolsResponseBody create() { return builder().build(); } /** * @return nodepools */ public java.util.List < Nodepools> getNodepools() { return this.nodepools; } public static final class Builder { private java.util.List < Nodepools> nodepools; /** * The node pools. */ public Builder nodepools(java.util.List < Nodepools> nodepools) { this.nodepools = nodepools; return this; } public DescribeClusterNodePoolsResponseBody build() { return new DescribeClusterNodePoolsResponseBody(this); } } public static class AutoScaling extends TeaModel { @com.aliyun.core.annotation.NameInMap("eip_bandwidth") private Long eipBandwidth; @com.aliyun.core.annotation.NameInMap("eip_internet_charge_type") private String eipInternetChargeType; @com.aliyun.core.annotation.NameInMap("enable") private Boolean enable; @com.aliyun.core.annotation.NameInMap("is_bond_eip") private Boolean isBondEip; @com.aliyun.core.annotation.NameInMap("max_instances") private Long maxInstances; @com.aliyun.core.annotation.NameInMap("min_instances") private Long minInstances; @com.aliyun.core.annotation.NameInMap("type") private String type; private AutoScaling(Builder builder) { this.eipBandwidth = builder.eipBandwidth; this.eipInternetChargeType = builder.eipInternetChargeType; this.enable = builder.enable; this.isBondEip = builder.isBondEip; this.maxInstances = builder.maxInstances; this.minInstances = builder.minInstances; this.type = builder.type; } public static Builder builder() { return new Builder(); } public static AutoScaling create() { return builder().build(); } /** * @return eipBandwidth */ public Long getEipBandwidth() { return this.eipBandwidth; } /** * @return eipInternetChargeType */ public String getEipInternetChargeType() { return this.eipInternetChargeType; } /** * @return enable */ public Boolean getEnable() { return this.enable; } /** * @return isBondEip */ public Boolean getIsBondEip() { return this.isBondEip; } /** * @return maxInstances */ public Long getMaxInstances() { return this.maxInstances; } /** * @return minInstances */ public Long getMinInstances() { return this.minInstances; } /** * @return type */ public String getType() { return this.type; } public static final class Builder { private Long eipBandwidth; private String eipInternetChargeType; private Boolean enable; private Boolean isBondEip; private Long maxInstances; private Long minInstances; private String type; /** * The maximum bandwidth of the elastic IP address (EIP). */ public Builder eipBandwidth(Long eipBandwidth) { this.eipBandwidth = eipBandwidth; return this; } /** * The billing method of the EIP. Valid values: *

* * * `PayByBandwidth`: pay-by-bandwidth. * * `PayByTraffic`: pay-by-data-transfer. */ public Builder eipInternetChargeType(String eipInternetChargeType) { this.eipInternetChargeType = eipInternetChargeType; return this; } /** * Specifies whether to enable auto scaling. Valid values: *

* * * `true` * * `false`: If you set this parameter to `false`, other parameters in `auto_scaling` do not take effect. */ public Builder enable(Boolean enable) { this.enable = enable; return this; } /** * Specifies whether to associate an EIP with the node pool. Valid values: *

* * * `true` * * `false` */ public Builder isBondEip(Boolean isBondEip) { this.isBondEip = isBondEip; return this; } /** * The maximum number of Elastic Compute Service (ECS) instances that can be created in the node pool. */ public Builder maxInstances(Long maxInstances) { this.maxInstances = maxInstances; return this; } /** * The minimum number of ECS instances that must be retained in the node pool. */ public Builder minInstances(Long minInstances) { this.minInstances = minInstances; return this; } /** * The instance types that can be used for the auto scaling of the node pool. Valid values: *

* * * `cpu`: regular instance. * * `gpu`: GPU-accelerated instance. * * `gpushare`: shared GPU-accelerated instance. * * `spot`: preemptible instance. */ public Builder type(String type) { this.type = type; return this; } public AutoScaling build() { return new AutoScaling(this); } } } public static class InterconnectConfig extends TeaModel { @com.aliyun.core.annotation.NameInMap("bandwidth") private Long bandwidth; @com.aliyun.core.annotation.NameInMap("ccn_id") private String ccnId; @com.aliyun.core.annotation.NameInMap("ccn_region_id") private String ccnRegionId; @com.aliyun.core.annotation.NameInMap("cen_id") private String cenId; @com.aliyun.core.annotation.NameInMap("improved_period") private String improvedPeriod; private InterconnectConfig(Builder builder) { this.bandwidth = builder.bandwidth; this.ccnId = builder.ccnId; this.ccnRegionId = builder.ccnRegionId; this.cenId = builder.cenId; this.improvedPeriod = builder.improvedPeriod; } public static Builder builder() { return new Builder(); } public static InterconnectConfig create() { return builder().build(); } /** * @return bandwidth */ public Long getBandwidth() { return this.bandwidth; } /** * @return ccnId */ public String getCcnId() { return this.ccnId; } /** * @return ccnRegionId */ public String getCcnRegionId() { return this.ccnRegionId; } /** * @return cenId */ public String getCenId() { return this.cenId; } /** * @return improvedPeriod */ public String getImprovedPeriod() { return this.improvedPeriod; } public static final class Builder { private Long bandwidth; private String ccnId; private String ccnRegionId; private String cenId; private String improvedPeriod; /** * This parameter is discontinued. *

* * The bandwidth of the enhanced edge node pool. Unit: Mbit/s. */ public Builder bandwidth(Long bandwidth) { this.bandwidth = bandwidth; return this; } /** * This parameter is discontinued. *

* * The ID of the Cloud Connect Network (CCN) instance that is associated with the enhanced edge node pool. */ public Builder ccnId(String ccnId) { this.ccnId = ccnId; return this; } /** * This parameter is discontinued. *

* * The region in which the CCN instance that is with the enhanced edge node pool resides. */ public Builder ccnRegionId(String ccnRegionId) { this.ccnRegionId = ccnRegionId; return this; } /** * This parameter is discontinued. *

* * The ID of the Cloud Enterprise Network (CEN) instance that is associated with the enhanced edge node pool. */ public Builder cenId(String cenId) { this.cenId = cenId; return this; } /** * This parameter is discontinued. *

* * The subscription duration of the enhanced edge node pool. Unit: months. */ public Builder improvedPeriod(String improvedPeriod) { this.improvedPeriod = improvedPeriod; return this; } public InterconnectConfig build() { return new InterconnectConfig(this); } } } public static class KubernetesConfig extends TeaModel { @com.aliyun.core.annotation.NameInMap("cms_enabled") private Boolean cmsEnabled; @com.aliyun.core.annotation.NameInMap("cpu_policy") private String cpuPolicy; @com.aliyun.core.annotation.NameInMap("labels") private java.util.List < Tag > labels; @com.aliyun.core.annotation.NameInMap("node_name_mode") private String nodeNameMode; @com.aliyun.core.annotation.NameInMap("runtime") private String runtime; @com.aliyun.core.annotation.NameInMap("runtime_version") private String runtimeVersion; @com.aliyun.core.annotation.NameInMap("taints") private java.util.List < Taint > taints; @com.aliyun.core.annotation.NameInMap("unschedulable") private Boolean unschedulable; @com.aliyun.core.annotation.NameInMap("user_data") private String userData; private KubernetesConfig(Builder builder) { this.cmsEnabled = builder.cmsEnabled; this.cpuPolicy = builder.cpuPolicy; this.labels = builder.labels; this.nodeNameMode = builder.nodeNameMode; this.runtime = builder.runtime; this.runtimeVersion = builder.runtimeVersion; this.taints = builder.taints; this.unschedulable = builder.unschedulable; this.userData = builder.userData; } public static Builder builder() { return new Builder(); } public static KubernetesConfig create() { return builder().build(); } /** * @return cmsEnabled */ public Boolean getCmsEnabled() { return this.cmsEnabled; } /** * @return cpuPolicy */ public String getCpuPolicy() { return this.cpuPolicy; } /** * @return labels */ public java.util.List < Tag > getLabels() { return this.labels; } /** * @return nodeNameMode */ public String getNodeNameMode() { return this.nodeNameMode; } /** * @return runtime */ public String getRuntime() { return this.runtime; } /** * @return runtimeVersion */ public String getRuntimeVersion() { return this.runtimeVersion; } /** * @return taints */ public java.util.List < Taint > getTaints() { return this.taints; } /** * @return unschedulable */ public Boolean getUnschedulable() { return this.unschedulable; } /** * @return userData */ public String getUserData() { return this.userData; } public static final class Builder { private Boolean cmsEnabled; private String cpuPolicy; private java.util.List < Tag > labels; private String nodeNameMode; private String runtime; private String runtimeVersion; private java.util.List < Taint > taints; private Boolean unschedulable; private String userData; /** * Specifies whether to install the CloudMonitor agent on ECS nodes. After the CloudMonitor agent is installed on ECS nodes, you can view the monitoring information about the instances in the CloudMonitor console. We recommend that you install the CloudMonitor agent. Valid values: *

* * * `true` * * `false` */ public Builder cmsEnabled(Boolean cmsEnabled) { this.cmsEnabled = cmsEnabled; return this; } /** * The CPU management policy of the nodes in the node pool. The following policies are supported if the version of the cluster is Kubernetes 1.12.6 or later: *

* * * `static`: allows pods with specific resource characteristics on the node to be granted enhanced CPU affinity and exclusivity. * * `none`: specifies that the default CPU affinity is used. */ public Builder cpuPolicy(String cpuPolicy) { this.cpuPolicy = cpuPolicy; return this; } /** * The labels that you want to add to the nodes in the cluster. You must add labels based on the following rules: *

* * * A label is a case-sensitive key-value pair. You can add up to 20 labels. * * The key must be unique and can be up to 64 characters in length. The value can be empty and can be up to 128 characters in length. Keys and values cannot start with `aliyun`, `acs:`, `https://`, or `http://`. For more information, see [Labels and Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set). */ public Builder labels(java.util.List < Tag > labels) { this.labels = labels; return this; } /** * The custom node name. A custom node name consists of a prefix, an IP substring, and a suffix. *

* * * The prefix and suffix can contain multiple parts that are separated by periods (.). Each part can contain lowercase letters, digits, and hyphens (-). A custom node name must start and end with a digit or lowercase letter. * * The IP substring length specifies the number of digits to be truncated from the end of the node IP address. The IP substring length ranges from 5 to 12. * * For example, if the node IP address is 192.168.0.55, the prefix is aliyun.com, the IP substring length is 5, and the suffix is test, the node name is aliyun.com00055test. */ public Builder nodeNameMode(String nodeNameMode) { this.nodeNameMode = nodeNameMode; return this; } /** * The name of the container runtime. */ public Builder runtime(String runtime) { this.runtime = runtime; return this; } /** * The version of the container runtime. */ public Builder runtimeVersion(String runtimeVersion) { this.runtimeVersion = runtimeVersion; return this; } /** * The taints of the nodes in the node pool. Taints can be used together with tolerations to prevent pods from being scheduled to specified nodes. For more information, see [taint-and-toleration](https://kubernetes.io/zh/docs/concepts/scheduling-eviction/taint-and-toleration/). */ public Builder taints(java.util.List < Taint > taints) { this.taints = taints; return this; } /** * Specifies whether the nodes are schedulable after a scale-out activity is performed. */ public Builder unschedulable(Boolean unschedulable) { this.unschedulable = unschedulable; return this; } /** * The user data of the node pool. For more information, see [Generate user-defined data](~~49121~~). */ public Builder userData(String userData) { this.userData = userData; return this; } public KubernetesConfig build() { return new KubernetesConfig(this); } } } public static class AutoRepairPolicy extends TeaModel { @com.aliyun.core.annotation.NameInMap("restart_node") private Boolean restartNode; private AutoRepairPolicy(Builder builder) { this.restartNode = builder.restartNode; } public static Builder builder() { return new Builder(); } public static AutoRepairPolicy create() { return builder().build(); } /** * @return restartNode */ public Boolean getRestartNode() { return this.restartNode; } public static final class Builder { private Boolean restartNode; /** * Specifies whether to allow node restart. */ public Builder restartNode(Boolean restartNode) { this.restartNode = restartNode; return this; } public AutoRepairPolicy build() { return new AutoRepairPolicy(this); } } } public static class AutoUpgradePolicy extends TeaModel { @com.aliyun.core.annotation.NameInMap("auto_upgrade_kubelet") private Boolean autoUpgradeKubelet; private AutoUpgradePolicy(Builder builder) { this.autoUpgradeKubelet = builder.autoUpgradeKubelet; } public static Builder builder() { return new Builder(); } public static AutoUpgradePolicy create() { return builder().build(); } /** * @return autoUpgradeKubelet */ public Boolean getAutoUpgradeKubelet() { return this.autoUpgradeKubelet; } public static final class Builder { private Boolean autoUpgradeKubelet; /** * Specifies whether to allow auto update of the kubelet. */ public Builder autoUpgradeKubelet(Boolean autoUpgradeKubelet) { this.autoUpgradeKubelet = autoUpgradeKubelet; return this; } public AutoUpgradePolicy build() { return new AutoUpgradePolicy(this); } } } public static class AutoVulFixPolicy extends TeaModel { @com.aliyun.core.annotation.NameInMap("restart_node") private Boolean restartNode; @com.aliyun.core.annotation.NameInMap("vul_level") private String vulLevel; private AutoVulFixPolicy(Builder builder) { this.restartNode = builder.restartNode; this.vulLevel = builder.vulLevel; } public static Builder builder() { return new Builder(); } public static AutoVulFixPolicy create() { return builder().build(); } /** * @return restartNode */ public Boolean getRestartNode() { return this.restartNode; } /** * @return vulLevel */ public String getVulLevel() { return this.vulLevel; } public static final class Builder { private Boolean restartNode; private String vulLevel; /** * Specifies whether to allow node restart. */ public Builder restartNode(Boolean restartNode) { this.restartNode = restartNode; return this; } /** * The severity level of CVEs that can be automatically patched. Multiple severity levels are separated by commas (,). */ public Builder vulLevel(String vulLevel) { this.vulLevel = vulLevel; return this; } public AutoVulFixPolicy build() { return new AutoVulFixPolicy(this); } } } public static class UpgradeConfig extends TeaModel { @com.aliyun.core.annotation.NameInMap("auto_upgrade") private Boolean autoUpgrade; @com.aliyun.core.annotation.NameInMap("max_unavailable") private Long maxUnavailable; @com.aliyun.core.annotation.NameInMap("surge") private Long surge; @com.aliyun.core.annotation.NameInMap("surge_percentage") private Long surgePercentage; private UpgradeConfig(Builder builder) { this.autoUpgrade = builder.autoUpgrade; this.maxUnavailable = builder.maxUnavailable; this.surge = builder.surge; this.surgePercentage = builder.surgePercentage; } public static Builder builder() { return new Builder(); } public static UpgradeConfig create() { return builder().build(); } /** * @return autoUpgrade */ public Boolean getAutoUpgrade() { return this.autoUpgrade; } /** * @return maxUnavailable */ public Long getMaxUnavailable() { return this.maxUnavailable; } /** * @return surge */ public Long getSurge() { return this.surge; } /** * @return surgePercentage */ public Long getSurgePercentage() { return this.surgePercentage; } public static final class Builder { private Boolean autoUpgrade; private Long maxUnavailable; private Long surge; private Long surgePercentage; /** * Specifies whether to enable auto update. Valid values: *

* * * `true` * * `false` */ public Builder autoUpgrade(Boolean autoUpgrade) { this.autoUpgrade = autoUpgrade; return this; } /** * The maximum number of unavailable nodes. Valid values: 1 to 1000. *

* * Default value: 1 */ public Builder maxUnavailable(Long maxUnavailable) { this.maxUnavailable = maxUnavailable; return this; } /** * The number of additional nodes. */ public Builder surge(Long surge) { this.surge = surge; return this; } /** * The percentage of additional nodes to the total nodes in the node pool. You must specify this parameter or the `surge` parameter. *

* * The number of additional nodes = The percentage of additional nodes × The number of nodes in the node pool. For example, if the percentage of additional nodes is 50% and the number of nodes in the node pool is 6, the number of additional nodes is 3. */ public Builder surgePercentage(Long surgePercentage) { this.surgePercentage = surgePercentage; return this; } public UpgradeConfig build() { return new UpgradeConfig(this); } } } public static class Management extends TeaModel { @com.aliyun.core.annotation.NameInMap("auto_repair") private Boolean autoRepair; @com.aliyun.core.annotation.NameInMap("auto_repair_policy") private AutoRepairPolicy autoRepairPolicy; @com.aliyun.core.annotation.NameInMap("auto_upgrade") private Boolean autoUpgrade; @com.aliyun.core.annotation.NameInMap("auto_upgrade_policy") private AutoUpgradePolicy autoUpgradePolicy; @com.aliyun.core.annotation.NameInMap("auto_vul_fix") private Boolean autoVulFix; @com.aliyun.core.annotation.NameInMap("auto_vul_fix_policy") private AutoVulFixPolicy autoVulFixPolicy; @com.aliyun.core.annotation.NameInMap("enable") private Boolean enable; @com.aliyun.core.annotation.NameInMap("upgrade_config") private UpgradeConfig upgradeConfig; private Management(Builder builder) { this.autoRepair = builder.autoRepair; this.autoRepairPolicy = builder.autoRepairPolicy; this.autoUpgrade = builder.autoUpgrade; this.autoUpgradePolicy = builder.autoUpgradePolicy; this.autoVulFix = builder.autoVulFix; this.autoVulFixPolicy = builder.autoVulFixPolicy; this.enable = builder.enable; this.upgradeConfig = builder.upgradeConfig; } public static Builder builder() { return new Builder(); } public static Management create() { return builder().build(); } /** * @return autoRepair */ public Boolean getAutoRepair() { return this.autoRepair; } /** * @return autoRepairPolicy */ public AutoRepairPolicy getAutoRepairPolicy() { return this.autoRepairPolicy; } /** * @return autoUpgrade */ public Boolean getAutoUpgrade() { return this.autoUpgrade; } /** * @return autoUpgradePolicy */ public AutoUpgradePolicy getAutoUpgradePolicy() { return this.autoUpgradePolicy; } /** * @return autoVulFix */ public Boolean getAutoVulFix() { return this.autoVulFix; } /** * @return autoVulFixPolicy */ public AutoVulFixPolicy getAutoVulFixPolicy() { return this.autoVulFixPolicy; } /** * @return enable */ public Boolean getEnable() { return this.enable; } /** * @return upgradeConfig */ public UpgradeConfig getUpgradeConfig() { return this.upgradeConfig; } public static final class Builder { private Boolean autoRepair; private AutoRepairPolicy autoRepairPolicy; private Boolean autoUpgrade; private AutoUpgradePolicy autoUpgradePolicy; private Boolean autoVulFix; private AutoVulFixPolicy autoVulFixPolicy; private Boolean enable; private UpgradeConfig upgradeConfig; /** * Specifies whether to enable auto repair. This parameter takes effect only if `enable` is set to true. Valid values: *

* * * `true` * * `false` */ public Builder autoRepair(Boolean autoRepair) { this.autoRepair = autoRepair; return this; } /** * The auto node repair policy. */ public Builder autoRepairPolicy(AutoRepairPolicy autoRepairPolicy) { this.autoRepairPolicy = autoRepairPolicy; return this; } /** * Specifies whether to enable auto update. */ public Builder autoUpgrade(Boolean autoUpgrade) { this.autoUpgrade = autoUpgrade; return this; } /** * The auto update policy. */ public Builder autoUpgradePolicy(AutoUpgradePolicy autoUpgradePolicy) { this.autoUpgradePolicy = autoUpgradePolicy; return this; } /** * Specifies whether to enable auto Common Vulnerabilities and Exposures (CVE) patching. */ public Builder autoVulFix(Boolean autoVulFix) { this.autoVulFix = autoVulFix; return this; } /** * The auto CVE patching policy. */ public Builder autoVulFixPolicy(AutoVulFixPolicy autoVulFixPolicy) { this.autoVulFixPolicy = autoVulFixPolicy; return this; } /** * Specifies whether to enable the managed node pool feature. Valid values: *

* * * `true` * * `false`: If you set this parameter to false, other parameters of `management` do not take effect. */ public Builder enable(Boolean enable) { this.enable = enable; return this; } /** * The configurations of auto update. The configurations take effect only if `enable` is set to true. */ public Builder upgradeConfig(UpgradeConfig upgradeConfig) { this.upgradeConfig = upgradeConfig; return this; } public Management build() { return new Management(this); } } } public static class NodeConfig extends TeaModel { @com.aliyun.core.annotation.NameInMap("kubelet_configuration") private KubeletConfig kubeletConfiguration; private NodeConfig(Builder builder) { this.kubeletConfiguration = builder.kubeletConfiguration; } public static Builder builder() { return new Builder(); } public static NodeConfig create() { return builder().build(); } /** * @return kubeletConfiguration */ public KubeletConfig getKubeletConfiguration() { return this.kubeletConfiguration; } public static final class Builder { private KubeletConfig kubeletConfiguration; /** * The parameter settings of the kubelet. */ public Builder kubeletConfiguration(KubeletConfig kubeletConfiguration) { this.kubeletConfiguration = kubeletConfiguration; return this; } public NodeConfig build() { return new NodeConfig(this); } } } public static class NodepoolInfo extends TeaModel { @com.aliyun.core.annotation.NameInMap("created") private String created; @com.aliyun.core.annotation.NameInMap("is_default") private Boolean isDefault; @com.aliyun.core.annotation.NameInMap("name") private String name; @com.aliyun.core.annotation.NameInMap("nodepool_id") private String nodepoolId; @com.aliyun.core.annotation.NameInMap("region_id") private String regionId; @com.aliyun.core.annotation.NameInMap("resource_group_id") private String resourceGroupId; @com.aliyun.core.annotation.NameInMap("type") private String type; @com.aliyun.core.annotation.NameInMap("updated") private String updated; private NodepoolInfo(Builder builder) { this.created = builder.created; this.isDefault = builder.isDefault; this.name = builder.name; this.nodepoolId = builder.nodepoolId; this.regionId = builder.regionId; this.resourceGroupId = builder.resourceGroupId; this.type = builder.type; this.updated = builder.updated; } public static Builder builder() { return new Builder(); } public static NodepoolInfo create() { return builder().build(); } /** * @return created */ public String getCreated() { return this.created; } /** * @return isDefault */ public Boolean getIsDefault() { return this.isDefault; } /** * @return name */ public String getName() { return this.name; } /** * @return nodepoolId */ public String getNodepoolId() { return this.nodepoolId; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return resourceGroupId */ public String getResourceGroupId() { return this.resourceGroupId; } /** * @return type */ public String getType() { return this.type; } /** * @return updated */ public String getUpdated() { return this.updated; } public static final class Builder { private String created; private Boolean isDefault; private String name; private String nodepoolId; private String regionId; private String resourceGroupId; private String type; private String updated; /** * The time when the node pool was created. */ public Builder created(String created) { this.created = created; return this; } /** * Specifies whether the node pool is a default node pool. A Container Service for Kubernetes (ACK) cluster generally has only one default node pool. Valid values: *

* * * `true` * * `false`: */ public Builder isDefault(Boolean isDefault) { this.isDefault = isDefault; return this; } /** * The name of the node pool. *

* * The name must be 1 to 63 characters in length, and can contain digits, letters, and hyphens (-). It cannot start with a hyphen (-). */ public Builder name(String name) { this.name = name; return this; } /** * The node pool ID. */ public Builder nodepoolId(String nodepoolId) { this.nodepoolId = nodepoolId; return this; } /** * The region ID. */ public Builder regionId(String regionId) { this.regionId = regionId; return this; } /** * The resource group ID. */ public Builder resourceGroupId(String resourceGroupId) { this.resourceGroupId = resourceGroupId; return this; } /** * The type of node pool. Valid values: *

* * * `edge`: edge node pool. * * `ess`: node pool in the cloud. */ public Builder type(String type) { this.type = type; return this; } /** * The time when the node pool was last updated. */ public Builder updated(String updated) { this.updated = updated; return this; } public NodepoolInfo build() { return new NodepoolInfo(this); } } } public static class PrivatePoolOptions extends TeaModel { @com.aliyun.core.annotation.NameInMap("id") private String id; @com.aliyun.core.annotation.NameInMap("match_criteria") private String matchCriteria; private PrivatePoolOptions(Builder builder) { this.id = builder.id; this.matchCriteria = builder.matchCriteria; } public static Builder builder() { return new Builder(); } public static PrivatePoolOptions create() { return builder().build(); } /** * @return id */ public String getId() { return this.id; } /** * @return matchCriteria */ public String getMatchCriteria() { return this.matchCriteria; } public static final class Builder { private String id; private String matchCriteria; /** * The private pool ID, which is the same as the ID of the elasticity assurance or capacity reservation for which the private pool is generated. */ public Builder id(String id) { this.id = id; return this; } /** * The type of the private node pool. This parameter specifies the type of the private node pool that is used to create instances. A private node pool is generated when an elasticity assurance or a capacity reservation service takes effect. The system selects a private node pool to launch instances. Valid values: *

* * * `Open`: uses open private pool. The system selects an open private node pool to launch instances. If no matching open private node pool is available, the resources in the public node pool are used. * * `Target`: uses the specified private node pool. The system uses the resources of the specified private node pool to launch instances. If the specified private node pool is unavailable, instances cannot be launched. * * `None`: No private node pool is used. The resources of private node pools are not used to launch instances. */ public Builder matchCriteria(String matchCriteria) { this.matchCriteria = matchCriteria; return this; } public PrivatePoolOptions build() { return new PrivatePoolOptions(this); } } } public static class SpotPriceLimit extends TeaModel { @com.aliyun.core.annotation.NameInMap("instance_type") private String instanceType; @com.aliyun.core.annotation.NameInMap("price_limit") private String priceLimit; private SpotPriceLimit(Builder builder) { this.instanceType = builder.instanceType; this.priceLimit = builder.priceLimit; } public static Builder builder() { return new Builder(); } public static SpotPriceLimit create() { return builder().build(); } /** * @return instanceType */ public String getInstanceType() { return this.instanceType; } /** * @return priceLimit */ public String getPriceLimit() { return this.priceLimit; } public static final class Builder { private String instanceType; private String priceLimit; /** * The instance type of preemptible instances. */ public Builder instanceType(String instanceType) { this.instanceType = instanceType; return this; } /** * The price cap for a single preemptible instance. *

* * Unit: USD/hour. */ public Builder priceLimit(String priceLimit) { this.priceLimit = priceLimit; return this; } public SpotPriceLimit build() { return new SpotPriceLimit(this); } } } public static class ScalingGroup extends TeaModel { @com.aliyun.core.annotation.NameInMap("auto_renew") private Boolean autoRenew; @com.aliyun.core.annotation.NameInMap("auto_renew_period") private Long autoRenewPeriod; @com.aliyun.core.annotation.NameInMap("cis_enabled") @Deprecated private Boolean cisEnabled; @com.aliyun.core.annotation.NameInMap("compensate_with_on_demand") private Boolean compensateWithOnDemand; @com.aliyun.core.annotation.NameInMap("data_disks") private java.util.List < DataDisk > dataDisks; @com.aliyun.core.annotation.NameInMap("deploymentset_id") private String deploymentsetId; @com.aliyun.core.annotation.NameInMap("desired_size") private Long desiredSize; @com.aliyun.core.annotation.NameInMap("image_id") private String imageId; @com.aliyun.core.annotation.NameInMap("image_type") private String imageType; @com.aliyun.core.annotation.NameInMap("instance_charge_type") private String instanceChargeType; @com.aliyun.core.annotation.NameInMap("instance_patterns") private java.util.List < InstancePatterns > instancePatterns; @com.aliyun.core.annotation.NameInMap("instance_types") private java.util.List < String > instanceTypes; @com.aliyun.core.annotation.NameInMap("internet_charge_type") private String internetChargeType; @com.aliyun.core.annotation.NameInMap("internet_max_bandwidth_out") private Long internetMaxBandwidthOut; @com.aliyun.core.annotation.NameInMap("key_pair") private String keyPair; @com.aliyun.core.annotation.NameInMap("login_as_non_root") private Boolean loginAsNonRoot; @com.aliyun.core.annotation.NameInMap("login_password") private String loginPassword; @com.aliyun.core.annotation.NameInMap("multi_az_policy") private String multiAzPolicy; @com.aliyun.core.annotation.NameInMap("on_demand_base_capacity") private Long onDemandBaseCapacity; @com.aliyun.core.annotation.NameInMap("on_demand_percentage_above_base_capacity") private Long onDemandPercentageAboveBaseCapacity; @com.aliyun.core.annotation.NameInMap("period") private Long period; @com.aliyun.core.annotation.NameInMap("period_unit") private String periodUnit; @com.aliyun.core.annotation.NameInMap("platform") private String platform; @com.aliyun.core.annotation.NameInMap("private_pool_options") private PrivatePoolOptions privatePoolOptions; @com.aliyun.core.annotation.NameInMap("ram_policy") private String ramPolicy; @com.aliyun.core.annotation.NameInMap("ram_role_name") private String ramRoleName; @com.aliyun.core.annotation.NameInMap("rds_instances") private java.util.List < String > rdsInstances; @com.aliyun.core.annotation.NameInMap("scaling_group_id") private String scalingGroupId; @com.aliyun.core.annotation.NameInMap("scaling_policy") private String scalingPolicy; @com.aliyun.core.annotation.NameInMap("security_group_id") private String securityGroupId; @com.aliyun.core.annotation.NameInMap("security_group_ids") private java.util.List < String > securityGroupIds; @com.aliyun.core.annotation.NameInMap("security_hardening_os") private Boolean securityHardeningOs; @com.aliyun.core.annotation.NameInMap("soc_enabled") private Boolean socEnabled; @com.aliyun.core.annotation.NameInMap("spot_instance_pools") private Long spotInstancePools; @com.aliyun.core.annotation.NameInMap("spot_instance_remedy") private Boolean spotInstanceRemedy; @com.aliyun.core.annotation.NameInMap("spot_price_limit") private java.util.List < SpotPriceLimit> spotPriceLimit; @com.aliyun.core.annotation.NameInMap("spot_strategy") private String spotStrategy; @com.aliyun.core.annotation.NameInMap("system_disk_bursting_enabled") private Boolean systemDiskBurstingEnabled; @com.aliyun.core.annotation.NameInMap("system_disk_categories") private java.util.List < String > systemDiskCategories; @com.aliyun.core.annotation.NameInMap("system_disk_category") private String systemDiskCategory; @com.aliyun.core.annotation.NameInMap("system_disk_encrypt_algorithm") private String systemDiskEncryptAlgorithm; @com.aliyun.core.annotation.NameInMap("system_disk_encrypted") private Boolean systemDiskEncrypted; @com.aliyun.core.annotation.NameInMap("system_disk_kms_key_id") private String systemDiskKmsKeyId; @com.aliyun.core.annotation.NameInMap("system_disk_performance_level") private String systemDiskPerformanceLevel; @com.aliyun.core.annotation.NameInMap("system_disk_provisioned_iops") private Long systemDiskProvisionedIops; @com.aliyun.core.annotation.NameInMap("system_disk_size") private Long systemDiskSize; @com.aliyun.core.annotation.NameInMap("tags") private java.util.List < Tag > tags; @com.aliyun.core.annotation.NameInMap("vswitch_ids") private java.util.List < String > vswitchIds; private ScalingGroup(Builder builder) { this.autoRenew = builder.autoRenew; this.autoRenewPeriod = builder.autoRenewPeriod; this.cisEnabled = builder.cisEnabled; this.compensateWithOnDemand = builder.compensateWithOnDemand; this.dataDisks = builder.dataDisks; this.deploymentsetId = builder.deploymentsetId; this.desiredSize = builder.desiredSize; this.imageId = builder.imageId; this.imageType = builder.imageType; this.instanceChargeType = builder.instanceChargeType; this.instancePatterns = builder.instancePatterns; this.instanceTypes = builder.instanceTypes; this.internetChargeType = builder.internetChargeType; this.internetMaxBandwidthOut = builder.internetMaxBandwidthOut; this.keyPair = builder.keyPair; this.loginAsNonRoot = builder.loginAsNonRoot; this.loginPassword = builder.loginPassword; this.multiAzPolicy = builder.multiAzPolicy; this.onDemandBaseCapacity = builder.onDemandBaseCapacity; this.onDemandPercentageAboveBaseCapacity = builder.onDemandPercentageAboveBaseCapacity; this.period = builder.period; this.periodUnit = builder.periodUnit; this.platform = builder.platform; this.privatePoolOptions = builder.privatePoolOptions; this.ramPolicy = builder.ramPolicy; this.ramRoleName = builder.ramRoleName; this.rdsInstances = builder.rdsInstances; this.scalingGroupId = builder.scalingGroupId; this.scalingPolicy = builder.scalingPolicy; this.securityGroupId = builder.securityGroupId; this.securityGroupIds = builder.securityGroupIds; this.securityHardeningOs = builder.securityHardeningOs; this.socEnabled = builder.socEnabled; this.spotInstancePools = builder.spotInstancePools; this.spotInstanceRemedy = builder.spotInstanceRemedy; this.spotPriceLimit = builder.spotPriceLimit; this.spotStrategy = builder.spotStrategy; this.systemDiskBurstingEnabled = builder.systemDiskBurstingEnabled; this.systemDiskCategories = builder.systemDiskCategories; this.systemDiskCategory = builder.systemDiskCategory; this.systemDiskEncryptAlgorithm = builder.systemDiskEncryptAlgorithm; this.systemDiskEncrypted = builder.systemDiskEncrypted; this.systemDiskKmsKeyId = builder.systemDiskKmsKeyId; this.systemDiskPerformanceLevel = builder.systemDiskPerformanceLevel; this.systemDiskProvisionedIops = builder.systemDiskProvisionedIops; this.systemDiskSize = builder.systemDiskSize; this.tags = builder.tags; this.vswitchIds = builder.vswitchIds; } public static Builder builder() { return new Builder(); } public static ScalingGroup create() { return builder().build(); } /** * @return autoRenew */ public Boolean getAutoRenew() { return this.autoRenew; } /** * @return autoRenewPeriod */ public Long getAutoRenewPeriod() { return this.autoRenewPeriod; } /** * @return cisEnabled */ public Boolean getCisEnabled() { return this.cisEnabled; } /** * @return compensateWithOnDemand */ public Boolean getCompensateWithOnDemand() { return this.compensateWithOnDemand; } /** * @return dataDisks */ public java.util.List < DataDisk > getDataDisks() { return this.dataDisks; } /** * @return deploymentsetId */ public String getDeploymentsetId() { return this.deploymentsetId; } /** * @return desiredSize */ public Long getDesiredSize() { return this.desiredSize; } /** * @return imageId */ public String getImageId() { return this.imageId; } /** * @return imageType */ public String getImageType() { return this.imageType; } /** * @return instanceChargeType */ public String getInstanceChargeType() { return this.instanceChargeType; } /** * @return instancePatterns */ public java.util.List < InstancePatterns > getInstancePatterns() { return this.instancePatterns; } /** * @return instanceTypes */ public java.util.List < String > getInstanceTypes() { return this.instanceTypes; } /** * @return internetChargeType */ public String getInternetChargeType() { return this.internetChargeType; } /** * @return internetMaxBandwidthOut */ public Long getInternetMaxBandwidthOut() { return this.internetMaxBandwidthOut; } /** * @return keyPair */ public String getKeyPair() { return this.keyPair; } /** * @return loginAsNonRoot */ public Boolean getLoginAsNonRoot() { return this.loginAsNonRoot; } /** * @return loginPassword */ public String getLoginPassword() { return this.loginPassword; } /** * @return multiAzPolicy */ public String getMultiAzPolicy() { return this.multiAzPolicy; } /** * @return onDemandBaseCapacity */ public Long getOnDemandBaseCapacity() { return this.onDemandBaseCapacity; } /** * @return onDemandPercentageAboveBaseCapacity */ public Long getOnDemandPercentageAboveBaseCapacity() { return this.onDemandPercentageAboveBaseCapacity; } /** * @return period */ public Long getPeriod() { return this.period; } /** * @return periodUnit */ public String getPeriodUnit() { return this.periodUnit; } /** * @return platform */ public String getPlatform() { return this.platform; } /** * @return privatePoolOptions */ public PrivatePoolOptions getPrivatePoolOptions() { return this.privatePoolOptions; } /** * @return ramPolicy */ public String getRamPolicy() { return this.ramPolicy; } /** * @return ramRoleName */ public String getRamRoleName() { return this.ramRoleName; } /** * @return rdsInstances */ public java.util.List < String > getRdsInstances() { return this.rdsInstances; } /** * @return scalingGroupId */ public String getScalingGroupId() { return this.scalingGroupId; } /** * @return scalingPolicy */ public String getScalingPolicy() { return this.scalingPolicy; } /** * @return securityGroupId */ public String getSecurityGroupId() { return this.securityGroupId; } /** * @return securityGroupIds */ public java.util.List < String > getSecurityGroupIds() { return this.securityGroupIds; } /** * @return securityHardeningOs */ public Boolean getSecurityHardeningOs() { return this.securityHardeningOs; } /** * @return socEnabled */ public Boolean getSocEnabled() { return this.socEnabled; } /** * @return spotInstancePools */ public Long getSpotInstancePools() { return this.spotInstancePools; } /** * @return spotInstanceRemedy */ public Boolean getSpotInstanceRemedy() { return this.spotInstanceRemedy; } /** * @return spotPriceLimit */ public java.util.List < SpotPriceLimit> getSpotPriceLimit() { return this.spotPriceLimit; } /** * @return spotStrategy */ public String getSpotStrategy() { return this.spotStrategy; } /** * @return systemDiskBurstingEnabled */ public Boolean getSystemDiskBurstingEnabled() { return this.systemDiskBurstingEnabled; } /** * @return systemDiskCategories */ public java.util.List < String > getSystemDiskCategories() { return this.systemDiskCategories; } /** * @return systemDiskCategory */ public String getSystemDiskCategory() { return this.systemDiskCategory; } /** * @return systemDiskEncryptAlgorithm */ public String getSystemDiskEncryptAlgorithm() { return this.systemDiskEncryptAlgorithm; } /** * @return systemDiskEncrypted */ public Boolean getSystemDiskEncrypted() { return this.systemDiskEncrypted; } /** * @return systemDiskKmsKeyId */ public String getSystemDiskKmsKeyId() { return this.systemDiskKmsKeyId; } /** * @return systemDiskPerformanceLevel */ public String getSystemDiskPerformanceLevel() { return this.systemDiskPerformanceLevel; } /** * @return systemDiskProvisionedIops */ public Long getSystemDiskProvisionedIops() { return this.systemDiskProvisionedIops; } /** * @return systemDiskSize */ public Long getSystemDiskSize() { return this.systemDiskSize; } /** * @return tags */ public java.util.List < Tag > getTags() { return this.tags; } /** * @return vswitchIds */ public java.util.List < String > getVswitchIds() { return this.vswitchIds; } public static final class Builder { private Boolean autoRenew; private Long autoRenewPeriod; private Boolean cisEnabled; private Boolean compensateWithOnDemand; private java.util.List < DataDisk > dataDisks; private String deploymentsetId; private Long desiredSize; private String imageId; private String imageType; private String instanceChargeType; private java.util.List < InstancePatterns > instancePatterns; private java.util.List < String > instanceTypes; private String internetChargeType; private Long internetMaxBandwidthOut; private String keyPair; private Boolean loginAsNonRoot; private String loginPassword; private String multiAzPolicy; private Long onDemandBaseCapacity; private Long onDemandPercentageAboveBaseCapacity; private Long period; private String periodUnit; private String platform; private PrivatePoolOptions privatePoolOptions; private String ramPolicy; private String ramRoleName; private java.util.List < String > rdsInstances; private String scalingGroupId; private String scalingPolicy; private String securityGroupId; private java.util.List < String > securityGroupIds; private Boolean securityHardeningOs; private Boolean socEnabled; private Long spotInstancePools; private Boolean spotInstanceRemedy; private java.util.List < SpotPriceLimit> spotPriceLimit; private String spotStrategy; private Boolean systemDiskBurstingEnabled; private java.util.List < String > systemDiskCategories; private String systemDiskCategory; private String systemDiskEncryptAlgorithm; private Boolean systemDiskEncrypted; private String systemDiskKmsKeyId; private String systemDiskPerformanceLevel; private Long systemDiskProvisionedIops; private Long systemDiskSize; private java.util.List < Tag > tags; private java.util.List < String > vswitchIds; /** * Specifies whether to enable auto-renewal for the nodes in the node pool. This parameter takes effect only if `instance_charge_type` is set to `PrePaid`. Valid values: *

* * * `true` * * `false` */ public Builder autoRenew(Boolean autoRenew) { this.autoRenew = autoRenew; return this; } /** * The auto-renewal duration. This parameter takes effect and is required only if `instance_charge_type` is set to `PrePaid`. *

* * If you set `period_unit` to Month, the valid values of this parameter are 1, 2, 3, 6, and 12. */ public Builder autoRenewPeriod(Long autoRenewPeriod) { this.autoRenewPeriod = autoRenewPeriod; return this; } /** * Specifies whether to enable Center for Internet Security (CIS) reinforcement. CIS reinforcement can be enabled only if Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 is installed on nodes. */ public Builder cisEnabled(Boolean cisEnabled) { this.cisEnabled = cisEnabled; return this; } /** * Specifies whether to automatically create pay-as-you-go instances to meet the required number of ECS instances if preemptible instances cannot be created due to reasons such as the cost or insufficient inventory. This parameter takes effect if you set `multi_az_policy` to `COST_OPTIMIZED` Valid values: *

* * * `true` * * `false` */ public Builder compensateWithOnDemand(Boolean compensateWithOnDemand) { this.compensateWithOnDemand = compensateWithOnDemand; return this; } /** * The configurations of the data disks that are mounted to the nodes in the node pool. The configurations include the disk type and disk size. */ public Builder dataDisks(java.util.List < DataDisk > dataDisks) { this.dataDisks = dataDisks; return this; } /** * The deployment set ID. */ public Builder deploymentsetId(String deploymentsetId) { this.deploymentsetId = deploymentsetId; return this; } /** * The expected number of nodes in the node pool. */ public Builder desiredSize(Long desiredSize) { this.desiredSize = desiredSize; return this; } /** * The custom image ID. You can call the `DescribeKubernetesVersionMetadata` operation to query the images supported by ACK. */ public Builder imageId(String imageId) { this.imageId = imageId; return this; } /** * The type of the operating system image. */ public Builder imageType(String imageType) { this.imageType = imageType; return this; } /** * The billing method of the nodes in the node pool. Valid values: *

* * * `PrePaid`: subscription. * * `PostPaid`: pay-as-you-go. */ public Builder instanceChargeType(String instanceChargeType) { this.instanceChargeType = instanceChargeType; return this; } /** * instance_patterns. */ public Builder instancePatterns(java.util.List < InstancePatterns > instancePatterns) { this.instancePatterns = instancePatterns; return this; } /** * The list of instance types. You can select multiple instance types. When the system needs to create a node, it starts from the first instance type until the node is created. The instance type that is used to create the node varies based on the inventory. */ public Builder instanceTypes(java.util.List < String > instanceTypes) { this.instanceTypes = instanceTypes; return this; } /** * The billing method of the public IP address. */ public Builder internetChargeType(String internetChargeType) { this.internetChargeType = internetChargeType; return this; } /** * The maximum outbound bandwidth of the public IP address. Unit: Mbit/s. Valid values: 1 to 100. */ public Builder internetMaxBandwidthOut(Long internetMaxBandwidthOut) { this.internetMaxBandwidthOut = internetMaxBandwidthOut; return this; } /** * The name of the key pair. You must specify this parameter or the `login_password` parameter. *

* * You must specify the `key_pair` parameter if the node pool is a managed node pool. */ public Builder keyPair(String keyPair) { this.keyPair = keyPair; return this; } /** * Specifies whether a non-root user can log on to the ECS instance added to the node pool. */ public Builder loginAsNonRoot(Boolean loginAsNonRoot) { this.loginAsNonRoot = loginAsNonRoot; return this; } /** * The password for SSH logon. You must specify this parameter or the `key_pair` parameter. The password must be 8 to 30 characters in length, and must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. *

* * The returned password is encrypted to ensure security. */ public Builder loginPassword(String loginPassword) { this.loginPassword = loginPassword; return this; } /** * The ECS instance scaling policy for the multi-zone scaling group. Valid values: *

* * * `PRIORITY`: ECS instances are created based on the VSwitchIds.N parameter. If Auto Scaling fails to create an ECS instance in the zone of the vSwitch that has the highest priority, Auto Scaling attempts to create the ECS instance in the zone of the vSwitch that has a lower priority. * * * `COST_OPTIMIZED`: ECS instances are created based on the vCPU unit price in ascending order. Preemptible instances are preferably created when preemptible instance types are specified in the scaling configuration. You can specify `CompensateWithOnDemand` to specify whether to automatically create pay-as-you-go instances if preemptible instances cannot be created due to insufficient resources. * * ** * * **Note** `COST_OPTIMIZED` takes effect only if multiple instance types are specified or at least one preemptible instance type is specified. * * * `BALANCE`: ECS instances are evenly distributed across multiple zones specified by the scaling group. If the distribution of ECS instances across zones is not balanced due to reasons such as insufficient inventory, you can call the `RebalanceInstances` operation to evenly distribute the ECS instances across zones. For more information, see [RebalanceInstances](~~71516~~). */ public Builder multiAzPolicy(String multiAzPolicy) { this.multiAzPolicy = multiAzPolicy; return this; } /** * The minimum number of pay-as-you-go instances that must be kept in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances is smaller than the value of this parameter, Auto Scaling preferably creates pay-as-you-go instances */ public Builder onDemandBaseCapacity(Long onDemandBaseCapacity) { this.onDemandBaseCapacity = onDemandBaseCapacity; return this; } /** * The percentage of pay-as-you-go instances among the extra instances that exceed the number specified by `on_demand_base_capacity`. Valid values: 0 to 100. */ public Builder onDemandPercentageAboveBaseCapacity(Long onDemandPercentageAboveBaseCapacity) { this.onDemandPercentageAboveBaseCapacity = onDemandPercentageAboveBaseCapacity; return this; } /** * The subscription duration of the nodes in the node pool. This parameter takes effect and is required if you set `instance_charge_type` to `PrePaid`. *

* * If `period_unit` is set to Month, the valid values of period are 1, 2, 3, 6, 12, 24, 36, 48, and 60. */ public Builder period(Long period) { this.period = period; return this; } /** * The billing cycle of the nodes in the node pool. This parameter takes effect only if`instance_charge_type` is set to `PrePaid`. *

* * Valid value: `Month`, which indicates that the subscription duration is measured in months. */ public Builder periodUnit(String periodUnit) { this.periodUnit = periodUnit; return this; } /** * The operating system distribution. Valid values: *

* * * `CentOS` * * `AliyunLinux` * * `Windows` * * `WindowsCore` */ public Builder platform(String platform) { this.platform = platform; return this; } /** * The configurations of the private node pool. */ public Builder privatePoolOptions(PrivatePoolOptions privatePoolOptions) { this.privatePoolOptions = privatePoolOptions; return this; } /** * The name of the worker Resource Access Management (RAM) role. The RAM role is assigned to the worker nodes of the cluster to allow the worker nodes to manage ECS instances. */ public Builder ramPolicy(String ramPolicy) { this.ramPolicy = ramPolicy; return this; } /** * ram_role_name. */ public Builder ramRoleName(String ramRoleName) { this.ramRoleName = ramRoleName; return this; } /** * The ApsaraDB RDS instances. If you specify the list of ApsaraDB RDS instances, ECS instances in the cluster are automatically added to the whitelist of the ApsaraDB RDS instances. */ public Builder rdsInstances(java.util.List < String > rdsInstances) { this.rdsInstances = rdsInstances; return this; } /** * The scaling group ID. */ public Builder scalingGroupId(String scalingGroupId) { this.scalingGroupId = scalingGroupId; return this; } /** * The scaling mode of the scaling group. Valid values: *

* * * `release`: the standard mode. ECS instances are created and released based on the resource usage. * * `recycle`: the swift mode. ECS instances are created, stopped, or started during scaling events. This reduces the time required for the next scale-out event. When the instance is stopped, you are charged only for the storage service. This does not apply to ECS instances that are attached to local disks. */ public Builder scalingPolicy(String scalingPolicy) { this.scalingPolicy = scalingPolicy; return this; } /** * The ID of the security group to which the node pool is added. If the node pool is added to multiple security groups, the first ID in the value of the `security_group_ids` parameter is returned. */ public Builder securityGroupId(String securityGroupId) { this.securityGroupId = securityGroupId; return this; } /** * The IDs of security groups for the node pool. */ public Builder securityGroupIds(java.util.List < String > securityGroupIds) { this.securityGroupIds = securityGroupIds; return this; } /** * 阿里云OS安全加固。取值: *

* * - `true`:开启阿里云OS安全加固。 * - `false`:不开启阿里云OS安全加固。 * * 默认值:`false`。 */ public Builder securityHardeningOs(Boolean securityHardeningOs) { this.securityHardeningOs = securityHardeningOs; return this; } /** * Specifies whether to enable reinforcement based on classified protection. You can enable reinforcement based on classified protection only if Alibaba Cloud Linux 2 or Alibaba Cloud Linux 3 is installed on nodes. Alibaba Cloud provides standards for baseline check and a scanner to ensure the compliance of Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3 images with the level 3 standards of classified protection. */ public Builder socEnabled(Boolean socEnabled) { this.socEnabled = socEnabled; return this; } /** * The number of instance types that are available for creating preemptible instances. Auto Scaling creates preemptible instances of multiple instance types that are available at the lowest cost. Valid values: 1 to 10. */ public Builder spotInstancePools(Long spotInstancePools) { this.spotInstancePools = spotInstancePools; return this; } /** * Specifies whether to enable the supplementation of preemptible instances. If the supplementation of preemptible instances is enabled, when the scaling group receives a system message that a preemptible instance is to be reclaimed, the scaling group attempts to create a new instance to replace this instance. Valid values: *

* * * `true` * * `false` */ public Builder spotInstanceRemedy(Boolean spotInstanceRemedy) { this.spotInstanceRemedy = spotInstanceRemedy; return this; } /** * The bid configurations of preemptible instances. */ public Builder spotPriceLimit(java.util.List < SpotPriceLimit> spotPriceLimit) { this.spotPriceLimit = spotPriceLimit; return this; } /** * The bidding policy of preemptible instances. Valid values: *

* * * NoSpot: non-preemptible. * * SpotWithPriceLimit: specifies the highest bid. * * SpotAsPriceGo: automatically submits bids based on the up-to-date market price. * * For more information, see [Create a preemptible elastic container instance](~~157759~~). */ public Builder spotStrategy(String spotStrategy) { this.spotStrategy = spotStrategy; return this; } /** * Specifies whether to enable Burst for the system disk when the disk type is cloud_auto. */ public Builder systemDiskBurstingEnabled(Boolean systemDiskBurstingEnabled) { this.systemDiskBurstingEnabled = systemDiskBurstingEnabled; return this; } /** * The system disk types. The system attempts to create system disks from a disk type with a lower priority when the disk type with a higher priority is unavailable. Valid values: cloud: disk cloud_efficiency: utra disk cloud_ssd: standard SSD cloud_essd: Enterprise SSD (ESSD) */ public Builder systemDiskCategories(java.util.List < String > systemDiskCategories) { this.systemDiskCategories = systemDiskCategories; return this; } /** * The type of system disk. Valid values: *

* * * `cloud_efficiency`: ultra disk * * `cloud_ssd`: SSD */ public Builder systemDiskCategory(String systemDiskCategory) { this.systemDiskCategory = systemDiskCategory; return this; } /** * The algorithm that you want to use to encrypt the system disk. Set the value to aes-256. */ public Builder systemDiskEncryptAlgorithm(String systemDiskEncryptAlgorithm) { this.systemDiskEncryptAlgorithm = systemDiskEncryptAlgorithm; return this; } /** * Specifies whether to encrypt the system disk. Valid values: *

* * * true * * false */ public Builder systemDiskEncrypted(Boolean systemDiskEncrypted) { this.systemDiskEncrypted = systemDiskEncrypted; return this; } /** * The ID of the Key Management Service (KMS) key that is used to encrypt the system disk. */ public Builder systemDiskKmsKeyId(String systemDiskKmsKeyId) { this.systemDiskKmsKeyId = systemDiskKmsKeyId; return this; } /** * The performance level (PL) of the system disk. This parameter takes effect only for an ESSD. */ public Builder systemDiskPerformanceLevel(String systemDiskPerformanceLevel) { this.systemDiskPerformanceLevel = systemDiskPerformanceLevel; return this; } /** * The predefined read and write IOPS of the system disk when the disk type is cloud_auto. */ public Builder systemDiskProvisionedIops(Long systemDiskProvisionedIops) { this.systemDiskProvisionedIops = systemDiskProvisionedIops; return this; } /** * The size of the system disk. Unit: GiB. *

* * Valid values: 20 to 500. */ public Builder systemDiskSize(Long systemDiskSize) { this.systemDiskSize = systemDiskSize; return this; } /** * The tag that you want to add only to ECS instances. *

* * The tag key must be unique and cannot exceed 128 characters in length. The tag key and value must not start with aliyun or acs: or contain https:// or http://. */ public Builder tags(java.util.List < Tag > tags) { this.tags = tags; return this; } /** * The vSwitch IDs. You can specify 1 to 20 vSwitches. *

* * > To ensure high availability, we recommend that you select vSwitches in different zones. */ public Builder vswitchIds(java.util.List < String > vswitchIds) { this.vswitchIds = vswitchIds; return this; } public ScalingGroup build() { return new ScalingGroup(this); } } } public static class Status extends TeaModel { @com.aliyun.core.annotation.NameInMap("failed_nodes") private Long failedNodes; @com.aliyun.core.annotation.NameInMap("healthy_nodes") private Long healthyNodes; @com.aliyun.core.annotation.NameInMap("initial_nodes") private Long initialNodes; @com.aliyun.core.annotation.NameInMap("offline_nodes") private Long offlineNodes; @com.aliyun.core.annotation.NameInMap("removing_nodes") private Long removingNodes; @com.aliyun.core.annotation.NameInMap("serving_nodes") private Long servingNodes; @com.aliyun.core.annotation.NameInMap("state") private String state; @com.aliyun.core.annotation.NameInMap("total_nodes") private Long totalNodes; private Status(Builder builder) { this.failedNodes = builder.failedNodes; this.healthyNodes = builder.healthyNodes; this.initialNodes = builder.initialNodes; this.offlineNodes = builder.offlineNodes; this.removingNodes = builder.removingNodes; this.servingNodes = builder.servingNodes; this.state = builder.state; this.totalNodes = builder.totalNodes; } public static Builder builder() { return new Builder(); } public static Status create() { return builder().build(); } /** * @return failedNodes */ public Long getFailedNodes() { return this.failedNodes; } /** * @return healthyNodes */ public Long getHealthyNodes() { return this.healthyNodes; } /** * @return initialNodes */ public Long getInitialNodes() { return this.initialNodes; } /** * @return offlineNodes */ public Long getOfflineNodes() { return this.offlineNodes; } /** * @return removingNodes */ public Long getRemovingNodes() { return this.removingNodes; } /** * @return servingNodes */ public Long getServingNodes() { return this.servingNodes; } /** * @return state */ public String getState() { return this.state; } /** * @return totalNodes */ public Long getTotalNodes() { return this.totalNodes; } public static final class Builder { private Long failedNodes; private Long healthyNodes; private Long initialNodes; private Long offlineNodes; private Long removingNodes; private Long servingNodes; private String state; private Long totalNodes; /** * The number of failed nodes. */ public Builder failedNodes(Long failedNodes) { this.failedNodes = failedNodes; return this; } /** * The number of healthy nodes. */ public Builder healthyNodes(Long healthyNodes) { this.healthyNodes = healthyNodes; return this; } /** * The number of nodes that are being created. */ public Builder initialNodes(Long initialNodes) { this.initialNodes = initialNodes; return this; } /** * The number of offline nodes. */ public Builder offlineNodes(Long offlineNodes) { this.offlineNodes = offlineNodes; return this; } /** * The number of nodes that are being removed. */ public Builder removingNodes(Long removingNodes) { this.removingNodes = removingNodes; return this; } /** * The number of running nodes. */ public Builder servingNodes(Long servingNodes) { this.servingNodes = servingNodes; return this; } /** * The status of the node pool. Valid values: *

* * * `active`: The node pool is active. * * `scaling`: The node pool is being scaled. * * `removing`: The nodes are being removed from the node pool. * * `deleting`: The node pool is being deleted. * * `updating`: The node pool is being updated. */ public Builder state(String state) { this.state = state; return this; } /** * The total number of nodes in the node pool. */ public Builder totalNodes(Long totalNodes) { this.totalNodes = totalNodes; return this; } public Status build() { return new Status(this); } } } public static class TeeConfig extends TeaModel { @com.aliyun.core.annotation.NameInMap("tee_enable") private Boolean teeEnable; private TeeConfig(Builder builder) { this.teeEnable = builder.teeEnable; } public static Builder builder() { return new Builder(); } public static TeeConfig create() { return builder().build(); } /** * @return teeEnable */ public Boolean getTeeEnable() { return this.teeEnable; } public static final class Builder { private Boolean teeEnable; /** * Specifies whether to enable confidential computing for the cluster. Valid values: *

* * * `true` * * `false` */ public Builder teeEnable(Boolean teeEnable) { this.teeEnable = teeEnable; return this; } public TeeConfig build() { return new TeeConfig(this); } } } public static class Nodepools extends TeaModel { @com.aliyun.core.annotation.NameInMap("auto_scaling") private AutoScaling autoScaling; @com.aliyun.core.annotation.NameInMap("interconnect_config") private InterconnectConfig interconnectConfig; @com.aliyun.core.annotation.NameInMap("interconnect_mode") private String interconnectMode; @com.aliyun.core.annotation.NameInMap("kubernetes_config") private KubernetesConfig kubernetesConfig; @com.aliyun.core.annotation.NameInMap("management") private Management management; @com.aliyun.core.annotation.NameInMap("max_nodes") private Long maxNodes; @com.aliyun.core.annotation.NameInMap("node_config") private NodeConfig nodeConfig; @com.aliyun.core.annotation.NameInMap("nodepool_info") private NodepoolInfo nodepoolInfo; @com.aliyun.core.annotation.NameInMap("scaling_group") private ScalingGroup scalingGroup; @com.aliyun.core.annotation.NameInMap("status") private Status status; @com.aliyun.core.annotation.NameInMap("tee_config") private TeeConfig teeConfig; private Nodepools(Builder builder) { this.autoScaling = builder.autoScaling; this.interconnectConfig = builder.interconnectConfig; this.interconnectMode = builder.interconnectMode; this.kubernetesConfig = builder.kubernetesConfig; this.management = builder.management; this.maxNodes = builder.maxNodes; this.nodeConfig = builder.nodeConfig; this.nodepoolInfo = builder.nodepoolInfo; this.scalingGroup = builder.scalingGroup; this.status = builder.status; this.teeConfig = builder.teeConfig; } public static Builder builder() { return new Builder(); } public static Nodepools create() { return builder().build(); } /** * @return autoScaling */ public AutoScaling getAutoScaling() { return this.autoScaling; } /** * @return interconnectConfig */ public InterconnectConfig getInterconnectConfig() { return this.interconnectConfig; } /** * @return interconnectMode */ public String getInterconnectMode() { return this.interconnectMode; } /** * @return kubernetesConfig */ public KubernetesConfig getKubernetesConfig() { return this.kubernetesConfig; } /** * @return management */ public Management getManagement() { return this.management; } /** * @return maxNodes */ public Long getMaxNodes() { return this.maxNodes; } /** * @return nodeConfig */ public NodeConfig getNodeConfig() { return this.nodeConfig; } /** * @return nodepoolInfo */ public NodepoolInfo getNodepoolInfo() { return this.nodepoolInfo; } /** * @return scalingGroup */ public ScalingGroup getScalingGroup() { return this.scalingGroup; } /** * @return status */ public Status getStatus() { return this.status; } /** * @return teeConfig */ public TeeConfig getTeeConfig() { return this.teeConfig; } public static final class Builder { private AutoScaling autoScaling; private InterconnectConfig interconnectConfig; private String interconnectMode; private KubernetesConfig kubernetesConfig; private Management management; private Long maxNodes; private NodeConfig nodeConfig; private NodepoolInfo nodepoolInfo; private ScalingGroup scalingGroup; private Status status; private TeeConfig teeConfig; /** * The configurations of auto scaling. */ public Builder autoScaling(AutoScaling autoScaling) { this.autoScaling = autoScaling; return this; } /** * This parameter is discontinued. *

* * The network configurations of the edge node pool. This parameter takes effect only on edge node pools. */ public Builder interconnectConfig(InterconnectConfig interconnectConfig) { this.interconnectConfig = interconnectConfig; return this; } /** * The network type of the edge node pool. Valid values: basic and dedicated. This parameter takes effect only on edge node pools. */ public Builder interconnectMode(String interconnectMode) { this.interconnectMode = interconnectMode; return this; } /** * The configurations of the cluster. */ public Builder kubernetesConfig(KubernetesConfig kubernetesConfig) { this.kubernetesConfig = kubernetesConfig; return this; } /** * The configurations of managed node pools. Managed node pools are available only in professional managed Kubernetes clusters. */ public Builder management(Management management) { this.management = management; return this; } /** * The maximum number of nodes that can be created in the edge node pool. The value of this parameter must be greater than or equal to 0. A value of 0 indicates that the number of nodes in the node pool is limited only by the quota of nodes in the cluster. In most cases, this parameter is set to a value larger than 0 for edge node pools. This parameter is set to 0 for node pools whose types are ess or default edge node pools. */ public Builder maxNodes(Long maxNodes) { this.maxNodes = maxNodes; return this; } /** * The configurations of nodes. */ public Builder nodeConfig(NodeConfig nodeConfig) { this.nodeConfig = nodeConfig; return this; } /** * The information about the node pool. */ public Builder nodepoolInfo(NodepoolInfo nodepoolInfo) { this.nodepoolInfo = nodepoolInfo; return this; } /** * The configurations of the scaling group. */ public Builder scalingGroup(ScalingGroup scalingGroup) { this.scalingGroup = scalingGroup; return this; } /** * The status details of the node pool. */ public Builder status(Status status) { this.status = status; return this; } /** * The configurations of confidential computing. */ public Builder teeConfig(TeeConfig teeConfig) { this.teeConfig = teeConfig; return this; } public Nodepools build() { return new Nodepools(this); } } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy