RegionAutoscalers

For a list of methods for this resource, see the end of this page.

Resource representations

Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.

{
  "kind": "compute#autoscaler",
  "id": unsigned long,
  "creationTimestamp": string,
  "name": string,
  "description": string,
  "target": string,
  "autoscalingPolicy": {
    "minNumReplicas": integer,
    "maxNumReplicas": integer,
    "coolDownPeriodSec": integer,
    "cpuUtilization": {
      "utilizationTarget": double
    },
    "customMetricUtilizations": [
      {
        "metric": string,
        "utilizationTarget": double,
        "utilizationTargetType": string
      }
    ],
    "loadBalancingUtilization": {
      "utilizationTarget": double
    }
  },
  "zone": string,
  "region": string,
  "selfLink": string,
  "status": string,
  "statusDetails": [
    {
      "message": string,
      "type": string
    }
  ]
}
Property name Value Description Notes
autoscalingPolicy nested object The configuration parameters for the autoscaling algorithm. You can define one or more of the policies 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%.
autoscalingPolicy.coolDownPeriodSec integer The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.

Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
autoscalingPolicy.cpuUtilization nested object Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
autoscalingPolicy.cpuUtilization.utilizationTarget double The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.

If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.

If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
autoscalingPolicy.customMetricUtilizations[] list Configuration parameters of autoscaling based on a custom metric.
autoscalingPolicy.customMetricUtilizations[].metric string The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.

For example, the following is a valid metric:
compute.googleapis.com/instance/network/received_bytes_count
The following is not a valid metric because it does not increase or decrease based on usage:
compute.googleapis.com/instance/cpu/reserved_cores
autoscalingPolicy.customMetricUtilizations[].utilizationTarget double Target value of the metric which autoscaler should maintain. Must be a positive value.
autoscalingPolicy.customMetricUtilizations[].utilizationTargetType string Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
autoscalingPolicy.loadBalancingUtilization nested object Configuration parameters of autoscaling based on load balancer.
autoscalingPolicy.loadBalancingUtilization.utilizationTarget double Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
autoscalingPolicy.maxNumReplicas integer The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
autoscalingPolicy.minNumReplicas integer The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
creationTimestamp 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 unsigned long [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.
region string [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
status string [Output Only] The status of the autoscaler configuration.
statusDetails[] list [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.
statusDetails[].message string The status message.
statusDetails[].type string The type of error returned.
target string URL of the managed instance group that this autoscaler will scale.
zone string [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).

Methods

delete
Deletes the specified autoscaler.
get
Returns the specified autoscaler.
insert
Creates an autoscaler in the specified project using the data included in the request.
list
Retrieves a list of autoscalers contained within the specified region.
patch
Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.
testIamPermissions
Returns permissions that a caller has on the specified resource.
update
Updates an autoscaler in the specified project using the data included in the request.

Send feedback about...

Compute Engine