Reference documentation and code samples for the Compute V1 Client class 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.
Generated from protobuf message google.cloud.compute.v1.Autoscaler
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ autoscaling_policy
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
string
[Output Only] Creation timestamp in RFC3339 text format.
↳ description
string
An optional description of this resource. Provide this property when you create the resource.
↳ id
int|string
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
↳ kind
string
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
↳ name
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.
↳ recommended_size
int
[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
string
[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
↳ scaling_schedule_status
array| Google\Protobuf\Internal\MapField
[Output Only] Status information of existing scaling schedules.
↳ self_link
string
[Output Only] Server-defined URL for the resource.
↳ status
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
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.
↳ target
string
URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
↳ zone
string
[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
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%.
hasAutoscalingPolicy
clearAutoscalingPolicy
setAutoscalingPolicy
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%.
$this
getCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
string
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
var
string
$this
getDescription
An optional description of this resource. Provide this property when you create the resource.
string
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
var
string
$this
getId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
int|string
hasId
clearId
setId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
var
int|string
$this
getKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
string
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
var
string
$this
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]([-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
hasName
clearName
setName
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.
var
string
$this
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.
int
hasRecommendedSize
clearRecommendedSize
setRecommendedSize
[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.
var
int
$this
getRegion
[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
string
hasRegion
clearRegion
setRegion
[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
var
string
$this
getScalingScheduleStatus
[Output Only] Status information of existing scaling schedules.
setScalingScheduleStatus
[Output Only] Status information of existing scaling schedules.
$this
getSelfLink
[Output Only] Server-defined URL for the resource.
string
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined URL for the resource.
var
string
$this
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.
string
hasStatus
clearStatus
setStatus
[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.
var
string
$this
getStatusDetails
[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.
setStatusDetails
[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.
$this
getTarget
URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
string
hasTarget
clearTarget
setTarget
URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
var
string
$this
getZone
[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
string
hasZone
clearZone
setZone
[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
var
string
$this