blob: 7c5722b8e099faa14e25af8da39d1c52674acd08 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.autoscalers.html">autoscalers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070078 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080079<p class="firstline">Retrieves an aggregated list of autoscalers.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070084 <code><a href="#delete">delete(project, zone, autoscaler, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070085<p class="firstline">Deletes the specified autoscaler.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070086<p class="toc_element">
87 <code><a href="#get">get(project, zone, autoscaler)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#insert">insert(project, zone, body, requestId=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070091<p class="firstline">Creates an autoscaler in the specified project using the data included in the request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070092<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070093 <code><a href="#list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070094<p class="firstline">Retrieves a list of autoscalers contained within the specified zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070095<p class="toc_element">
96 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#patch">patch(project, zone, body, requestId=None, autoscaler=None)</a></code></p>
100<p class="firstline">Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code><a href="#update">update(project, zone, body, requestId=None, autoscaler=None)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700103<p class="firstline">Updates an autoscaler in the specified project using the data included in the request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700104<h3>Method Details</h3>
105<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700106 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800107 <pre>Retrieves an aggregated list of autoscalers.
Takashi Matsuo06694102015-09-11 13:55:40 -0700108
109Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800110 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700111 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
112
113You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
114
115Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800117 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700119
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700120For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700121
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700124To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Takashi Matsuo06694102015-09-11 13:55:40 -0700125
126Returns:
127 An object of the form:
128
129 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800130 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 "kind": "compute#autoscalerAggregatedList", # [Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.
132 "items": { # A list of AutoscalersScopedList resources.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700133 "a_key": { # [Output Only] Name of the scope containing this set of autoscalers.
134 "warning": { # [Output Only] Informational warning which replaces the list of autoscalers when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800135 "message": "A String", # [Output Only] A human-readable description of the warning code.
136 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
137 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
138 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700139 {
140 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700141 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700142 },
143 ],
144 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145 "autoscalers": [ # [Output Only] A list of autoscalers contained in this scope.
146 { # Represents an Autoscaler resource.
147 #
148 #
149 #
150 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
151 #
152 # For zonal managed instance groups resource, use the autoscaler resource.
153 #
154 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
155 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700156 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700158 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700159 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700160 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
161 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700162 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700163 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
164 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
165 #
166 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
167 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700168 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700170 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700171 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700172 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700173 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400174 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
176 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400177 #
178 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700179 },
180 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700181 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700182 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700183 #
184 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
185 #
186 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700187 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700188 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700189 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700190 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700191 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
192 {
193 "message": "A String", # The status message.
194 "type": "A String", # The type of error returned.
195 },
196 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700197 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800198 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700199 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700201 },
202 ],
203 },
204 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 "warning": { # [Output Only] Informational warning message.
206 "message": "A String", # [Output Only] A human-readable description of the warning code.
207 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
208 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
209 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
210 {
211 "value": "A String", # [Output Only] A warning data value corresponding to the key.
212 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
213 },
214 ],
215 },
216 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700217 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
218 }</pre>
219</div>
220
221<div class="method">
222 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
223 <pre>Retrieves the next page of results.
224
225Args:
226 previous_request: The request for the previous page. (required)
227 previous_response: The response from the request for the previous page. (required)
228
229Returns:
230 A request object that you can call 'execute()' on to request the next
231 page. Returns None if there are no more items in the collection.
232 </pre>
233</div>
234
235<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700236 <code class="details" id="delete">delete(project, zone, autoscaler, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700237 <pre>Deletes the specified autoscaler.
Takashi Matsuo06694102015-09-11 13:55:40 -0700238
239Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700241 zone: string, Name of the zone for this request. (required)
242 autoscaler: string, Name of the autoscaler to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
244
245For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
246
247The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700248
249Returns:
250 An object of the form:
251
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252 { # Represents an Operation resource.
253 #
254 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
255 #
256 # Operations can be global, regional or zonal.
257 # - For global operations, use the globalOperations resource.
258 # - For regional operations, use the regionOperations resource.
259 # - For zonal operations, use the zonalOperations resource.
260 #
261 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800262 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400264 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800267 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
268 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700269 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800270 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
271 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700272 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800273 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
274 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700275 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
276 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800277 "message": "A String", # [Output Only] A human-readable description of the warning code.
278 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
279 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
280 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700281 {
282 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700283 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700284 },
285 ],
286 },
287 ],
288 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800289 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
290 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700291 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700293 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
294 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
295 {
296 "message": "A String", # [Output Only] An optional, human-readable error message.
297 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700298 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 },
300 ],
301 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800302 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700303 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800304 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700305 }</pre>
306</div>
307
308<div class="method">
309 <code class="details" id="get">get(project, zone, autoscaler)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700310 <pre>Returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700311
312Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800313 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700314 zone: string, Name of the zone for this request. (required)
315 autoscaler: string, Name of the autoscaler to return. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700316
317Returns:
318 An object of the form:
319
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700320 { # Represents an Autoscaler resource.
321 #
322 #
323 #
324 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
325 #
326 # For zonal managed instance groups resource, use the autoscaler resource.
327 #
328 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
329 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700330 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800331 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700332 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700333 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700334 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
335 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700336 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700337 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
338 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
339 #
340 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
341 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700342 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700343 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700344 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700345 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700346 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700347 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400348 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700349 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
350 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400351 #
352 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700353 },
354 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700355 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700356 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700357 #
358 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
359 #
360 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700361 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700362 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700363 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700364 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
366 {
367 "message": "A String", # The status message.
368 "type": "A String", # The type of error returned.
369 },
370 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700371 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800372 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700373 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700375 }</pre>
376</div>
377
378<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700379 <code class="details" id="insert">insert(project, zone, body, requestId=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700380 <pre>Creates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700381
382Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800383 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700384 zone: string, Name of the zone for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700385 body: object, The request body. (required)
386 The object takes the form of:
387
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700388{ # Represents an Autoscaler resource.
389 #
390 #
391 #
392 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
393 #
394 # For zonal managed instance groups resource, use the autoscaler resource.
395 #
396 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
397 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700398 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800399 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700400 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700401 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700402 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
403 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700404 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700405 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
406 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
407 #
408 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
409 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700410 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700411 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700412 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700413 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700414 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700415 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400416 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700417 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
418 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400419 #
420 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700421 },
422 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700423 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700424 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700425 #
426 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
427 #
428 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700429 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700430 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700431 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700432 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700433 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
434 {
435 "message": "A String", # The status message.
436 "type": "A String", # The type of error returned.
437 },
438 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700439 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800440 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700441 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700443 }
444
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700445 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
446
447For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
448
449The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700450
451Returns:
452 An object of the form:
453
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700454 { # Represents an Operation resource.
455 #
456 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
457 #
458 # Operations can be global, regional or zonal.
459 # - For global operations, use the globalOperations resource.
460 # - For regional operations, use the regionOperations resource.
461 # - For zonal operations, use the zonalOperations resource.
462 #
463 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800464 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400466 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800467 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700468 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800469 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
470 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700471 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800472 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
473 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700474 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800475 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
476 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700477 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
478 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800479 "message": "A String", # [Output Only] A human-readable description of the warning code.
480 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
481 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
482 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700483 {
484 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700485 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700486 },
487 ],
488 },
489 ],
490 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800491 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
492 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700493 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700494 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700495 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
496 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
497 {
498 "message": "A String", # [Output Only] An optional, human-readable error message.
499 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700500 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700501 },
502 ],
503 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800504 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700505 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800506 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700507 }</pre>
508</div>
509
510<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700511 <code class="details" id="list">list(project, zone, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700512 <pre>Retrieves a list of autoscalers contained within the specified zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700513
514Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800515 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700516 zone: string, Name of the zone for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700517 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
518
519You can also sort results in descending order based on the creation timestamp using orderBy="creationTimestamp desc". This sorts results based on the creationTimestamp field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
520
521Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400522 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800523 pageToken: string, Specifies a page token to use. Set pageToken to the nextPageToken returned by a previous list request to get the next page of results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700525
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700526For example, if you are filtering Compute Engine instances, you can exclude instances named example-instance by specifying name != example-instance.
Takashi Matsuo06694102015-09-11 13:55:40 -0700527
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528You can also filter nested fields. For example, you could specify scheduling.automaticRestart = false to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700530To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Takashi Matsuo06694102015-09-11 13:55:40 -0700531
532Returns:
533 An object of the form:
534
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700535 { # Contains a list of Autoscaler resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800536 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700537 "kind": "compute#autoscalerList", # [Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.
Takashi Matsuo06694102015-09-11 13:55:40 -0700538 "items": [ # A list of Autoscaler resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 { # Represents an Autoscaler resource.
540 #
541 #
542 #
543 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
544 #
545 # For zonal managed instance groups resource, use the autoscaler resource.
546 #
547 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
548 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700549 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800550 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700551 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700552 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700553 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
554 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700555 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700556 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
557 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
558 #
559 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
560 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700561 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700562 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700563 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700564 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700565 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700566 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400567 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700568 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
569 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400570 #
571 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700572 },
573 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700574 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700575 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700576 #
577 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
578 #
579 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700580 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700581 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700582 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700583 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
585 {
586 "message": "A String", # The status message.
587 "type": "A String", # The type of error returned.
588 },
589 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700590 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800591 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700592 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700594 },
595 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700596 "warning": { # [Output Only] Informational warning message.
597 "message": "A String", # [Output Only] A human-readable description of the warning code.
598 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
599 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
600 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
601 {
602 "value": "A String", # [Output Only] A warning data value corresponding to the key.
603 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
604 },
605 ],
606 },
607 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700608 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
609 }</pre>
610</div>
611
612<div class="method">
613 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
614 <pre>Retrieves the next page of results.
615
616Args:
617 previous_request: The request for the previous page. (required)
618 previous_response: The response from the request for the previous page. (required)
619
620Returns:
621 A request object that you can call 'execute()' on to request the next
622 page. Returns None if there are no more items in the collection.
623 </pre>
624</div>
625
626<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700627 <code class="details" id="patch">patch(project, zone, body, requestId=None, autoscaler=None)</code>
628 <pre>Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Takashi Matsuo06694102015-09-11 13:55:40 -0700629
630Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800631 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700632 zone: string, Name of the zone for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700633 body: object, The request body. (required)
634 The object takes the form of:
635
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700636{ # Represents an Autoscaler resource.
637 #
638 #
639 #
640 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
641 #
642 # For zonal managed instance groups resource, use the autoscaler resource.
643 #
644 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
645 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700646 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800647 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700648 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700649 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700650 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
651 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700652 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700653 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
654 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
655 #
656 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
657 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700659 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700660 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700661 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700662 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700663 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400664 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
666 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400667 #
668 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700669 },
670 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700671 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700672 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700673 #
674 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
675 #
676 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700677 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700678 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700679 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700680 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700681 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
682 {
683 "message": "A String", # The status message.
684 "type": "A String", # The type of error returned.
685 },
686 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700687 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800688 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700689 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700690 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700691 }
692
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700693 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
694
695For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
696
697The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400698 autoscaler: string, Name of the autoscaler to patch.
Takashi Matsuo06694102015-09-11 13:55:40 -0700699
700Returns:
701 An object of the form:
702
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700703 { # Represents an Operation resource.
704 #
705 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
706 #
707 # Operations can be global, regional or zonal.
708 # - For global operations, use the globalOperations resource.
709 # - For regional operations, use the regionOperations resource.
710 # - For zonal operations, use the zonalOperations resource.
711 #
712 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800713 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700714 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400715 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800716 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800718 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
719 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700720 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800721 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
722 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700723 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800724 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
725 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700726 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
727 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800728 "message": "A String", # [Output Only] A human-readable description of the warning code.
729 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
730 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
731 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700732 {
733 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700734 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700735 },
736 ],
737 },
738 ],
739 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800740 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
741 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700742 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700743 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700744 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
745 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
746 {
747 "message": "A String", # [Output Only] An optional, human-readable error message.
748 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700749 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700750 },
751 ],
752 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800753 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700754 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800755 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700756 }</pre>
757</div>
758
759<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700760 <code class="details" id="update">update(project, zone, body, requestId=None, autoscaler=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700761 <pre>Updates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700762
763Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800764 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700765 zone: string, Name of the zone for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700766 body: object, The request body. (required)
767 The object takes the form of:
768
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700769{ # Represents an Autoscaler resource.
770 #
771 #
772 #
773 # Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances.
774 #
775 # For zonal managed instance groups resource, use the autoscaler resource.
776 #
777 # For regional managed instance groups, use the regionAutoscalers resource. (== resource_for beta.autoscalers ==) (== resource_for v1.autoscalers ==) (== resource_for beta.regionAutoscalers ==) (== resource_for v1.regionAutoscalers ==)
778 "status": "A String", # [Output Only] The status of the autoscaler configuration.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700779 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800780 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700781 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700782 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700783 "autoscalingPolicy": { # Cloud Autoscaler policy. # The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization.
784 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700785 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700786 "maxNumReplicas": 42, # The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
787 "coolDownPeriodSec": 42, # The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds.
788 #
789 # Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
790 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700791 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP(S) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
Takashi Matsuo06694102015-09-11 13:55:40 -0700792 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700793 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700794 { # Custom utilization metric policy.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700795 "metric": "A String", # The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700796 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400797 # The metric must have a value type of INT64 or DOUBLE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE.
799 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400800 #
801 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Takashi Matsuo06694102015-09-11 13:55:40 -0700802 },
803 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700804 "cpuUtilization": { # CPU utilization policy. # Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700805 "utilizationTarget": 3.14, # The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700806 #
807 # If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization.
808 #
809 # If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
Takashi Matsuo06694102015-09-11 13:55:40 -0700810 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700811 "minNumReplicas": 42, # The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
Takashi Matsuo06694102015-09-11 13:55:40 -0700812 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700813 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
815 {
816 "message": "A String", # The status message.
817 "type": "A String", # The type of error returned.
818 },
819 ],
Takashi Matsuo06694102015-09-11 13:55:40 -0700820 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800821 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -0700822 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700823 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Takashi Matsuo06694102015-09-11 13:55:40 -0700824 }
825
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700826 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
827
828For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
829
830The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700831 autoscaler: string, Name of the autoscaler to update.
Takashi Matsuo06694102015-09-11 13:55:40 -0700832
833Returns:
834 An object of the form:
835
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700836 { # Represents an Operation resource.
837 #
838 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
839 #
840 # Operations can be global, regional or zonal.
841 # - For global operations, use the globalOperations resource.
842 # - For regional operations, use the regionOperations resource.
843 # - For zonal operations, use the zonalOperations resource.
844 #
845 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800846 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700847 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400848 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800849 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700850 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800851 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
852 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Takashi Matsuo06694102015-09-11 13:55:40 -0700853 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800854 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
855 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found.
Takashi Matsuo06694102015-09-11 13:55:40 -0700856 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800857 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
858 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Takashi Matsuo06694102015-09-11 13:55:40 -0700859 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
860 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800861 "message": "A String", # [Output Only] A human-readable description of the warning code.
862 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
863 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
864 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700865 {
866 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700867 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
Takashi Matsuo06694102015-09-11 13:55:40 -0700868 },
869 ],
870 },
871 ],
872 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800873 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
874 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700875 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700876 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700877 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
878 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
879 {
880 "message": "A String", # [Output Only] An optional, human-readable error message.
881 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700882 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Takashi Matsuo06694102015-09-11 13:55:40 -0700883 },
884 ],
885 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800886 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700887 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800888 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700889 }</pre>
890</div>
891
892</body></html>