blob: d45bc025b039fa5567e2e248bcf377def5c8c525 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.autoscalers.html">autoscalers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070078 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Retrieves an aggregated list of autoscalers.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, zone, autoscaler, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Deletes the specified autoscaler.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<p class="toc_element">
87 <code><a href="#get">get(project, zone, autoscaler)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Creates an autoscaler in the specified project using the data included in the request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Retrieves a list of autoscalers contained within the specified zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070099 <code><a href="#patch">patch(project, zone, body=None, autoscaler=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -0700102 <code><a href="#update">update(project, zone, body=None, autoscaler=None, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700103<p class="firstline">Updates an autoscaler in the specified project using the data included in the request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<h3>Method Details</h3>
105<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700106 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107 <pre>Retrieves an aggregated list of autoscalers.
Takashi Matsuo06694102015-09-11 13:55:40 -0700108
109Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800110 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700112
Dan O'Mearadd494642020-05-01 07:42:23 -0700113For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700114
Dan O'Mearadd494642020-05-01 07:42:23 -0700115You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116
Bu Sun Kim65020912020-05-20 12:08:20 -0700117To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700119 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
120 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
121
122You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
123
124Currently, only sorting by `name` or `creationTimestamp desc` is supported.
125 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Takashi Matsuo06694102015-09-11 13:55:40 -0700126
127Returns:
128 An object of the form:
129
130 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
132 &quot;items&quot;: { # A list of AutoscalersScopedList resources.
133 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of autoscalers.
134 &quot;autoscalers&quot;: [ # [Output Only] A list of autoscalers contained in this scope.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700135 { # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 #
137 # Google Compute Engine has two Autoscaler resources:
138 #
139 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
140 #
141 # 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.
142 #
143 # For zonal managed instance groups resource, use the autoscaler resource.
144 #
145 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
146 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700148 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
149 &quot;coolDownPeriodSec&quot;: 42, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700150 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700151 # 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.
152 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
153 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700154 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700155 # 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.
156 #
157 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700158 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700159 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
160 { # Custom utilization metric policy.
161 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
162 #
163 # The metric must have a value type of INT64 or DOUBLE.
164 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
165 #
166 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
167 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 },
169 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700170 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
171 &quot;utilizationTarget&quot;: 3.14, # 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.
172 },
173 &quot;maxNumReplicas&quot;: 42, # 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.
174 &quot;minNumReplicas&quot;: 42, # 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.
175 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700176 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700177 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
178 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
179 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
180 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
181 &quot;name&quot;: &quot;A String&quot;, # 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.
182 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
183 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
184 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
185 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
186 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
187 # - DELETING: Configuration is being deleted.
188 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
189 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
190 &quot;statusDetails&quot;: [ # [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.
191 {
192 &quot;message&quot;: &quot;A String&quot;, # The status message.
193 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
194 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
195 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
196 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
197 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
198 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
199 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
200 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
201 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
202 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
203 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
204 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
205 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
206 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
207 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
208 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
209 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
210 },
211 ],
212 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
213 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
214 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700215 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700216 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of autoscalers when the list is empty.
217 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
218 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
219 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
220 {
221 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
222 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
223 },
224 ],
225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
226 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700227 },
228 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700229 &quot;kind&quot;: &quot;compute#autoscalerAggregatedList&quot;, # [Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.
230 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
231 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
232 &quot;warning&quot;: { # [Output Only] Informational warning message.
233 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
234 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
235 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
238 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 },
240 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700243 }</pre>
244</div>
245
246<div class="method">
247 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
248 <pre>Retrieves the next page of results.
249
250Args:
251 previous_request: The request for the previous page. (required)
252 previous_response: The response from the request for the previous page. (required)
253
254Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700255 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700256 page. Returns None if there are no more items in the collection.
257 </pre>
258</div>
259
260<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 <code class="details" id="delete">delete(project, zone, autoscaler, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700262 <pre>Deletes the specified autoscaler.
Takashi Matsuo06694102015-09-11 13:55:40 -0700263
264Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700266 zone: string, Name of the zone for this request. (required)
267 autoscaler: string, Name of the autoscaler to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700268 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
269
270For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
271
272The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700273
274Returns:
275 An object of the form:
276
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700277 { # Represents an Operation resource.
278 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # Google Compute Engine has three Operation resources:
280 #
281 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
282 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700283 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
284 #
285 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700286 # - For global operations, use the `globalOperations` resource.
287 # - For regional operations, use the `regionOperations` resource.
288 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700291 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
292 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
293 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
294 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
295 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
296 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700297 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
299 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
300 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700301 },
302 ],
303 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
305 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
306 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
307 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
308 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
309 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
310 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
311 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
312 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
313 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
314 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
315 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
316 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
317 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
318 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
319 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
320 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
321 {
322 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
323 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
324 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
325 {
326 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
327 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
328 },
329 ],
330 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
331 },
332 ],
333 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700334 }</pre>
335</div>
336
337<div class="method">
338 <code class="details" id="get">get(project, zone, autoscaler)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700339 <pre>Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700340
341Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800342 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700343 zone: string, Name of the zone for this request. (required)
344 autoscaler: string, Name of the autoscaler to return. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700345
346Returns:
347 An object of the form:
348
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 { # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700350 #
351 # Google Compute Engine has two Autoscaler resources:
352 #
353 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
354 #
355 # 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.
356 #
357 # For zonal managed instance groups resource, use the autoscaler resource.
358 #
359 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
360 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700362 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
363 &quot;coolDownPeriodSec&quot;: 42, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700364 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 # 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.
366 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
367 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700368 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 # 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.
370 #
371 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700372 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700373 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
374 { # Custom utilization metric policy.
375 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
376 #
377 # The metric must have a value type of INT64 or DOUBLE.
378 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
379 #
380 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
381 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 },
383 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700384 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
385 &quot;utilizationTarget&quot;: 3.14, # 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.
386 },
387 &quot;maxNumReplicas&quot;: 42, # 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.
388 &quot;minNumReplicas&quot;: 42, # 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.
389 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
390 },
391 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
392 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
393 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
394 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
395 &quot;name&quot;: &quot;A String&quot;, # 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.
396 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
397 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
398 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
399 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
400 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
401 # - DELETING: Configuration is being deleted.
402 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
403 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
404 &quot;statusDetails&quot;: [ # [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.
405 {
406 &quot;message&quot;: &quot;A String&quot;, # The status message.
407 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
408 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
409 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
410 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
411 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
412 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
413 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
414 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
415 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
416 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
417 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
418 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
419 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
420 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
421 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
422 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
423 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
424 },
425 ],
426 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
427 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
428 }</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700429</div>
430
431<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700432 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700433 <pre>Creates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700434
435Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800436 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700437 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700438 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 The object takes the form of:
440
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441{ # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700442 #
443 # Google Compute Engine has two Autoscaler resources:
444 #
445 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
446 #
447 # 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.
448 #
449 # For zonal managed instance groups resource, use the autoscaler resource.
450 #
451 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
452 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700453 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700454 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
455 &quot;coolDownPeriodSec&quot;: 42, # 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.
456 #
457 # 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.
458 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
459 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700460 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 # 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.
462 #
463 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700464 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700465 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
466 { # Custom utilization metric policy.
467 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
468 #
469 # The metric must have a value type of INT64 or DOUBLE.
470 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
471 #
472 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
473 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700474 },
475 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700476 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
477 &quot;utilizationTarget&quot;: 3.14, # 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.
478 },
479 &quot;maxNumReplicas&quot;: 42, # 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.
480 &quot;minNumReplicas&quot;: 42, # 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.
481 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
482 },
483 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
484 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
485 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
486 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
487 &quot;name&quot;: &quot;A String&quot;, # 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.
488 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
489 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
490 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
491 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
492 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
493 # - DELETING: Configuration is being deleted.
494 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
495 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
496 &quot;statusDetails&quot;: [ # [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.
497 {
498 &quot;message&quot;: &quot;A String&quot;, # The status message.
499 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
500 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
501 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
502 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
503 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
504 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
505 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
506 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
507 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
508 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
509 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
510 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
511 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
512 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
513 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
514 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
515 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
516 },
517 ],
518 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
519 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
520}
Takashi Matsuo06694102015-09-11 13:55:40 -0700521
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700522 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
523
524For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
525
526The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700527
528Returns:
529 An object of the form:
530
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700531 { # Represents an Operation resource.
532 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 # Google Compute Engine has three Operation resources:
534 #
535 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
536 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
538 #
539 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700540 # - For global operations, use the `globalOperations` resource.
541 # - For regional operations, use the `regionOperations` resource.
542 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700543 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700544 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700545 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
546 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
547 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
548 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
549 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
550 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700551 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
553 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
554 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700555 },
556 ],
557 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700558 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
559 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
560 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
561 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
562 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
563 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
564 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
565 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
566 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
567 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
568 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
569 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
570 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
571 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
572 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
573 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
574 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
575 {
576 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
577 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
578 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
579 {
580 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
581 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
582 },
583 ],
584 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
585 },
586 ],
587 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700588 }</pre>
589</div>
590
591<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700593 <pre>Retrieves a list of autoscalers contained within the specified zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700594
595Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800596 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700597 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700599
Dan O'Mearadd494642020-05-01 07:42:23 -0700600For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700601
Dan O'Mearadd494642020-05-01 07:42:23 -0700602You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800603
Bu Sun Kim65020912020-05-20 12:08:20 -0700604To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
605 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
606 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
607
608You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
609
610Currently, only sorting by `name` or `creationTimestamp desc` is supported.
611 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Takashi Matsuo06694102015-09-11 13:55:40 -0700612
613Returns:
614 An object of the form:
615
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700616 { # Contains a list of Autoscaler resources.
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
618 &quot;items&quot;: [ # A list of Autoscaler resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700619 { # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700620 #
621 # Google Compute Engine has two Autoscaler resources:
622 #
623 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
624 #
625 # 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.
626 #
627 # For zonal managed instance groups resource, use the autoscaler resource.
628 #
629 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
630 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700631 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700632 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
633 &quot;coolDownPeriodSec&quot;: 42, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700634 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700635 # 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.
636 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
637 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700638 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700639 # 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.
640 #
641 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700642 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700643 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
644 { # Custom utilization metric policy.
645 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
646 #
647 # The metric must have a value type of INT64 or DOUBLE.
648 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
649 #
650 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
651 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 },
653 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700654 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
655 &quot;utilizationTarget&quot;: 3.14, # 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.
656 },
657 &quot;maxNumReplicas&quot;: 42, # 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.
658 &quot;minNumReplicas&quot;: 42, # 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.
659 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
Takashi Matsuo06694102015-09-11 13:55:40 -0700660 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700661 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
662 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
663 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
664 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
665 &quot;name&quot;: &quot;A String&quot;, # 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.
666 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
667 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
668 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
669 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
670 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
671 # - DELETING: Configuration is being deleted.
672 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
673 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
674 &quot;statusDetails&quot;: [ # [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.
675 {
676 &quot;message&quot;: &quot;A String&quot;, # The status message.
677 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
678 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
679 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
680 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
681 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
682 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
683 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
684 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
685 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
686 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
687 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
688 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
689 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
690 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
691 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
692 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
693 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
694 },
695 ],
696 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
697 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
698 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700699 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700700 &quot;kind&quot;: &quot;compute#autoscalerList&quot;, # [Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.
701 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
702 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
703 &quot;warning&quot;: { # [Output Only] Informational warning message.
704 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
705 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
706 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700707 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700708 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
709 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700710 },
711 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700712 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700713 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700714 }</pre>
715</div>
716
717<div class="method">
718 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
719 <pre>Retrieves the next page of results.
720
721Args:
722 previous_request: The request for the previous page. (required)
723 previous_response: The response from the request for the previous page. (required)
724
725Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700727 page. Returns None if there are no more items in the collection.
728 </pre>
729</div>
730
731<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700732 <code class="details" id="patch">patch(project, zone, body=None, autoscaler=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700733 <pre>Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Takashi Matsuo06694102015-09-11 13:55:40 -0700734
735Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800736 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700737 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700738 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700739 The object takes the form of:
740
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700741{ # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 #
743 # Google Compute Engine has two Autoscaler resources:
744 #
745 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
746 #
747 # 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.
748 #
749 # For zonal managed instance groups resource, use the autoscaler resource.
750 #
751 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
752 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700754 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
755 &quot;coolDownPeriodSec&quot;: 42, # 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.
756 #
757 # 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.
758 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
759 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700760 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700761 # 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.
762 #
763 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700764 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700765 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
766 { # Custom utilization metric policy.
767 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
768 #
769 # The metric must have a value type of INT64 or DOUBLE.
770 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
771 #
772 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
773 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700774 },
775 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700776 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
777 &quot;utilizationTarget&quot;: 3.14, # 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.
778 },
779 &quot;maxNumReplicas&quot;: 42, # 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.
780 &quot;minNumReplicas&quot;: 42, # 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.
781 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
782 },
783 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
784 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
785 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
786 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
787 &quot;name&quot;: &quot;A String&quot;, # 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.
788 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
789 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
790 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
791 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
792 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
793 # - DELETING: Configuration is being deleted.
794 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
795 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
796 &quot;statusDetails&quot;: [ # [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.
797 {
798 &quot;message&quot;: &quot;A String&quot;, # The status message.
799 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
800 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
801 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
802 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
803 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
804 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
805 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
806 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
807 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
808 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
809 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
810 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
811 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
812 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
813 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
814 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
815 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
816 },
817 ],
818 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
819 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
820}
Takashi Matsuo06694102015-09-11 13:55:40 -0700821
Bu Sun Kim65020912020-05-20 12:08:20 -0700822 autoscaler: string, Name of the autoscaler to patch.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700823 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
824
825For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
826
827The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700828
829Returns:
830 An object of the form:
831
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700832 { # Represents an Operation resource.
833 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700834 # Google Compute Engine has three Operation resources:
835 #
836 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
837 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700838 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
839 #
840 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700841 # - For global operations, use the `globalOperations` resource.
842 # - For regional operations, use the `regionOperations` resource.
843 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700844 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700845 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700846 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
847 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
848 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
849 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
850 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
851 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -0700852 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700853 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
854 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
855 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -0700856 },
857 ],
858 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
860 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
861 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
862 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
863 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
864 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
865 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
866 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
867 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
868 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
869 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
870 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
871 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
872 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
873 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
874 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
875 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
876 {
877 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
878 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
879 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
880 {
881 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
882 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
883 },
884 ],
885 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
886 },
887 ],
888 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700889 }</pre>
890</div>
891
892<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700893 <code class="details" id="update">update(project, zone, body=None, autoscaler=None, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700894 <pre>Updates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700895
896Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800897 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700898 zone: string, Name of the zone for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700900 The object takes the form of:
901
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902{ # Represents an Autoscaler resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 #
904 # Google Compute Engine has two Autoscaler resources:
905 #
906 # * [Global](/compute/docs/reference/rest/{$api_version}/autoscalers) * [Regional](/compute/docs/reference/rest/{$api_version}/regionAutoscalers)
907 #
908 # 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.
909 #
910 # For zonal managed instance groups resource, use the autoscaler resource.
911 #
912 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for {$api_version}.autoscalers ==) (== resource_for {$api_version}.regionAutoscalers ==)
913 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700915 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
916 &quot;coolDownPeriodSec&quot;: 42, # 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.
917 #
918 # 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.
919 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
920 &quot;utilizationTarget&quot;: 3.14, # 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.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700921 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700922 # 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.
923 #
924 # 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700925 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700926 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
927 { # Custom utilization metric policy.
928 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
929 #
930 # The metric must have a value type of INT64 or DOUBLE.
931 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
932 #
933 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
934 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700935 },
936 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
938 &quot;utilizationTarget&quot;: 3.14, # 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.
939 },
940 &quot;maxNumReplicas&quot;: 42, # 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.
941 &quot;minNumReplicas&quot;: 42, # 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.
942 &quot;mode&quot;: &quot;A String&quot;, # Defines operating mode for this policy.
943 },
944 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
945 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
946 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
947 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
948 &quot;name&quot;: &quot;A String&quot;, # 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.
949 &quot;recommendedSize&quot;: 42, # [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates recommended MIG size even when autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to the existing managed instance group or autoscaler did not generate its prediction.
950 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
951 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
952 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of possible values:
953 # - PENDING: Autoscaler backend hasn&#x27;t read new/updated configuration.
954 # - DELETING: Configuration is being deleted.
955 # - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field.
956 # - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future.
957 &quot;statusDetails&quot;: [ # [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.
958 {
959 &quot;message&quot;: &quot;A String&quot;, # The status message.
960 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible values:
961 # - ALL_INSTANCES_UNHEALTHY (WARNING): All instances in the instance group are unhealthy (not in RUNNING state).
962 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR): There is no backend service attached to the instance group.
963 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING): Autoscaler recommends a size greater than maxNumReplicas.
964 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING): The custom metric samples are not exported often enough to be a credible base for autoscaling.
965 # - CUSTOM_METRIC_INVALID (ERROR): The custom metric that was specified does not exist or does not have the necessary labels.
966 # - MIN_EQUALS_MAX (WARNING): The minNumReplicas is equal to maxNumReplicas. This means the autoscaler cannot add or remove instances from the instance group.
967 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING): The autoscaler did not receive any data from the custom metric configured for autoscaling.
968 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING): The autoscaler is configured to scale based on a load balancing signal but the instance group has not received any requests from the load balancer.
969 # - MODE_OFF (WARNING): Autoscaling is turned off. The number of instances in the group won&#x27;t change automatically. The autoscaling configuration is preserved.
970 # - MODE_ONLY_UP (WARNING): Autoscaling is in the &quot;Autoscale only up&quot; mode. The autoscaler can add instances but not remove any.
971 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR): The instance group cannot be autoscaled because it has more than one backend service attached to it.
972 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR): There is insufficient quota for the necessary resources, such as CPU or number of instances.
973 # - REGION_RESOURCE_STOCKOUT (ERROR): Shown only for regional autoscalers: there is a resource stockout in the chosen region.
974 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR): The target to be scaled does not exist.
975 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION (ERROR): Autoscaling does not work with an HTTP/S load balancer that has been configured for maxRate.
976 # - ZONE_RESOURCE_STOCKOUT (ERROR): For zonal autoscalers: there is a resource stockout in the chosen zone. For regional autoscalers: in at least one of the zones you&#x27;re using there is a resource stockout. New values might be added in the future. Some of the values might not be available in all API versions.
977 },
978 ],
979 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale.
980 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
981}
Takashi Matsuo06694102015-09-11 13:55:40 -0700982
Bu Sun Kim65020912020-05-20 12:08:20 -0700983 autoscaler: string, Name of the autoscaler to update.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700984 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
985
986For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
987
988The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700989
990Returns:
991 An object of the form:
992
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 { # Represents an Operation resource.
994 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700995 # Google Compute Engine has three Operation resources:
996 #
997 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
998 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700999 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1000 #
1001 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001002 # - For global operations, use the `globalOperations` resource.
1003 # - For regional operations, use the `regionOperations` resource.
1004 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001006 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001007 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1008 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1009 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1010 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1011 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1012 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Takashi Matsuo06694102015-09-11 13:55:40 -07001013 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001014 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1015 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1016 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Takashi Matsuo06694102015-09-11 13:55:40 -07001017 },
1018 ],
1019 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001020 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1021 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1022 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1023 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1024 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1025 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1026 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1027 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1028 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1029 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1030 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1031 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1032 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1033 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1034 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1035 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1036 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1037 {
1038 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1039 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1040 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1041 {
1042 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1043 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1044 },
1045 ],
1046 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1047 },
1048 ],
1049 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Takashi Matsuo06694102015-09-11 13:55:40 -07001050 }</pre>
1051</div>
1052
1053</body></html>