Class AutoscalingPolicy.Builder (1.17.0)

public static final class AutoscalingPolicy.Builder extends GeneratedMessageV3.Builder<AutoscalingPolicy.Builder> implements AutoscalingPolicyOrBuilder

Cloud Autoscaler policy.

Protobuf type google.cloud.compute.v1.AutoscalingPolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllCustomMetricUtilizations(Iterable<? extends AutoscalingPolicyCustomMetricUtilization> values)

public AutoscalingPolicy.Builder addAllCustomMetricUtilizations(Iterable<? extends AutoscalingPolicyCustomMetricUtilization> values)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization>
Returns
TypeDescription
AutoscalingPolicy.Builder

addCustomMetricUtilizations(AutoscalingPolicyCustomMetricUtilization value)

public AutoscalingPolicy.Builder addCustomMetricUtilizations(AutoscalingPolicyCustomMetricUtilization value)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
valueAutoscalingPolicyCustomMetricUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

addCustomMetricUtilizations(AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

public AutoscalingPolicy.Builder addCustomMetricUtilizations(AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
builderForValueAutoscalingPolicyCustomMetricUtilization.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

addCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization value)

public AutoscalingPolicy.Builder addCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization value)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameters
NameDescription
indexint
valueAutoscalingPolicyCustomMetricUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

addCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

public AutoscalingPolicy.Builder addCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameters
NameDescription
indexint
builderForValueAutoscalingPolicyCustomMetricUtilization.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

addCustomMetricUtilizationsBuilder()

public AutoscalingPolicyCustomMetricUtilization.Builder addCustomMetricUtilizationsBuilder()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
AutoscalingPolicyCustomMetricUtilization.Builder

addCustomMetricUtilizationsBuilder(int index)

public AutoscalingPolicyCustomMetricUtilization.Builder addCustomMetricUtilizationsBuilder(int index)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalingPolicyCustomMetricUtilization.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AutoscalingPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

build()

public AutoscalingPolicy build()
Returns
TypeDescription
AutoscalingPolicy

buildPartial()

public AutoscalingPolicy buildPartial()
Returns
TypeDescription
AutoscalingPolicy

clear()

public AutoscalingPolicy.Builder clear()
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

clearCoolDownPeriodSec()

public AutoscalingPolicy.Builder clearCoolDownPeriodSec()

The number of seconds that the autoscaler waits before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.

optional int32 cool_down_period_sec = 107692954;

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

clearCpuUtilization()

public AutoscalingPolicy.Builder clearCpuUtilization()

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Returns
TypeDescription
AutoscalingPolicy.Builder

clearCustomMetricUtilizations()

public AutoscalingPolicy.Builder clearCustomMetricUtilizations()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
AutoscalingPolicy.Builder

clearField(Descriptors.FieldDescriptor field)

public AutoscalingPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

clearLoadBalancingUtilization()

public AutoscalingPolicy.Builder clearLoadBalancingUtilization()

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Returns
TypeDescription
AutoscalingPolicy.Builder

clearMaxNumReplicas()

public AutoscalingPolicy.Builder clearMaxNumReplicas()

The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.

optional int32 max_num_replicas = 62327375;

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

clearMinNumReplicas()

public AutoscalingPolicy.Builder clearMinNumReplicas()

The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.

optional int32 min_num_replicas = 535329825;

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

clearMode()

public AutoscalingPolicy.Builder clearMode()

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public AutoscalingPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

clearScaleInControl()

public AutoscalingPolicy.Builder clearScaleInControl()

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Returns
TypeDescription
AutoscalingPolicy.Builder

clearScalingSchedules()

public AutoscalingPolicy.Builder clearScalingSchedules()
Returns
TypeDescription
AutoscalingPolicy.Builder

clone()

public AutoscalingPolicy.Builder clone()
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

containsScalingSchedules(String key)

public boolean containsScalingSchedules(String key)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getCoolDownPeriodSec()

public int getCoolDownPeriodSec()

The number of seconds that the autoscaler waits before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.

optional int32 cool_down_period_sec = 107692954;

Returns
TypeDescription
int

The coolDownPeriodSec.

getCpuUtilization()

public AutoscalingPolicyCpuUtilization getCpuUtilization()

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Returns
TypeDescription
AutoscalingPolicyCpuUtilization

The cpuUtilization.

getCpuUtilizationBuilder()

