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