blob: 873708b4d1b7653db44b0f37ca152d9e25154821 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -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_alpha.html">Compute Engine API</a> . <a href="compute_alpha.regionAutoscalers.html">regionAutoscalers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040078 <code><a href="#delete">delete(project, region, autoscaler, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070079<p class="firstline">Deletes the specified autoscaler.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, region, autoscaler)</a></code></p>
82<p class="firstline">Returns the specified autoscaler.</p>
83<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040084 <code><a href="#insert">insert(project, region, body, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070085<p class="firstline">Creates an autoscaler in the specified project using the data included in the request.</p>
86<p class="toc_element">
87 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
88<p class="firstline">Retrieves a list of autoscalers contained within the specified region.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Sai Cheemalapatie833b792017-03-24 15:06:46 -070093 <code><a href="#patch">patch(project, region, body, requestId=None, autoscaler=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070094<p class="firstline">Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.</p>
95<p class="toc_element">
96 <code><a href="#testIamPermissions">testIamPermissions(project, region, resource, body)</a></code></p>
97<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
98<p class="toc_element">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040099 <code><a href="#update">update(project, region, body, requestId=None, autoscaler=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Updates an autoscaler in the specified project using the data included in the request.</p>
101<h3>Method Details</h3>
102<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103 <code class="details" id="delete">delete(project, region, autoscaler, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104 <pre>Deletes the specified autoscaler.
105
106Args:
107 project: string, Project ID for this request. (required)
108 region: string, Name of the region scoping this request. (required)
109 autoscaler: string, Name of the autoscaler to delete. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400110 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700111
112Returns:
113 An object of the form:
114
115 { # An Operation resource, used to manage asynchronous API requests.
116 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
117 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400118 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700119 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
120 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
121 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
122 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
123 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
124 "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.
125 "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.
126 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
127 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
128 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
129 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
130 {
131 "message": "A String", # [Output Only] A human-readable description of the warning code.
132 "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.
133 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
134 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
135 {
136 "value": "A String", # [Output Only] A warning data value corresponding to the key.
137 "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).
138 },
139 ],
140 },
141 ],
142 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
143 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
144 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
145 "name": "A String", # [Output Only] Name of the resource.
146 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
147 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
148 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
149 {
150 "message": "A String", # [Output Only] An optional, human-readable error message.
151 "code": "A String", # [Output Only] The error type identifier for this error.
152 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
153 },
154 ],
155 },
156 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
157 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800158 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700159 }</pre>
160</div>
161
162<div class="method">
163 <code class="details" id="get">get(project, region, autoscaler)</code>
164 <pre>Returns the specified autoscaler.
165
166Args:
167 project: string, Project ID for this request. (required)
168 region: string, Name of the region scoping this request. (required)
169 autoscaler: string, Name of the autoscaler to return. (required)
170
171Returns:
172 An object of the form:
173
174 { # 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.
175 "status": "A String", # [Output Only] The status of the autoscaler configuration.
176 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
177 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
178 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
179 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
180 "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.
181 #
182 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
183 "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.
184 "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.
185 #
186 # 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.
187 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
188 "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.
189 },
190 "queueBasedScaling": { # Configuration parameters of autoscaling based on queuing system. # Configuration parameters of autoscaling based on queuing system.
191 "acceptableBacklogPerInstance": 3.14, # Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.
192 "singleWorkerThroughputPerSec": 3.14, # The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.
193 "cloudPubSub": { # Configuration parameters for scaling based on Cloud Pub/Sub subscription queue. # Configuration for Cloud Pub/Sub subscription queue.
194 "topic": "A String", # Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource.
195 "subscription": "A String", # Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler.
196 },
197 },
198 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
199 { # Custom utilization metric policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400200 "metric": "A String", # The identifier (type) 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700201 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400202 # The metric must have a value type of INT64 or DOUBLE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700203 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400204 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
205 #
206 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700207 },
208 ],
209 "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.
210 "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.
211 #
212 # 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.
213 #
214 # 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.
215 },
216 "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.
217 },
218 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
219 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
220 {
221 "message": "A String", # The status message.
222 "type": "A String", # The type of error returned.
223 },
224 ],
225 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
226 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
227 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
228 "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.
229 }</pre>
230</div>
231
232<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400233 <code class="details" id="insert">insert(project, region, body, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700234 <pre>Creates an autoscaler in the specified project using the data included in the request.
235
236Args:
237 project: string, Project ID for this request. (required)
238 region: string, Name of the region scoping this request. (required)
239 body: object, The request body. (required)
240 The object takes the form of:
241
242{ # 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.
243 "status": "A String", # [Output Only] The status of the autoscaler configuration.
244 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
245 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
246 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
247 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
248 "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.
249 #
250 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
251 "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.
252 "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.
253 #
254 # 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.
255 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
256 "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.
257 },
258 "queueBasedScaling": { # Configuration parameters of autoscaling based on queuing system. # Configuration parameters of autoscaling based on queuing system.
259 "acceptableBacklogPerInstance": 3.14, # Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.
260 "singleWorkerThroughputPerSec": 3.14, # The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.
261 "cloudPubSub": { # Configuration parameters for scaling based on Cloud Pub/Sub subscription queue. # Configuration for Cloud Pub/Sub subscription queue.
262 "topic": "A String", # Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource.
263 "subscription": "A String", # Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler.
264 },
265 },
266 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
267 { # Custom utilization metric policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400268 "metric": "A String", # The identifier (type) 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400270 # The metric must have a value type of INT64 or DOUBLE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700271 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400272 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
273 #
274 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700275 },
276 ],
277 "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.
278 "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.
279 #
280 # 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.
281 #
282 # 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.
283 },
284 "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.
285 },
286 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
287 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
288 {
289 "message": "A String", # The status message.
290 "type": "A String", # The type of error returned.
291 },
292 ],
293 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
294 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
295 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
296 "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.
297 }
298
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400299 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700300
301Returns:
302 An object of the form:
303
304 { # An Operation resource, used to manage asynchronous API requests.
305 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
306 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400307 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700308 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
309 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
310 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
311 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
312 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
313 "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.
314 "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.
315 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
316 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
317 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
318 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
319 {
320 "message": "A String", # [Output Only] A human-readable description of the warning code.
321 "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.
322 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
323 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
324 {
325 "value": "A String", # [Output Only] A warning data value corresponding to the key.
326 "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).
327 },
328 ],
329 },
330 ],
331 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
332 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
333 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
334 "name": "A String", # [Output Only] Name of the resource.
335 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
336 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
337 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
338 {
339 "message": "A String", # [Output Only] An optional, human-readable error message.
340 "code": "A String", # [Output Only] The error type identifier for this error.
341 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
342 },
343 ],
344 },
345 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
346 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800347 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700348 }</pre>
349</div>
350
351<div class="method">
352 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
353 <pre>Retrieves a list of autoscalers contained within the specified region.
354
355Args:
356 project: string, Project ID for this request. (required)
357 region: string, Name of the region scoping this request. (required)
358 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
359
360You 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.
361
362Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400363 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than maxResults, Compute Engine returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700364 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.
365 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.
366
367The 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.
368
369For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
370
371You 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.
372
373To 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.
374
375Returns:
376 An object of the form:
377
378 { # Contains a list of autoscalers.
379 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
380 "items": [ # A list of autoscalers.
381 { # 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.
382 "status": "A String", # [Output Only] The status of the autoscaler configuration.
383 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
384 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
385 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
386 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
387 "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.
388 #
389 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
390 "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.
391 "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.
392 #
393 # 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.
394 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
395 "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.
396 },
397 "queueBasedScaling": { # Configuration parameters of autoscaling based on queuing system. # Configuration parameters of autoscaling based on queuing system.
398 "acceptableBacklogPerInstance": 3.14, # Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.
399 "singleWorkerThroughputPerSec": 3.14, # The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.
400 "cloudPubSub": { # Configuration parameters for scaling based on Cloud Pub/Sub subscription queue. # Configuration for Cloud Pub/Sub subscription queue.
401 "topic": "A String", # Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource.
402 "subscription": "A String", # Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler.
403 },
404 },
405 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
406 { # Custom utilization metric policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400407 "metric": "A String", # The identifier (type) 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700408 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400409 # The metric must have a value type of INT64 or DOUBLE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700410 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400411 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
412 #
413 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700414 },
415 ],
416 "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.
417 "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.
418 #
419 # 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.
420 #
421 # 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.
422 },
423 "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.
424 },
425 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
426 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
427 {
428 "message": "A String", # The status message.
429 "type": "A String", # The type of error returned.
430 },
431 ],
432 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
433 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
434 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
435 "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.
436 },
437 ],
438 "kind": "compute#regionAutoscalerList", # Type of resource.
439 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
440 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
441 }</pre>
442</div>
443
444<div class="method">
445 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
446 <pre>Retrieves the next page of results.
447
448Args:
449 previous_request: The request for the previous page. (required)
450 previous_response: The response from the request for the previous page. (required)
451
452Returns:
453 A request object that you can call 'execute()' on to request the next
454 page. Returns None if there are no more items in the collection.
455 </pre>
456</div>
457
458<div class="method">
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700459 <code class="details" id="patch">patch(project, region, body, requestId=None, autoscaler=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700460 <pre>Updates an autoscaler in the specified project using the data included in the request. This method supports patch semantics.
461
462Args:
463 project: string, Project ID for this request. (required)
464 region: string, Name of the region scoping this request. (required)
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700465 body: object, The request body. (required)
466 The object takes the form of:
467
468{ # 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.
469 "status": "A String", # [Output Only] The status of the autoscaler configuration.
470 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
471 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
472 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
473 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
474 "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.
475 #
476 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
477 "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.
478 "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.
479 #
480 # 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.
481 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
482 "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.
483 },
484 "queueBasedScaling": { # Configuration parameters of autoscaling based on queuing system. # Configuration parameters of autoscaling based on queuing system.
485 "acceptableBacklogPerInstance": 3.14, # Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.
486 "singleWorkerThroughputPerSec": 3.14, # The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.
487 "cloudPubSub": { # Configuration parameters for scaling based on Cloud Pub/Sub subscription queue. # Configuration for Cloud Pub/Sub subscription queue.
488 "topic": "A String", # Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource.
489 "subscription": "A String", # Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler.
490 },
491 },
492 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
493 { # Custom utilization metric policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400494 "metric": "A String", # The identifier (type) 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700495 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400496 # The metric must have a value type of INT64 or DOUBLE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700497 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400498 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
499 #
500 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700501 },
502 ],
503 "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.
504 "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.
505 #
506 # 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.
507 #
508 # 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.
509 },
510 "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.
511 },
512 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
513 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
514 {
515 "message": "A String", # The status message.
516 "type": "A String", # The type of error returned.
517 },
518 ],
519 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
520 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
521 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
522 "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.
523 }
524
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400525 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700526 autoscaler: string, Name of the autoscaler to patch.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527
528Returns:
529 An object of the form:
530
531 { # An Operation resource, used to manage asynchronous API requests.
532 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
533 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400534 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700535 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
536 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
537 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
538 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
539 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
540 "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.
541 "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.
542 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
543 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
544 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
545 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
546 {
547 "message": "A String", # [Output Only] A human-readable description of the warning code.
548 "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.
549 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
550 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
551 {
552 "value": "A String", # [Output Only] A warning data value corresponding to the key.
553 "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).
554 },
555 ],
556 },
557 ],
558 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
559 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
560 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
561 "name": "A String", # [Output Only] Name of the resource.
562 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
563 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
564 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
565 {
566 "message": "A String", # [Output Only] An optional, human-readable error message.
567 "code": "A String", # [Output Only] The error type identifier for this error.
568 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
569 },
570 ],
571 },
572 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
573 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800574 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700575 }</pre>
576</div>
577
578<div class="method">
579 <code class="details" id="testIamPermissions">testIamPermissions(project, region, resource, body)</code>
580 <pre>Returns permissions that a caller has on the specified resource.
581
582Args:
583 project: string, Project ID for this request. (required)
584 region: string, The name of the region for this request. (required)
585 resource: string, Name of the resource for this request. (required)
586 body: object, The request body. (required)
587 The object takes the form of:
588
589{
590 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
591 "A String",
592 ],
593 }
594
595
596Returns:
597 An object of the form:
598
599 {
600 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
601 "A String",
602 ],
603 }</pre>
604</div>
605
606<div class="method">
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400607 <code class="details" id="update">update(project, region, body, requestId=None, autoscaler=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700608 <pre>Updates an autoscaler in the specified project using the data included in the request.
609
610Args:
611 project: string, Project ID for this request. (required)
612 region: string, Name of the region scoping this request. (required)
613 body: object, The request body. (required)
614 The object takes the form of:
615
616{ # 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.
617 "status": "A String", # [Output Only] The status of the autoscaler configuration.
618 "kind": "compute#autoscaler", # [Output Only] Type of the resource. Always compute#autoscaler for autoscalers.
619 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
620 "zone": "A String", # [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope).
621 "region": "A String", # [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope).
622 "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.
623 #
624 # If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%.
625 "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.
626 "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.
627 #
628 # 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.
629 "loadBalancingUtilization": { # Configuration parameters of autoscaling based on load balancing. # Configuration parameters of autoscaling based on load balancer.
630 "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.
631 },
632 "queueBasedScaling": { # Configuration parameters of autoscaling based on queuing system. # Configuration parameters of autoscaling based on queuing system.
633 "acceptableBacklogPerInstance": 3.14, # Scaling based on the average number of tasks in the queue per each active instance. The autoscaler keeps the average number of tasks per instance below this number, based on data collected in the last couple of minutes. The autoscaler will also take into account incoming tasks when calculating when to scale.
634 "singleWorkerThroughputPerSec": 3.14, # The scaling algorithm will also calculate throughput estimates on its own; if you explicitly provide this value, the autoscaler will take into account your value as well as automatic estimates when deciding how to scale.
635 "cloudPubSub": { # Configuration parameters for scaling based on Cloud Pub/Sub subscription queue. # Configuration for Cloud Pub/Sub subscription queue.
636 "topic": "A String", # Cloud Pub/Sub topic used for scaling. Provide the partial URL or partial URL (starting with projects/) or just the topic name. The topic must belong to the same project as the Autoscaler resource.
637 "subscription": "A String", # Cloud Pub/Sub subscription used for scaling. Provide the partial URL (starting with projects/) or just the subscription name. The subscription must be assigned to the topic specified in topicName and must be in a pull configuration. The subscription must belong to the same project as the Autoscaler.
638 },
639 },
640 "customMetricUtilizations": [ # Configuration parameters of autoscaling based on a custom metric.
641 { # Custom utilization metric policy.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400642 "metric": "A String", # The identifier (type) 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700643 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400644 # The metric must have a value type of INT64 or DOUBLE.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700645 "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.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400646 "utilizationTarget": 3.14, # The target value of the metric that autoscaler should maintain. This must be a positive value.
647 #
648 # For example, a good metric to use as a utilization_target is compute.googleapis.com/instance/network/received_bytes_count. The autoscaler will work to keep this value constant for each of the instances.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700649 },
650 ],
651 "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.
652 "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.
653 #
654 # 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.
655 #
656 # 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.
657 },
658 "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.
659 },
660 "target": "A String", # URL of the managed instance group that this autoscaler will scale.
661 "statusDetails": [ # [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter.
662 {
663 "message": "A String", # The status message.
664 "type": "A String", # The type of error returned.
665 },
666 ],
667 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
668 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
669 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
670 "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.
671 }
672
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400673 requestId: string, begin_interface: MixerMutationRequestBuilder Request ID to support idempotency.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700674 autoscaler: string, Name of the autoscaler to update.
675
676Returns:
677 An object of the form:
678
679 { # An Operation resource, used to manage asynchronous API requests.
680 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
681 "clientOperationId": "A String", # [Output Only] Reserved for future use.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400682 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700683 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
684 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
685 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
686 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
687 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
688 "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.
689 "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.
690 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
691 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
692 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
693 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
694 {
695 "message": "A String", # [Output Only] A human-readable description of the warning code.
696 "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.
697 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
698 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
699 {
700 "value": "A String", # [Output Only] A warning data value corresponding to the key.
701 "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).
702 },
703 ],
704 },
705 ],
706 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
707 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
708 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
709 "name": "A String", # [Output Only] Name of the resource.
710 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
711 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
712 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
713 {
714 "message": "A String", # [Output Only] An optional, human-readable error message.
715 "code": "A String", # [Output Only] The error type identifier for this error.
716 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
717 },
718 ],
719 },
720 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
721 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800722 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700723 }</pre>
724</div>
725
726</body></html>