public AutoscalingPolicyCpuUtilization.Builder getCpuUtilizationBuilder()

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Returns
TypeDescription
AutoscalingPolicyCpuUtilization.Builder

getCpuUtilizationOrBuilder()

public AutoscalingPolicyCpuUtilizationOrBuilder getCpuUtilizationOrBuilder()

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Returns
TypeDescription
AutoscalingPolicyCpuUtilizationOrBuilder

getCustomMetricUtilizations(int index)

public AutoscalingPolicyCustomMetricUtilization getCustomMetricUtilizations(int index)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalingPolicyCustomMetricUtilization

getCustomMetricUtilizationsBuilder(int index)

public AutoscalingPolicyCustomMetricUtilization.Builder getCustomMetricUtilizationsBuilder(int index)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalingPolicyCustomMetricUtilization.Builder

getCustomMetricUtilizationsBuilderList()

public List<AutoscalingPolicyCustomMetricUtilization.Builder> getCustomMetricUtilizationsBuilderList()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
List<Builder>

getCustomMetricUtilizationsCount()

public int getCustomMetricUtilizationsCount()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
int

getCustomMetricUtilizationsList()

public List<AutoscalingPolicyCustomMetricUtilization> getCustomMetricUtilizationsList()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
List<AutoscalingPolicyCustomMetricUtilization>

getCustomMetricUtilizationsOrBuilder(int index)

public AutoscalingPolicyCustomMetricUtilizationOrBuilder getCustomMetricUtilizationsOrBuilder(int index)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalingPolicyCustomMetricUtilizationOrBuilder

getCustomMetricUtilizationsOrBuilderList()

public List<? extends AutoscalingPolicyCustomMetricUtilizationOrBuilder> getCustomMetricUtilizationsOrBuilderList()

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Returns
TypeDescription
List<? extends com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilizationOrBuilder>

getDefaultInstanceForType()

public AutoscalingPolicy getDefaultInstanceForType()
Returns
TypeDescription
AutoscalingPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLoadBalancingUtilization()

public AutoscalingPolicyLoadBalancingUtilization getLoadBalancingUtilization()

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Returns
TypeDescription
AutoscalingPolicyLoadBalancingUtilization

The loadBalancingUtilization.

getLoadBalancingUtilizationBuilder()

public AutoscalingPolicyLoadBalancingUtilization.Builder getLoadBalancingUtilizationBuilder()

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Returns
TypeDescription
AutoscalingPolicyLoadBalancingUtilization.Builder

getLoadBalancingUtilizationOrBuilder()

public AutoscalingPolicyLoadBalancingUtilizationOrBuilder getLoadBalancingUtilizationOrBuilder()

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Returns
TypeDescription
AutoscalingPolicyLoadBalancingUtilizationOrBuilder

getMaxNumReplicas()

public int getMaxNumReplicas()

The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.

optional int32 max_num_replicas = 62327375;

Returns
TypeDescription
int

The maxNumReplicas.

getMinNumReplicas()

public int getMinNumReplicas()

The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.

optional int32 min_num_replicas = 535329825;

Returns
TypeDescription
int

The minNumReplicas.

getMode()

public String getMode()

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
TypeDescription
String

The mode.

getModeBytes()

public ByteString getModeBytes()

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
TypeDescription
ByteString

The bytes for mode.

getMutableScalingSchedules()

public Map<String,AutoscalingPolicyScalingSchedule> getMutableScalingSchedules()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,AutoscalingPolicyScalingSchedule>

getScaleInControl()

public AutoscalingPolicyScaleInControl getScaleInControl()

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Returns
TypeDescription
AutoscalingPolicyScaleInControl

The scaleInControl.

getScaleInControlBuilder()

public AutoscalingPolicyScaleInControl.Builder getScaleInControlBuilder()

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Returns
TypeDescription
AutoscalingPolicyScaleInControl.Builder

getScaleInControlOrBuilder()

public AutoscalingPolicyScaleInControlOrBuilder getScaleInControlOrBuilder()

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Returns
TypeDescription
AutoscalingPolicyScaleInControlOrBuilder

getScalingSchedules()

public Map<String,AutoscalingPolicyScalingSchedule> getScalingSchedules()
Returns
TypeDescription
Map<String,AutoscalingPolicyScalingSchedule>

getScalingSchedulesCount()

public int getScalingSchedulesCount()

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Returns
TypeDescription
int

