Autoscaler

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.

To get more information about Autoscaler, see:

Create a Autoscaler Resource

def Autoscaler(resource_name, opts=None, autoscaling_policy=None, description=None, name=None, project=None, target=None, zone=None, __props__=None);
func NewAutoscaler(ctx *Context, name string, args AutoscalerArgs, opts ...ResourceOption) (*Autoscaler, error)
public Autoscaler(string name, AutoscalerArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args AutoscalerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AutoscalerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AutoscalerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Autoscaler Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Autoscaler resource accepts the following input properties:

AutoscalingPolicy AutoscalerAutoscalingPolicyArgs

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%. Structure is documented below.

Target string

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.

Description string

An optional description of this resource.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Zone string

URL of the zone where the instance group resides.

AutoscalingPolicy AutoscalerAutoscalingPolicy

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%. Structure is documented below.

Target string

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.

Description string

An optional description of this resource.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Zone string

URL of the zone where the instance group resides.

autoscalingPolicy AutoscalerAutoscalingPolicy

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%. Structure is documented below.

target string

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.

description string

An optional description of this resource.

name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

zone string

URL of the zone where the instance group resides.

autoscaling_policy Dict[AutoscalerAutoscalingPolicy]

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%. Structure is documented below.

target str

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.

description str

An optional description of this resource.

name str

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

zone str

URL of the zone where the instance group resides.

Outputs

All input properties are implicitly available as output properties. Additionally, the Autoscaler resource produces the following output properties:

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Id string
The provider-assigned unique ID for this managed resource.
SelfLink string

The URI of the created resource.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Id string
The provider-assigned unique ID for this managed resource.
SelfLink string

The URI of the created resource.

creationTimestamp string

Creation timestamp in RFC3339 text format.

id string
The provider-assigned unique ID for this managed resource.
selfLink string

The URI of the created resource.

creation_timestamp str

Creation timestamp in RFC3339 text format.

id str
The provider-assigned unique ID for this managed resource.
self_link str

The URI of the created resource.

Look up an Existing Autoscaler Resource

Get an existing Autoscaler resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AutoscalerState, opts?: CustomResourceOptions): Autoscaler
static get(resource_name, id, opts=None, autoscaling_policy=None, creation_timestamp=None, description=None, name=None, project=None, self_link=None, target=None, zone=None, __props__=None);
func GetAutoscaler(ctx *Context, name string, id IDInput, state *AutoscalerState, opts ...ResourceOption) (*Autoscaler, error)
public static Autoscaler Get(string name, Input<string> id, AutoscalerState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AutoscalingPolicy AutoscalerAutoscalingPolicyArgs

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%. Structure is documented below.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Description string

An optional description of this resource.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

SelfLink string

The URI of the created resource.

Target string

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.

Zone string

URL of the zone where the instance group resides.

AutoscalingPolicy AutoscalerAutoscalingPolicy

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%. Structure is documented below.

CreationTimestamp string

Creation timestamp in RFC3339 text format.

Description string

An optional description of this resource.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

SelfLink string

The URI of the created resource.

Target string

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.

Zone string

URL of the zone where the instance group resides.

autoscalingPolicy AutoscalerAutoscalingPolicy

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%. Structure is documented below.

creationTimestamp string

Creation timestamp in RFC3339 text format.

description string

An optional description of this resource.

name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

selfLink string

The URI of the created resource.

target string

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.

zone string

URL of the zone where the instance group resides.

autoscaling_policy Dict[AutoscalerAutoscalingPolicy]

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%. Structure is documented below.

creation_timestamp str

Creation timestamp in RFC3339 text format.

description str

An optional description of this resource.

name str

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

self_link str

The URI of the created resource.

target str

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.

zone str

URL of the zone where the instance group resides.

Supporting Types

AutoscalerAutoscalingPolicy

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MaxReplicas int

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.

MinReplicas int

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.

CooldownPeriod int

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.

CpuUtilization AutoscalerAutoscalingPolicyCpuUtilizationArgs

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.

LoadBalancingUtilization AutoscalerAutoscalingPolicyLoadBalancingUtilizationArgs

Configuration parameters of autoscaling based on a load balancer. Structure is documented below.

Metrics List<AutoscalerAutoscalingPolicyMetricArgs>

Configuration parameters of autoscaling based on a custom metric. Structure is documented below.

Mode string

Defines operating mode for this policy.

ScaleDownControl AutoscalerAutoscalingPolicyScaleDownControlArgs
MaxReplicas int

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.

MinReplicas int

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.

CooldownPeriod int

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.

CpuUtilization AutoscalerAutoscalingPolicyCpuUtilization

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.

LoadBalancingUtilization AutoscalerAutoscalingPolicyLoadBalancingUtilization

Configuration parameters of autoscaling based on a load balancer. Structure is documented below.

Metrics []AutoscalerAutoscalingPolicyMetric

Configuration parameters of autoscaling based on a custom metric. Structure is documented below.

Mode string

Defines operating mode for this policy.

ScaleDownControl AutoscalerAutoscalingPolicyScaleDownControl
maxReplicas number

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.

minReplicas number

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.

cooldownPeriod number

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.

cpuUtilization AutoscalerAutoscalingPolicyCpuUtilization

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.

loadBalancingUtilization AutoscalerAutoscalingPolicyLoadBalancingUtilization

Configuration parameters of autoscaling based on a load balancer. Structure is documented below.

metrics AutoscalerAutoscalingPolicyMetric[]

Configuration parameters of autoscaling based on a custom metric. Structure is documented below.

mode string

Defines operating mode for this policy.

scaleDownControl AutoscalerAutoscalingPolicyScaleDownControl
maxReplicas float

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.

minReplicas float

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.

cooldownPeriod float

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.

cpuUtilization Dict[AutoscalerAutoscalingPolicyCpuUtilization]

Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. Structure is documented below.

loadBalancingUtilization Dict[AutoscalerAutoscalingPolicyLoadBalancingUtilization]

Configuration parameters of autoscaling based on a load balancer. Structure is documented below.

metrics List[AutoscalerAutoscalingPolicyMetric]

Configuration parameters of autoscaling based on a custom metric. Structure is documented below.

mode str

Defines operating mode for this policy.

scaleDownControl Dict[AutoscalerAutoscalingPolicyScaleDownControl]

AutoscalerAutoscalingPolicyCpuUtilization

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Target 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.

Target float64

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.

target number

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.

target float

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.

AutoscalerAutoscalingPolicyLoadBalancingUtilization

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Target 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.

Target float64

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.

target number

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.

target float

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.

AutoscalerAutoscalingPolicyMetric

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Filter string

A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.

SingleInstanceAssignment double

If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target is pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.

Target 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.

Type string

Defines how target utilization value is expressed for a Stackdriver Monitoring metric.

Name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

Filter string

A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.

SingleInstanceAssignment float64

If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target is pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.

Target float64

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.

Type string

Defines how target utilization value is expressed for a Stackdriver Monitoring metric.

name string

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

filter string

A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.

singleInstanceAssignment number

If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target is pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.

target number

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.

type string

Defines how target utilization value is expressed for a Stackdriver Monitoring metric.

name str

The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.

filter str

A filter string to be used as the filter string for a Stackdriver Monitoring TimeSeries.list API call. This filter is used to select a specific TimeSeries for the purpose of autoscaling and to determine whether the metric is exporting per-instance or per-group data. You can only use the AND operator for joining selectors. You can only use direct equality comparison operator (=) without any functions for each selector. You can specify the metric in both the filter string and in the metric field. However, if specified in both places, the metric must be identical. The monitored resource type determines what kind of values are expected for the metric. If it is a gce_instance, the autoscaler expects the metric to include a separate TimeSeries for each instance in a group. In such a case, you cannot filter on resource labels. If the resource type is any other value, the autoscaler expects this metric to contain values that apply to the entire autoscaled instance group and resource label filtering can be performed to point autoscaler at the correct TimeSeries to scale upon. This is called a per-group metric for the purpose of autoscaling. If not specified, the type defaults to gce_instance. You should provide a filter that is selective enough to pick just one TimeSeries for the autoscaled group or for each of the instances (if you are using gce_instance resource type). If multiple TimeSeries are returned upon the query execution, the autoscaler will sum their respective values to obtain its scaling value.

singleInstanceAssignment float

If scaling is based on a per-group metric value that represents the total amount of work to be done or resource usage, set this value to an amount assigned for a single instance of the scaled group. The autoscaler will keep the number of instances proportional to the value of this metric, the metric itself should not change value due to group resizing. For example, a good metric to use with the target is pubsub.googleapis.com/subscription/num_undelivered_messages or a custom metric exporting the total number of requests coming to your instances. A bad example would be a metric exporting an average or median latency, since this value can’t include a chunk assignable to a single instance, it could be better used with utilization_target instead.

target float

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.

type str

Defines how target utilization value is expressed for a Stackdriver Monitoring metric.

AutoscalerAutoscalingPolicyScaleDownControl

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MaxScaledDownReplicas AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicasArgs

A nested object resource Structure is documented below.

TimeWindowSec int

How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above.

MaxScaledDownReplicas AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas

A nested object resource Structure is documented below.

TimeWindowSec int

How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above.

maxScaledDownReplicas AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas

A nested object resource Structure is documented below.

timeWindowSec number

How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above.

maxScaledDownReplicas Dict[AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas]

A nested object resource Structure is documented below.

timeWindowSec float

How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above.

AutoscalerAutoscalingPolicyScaleDownControlMaxScaledDownReplicas

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Fixed int

Specifies a fixed number of VM instances. This must be a positive integer.

Percent int

Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.

Fixed int

Specifies a fixed number of VM instances. This must be a positive integer.

Percent int

Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.

fixed number

Specifies a fixed number of VM instances. This must be a positive integer.

percent number

Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.

fixed float

Specifies a fixed number of VM instances. This must be a positive integer.

percent float

Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.