Debian Codegraph @

docs/dyn/compute_beta.autoscalers.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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_beta.html">Compute Engine API</a> . <a href="compute_beta.autoscalers.html">autoscalers</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Retrieves an aggregated list of autoscalers.</p>
80 <p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next()</a></code></p>
82 <p class="firstline">Retrieves the next page of results.</p>
83 <p class="toc_element">
84 <code><a href="#close">close()</a></code></p>
85 <p class="firstline">Close httplib2 connections.</p>
86 <p class="toc_element">
87 <code><a href="#delete">delete(project, zone, autoscaler, requestId=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Deletes the specified autoscaler.</p>
89 <p class="toc_element">
90 <code><a href="#get">get(project, zone, autoscaler, x__xgafv=None)</a></code></p>
91 <p class="firstline">Returns the specified autoscaler resource.</p>
92 <p class="toc_element">
93 <code><a href="#insert">insert(project, zone, body=None, requestId=None, x__xgafv=None)</a></code></p>
94 <p class="firstline">Creates an autoscaler in the specified project using the data</p>
95 <p class="toc_element">
96 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Retrieves a list of autoscalers contained within</p>
98 <p class="toc_element">
99 <code><a href="#list_next">list_next()</a></code></p>
100 <p class="firstline">Retrieves the next page of results.</p>
101 <p class="toc_element">
102 <code><a href="#patch">patch(project, zone, autoscaler=None, body=None, requestId=None, x__xgafv=None)</a></code></p>
103 <p class="firstline">Updates an autoscaler in the specified project using the data</p>
104 <p class="toc_element">
105 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</a></code></p>
106 <p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107 <p class="toc_element">
108 <code><a href="#update">update(project, zone, autoscaler=None, body=None, requestId=None, x__xgafv=None)</a></code></p>
109 <p class="firstline">Updates an autoscaler in the specified project using the data</p>
110 <h3>Method Details</h3>
111 <div class="method">
112 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, serviceProjectNumber=None, x__xgafv=None)</code>
113 <pre>Retrieves an aggregated list of autoscalers.
114
115 To prevent failure, it is recommended that you set the
116 `returnPartialSuccess` parameter to `true`.
117
118 Args:
119 project: string, Project ID for this request. (required)
120 filter: string, A filter expression that filters resources listed in the response. Most
121 Compute resources support two types of filter expressions:
122 expressions that support regular expressions and expressions that follow
123 API improvement proposal AIP-160.
124 These two types of filter expressions cannot be mixed in one request.
125
126 If you want to use AIP-160, your expression must specify the field name, an
127 operator, and the value that you want to use for filtering. The value
128 must be a string, a number, or a boolean. The operator
129 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
130
131 For example, if you are filtering Compute Engine instances, you can
132 exclude instances named `example-instance` by specifying
133 `name != example-instance`.
134
135 The `:*` comparison can be used to test whether a key has been defined.
136 For example, to find all objects with `owner` label use:
137 ```
138 labels.owner:*
139 ```
140
141 You can also filter nested fields. For example, you could specify
142 `scheduling.automaticRestart = false` to include instances only
143 if they are not scheduled for automatic restarts. You can use filtering
144 on nested fields to filter based onresource labels.
145
146 To filter on multiple expressions, provide each separate expression within
147 parentheses. For example:
148 ```
149 (scheduling.automaticRestart = true)
150 (cpuPlatform = &quot;Intel Skylake&quot;)
151 ```
152 By default, each expression is an `AND` expression. However, you
153 can include `AND` and `OR` expressions explicitly.
154 For example:
155 ```
156 (cpuPlatform = &quot;Intel Skylake&quot;) OR
157 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
158 (scheduling.automaticRestart = true)
159 ```
160
161 If you want to use a regular expression, use the `eq` (equal) or `ne`
162 (not equal) operator against a single un-parenthesized expression with or
163 without quotes or against multiple parenthesized expressions. Examples:
164
165 `fieldname eq unquoted literal`
166 `fieldname eq &#x27;single quoted literal&#x27;`
167 `fieldname eq &quot;double quoted literal&quot;`
168 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
169
170 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
171 The literal value must match the entire field.
172
173 For example, to filter for instances that do not end with name &quot;instance&quot;,
174 you would use `name ne .*instance`.
175
176 You cannot combine constraints on multiple fields using regular
177 expressions.
178 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region,
179 global) should be included in the response. For new resource types added
180 after this field, the flag has no effect as new resource types will always
181 include every visible scope for each scope type in response. For resource
182 types which predate this field, if this flag is omitted or false, only
183 scopes of the scope types where the resource type is expected to be found
184 will be included.
185 maxResults: integer, The maximum number of results per page that should be returned.
186 If the number of available results is larger than `maxResults`,
187 Compute Engine returns a `nextPageToken` that can be used to get
188 the next page of results in subsequent list requests. Acceptable values are
189 `0` to `500`, inclusive. (Default: `500`)
190 orderBy: string, Sorts list results by a certain order. By default, results
191 are returned in alphanumerical order based on the resource name.
192
193 You can also sort results in descending order based on the creation
194 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
195 results based on the `creationTimestamp` field in
196 reverse chronological order (newest result first). Use this to sort
197 resources like operations so that the newest operation is returned first.
198
199 Currently, only sorting by `name` or
200 `creationTimestamp desc` is supported.
201 pageToken: string, Specifies a page token to use. Set `pageToken` to the
202 `nextPageToken` returned by a previous list request to get
203 the next page of results.
204 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
205 of failure. The default value is false.
206
207 For example, when partial success behavior is enabled, aggregatedList for a
208 single zone scope either returns all resources in the zone or no resources,
209 with an error code.
210 serviceProjectNumber: string, The Shared VPC service project id or service project number for which
211 aggregated list request is invoked for subnetworks list-usable api.
212 x__xgafv: string, V1 error format.
213 Allowed values
214 1 - v1 error format
215 2 - v2 error format
216
217 Returns:
218 An object of the form:
219
220 {
221 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
222 &quot;items&quot;: { # A list of AutoscalersScopedList resources.
223 &quot;a_key&quot;: { # [Output Only] Name of the scope containing this set of autoscalers.
224 &quot;autoscalers&quot;: [ # [Output Only] A list of autoscalers contained in this scope.
225 { # Represents an Autoscaler resource.
226 #
227 # Google Compute Engine has two Autoscaler resources:
228 #
229 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
230 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
231 #
232 # Use autoscalers to automatically add or delete instances from a
233 # managed instance group according to your defined autoscaling policy.
234 # For more information, read Autoscaling Groups of Instances.
235 #
236 # For zonal managed instance groups resource, use the autoscaler
237 # resource.
238 #
239 # For regional managed instance groups, use theregionAutoscalers resource.
240 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
241 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
242 #
243 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
244 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
245 # instance. This is referred to as the
246 # [initialization period](/compute/docs/autoscaler#cool_down_period).
247 # Specifying an accurate initialization period improves
248 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
249 # data from VMs that are still initializing because those VMs might not yet
250 # represent normal usage of your application. The default initialization
251 # period is 60 seconds.
252 #
253 # Initialization periods might vary because of numerous
254 # factors. We recommend that you test how long your application takes to
255 # initialize. To do this, create a VM and time your application&#x27;s startup
256 # process.
257 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
258 # based on the average CPU utilization of a managed instance group.
259 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
260 # Valid values are:
261 #
262 # * NONE (default). No predictive method is used. The autoscaler scales the
263 # group to meet current demand based on real-time metrics.
264 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
265 # monitoring daily and weekly load patterns and scaling out ahead of
266 # anticipated demand.
267 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
268 # a float value in the range (0, 1]. If not specified, the default is0.6.
269 #
270 # If the CPU level is below the target utilization, the autoscaler scales
271 # in the number of instances until it reaches the minimum number of
272 # instances you specified or until the average CPU of your instances
273 # reaches the target utilization.
274 #
275 # If the average CPU is above the target utilization, the autoscaler
276 # scales out until it reaches the maximum number of instances you
277 # specified or until the average utilization reaches the target
278 # utilization.
279 },
280 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
281 { # Custom utilization metric policy.
282 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
283 # used to select a specific TimeSeries for the purpose of autoscaling and
284 # to determine whether the metric is exporting per-instance or
285 # per-group data.
286 #
287 # For the filter to be valid for autoscaling purposes, the following rules
288 # apply:
289 #
290 #
291 # - You can only use the AND operator for joining
292 # selectors.
293 # - You can only use direct equality comparison operator
294 # (=) without any functions for each selector.
295 # - You can specify the metric in both the filter string and in the
296 # metric field. However, if specified in both places, the metric must
297 # be identical.
298 # - The monitored resource type
299 # determines what kind of values are expected for the metric. If it is
300 # a gce_instance, the autoscaler expects the metric to
301 # include a separate TimeSeries for each instance in a group. In such a
302 # case, you cannot filter on resource labels.
303 #
304 #
305 # If the resource type is any other value, the autoscaler expects
306 # this metric to contain values that apply to the entire autoscaled
307 # instance group and resource label filtering can be performed to
308 # point autoscaler at the correct TimeSeries to scale upon. This is
309 # called a *per-group metric* for the purpose of autoscaling.
310 #
311 # If not specified, the type defaults to
312 # gce_instance.
313 #
314 #
315 #
316 # Try to provide a filter that is selective enough to pick just one
317 # TimeSeries for the autoscaled group or for each of the instances (if you
318 # are using gce_instance resource type). If multiple
319 # TimeSeries are returned upon the query execution, the autoscaler will sum
320 # their respective values to obtain its scaling value.
321 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
322 # cannot have negative values.
323 #
324 # The metric must have a value type of INT64 orDOUBLE.
325 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
326 # total amount of work to be done or resource usage, set this value to an
327 # amount assigned for a single instance of the scaled group. Autoscaler
328 # keeps the number of instances proportional to the value of this
329 # metric. The metric itself does not change value due to group
330 # resizing.
331 #
332 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
333 # or a custom metric exporting the total number of requests coming to
334 # your instances.
335 #
336 # A bad example would be a metric exporting an average or median latency,
337 # since this value can&#x27;t include a chunk assignable to a single instance,
338 # it could be better used with utilization_target instead.
339 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
340 # must be a positive value. A utilization metric scales number of
341 # virtual machines handling requests to increase or decrease
342 # proportionally to the metric.
343 #
344 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
345 # The autoscaler works to keep this value constant for each of the
346 # instances.
347 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
348 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
349 },
350 ],
351 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
352 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
353 # configuration) that the autoscaler maintains. Must be a positive float
354 # value. If not defined, the default is 0.8.
355 },
356 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
357 # is required when creating or updating an autoscaler. The maximum number
358 # of replicas must not be lower than minimal number of replicas.
359 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
360 # This cannot be less than 0. If not provided, autoscaler chooses a
361 # default value depending on maximum number of instances allowed.
362 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
363 # The following modes are available:
364 #
365 # - OFF: Disables the autoscaler but maintains its
366 # configuration.
367 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
368 # VM instances only.
369 # - ON: Enables all autoscaler activities according to its
370 # policy.
371 #
372 #
373 # For more information, see
374 # &quot;Turning off or restricting an autoscaler&quot;
375 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
376 # recommends an abrupt scale in of a MIG, it will be throttled as specified
377 # by the parameters below.
378 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
379 # recommendation during the window autoscaler looks at when computing
380 # recommendations. Possibly all these VMs can be deleted at once so user
381 # service needs to be prepared to lose that many VMs in one step.
382 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
383 #
384 #
385 #
386 # - If the value is fixed, then the calculated
387 # value is equal to the fixed value.
388 # - If the value is a percent, then the
389 # calculated
390 # value is percent/100 * targetSize. For example,
391 # the calculated value of a 80% of a managed instance group
392 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
393 # is a remainder, the number is rounded.
394 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
395 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
396 # example, specify 80 for 80%.
397 },
398 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
399 # include directives regarding slower scale in, as described above.
400 },
401 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
402 # recommends an abrupt scale in of a MIG, it will be throttled as specified
403 # by the parameters below.
404 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
405 # recommendation during the window autoscaler looks at when computing
406 # recommendations. Possibly all these VMs can be deleted at once so user
407 # service needs to be prepared to lose that many VMs in one step.
408 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
409 #
410 #
411 #
412 # - If the value is fixed, then the calculated
413 # value is equal to the fixed value.
414 # - If the value is a percent, then the
415 # calculated
416 # value is percent/100 * targetSize. For example,
417 # the calculated value of a 80% of a managed instance group
418 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
419 # is a remainder, the number is rounded.
420 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
421 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
422 # example, specify 80 for 80%.
423 },
424 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
425 # include directives regarding slower scale in, as described above.
426 },
427 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
428 # can be set on an autoscaler, and they can overlap. During overlapping
429 # periods the greatest min_required_replicas of all scaling schedules is
430 # applied. Up to 128 scaling schedules are allowed.
431 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
432 # scaling schedule. A scaling schedule changes the minimum number of VM
433 # instances an autoscaler can recommend, which can trigger scaling out.
434 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
435 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
436 # autoscaler recommendations. If set to true, then a scaling schedule has
437 # no effect. This field is optional, and its value is false by default.
438 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
439 # scaling schedule is to run. The minimum allowed value is 300.
440 # This field is required.
441 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
442 # recommend in time intervals starting according to schedule. This field is
443 # required.
444 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
445 # schedule is to provide a scaling signal. This field uses the extended
446 # cron format (with an optional year field). The expression can describe a
447 # single timestamp if the optional year is set, in which case the scaling
448 # schedule runs once. The schedule is interpreted with respect to
449 # time_zone. This field is required. Note: These timestamps only describe
450 # when autoscaler starts providing the scaling signal. The VMs
451 # need additional time to become serving.
452 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
453 # The value of this field must be a time zone name from the tz database:
454 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
455 # default value of &quot;UTC&quot; if left empty.
456 },
457 },
458 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
459 # making scale-in decisions. This is referred to as the
460 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
461 # This might appear as a delay in scaling in but it is an important mechanism
462 # for your application to not have fluctuating size due to short term load
463 # fluctuations.
464 #
465 # The default stabilization period is 600 seconds.
466 },
467 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
468 # text format.
469 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
470 # create the resource.
471 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
472 # defined by the server.
473 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
474 # for autoscalers.
475 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
476 # The name must be 1-63 characters long, and comply withRFC1035.
477 # Specifically, the name must be 1-63 characters long and match the regular
478 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
479 # character must be a lowercase letter, and all following characters must
480 # be a dash, lowercase letter, or digit, except the last character, which
481 # cannot be a dash.
482 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
483 # autoscaler. Autoscaler calculates the recommended MIG size even when the
484 # autoscaling policy mode is different from ON. This field is empty when
485 # autoscaler is not connected to an existing managed instance group or
486 # autoscaler did not generate its prediction.
487 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
488 # where the instance group resides (for autoscalers living in regional
489 # scope).
490 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
491 &quot;a_key&quot;: {
492 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
493 # Note: this is a timestamp when a schedule actually became active, not when
494 # it was planned to do so.
495 # The timestamp is in RFC3339
496 # text format.
497 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
498 # Note: this is a timestamp when a schedule is planned to run, but the actual
499 # time might be slightly different.
500 # The timestamp is in RFC3339
501 # text format.
502 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
503 },
504 },
505 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
506 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
507 # possible values:
508 #
509 # - PENDING:
510 # Autoscaler backend hasn&#x27;t read new/updated configuration.
511 # - DELETING:
512 # Configuration is being deleted.
513 # - ACTIVE:
514 # Configuration is acknowledged to be effective. Some warnings might
515 # be present in the statusDetails field.
516 # - ERROR:
517 # Configuration has errors. Actionable for users. Details are present in
518 # the statusDetails field.
519 #
520 #
521 # New values might be added in the future.
522 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
523 # autoscaler. Read the documentation forCommonly
524 # returned status messages for examples of status messages you might
525 # encounter.
526 {
527 &quot;message&quot;: &quot;A String&quot;, # The status message.
528 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
529 # values:
530 #
531 # - ALL_INSTANCES_UNHEALTHY (WARNING):
532 # All instances in the instance group are unhealthy (not in RUNNING
533 # state).
534 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
535 # There is no backend service attached to the instance group.
536 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
537 # Autoscaler recommends a size greater than maxNumReplicas.
538 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
539 # The custom metric samples are not exported often enough to be
540 # a credible base for autoscaling.
541 # - CUSTOM_METRIC_INVALID (ERROR):
542 # The custom metric that was specified does not exist or does not have
543 # the necessary labels.
544 # - MIN_EQUALS_MAX (WARNING):
545 # The minNumReplicas is equal to maxNumReplicas. This means the
546 # autoscaler cannot add or remove instances from the instance group.
547 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
548 # The autoscaler did not receive any data from the custom metric
549 # configured for autoscaling.
550 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
551 # The autoscaler is configured to scale based on a load balancing signal
552 # but the instance group has not received any requests from the load
553 # balancer.
554 # - MODE_OFF (WARNING):
555 # Autoscaling is turned off. The number of instances in the group won&#x27;t
556 # change automatically. The autoscaling configuration is preserved.
557 # - MODE_ONLY_UP (WARNING):
558 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
559 # instances but not remove any.
560 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
561 # The instance group cannot be autoscaled because it has more than one
562 # backend service attached to it.
563 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
564 # There is insufficient quota for the necessary resources, such as CPU or
565 # number of instances.
566 # - REGION_RESOURCE_STOCKOUT (ERROR):
567 # Shown only for regional autoscalers: there is a resource stockout in
568 # the chosen region.
569 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
570 # The target to be scaled does not exist.
571 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
572 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
573 # has been configured for maxRate.
574 # - ZONE_RESOURCE_STOCKOUT (ERROR):
575 # For zonal autoscalers: there is a resource stockout in the chosen zone.
576 # For regional autoscalers: in at least one of the zones you&#x27;re using
577 # there is a resource stockout.
578 #
579 #
580 # New values might be added in the future. Some of the values might not be
581 # available in all API versions.
582 },
583 ],
584 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
585 # field is required when creating an autoscaler.
586 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
587 # where the instance group resides (for autoscalers living in zonal scope).
588 },
589 ],
590 &quot;warning&quot;: { # [Output Only] Informational warning which replaces the list of autoscalers
591 # when the list is empty.
592 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
593 # Engine returns NO_RESULTS_ON_PAGE if there
594 # are no results in the response.
595 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
596 # value format. For example:
597 #
598 # &quot;data&quot;: [
599 # {
600 # &quot;key&quot;: &quot;scope&quot;,
601 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
602 # }
603 {
604 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
605 # returned. For example, for warnings where there are no results in a list
606 # request for a particular zone, this key might be scope and
607 # the key value might be the zone name. Other examples might be a key
608 # indicating a deprecated resource and a suggested replacement, or a
609 # warning about invalid network settings (for example, if an instance
610 # attempts to perform IP forwarding but is not enabled for IP forwarding).
611 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
612 },
613 ],
614 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
615 },
616 },
617 },
618 &quot;kind&quot;: &quot;compute#autoscalerAggregatedList&quot;, # Output only. [Output Only] Type of resource. Alwayscompute#autoscalerAggregatedList for aggregated lists of
619 # autoscalers.
620 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
621 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
622 # the query parameter pageToken in the next list request.
623 # Subsequent list requests will have their own nextPageToken to
624 # continue paging through the results.
625 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
626 &quot;unreachables&quot;: [ # Output only. [Output Only] Unreachable resources.
627 # end_interface: MixerListResponseWithEtagBuilder
628 &quot;A String&quot;,
629 ],
630 &quot;warning&quot;: { # [Output Only] Informational warning message.
631 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
632 # Engine returns NO_RESULTS_ON_PAGE if there
633 # are no results in the response.
634 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
635 # value format. For example:
636 #
637 # &quot;data&quot;: [
638 # {
639 # &quot;key&quot;: &quot;scope&quot;,
640 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
641 # }
642 {
643 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
644 # returned. For example, for warnings where there are no results in a list
645 # request for a particular zone, this key might be scope and
646 # the key value might be the zone name. Other examples might be a key
647 # indicating a deprecated resource and a suggested replacement, or a
648 # warning about invalid network settings (for example, if an instance
649 # attempts to perform IP forwarding but is not enabled for IP forwarding).
650 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
651 },
652 ],
653 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
654 },
655 }</pre>
656 </div>
657
658 <div class="method">
659 <code class="details" id="aggregatedList_next">aggregatedList_next()</code>
660 <pre>Retrieves the next page of results.
661
662 Args:
663 previous_request: The request for the previous page. (required)
664 previous_response: The response from the request for the previous page. (required)
665
666 Returns:
667 A request object that you can call &#x27;execute()&#x27; on to request the next
668 page. Returns None if there are no more items in the collection.
669 </pre>
670 </div>
671
672 <div class="method">
673 <code class="details" id="close">close()</code>
674 <pre>Close httplib2 connections.</pre>
675 </div>
676
677 <div class="method">
678 <code class="details" id="delete">delete(project, zone, autoscaler, requestId=None, x__xgafv=None)</code>
679 <pre>Deletes the specified autoscaler.
680
681 Args:
682 project: string, Project ID for this request. (required)
683 zone: string, Name of the zone for this request. (required)
684 autoscaler: string, Name of the autoscaler to delete. (required)
685 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
686 that if you must retry your request, the server will know to ignore the
687 request if it has already been completed.
688
689 For example, consider a situation where you make an initial request and
690 the request times out. If you make the request again with the same
691 request ID, the server can check if original operation with the same
692 request ID was received, and if so, will ignore the second request. This
693 prevents clients from accidentally creating duplicate commitments.
694
695 The request ID must be
696 a valid UUID with the exception that zero UUID is not supported
697 (00000000-0000-0000-0000-000000000000).
698 x__xgafv: string, V1 error format.
699 Allowed values
700 1 - v1 error format
701 2 - v2 error format
702
703 Returns:
704 An object of the form:
705
706 { # Represents an Operation resource.
707 #
708 # Google Compute Engine has three Operation resources:
709 #
710 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
711 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
712 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
713 #
714 # You can use an operation resource to manage asynchronous API requests.
715 # For more information, readHandling
716 # API responses.
717 #
718 # Operations can be global, regional or zonal.
719 #
720 # - For global operations, use the `globalOperations`
721 # resource.
722 # - For regional operations, use the
723 # `regionOperations` resource.
724 # - For zonal operations, use
725 # the `zoneOperations` resource.
726 #
727 #
728 #
729 # For more information, read
730 # Global, Regional, and Zonal Resources.
731 #
732 # Note that completed Operation resources have a limited
733 # retention period.
734 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
735 # Not present otherwise.
736 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
737 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
738 # set when the operation is created.
739 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
740 # text format.
741 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
742 # this field will be populated.
743 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
744 # operation.
745 {
746 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
747 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
748 # details. There is a set of defined message types to use for providing
749 # details.The syntax depends on the error code. For example,
750 # QuotaExceededInfo will have details when the error code is
751 # QUOTA_EXCEEDED.
752 {
753 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
754 #
755 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
756 # is not enabled:
757 #
758 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
759 # &quot;domain&quot;: &quot;googleapis.com&quot;
760 # &quot;metadata&quot;: {
761 # &quot;resource&quot;: &quot;projects/123&quot;,
762 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
763 # }
764 # }
765 #
766 # This response indicates that the pubsub.googleapis.com API is not enabled.
767 #
768 # Example of an error that is returned when attempting to create a Spanner
769 # instance in a region that is out of stock:
770 #
771 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
772 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
773 # &quot;metadata&quot;: {
774 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
775 # }
776 # }
777 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
778 # is typically the registered service name of the tool or product that
779 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
780 # generated by some common infrastructure, the error domain must be a
781 # globally unique value that identifies the infrastructure. For Google API
782 # infrastructure, the error domain is &quot;googleapis.com&quot;.
783 &quot;metadatas&quot;: { # Additional structured details about this error.
784 #
785 # Keys must match a regular expression of `a-z+` but should
786 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
787 # length. When identifying the current value of an exceeded limit, the units
788 # should be contained in the key, not the value. For example, rather than
789 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
790 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
791 # instances that can be created in a single (batch) request.
792 &quot;a_key&quot;: &quot;A String&quot;,
793 },
794 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
795 # proximate cause of the error. Error reasons are unique within a particular
796 # domain of errors. This should be at most 63 characters and match a
797 # regular expression of `A-Z+[A-Z0-9]`, which represents
798 # UPPER_SNAKE_CASE.
799 },
800 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
801 #
802 # For example, if a quota check failed with an error indicating the calling
803 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
804 # directly to the right place in the developer console to flip the bit.
805 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
806 { # Describes a URL link.
807 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
808 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
809 },
810 ],
811 },
812 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
813 # which can be attached to an RPC error.
814 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
815 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
816 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
817 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
818 },
819 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
820 &quot;dimensions&quot;: { # The map holding related quota dimensions.
821 &quot;a_key&quot;: &quot;A String&quot;,
822 },
823 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
824 # type or metric.
825 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
826 # or metric.
827 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
828 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
829 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
830 },
831 },
832 ],
833 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
834 # This property is optional.
835 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
836 },
837 ],
838 },
839 &quot;getVersionOperationMetadata&quot;: {
840 &quot;inlineSbomInfo&quot;: {
841 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
842 # appropriate identifiers.
843 &quot;a_key&quot;: &quot;A String&quot;,
844 },
845 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
846 # identifiers.
847 &quot;a_key&quot;: &quot;A String&quot;,
848 },
849 },
850 },
851 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
852 # message that was returned, such as `NOT FOUND`.
853 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
854 # status code that was returned. For example, a `404` means the
855 # resource was not found.
856 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
857 # defined by the server.
858 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
859 # This value is inRFC3339
860 # text format.
861 &quot;instancesBulkInsertOperationMetadata&quot;: {
862 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
863 # Example key: zones/us-central1-a
864 &quot;a_key&quot;: {
865 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
866 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
867 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
868 # error.
869 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
870 # if the flow is rolling forward or rolling back.
871 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
872 },
873 },
874 },
875 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
876 # Operation resources.
877 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
878 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
879 # group of operations results from a `bulkInsert` API request.
880 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
881 # `update`, or `delete`, and so on.
882 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
883 # There is no requirement that this be linear or support any granularity of
884 # operations. This should not be used to guess when the operation will be
885 # complete. This number should monotonically increase as the operation
886 # progresses.
887 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
888 # applicable when performing regional operations.
889 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
890 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
891 # this field will contain information on all underlying zonal actions and
892 # their state.
893 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
894 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
895 # Example key: zones/us-central1-a
896 &quot;a_key&quot;: {
897 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
898 # populated.
899 # different programming environments, including REST APIs and RPC APIs. It is
900 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
901 # three pieces of data: error code, error message, and error details.
902 #
903 # You can find out more about this error model and how to work with it in the
904 # [API Design Guide](https://cloud.google.com/apis/design/errors).
905 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
906 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
907 # message types for APIs to use.
908 {
909 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
910 },
911 ],
912 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
913 # user-facing error message should be localized and sent in the
914 # google.rpc.Status.details field, or localized by the client.
915 },
916 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
917 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
918 },
919 },
920 },
921 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
922 # This value is inRFC3339
923 # text format.
924 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
925 # following:
926 # `PENDING`, `RUNNING`, or `DONE`.
927 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
928 # operation.
929 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
930 # of the target resource.
931 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
932 # operations related to creating a snapshot, this points to the disk
933 # that the snapshot was created from.
934 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
935 # `[email protected]` or
936 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
937 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
938 # operation, this field will be populated.
939 {
940 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
941 # Engine returns NO_RESULTS_ON_PAGE if there
942 # are no results in the response.
943 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
944 # value format. For example:
945 #
946 # &quot;data&quot;: [
947 # {
948 # &quot;key&quot;: &quot;scope&quot;,
949 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
950 # }
951 {
952 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
953 # returned. For example, for warnings where there are no results in a list
954 # request for a particular zone, this key might be scope and
955 # the key value might be the zone name. Other examples might be a key
956 # indicating a deprecated resource and a suggested replacement, or a
957 # warning about invalid network settings (for example, if an instance
958 # attempts to perform IP forwarding but is not enabled for IP forwarding).
959 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
960 },
961 ],
962 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
963 },
964 ],
965 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
966 # applicable when performing per-zone operations.
967 }</pre>
968 </div>
969
970 <div class="method">
971 <code class="details" id="get">get(project, zone, autoscaler, x__xgafv=None)</code>
972 <pre>Returns the specified autoscaler resource.
973
974 Args:
975 project: string, Project ID for this request. (required)
976 zone: string, Name of the zone for this request. (required)
977 autoscaler: string, Name of the autoscaler to return. (required)
978 x__xgafv: string, V1 error format.
979 Allowed values
980 1 - v1 error format
981 2 - v2 error format
982
983 Returns:
984 An object of the form:
985
986 { # Represents an Autoscaler resource.
987 #
988 # Google Compute Engine has two Autoscaler resources:
989 #
990 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
991 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
992 #
993 # Use autoscalers to automatically add or delete instances from a
994 # managed instance group according to your defined autoscaling policy.
995 # For more information, read Autoscaling Groups of Instances.
996 #
997 # For zonal managed instance groups resource, use the autoscaler
998 # resource.
999 #
1000 # For regional managed instance groups, use theregionAutoscalers resource.
1001 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
1002 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
1003 #
1004 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
1005 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
1006 # instance. This is referred to as the
1007 # [initialization period](/compute/docs/autoscaler#cool_down_period).
1008 # Specifying an accurate initialization period improves
1009 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
1010 # data from VMs that are still initializing because those VMs might not yet
1011 # represent normal usage of your application. The default initialization
1012 # period is 60 seconds.
1013 #
1014 # Initialization periods might vary because of numerous
1015 # factors. We recommend that you test how long your application takes to
1016 # initialize. To do this, create a VM and time your application&#x27;s startup
1017 # process.
1018 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
1019 # based on the average CPU utilization of a managed instance group.
1020 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
1021 # Valid values are:
1022 #
1023 # * NONE (default). No predictive method is used. The autoscaler scales the
1024 # group to meet current demand based on real-time metrics.
1025 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
1026 # monitoring daily and weekly load patterns and scaling out ahead of
1027 # anticipated demand.
1028 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
1029 # a float value in the range (0, 1]. If not specified, the default is0.6.
1030 #
1031 # If the CPU level is below the target utilization, the autoscaler scales
1032 # in the number of instances until it reaches the minimum number of
1033 # instances you specified or until the average CPU of your instances
1034 # reaches the target utilization.
1035 #
1036 # If the average CPU is above the target utilization, the autoscaler
1037 # scales out until it reaches the maximum number of instances you
1038 # specified or until the average utilization reaches the target
1039 # utilization.
1040 },
1041 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
1042 { # Custom utilization metric policy.
1043 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
1044 # used to select a specific TimeSeries for the purpose of autoscaling and
1045 # to determine whether the metric is exporting per-instance or
1046 # per-group data.
1047 #
1048 # For the filter to be valid for autoscaling purposes, the following rules
1049 # apply:
1050 #
1051 #
1052 # - You can only use the AND operator for joining
1053 # selectors.
1054 # - You can only use direct equality comparison operator
1055 # (=) without any functions for each selector.
1056 # - You can specify the metric in both the filter string and in the
1057 # metric field. However, if specified in both places, the metric must
1058 # be identical.
1059 # - The monitored resource type
1060 # determines what kind of values are expected for the metric. If it is
1061 # a gce_instance, the autoscaler expects the metric to
1062 # include a separate TimeSeries for each instance in a group. In such a
1063 # case, you cannot filter on resource labels.
1064 #
1065 #
1066 # If the resource type is any other value, the autoscaler expects
1067 # this metric to contain values that apply to the entire autoscaled
1068 # instance group and resource label filtering can be performed to
1069 # point autoscaler at the correct TimeSeries to scale upon. This is
1070 # called a *per-group metric* for the purpose of autoscaling.
1071 #
1072 # If not specified, the type defaults to
1073 # gce_instance.
1074 #
1075 #
1076 #
1077 # Try to provide a filter that is selective enough to pick just one
1078 # TimeSeries for the autoscaled group or for each of the instances (if you
1079 # are using gce_instance resource type). If multiple
1080 # TimeSeries are returned upon the query execution, the autoscaler will sum
1081 # their respective values to obtain its scaling value.
1082 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
1083 # cannot have negative values.
1084 #
1085 # The metric must have a value type of INT64 orDOUBLE.
1086 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
1087 # total amount of work to be done or resource usage, set this value to an
1088 # amount assigned for a single instance of the scaled group. Autoscaler
1089 # keeps the number of instances proportional to the value of this
1090 # metric. The metric itself does not change value due to group
1091 # resizing.
1092 #
1093 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
1094 # or a custom metric exporting the total number of requests coming to
1095 # your instances.
1096 #
1097 # A bad example would be a metric exporting an average or median latency,
1098 # since this value can&#x27;t include a chunk assignable to a single instance,
1099 # it could be better used with utilization_target instead.
1100 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
1101 # must be a positive value. A utilization metric scales number of
1102 # virtual machines handling requests to increase or decrease
1103 # proportionally to the metric.
1104 #
1105 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
1106 # The autoscaler works to keep this value constant for each of the
1107 # instances.
1108 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
1109 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
1110 },
1111 ],
1112 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
1113 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
1114 # configuration) that the autoscaler maintains. Must be a positive float
1115 # value. If not defined, the default is 0.8.
1116 },
1117 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
1118 # is required when creating or updating an autoscaler. The maximum number
1119 # of replicas must not be lower than minimal number of replicas.
1120 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
1121 # This cannot be less than 0. If not provided, autoscaler chooses a
1122 # default value depending on maximum number of instances allowed.
1123 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
1124 # The following modes are available:
1125 #
1126 # - OFF: Disables the autoscaler but maintains its
1127 # configuration.
1128 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
1129 # VM instances only.
1130 # - ON: Enables all autoscaler activities according to its
1131 # policy.
1132 #
1133 #
1134 # For more information, see
1135 # &quot;Turning off or restricting an autoscaler&quot;
1136 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
1137 # recommends an abrupt scale in of a MIG, it will be throttled as specified
1138 # by the parameters below.
1139 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
1140 # recommendation during the window autoscaler looks at when computing
1141 # recommendations. Possibly all these VMs can be deleted at once so user
1142 # service needs to be prepared to lose that many VMs in one step.
1143 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
1144 #
1145 #
1146 #
1147 # - If the value is fixed, then the calculated
1148 # value is equal to the fixed value.
1149 # - If the value is a percent, then the
1150 # calculated
1151 # value is percent/100 * targetSize. For example,
1152 # the calculated value of a 80% of a managed instance group
1153 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
1154 # is a remainder, the number is rounded.
1155 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1156 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
1157 # example, specify 80 for 80%.
1158 },
1159 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
1160 # include directives regarding slower scale in, as described above.
1161 },
1162 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
1163 # recommends an abrupt scale in of a MIG, it will be throttled as specified
1164 # by the parameters below.
1165 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
1166 # recommendation during the window autoscaler looks at when computing
1167 # recommendations. Possibly all these VMs can be deleted at once so user
1168 # service needs to be prepared to lose that many VMs in one step.
1169 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
1170 #
1171 #
1172 #
1173 # - If the value is fixed, then the calculated
1174 # value is equal to the fixed value.
1175 # - If the value is a percent, then the
1176 # calculated
1177 # value is percent/100 * targetSize. For example,
1178 # the calculated value of a 80% of a managed instance group
1179 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
1180 # is a remainder, the number is rounded.
1181 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1182 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
1183 # example, specify 80 for 80%.
1184 },
1185 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
1186 # include directives regarding slower scale in, as described above.
1187 },
1188 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
1189 # can be set on an autoscaler, and they can overlap. During overlapping
1190 # periods the greatest min_required_replicas of all scaling schedules is
1191 # applied. Up to 128 scaling schedules are allowed.
1192 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
1193 # scaling schedule. A scaling schedule changes the minimum number of VM
1194 # instances an autoscaler can recommend, which can trigger scaling out.
1195 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
1196 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
1197 # autoscaler recommendations. If set to true, then a scaling schedule has
1198 # no effect. This field is optional, and its value is false by default.
1199 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
1200 # scaling schedule is to run. The minimum allowed value is 300.
1201 # This field is required.
1202 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
1203 # recommend in time intervals starting according to schedule. This field is
1204 # required.
1205 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
1206 # schedule is to provide a scaling signal. This field uses the extended
1207 # cron format (with an optional year field). The expression can describe a
1208 # single timestamp if the optional year is set, in which case the scaling
1209 # schedule runs once. The schedule is interpreted with respect to
1210 # time_zone. This field is required. Note: These timestamps only describe
1211 # when autoscaler starts providing the scaling signal. The VMs
1212 # need additional time to become serving.
1213 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
1214 # The value of this field must be a time zone name from the tz database:
1215 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
1216 # default value of &quot;UTC&quot; if left empty.
1217 },
1218 },
1219 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
1220 # making scale-in decisions. This is referred to as the
1221 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
1222 # This might appear as a delay in scaling in but it is an important mechanism
1223 # for your application to not have fluctuating size due to short term load
1224 # fluctuations.
1225 #
1226 # The default stabilization period is 600 seconds.
1227 },
1228 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1229 # text format.
1230 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1231 # create the resource.
1232 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1233 # defined by the server.
1234 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
1235 # for autoscalers.
1236 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1237 # The name must be 1-63 characters long, and comply withRFC1035.
1238 # Specifically, the name must be 1-63 characters long and match the regular
1239 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1240 # character must be a lowercase letter, and all following characters must
1241 # be a dash, lowercase letter, or digit, except the last character, which
1242 # cannot be a dash.
1243 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
1244 # autoscaler. Autoscaler calculates the recommended MIG size even when the
1245 # autoscaling policy mode is different from ON. This field is empty when
1246 # autoscaler is not connected to an existing managed instance group or
1247 # autoscaler did not generate its prediction.
1248 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
1249 # where the instance group resides (for autoscalers living in regional
1250 # scope).
1251 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
1252 &quot;a_key&quot;: {
1253 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
1254 # Note: this is a timestamp when a schedule actually became active, not when
1255 # it was planned to do so.
1256 # The timestamp is in RFC3339
1257 # text format.
1258 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
1259 # Note: this is a timestamp when a schedule is planned to run, but the actual
1260 # time might be slightly different.
1261 # The timestamp is in RFC3339
1262 # text format.
1263 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
1264 },
1265 },
1266 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1267 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
1268 # possible values:
1269 #
1270 # - PENDING:
1271 # Autoscaler backend hasn&#x27;t read new/updated configuration.
1272 # - DELETING:
1273 # Configuration is being deleted.
1274 # - ACTIVE:
1275 # Configuration is acknowledged to be effective. Some warnings might
1276 # be present in the statusDetails field.
1277 # - ERROR:
1278 # Configuration has errors. Actionable for users. Details are present in
1279 # the statusDetails field.
1280 #
1281 #
1282 # New values might be added in the future.
1283 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
1284 # autoscaler. Read the documentation forCommonly
1285 # returned status messages for examples of status messages you might
1286 # encounter.
1287 {
1288 &quot;message&quot;: &quot;A String&quot;, # The status message.
1289 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
1290 # values:
1291 #
1292 # - ALL_INSTANCES_UNHEALTHY (WARNING):
1293 # All instances in the instance group are unhealthy (not in RUNNING
1294 # state).
1295 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
1296 # There is no backend service attached to the instance group.
1297 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
1298 # Autoscaler recommends a size greater than maxNumReplicas.
1299 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
1300 # The custom metric samples are not exported often enough to be
1301 # a credible base for autoscaling.
1302 # - CUSTOM_METRIC_INVALID (ERROR):
1303 # The custom metric that was specified does not exist or does not have
1304 # the necessary labels.
1305 # - MIN_EQUALS_MAX (WARNING):
1306 # The minNumReplicas is equal to maxNumReplicas. This means the
1307 # autoscaler cannot add or remove instances from the instance group.
1308 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
1309 # The autoscaler did not receive any data from the custom metric
1310 # configured for autoscaling.
1311 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
1312 # The autoscaler is configured to scale based on a load balancing signal
1313 # but the instance group has not received any requests from the load
1314 # balancer.
1315 # - MODE_OFF (WARNING):
1316 # Autoscaling is turned off. The number of instances in the group won&#x27;t
1317 # change automatically. The autoscaling configuration is preserved.
1318 # - MODE_ONLY_UP (WARNING):
1319 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
1320 # instances but not remove any.
1321 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
1322 # The instance group cannot be autoscaled because it has more than one
1323 # backend service attached to it.
1324 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
1325 # There is insufficient quota for the necessary resources, such as CPU or
1326 # number of instances.
1327 # - REGION_RESOURCE_STOCKOUT (ERROR):
1328 # Shown only for regional autoscalers: there is a resource stockout in
1329 # the chosen region.
1330 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
1331 # The target to be scaled does not exist.
1332 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
1333 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
1334 # has been configured for maxRate.
1335 # - ZONE_RESOURCE_STOCKOUT (ERROR):
1336 # For zonal autoscalers: there is a resource stockout in the chosen zone.
1337 # For regional autoscalers: in at least one of the zones you&#x27;re using
1338 # there is a resource stockout.
1339 #
1340 #
1341 # New values might be added in the future. Some of the values might not be
1342 # available in all API versions.
1343 },
1344 ],
1345 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
1346 # field is required when creating an autoscaler.
1347 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
1348 # where the instance group resides (for autoscalers living in zonal scope).
1349 }</pre>
1350 </div>
1351
1352 <div class="method">
1353 <code class="details" id="insert">insert(project, zone, body=None, requestId=None, x__xgafv=None)</code>
1354 <pre>Creates an autoscaler in the specified project using the data
1355 included in the request.
1356
1357 Args:
1358 project: string, Project ID for this request. (required)
1359 zone: string, Name of the zone for this request. (required)
1360 body: object, The request body.
1361 The object takes the form of:
1362
1363 { # Represents an Autoscaler resource.
1364 #
1365 # Google Compute Engine has two Autoscaler resources:
1366 #
1367 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
1368 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
1369 #
1370 # Use autoscalers to automatically add or delete instances from a
1371 # managed instance group according to your defined autoscaling policy.
1372 # For more information, read Autoscaling Groups of Instances.
1373 #
1374 # For zonal managed instance groups resource, use the autoscaler
1375 # resource.
1376 #
1377 # For regional managed instance groups, use theregionAutoscalers resource.
1378 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
1379 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
1380 #
1381 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
1382 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
1383 # instance. This is referred to as the
1384 # [initialization period](/compute/docs/autoscaler#cool_down_period).
1385 # Specifying an accurate initialization period improves
1386 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
1387 # data from VMs that are still initializing because those VMs might not yet
1388 # represent normal usage of your application. The default initialization
1389 # period is 60 seconds.
1390 #
1391 # Initialization periods might vary because of numerous
1392 # factors. We recommend that you test how long your application takes to
1393 # initialize. To do this, create a VM and time your application&#x27;s startup
1394 # process.
1395 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
1396 # based on the average CPU utilization of a managed instance group.
1397 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
1398 # Valid values are:
1399 #
1400 # * NONE (default). No predictive method is used. The autoscaler scales the
1401 # group to meet current demand based on real-time metrics.
1402 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
1403 # monitoring daily and weekly load patterns and scaling out ahead of
1404 # anticipated demand.
1405 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
1406 # a float value in the range (0, 1]. If not specified, the default is0.6.
1407 #
1408 # If the CPU level is below the target utilization, the autoscaler scales
1409 # in the number of instances until it reaches the minimum number of
1410 # instances you specified or until the average CPU of your instances
1411 # reaches the target utilization.
1412 #
1413 # If the average CPU is above the target utilization, the autoscaler
1414 # scales out until it reaches the maximum number of instances you
1415 # specified or until the average utilization reaches the target
1416 # utilization.
1417 },
1418 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
1419 { # Custom utilization metric policy.
1420 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
1421 # used to select a specific TimeSeries for the purpose of autoscaling and
1422 # to determine whether the metric is exporting per-instance or
1423 # per-group data.
1424 #
1425 # For the filter to be valid for autoscaling purposes, the following rules
1426 # apply:
1427 #
1428 #
1429 # - You can only use the AND operator for joining
1430 # selectors.
1431 # - You can only use direct equality comparison operator
1432 # (=) without any functions for each selector.
1433 # - You can specify the metric in both the filter string and in the
1434 # metric field. However, if specified in both places, the metric must
1435 # be identical.
1436 # - The monitored resource type
1437 # determines what kind of values are expected for the metric. If it is
1438 # a gce_instance, the autoscaler expects the metric to
1439 # include a separate TimeSeries for each instance in a group. In such a
1440 # case, you cannot filter on resource labels.
1441 #
1442 #
1443 # If the resource type is any other value, the autoscaler expects
1444 # this metric to contain values that apply to the entire autoscaled
1445 # instance group and resource label filtering can be performed to
1446 # point autoscaler at the correct TimeSeries to scale upon. This is
1447 # called a *per-group metric* for the purpose of autoscaling.
1448 #
1449 # If not specified, the type defaults to
1450 # gce_instance.
1451 #
1452 #
1453 #
1454 # Try to provide a filter that is selective enough to pick just one
1455 # TimeSeries for the autoscaled group or for each of the instances (if you
1456 # are using gce_instance resource type). If multiple
1457 # TimeSeries are returned upon the query execution, the autoscaler will sum
1458 # their respective values to obtain its scaling value.
1459 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
1460 # cannot have negative values.
1461 #
1462 # The metric must have a value type of INT64 orDOUBLE.
1463 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
1464 # total amount of work to be done or resource usage, set this value to an
1465 # amount assigned for a single instance of the scaled group. Autoscaler
1466 # keeps the number of instances proportional to the value of this
1467 # metric. The metric itself does not change value due to group
1468 # resizing.
1469 #
1470 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
1471 # or a custom metric exporting the total number of requests coming to
1472 # your instances.
1473 #
1474 # A bad example would be a metric exporting an average or median latency,
1475 # since this value can&#x27;t include a chunk assignable to a single instance,
1476 # it could be better used with utilization_target instead.
1477 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
1478 # must be a positive value. A utilization metric scales number of
1479 # virtual machines handling requests to increase or decrease
1480 # proportionally to the metric.
1481 #
1482 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
1483 # The autoscaler works to keep this value constant for each of the
1484 # instances.
1485 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
1486 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
1487 },
1488 ],
1489 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
1490 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
1491 # configuration) that the autoscaler maintains. Must be a positive float
1492 # value. If not defined, the default is 0.8.
1493 },
1494 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
1495 # is required when creating or updating an autoscaler. The maximum number
1496 # of replicas must not be lower than minimal number of replicas.
1497 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
1498 # This cannot be less than 0. If not provided, autoscaler chooses a
1499 # default value depending on maximum number of instances allowed.
1500 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
1501 # The following modes are available:
1502 #
1503 # - OFF: Disables the autoscaler but maintains its
1504 # configuration.
1505 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
1506 # VM instances only.
1507 # - ON: Enables all autoscaler activities according to its
1508 # policy.
1509 #
1510 #
1511 # For more information, see
1512 # &quot;Turning off or restricting an autoscaler&quot;
1513 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
1514 # recommends an abrupt scale in of a MIG, it will be throttled as specified
1515 # by the parameters below.
1516 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
1517 # recommendation during the window autoscaler looks at when computing
1518 # recommendations. Possibly all these VMs can be deleted at once so user
1519 # service needs to be prepared to lose that many VMs in one step.
1520 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
1521 #
1522 #
1523 #
1524 # - If the value is fixed, then the calculated
1525 # value is equal to the fixed value.
1526 # - If the value is a percent, then the
1527 # calculated
1528 # value is percent/100 * targetSize. For example,
1529 # the calculated value of a 80% of a managed instance group
1530 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
1531 # is a remainder, the number is rounded.
1532 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1533 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
1534 # example, specify 80 for 80%.
1535 },
1536 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
1537 # include directives regarding slower scale in, as described above.
1538 },
1539 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
1540 # recommends an abrupt scale in of a MIG, it will be throttled as specified
1541 # by the parameters below.
1542 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
1543 # recommendation during the window autoscaler looks at when computing
1544 # recommendations. Possibly all these VMs can be deleted at once so user
1545 # service needs to be prepared to lose that many VMs in one step.
1546 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
1547 #
1548 #
1549 #
1550 # - If the value is fixed, then the calculated
1551 # value is equal to the fixed value.
1552 # - If the value is a percent, then the
1553 # calculated
1554 # value is percent/100 * targetSize. For example,
1555 # the calculated value of a 80% of a managed instance group
1556 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
1557 # is a remainder, the number is rounded.
1558 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1559 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
1560 # example, specify 80 for 80%.
1561 },
1562 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
1563 # include directives regarding slower scale in, as described above.
1564 },
1565 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
1566 # can be set on an autoscaler, and they can overlap. During overlapping
1567 # periods the greatest min_required_replicas of all scaling schedules is
1568 # applied. Up to 128 scaling schedules are allowed.
1569 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
1570 # scaling schedule. A scaling schedule changes the minimum number of VM
1571 # instances an autoscaler can recommend, which can trigger scaling out.
1572 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
1573 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
1574 # autoscaler recommendations. If set to true, then a scaling schedule has
1575 # no effect. This field is optional, and its value is false by default.
1576 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
1577 # scaling schedule is to run. The minimum allowed value is 300.
1578 # This field is required.
1579 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
1580 # recommend in time intervals starting according to schedule. This field is
1581 # required.
1582 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
1583 # schedule is to provide a scaling signal. This field uses the extended
1584 # cron format (with an optional year field). The expression can describe a
1585 # single timestamp if the optional year is set, in which case the scaling
1586 # schedule runs once. The schedule is interpreted with respect to
1587 # time_zone. This field is required. Note: These timestamps only describe
1588 # when autoscaler starts providing the scaling signal. The VMs
1589 # need additional time to become serving.
1590 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
1591 # The value of this field must be a time zone name from the tz database:
1592 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
1593 # default value of &quot;UTC&quot; if left empty.
1594 },
1595 },
1596 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
1597 # making scale-in decisions. This is referred to as the
1598 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
1599 # This might appear as a delay in scaling in but it is an important mechanism
1600 # for your application to not have fluctuating size due to short term load
1601 # fluctuations.
1602 #
1603 # The default stabilization period is 600 seconds.
1604 },
1605 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
1606 # text format.
1607 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
1608 # create the resource.
1609 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
1610 # defined by the server.
1611 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
1612 # for autoscalers.
1613 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
1614 # The name must be 1-63 characters long, and comply withRFC1035.
1615 # Specifically, the name must be 1-63 characters long and match the regular
1616 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
1617 # character must be a lowercase letter, and all following characters must
1618 # be a dash, lowercase letter, or digit, except the last character, which
1619 # cannot be a dash.
1620 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
1621 # autoscaler. Autoscaler calculates the recommended MIG size even when the
1622 # autoscaling policy mode is different from ON. This field is empty when
1623 # autoscaler is not connected to an existing managed instance group or
1624 # autoscaler did not generate its prediction.
1625 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
1626 # where the instance group resides (for autoscalers living in regional
1627 # scope).
1628 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
1629 &quot;a_key&quot;: {
1630 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
1631 # Note: this is a timestamp when a schedule actually became active, not when
1632 # it was planned to do so.
1633 # The timestamp is in RFC3339
1634 # text format.
1635 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
1636 # Note: this is a timestamp when a schedule is planned to run, but the actual
1637 # time might be slightly different.
1638 # The timestamp is in RFC3339
1639 # text format.
1640 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
1641 },
1642 },
1643 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1644 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
1645 # possible values:
1646 #
1647 # - PENDING:
1648 # Autoscaler backend hasn&#x27;t read new/updated configuration.
1649 # - DELETING:
1650 # Configuration is being deleted.
1651 # - ACTIVE:
1652 # Configuration is acknowledged to be effective. Some warnings might
1653 # be present in the statusDetails field.
1654 # - ERROR:
1655 # Configuration has errors. Actionable for users. Details are present in
1656 # the statusDetails field.
1657 #
1658 #
1659 # New values might be added in the future.
1660 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
1661 # autoscaler. Read the documentation forCommonly
1662 # returned status messages for examples of status messages you might
1663 # encounter.
1664 {
1665 &quot;message&quot;: &quot;A String&quot;, # The status message.
1666 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
1667 # values:
1668 #
1669 # - ALL_INSTANCES_UNHEALTHY (WARNING):
1670 # All instances in the instance group are unhealthy (not in RUNNING
1671 # state).
1672 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
1673 # There is no backend service attached to the instance group.
1674 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
1675 # Autoscaler recommends a size greater than maxNumReplicas.
1676 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
1677 # The custom metric samples are not exported often enough to be
1678 # a credible base for autoscaling.
1679 # - CUSTOM_METRIC_INVALID (ERROR):
1680 # The custom metric that was specified does not exist or does not have
1681 # the necessary labels.
1682 # - MIN_EQUALS_MAX (WARNING):
1683 # The minNumReplicas is equal to maxNumReplicas. This means the
1684 # autoscaler cannot add or remove instances from the instance group.
1685 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
1686 # The autoscaler did not receive any data from the custom metric
1687 # configured for autoscaling.
1688 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
1689 # The autoscaler is configured to scale based on a load balancing signal
1690 # but the instance group has not received any requests from the load
1691 # balancer.
1692 # - MODE_OFF (WARNING):
1693 # Autoscaling is turned off. The number of instances in the group won&#x27;t
1694 # change automatically. The autoscaling configuration is preserved.
1695 # - MODE_ONLY_UP (WARNING):
1696 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
1697 # instances but not remove any.
1698 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
1699 # The instance group cannot be autoscaled because it has more than one
1700 # backend service attached to it.
1701 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
1702 # There is insufficient quota for the necessary resources, such as CPU or
1703 # number of instances.
1704 # - REGION_RESOURCE_STOCKOUT (ERROR):
1705 # Shown only for regional autoscalers: there is a resource stockout in
1706 # the chosen region.
1707 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
1708 # The target to be scaled does not exist.
1709 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
1710 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
1711 # has been configured for maxRate.
1712 # - ZONE_RESOURCE_STOCKOUT (ERROR):
1713 # For zonal autoscalers: there is a resource stockout in the chosen zone.
1714 # For regional autoscalers: in at least one of the zones you&#x27;re using
1715 # there is a resource stockout.
1716 #
1717 #
1718 # New values might be added in the future. Some of the values might not be
1719 # available in all API versions.
1720 },
1721 ],
1722 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
1723 # field is required when creating an autoscaler.
1724 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
1725 # where the instance group resides (for autoscalers living in zonal scope).
1726 }
1727
1728 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
1729 that if you must retry your request, the server will know to ignore the
1730 request if it has already been completed.
1731
1732 For example, consider a situation where you make an initial request and
1733 the request times out. If you make the request again with the same
1734 request ID, the server can check if original operation with the same
1735 request ID was received, and if so, will ignore the second request. This
1736 prevents clients from accidentally creating duplicate commitments.
1737
1738 The request ID must be
1739 a valid UUID with the exception that zero UUID is not supported
1740 (00000000-0000-0000-0000-000000000000).
1741 x__xgafv: string, V1 error format.
1742 Allowed values
1743 1 - v1 error format
1744 2 - v2 error format
1745
1746 Returns:
1747 An object of the form:
1748
1749 { # Represents an Operation resource.
1750 #
1751 # Google Compute Engine has three Operation resources:
1752 #
1753 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
1754 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
1755 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
1756 #
1757 # You can use an operation resource to manage asynchronous API requests.
1758 # For more information, readHandling
1759 # API responses.
1760 #
1761 # Operations can be global, regional or zonal.
1762 #
1763 # - For global operations, use the `globalOperations`
1764 # resource.
1765 # - For regional operations, use the
1766 # `regionOperations` resource.
1767 # - For zonal operations, use
1768 # the `zoneOperations` resource.
1769 #
1770 #
1771 #
1772 # For more information, read
1773 # Global, Regional, and Zonal Resources.
1774 #
1775 # Note that completed Operation resources have a limited
1776 # retention period.
1777 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
1778 # Not present otherwise.
1779 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1780 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
1781 # set when the operation is created.
1782 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
1783 # text format.
1784 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
1785 # this field will be populated.
1786 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
1787 # operation.
1788 {
1789 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1790 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
1791 # details. There is a set of defined message types to use for providing
1792 # details.The syntax depends on the error code. For example,
1793 # QuotaExceededInfo will have details when the error code is
1794 # QUOTA_EXCEEDED.
1795 {
1796 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
1797 #
1798 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
1799 # is not enabled:
1800 #
1801 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
1802 # &quot;domain&quot;: &quot;googleapis.com&quot;
1803 # &quot;metadata&quot;: {
1804 # &quot;resource&quot;: &quot;projects/123&quot;,
1805 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
1806 # }
1807 # }
1808 #
1809 # This response indicates that the pubsub.googleapis.com API is not enabled.
1810 #
1811 # Example of an error that is returned when attempting to create a Spanner
1812 # instance in a region that is out of stock:
1813 #
1814 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
1815 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
1816 # &quot;metadata&quot;: {
1817 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
1818 # }
1819 # }
1820 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
1821 # is typically the registered service name of the tool or product that
1822 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
1823 # generated by some common infrastructure, the error domain must be a
1824 # globally unique value that identifies the infrastructure. For Google API
1825 # infrastructure, the error domain is &quot;googleapis.com&quot;.
1826 &quot;metadatas&quot;: { # Additional structured details about this error.
1827 #
1828 # Keys must match a regular expression of `a-z+` but should
1829 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
1830 # length. When identifying the current value of an exceeded limit, the units
1831 # should be contained in the key, not the value. For example, rather than
1832 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
1833 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
1834 # instances that can be created in a single (batch) request.
1835 &quot;a_key&quot;: &quot;A String&quot;,
1836 },
1837 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
1838 # proximate cause of the error. Error reasons are unique within a particular
1839 # domain of errors. This should be at most 63 characters and match a
1840 # regular expression of `A-Z+[A-Z0-9]`, which represents
1841 # UPPER_SNAKE_CASE.
1842 },
1843 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
1844 #
1845 # For example, if a quota check failed with an error indicating the calling
1846 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
1847 # directly to the right place in the developer console to flip the bit.
1848 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
1849 { # Describes a URL link.
1850 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
1851 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
1852 },
1853 ],
1854 },
1855 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
1856 # which can be attached to an RPC error.
1857 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
1858 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
1859 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
1860 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
1861 },
1862 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
1863 &quot;dimensions&quot;: { # The map holding related quota dimensions.
1864 &quot;a_key&quot;: &quot;A String&quot;,
1865 },
1866 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
1867 # type or metric.
1868 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
1869 # or metric.
1870 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
1871 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
1872 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
1873 },
1874 },
1875 ],
1876 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
1877 # This property is optional.
1878 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1879 },
1880 ],
1881 },
1882 &quot;getVersionOperationMetadata&quot;: {
1883 &quot;inlineSbomInfo&quot;: {
1884 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
1885 # appropriate identifiers.
1886 &quot;a_key&quot;: &quot;A String&quot;,
1887 },
1888 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
1889 # identifiers.
1890 &quot;a_key&quot;: &quot;A String&quot;,
1891 },
1892 },
1893 },
1894 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
1895 # message that was returned, such as `NOT FOUND`.
1896 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
1897 # status code that was returned. For example, a `404` means the
1898 # resource was not found.
1899 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
1900 # defined by the server.
1901 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
1902 # This value is inRFC3339
1903 # text format.
1904 &quot;instancesBulkInsertOperationMetadata&quot;: {
1905 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
1906 # Example key: zones/us-central1-a
1907 &quot;a_key&quot;: {
1908 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
1909 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
1910 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
1911 # error.
1912 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
1913 # if the flow is rolling forward or rolling back.
1914 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
1915 },
1916 },
1917 },
1918 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
1919 # Operation resources.
1920 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1921 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
1922 # group of operations results from a `bulkInsert` API request.
1923 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
1924 # `update`, or `delete`, and so on.
1925 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
1926 # There is no requirement that this be linear or support any granularity of
1927 # operations. This should not be used to guess when the operation will be
1928 # complete. This number should monotonically increase as the operation
1929 # progresses.
1930 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
1931 # applicable when performing regional operations.
1932 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1933 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
1934 # this field will contain information on all underlying zonal actions and
1935 # their state.
1936 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
1937 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
1938 # Example key: zones/us-central1-a
1939 &quot;a_key&quot;: {
1940 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
1941 # populated.
1942 # different programming environments, including REST APIs and RPC APIs. It is
1943 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
1944 # three pieces of data: error code, error message, and error details.
1945 #
1946 # You can find out more about this error model and how to work with it in the
1947 # [API Design Guide](https://cloud.google.com/apis/design/errors).
1948 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1949 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
1950 # message types for APIs to use.
1951 {
1952 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1953 },
1954 ],
1955 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
1956 # user-facing error message should be localized and sent in the
1957 # google.rpc.Status.details field, or localized by the client.
1958 },
1959 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
1960 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
1961 },
1962 },
1963 },
1964 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
1965 # This value is inRFC3339
1966 # text format.
1967 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
1968 # following:
1969 # `PENDING`, `RUNNING`, or `DONE`.
1970 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
1971 # operation.
1972 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
1973 # of the target resource.
1974 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
1975 # operations related to creating a snapshot, this points to the disk
1976 # that the snapshot was created from.
1977 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
1978 # `[email protected]` or
1979 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
1980 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
1981 # operation, this field will be populated.
1982 {
1983 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
1984 # Engine returns NO_RESULTS_ON_PAGE if there
1985 # are no results in the response.
1986 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
1987 # value format. For example:
1988 #
1989 # &quot;data&quot;: [
1990 # {
1991 # &quot;key&quot;: &quot;scope&quot;,
1992 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
1993 # }
1994 {
1995 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
1996 # returned. For example, for warnings where there are no results in a list
1997 # request for a particular zone, this key might be scope and
1998 # the key value might be the zone name. Other examples might be a key
1999 # indicating a deprecated resource and a suggested replacement, or a
2000 # warning about invalid network settings (for example, if an instance
2001 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2002 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2003 },
2004 ],
2005 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2006 },
2007 ],
2008 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
2009 # applicable when performing per-zone operations.
2010 }</pre>
2011 </div>
2012
2013 <div class="method">
2014 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None, x__xgafv=None)</code>
2015 <pre>Retrieves a list of autoscalers contained within
2016 the specified zone.
2017
2018 Args:
2019 project: string, Project ID for this request. (required)
2020 zone: string, Name of the zone for this request. (required)
2021 filter: string, A filter expression that filters resources listed in the response. Most
2022 Compute resources support two types of filter expressions:
2023 expressions that support regular expressions and expressions that follow
2024 API improvement proposal AIP-160.
2025 These two types of filter expressions cannot be mixed in one request.
2026
2027 If you want to use AIP-160, your expression must specify the field name, an
2028 operator, and the value that you want to use for filtering. The value
2029 must be a string, a number, or a boolean. The operator
2030 must be either `=`, `!=`, `&gt;`, `&lt;`, `&lt;=`, `&gt;=` or `:`.
2031
2032 For example, if you are filtering Compute Engine instances, you can
2033 exclude instances named `example-instance` by specifying
2034 `name != example-instance`.
2035
2036 The `:*` comparison can be used to test whether a key has been defined.
2037 For example, to find all objects with `owner` label use:
2038 ```
2039 labels.owner:*
2040 ```
2041
2042 You can also filter nested fields. For example, you could specify
2043 `scheduling.automaticRestart = false` to include instances only
2044 if they are not scheduled for automatic restarts. You can use filtering
2045 on nested fields to filter based onresource labels.
2046
2047 To filter on multiple expressions, provide each separate expression within
2048 parentheses. For example:
2049 ```
2050 (scheduling.automaticRestart = true)
2051 (cpuPlatform = &quot;Intel Skylake&quot;)
2052 ```
2053 By default, each expression is an `AND` expression. However, you
2054 can include `AND` and `OR` expressions explicitly.
2055 For example:
2056 ```
2057 (cpuPlatform = &quot;Intel Skylake&quot;) OR
2058 (cpuPlatform = &quot;Intel Broadwell&quot;) AND
2059 (scheduling.automaticRestart = true)
2060 ```
2061
2062 If you want to use a regular expression, use the `eq` (equal) or `ne`
2063 (not equal) operator against a single un-parenthesized expression with or
2064 without quotes or against multiple parenthesized expressions. Examples:
2065
2066 `fieldname eq unquoted literal`
2067 `fieldname eq &#x27;single quoted literal&#x27;`
2068 `fieldname eq &quot;double quoted literal&quot;`
2069 `(fieldname1 eq literal) (fieldname2 ne &quot;literal&quot;)`
2070
2071 The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
2072 The literal value must match the entire field.
2073
2074 For example, to filter for instances that do not end with name &quot;instance&quot;,
2075 you would use `name ne .*instance`.
2076
2077 You cannot combine constraints on multiple fields using regular
2078 expressions.
2079 maxResults: integer, The maximum number of results per page that should be returned.
2080 If the number of available results is larger than `maxResults`,
2081 Compute Engine returns a `nextPageToken` that can be used to get
2082 the next page of results in subsequent list requests. Acceptable values are
2083 `0` to `500`, inclusive. (Default: `500`)
2084 orderBy: string, Sorts list results by a certain order. By default, results
2085 are returned in alphanumerical order based on the resource name.
2086
2087 You can also sort results in descending order based on the creation
2088 timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts
2089 results based on the `creationTimestamp` field in
2090 reverse chronological order (newest result first). Use this to sort
2091 resources like operations so that the newest operation is returned first.
2092
2093 Currently, only sorting by `name` or
2094 `creationTimestamp desc` is supported.
2095 pageToken: string, Specifies a page token to use. Set `pageToken` to the
2096 `nextPageToken` returned by a previous list request to get
2097 the next page of results.
2098 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case
2099 of failure. The default value is false.
2100
2101 For example, when partial success behavior is enabled, aggregatedList for a
2102 single zone scope either returns all resources in the zone or no resources,
2103 with an error code.
2104 x__xgafv: string, V1 error format.
2105 Allowed values
2106 1 - v1 error format
2107 2 - v2 error format
2108
2109 Returns:
2110 An object of the form:
2111
2112 { # Contains a list of Autoscaler resources.
2113 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
2114 &quot;items&quot;: [ # A list of Autoscaler resources.
2115 { # Represents an Autoscaler resource.
2116 #
2117 # Google Compute Engine has two Autoscaler resources:
2118 #
2119 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
2120 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
2121 #
2122 # Use autoscalers to automatically add or delete instances from a
2123 # managed instance group according to your defined autoscaling policy.
2124 # For more information, read Autoscaling Groups of Instances.
2125 #
2126 # For zonal managed instance groups resource, use the autoscaler
2127 # resource.
2128 #
2129 # For regional managed instance groups, use theregionAutoscalers resource.
2130 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
2131 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
2132 #
2133 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
2134 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
2135 # instance. This is referred to as the
2136 # [initialization period](/compute/docs/autoscaler#cool_down_period).
2137 # Specifying an accurate initialization period improves
2138 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
2139 # data from VMs that are still initializing because those VMs might not yet
2140 # represent normal usage of your application. The default initialization
2141 # period is 60 seconds.
2142 #
2143 # Initialization periods might vary because of numerous
2144 # factors. We recommend that you test how long your application takes to
2145 # initialize. To do this, create a VM and time your application&#x27;s startup
2146 # process.
2147 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
2148 # based on the average CPU utilization of a managed instance group.
2149 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
2150 # Valid values are:
2151 #
2152 # * NONE (default). No predictive method is used. The autoscaler scales the
2153 # group to meet current demand based on real-time metrics.
2154 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
2155 # monitoring daily and weekly load patterns and scaling out ahead of
2156 # anticipated demand.
2157 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
2158 # a float value in the range (0, 1]. If not specified, the default is0.6.
2159 #
2160 # If the CPU level is below the target utilization, the autoscaler scales
2161 # in the number of instances until it reaches the minimum number of
2162 # instances you specified or until the average CPU of your instances
2163 # reaches the target utilization.
2164 #
2165 # If the average CPU is above the target utilization, the autoscaler
2166 # scales out until it reaches the maximum number of instances you
2167 # specified or until the average utilization reaches the target
2168 # utilization.
2169 },
2170 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
2171 { # Custom utilization metric policy.
2172 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
2173 # used to select a specific TimeSeries for the purpose of autoscaling and
2174 # to determine whether the metric is exporting per-instance or
2175 # per-group data.
2176 #
2177 # For the filter to be valid for autoscaling purposes, the following rules
2178 # apply:
2179 #
2180 #
2181 # - You can only use the AND operator for joining
2182 # selectors.
2183 # - You can only use direct equality comparison operator
2184 # (=) without any functions for each selector.
2185 # - You can specify the metric in both the filter string and in the
2186 # metric field. However, if specified in both places, the metric must
2187 # be identical.
2188 # - The monitored resource type
2189 # determines what kind of values are expected for the metric. If it is
2190 # a gce_instance, the autoscaler expects the metric to
2191 # include a separate TimeSeries for each instance in a group. In such a
2192 # case, you cannot filter on resource labels.
2193 #
2194 #
2195 # If the resource type is any other value, the autoscaler expects
2196 # this metric to contain values that apply to the entire autoscaled
2197 # instance group and resource label filtering can be performed to
2198 # point autoscaler at the correct TimeSeries to scale upon. This is
2199 # called a *per-group metric* for the purpose of autoscaling.
2200 #
2201 # If not specified, the type defaults to
2202 # gce_instance.
2203 #
2204 #
2205 #
2206 # Try to provide a filter that is selective enough to pick just one
2207 # TimeSeries for the autoscaled group or for each of the instances (if you
2208 # are using gce_instance resource type). If multiple
2209 # TimeSeries are returned upon the query execution, the autoscaler will sum
2210 # their respective values to obtain its scaling value.
2211 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
2212 # cannot have negative values.
2213 #
2214 # The metric must have a value type of INT64 orDOUBLE.
2215 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
2216 # total amount of work to be done or resource usage, set this value to an
2217 # amount assigned for a single instance of the scaled group. Autoscaler
2218 # keeps the number of instances proportional to the value of this
2219 # metric. The metric itself does not change value due to group
2220 # resizing.
2221 #
2222 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
2223 # or a custom metric exporting the total number of requests coming to
2224 # your instances.
2225 #
2226 # A bad example would be a metric exporting an average or median latency,
2227 # since this value can&#x27;t include a chunk assignable to a single instance,
2228 # it could be better used with utilization_target instead.
2229 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
2230 # must be a positive value. A utilization metric scales number of
2231 # virtual machines handling requests to increase or decrease
2232 # proportionally to the metric.
2233 #
2234 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
2235 # The autoscaler works to keep this value constant for each of the
2236 # instances.
2237 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
2238 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
2239 },
2240 ],
2241 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
2242 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
2243 # configuration) that the autoscaler maintains. Must be a positive float
2244 # value. If not defined, the default is 0.8.
2245 },
2246 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
2247 # is required when creating or updating an autoscaler. The maximum number
2248 # of replicas must not be lower than minimal number of replicas.
2249 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
2250 # This cannot be less than 0. If not provided, autoscaler chooses a
2251 # default value depending on maximum number of instances allowed.
2252 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
2253 # The following modes are available:
2254 #
2255 # - OFF: Disables the autoscaler but maintains its
2256 # configuration.
2257 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
2258 # VM instances only.
2259 # - ON: Enables all autoscaler activities according to its
2260 # policy.
2261 #
2262 #
2263 # For more information, see
2264 # &quot;Turning off or restricting an autoscaler&quot;
2265 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
2266 # recommends an abrupt scale in of a MIG, it will be throttled as specified
2267 # by the parameters below.
2268 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
2269 # recommendation during the window autoscaler looks at when computing
2270 # recommendations. Possibly all these VMs can be deleted at once so user
2271 # service needs to be prepared to lose that many VMs in one step.
2272 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
2273 #
2274 #
2275 #
2276 # - If the value is fixed, then the calculated
2277 # value is equal to the fixed value.
2278 # - If the value is a percent, then the
2279 # calculated
2280 # value is percent/100 * targetSize. For example,
2281 # the calculated value of a 80% of a managed instance group
2282 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
2283 # is a remainder, the number is rounded.
2284 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2285 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
2286 # example, specify 80 for 80%.
2287 },
2288 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
2289 # include directives regarding slower scale in, as described above.
2290 },
2291 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
2292 # recommends an abrupt scale in of a MIG, it will be throttled as specified
2293 # by the parameters below.
2294 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
2295 # recommendation during the window autoscaler looks at when computing
2296 # recommendations. Possibly all these VMs can be deleted at once so user
2297 # service needs to be prepared to lose that many VMs in one step.
2298 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
2299 #
2300 #
2301 #
2302 # - If the value is fixed, then the calculated
2303 # value is equal to the fixed value.
2304 # - If the value is a percent, then the
2305 # calculated
2306 # value is percent/100 * targetSize. For example,
2307 # the calculated value of a 80% of a managed instance group
2308 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
2309 # is a remainder, the number is rounded.
2310 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2311 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
2312 # example, specify 80 for 80%.
2313 },
2314 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
2315 # include directives regarding slower scale in, as described above.
2316 },
2317 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
2318 # can be set on an autoscaler, and they can overlap. During overlapping
2319 # periods the greatest min_required_replicas of all scaling schedules is
2320 # applied. Up to 128 scaling schedules are allowed.
2321 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
2322 # scaling schedule. A scaling schedule changes the minimum number of VM
2323 # instances an autoscaler can recommend, which can trigger scaling out.
2324 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
2325 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
2326 # autoscaler recommendations. If set to true, then a scaling schedule has
2327 # no effect. This field is optional, and its value is false by default.
2328 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
2329 # scaling schedule is to run. The minimum allowed value is 300.
2330 # This field is required.
2331 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
2332 # recommend in time intervals starting according to schedule. This field is
2333 # required.
2334 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
2335 # schedule is to provide a scaling signal. This field uses the extended
2336 # cron format (with an optional year field). The expression can describe a
2337 # single timestamp if the optional year is set, in which case the scaling
2338 # schedule runs once. The schedule is interpreted with respect to
2339 # time_zone. This field is required. Note: These timestamps only describe
2340 # when autoscaler starts providing the scaling signal. The VMs
2341 # need additional time to become serving.
2342 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
2343 # The value of this field must be a time zone name from the tz database:
2344 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
2345 # default value of &quot;UTC&quot; if left empty.
2346 },
2347 },
2348 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
2349 # making scale-in decisions. This is referred to as the
2350 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
2351 # This might appear as a delay in scaling in but it is an important mechanism
2352 # for your application to not have fluctuating size due to short term load
2353 # fluctuations.
2354 #
2355 # The default stabilization period is 600 seconds.
2356 },
2357 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
2358 # text format.
2359 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2360 # create the resource.
2361 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2362 # defined by the server.
2363 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
2364 # for autoscalers.
2365 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
2366 # The name must be 1-63 characters long, and comply withRFC1035.
2367 # Specifically, the name must be 1-63 characters long and match the regular
2368 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2369 # character must be a lowercase letter, and all following characters must
2370 # be a dash, lowercase letter, or digit, except the last character, which
2371 # cannot be a dash.
2372 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
2373 # autoscaler. Autoscaler calculates the recommended MIG size even when the
2374 # autoscaling policy mode is different from ON. This field is empty when
2375 # autoscaler is not connected to an existing managed instance group or
2376 # autoscaler did not generate its prediction.
2377 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
2378 # where the instance group resides (for autoscalers living in regional
2379 # scope).
2380 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
2381 &quot;a_key&quot;: {
2382 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
2383 # Note: this is a timestamp when a schedule actually became active, not when
2384 # it was planned to do so.
2385 # The timestamp is in RFC3339
2386 # text format.
2387 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
2388 # Note: this is a timestamp when a schedule is planned to run, but the actual
2389 # time might be slightly different.
2390 # The timestamp is in RFC3339
2391 # text format.
2392 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
2393 },
2394 },
2395 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2396 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
2397 # possible values:
2398 #
2399 # - PENDING:
2400 # Autoscaler backend hasn&#x27;t read new/updated configuration.
2401 # - DELETING:
2402 # Configuration is being deleted.
2403 # - ACTIVE:
2404 # Configuration is acknowledged to be effective. Some warnings might
2405 # be present in the statusDetails field.
2406 # - ERROR:
2407 # Configuration has errors. Actionable for users. Details are present in
2408 # the statusDetails field.
2409 #
2410 #
2411 # New values might be added in the future.
2412 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
2413 # autoscaler. Read the documentation forCommonly
2414 # returned status messages for examples of status messages you might
2415 # encounter.
2416 {
2417 &quot;message&quot;: &quot;A String&quot;, # The status message.
2418 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
2419 # values:
2420 #
2421 # - ALL_INSTANCES_UNHEALTHY (WARNING):
2422 # All instances in the instance group are unhealthy (not in RUNNING
2423 # state).
2424 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
2425 # There is no backend service attached to the instance group.
2426 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
2427 # Autoscaler recommends a size greater than maxNumReplicas.
2428 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
2429 # The custom metric samples are not exported often enough to be
2430 # a credible base for autoscaling.
2431 # - CUSTOM_METRIC_INVALID (ERROR):
2432 # The custom metric that was specified does not exist or does not have
2433 # the necessary labels.
2434 # - MIN_EQUALS_MAX (WARNING):
2435 # The minNumReplicas is equal to maxNumReplicas. This means the
2436 # autoscaler cannot add or remove instances from the instance group.
2437 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
2438 # The autoscaler did not receive any data from the custom metric
2439 # configured for autoscaling.
2440 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
2441 # The autoscaler is configured to scale based on a load balancing signal
2442 # but the instance group has not received any requests from the load
2443 # balancer.
2444 # - MODE_OFF (WARNING):
2445 # Autoscaling is turned off. The number of instances in the group won&#x27;t
2446 # change automatically. The autoscaling configuration is preserved.
2447 # - MODE_ONLY_UP (WARNING):
2448 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
2449 # instances but not remove any.
2450 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
2451 # The instance group cannot be autoscaled because it has more than one
2452 # backend service attached to it.
2453 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
2454 # There is insufficient quota for the necessary resources, such as CPU or
2455 # number of instances.
2456 # - REGION_RESOURCE_STOCKOUT (ERROR):
2457 # Shown only for regional autoscalers: there is a resource stockout in
2458 # the chosen region.
2459 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
2460 # The target to be scaled does not exist.
2461 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
2462 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
2463 # has been configured for maxRate.
2464 # - ZONE_RESOURCE_STOCKOUT (ERROR):
2465 # For zonal autoscalers: there is a resource stockout in the chosen zone.
2466 # For regional autoscalers: in at least one of the zones you&#x27;re using
2467 # there is a resource stockout.
2468 #
2469 #
2470 # New values might be added in the future. Some of the values might not be
2471 # available in all API versions.
2472 },
2473 ],
2474 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
2475 # field is required when creating an autoscaler.
2476 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
2477 # where the instance group resides (for autoscalers living in zonal scope).
2478 },
2479 ],
2480 &quot;kind&quot;: &quot;compute#autoscalerList&quot;, # Output only. [Output Only] Type of resource. Always compute#autoscalerList
2481 # for lists of autoscalers.
2482 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for
2483 # list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for
2484 # the query parameter pageToken in the next list request.
2485 # Subsequent list requests will have their own nextPageToken to
2486 # continue paging through the results.
2487 &quot;selfLink&quot;: &quot;A String&quot;, # Output only. [Output Only] Server-defined URL for this resource.
2488 &quot;warning&quot;: { # [Output Only] Informational warning message.
2489 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
2490 # Engine returns NO_RESULTS_ON_PAGE if there
2491 # are no results in the response.
2492 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
2493 # value format. For example:
2494 #
2495 # &quot;data&quot;: [
2496 # {
2497 # &quot;key&quot;: &quot;scope&quot;,
2498 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
2499 # }
2500 {
2501 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
2502 # returned. For example, for warnings where there are no results in a list
2503 # request for a particular zone, this key might be scope and
2504 # the key value might be the zone name. Other examples might be a key
2505 # indicating a deprecated resource and a suggested replacement, or a
2506 # warning about invalid network settings (for example, if an instance
2507 # attempts to perform IP forwarding but is not enabled for IP forwarding).
2508 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2509 },
2510 ],
2511 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2512 },
2513 }</pre>
2514 </div>
2515
2516 <div class="method">
2517 <code class="details" id="list_next">list_next()</code>
2518 <pre>Retrieves the next page of results.
2519
2520 Args:
2521 previous_request: The request for the previous page. (required)
2522 previous_response: The response from the request for the previous page. (required)
2523
2524 Returns:
2525 A request object that you can call &#x27;execute()&#x27; on to request the next
2526 page. Returns None if there are no more items in the collection.
2527 </pre>
2528 </div>
2529
2530 <div class="method">
2531 <code class="details" id="patch">patch(project, zone, autoscaler=None, body=None, requestId=None, x__xgafv=None)</code>
2532 <pre>Updates an autoscaler in the specified project using the data
2533 included in the request. This method supportsPATCH
2534 semantics and uses theJSON merge
2535 patch format and processing rules.
2536
2537 Args:
2538 project: string, Project ID for this request. (required)
2539 zone: string, Name of the zone for this request. (required)
2540 body: object, The request body.
2541 The object takes the form of:
2542
2543 { # Represents an Autoscaler resource.
2544 #
2545 # Google Compute Engine has two Autoscaler resources:
2546 #
2547 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
2548 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
2549 #
2550 # Use autoscalers to automatically add or delete instances from a
2551 # managed instance group according to your defined autoscaling policy.
2552 # For more information, read Autoscaling Groups of Instances.
2553 #
2554 # For zonal managed instance groups resource, use the autoscaler
2555 # resource.
2556 #
2557 # For regional managed instance groups, use theregionAutoscalers resource.
2558 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
2559 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
2560 #
2561 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
2562 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
2563 # instance. This is referred to as the
2564 # [initialization period](/compute/docs/autoscaler#cool_down_period).
2565 # Specifying an accurate initialization period improves
2566 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
2567 # data from VMs that are still initializing because those VMs might not yet
2568 # represent normal usage of your application. The default initialization
2569 # period is 60 seconds.
2570 #
2571 # Initialization periods might vary because of numerous
2572 # factors. We recommend that you test how long your application takes to
2573 # initialize. To do this, create a VM and time your application&#x27;s startup
2574 # process.
2575 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
2576 # based on the average CPU utilization of a managed instance group.
2577 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
2578 # Valid values are:
2579 #
2580 # * NONE (default). No predictive method is used. The autoscaler scales the
2581 # group to meet current demand based on real-time metrics.
2582 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
2583 # monitoring daily and weekly load patterns and scaling out ahead of
2584 # anticipated demand.
2585 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
2586 # a float value in the range (0, 1]. If not specified, the default is0.6.
2587 #
2588 # If the CPU level is below the target utilization, the autoscaler scales
2589 # in the number of instances until it reaches the minimum number of
2590 # instances you specified or until the average CPU of your instances
2591 # reaches the target utilization.
2592 #
2593 # If the average CPU is above the target utilization, the autoscaler
2594 # scales out until it reaches the maximum number of instances you
2595 # specified or until the average utilization reaches the target
2596 # utilization.
2597 },
2598 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
2599 { # Custom utilization metric policy.
2600 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
2601 # used to select a specific TimeSeries for the purpose of autoscaling and
2602 # to determine whether the metric is exporting per-instance or
2603 # per-group data.
2604 #
2605 # For the filter to be valid for autoscaling purposes, the following rules
2606 # apply:
2607 #
2608 #
2609 # - You can only use the AND operator for joining
2610 # selectors.
2611 # - You can only use direct equality comparison operator
2612 # (=) without any functions for each selector.
2613 # - You can specify the metric in both the filter string and in the
2614 # metric field. However, if specified in both places, the metric must
2615 # be identical.
2616 # - The monitored resource type
2617 # determines what kind of values are expected for the metric. If it is
2618 # a gce_instance, the autoscaler expects the metric to
2619 # include a separate TimeSeries for each instance in a group. In such a
2620 # case, you cannot filter on resource labels.
2621 #
2622 #
2623 # If the resource type is any other value, the autoscaler expects
2624 # this metric to contain values that apply to the entire autoscaled
2625 # instance group and resource label filtering can be performed to
2626 # point autoscaler at the correct TimeSeries to scale upon. This is
2627 # called a *per-group metric* for the purpose of autoscaling.
2628 #
2629 # If not specified, the type defaults to
2630 # gce_instance.
2631 #
2632 #
2633 #
2634 # Try to provide a filter that is selective enough to pick just one
2635 # TimeSeries for the autoscaled group or for each of the instances (if you
2636 # are using gce_instance resource type). If multiple
2637 # TimeSeries are returned upon the query execution, the autoscaler will sum
2638 # their respective values to obtain its scaling value.
2639 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
2640 # cannot have negative values.
2641 #
2642 # The metric must have a value type of INT64 orDOUBLE.
2643 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
2644 # total amount of work to be done or resource usage, set this value to an
2645 # amount assigned for a single instance of the scaled group. Autoscaler
2646 # keeps the number of instances proportional to the value of this
2647 # metric. The metric itself does not change value due to group
2648 # resizing.
2649 #
2650 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
2651 # or a custom metric exporting the total number of requests coming to
2652 # your instances.
2653 #
2654 # A bad example would be a metric exporting an average or median latency,
2655 # since this value can&#x27;t include a chunk assignable to a single instance,
2656 # it could be better used with utilization_target instead.
2657 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
2658 # must be a positive value. A utilization metric scales number of
2659 # virtual machines handling requests to increase or decrease
2660 # proportionally to the metric.
2661 #
2662 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
2663 # The autoscaler works to keep this value constant for each of the
2664 # instances.
2665 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
2666 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
2667 },
2668 ],
2669 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
2670 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
2671 # configuration) that the autoscaler maintains. Must be a positive float
2672 # value. If not defined, the default is 0.8.
2673 },
2674 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
2675 # is required when creating or updating an autoscaler. The maximum number
2676 # of replicas must not be lower than minimal number of replicas.
2677 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
2678 # This cannot be less than 0. If not provided, autoscaler chooses a
2679 # default value depending on maximum number of instances allowed.
2680 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
2681 # The following modes are available:
2682 #
2683 # - OFF: Disables the autoscaler but maintains its
2684 # configuration.
2685 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
2686 # VM instances only.
2687 # - ON: Enables all autoscaler activities according to its
2688 # policy.
2689 #
2690 #
2691 # For more information, see
2692 # &quot;Turning off or restricting an autoscaler&quot;
2693 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
2694 # recommends an abrupt scale in of a MIG, it will be throttled as specified
2695 # by the parameters below.
2696 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
2697 # recommendation during the window autoscaler looks at when computing
2698 # recommendations. Possibly all these VMs can be deleted at once so user
2699 # service needs to be prepared to lose that many VMs in one step.
2700 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
2701 #
2702 #
2703 #
2704 # - If the value is fixed, then the calculated
2705 # value is equal to the fixed value.
2706 # - If the value is a percent, then the
2707 # calculated
2708 # value is percent/100 * targetSize. For example,
2709 # the calculated value of a 80% of a managed instance group
2710 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
2711 # is a remainder, the number is rounded.
2712 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2713 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
2714 # example, specify 80 for 80%.
2715 },
2716 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
2717 # include directives regarding slower scale in, as described above.
2718 },
2719 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
2720 # recommends an abrupt scale in of a MIG, it will be throttled as specified
2721 # by the parameters below.
2722 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
2723 # recommendation during the window autoscaler looks at when computing
2724 # recommendations. Possibly all these VMs can be deleted at once so user
2725 # service needs to be prepared to lose that many VMs in one step.
2726 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
2727 #
2728 #
2729 #
2730 # - If the value is fixed, then the calculated
2731 # value is equal to the fixed value.
2732 # - If the value is a percent, then the
2733 # calculated
2734 # value is percent/100 * targetSize. For example,
2735 # the calculated value of a 80% of a managed instance group
2736 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
2737 # is a remainder, the number is rounded.
2738 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2739 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
2740 # example, specify 80 for 80%.
2741 },
2742 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
2743 # include directives regarding slower scale in, as described above.
2744 },
2745 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
2746 # can be set on an autoscaler, and they can overlap. During overlapping
2747 # periods the greatest min_required_replicas of all scaling schedules is
2748 # applied. Up to 128 scaling schedules are allowed.
2749 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
2750 # scaling schedule. A scaling schedule changes the minimum number of VM
2751 # instances an autoscaler can recommend, which can trigger scaling out.
2752 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
2753 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
2754 # autoscaler recommendations. If set to true, then a scaling schedule has
2755 # no effect. This field is optional, and its value is false by default.
2756 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
2757 # scaling schedule is to run. The minimum allowed value is 300.
2758 # This field is required.
2759 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
2760 # recommend in time intervals starting according to schedule. This field is
2761 # required.
2762 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
2763 # schedule is to provide a scaling signal. This field uses the extended
2764 # cron format (with an optional year field). The expression can describe a
2765 # single timestamp if the optional year is set, in which case the scaling
2766 # schedule runs once. The schedule is interpreted with respect to
2767 # time_zone. This field is required. Note: These timestamps only describe
2768 # when autoscaler starts providing the scaling signal. The VMs
2769 # need additional time to become serving.
2770 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
2771 # The value of this field must be a time zone name from the tz database:
2772 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
2773 # default value of &quot;UTC&quot; if left empty.
2774 },
2775 },
2776 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
2777 # making scale-in decisions. This is referred to as the
2778 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
2779 # This might appear as a delay in scaling in but it is an important mechanism
2780 # for your application to not have fluctuating size due to short term load
2781 # fluctuations.
2782 #
2783 # The default stabilization period is 600 seconds.
2784 },
2785 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
2786 # text format.
2787 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
2788 # create the resource.
2789 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
2790 # defined by the server.
2791 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
2792 # for autoscalers.
2793 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
2794 # The name must be 1-63 characters long, and comply withRFC1035.
2795 # Specifically, the name must be 1-63 characters long and match the regular
2796 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
2797 # character must be a lowercase letter, and all following characters must
2798 # be a dash, lowercase letter, or digit, except the last character, which
2799 # cannot be a dash.
2800 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
2801 # autoscaler. Autoscaler calculates the recommended MIG size even when the
2802 # autoscaling policy mode is different from ON. This field is empty when
2803 # autoscaler is not connected to an existing managed instance group or
2804 # autoscaler did not generate its prediction.
2805 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
2806 # where the instance group resides (for autoscalers living in regional
2807 # scope).
2808 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
2809 &quot;a_key&quot;: {
2810 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
2811 # Note: this is a timestamp when a schedule actually became active, not when
2812 # it was planned to do so.
2813 # The timestamp is in RFC3339
2814 # text format.
2815 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
2816 # Note: this is a timestamp when a schedule is planned to run, but the actual
2817 # time might be slightly different.
2818 # The timestamp is in RFC3339
2819 # text format.
2820 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
2821 },
2822 },
2823 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2824 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
2825 # possible values:
2826 #
2827 # - PENDING:
2828 # Autoscaler backend hasn&#x27;t read new/updated configuration.
2829 # - DELETING:
2830 # Configuration is being deleted.
2831 # - ACTIVE:
2832 # Configuration is acknowledged to be effective. Some warnings might
2833 # be present in the statusDetails field.
2834 # - ERROR:
2835 # Configuration has errors. Actionable for users. Details are present in
2836 # the statusDetails field.
2837 #
2838 #
2839 # New values might be added in the future.
2840 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
2841 # autoscaler. Read the documentation forCommonly
2842 # returned status messages for examples of status messages you might
2843 # encounter.
2844 {
2845 &quot;message&quot;: &quot;A String&quot;, # The status message.
2846 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
2847 # values:
2848 #
2849 # - ALL_INSTANCES_UNHEALTHY (WARNING):
2850 # All instances in the instance group are unhealthy (not in RUNNING
2851 # state).
2852 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
2853 # There is no backend service attached to the instance group.
2854 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
2855 # Autoscaler recommends a size greater than maxNumReplicas.
2856 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
2857 # The custom metric samples are not exported often enough to be
2858 # a credible base for autoscaling.
2859 # - CUSTOM_METRIC_INVALID (ERROR):
2860 # The custom metric that was specified does not exist or does not have
2861 # the necessary labels.
2862 # - MIN_EQUALS_MAX (WARNING):
2863 # The minNumReplicas is equal to maxNumReplicas. This means the
2864 # autoscaler cannot add or remove instances from the instance group.
2865 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
2866 # The autoscaler did not receive any data from the custom metric
2867 # configured for autoscaling.
2868 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
2869 # The autoscaler is configured to scale based on a load balancing signal
2870 # but the instance group has not received any requests from the load
2871 # balancer.
2872 # - MODE_OFF (WARNING):
2873 # Autoscaling is turned off. The number of instances in the group won&#x27;t
2874 # change automatically. The autoscaling configuration is preserved.
2875 # - MODE_ONLY_UP (WARNING):
2876 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
2877 # instances but not remove any.
2878 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
2879 # The instance group cannot be autoscaled because it has more than one
2880 # backend service attached to it.
2881 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
2882 # There is insufficient quota for the necessary resources, such as CPU or
2883 # number of instances.
2884 # - REGION_RESOURCE_STOCKOUT (ERROR):
2885 # Shown only for regional autoscalers: there is a resource stockout in
2886 # the chosen region.
2887 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
2888 # The target to be scaled does not exist.
2889 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
2890 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
2891 # has been configured for maxRate.
2892 # - ZONE_RESOURCE_STOCKOUT (ERROR):
2893 # For zonal autoscalers: there is a resource stockout in the chosen zone.
2894 # For regional autoscalers: in at least one of the zones you&#x27;re using
2895 # there is a resource stockout.
2896 #
2897 #
2898 # New values might be added in the future. Some of the values might not be
2899 # available in all API versions.
2900 },
2901 ],
2902 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
2903 # field is required when creating an autoscaler.
2904 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
2905 # where the instance group resides (for autoscalers living in zonal scope).
2906 }
2907
2908 autoscaler: string, Name of the autoscaler to patch.
2909 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
2910 that if you must retry your request, the server will know to ignore the
2911 request if it has already been completed.
2912
2913 For example, consider a situation where you make an initial request and
2914 the request times out. If you make the request again with the same
2915 request ID, the server can check if original operation with the same
2916 request ID was received, and if so, will ignore the second request. This
2917 prevents clients from accidentally creating duplicate commitments.
2918
2919 The request ID must be
2920 a valid UUID with the exception that zero UUID is not supported
2921 (00000000-0000-0000-0000-000000000000).
2922 x__xgafv: string, V1 error format.
2923 Allowed values
2924 1 - v1 error format
2925 2 - v2 error format
2926
2927 Returns:
2928 An object of the form:
2929
2930 { # Represents an Operation resource.
2931 #
2932 # Google Compute Engine has three Operation resources:
2933 #
2934 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
2935 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
2936 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
2937 #
2938 # You can use an operation resource to manage asynchronous API requests.
2939 # For more information, readHandling
2940 # API responses.
2941 #
2942 # Operations can be global, regional or zonal.
2943 #
2944 # - For global operations, use the `globalOperations`
2945 # resource.
2946 # - For regional operations, use the
2947 # `regionOperations` resource.
2948 # - For zonal operations, use
2949 # the `zoneOperations` resource.
2950 #
2951 #
2952 #
2953 # For more information, read
2954 # Global, Regional, and Zonal Resources.
2955 #
2956 # Note that completed Operation resources have a limited
2957 # retention period.
2958 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
2959 # Not present otherwise.
2960 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2961 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
2962 # set when the operation is created.
2963 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
2964 # text format.
2965 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
2966 # this field will be populated.
2967 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
2968 # operation.
2969 {
2970 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2971 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
2972 # details. There is a set of defined message types to use for providing
2973 # details.The syntax depends on the error code. For example,
2974 # QuotaExceededInfo will have details when the error code is
2975 # QUOTA_EXCEEDED.
2976 {
2977 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
2978 #
2979 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
2980 # is not enabled:
2981 #
2982 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
2983 # &quot;domain&quot;: &quot;googleapis.com&quot;
2984 # &quot;metadata&quot;: {
2985 # &quot;resource&quot;: &quot;projects/123&quot;,
2986 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
2987 # }
2988 # }
2989 #
2990 # This response indicates that the pubsub.googleapis.com API is not enabled.
2991 #
2992 # Example of an error that is returned when attempting to create a Spanner
2993 # instance in a region that is out of stock:
2994 #
2995 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
2996 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
2997 # &quot;metadata&quot;: {
2998 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
2999 # }
3000 # }
3001 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
3002 # is typically the registered service name of the tool or product that
3003 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
3004 # generated by some common infrastructure, the error domain must be a
3005 # globally unique value that identifies the infrastructure. For Google API
3006 # infrastructure, the error domain is &quot;googleapis.com&quot;.
3007 &quot;metadatas&quot;: { # Additional structured details about this error.
3008 #
3009 # Keys must match a regular expression of `a-z+` but should
3010 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
3011 # length. When identifying the current value of an exceeded limit, the units
3012 # should be contained in the key, not the value. For example, rather than
3013 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
3014 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
3015 # instances that can be created in a single (batch) request.
3016 &quot;a_key&quot;: &quot;A String&quot;,
3017 },
3018 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
3019 # proximate cause of the error. Error reasons are unique within a particular
3020 # domain of errors. This should be at most 63 characters and match a
3021 # regular expression of `A-Z+[A-Z0-9]`, which represents
3022 # UPPER_SNAKE_CASE.
3023 },
3024 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
3025 #
3026 # For example, if a quota check failed with an error indicating the calling
3027 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
3028 # directly to the right place in the developer console to flip the bit.
3029 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
3030 { # Describes a URL link.
3031 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
3032 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
3033 },
3034 ],
3035 },
3036 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
3037 # which can be attached to an RPC error.
3038 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
3039 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
3040 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
3041 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
3042 },
3043 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
3044 &quot;dimensions&quot;: { # The map holding related quota dimensions.
3045 &quot;a_key&quot;: &quot;A String&quot;,
3046 },
3047 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
3048 # type or metric.
3049 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
3050 # or metric.
3051 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
3052 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
3053 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
3054 },
3055 },
3056 ],
3057 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
3058 # This property is optional.
3059 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3060 },
3061 ],
3062 },
3063 &quot;getVersionOperationMetadata&quot;: {
3064 &quot;inlineSbomInfo&quot;: {
3065 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
3066 # appropriate identifiers.
3067 &quot;a_key&quot;: &quot;A String&quot;,
3068 },
3069 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
3070 # identifiers.
3071 &quot;a_key&quot;: &quot;A String&quot;,
3072 },
3073 },
3074 },
3075 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
3076 # message that was returned, such as `NOT FOUND`.
3077 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
3078 # status code that was returned. For example, a `404` means the
3079 # resource was not found.
3080 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
3081 # defined by the server.
3082 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
3083 # This value is inRFC3339
3084 # text format.
3085 &quot;instancesBulkInsertOperationMetadata&quot;: {
3086 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
3087 # Example key: zones/us-central1-a
3088 &quot;a_key&quot;: {
3089 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
3090 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
3091 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
3092 # error.
3093 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
3094 # if the flow is rolling forward or rolling back.
3095 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
3096 },
3097 },
3098 },
3099 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
3100 # Operation resources.
3101 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3102 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
3103 # group of operations results from a `bulkInsert` API request.
3104 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
3105 # `update`, or `delete`, and so on.
3106 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
3107 # There is no requirement that this be linear or support any granularity of
3108 # operations. This should not be used to guess when the operation will be
3109 # complete. This number should monotonically increase as the operation
3110 # progresses.
3111 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
3112 # applicable when performing regional operations.
3113 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3114 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
3115 # this field will contain information on all underlying zonal actions and
3116 # their state.
3117 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
3118 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
3119 # Example key: zones/us-central1-a
3120 &quot;a_key&quot;: {
3121 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
3122 # populated.
3123 # different programming environments, including REST APIs and RPC APIs. It is
3124 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3125 # three pieces of data: error code, error message, and error details.
3126 #
3127 # You can find out more about this error model and how to work with it in the
3128 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3129 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3130 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3131 # message types for APIs to use.
3132 {
3133 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3134 },
3135 ],
3136 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3137 # user-facing error message should be localized and sent in the
3138 # google.rpc.Status.details field, or localized by the client.
3139 },
3140 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
3141 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
3142 },
3143 },
3144 },
3145 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
3146 # This value is inRFC3339
3147 # text format.
3148 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
3149 # following:
3150 # `PENDING`, `RUNNING`, or `DONE`.
3151 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
3152 # operation.
3153 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
3154 # of the target resource.
3155 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
3156 # operations related to creating a snapshot, this points to the disk
3157 # that the snapshot was created from.
3158 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
3159 # `[email protected]` or
3160 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
3161 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
3162 # operation, this field will be populated.
3163 {
3164 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
3165 # Engine returns NO_RESULTS_ON_PAGE if there
3166 # are no results in the response.
3167 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
3168 # value format. For example:
3169 #
3170 # &quot;data&quot;: [
3171 # {
3172 # &quot;key&quot;: &quot;scope&quot;,
3173 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
3174 # }
3175 {
3176 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
3177 # returned. For example, for warnings where there are no results in a list
3178 # request for a particular zone, this key might be scope and
3179 # the key value might be the zone name. Other examples might be a key
3180 # indicating a deprecated resource and a suggested replacement, or a
3181 # warning about invalid network settings (for example, if an instance
3182 # attempts to perform IP forwarding but is not enabled for IP forwarding).
3183 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3184 },
3185 ],
3186 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3187 },
3188 ],
3189 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
3190 # applicable when performing per-zone operations.
3191 }</pre>
3192 </div>
3193
3194 <div class="method">
3195 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None, x__xgafv=None)</code>
3196 <pre>Returns permissions that a caller has on the specified resource.
3197
3198 Args:
3199 project: string, Project ID for this request. (required)
3200 zone: string, The name of the zone for this request. (required)
3201 resource: string, Name or id of the resource for this request. (required)
3202 body: object, The request body.
3203 The object takes the form of:
3204
3205 {
3206 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with
3207 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
3208 &quot;A String&quot;,
3209 ],
3210 }
3211
3212 x__xgafv: string, V1 error format.
3213 Allowed values
3214 1 - v1 error format
3215 2 - v2 error format
3216
3217 Returns:
3218 An object of the form:
3219
3220 {
3221 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
3222 # allowed.
3223 &quot;A String&quot;,
3224 ],
3225 }</pre>
3226 </div>
3227
3228 <div class="method">
3229 <code class="details" id="update">update(project, zone, autoscaler=None, body=None, requestId=None, x__xgafv=None)</code>
3230 <pre>Updates an autoscaler in the specified project using the data
3231 included in the request.
3232
3233 Args:
3234 project: string, Project ID for this request. (required)
3235 zone: string, Name of the zone for this request. (required)
3236 body: object, The request body.
3237 The object takes the form of:
3238
3239 { # Represents an Autoscaler resource.
3240 #
3241 # Google Compute Engine has two Autoscaler resources:
3242 #
3243 # * [Zonal](/compute/docs/reference/rest/beta/autoscalers)
3244 # * [Regional](/compute/docs/reference/rest/beta/regionAutoscalers)
3245 #
3246 # Use autoscalers to automatically add or delete instances from a
3247 # managed instance group according to your defined autoscaling policy.
3248 # For more information, read Autoscaling Groups of Instances.
3249 #
3250 # For zonal managed instance groups resource, use the autoscaler
3251 # resource.
3252 #
3253 # For regional managed instance groups, use theregionAutoscalers resource.
3254 &quot;autoscalingPolicy&quot;: { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define
3255 # one or more signals for an autoscaler: cpuUtilization,customMetricUtilizations, andloadBalancingUtilization.
3256 #
3257 # If none of these are specified, the default will be to autoscale based oncpuUtilization to 0.6 or 60%.
3258 &quot;coolDownPeriodSec&quot;: 42, # The number of seconds that your application takes to initialize on a VM
3259 # instance. This is referred to as the
3260 # [initialization period](/compute/docs/autoscaler#cool_down_period).
3261 # Specifying an accurate initialization period improves
3262 # autoscaler decisions. For example, when scaling out, the autoscaler ignores
3263 # data from VMs that are still initializing because those VMs might not yet
3264 # represent normal usage of your application. The default initialization
3265 # period is 60 seconds.
3266 #
3267 # Initialization periods might vary because of numerous
3268 # factors. We recommend that you test how long your application takes to
3269 # initialize. To do this, create a VM and time your application&#x27;s startup
3270 # process.
3271 &quot;cpuUtilization&quot;: { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale
3272 # based on the average CPU utilization of a managed instance group.
3273 &quot;predictiveMethod&quot;: &quot;A String&quot;, # Indicates whether predictive autoscaling based on CPU metric is enabled.
3274 # Valid values are:
3275 #
3276 # * NONE (default). No predictive method is used. The autoscaler scales the
3277 # group to meet current demand based on real-time metrics.
3278 # * OPTIMIZE_AVAILABILITY. Predictive autoscaling improves availability by
3279 # monitoring daily and weekly load patterns and scaling out ahead of
3280 # anticipated demand.
3281 &quot;utilizationTarget&quot;: 3.14, # The target CPU utilization that the autoscaler maintains. Must be
3282 # a float value in the range (0, 1]. If not specified, the default is0.6.
3283 #
3284 # If the CPU level is below the target utilization, the autoscaler scales
3285 # in the number of instances until it reaches the minimum number of
3286 # instances you specified or until the average CPU of your instances
3287 # reaches the target utilization.
3288 #
3289 # If the average CPU is above the target utilization, the autoscaler
3290 # scales out until it reaches the maximum number of instances you
3291 # specified or until the average utilization reaches the target
3292 # utilization.
3293 },
3294 &quot;customMetricUtilizations&quot;: [ # Configuration parameters of autoscaling based on a custom metric.
3295 { # Custom utilization metric policy.
3296 &quot;filter&quot;: &quot;A String&quot;, # A filter string, compatible with a Stackdriver Monitoringfilter string forTimeSeries.list API call. This filter is
3297 # used to select a specific TimeSeries for the purpose of autoscaling and
3298 # to determine whether the metric is exporting per-instance or
3299 # per-group data.
3300 #
3301 # For the filter to be valid for autoscaling purposes, the following rules
3302 # apply:
3303 #
3304 #
3305 # - You can only use the AND operator for joining
3306 # selectors.
3307 # - You can only use direct equality comparison operator
3308 # (=) without any functions for each selector.
3309 # - You can specify the metric in both the filter string and in the
3310 # metric field. However, if specified in both places, the metric must
3311 # be identical.
3312 # - The monitored resource type
3313 # determines what kind of values are expected for the metric. If it is
3314 # a gce_instance, the autoscaler expects the metric to
3315 # include a separate TimeSeries for each instance in a group. In such a
3316 # case, you cannot filter on resource labels.
3317 #
3318 #
3319 # If the resource type is any other value, the autoscaler expects
3320 # this metric to contain values that apply to the entire autoscaled
3321 # instance group and resource label filtering can be performed to
3322 # point autoscaler at the correct TimeSeries to scale upon. This is
3323 # called a *per-group metric* for the purpose of autoscaling.
3324 #
3325 # If not specified, the type defaults to
3326 # gce_instance.
3327 #
3328 #
3329 #
3330 # Try to provide a filter that is selective enough to pick just one
3331 # TimeSeries for the autoscaled group or for each of the instances (if you
3332 # are using gce_instance resource type). If multiple
3333 # TimeSeries are returned upon the query execution, the autoscaler will sum
3334 # their respective values to obtain its scaling value.
3335 &quot;metric&quot;: &quot;A String&quot;, # The identifier (type) of the Stackdriver Monitoring metric. The metric
3336 # cannot have negative values.
3337 #
3338 # The metric must have a value type of INT64 orDOUBLE.
3339 &quot;singleInstanceAssignment&quot;: 3.14, # If scaling is based on a per-group metric value that represents the
3340 # total amount of work to be done or resource usage, set this value to an
3341 # amount assigned for a single instance of the scaled group. Autoscaler
3342 # keeps the number of instances proportional to the value of this
3343 # metric. The metric itself does not change value due to group
3344 # resizing.
3345 #
3346 # A good metric to use with the target is for examplepubsub.googleapis.com/subscription/num_undelivered_messages
3347 # or a custom metric exporting the total number of requests coming to
3348 # your instances.
3349 #
3350 # A bad example would be a metric exporting an average or median latency,
3351 # since this value can&#x27;t include a chunk assignable to a single instance,
3352 # it could be better used with utilization_target instead.
3353 &quot;utilizationTarget&quot;: 3.14, # The target value of the metric that autoscaler maintains. This
3354 # must be a positive value. A utilization metric scales number of
3355 # virtual machines handling requests to increase or decrease
3356 # proportionally to the metric.
3357 #
3358 # For example, a good metric to use as a utilization_target ishttps://www.googleapis.com/compute/v1/instance/network/received_bytes_count.
3359 # The autoscaler works to keep this value constant for each of the
3360 # instances.
3361 &quot;utilizationTargetType&quot;: &quot;A String&quot;, # Defines how target utilization value is expressed for a Stackdriver
3362 # Monitoring metric. Either GAUGE,DELTA_PER_SECOND, or DELTA_PER_MINUTE.
3363 },
3364 ],
3365 &quot;loadBalancingUtilization&quot;: { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
3366 &quot;utilizationTarget&quot;: 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing
3367 # configuration) that the autoscaler maintains. Must be a positive float
3368 # value. If not defined, the default is 0.8.
3369 },
3370 &quot;maxNumReplicas&quot;: 42, # The maximum number of instances that the autoscaler can scale out to. This
3371 # is required when creating or updating an autoscaler. The maximum number
3372 # of replicas must not be lower than minimal number of replicas.
3373 &quot;minNumReplicas&quot;: 42, # The minimum number of replicas that the autoscaler can scale in to.
3374 # This cannot be less than 0. If not provided, autoscaler chooses a
3375 # default value depending on maximum number of instances allowed.
3376 &quot;mode&quot;: &quot;A String&quot;, # Defines the operating mode for this policy.
3377 # The following modes are available:
3378 #
3379 # - OFF: Disables the autoscaler but maintains its
3380 # configuration.
3381 # - ONLY_SCALE_OUT: Restricts the autoscaler to add
3382 # VM instances only.
3383 # - ON: Enables all autoscaler activities according to its
3384 # policy.
3385 #
3386 #
3387 # For more information, see
3388 # &quot;Turning off or restricting an autoscaler&quot;
3389 &quot;scaleDownControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
3390 # recommends an abrupt scale in of a MIG, it will be throttled as specified
3391 # by the parameters below.
3392 &quot;maxScaledDownReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
3393 # recommendation during the window autoscaler looks at when computing
3394 # recommendations. Possibly all these VMs can be deleted at once so user
3395 # service needs to be prepared to lose that many VMs in one step.
3396 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
3397 #
3398 #
3399 #
3400 # - If the value is fixed, then the calculated
3401 # value is equal to the fixed value.
3402 # - If the value is a percent, then the
3403 # calculated
3404 # value is percent/100 * targetSize. For example,
3405 # the calculated value of a 80% of a managed instance group
3406 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
3407 # is a remainder, the number is rounded.
3408 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3409 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
3410 # example, specify 80 for 80%.
3411 },
3412 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
3413 # include directives regarding slower scale in, as described above.
3414 },
3415 &quot;scaleInControl&quot;: { # Configuration that allows for slower scale in so that even if Autoscaler
3416 # recommends an abrupt scale in of a MIG, it will be throttled as specified
3417 # by the parameters below.
3418 &quot;maxScaledInReplicas&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Maximum allowed number (or %) of VMs that can be deducted from the peak
3419 # recommendation during the window autoscaler looks at when computing
3420 # recommendations. Possibly all these VMs can be deleted at once so user
3421 # service needs to be prepared to lose that many VMs in one step.
3422 &quot;calculated&quot;: 42, # Output only. Absolute value of VM instances calculated based on the specific mode.
3423 #
3424 #
3425 #
3426 # - If the value is fixed, then the calculated
3427 # value is equal to the fixed value.
3428 # - If the value is a percent, then the
3429 # calculated
3430 # value is percent/100 * targetSize. For example,
3431 # the calculated value of a 80% of a managed instance group
3432 # with 150 instances would be (80/100 * 150) = 120 VM instances. If there
3433 # is a remainder, the number is rounded.
3434 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
3435 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For
3436 # example, specify 80 for 80%.
3437 },
3438 &quot;timeWindowSec&quot;: 42, # How far back autoscaling looks when computing recommendations to
3439 # include directives regarding slower scale in, as described above.
3440 },
3441 &quot;scalingSchedules&quot;: { # Scaling schedules defined for an autoscaler. Multiple schedules
3442 # can be set on an autoscaler, and they can overlap. During overlapping
3443 # periods the greatest min_required_replicas of all scaling schedules is
3444 # applied. Up to 128 scaling schedules are allowed.
3445 &quot;a_key&quot;: { # Scaling based on user-defined schedule. The message describes a single
3446 # scaling schedule. A scaling schedule changes the minimum number of VM
3447 # instances an autoscaler can recommend, which can trigger scaling out.
3448 &quot;description&quot;: &quot;A String&quot;, # A description of a scaling schedule.
3449 &quot;disabled&quot;: True or False, # A boolean value that specifies whether a scaling schedule can influence
3450 # autoscaler recommendations. If set to true, then a scaling schedule has
3451 # no effect. This field is optional, and its value is false by default.
3452 &quot;durationSec&quot;: 42, # The duration of time intervals, in seconds, for which this
3453 # scaling schedule is to run. The minimum allowed value is 300.
3454 # This field is required.
3455 &quot;minRequiredReplicas&quot;: 42, # The minimum number of VM instances that the autoscaler will
3456 # recommend in time intervals starting according to schedule. This field is
3457 # required.
3458 &quot;schedule&quot;: &quot;A String&quot;, # The start timestamps of time intervals when this scaling
3459 # schedule is to provide a scaling signal. This field uses the extended
3460 # cron format (with an optional year field). The expression can describe a
3461 # single timestamp if the optional year is set, in which case the scaling
3462 # schedule runs once. The schedule is interpreted with respect to
3463 # time_zone. This field is required. Note: These timestamps only describe
3464 # when autoscaler starts providing the scaling signal. The VMs
3465 # need additional time to become serving.
3466 &quot;timeZone&quot;: &quot;A String&quot;, # The time zone to use when interpreting the schedule.
3467 # The value of this field must be a time zone name from the tz database:
3468 # https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
3469 # default value of &quot;UTC&quot; if left empty.
3470 },
3471 },
3472 &quot;stabilizationPeriodSec&quot;: 42, # The number of seconds that autoscaler waits for load stabilization before
3473 # making scale-in decisions. This is referred to as the
3474 # [stabilization period](/compute/docs/autoscaler#stabilization_period).
3475 # This might appear as a delay in scaling in but it is an important mechanism
3476 # for your application to not have fluctuating size due to short term load
3477 # fluctuations.
3478 #
3479 # The default stabilization period is 600 seconds.
3480 },
3481 &quot;creationTimestamp&quot;: &quot;A String&quot;, # Output only. [Output Only] Creation timestamp inRFC3339
3482 # text format.
3483 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you
3484 # create the resource.
3485 &quot;id&quot;: &quot;A String&quot;, # Output only. [Output Only] The unique identifier for the resource. This identifier is
3486 # defined by the server.
3487 &quot;kind&quot;: &quot;compute#autoscaler&quot;, # Output only. [Output Only] Type of the resource. Always compute#autoscaler
3488 # for autoscalers.
3489 &quot;name&quot;: &quot;A String&quot;, # Name of the resource. Provided by the client when the resource is created.
3490 # The name must be 1-63 characters long, and comply withRFC1035.
3491 # Specifically, the name must be 1-63 characters long and match the regular
3492 # expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first
3493 # character must be a lowercase letter, and all following characters must
3494 # be a dash, lowercase letter, or digit, except the last character, which
3495 # cannot be a dash.
3496 &quot;recommendedSize&quot;: 42, # Output only. [Output Only] Target recommended MIG size (number of instances) computed by
3497 # autoscaler. Autoscaler calculates the recommended MIG size even when the
3498 # autoscaling policy mode is different from ON. This field is empty when
3499 # autoscaler is not connected to an existing managed instance group or
3500 # autoscaler did not generate its prediction.
3501 &quot;region&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of theregion
3502 # where the instance group resides (for autoscalers living in regional
3503 # scope).
3504 &quot;scalingScheduleStatus&quot;: { # Output only. [Output Only] Status information of existing scaling schedules.
3505 &quot;a_key&quot;: {
3506 &quot;lastStartTime&quot;: &quot;A String&quot;, # [Output Only] The last time the scaling schedule became active.
3507 # Note: this is a timestamp when a schedule actually became active, not when
3508 # it was planned to do so.
3509 # The timestamp is in RFC3339
3510 # text format.
3511 &quot;nextStartTime&quot;: &quot;A String&quot;, # [Output Only] The next time the scaling schedule is to become active.
3512 # Note: this is a timestamp when a schedule is planned to run, but the actual
3513 # time might be slightly different.
3514 # The timestamp is in RFC3339
3515 # text format.
3516 &quot;state&quot;: &quot;A String&quot;, # [Output Only] The current state of a scaling schedule.
3517 },
3518 },
3519 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3520 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the autoscaler configuration. Current set of
3521 # possible values:
3522 #
3523 # - PENDING:
3524 # Autoscaler backend hasn&#x27;t read new/updated configuration.
3525 # - DELETING:
3526 # Configuration is being deleted.
3527 # - ACTIVE:
3528 # Configuration is acknowledged to be effective. Some warnings might
3529 # be present in the statusDetails field.
3530 # - ERROR:
3531 # Configuration has errors. Actionable for users. Details are present in
3532 # the statusDetails field.
3533 #
3534 #
3535 # New values might be added in the future.
3536 &quot;statusDetails&quot;: [ # [Output Only] Human-readable details about the current state of the
3537 # autoscaler. Read the documentation forCommonly
3538 # returned status messages for examples of status messages you might
3539 # encounter.
3540 {
3541 &quot;message&quot;: &quot;A String&quot;, # The status message.
3542 &quot;type&quot;: &quot;A String&quot;, # The type of error, warning, or notice returned. Current set of possible
3543 # values:
3544 #
3545 # - ALL_INSTANCES_UNHEALTHY (WARNING):
3546 # All instances in the instance group are unhealthy (not in RUNNING
3547 # state).
3548 # - BACKEND_SERVICE_DOES_NOT_EXIST (ERROR):
3549 # There is no backend service attached to the instance group.
3550 # - CAPPED_AT_MAX_NUM_REPLICAS (WARNING):
3551 # Autoscaler recommends a size greater than maxNumReplicas.
3552 # - CUSTOM_METRIC_DATA_POINTS_TOO_SPARSE (WARNING):
3553 # The custom metric samples are not exported often enough to be
3554 # a credible base for autoscaling.
3555 # - CUSTOM_METRIC_INVALID (ERROR):
3556 # The custom metric that was specified does not exist or does not have
3557 # the necessary labels.
3558 # - MIN_EQUALS_MAX (WARNING):
3559 # The minNumReplicas is equal to maxNumReplicas. This means the
3560 # autoscaler cannot add or remove instances from the instance group.
3561 # - MISSING_CUSTOM_METRIC_DATA_POINTS (WARNING):
3562 # The autoscaler did not receive any data from the custom metric
3563 # configured for autoscaling.
3564 # - MISSING_LOAD_BALANCING_DATA_POINTS (WARNING):
3565 # The autoscaler is configured to scale based on a load balancing signal
3566 # but the instance group has not received any requests from the load
3567 # balancer.
3568 # - MODE_OFF (WARNING):
3569 # Autoscaling is turned off. The number of instances in the group won&#x27;t
3570 # change automatically. The autoscaling configuration is preserved.
3571 # - MODE_ONLY_UP (WARNING):
3572 # Autoscaling is in the &quot;Autoscale only out&quot; mode. The autoscaler can add
3573 # instances but not remove any.
3574 # - MORE_THAN_ONE_BACKEND_SERVICE (ERROR):
3575 # The instance group cannot be autoscaled because it has more than one
3576 # backend service attached to it.
3577 # - NOT_ENOUGH_QUOTA_AVAILABLE (ERROR):
3578 # There is insufficient quota for the necessary resources, such as CPU or
3579 # number of instances.
3580 # - REGION_RESOURCE_STOCKOUT (ERROR):
3581 # Shown only for regional autoscalers: there is a resource stockout in
3582 # the chosen region.
3583 # - SCALING_TARGET_DOES_NOT_EXIST (ERROR):
3584 # The target to be scaled does not exist.
3585 # - UNSUPPORTED_MAX_RATE_LOAD_BALANCING_CONFIGURATION
3586 # (ERROR): Autoscaling does not work with an HTTP/S load balancer that
3587 # has been configured for maxRate.
3588 # - ZONE_RESOURCE_STOCKOUT (ERROR):
3589 # For zonal autoscalers: there is a resource stockout in the chosen zone.
3590 # For regional autoscalers: in at least one of the zones you&#x27;re using
3591 # there is a resource stockout.
3592 #
3593 #
3594 # New values might be added in the future. Some of the values might not be
3595 # available in all API versions.
3596 },
3597 ],
3598 &quot;target&quot;: &quot;A String&quot;, # URL of the managed instance group that this autoscaler will scale. This
3599 # field is required when creating an autoscaler.
3600 &quot;zone&quot;: &quot;A String&quot;, # Output only. [Output Only] URL of thezone
3601 # where the instance group resides (for autoscalers living in zonal scope).
3602 }
3603
3604 autoscaler: string, Name of the autoscaler to update.
3605 requestId: string, An optional request ID to identify requests. Specify a unique request ID so
3606 that if you must retry your request, the server will know to ignore the
3607 request if it has already been completed.
3608
3609 For example, consider a situation where you make an initial request and
3610 the request times out. If you make the request again with the same
3611 request ID, the server can check if original operation with the same
3612 request ID was received, and if so, will ignore the second request. This
3613 prevents clients from accidentally creating duplicate commitments.
3614
3615 The request ID must be
3616 a valid UUID with the exception that zero UUID is not supported
3617 (00000000-0000-0000-0000-000000000000).
3618 x__xgafv: string, V1 error format.
3619 Allowed values
3620 1 - v1 error format
3621 2 - v2 error format
3622
3623 Returns:
3624 An object of the form:
3625
3626 { # Represents an Operation resource.
3627 #
3628 # Google Compute Engine has three Operation resources:
3629 #
3630 # * [Global](/compute/docs/reference/rest/beta/globalOperations)
3631 # * [Regional](/compute/docs/reference/rest/beta/regionOperations)
3632 # * [Zonal](/compute/docs/reference/rest/beta/zoneOperations)
3633 #
3634 # You can use an operation resource to manage asynchronous API requests.
3635 # For more information, readHandling
3636 # API responses.
3637 #
3638 # Operations can be global, regional or zonal.
3639 #
3640 # - For global operations, use the `globalOperations`
3641 # resource.
3642 # - For regional operations, use the
3643 # `regionOperations` resource.
3644 # - For zonal operations, use
3645 # the `zoneOperations` resource.
3646 #
3647 #
3648 #
3649 # For more information, read
3650 # Global, Regional, and Zonal Resources.
3651 #
3652 # Note that completed Operation resources have a limited
3653 # retention period.
3654 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request.
3655 # Not present otherwise.
3656 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
3657 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is
3658 # set when the operation is created.
3659 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is inRFC3339
3660 # text format.
3661 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation,
3662 # this field will be populated.
3663 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this
3664 # operation.
3665 {
3666 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
3667 &quot;errorDetails&quot;: [ # [Output Only] An optional list of messages that contain the error
3668 # details. There is a set of defined message types to use for providing
3669 # details.The syntax depends on the error code. For example,
3670 # QuotaExceededInfo will have details when the error code is
3671 # QUOTA_EXCEEDED.
3672 {
3673 &quot;errorInfo&quot;: { # Describes the cause of the error with structured details.
3674 #
3675 # Example of an error when contacting the &quot;pubsub.googleapis.com&quot; API when it
3676 # is not enabled:
3677 #
3678 # { &quot;reason&quot;: &quot;API_DISABLED&quot;
3679 # &quot;domain&quot;: &quot;googleapis.com&quot;
3680 # &quot;metadata&quot;: {
3681 # &quot;resource&quot;: &quot;projects/123&quot;,
3682 # &quot;service&quot;: &quot;pubsub.googleapis.com&quot;
3683 # }
3684 # }
3685 #
3686 # This response indicates that the pubsub.googleapis.com API is not enabled.
3687 #
3688 # Example of an error that is returned when attempting to create a Spanner
3689 # instance in a region that is out of stock:
3690 #
3691 # { &quot;reason&quot;: &quot;STOCKOUT&quot;
3692 # &quot;domain&quot;: &quot;spanner.googleapis.com&quot;,
3693 # &quot;metadata&quot;: {
3694 # &quot;availableRegions&quot;: &quot;us-central1,us-east2&quot;
3695 # }
3696 # }
3697 &quot;domain&quot;: &quot;A String&quot;, # The logical grouping to which the &quot;reason&quot; belongs. The error domain
3698 # is typically the registered service name of the tool or product that
3699 # generates the error. Example: &quot;pubsub.googleapis.com&quot;. If the error is
3700 # generated by some common infrastructure, the error domain must be a
3701 # globally unique value that identifies the infrastructure. For Google API
3702 # infrastructure, the error domain is &quot;googleapis.com&quot;.
3703 &quot;metadatas&quot;: { # Additional structured details about this error.
3704 #
3705 # Keys must match a regular expression of `a-z+` but should
3706 # ideally be lowerCamelCase. Also, they must be limited to 64 characters in
3707 # length. When identifying the current value of an exceeded limit, the units
3708 # should be contained in the key, not the value. For example, rather than
3709 # `{&quot;instanceLimit&quot;: &quot;100/request&quot;}`, should be returned as,
3710 # `{&quot;instanceLimitPerRequest&quot;: &quot;100&quot;}`, if the client exceeds the number of
3711 # instances that can be created in a single (batch) request.
3712 &quot;a_key&quot;: &quot;A String&quot;,
3713 },
3714 &quot;reason&quot;: &quot;A String&quot;, # The reason of the error. This is a constant value that identifies the
3715 # proximate cause of the error. Error reasons are unique within a particular
3716 # domain of errors. This should be at most 63 characters and match a
3717 # regular expression of `A-Z+[A-Z0-9]`, which represents
3718 # UPPER_SNAKE_CASE.
3719 },
3720 &quot;help&quot;: { # Provides links to documentation or for performing an out of band action.
3721 #
3722 # For example, if a quota check failed with an error indicating the calling
3723 # project hasn&#x27;t enabled the accessed service, this can contain a URL pointing
3724 # directly to the right place in the developer console to flip the bit.
3725 &quot;links&quot;: [ # URL(s) pointing to additional information on handling the current error.
3726 { # Describes a URL link.
3727 &quot;description&quot;: &quot;A String&quot;, # Describes what the link offers.
3728 &quot;url&quot;: &quot;A String&quot;, # The URL of the link.
3729 },
3730 ],
3731 },
3732 &quot;localizedMessage&quot;: { # Provides a localized error message that is safe to return to the user
3733 # which can be attached to an RPC error.
3734 &quot;locale&quot;: &quot;A String&quot;, # The locale used following the specification defined at
3735 # https://www.rfc-editor.org/rfc/bcp/bcp47.txt.
3736 # Examples are: &quot;en-US&quot;, &quot;fr-CH&quot;, &quot;es-MX&quot;
3737 &quot;message&quot;: &quot;A String&quot;, # The localized error message in the above locale.
3738 },
3739 &quot;quotaInfo&quot;: { # Additional details for quota exceeded error for resource quota.
3740 &quot;dimensions&quot;: { # The map holding related quota dimensions.
3741 &quot;a_key&quot;: &quot;A String&quot;,
3742 },
3743 &quot;futureLimit&quot;: 3.14, # Future quota limit being rolled out. The limit&#x27;s unit depends on the quota
3744 # type or metric.
3745 &quot;limit&quot;: 3.14, # Current effective quota limit. The limit&#x27;s unit depends on the quota type
3746 # or metric.
3747 &quot;limitName&quot;: &quot;A String&quot;, # The name of the quota limit.
3748 &quot;metricName&quot;: &quot;A String&quot;, # The Compute Engine quota metric name.
3749 &quot;rolloutStatus&quot;: &quot;A String&quot;, # Rollout status of the future quota limit.
3750 },
3751 },
3752 ],
3753 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error.
3754 # This property is optional.
3755 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
3756 },
3757 ],
3758 },
3759 &quot;getVersionOperationMetadata&quot;: {
3760 &quot;inlineSbomInfo&quot;: {
3761 &quot;currentComponentVersions&quot;: { # A mapping of components to their currently-applied versions or other
3762 # appropriate identifiers.
3763 &quot;a_key&quot;: &quot;A String&quot;,
3764 },
3765 &quot;targetComponentVersions&quot;: { # A mapping of components to their target versions or other appropriate
3766 # identifiers.
3767 &quot;a_key&quot;: &quot;A String&quot;,
3768 },
3769 },
3770 },
3771 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error
3772 # message that was returned, such as `NOT FOUND`.
3773 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error
3774 # status code that was returned. For example, a `404` means the
3775 # resource was not found.
3776 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is
3777 # defined by the server.
3778 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested.
3779 # This value is inRFC3339
3780 # text format.
3781 &quot;instancesBulkInsertOperationMetadata&quot;: {
3782 &quot;perLocationStatus&quot;: { # Status information per location (location name is key).
3783 # Example key: zones/us-central1-a
3784 &quot;a_key&quot;: {
3785 &quot;createdVmCount&quot;: 42, # [Output Only] Count of VMs successfully created so far.
3786 &quot;deletedVmCount&quot;: 42, # [Output Only] Count of VMs that got deleted during rollback.
3787 &quot;failedToCreateVmCount&quot;: 42, # [Output Only] Count of VMs that started creating but encountered an
3788 # error.
3789 &quot;status&quot;: &quot;A String&quot;, # [Output Only] Creation status of BulkInsert operation - information
3790 # if the flow is rolling forward or rolling back.
3791 &quot;targetVmCount&quot;: 42, # [Output Only] Count of VMs originally planned to be created.
3792 },
3793 },
3794 },
3795 &quot;kind&quot;: &quot;compute#operation&quot;, # Output only. [Output Only] Type of the resource. Always `compute#operation` for
3796 # Operation resources.
3797 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
3798 &quot;operationGroupId&quot;: &quot;A String&quot;, # Output only. [Output Only] An ID that represents a group of operations, such as when a
3799 # group of operations results from a `bulkInsert` API request.
3800 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`,
3801 # `update`, or `delete`, and so on.
3802 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100.
3803 # There is no requirement that this be linear or support any granularity of
3804 # operations. This should not be used to guess when the operation will be
3805 # complete. This number should monotonically increase as the operation
3806 # progresses.
3807 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only
3808 # applicable when performing regional operations.
3809 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
3810 &quot;setCommonInstanceMetadataOperationMetadata&quot;: { # Output only. [Output Only] If the operation is for projects.setCommonInstanceMetadata,
3811 # this field will contain information on all underlying zonal actions and
3812 # their state.
3813 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The client operation id.
3814 &quot;perLocationOperations&quot;: { # [Output Only] Status information per location (location name is key).
3815 # Example key: zones/us-central1-a
3816 &quot;a_key&quot;: {
3817 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # [Output Only] If state is `ABANDONED` or `FAILED`, this field is
3818 # populated.
3819 # different programming environments, including REST APIs and RPC APIs. It is
3820 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
3821 # three pieces of data: error code, error message, and error details.
3822 #
3823 # You can find out more about this error model and how to work with it in the
3824 # [API Design Guide](https://cloud.google.com/apis/design/errors).
3825 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
3826 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
3827 # message types for APIs to use.
3828 {
3829 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
3830 },
3831 ],
3832 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
3833 # user-facing error message should be localized and sent in the
3834 # google.rpc.Status.details field, or localized by the client.
3835 },
3836 &quot;state&quot;: &quot;A String&quot;, # [Output Only] Status of the action, which can be one of the following:
3837 # `PROPAGATING`, `PROPAGATED`, `ABANDONED`, `FAILED`, or `DONE`.
3838 },
3839 },
3840 },
3841 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server.
3842 # This value is inRFC3339
3843 # text format.
3844 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the
3845 # following:
3846 # `PENDING`, `RUNNING`, or `DONE`.
3847 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the
3848 # operation.
3849 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation
3850 # of the target resource.
3851 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For
3852 # operations related to creating a snapshot, this points to the disk
3853 # that the snapshot was created from.
3854 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example:
3855 # `[email protected]` or
3856 # `alice_smith_identifier (global/workforcePools/example-com-us-employees)`.
3857 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the
3858 # operation, this field will be populated.
3859 {
3860 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute
3861 # Engine returns NO_RESULTS_ON_PAGE if there
3862 # are no results in the response.
3863 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key:
3864 # value format. For example:
3865 #
3866 # &quot;data&quot;: [
3867 # {
3868 # &quot;key&quot;: &quot;scope&quot;,
3869 # &quot;value&quot;: &quot;zones/us-east1-d&quot;
3870 # }
3871 {
3872 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being
3873 # returned. For example, for warnings where there are no results in a list
3874 # request for a particular zone, this key might be scope and
3875 # the key value might be the zone name. Other examples might be a key
3876 # indicating a deprecated resource and a suggested replacement, or a
3877 # warning about invalid network settings (for example, if an instance
3878 # attempts to perform IP forwarding but is not enabled for IP forwarding).
3879 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
3880 },
3881 ],
3882 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
3883 },
3884 ],
3885 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only
3886 # applicable when performing per-zone operations.
3887 }</pre>
3888 </div>
3889
3890 </body></html>