- 1.62.0 (latest)
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public static final class AutoscalingPolicy.Builder extends GeneratedMessageV3.Builder<AutoscalingPolicy.Builder> implements AutoscalingPolicyOrBuilder
Cloud Autoscaler policy.
Protobuf type google.cloud.compute.v1.AutoscalingPolicy
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > AutoscalingPolicy.BuilderImplements
AutoscalingPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization> |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | AutoscalingPolicyCustomMetricUtilization |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue | AutoscalingPolicyCustomMetricUtilization.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
value | AutoscalingPolicyCustomMetricUtilization |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
builderForValue | AutoscalingPolicyCustomMetricUtilization.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
AutoscalingPolicyCustomMetricUtilization.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AutoscalingPolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
build()
public AutoscalingPolicy build()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy |
buildPartial()
public AutoscalingPolicy buildPartial()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy |
clear()
public AutoscalingPolicy.Builder clear()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
clearField(Descriptors.FieldDescriptor field)
public AutoscalingPolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
clearLoadBalancingUtilization()
public AutoscalingPolicy.Builder clearLoadBalancingUtilization()
Configuration parameters of autoscaling based on load balancer.
optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
AutoscalingPolicy.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public AutoscalingPolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
clearScaleInControl()
public AutoscalingPolicy.Builder clearScaleInControl()
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
clearScalingSchedules()
public AutoscalingPolicy.Builder clearScalingSchedules()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
clone()
public AutoscalingPolicy.Builder clone()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
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 | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
List<? extends com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilizationOrBuilder> |
getDefaultInstanceForType()
public AutoscalingPolicy getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
AutoscalingPolicy |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getLoadBalancingUtilization()
public AutoscalingPolicyLoadBalancingUtilization getLoadBalancingUtilization()
Configuration parameters of autoscaling based on load balancer.
optional .google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization load_balancing_utilization = 429746403;
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ByteString | The bytes for mode. |
getMutableScalingSchedules()
public Map<String,AutoscalingPolicyScalingSchedule> getMutableScalingSchedules()
Use alternate mutation accessors instead.
Returns | |
---|---|
Type | Description |
Map<String,AutoscalingPolicyScalingSchedule> |
getScaleInControl()
public AutoscalingPolicyScaleInControl getScaleInControl()
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Returns | |
---|---|
Type | Description |
AutoscalingPolicyScaleInControl | The scaleInControl. |
getScaleInControlBuilder()
public AutoscalingPolicyScaleInControl.Builder getScaleInControlBuilder()
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Returns | |
---|---|
Type | Description |
AutoscalingPolicyScaleInControl.Builder |
getScaleInControlOrBuilder()
public AutoscalingPolicyScaleInControlOrBuilder getScaleInControlOrBuilder()
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Returns | |
---|---|
Type | Description |
AutoscalingPolicyScaleInControlOrBuilder |
getScalingSchedules()
public Map<String,AutoscalingPolicyScalingSchedule> getScalingSchedules()
Use #getScalingSchedulesMap() instead.
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
key | String |
defaultValue | AutoscalingPolicyScalingSchedule |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
boolean | Whether the mode field is set. |
hasScaleInControl()
public boolean hasScaleInControl()
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Returns | |
---|---|
Type | Description |
boolean | Whether the scaleInControl field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
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 | |
---|---|
Name | Description |
value | AutoscalingPolicyCpuUtilization |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
mergeFrom(AutoscalingPolicy other)
public AutoscalingPolicy.Builder mergeFrom(AutoscalingPolicy other)
Parameter | |
---|---|
Name | Description |
other | AutoscalingPolicy |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public AutoscalingPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public AutoscalingPolicy.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
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 | |
---|---|
Name | Description |
value | AutoscalingPolicyLoadBalancingUtilization |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
mergeScaleInControl(AutoscalingPolicyScaleInControl value)
public AutoscalingPolicy.Builder mergeScaleInControl(AutoscalingPolicyScaleInControl value)
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Parameter | |
---|---|
Name | Description |
value | AutoscalingPolicyScaleInControl |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AutoscalingPolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
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 | |
---|---|
Name | Description |
values | Map<String,AutoscalingPolicyScalingSchedule> |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
key | String |
value | AutoscalingPolicyScalingSchedule |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | int The coolDownPeriodSec to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | AutoscalingPolicyCpuUtilization |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue | AutoscalingPolicyCpuUtilization.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
value | AutoscalingPolicyCustomMetricUtilization |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int |
builderForValue | AutoscalingPolicyCustomMetricUtilization.Builder |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public AutoscalingPolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
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 | |
---|---|
Name | Description |
value | AutoscalingPolicyLoadBalancingUtilization |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
builderForValue | AutoscalingPolicyLoadBalancingUtilization.Builder |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | int The maxNumReplicas to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | int The minNumReplicas to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | String The mode to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | ByteString The bytes for mode to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
setScaleInControl(AutoscalingPolicyScaleInControl value)
public AutoscalingPolicy.Builder setScaleInControl(AutoscalingPolicyScaleInControl value)
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Parameter | |
---|---|
Name | Description |
value | AutoscalingPolicyScaleInControl |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
setScaleInControl(AutoscalingPolicyScaleInControl.Builder builderForValue)
public AutoscalingPolicy.Builder setScaleInControl(AutoscalingPolicyScaleInControl.Builder builderForValue)
optional .google.cloud.compute.v1.AutoscalingPolicyScaleInControl scale_in_control = 527670872;
Parameter | |
---|---|
Name | Description |
builderForValue | AutoscalingPolicyScaleInControl.Builder |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final AutoscalingPolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
AutoscalingPolicy.Builder |