com.pulumi.googlenative.dataproc.v1.outputs.InstanceGroupAutoscalingPolicyConfigResponse Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.googlenative.dataproc.v1.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.util.Objects;
@CustomType
public final class InstanceGroupAutoscalingPolicyConfigResponse {
/**
* @return Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
*
*/
private Integer maxInstances;
/**
* @return Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
*
*/
private Integer minInstances;
/**
* @return Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
*
*/
private Integer weight;
private InstanceGroupAutoscalingPolicyConfigResponse() {}
/**
* @return Maximum number of instances for this group. Required for primary workers. Note that by default, clusters will not use secondary workers. Required for secondary workers if the minimum secondary instances is set.Primary workers - Bounds: [min_instances, ). Secondary workers - Bounds: [min_instances, ). Default: 0.
*
*/
public Integer maxInstances() {
return this.maxInstances;
}
/**
* @return Optional. Minimum number of instances for this group.Primary workers - Bounds: 2, max_instances. Default: 2. Secondary workers - Bounds: 0, max_instances. Default: 0.
*
*/
public Integer minInstances() {
return this.minInstances;
}
/**
* @return Optional. Weight for the instance group, which is used to determine the fraction of total workers in the cluster from this instance group. For example, if primary workers have weight 2, and secondary workers have weight 1, the cluster will have approximately 2 primary workers for each secondary worker.The cluster may not reach the specified balance if constrained by min/max bounds or other autoscaling settings. For example, if max_instances for secondary workers is 0, then only primary workers will be added. The cluster can also be out of balance when created.If weight is not set on any instance group, the cluster will default to equal weight for all groups: the cluster will attempt to maintain an equal number of workers in each group within the configured size bounds for each group. If weight is set for one group only, the cluster will default to zero weight on the unset group. For example if weight is set only on primary workers, the cluster will use primary workers only and no secondary workers.
*
*/
public Integer weight() {
return this.weight;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(InstanceGroupAutoscalingPolicyConfigResponse defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private Integer maxInstances;
private Integer minInstances;
private Integer weight;
public Builder() {}
public Builder(InstanceGroupAutoscalingPolicyConfigResponse defaults) {
Objects.requireNonNull(defaults);
this.maxInstances = defaults.maxInstances;
this.minInstances = defaults.minInstances;
this.weight = defaults.weight;
}
@CustomType.Setter
public Builder maxInstances(Integer maxInstances) {
this.maxInstances = Objects.requireNonNull(maxInstances);
return this;
}
@CustomType.Setter
public Builder minInstances(Integer minInstances) {
this.minInstances = Objects.requireNonNull(minInstances);
return this;
}
@CustomType.Setter
public Builder weight(Integer weight) {
this.weight = Objects.requireNonNull(weight);
return this;
}
public InstanceGroupAutoscalingPolicyConfigResponse build() {
final var o = new InstanceGroupAutoscalingPolicyConfigResponse();
o.maxInstances = maxInstances;
o.minInstances = minInstances;
o.weight = weight;
return o;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy