blob: 81f36dd61bd361851790de55c8afc4fe3a88fcd3 [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">
84 <code><a href="#delete">delete(project, zone, autoscaler)</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>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -070088<p class="firstline">Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070089<p class="toc_element">
90 <code><a href="#insert">insert(project, zone, body)</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">
99 <code><a href="#patch">patch(project, zone, autoscaler, body)</a></code></p>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700100<p class="firstline">Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
102 <code><a href="#update">update(project, zone, body, 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.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800116 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.
117 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.
118 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700119
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120The 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 you are filtering by (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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700121
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700122For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800123
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700124You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800125
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700126To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700127
128Returns:
129 An object of the form:
130
131 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800132 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700133 "items": { # A map of scoped autoscaler lists.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700134 "a_key": { # [Output Only] Name of the scope containing this set of autoscalers.
135 "warning": { # [Output Only] Informational warning which replaces the list of autoscalers when the list is empty.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136 "message": "A String", # [Output Only] A human-readable description of the warning code.
137 "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.
138 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
139 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700140 {
141 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700142 "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 -0700143 },
144 ],
145 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700146 "autoscalers": [ # [Output Only] List of autoscalers contained in this scope.
147 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
148 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800149 "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 -0700150 "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 -0700151 "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 -0700152 "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.
153 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700154 # 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 -0700155 "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.
156 "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.
157 #
158 # 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.
159 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
160 "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 -0700161 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700162 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700163 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700164 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700165 #
166 # For example, the following is a valid metric:
167 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700168 # The following is not a valid metric because it does not increase or decrease based on usage:
169 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700170 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700171 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700172 },
173 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700174 "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 -0700175 "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 -0700176 #
177 # 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.
178 #
179 # 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 -0700180 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700181 "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 -0700182 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700183 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700184 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800185 "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 -0700186 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
187 "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.
188 },
189 ],
190 },
191 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700192 "kind": "compute#autoscalerAggregatedList", # [Output Only] Type of resource. Always compute#autoscalerAggregatedList for aggregated lists of autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800193 "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 -0700194 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
195 }</pre>
196</div>
197
198<div class="method">
199 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
200 <pre>Retrieves the next page of results.
201
202Args:
203 previous_request: The request for the previous page. (required)
204 previous_response: The response from the request for the previous page. (required)
205
206Returns:
207 A request object that you can call 'execute()' on to request the next
208 page. Returns None if there are no more items in the collection.
209 </pre>
210</div>
211
212<div class="method">
213 <code class="details" id="delete">delete(project, zone, autoscaler)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700214 <pre>Deletes the specified autoscaler.
Takashi Matsuo06694102015-09-11 13:55:40 -0700215
216Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800217 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700218 zone: string, Name of the zone for this request. (required)
219 autoscaler: string, Name of the autoscaler to delete. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700220
221Returns:
222 An object of the form:
223
224 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800225 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
226 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700227 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800228 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
229 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
230 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
231 "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 -0700232 "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 -0800233 "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.
234 "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 -0700235 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800236 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
237 "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 -0700238 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
239 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800240 "message": "A String", # [Output Only] A human-readable description of the warning code.
241 "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.
242 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
243 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700244 {
245 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700246 "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 -0700247 },
248 ],
249 },
250 ],
251 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
253 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700254 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800255 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700256 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
257 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
258 {
259 "message": "A String", # [Output Only] An optional, human-readable error message.
260 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700261 "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 -0700262 },
263 ],
264 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800265 "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 -0700266 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700267 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700268 }</pre>
269</div>
270
271<div class="method">
272 <code class="details" id="get">get(project, zone, autoscaler)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700273 <pre>Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700274
275Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800276 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700277 zone: string, Name of the zone for this request. (required)
278 autoscaler: string, Name of the autoscaler to return. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700279
280Returns:
281 An object of the form:
282
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700283 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
284 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800285 "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 -0700286 "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 -0700287 "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 -0700288 "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.
289 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700290 # 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 -0700291 "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.
292 "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.
293 #
294 # 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.
295 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
296 "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 -0700297 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700298 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700299 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700300 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700301 #
302 # For example, the following is a valid metric:
303 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700304 # The following is not a valid metric because it does not increase or decrease based on usage:
305 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700306 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700307 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700308 },
309 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700310 "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 -0700311 "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 -0700312 #
313 # 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.
314 #
315 # 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 -0700316 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700317 "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 -0700318 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700319 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700320 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800321 "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 -0700322 "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 }</pre>
325</div>
326
327<div class="method">
328 <code class="details" id="insert">insert(project, zone, body)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700329 <pre>Creates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700330
331Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700333 zone: string, Name of the zone for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700334 body: object, The request body. (required)
335 The object takes the form of:
336
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700337{ # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
338 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800339 "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 -0700340 "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 -0700341 "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 -0700342 "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.
343 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700344 # 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 -0700345 "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.
346 "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.
347 #
348 # 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.
349 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
350 "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 -0700351 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700352 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700353 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700354 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700355 #
356 # For example, the following is a valid metric:
357 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700358 # The following is not a valid metric because it does not increase or decrease based on usage:
359 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700360 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700361 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700362 },
363 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700364 "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 -0700365 "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 -0700366 #
367 # 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.
368 #
369 # 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 -0700370 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700371 "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 -0700372 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700373 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700374 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800375 "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 -0700376 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
377 "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.
378 }
379
380
381Returns:
382 An object of the form:
383
384 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800385 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
386 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700387 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800388 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
389 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
390 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
391 "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 -0700392 "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 -0800393 "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.
394 "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 -0700395 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800396 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
397 "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 -0700398 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
399 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800400 "message": "A String", # [Output Only] A human-readable description of the warning code.
401 "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.
402 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
403 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700404 {
405 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700406 "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 -0700407 },
408 ],
409 },
410 ],
411 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800412 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
413 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700414 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800415 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700416 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
417 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
418 {
419 "message": "A String", # [Output Only] An optional, human-readable error message.
420 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700421 "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 -0700422 },
423 ],
424 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800425 "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 -0700426 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700427 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700428 }</pre>
429</div>
430
431<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700432 <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 -0700433 <pre>Retrieves a list of autoscalers contained within the specified zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700434
435Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800436 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700437 zone: string, Name of the zone for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700438 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
439
440You 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.
441
442Currently, only sorting by name or creationTimestamp desc is supported.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800443 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.
444 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.
445 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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700446
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800447The 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 you are filtering by (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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700448
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700449For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800450
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700451You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800452
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700453To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters.
Takashi Matsuo06694102015-09-11 13:55:40 -0700454
455Returns:
456 An object of the form:
457
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700458 { # Contains a list of Autoscaler resources.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800459 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700460 "items": [ # A list of Autoscaler resources.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700461 { # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
462 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800463 "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 -0700464 "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 -0700465 "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 -0700466 "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.
467 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700468 # 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 -0700469 "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.
470 "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.
471 #
472 # 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.
473 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
474 "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 -0700475 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700476 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700477 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700478 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700479 #
480 # For example, the following is a valid metric:
481 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700482 # The following is not a valid metric because it does not increase or decrease based on usage:
483 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700484 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700485 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700486 },
487 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700488 "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 -0700489 "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 -0700490 #
491 # 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.
492 #
493 # 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 -0700494 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700495 "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 -0700496 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700497 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700498 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800499 "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 -0700500 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
501 "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.
502 },
503 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700504 "kind": "compute#autoscalerList", # [Output Only] Type of resource. Always compute#autoscalerList for lists of autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800505 "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 -0700506 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
507 }</pre>
508</div>
509
510<div class="method">
511 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
512 <pre>Retrieves the next page of results.
513
514Args:
515 previous_request: The request for the previous page. (required)
516 previous_response: The response from the request for the previous page. (required)
517
518Returns:
519 A request object that you can call 'execute()' on to request the next
520 page. Returns None if there are no more items in the collection.
521 </pre>
522</div>
523
524<div class="method">
525 <code class="details" id="patch">patch(project, zone, autoscaler, body)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700526 <pre>Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.
Takashi Matsuo06694102015-09-11 13:55:40 -0700527
528Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800529 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700530 zone: string, Name of the zone for this request. (required)
531 autoscaler: string, Name of the autoscaler to update. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700532 body: object, The request body. (required)
533 The object takes the form of:
534
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700535{ # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
536 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800537 "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 -0700538 "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 -0700539 "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 -0700540 "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.
541 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700542 # 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 -0700543 "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.
544 "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.
545 #
546 # 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.
547 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
548 "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 -0700549 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700550 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700551 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700552 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700553 #
554 # For example, the following is a valid metric:
555 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700556 # The following is not a valid metric because it does not increase or decrease based on usage:
557 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700558 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700559 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700560 },
561 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700562 "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 -0700563 "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 -0700564 #
565 # 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.
566 #
567 # 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 -0700568 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700569 "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 -0700570 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700571 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700572 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800573 "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 -0700574 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
575 "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.
576 }
577
578
579Returns:
580 An object of the form:
581
582 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800583 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
584 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700585 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800586 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
587 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
588 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
589 "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 -0700590 "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 -0800591 "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.
592 "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 -0700593 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800594 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
595 "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 -0700596 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
597 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800598 "message": "A String", # [Output Only] A human-readable description of the warning code.
599 "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.
600 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
601 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700602 {
603 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700604 "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 -0700605 },
606 ],
607 },
608 ],
609 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800610 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
611 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700612 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800613 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700614 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
615 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
616 {
617 "message": "A String", # [Output Only] An optional, human-readable error message.
618 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700619 "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 -0700620 },
621 ],
622 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800623 "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 -0700624 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700625 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700626 }</pre>
627</div>
628
629<div class="method">
630 <code class="details" id="update">update(project, zone, body, autoscaler=None)</code>
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700631 <pre>Updates an autoscaler in the specified project using the data included in the request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700632
633Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800634 project: string, Project ID for this request. (required)
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700635 zone: string, Name of the zone for this request. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700636 body: object, The request body. (required)
637 The object takes the form of:
638
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700639{ # Represents an Autoscaler resource. Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define. For more information, read Autoscaling Groups of Instances.
640 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800641 "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 -0700642 "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 -0700643 "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 -0700644 "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.
645 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700646 # 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 -0700647 "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.
648 "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.
649 #
650 # 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.
651 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
652 "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 -0700653 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700654 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
Takashi Matsuo06694102015-09-11 13:55:40 -0700655 { # Custom utilization metric policy.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700656 "metric": "A String", # The identifier of the Stackdriver Monitoring metric. The metric cannot have negative values and should be a utilization metric, which means that the number of virtual machines handling requests should increase or decrease proportionally to the metric. The metric must also have a label of compute.googleapis.com/resource_id with the value of the instance's unique ID, although this alone does not guarantee that the metric is valid.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700657 #
658 # For example, the following is a valid metric:
659 # compute.googleapis.com/instance/network/received_bytes_count
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700660 # The following is not a valid metric because it does not increase or decrease based on usage:
661 # compute.googleapis.com/instance/cpu/reserved_cores
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700662 "utilizationTargetType": "A String", # Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Either GAUGE, DELTA_PER_SECOND, or DELTA_PER_MINUTE. If not specified, the default is GAUGE.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700663 "utilizationTarget": 3.14, # Target value of the metric which autoscaler should maintain. Must be a positive value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700664 },
665 ],
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700666 "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 -0700667 "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 -0700668 #
669 # 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.
670 #
671 # 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 -0700672 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700673 "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 -0700674 },
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700675 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
Takashi Matsuo06694102015-09-11 13:55:40 -0700676 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800677 "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 -0700678 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
679 "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.
680 }
681
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700682 autoscaler: string, Name of the autoscaler to update.
Takashi Matsuo06694102015-09-11 13:55:40 -0700683
684Returns:
685 An object of the form:
686
687 { # An Operation resource, used to manage asynchronous API requests.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800688 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
689 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Takashi Matsuo06694102015-09-11 13:55:40 -0700690 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800691 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
692 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
693 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
694 "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 -0700695 "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 -0800696 "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.
697 "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 -0700698 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800699 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
700 "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 -0700701 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
702 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800703 "message": "A String", # [Output Only] A human-readable description of the warning code.
704 "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.
705 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
706 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Takashi Matsuo06694102015-09-11 13:55:40 -0700707 {
708 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700709 "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 -0700710 },
711 ],
712 },
713 ],
714 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800715 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
716 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Takashi Matsuo06694102015-09-11 13:55:40 -0700717 "name": "A String", # [Output Only] Name of the resource.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800718 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
Takashi Matsuo06694102015-09-11 13:55:40 -0700719 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
720 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
721 {
722 "message": "A String", # [Output Only] An optional, human-readable error message.
723 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700724 "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 -0700725 },
726 ],
727 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800728 "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 -0700729 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700730 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
Takashi Matsuo06694102015-09-11 13:55:40 -0700731 }</pre>
732</div>
733
734</body></html>