Class Autoscaler (1.6.0-beta)

public final class Autoscaler extends GeneratedMessageV3 implements AutoscalerOrBuilder

Represents an Autoscaler resource. Google Compute Engine has two Autoscaler resources: * Zonal * Regional Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances. For zonal managed instance groups resource, use the autoscaler resource. For regional managed instance groups, use the regionAutoscalers resource.

Protobuf type google.cloud.compute.v1.Autoscaler

Implements

AutoscalerOrBuilder

Fields

AUTOSCALING_POLICY_FIELD_NUMBER

public static final int AUTOSCALING_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

CREATION_TIMESTAMP_FIELD_NUMBER

public static final int CREATION_TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int RECOMMENDED_SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

REGION_FIELD_NUMBER

public static final int REGION_FIELD_NUMBER
Field Value
TypeDescription
int

SCALING_SCHEDULE_STATUS_FIELD_NUMBER

public static final int SCALING_SCHEDULE_STATUS_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int SELF_LINK_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_DETAILS_FIELD_NUMBER

public static final int STATUS_DETAILS_FIELD_NUMBER
Field Value
TypeDescription
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_FIELD_NUMBER

public static final int TARGET_FIELD_NUMBER
Field Value
TypeDescription
int

ZONE_FIELD_NUMBER

public static final int ZONE_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

containsScalingScheduleStatus(String key)

public boolean containsScalingScheduleStatus(String key)

[Output Only] Status information of existing scaling schedules.

map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAutoscalingPolicy()

public AutoscalingPolicy getAutoscalingPolicy()

The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.

optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041;

Returns
TypeDescription
AutoscalingPolicy

The autoscalingPolicy.

getAutoscalingPolicyOrBuilder()

public AutoscalingPolicyOrBuilder getAutoscalingPolicyOrBuilder()

The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.

optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041;

Returns
TypeDescription
AutoscalingPolicyOrBuilder

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstance()

public static Autoscaler getDefaultInstance()
Returns
TypeDescription
Autoscaler

getDefaultInstanceForType()

public Autoscaler getDefaultInstanceForType()
Returns
TypeDescription
Autoscaler

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptor()

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

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getKind()

public String getKind()

[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getName()

public String getName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Autoscaler> getParserForType()
Returns
TypeDescription
Parser<Autoscaler>
Overrides

getRecommendedSize()

public int getRecommendedSize()

[Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction.

optional int32 recommended_size = 257915749;

Returns
TypeDescription
int

The recommendedSize.

getRegion()

public String getRegion()

[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).

optional string region = 138946292;

Returns
TypeDescription
ByteString

The bytes for region.

getScalingScheduleStatus()

public Map<String,ScalingScheduleStatus> getScalingScheduleStatus()
Returns
TypeDescription
Map<String,ScalingScheduleStatus>

getScalingScheduleStatusCount()

public int getScalingScheduleStatusCount()

[Output Only] Status information of existing scaling schedules.

map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;

Returns
TypeDescription
int

getScalingScheduleStatusMap()

public Map<String,ScalingScheduleStatus> getScalingScheduleStatusMap()

[Output Only] Status information of existing scaling schedules.

map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;

Returns
TypeDescription
Map<String,ScalingScheduleStatus>

getScalingScheduleStatusOrDefault(String key, ScalingScheduleStatus defaultValue)

public ScalingScheduleStatus getScalingScheduleStatusOrDefault(String key, ScalingScheduleStatus defaultValue)

[Output Only] Status information of existing scaling schedules.

map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;

Parameters
NameDescription
keyString
defaultValueScalingScheduleStatus
Returns
TypeDescription
ScalingScheduleStatus

getScalingScheduleStatusOrThrow(String key)

public ScalingScheduleStatus getScalingScheduleStatusOrThrow(String key)

[Output Only] Status information of existing scaling schedules.

map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;

Parameter
NameDescription
keyString
Returns
TypeDescription
ScalingScheduleStatus
public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStatus()

public String getStatus()

[Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

[Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
ByteString

The bytes for status.

getStatusDetails(int index)

public AutoscalerStatusDetails getStatusDetails(int index)

[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.

repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalerStatusDetails

getStatusDetailsCount()

public int getStatusDetailsCount()

[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.

repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;

Returns
TypeDescription
int

getStatusDetailsList()

public List<AutoscalerStatusDetails> getStatusDetailsList()

[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.

repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;

Returns
TypeDescription
List<AutoscalerStatusDetails>

getStatusDetailsOrBuilder(int index)

public AutoscalerStatusDetailsOrBuilder getStatusDetailsOrBuilder(int index)

[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.

repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;

Parameter
NameDescription
indexint
Returns
TypeDescription
AutoscalerStatusDetailsOrBuilder

getStatusDetailsOrBuilderList()

public List<? extends AutoscalerStatusDetailsOrBuilder> getStatusDetailsOrBuilderList()

[Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.

repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;

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

getTarget()

public String getTarget()

URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.

optional string target = 192835985;

Returns
TypeDescription
String

The target.

getTargetBytes()

public ByteString getTargetBytes()

URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.

optional string target = 192835985;

Returns
TypeDescription
ByteString

The bytes for target.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getZone()

public String getZone()

[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).

optional string zone = 3744684;

Returns
TypeDescription
String

The zone.

getZoneBytes()

public ByteString getZoneBytes()

[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).

optional string zone = 3744684;

Returns
TypeDescription
ByteString

The bytes for zone.

hasAutoscalingPolicy()

public boolean hasAutoscalingPolicy()

The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.

optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041;

Returns
TypeDescription
boolean

Whether the autoscalingPolicy field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in RFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasName()

public boolean hasName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasRecommendedSize()

public boolean hasRecommendedSize()

[Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction.

optional int32 recommended_size = 257915749;

Returns
TypeDescription
boolean

Whether the recommendedSize field is set.

hasRegion()

public boolean hasRegion()

[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).

optional string region = 138946292;

Returns
TypeDescription
boolean

Whether the region field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasStatus()

public boolean hasStatus()

[Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. Check the Status enum for the list of possible values.

optional string status = 181260274;

Returns
TypeDescription
boolean

Whether the status field is set.

hasTarget()

public boolean hasTarget()

URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.

optional string target = 192835985;

Returns
TypeDescription
boolean

Whether the target field is set.

hasZone()

public boolean hasZone()

[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).

optional string zone = 3744684;

Returns
TypeDescription
boolean

Whether the zone field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilder()

public static Autoscaler.Builder newBuilder()
Returns
TypeDescription
Autoscaler.Builder

newBuilder(Autoscaler prototype)

public static Autoscaler.Builder newBuilder(Autoscaler prototype)
Parameter
NameDescription
prototypeAutoscaler
Returns
TypeDescription
Autoscaler.Builder

newBuilderForType()

public Autoscaler.Builder newBuilderForType()
Returns
TypeDescription
Autoscaler.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Autoscaler.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Autoscaler.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

parseDelimitedFrom(InputStream input)

public static Autoscaler parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Autoscaler parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Autoscaler parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Autoscaler parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Autoscaler parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Autoscaler parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Autoscaler parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Autoscaler
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Autoscaler> parser()
Returns
TypeDescription
Parser<Autoscaler>

toBuilder()

public Autoscaler.Builder toBuilder()
Returns
TypeDescription
Autoscaler.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException