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%.
Generated from protobuf field optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041;
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%.
Generated from protobuf field optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041;
$this
getCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
string
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
var
string
$this
getDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
string
hasDescription
clearDescription
setDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
var
string
$this
getId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
int|string
hasId
clearId
setId
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
Generated from protobuf field optional uint64 id = 3355;
var
int|string
$this
getKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Generated from protobuf field optional string kind = 3292052;
string
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Generated from protobuf field optional string kind = 3292052;
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.
Generated from protobuf field optional string name = 3373707;
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.
Generated from protobuf field optional string name = 3373707;
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.
Generated from protobuf field optional int32 recommended_size = 257915749;
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.
Generated from protobuf field optional int32 recommended_size = 257915749;
var
int
$this
getRegion
[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Generated from protobuf field optional string region = 138946292;
string
hasRegion
clearRegion
setRegion
[Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Generated from protobuf field optional string region = 138946292;
var
string
$this
getScalingScheduleStatus
[Output Only] Status information of existing scaling schedules.
Generated from protobuf field map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;
Google\Protobuf\Internal\MapField
setScalingScheduleStatus
[Output Only] Status information of existing scaling schedules.
Generated from protobuf field map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178;
var
array|Google\Protobuf\Internal\MapField
$this
getSelfLink
[Output Only] Server-defined URL for the resource.
Generated from protobuf field optional string self_link = 456214797;
string
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined URL for the resource.
Generated from protobuf field optional string self_link = 456214797;
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.
Generated from protobuf field optional string status = 181260274;
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.
Generated from protobuf field optional string status = 181260274;
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.
Generated from protobuf field repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;
Google\Protobuf\Internal\RepeatedField
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.
Generated from protobuf field repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845;
$this
getTarget
URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
Generated from protobuf field optional string target = 192835985;
string
hasTarget
clearTarget
setTarget
URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler.
Generated from protobuf field optional string target = 192835985;
var
string
$this
getZone
[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Generated from protobuf field optional string zone = 3744684;
string
hasZone
clearZone
setZone
[Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Generated from protobuf field optional string zone = 3744684;
var
string
$this