Google Cloud Compute V1 API - Class Google::Cloud::Compute::V1::Autoscaler (v2.15.0)

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: * 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.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#autoscaling_policy

def autoscaling_policy() -> ::Google::Cloud::Compute::V1::AutoscalingPolicy
Returns
  • (::Google::Cloud::Compute::V1::AutoscalingPolicy) — 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%.

#autoscaling_policy=

def autoscaling_policy=(value) -> ::Google::Cloud::Compute::V1::AutoscalingPolicy
Parameter
  • 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, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Returns
  • (::Google::Cloud::Compute::V1::AutoscalingPolicy) — 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%.

#creation_timestamp

def creation_timestamp() -> ::String
Returns
  • (::String) — [Output Only] Creation timestamp in RFC3339 text format.

#creation_timestamp=

def creation_timestamp=(value) -> ::String
Parameter
  • value (::String) — [Output Only] Creation timestamp in RFC3339 text format.
Returns
  • (::String) — [Output Only] Creation timestamp in RFC3339 text format.

#description

def description() -> ::String
Returns
  • (::String) — An optional description of this resource. Provide this property when you create the resource.

#description=

def description=(value) -> ::String
Parameter
  • value (::String) — An optional description of this resource. Provide this property when you create the resource.
Returns
  • (::String) — An optional description of this resource. Provide this property when you create the resource.

#id

def id() -> ::Integer
Returns
  • (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.

#id=

def id=(value) -> ::Integer
Parameter
  • value (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Returns
  • (::Integer) — [Output Only] The unique identifier for the resource. This identifier is defined by the server.

#kind

def kind() -> ::String
Returns
  • (::String) — [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.

#kind=

def kind=(value) -> ::String
Parameter
  • value (::String) — [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Returns
  • (::String) — [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.

#name

def name() -> ::String
Returns
  • (::String) — 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]([-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
Parameter
  • 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 with RFC1035. 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.
Returns
  • (::String) — 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]([-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.
def recommended_size() -> ::Integer
Returns
  • (::Integer) — [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.
def recommended_size=(value) -> ::Integer
Parameter
  • value (::Integer) — [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.
Returns
  • (::Integer) — [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
Returns
  • (::String) — [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).

#region=

def region=(value) -> ::String
Parameter
  • value (::String) — [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Returns
  • (::String) — [Output Only] URL of the region 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}
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — [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}
Parameter
  • value (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — [Output Only] Status information of existing scaling schedules.
Returns
  • (::Google::Protobuf::Map{::String => ::Google::Cloud::Compute::V1::ScalingScheduleStatus}) — [Output Only] Status information of existing scaling schedules.
def self_link() -> ::String
Returns
  • (::String) — [Output Only] Server-defined URL for the resource.
def self_link=(value) -> ::String
Parameter
  • value (::String) — [Output Only] Server-defined URL for the resource.
Returns
  • (::String) — [Output Only] Server-defined URL for the resource.

#status

def status() -> ::String
Returns
  • (::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
Parameter
  • 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.
Returns
  • (::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>
Returns

#status_details=

def status_details=(value) -> ::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>
Parameter
  • value (::Array<::Google::Cloud::Compute::V1::AutoscalerStatusDetails>) — [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.
Returns

#target

def target() -> ::String
Returns
  • (::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
Parameter
  • value (::String) — URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
Returns
  • (::String) — URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.

#zone

def zone() -> ::String
Returns
  • (::String) — [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).

#zone=

def zone=(value) -> ::String
Parameter
  • value (::String) — [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Returns
  • (::String) — [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).