getScalingSchedulesMap()

public Map<String,AutoscalingPolicyScalingSchedule> getScalingSchedulesMap()

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Returns
TypeDescription
Map<String,AutoscalingPolicyScalingSchedule>

getScalingSchedulesOrDefault(String key, AutoscalingPolicyScalingSchedule defaultValue)

public AutoscalingPolicyScalingSchedule getScalingSchedulesOrDefault(String key, AutoscalingPolicyScalingSchedule defaultValue)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameters
NameDescription
keyString
defaultValueAutoscalingPolicyScalingSchedule
Returns
TypeDescription
AutoscalingPolicyScalingSchedule

getScalingSchedulesOrThrow(String key)

public AutoscalingPolicyScalingSchedule getScalingSchedulesOrThrow(String key)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameter
NameDescription
keyString
Returns
TypeDescription
AutoscalingPolicyScalingSchedule

hasCoolDownPeriodSec()

public boolean hasCoolDownPeriodSec()

The number of seconds that the autoscaler waits before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.

optional int32 cool_down_period_sec = 107692954;

Returns
TypeDescription
boolean

Whether the coolDownPeriodSec field is set.

hasCpuUtilization()

public boolean hasCpuUtilization()

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Returns
TypeDescription
boolean

Whether the cpuUtilization field is set.

hasLoadBalancingUtilization()

public boolean hasLoadBalancingUtilization()

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Returns
TypeDescription
boolean

Whether the loadBalancingUtilization field is set.

hasMaxNumReplicas()

public boolean hasMaxNumReplicas()

The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.

optional int32 max_num_replicas = 62327375;

Returns
TypeDescription
boolean

Whether the maxNumReplicas field is set.

hasMinNumReplicas()

public boolean hasMinNumReplicas()

The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.

optional int32 min_num_replicas = 535329825;

Returns
TypeDescription
boolean

Whether the minNumReplicas field is set.

hasMode()

public boolean hasMode()

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Returns
TypeDescription
boolean

Whether the mode field is set.

hasScaleInControl()

public boolean hasScaleInControl()

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Returns
TypeDescription
boolean

Whether the scaleInControl field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCpuUtilization(AutoscalingPolicyCpuUtilization value)

public AutoscalingPolicy.Builder mergeCpuUtilization(AutoscalingPolicyCpuUtilization value)

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Parameter
NameDescription
valueAutoscalingPolicyCpuUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

mergeFrom(AutoscalingPolicy other)

public AutoscalingPolicy.Builder mergeFrom(AutoscalingPolicy other)
Parameter
NameDescription
otherAutoscalingPolicy
Returns
TypeDescription
AutoscalingPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AutoscalingPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AutoscalingPolicy.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

mergeLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization value)

public AutoscalingPolicy.Builder mergeLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization value)

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Parameter
NameDescription
valueAutoscalingPolicyLoadBalancingUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

mergeScaleInControl(AutoscalingPolicyScaleInControl value)

public AutoscalingPolicy.Builder mergeScaleInControl(AutoscalingPolicyScaleInControl value)

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Parameter
NameDescription
valueAutoscalingPolicyScaleInControl
Returns
TypeDescription
AutoscalingPolicy.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AutoscalingPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

putAllScalingSchedules(Map<String,AutoscalingPolicyScalingSchedule> values)

public AutoscalingPolicy.Builder putAllScalingSchedules(Map<String,AutoscalingPolicyScalingSchedule> values)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameter
NameDescription
valuesMap<String,AutoscalingPolicyScalingSchedule>
Returns
TypeDescription
AutoscalingPolicy.Builder

putScalingSchedules(String key, AutoscalingPolicyScalingSchedule value)

public AutoscalingPolicy.Builder putScalingSchedules(String key, AutoscalingPolicyScalingSchedule value)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameters
NameDescription
keyString
valueAutoscalingPolicyScalingSchedule
Returns
TypeDescription
AutoscalingPolicy.Builder

removeCustomMetricUtilizations(int index)

public AutoscalingPolicy.Builder removeCustomMetricUtilizations(int index)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalingPolicy.Builder

removeScalingSchedules(String key)

public AutoscalingPolicy.Builder removeScalingSchedules(String key)

Scaling schedules defined for an autoscaler. Multiple schedules can be set on an autoscaler, and they can overlap. During overlapping periods the greatest min_required_replicas of all scaling schedules is applied. Up to 128 scaling schedules are allowed.

