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.
Parameters | |
---|---|
Name | Description |
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 |
↳ 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;
Returns | |
---|---|
Type | Description |
Google\Cloud\Compute\V1\AutoscalingPolicy|null |
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;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Compute\V1\AutoscalingPolicy
|
Returns | |
---|---|
Type | Description |
$this |
getCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Returns | |
---|---|
Type | Description |
string |
hasCreationTimestamp
clearCreationTimestamp
setCreationTimestamp
[Output Only] Creation timestamp in RFC3339 text format.
Generated from protobuf field optional string creation_timestamp = 30525366;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getDescription
An optional description of this resource. Provide this property when you create the resource.
Generated from protobuf field optional string description = 422937596;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Generated from protobuf field optional string kind = 3292052;
Returns | |
---|---|
Type | Description |
string |
hasKind
clearKind
setKind
[Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Generated from protobuf field optional string kind = 3292052;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |
getSelfLink
[Output Only] Server-defined URL for the resource.
Generated from protobuf field optional string self_link = 456214797;
Returns | |
---|---|
Type | Description |
string |
hasSelfLink
clearSelfLink
setSelfLink
[Output Only] Server-defined URL for the resource.
Generated from protobuf field optional string self_link = 456214797;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Compute\V1\AutoscalerStatusDetails>
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$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;
Returns | |
---|---|
Type | Description |
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;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |