Debian Codegraph @

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