Reference documentation and code samples for the Google Cloud Compute V1 API class Google::Cloud::Compute::V1::Autoscaler.
Represents an Autoscaler resource.
Google Compute Engine has two Autoscaler resources:
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 theregionAutoscalers resource.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#autoscaling_policy
def autoscaling_policy() -> ::Google::Cloud::Compute::V1::AutoscalingPolicy-
(::Google::Cloud::Compute::V1::AutoscalingPolicy) — The configuration parameters for the autoscaling algorithm. You can define
one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
#autoscaling_policy=
def autoscaling_policy=(value) -> ::Google::Cloud::Compute::V1::AutoscalingPolicy-
value (::Google::Cloud::Compute::V1::AutoscalingPolicy) — The configuration parameters for the autoscaling algorithm. You can define
one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
-
(::Google::Cloud::Compute::V1::AutoscalingPolicy) — The configuration parameters for the autoscaling algorithm. You can define
one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
#creation_timestamp
def creation_timestamp() -> ::String- (::String) — Output only. [Output Only] Creation timestamp inRFC3339 text format.
#creation_timestamp=
def creation_timestamp=(value) -> ::String- value (::String) — Output only. [Output Only] Creation timestamp inRFC3339 text format.
- (::String) — Output only. [Output Only] Creation timestamp inRFC3339 text format.
#description
def description() -> ::String- (::String) — An optional description of this resource. Provide this property when you create the resource.
#description=
def description=(value) -> ::String- value (::String) — An optional description of this resource. Provide this property when you create the resource.
- (::String) — An optional description of this resource. Provide this property when you create the resource.
#id
def id() -> ::Integer- (::Integer) — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
#id=
def id=(value) -> ::Integer- value (::Integer) — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
- (::Integer) — Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.
#kind
def kind() -> ::String- (::String) — Output only. [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
#kind=
def kind=(value) -> ::String- value (::String) — Output only. [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
- (::String) — Output only. [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
#name
def name() -> ::String-
(::String) — Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?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.
#name=
def name=(value) -> ::String-
value (::String) — Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?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.
-
(::String) — Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression
[a-z]([-a-z0-9]*[a-z0-9])?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.
#recommended_size
def recommended_size() -> ::Integer- (::Integer) — Output only. [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.
#recommended_size=
def recommended_size=(value) -> ::Integer- value (::Integer) — Output only. [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.
- (::Integer) — Output only. [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.
#region
def region() -> ::String- (::String) — Output only. [Output Only] URL of theregion where the instance group resides (for autoscalers living in regional scope).
#region=
def region=(value) -> ::String- value (::String) — Output only. [Output Only] URL of theregion where the instance group resides (for autoscalers living in regional scope).
- (::String) — Output only. [Output Only] URL of theregion where the instance group resides (for autoscalers living in regional scope).
#scaling_schedule_status
def scaling_schedule_status() -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}- (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — Output only. [Output Only] Status information of existing scaling schedules.
#scaling_schedule_status=
def scaling_schedule_status=(value) -> ::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}- value (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — Output only. [Output Only] Status information of existing scaling schedules.
- (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — Output only. [Output Only] Status information of existing scaling schedules.
#self_link
def self_link() -> ::String- (::String) — [Output Only] Server-defined URL for the resource.
#self_link=
def self_link=(value) -> ::String- value (::String) — [Output Only] Server-defined URL for the resource.
- (::String) — [Output Only] Server-defined URL for the resource.
#status
def status() -> ::String-
(::String) — [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.
#status=
def status=(value) -> ::String-
value (::String) — [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.
-
(::String) — [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.
#status_details
def status_details() -> ::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>- (::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>) — [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation forCommonly returned status messages for examples of status messages you might encounter.
#status_details=
def status_details=(value) -> ::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>- value (::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>) — [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation forCommonly returned status messages for examples of status messages you might encounter.
- (::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>) — [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation forCommonly returned status messages for examples of status messages you might encounter.
#target
def target() -> ::String- (::String) — URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
#target=
def target=(value) -> ::String- value (::String) — URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
- (::String) — URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
#zone
def zone() -> ::String- (::String) — Output only. [Output Only] URL of thezone where the instance group resides (for autoscalers living in zonal scope).
#zone=
def zone=(value) -> ::String- value (::String) — Output only. [Output Only] URL of thezone where the instance group resides (for autoscalers living in zonal scope).
- (::String) — Output only. [Output Only] URL of thezone where the instance group resides (for autoscalers living in zonal scope).