Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.autoscalers.html">autoscalers</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="#aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 79 | <p class="firstline">Retrieves an aggregated list of autoscalers.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
| 81 | <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p> |
| 82 | <p class="firstline">Retrieves the next page of results.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#delete">delete(project, zone, autoscaler)</a></code></p> |
| 85 | <p class="firstline">Deletes the specified autoscaler resource.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#get">get(project, zone, autoscaler)</a></code></p> |
| 88 | <p class="firstline">Returns the specified autoscaler resource.</p> |
| 89 | <p class="toc_element"> |
| 90 | <code><a href="#insert">insert(project, zone, body)</a></code></p> |
| 91 | <p class="firstline">Creates an autoscaler resource in the specified project using the data included in the request.</p> |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="#list">list(project, zone, maxResults=None, pageToken=None, filter=None)</a></code></p> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 94 | <p class="firstline">Retrieves a list of autoscaler resources contained within the specified zone.</p> |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 95 | <p class="toc_element"> |
| 96 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 97 | <p class="firstline">Retrieves the next page of results.</p> |
| 98 | <p class="toc_element"> |
| 99 | <code><a href="#patch">patch(project, zone, autoscaler, body)</a></code></p> |
| 100 | <p class="firstline">Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics.</p> |
| 101 | <p class="toc_element"> |
| 102 | <code><a href="#update">update(project, zone, body, autoscaler=None)</a></code></p> |
| 103 | <p class="firstline">Updates an autoscaler resource in the specified project using the data included in the request.</p> |
| 104 | <h3>Method Details</h3> |
| 105 | <div class="method"> |
| 106 | <code class="details" id="aggregatedList">aggregatedList(project, maxResults=None, pageToken=None, filter=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 107 | <pre>Retrieves an aggregated list of autoscalers. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 108 | |
| 109 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 110 | project: string, Project ID for this request. (required) |
| 111 | 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. |
| 112 | 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. |
| 113 | filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 114 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 115 | The 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 116 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 117 | For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. |
| 118 | |
| 119 | Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. |
| 120 | |
| 121 | The Beta API also supports filtering on multiple expressions by providing 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 122 | |
| 123 | Returns: |
| 124 | An object of the form: |
| 125 | |
| 126 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 127 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 128 | "items": { # A map of scoped autoscaler lists. |
| 129 | "a_key": { # Name of the scope containing this set of autoscalers. |
| 130 | "warning": { # Informational warning which replaces the list of autoscalers when the list is empty. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 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" } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 135 | { |
| 136 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 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). |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 138 | }, |
| 139 | ], |
| 140 | }, |
| 141 | "autoscalers": [ # List of autoscalers contained in this scope. |
| 142 | { |
| 143 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 144 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 145 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 146 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 147 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 148 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 149 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 150 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 151 | }, |
| 152 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 153 | { # Custom utilization metric policy. |
| 154 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 155 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 156 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 157 | }, |
| 158 | ], |
| 159 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 160 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 161 | }, |
| 162 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 163 | }, |
| 164 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 165 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 166 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 167 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 168 | "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. |
| 169 | }, |
| 170 | ], |
| 171 | }, |
| 172 | }, |
| 173 | "kind": "compute#autoscalerAggregatedList", # Type of resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 174 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 175 | "selfLink": "A String", # [Output Only] Server-defined URL for this resource. |
| 176 | }</pre> |
| 177 | </div> |
| 178 | |
| 179 | <div class="method"> |
| 180 | <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> |
| 181 | <pre>Retrieves the next page of results. |
| 182 | |
| 183 | Args: |
| 184 | previous_request: The request for the previous page. (required) |
| 185 | previous_response: The response from the request for the previous page. (required) |
| 186 | |
| 187 | Returns: |
| 188 | A request object that you can call 'execute()' on to request the next |
| 189 | page. Returns None if there are no more items in the collection. |
| 190 | </pre> |
| 191 | </div> |
| 192 | |
| 193 | <div class="method"> |
| 194 | <code class="details" id="delete">delete(project, zone, autoscaler)</code> |
| 195 | <pre>Deletes the specified autoscaler resource. |
| 196 | |
| 197 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 198 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 199 | zone: string, Name of the zone scoping this request. (required) |
| 200 | autoscaler: string, Name of the persistent autoscaler resource to delete. (required) |
| 201 | |
| 202 | Returns: |
| 203 | An object of the form: |
| 204 | |
| 205 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 206 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 207 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 208 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 209 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 210 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 211 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 212 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 213 | "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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 214 | "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. |
| 215 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 216 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 217 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 218 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 219 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 220 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 221 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 222 | "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. |
| 223 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 224 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 225 | { |
| 226 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 227 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 228 | }, |
| 229 | ], |
| 230 | }, |
| 231 | ], |
| 232 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 233 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 234 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 235 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 236 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 237 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 238 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 239 | { |
| 240 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 241 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 242 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
| 243 | }, |
| 244 | ], |
| 245 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 246 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 247 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 248 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 249 | }</pre> |
| 250 | </div> |
| 251 | |
| 252 | <div class="method"> |
| 253 | <code class="details" id="get">get(project, zone, autoscaler)</code> |
| 254 | <pre>Returns the specified autoscaler resource. |
| 255 | |
| 256 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 257 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 258 | zone: string, Name of the zone scoping this request. (required) |
| 259 | autoscaler: string, Name of the persistent autoscaler resource to return. (required) |
| 260 | |
| 261 | Returns: |
| 262 | An object of the form: |
| 263 | |
| 264 | { |
| 265 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 266 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 267 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 268 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 269 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 270 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 271 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 272 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 273 | }, |
| 274 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 275 | { # Custom utilization metric policy. |
| 276 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 277 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 278 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 279 | }, |
| 280 | ], |
| 281 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 282 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 283 | }, |
| 284 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 285 | }, |
| 286 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 287 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 288 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 289 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 290 | "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. |
| 291 | }</pre> |
| 292 | </div> |
| 293 | |
| 294 | <div class="method"> |
| 295 | <code class="details" id="insert">insert(project, zone, body)</code> |
| 296 | <pre>Creates an autoscaler resource in the specified project using the data included in the request. |
| 297 | |
| 298 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 299 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 300 | zone: string, Name of the zone scoping this request. (required) |
| 301 | body: object, The request body. (required) |
| 302 | The object takes the form of: |
| 303 | |
| 304 | { |
| 305 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 306 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 307 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 308 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 309 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 310 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 311 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 312 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 313 | }, |
| 314 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 315 | { # Custom utilization metric policy. |
| 316 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 317 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 318 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 319 | }, |
| 320 | ], |
| 321 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 322 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 323 | }, |
| 324 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 325 | }, |
| 326 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 327 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 328 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 329 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 330 | "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. |
| 331 | } |
| 332 | |
| 333 | |
| 334 | Returns: |
| 335 | An object of the form: |
| 336 | |
| 337 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 338 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 339 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 340 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 341 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 342 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 343 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 344 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 345 | "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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 346 | "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. |
| 347 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 348 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 349 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 350 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 351 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 352 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 353 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 354 | "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. |
| 355 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 356 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 357 | { |
| 358 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 359 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 360 | }, |
| 361 | ], |
| 362 | }, |
| 363 | ], |
| 364 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 365 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 366 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 367 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 368 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 369 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 370 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 371 | { |
| 372 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 373 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 374 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
| 375 | }, |
| 376 | ], |
| 377 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 378 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 379 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 380 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 381 | }</pre> |
| 382 | </div> |
| 383 | |
| 384 | <div class="method"> |
| 385 | <code class="details" id="list">list(project, zone, maxResults=None, pageToken=None, filter=None)</code> |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 386 | <pre>Retrieves a list of autoscaler resources contained within the specified zone. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 387 | |
| 388 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 389 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 390 | zone: string, Name of the zone scoping this request. (required) |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 391 | 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. |
| 392 | 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. |
| 393 | 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 394 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 395 | The 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 396 | |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 397 | For example, to filter for instances whose name is not equal to example-instance, you would use filter=name ne example-instance. |
| 398 | |
| 399 | Compute Engine Beta API Only: If you use filtering in the Beta API, you can also filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. In particular, use filtering on nested fields to take advantage of instance labels to organize and filter results based on label values. |
| 400 | |
| 401 | The Beta API also supports filtering on multiple expressions by providing 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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 402 | |
| 403 | Returns: |
| 404 | An object of the form: |
| 405 | |
| 406 | { # Contains a list of persistent autoscaler resources. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 407 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 408 | "items": [ # A list of Autoscaler resources. |
| 409 | { |
| 410 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 411 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 412 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 413 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 414 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 415 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 416 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 417 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 418 | }, |
| 419 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 420 | { # Custom utilization metric policy. |
| 421 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 422 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 423 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 424 | }, |
| 425 | ], |
| 426 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 427 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 428 | }, |
| 429 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 430 | }, |
| 431 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 432 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 433 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 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#autoscalerList", # Type of resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 439 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 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 | |
| 448 | Args: |
| 449 | previous_request: The request for the previous page. (required) |
| 450 | previous_response: The response from the request for the previous page. (required) |
| 451 | |
| 452 | Returns: |
| 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"> |
| 459 | <code class="details" id="patch">patch(project, zone, autoscaler, body)</code> |
| 460 | <pre>Updates an autoscaler resource in the specified project using the data included in the request. This method supports patch semantics. |
| 461 | |
| 462 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 463 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 464 | zone: string, Name of the zone scoping this request. (required) |
| 465 | autoscaler: string, Name of the autoscaler resource to update. (required) |
| 466 | body: object, The request body. (required) |
| 467 | The object takes the form of: |
| 468 | |
| 469 | { |
| 470 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 471 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 472 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 473 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 474 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 475 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 476 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 477 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 478 | }, |
| 479 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 480 | { # Custom utilization metric policy. |
| 481 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 482 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 483 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 484 | }, |
| 485 | ], |
| 486 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 487 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 488 | }, |
| 489 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 490 | }, |
| 491 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 492 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 493 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 494 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 495 | "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. |
| 496 | } |
| 497 | |
| 498 | |
| 499 | Returns: |
| 500 | An object of the form: |
| 501 | |
| 502 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 503 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 504 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 505 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 506 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 507 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 508 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 509 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 510 | "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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 511 | "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. |
| 512 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 513 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 514 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 515 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 516 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 517 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 518 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 519 | "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. |
| 520 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 521 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 522 | { |
| 523 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 524 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 525 | }, |
| 526 | ], |
| 527 | }, |
| 528 | ], |
| 529 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 530 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 531 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 532 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 533 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 534 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 535 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 536 | { |
| 537 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 538 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 539 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
| 540 | }, |
| 541 | ], |
| 542 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 543 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 544 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 545 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 546 | }</pre> |
| 547 | </div> |
| 548 | |
| 549 | <div class="method"> |
| 550 | <code class="details" id="update">update(project, zone, body, autoscaler=None)</code> |
| 551 | <pre>Updates an autoscaler resource in the specified project using the data included in the request. |
| 552 | |
| 553 | Args: |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 554 | project: string, Project ID for this request. (required) |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 555 | zone: string, Name of the zone scoping this request. (required) |
| 556 | body: object, The request body. (required) |
| 557 | The object takes the form of: |
| 558 | |
| 559 | { |
| 560 | "kind": "compute#autoscaler", # Type of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 561 | "description": "A String", # An optional description of this resource. Provide this property when you create the resource. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 562 | "zone": "A String", # [Output Only] URL of the zone where the instance group resides. |
| 563 | "autoscalingPolicy": { # Cloud Autoscaler policy. # Autoscaling configuration. |
| 564 | "maxNumReplicas": 42, # The maximum number of replicas that the Autoscaler can scale up to. This field is required for config to be effective. Maximum number of replicas should be not lower than minimal number of replicas. Absolute limit for this value is defined in Autoscaler backend. |
| 565 | "coolDownPeriodSec": 42, # The number of seconds that the Autoscaler should wait between two succeeding changes to the number of virtual machines. You should define an interval that is at least as long as the initialization time of a virtual machine and the time it may take for replica pool to create the virtual machine. The default is 60 seconds. |
| 566 | "loadBalancingUtilization": { # Load balancing utilization policy. # Configuration parameters of autoscaling based on load balancer. |
| 567 | "utilizationTarget": 3.14, # Fraction of backend capacity utilization (set in HTTP load balancing configuration) that Autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. For example if your maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set at 10 and you would like to keep number of instances such that each instance receives 7 QPS on average, set this to 0.7. |
| 568 | }, |
| 569 | "customMetricUtilizations": [ # Configuration parameters of autoscaling based on custom metric. |
| 570 | { # Custom utilization metric policy. |
| 571 | "metric": "A String", # Identifier of the metric. It should be a Cloud Monitoring metric. The metric can not have negative values. The metric should be an utilization metric (increasing number of VMs handling requests x times should reduce average value of the metric roughly x times). For example you could use: compute.googleapis.com/instance/network/received_bytes_count. |
| 572 | "utilizationTargetType": "A String", # Defines type in which utilization_target is expressed. |
| 573 | "utilizationTarget": 3.14, # Target value of the metric which Autoscaler should maintain. Must be a positive value. |
| 574 | }, |
| 575 | ], |
| 576 | "cpuUtilization": { # CPU utilization policy. # TODO(jbartosik): Add support for scaling based on muliple utilization metrics (take max recommendation). Exactly one utilization policy should be provided. Configuration parameters of CPU based autoscaling policy. |
| 577 | "utilizationTarget": 3.14, # The target utilization that the Autoscaler should maintain. It is represented as a fraction of used cores. For example: 6 cores used in 8-core VM are represented here as 0.75. Must be a float value between (0, 1]. If not defined, the default is 0.8. |
| 578 | }, |
| 579 | "minNumReplicas": 42, # The minimum number of replicas that the Autoscaler can scale down to. Can't be less than 0. If not provided Autoscaler will choose default value depending on maximal number of replicas. |
| 580 | }, |
| 581 | "target": "A String", # URL of Instance Group Manager or Replica Pool which will be controlled by Autoscaler. |
| 582 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 583 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 584 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
| 585 | "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. |
| 586 | } |
| 587 | |
| 588 | autoscaler: string, Name of the autoscaler resource to update. |
| 589 | |
| 590 | Returns: |
| 591 | An object of the form: |
| 592 | |
| 593 | { # An Operation resource, used to manage asynchronous API requests. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 594 | "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. |
| 595 | "clientOperationId": "A String", # [Output Only] Reserved for future use. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 596 | "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 597 | "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. |
| 598 | "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. |
| 599 | "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. |
| 600 | "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 601 | "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 Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 602 | "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. |
| 603 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 604 | "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 605 | "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. |
| 606 | "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 607 | "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. |
| 608 | { |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 609 | "message": "A String", # [Output Only] A human-readable description of the warning code. |
| 610 | "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. |
| 611 | "data": [ # [Output Only] Metadata about this warning in key: value format. For example: |
| 612 | # "data": [ { "key": "scope", "value": "zones/us-east1-d" } |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 613 | { |
| 614 | "value": "A String", # [Output Only] A warning data value corresponding to the key. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 615 | "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 Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 616 | }, |
| 617 | ], |
| 618 | }, |
| 619 | ], |
| 620 | "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 621 | "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. |
| 622 | "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 623 | "name": "A String", # [Output Only] Name of the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 624 | "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 625 | "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. |
| 626 | "errors": [ # [Output Only] The array of errors encountered while processing this operation. |
| 627 | { |
| 628 | "message": "A String", # [Output Only] An optional, human-readable error message. |
| 629 | "code": "A String", # [Output Only] The error type identifier for this error. |
| 630 | "location": "A String", # [Output Only] Indicates the field in the request which caused the error. This property is optional. |
| 631 | }, |
| 632 | ], |
| 633 | }, |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 634 | "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 635 | "selfLink": "A String", # [Output Only] Server-defined URL for the resource. |
Jon Wayne Parrott | 36e41bc | 2016-02-19 16:02:29 -0800 | [diff] [blame^] | 636 | "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. |
Takashi Matsuo | 0669410 | 2015-09-11 13:55:40 -0700 | [diff] [blame] | 637 | }</pre> |
| 638 | </div> |
| 639 | |
| 640 | </body></html> |