map<string, .google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> scaling_schedules = 355416580;

Parameter
NameDescription
keyString
Returns
TypeDescription
AutoscalingPolicy.Builder

setCoolDownPeriodSec(int value)

public AutoscalingPolicy.Builder setCoolDownPeriodSec(int value)

The number of seconds that the autoscaler waits before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.

optional int32 cool_down_period_sec = 107692954;

Parameter
NameDescription
valueint

The coolDownPeriodSec to set.

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

setCpuUtilization(AutoscalingPolicyCpuUtilization value)

public AutoscalingPolicy.Builder setCpuUtilization(AutoscalingPolicyCpuUtilization value)

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Parameter
NameDescription
valueAutoscalingPolicyCpuUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

setCpuUtilization(AutoscalingPolicyCpuUtilization.Builder builderForValue)

public AutoscalingPolicy.Builder setCpuUtilization(AutoscalingPolicyCpuUtilization.Builder builderForValue)

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.

optional .google.cloud.compute.v1.AutoscalingPolicyCpuUtilization cpu_utilization = 381211147;

Parameter
NameDescription
builderForValueAutoscalingPolicyCpuUtilization.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

setCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization value)

public AutoscalingPolicy.Builder setCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization value)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameters
NameDescription
indexint
valueAutoscalingPolicyCustomMetricUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

setCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

public AutoscalingPolicy.Builder setCustomMetricUtilizations(int index, AutoscalingPolicyCustomMetricUtilization.Builder builderForValue)

Configuration parameters of autoscaling based on a custom metric.

repeated .google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization custom_metric_utilizations = 131972850;

Parameters
NameDescription
indexint
builderForValueAutoscalingPolicyCustomMetricUtilization.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AutoscalingPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization value)

public AutoscalingPolicy.Builder setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization value)

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Parameter
NameDescription
valueAutoscalingPolicyLoadBalancingUtilization
Returns
TypeDescription
AutoscalingPolicy.Builder

setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization.Builder builderForValue)

public AutoscalingPolicy.Builder setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization.Builder builderForValue)

Configuration parameters of autoscaling based on load balancer.

optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;

Parameter
NameDescription
builderForValueAutoscalingPolicyLoadBalancingUtilization.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

setMaxNumReplicas(int value)

public AutoscalingPolicy.Builder setMaxNumReplicas(int value)

The maximum number of instances that the autoscaler can scale out to. This is required when creating or updating an autoscaler. The maximum number of replicas must not be lower than minimal number of replicas.

optional int32 max_num_replicas = 62327375;

Parameter
NameDescription
valueint

The maxNumReplicas to set.

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

setMinNumReplicas(int value)

public AutoscalingPolicy.Builder setMinNumReplicas(int value)

The minimum number of replicas that the autoscaler can scale in to. This cannot be less than 0. If not provided, autoscaler chooses a default value depending on maximum number of instances allowed.

optional int32 min_num_replicas = 535329825;

Parameter
NameDescription
valueint

The minNumReplicas to set.

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

setMode(String value)

public AutoscalingPolicy.Builder setMode(String value)

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Parameter
NameDescription
valueString

The mode to set.

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

setModeBytes(ByteString value)

public AutoscalingPolicy.Builder setModeBytes(ByteString value)

Defines operating mode for this policy. Check the Mode enum for the list of possible values.

optional string mode = 3357091;

Parameter
NameDescription
valueByteString

The bytes for mode to set.

Returns
TypeDescription
AutoscalingPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AutoscalingPolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides

setScaleInControl(AutoscalingPolicyScaleInControl value)

public AutoscalingPolicy.Builder setScaleInControl(AutoscalingPolicyScaleInControl value)

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Parameter
NameDescription
valueAutoscalingPolicyScaleInControl
Returns
TypeDescription
AutoscalingPolicy.Builder

setScaleInControl(AutoscalingPolicyScaleInControl.Builder builderForValue)

public AutoscalingPolicy.Builder setScaleInControl(AutoscalingPolicyScaleInControl.Builder builderForValue)

optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;

Parameter
NameDescription
builderForValueAutoscalingPolicyScaleInControl.Builder
Returns
TypeDescription
AutoscalingPolicy.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AutoscalingPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AutoscalingPolicy.Builder
Overrides