blob: 7de982cfe988c44d35e0a1fcd5d924453e7460f6 [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">
78 <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<p class="firstline">Retrieves the list of autoscalers grouped by scope.</p>
80<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">
84 <code><a href="#delete">delete(project, zone, autoscaler)</a></code></p>
85<p class="firstline">Deletes the specified autoscaler resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, zone, autoscaler)</a></code></p>
88<p class="firstline">Returns the specified autoscaler resource.</p>
89<p class="toc_element">
90 <code><a href="#insert">insert(project, zone, body)</a></code></p>
91<p class="firstline">Creates an autoscaler resource in the specified project using the data included in the request.</p>
92<p class="toc_element">
93 <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p>
94<p class="firstline">Retrieves the list of autoscaler resources contained within the specified zone.</p>
95<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">
99 <code><a href="#patch">patch(project, zone, autoscaler, body)</a></code></p>
100<p class="firstline">Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics.</p>
101<p class="toc_element">
102 <code><a href="#update">update(project, zone, body, autoscaler=None)</a></code></p>
103<p class="firstline">Updates an autoscaler resource in the specified project using the data included in the request.</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code>
107 <pre>Retrieves the list of autoscalers grouped by scope.
108
109Args:
110 project: string, Name of the project scoping this request. (required)
111 maxResults: integer, Maximum count of results to be returned.
112 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
113 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
114
115The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
116
117For example, filter=name ne example-instance.
118
119Returns:
120 An object of the form:
121
122 {
123 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
124 "items": { # A map of scoped autoscaler lists.
125 "a_key": { # Name of the scope containing this set of autoscalers.
126 "warning": { # Informational warning which replaces the list of autoscalers when the list is empty.
127 "message": "A String", # [Output Only] Optional human-readable details for this warning.
128 "code": "A String", # [Output Only] The warning type identifier for this warning.
129 "data": [ # [Output Only] Metadata for this warning in key: value format.
130 {
131 "value": "A String", # [Output Only] A warning data value corresponding to the key.
132 "key": "A String", # [Output Only] A key for the warning data.
133 },
134 ],
135 },
136 "autoscalers": [ # List of autoscalers contained in this scope.
137 {
138 "kind": "compute#autoscaler", # Type of the resource.
139 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
140 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
141 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
142 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
143 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
144 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
145 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
146 },
147 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
148 { # Custom utilization metric policy.
149 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
150 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
151 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
152 },
153 ],
154 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
155 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
156 },
157 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
158 },
159 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
160 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
161 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
162 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
163 "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.
164 },
165 ],
166 },
167 },
168 "kind": "compute#autoscalerAggregatedList", # Type of resource.
169 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
170 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
171 }</pre>
172</div>
173
174<div class="method">
175 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
176 <pre>Retrieves the next page of results.
177
178Args:
179 previous_request: The request for the previous page. (required)
180 previous_response: The response from the request for the previous page. (required)
181
182Returns:
183 A request object that you can call 'execute()' on to request the next
184 page. Returns None if there are no more items in the collection.
185 </pre>
186</div>
187
188<div class="method">
189 <code class="details" id="delete">delete(project, zone, autoscaler)</code>
190 <pre>Deletes the specified autoscaler resource.
191
192Args:
193 project: string, Name of the project scoping this request. (required)
194 zone: string, Name of the zone scoping this request. (required)
195 autoscaler: string, Name of the persistent autoscaler resource to delete. (required)
196
197Returns:
198 An object of the form:
199
200 { # An Operation resource, used to manage asynchronous API requests.
201 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
202 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
203 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
204 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
205 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
206 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
207 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
208 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
209 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
210 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
211 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
212 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
213 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
214 {
215 "message": "A String", # [Output Only] Optional human-readable details for this warning.
216 "code": "A String", # [Output Only] The warning type identifier for this warning.
217 "data": [ # [Output Only] Metadata for this warning in key: value format.
218 {
219 "value": "A String", # [Output Only] A warning data value corresponding to the key.
220 "key": "A String", # [Output Only] A key for the warning data.
221 },
222 ],
223 },
224 ],
225 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
226 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
227 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
228 "name": "A String", # [Output Only] Name of the resource.
229 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
230 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
231 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
232 {
233 "message": "A String", # [Output Only] An optional, human-readable error message.
234 "code": "A String", # [Output Only] The error type identifier for this error.
235 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
236 },
237 ],
238 },
239 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
240 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
241 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
242 }</pre>
243</div>
244
245<div class="method">
246 <code class="details" id="get">get(project, zone, autoscaler)</code>
247 <pre>Returns the specified autoscaler resource.
248
249Args:
250 project: string, Name of the project scoping this request. (required)
251 zone: string, Name of the zone scoping this request. (required)
252 autoscaler: string, Name of the persistent autoscaler resource to return. (required)
253
254Returns:
255 An object of the form:
256
257 {
258 "kind": "compute#autoscaler", # Type of the resource.
259 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
260 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
261 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
262 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
263 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
264 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
265 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
266 },
267 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
268 { # Custom utilization metric policy.
269 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
270 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
271 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
272 },
273 ],
274 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
275 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
276 },
277 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
278 },
279 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
280 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
281 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
282 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
283 "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.
284 }</pre>
285</div>
286
287<div class="method">
288 <code class="details" id="insert">insert(project, zone, body)</code>
289 <pre>Creates an autoscaler resource in the specified project using the data included in the request.
290
291Args:
292 project: string, Name of the project scoping this request. (required)
293 zone: string, Name of the zone scoping this request. (required)
294 body: object, The request body. (required)
295 The object takes the form of:
296
297{
298 "kind": "compute#autoscaler", # Type of the resource.
299 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
300 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
301 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
302 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
303 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
304 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
305 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
306 },
307 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
308 { # Custom utilization metric policy.
309 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
310 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
311 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
312 },
313 ],
314 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
315 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
316 },
317 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
318 },
319 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
320 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
321 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
322 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
323 "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.
324 }
325
326
327Returns:
328 An object of the form:
329
330 { # An Operation resource, used to manage asynchronous API requests.
331 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
332 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
333 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
334 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
335 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
336 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
337 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
338 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
339 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
340 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
341 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
342 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
343 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
344 {
345 "message": "A String", # [Output Only] Optional human-readable details for this warning.
346 "code": "A String", # [Output Only] The warning type identifier for this warning.
347 "data": [ # [Output Only] Metadata for this warning in key: value format.
348 {
349 "value": "A String", # [Output Only] A warning data value corresponding to the key.
350 "key": "A String", # [Output Only] A key for the warning data.
351 },
352 ],
353 },
354 ],
355 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
356 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
357 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
358 "name": "A String", # [Output Only] Name of the resource.
359 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
360 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
361 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
362 {
363 "message": "A String", # [Output Only] An optional, human-readable error message.
364 "code": "A String", # [Output Only] The error type identifier for this error.
365 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
366 },
367 ],
368 },
369 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
370 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
371 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
372 }</pre>
373</div>
374
375<div class="method">
376 <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code>
377 <pre>Retrieves the list of autoscaler resources contained within the specified zone.
378
379Args:
380 project: string, Name of the project scoping this request. (required)
381 zone: string, Name of the zone scoping this request. (required)
382 maxResults: integer, Maximum count of results to be returned.
383 pageToken: string, Specifies a page token to use. Use this parameter if you want to list the next page of results. Set pageToken to the nextPageToken returned by a previous list request.
384 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: FIELD_NAME COMPARISON_STRING LITERAL_STRING.
385
386The FIELD_NAME is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The COMPARISON_STRING must be either eq (equals) or ne (not equals). The LITERAL_STRING is the string value to filter to. The literal value must be valid for the type of field (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field.
387
388For example, filter=name ne example-instance.
389
390Returns:
391 An object of the form:
392
393 { # Contains a list of persistent autoscaler resources.
394 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
395 "items": [ # A list of Autoscaler resources.
396 {
397 "kind": "compute#autoscaler", # Type of the resource.
398 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
399 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
400 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
401 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
402 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
403 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
404 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
405 },
406 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
407 { # Custom utilization metric policy.
408 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
409 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
410 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
411 },
412 ],
413 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
414 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
415 },
416 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
417 },
418 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
419 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
420 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
421 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
422 "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.
423 },
424 ],
425 "kind": "compute#autoscalerList", # Type of resource.
426 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
427 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
428 }</pre>
429</div>
430
431<div class="method">
432 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
433 <pre>Retrieves the next page of results.
434
435Args:
436 previous_request: The request for the previous page. (required)
437 previous_response: The response from the request for the previous page. (required)
438
439Returns:
440 A request object that you can call 'execute()' on to request the next
441 page. Returns None if there are no more items in the collection.
442 </pre>
443</div>
444
445<div class="method">
446 <code class="details" id="patch">patch(project, zone, autoscaler, body)</code>
447 <pre>Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics.
448
449Args:
450 project: string, Name of the project scoping this request. (required)
451 zone: string, Name of the zone scoping this request. (required)
452 autoscaler: string, Name of the autoscaler resource to update. (required)
453 body: object, The request body. (required)
454 The object takes the form of:
455
456{
457 "kind": "compute#autoscaler", # Type of the resource.
458 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
459 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
460 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
461 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
462 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
463 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
464 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
465 },
466 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
467 { # Custom utilization metric policy.
468 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
469 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
470 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
471 },
472 ],
473 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
474 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
475 },
476 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
477 },
478 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
479 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
480 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
481 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
482 "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.
483 }
484
485
486Returns:
487 An object of the form:
488
489 { # An Operation resource, used to manage asynchronous API requests.
490 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
491 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
492 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
493 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
494 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
495 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
496 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
497 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
498 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
499 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
500 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
501 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
502 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
503 {
504 "message": "A String", # [Output Only] Optional human-readable details for this warning.
505 "code": "A String", # [Output Only] The warning type identifier for this warning.
506 "data": [ # [Output Only] Metadata for this warning in key: value format.
507 {
508 "value": "A String", # [Output Only] A warning data value corresponding to the key.
509 "key": "A String", # [Output Only] A key for the warning data.
510 },
511 ],
512 },
513 ],
514 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
515 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
516 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
517 "name": "A String", # [Output Only] Name of the resource.
518 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
519 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
520 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
521 {
522 "message": "A String", # [Output Only] An optional, human-readable error message.
523 "code": "A String", # [Output Only] The error type identifier for this error.
524 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
525 },
526 ],
527 },
528 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
529 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
530 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
531 }</pre>
532</div>
533
534<div class="method">
535 <code class="details" id="update">update(project, zone, body, autoscaler=None)</code>
536 <pre>Updates an autoscaler resource in the specified project using the data included in the request.
537
538Args:
539 project: string, Name of the project scoping this request. (required)
540 zone: string, Name of the zone scoping this request. (required)
541 body: object, The request body. (required)
542 The object takes the form of:
543
544{
545 "kind": "compute#autoscaler", # Type of the resource.
546 "description": "A String", # An optional textual description of the resource; provided by the client when the resource is created.
547 "zone": "A String", # [Output Only] URL of the zone where the instance group resides.
548 "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration.
549 "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend.
550 "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds.
551 "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer.
552 "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7.
553 },
554 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric.
555 { # Custom utilization metric policy.
556 "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count.
557 "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed.
558 "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value.
559 },
560 ],
561 "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy.
562 "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8.
563 },
564 "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas.
565 },
566 "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler.
567 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
568 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
569 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
570 "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.
571 }
572
573 autoscaler: string, Name of the autoscaler resource to update.
574
575Returns:
576 An object of the form:
577
578 { # An Operation resource, used to manage asynchronous API requests.
579 "targetId": "A String", # [Output Only] Unique target ID which identifies a particular incarnation of the target.
580 "clientOperationId": "A String", # [Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all Operation resources in the project.
581 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
582 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
583 "zone": "A String", # [Output Only] URL of the zone where the operation resides.
584 "operationType": "A String", # [Output Only] Type of the operation, such as insert, update, and delete.
585 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
586 "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 at when the operation will be complete. This number should monotonically increase as the operation progresses.
587 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.
588 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
589 "status": "A String", # [Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.
590 "insertTime": "A String", # [Output Only] The time that this operation was requested. This is in RFC3339 text format.
591 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
592 {
593 "message": "A String", # [Output Only] Optional human-readable details for this warning.
594 "code": "A String", # [Output Only] The warning type identifier for this warning.
595 "data": [ # [Output Only] Metadata for this warning in key: value format.
596 {
597 "value": "A String", # [Output Only] A warning data value corresponding to the key.
598 "key": "A String", # [Output Only] A key for the warning data.
599 },
600 ],
601 },
602 ],
603 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
604 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This is in RFC3339 text format.
605 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#Operation for Operation resources.
606 "name": "A String", # [Output Only] Name of the resource.
607 "region": "A String", # [Output Only] URL of the region where the operation resides. Only applicable for regional resources.
608 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
609 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
610 {
611 "message": "A String", # [Output Only] An optional, human-readable error message.
612 "code": "A String", # [Output Only] The error type identifier for this error.
613 "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional.
614 },
615 ],
616 },
617 "endTime": "A String", # [Output Only] The time that this operation was completed. This is in RFC3339 text format.
618 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
619 "targetLink": "A String", # [Output Only] URL of the resource the operation is mutating.
620 }</pre>
621</div>
622
623</body></html>