
target.apidocs.com.google.api.services.compute.model.AutoscalingPolicy.html Maven / Gradle / Ivy
AutoscalingPolicy (Compute Engine API alpha-rev20200526-1.30.9)
com.google.api.services.compute.model
Class AutoscalingPolicy
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.compute.model.AutoscalingPolicy
-
public final class AutoscalingPolicy
extends GenericJson
Cloud Autoscaler policy.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Compute Engine API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
AutoscalingPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
AutoscalingPolicy
clone()
Integer
getCoolDownPeriodSec()
The number of seconds that the autoscaler should wait before it starts collecting information
from a new instance.
AutoscalingPolicyCpuUtilization
getCpuUtilization()
Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU
utilization of a managed instance group.
List<AutoscalingPolicyCustomMetricUtilization>
getCustomMetricUtilizations()
Configuration parameters of autoscaling based on a custom metric.
AutoscalingPolicyLoadBalancingUtilization
getLoadBalancingUtilization()
Configuration parameters of autoscaling based on load balancer.
Integer
getMaxNumReplicas()
The maximum number of instances that the autoscaler can scale up to.
Integer
getMinNumReplicas()
The minimum number of replicas that the autoscaler can scale down to.
String
getMode()
Defines operating mode for this policy.
AutoscalingPolicyScaleDownControl
getScaleDownControl()
AutoscalingPolicyScaleInControl
getScaleInControl()
AutoscalingPolicy
set(String fieldName,
Object value)
AutoscalingPolicy
setCoolDownPeriodSec(Integer coolDownPeriodSec)
The number of seconds that the autoscaler should wait before it starts collecting information
from a new instance.
AutoscalingPolicy
setCpuUtilization(AutoscalingPolicyCpuUtilization cpuUtilization)
Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU
utilization of a managed instance group.
AutoscalingPolicy
setCustomMetricUtilizations(List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations)
Configuration parameters of autoscaling based on a custom metric.
AutoscalingPolicy
setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization)
Configuration parameters of autoscaling based on load balancer.
AutoscalingPolicy
setMaxNumReplicas(Integer maxNumReplicas)
The maximum number of instances that the autoscaler can scale up to.
AutoscalingPolicy
setMinNumReplicas(Integer minNumReplicas)
The minimum number of replicas that the autoscaler can scale down to.
AutoscalingPolicy
setMode(String mode)
Defines operating mode for this policy.
AutoscalingPolicy
setScaleDownControl(AutoscalingPolicyScaleDownControl scaleDownControl)
AutoscalingPolicy
setScaleInControl(AutoscalingPolicyScaleInControl scaleInControl)
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getCoolDownPeriodSec
public Integer getCoolDownPeriodSec()
The number of seconds that the autoscaler should wait 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.
- Returns:
- value or
null
for none
-
setCoolDownPeriodSec
public AutoscalingPolicy setCoolDownPeriodSec(Integer coolDownPeriodSec)
The number of seconds that the autoscaler should wait 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.
- Parameters:
coolDownPeriodSec
- coolDownPeriodSec or null
for none
-
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.
- Returns:
- value or
null
for none
-
setCpuUtilization
public AutoscalingPolicy setCpuUtilization(AutoscalingPolicyCpuUtilization cpuUtilization)
Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU
utilization of a managed instance group.
- Parameters:
cpuUtilization
- cpuUtilization or null
for none
-
getCustomMetricUtilizations
public List<AutoscalingPolicyCustomMetricUtilization> getCustomMetricUtilizations()
Configuration parameters of autoscaling based on a custom metric.
- Returns:
- value or
null
for none
-
setCustomMetricUtilizations
public AutoscalingPolicy setCustomMetricUtilizations(List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations)
Configuration parameters of autoscaling based on a custom metric.
- Parameters:
customMetricUtilizations
- customMetricUtilizations or null
for none
-
getLoadBalancingUtilization
public AutoscalingPolicyLoadBalancingUtilization getLoadBalancingUtilization()
Configuration parameters of autoscaling based on load balancer.
- Returns:
- value or
null
for none
-
setLoadBalancingUtilization
public AutoscalingPolicy setLoadBalancingUtilization(AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization)
Configuration parameters of autoscaling based on load balancer.
- Parameters:
loadBalancingUtilization
- loadBalancingUtilization or null
for none
-
getMaxNumReplicas
public Integer getMaxNumReplicas()
The maximum number of instances that the autoscaler can scale up to. This is required when
creating or updating an autoscaler. The maximum number of replicas should not be lower than
minimal number of replicas.
- Returns:
- value or
null
for none
-
setMaxNumReplicas
public AutoscalingPolicy setMaxNumReplicas(Integer maxNumReplicas)
The maximum number of instances that the autoscaler can scale up to. This is required when
creating or updating an autoscaler. The maximum number of replicas should not be lower than
minimal number of replicas.
- Parameters:
maxNumReplicas
- maxNumReplicas or null
for none
-
getMinNumReplicas
public Integer getMinNumReplicas()
The minimum number of replicas that the autoscaler can scale down to. This cannot be less than
0. If not provided, autoscaler will choose a default value depending on maximum number of
instances allowed.
- Returns:
- value or
null
for none
-
setMinNumReplicas
public AutoscalingPolicy setMinNumReplicas(Integer minNumReplicas)
The minimum number of replicas that the autoscaler can scale down to. This cannot be less than
0. If not provided, autoscaler will choose a default value depending on maximum number of
instances allowed.
- Parameters:
minNumReplicas
- minNumReplicas or null
for none
-
getMode
public String getMode()
Defines operating mode for this policy.
- Returns:
- value or
null
for none
-
setMode
public AutoscalingPolicy setMode(String mode)
Defines operating mode for this policy.
- Parameters:
mode
- mode or null
for none
-
getScaleDownControl
public AutoscalingPolicyScaleDownControl getScaleDownControl()
- Returns:
- value or
null
for none
-
setScaleDownControl
public AutoscalingPolicy setScaleDownControl(AutoscalingPolicyScaleDownControl scaleDownControl)
- Parameters:
scaleDownControl
- scaleDownControl or null
for none
-
getScaleInControl
public AutoscalingPolicyScaleInControl getScaleInControl()
- Returns:
- value or
null
for none
-
setScaleInControl
public AutoscalingPolicy setScaleInControl(AutoscalingPolicyScaleInControl scaleInControl)
- Parameters:
scaleInControl
- scaleInControl or null
for none
-
set
public AutoscalingPolicy set(String fieldName,
Object value)
- Overrides:
set
in class GenericJson
-
clone
public AutoscalingPolicy clone()
- Overrides:
clone
in class GenericJson
Copyright © 2011–2020 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy