blob: 43e35c18c34ebf824ee726c9cb21b1f71809a9bd [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_beta.html">Compute Engine API</a> . <a href="compute_beta.backendServices.html">backendServices</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
79<p class="firstline">Retrieves the list of all BackendService resources, regional and global, available to the specified project.</p>
80<p class="toc_element">
81 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
82<p class="firstline">Retrieves the next page of results.</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(project, backendService)</a></code></p>
85<p class="firstline">Deletes the specified BackendService resource.</p>
86<p class="toc_element">
87 <code><a href="#get">get(project, backendService)</a></code></p>
88<p class="firstline">Returns the specified BackendService resource. Get a list of available backend services by making a list() request.</p>
89<p class="toc_element">
90 <code><a href="#getHealth">getHealth(project, backendService, body)</a></code></p>
91<p class="firstline">Gets the most recent health check results for this BackendService.</p>
92<p class="toc_element">
93 <code><a href="#insert">insert(project, body)</a></code></p>
94<p class="firstline">Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.</p>
95<p class="toc_element">
96 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
97<p class="firstline">Retrieves the list of BackendService resources available to the specified project.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(project, backendService, body)</a></code></p>
103<p class="firstline">Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.</p>
104<p class="toc_element">
105 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body)</a></code></p>
106<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
107<p class="toc_element">
108 <code><a href="#update">update(project, backendService, body)</a></code></p>
109<p class="firstline">Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.</p>
110<h3>Method Details</h3>
111<div class="method">
112 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
113 <pre>Retrieves the list of all BackendService resources, regional and global, available to the specified project.
114
115Args:
116 project: string, Name of the project scoping this request. (required)
117 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
118
119You 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.
120
121Currently, only sorting by name or creationTimestamp desc is supported.
122 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.
123 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.
124 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.
125
126The 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.
127
128For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
129
130You 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.
131
132To 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.
133
134Returns:
135 An object of the form:
136
137 { # Contains a list of BackendServicesScopedList.
138 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
139 "items": { # A map of scoped BackendService lists.
140 "a_key": { # Name of the scope containing this set of BackendServices.
141 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
142 "message": "A String", # [Output Only] A human-readable description of the warning code.
143 "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.
144 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
145 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
146 {
147 "value": "A String", # [Output Only] A warning data value corresponding to the key.
148 "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).
149 },
150 ],
151 },
152 "backendServices": [ # List of BackendServices contained in this scope.
153 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
154 "connectionDraining": { # Message containing connection draining configuration.
155 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
156 },
157 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
158 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
159 #
160 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
161 #
162 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
163 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
164 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
165 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
166 #
167 # When the load balancing scheme is INTERNAL, this field is not used.
168 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
169 "loadBalancingScheme": "A String",
170 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
171 #
172 # When the load balancing scheme is INTERNAL, this field is not used.
173 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
174 #
175 # This cannot be used for internal load balancing.
176 "backends": [ # The list of backends that serve this BackendService.
177 { # Message containing information of one individual backend.
178 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
179 #
180 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
181 #
182 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
183 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
184 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
185 #
186 # This cannot be used for internal load balancing.
187 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
188 #
189 # This cannot be used for internal load balancing.
190 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
191 #
192 # This cannot be used for internal load balancing.
193 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
194 #
195 # This cannot be used for internal load balancing.
196 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
197 #
198 # This cannot be used for internal load balancing.
199 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
200 #
201 # This cannot be used for internal load balancing.
202 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
203 #
204 # This cannot be used for internal load balancing.
205 },
206 ],
207 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
208 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
209 #
210 # When the load balancing scheme is INTERNAL, this field is not used.
211 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
212 #
213 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
214 "A String",
215 ],
216 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
217 #
218 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
219 #
220 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
221 #
222 # When the protocol is UDP, this field is not used.
223 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
224 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
225 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
226 "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.
227 },
228 ],
229 },
230 },
231 "kind": "compute#backendServiceAggregatedList", # Type of resource.
232 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
233 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
234 }</pre>
235</div>
236
237<div class="method">
238 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
239 <pre>Retrieves the next page of results.
240
241Args:
242 previous_request: The request for the previous page. (required)
243 previous_response: The response from the request for the previous page. (required)
244
245Returns:
246 A request object that you can call 'execute()' on to request the next
247 page. Returns None if there are no more items in the collection.
248 </pre>
249</div>
250
251<div class="method">
252 <code class="details" id="delete">delete(project, backendService)</code>
253 <pre>Deletes the specified BackendService resource.
254
255Args:
256 project: string, Project ID for this request. (required)
257 backendService: string, Name of the BackendService resource to delete. (required)
258
259Returns:
260 An object of the form:
261
262 { # An Operation resource, used to manage asynchronous API requests.
263 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
264 "clientOperationId": "A String", # [Output Only] Reserved for future use.
265 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
266 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
267 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
268 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
269 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
270 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
271 "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.
272 "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.
273 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
274 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
275 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
276 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
277 {
278 "message": "A String", # [Output Only] A human-readable description of the warning code.
279 "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.
280 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
281 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
282 {
283 "value": "A String", # [Output Only] A warning data value corresponding to the key.
284 "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).
285 },
286 ],
287 },
288 ],
289 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
290 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
291 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
292 "name": "A String", # [Output Only] Name of the resource.
293 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
294 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
295 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
296 {
297 "message": "A String", # [Output Only] An optional, human-readable error message.
298 "code": "A String", # [Output Only] The error type identifier for this error.
299 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
300 },
301 ],
302 },
303 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
304 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
305 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
306 }</pre>
307</div>
308
309<div class="method">
310 <code class="details" id="get">get(project, backendService)</code>
311 <pre>Returns the specified BackendService resource. Get a list of available backend services by making a list() request.
312
313Args:
314 project: string, Project ID for this request. (required)
315 backendService: string, Name of the BackendService resource to return. (required)
316
317Returns:
318 An object of the form:
319
320 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
321 "connectionDraining": { # Message containing connection draining configuration.
322 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
323 },
324 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
325 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
326 #
327 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
328 #
329 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
330 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
331 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
332 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
333 #
334 # When the load balancing scheme is INTERNAL, this field is not used.
335 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
336 "loadBalancingScheme": "A String",
337 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
338 #
339 # When the load balancing scheme is INTERNAL, this field is not used.
340 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
341 #
342 # This cannot be used for internal load balancing.
343 "backends": [ # The list of backends that serve this BackendService.
344 { # Message containing information of one individual backend.
345 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
346 #
347 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
348 #
349 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
350 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
351 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
352 #
353 # This cannot be used for internal load balancing.
354 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
355 #
356 # This cannot be used for internal load balancing.
357 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
358 #
359 # This cannot be used for internal load balancing.
360 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
361 #
362 # This cannot be used for internal load balancing.
363 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
364 #
365 # This cannot be used for internal load balancing.
366 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
367 #
368 # This cannot be used for internal load balancing.
369 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
370 #
371 # This cannot be used for internal load balancing.
372 },
373 ],
374 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
375 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
376 #
377 # When the load balancing scheme is INTERNAL, this field is not used.
378 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
379 #
380 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
381 "A String",
382 ],
383 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
384 #
385 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
386 #
387 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
388 #
389 # When the protocol is UDP, this field is not used.
390 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
391 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
392 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
393 "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.
394 }</pre>
395</div>
396
397<div class="method">
398 <code class="details" id="getHealth">getHealth(project, backendService, body)</code>
399 <pre>Gets the most recent health check results for this BackendService.
400
401Args:
402 project: string, A parameter (required)
403 backendService: string, Name of the BackendService resource to which the queried instance belongs. (required)
404 body: object, The request body. (required)
405 The object takes the form of:
406
407{
408 "group": "A String", # A URI referencing one of the instance groups listed in the backend service.
409 }
410
411
412Returns:
413 An object of the form:
414
415 {
416 "kind": "compute#backendServiceGroupHealth", # [Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.
417 "healthStatus": [
418 {
419 "instance": "A String", # URL of the instance resource.
420 "healthState": "A String", # Health state of the instance.
421 "ipAddress": "A String", # The IP address represented by this resource.
422 "port": 42, # The port on the instance.
423 },
424 ],
425 }</pre>
426</div>
427
428<div class="method">
429 <code class="details" id="insert">insert(project, body)</code>
430 <pre>Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.
431
432Args:
433 project: string, Project ID for this request. (required)
434 body: object, The request body. (required)
435 The object takes the form of:
436
437{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
438 "connectionDraining": { # Message containing connection draining configuration.
439 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
440 },
441 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
442 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
443 #
444 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
445 #
446 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
447 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
448 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
449 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
450 #
451 # When the load balancing scheme is INTERNAL, this field is not used.
452 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
453 "loadBalancingScheme": "A String",
454 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
455 #
456 # When the load balancing scheme is INTERNAL, this field is not used.
457 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
458 #
459 # This cannot be used for internal load balancing.
460 "backends": [ # The list of backends that serve this BackendService.
461 { # Message containing information of one individual backend.
462 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
463 #
464 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
465 #
466 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
467 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
468 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
469 #
470 # This cannot be used for internal load balancing.
471 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
472 #
473 # This cannot be used for internal load balancing.
474 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
475 #
476 # This cannot be used for internal load balancing.
477 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
478 #
479 # This cannot be used for internal load balancing.
480 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
481 #
482 # This cannot be used for internal load balancing.
483 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
484 #
485 # This cannot be used for internal load balancing.
486 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
487 #
488 # This cannot be used for internal load balancing.
489 },
490 ],
491 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
492 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
493 #
494 # When the load balancing scheme is INTERNAL, this field is not used.
495 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
496 #
497 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
498 "A String",
499 ],
500 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
501 #
502 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
503 #
504 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
505 #
506 # When the protocol is UDP, this field is not used.
507 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
508 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
509 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
510 "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.
511 }
512
513
514Returns:
515 An object of the form:
516
517 { # An Operation resource, used to manage asynchronous API requests.
518 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
519 "clientOperationId": "A String", # [Output Only] Reserved for future use.
520 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
521 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
522 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
523 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
524 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
525 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
526 "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.
527 "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.
528 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
529 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
530 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
531 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
532 {
533 "message": "A String", # [Output Only] A human-readable description of the warning code.
534 "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.
535 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
536 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
537 {
538 "value": "A String", # [Output Only] A warning data value corresponding to the key.
539 "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).
540 },
541 ],
542 },
543 ],
544 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
545 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
546 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
547 "name": "A String", # [Output Only] Name of the resource.
548 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
549 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
550 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
551 {
552 "message": "A String", # [Output Only] An optional, human-readable error message.
553 "code": "A String", # [Output Only] The error type identifier for this error.
554 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
555 },
556 ],
557 },
558 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
559 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
560 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
561 }</pre>
562</div>
563
564<div class="method">
565 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
566 <pre>Retrieves the list of BackendService resources available to the specified project.
567
568Args:
569 project: string, Project ID for this request. (required)
570 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
571
572You 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.
573
574Currently, only sorting by name or creationTimestamp desc is supported.
575 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.
576 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.
577 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.
578
579The 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.
580
581For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
582
583You 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.
584
585To 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.
586
587Returns:
588 An object of the form:
589
590 { # Contains a list of BackendService resources.
591 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
592 "items": [ # A list of BackendService resources.
593 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
594 "connectionDraining": { # Message containing connection draining configuration.
595 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
596 },
597 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
598 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
599 #
600 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
601 #
602 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
603 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
604 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
605 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
606 #
607 # When the load balancing scheme is INTERNAL, this field is not used.
608 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
609 "loadBalancingScheme": "A String",
610 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
611 #
612 # When the load balancing scheme is INTERNAL, this field is not used.
613 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
614 #
615 # This cannot be used for internal load balancing.
616 "backends": [ # The list of backends that serve this BackendService.
617 { # Message containing information of one individual backend.
618 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
619 #
620 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
621 #
622 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
623 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
624 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
625 #
626 # This cannot be used for internal load balancing.
627 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
628 #
629 # This cannot be used for internal load balancing.
630 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
631 #
632 # This cannot be used for internal load balancing.
633 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
634 #
635 # This cannot be used for internal load balancing.
636 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
637 #
638 # This cannot be used for internal load balancing.
639 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
640 #
641 # This cannot be used for internal load balancing.
642 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
643 #
644 # This cannot be used for internal load balancing.
645 },
646 ],
647 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
648 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
649 #
650 # When the load balancing scheme is INTERNAL, this field is not used.
651 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
652 #
653 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
654 "A String",
655 ],
656 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
657 #
658 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
659 #
660 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
661 #
662 # When the protocol is UDP, this field is not used.
663 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
664 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
665 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
666 "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.
667 },
668 ],
669 "kind": "compute#backendServiceList", # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
670 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
671 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
672 }</pre>
673</div>
674
675<div class="method">
676 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
677 <pre>Retrieves the next page of results.
678
679Args:
680 previous_request: The request for the previous page. (required)
681 previous_response: The response from the request for the previous page. (required)
682
683Returns:
684 A request object that you can call 'execute()' on to request the next
685 page. Returns None if there are no more items in the collection.
686 </pre>
687</div>
688
689<div class="method">
690 <code class="details" id="patch">patch(project, backendService, body)</code>
691 <pre>Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports patch semantics.
692
693Args:
694 project: string, Project ID for this request. (required)
695 backendService: string, Name of the BackendService resource to update. (required)
696 body: object, The request body. (required)
697 The object takes the form of:
698
699{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
700 "connectionDraining": { # Message containing connection draining configuration.
701 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
702 },
703 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
704 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
705 #
706 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
707 #
708 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
709 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
710 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
711 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
712 #
713 # When the load balancing scheme is INTERNAL, this field is not used.
714 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
715 "loadBalancingScheme": "A String",
716 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
717 #
718 # When the load balancing scheme is INTERNAL, this field is not used.
719 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
720 #
721 # This cannot be used for internal load balancing.
722 "backends": [ # The list of backends that serve this BackendService.
723 { # Message containing information of one individual backend.
724 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
725 #
726 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
727 #
728 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
729 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
730 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
731 #
732 # This cannot be used for internal load balancing.
733 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
734 #
735 # This cannot be used for internal load balancing.
736 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
737 #
738 # This cannot be used for internal load balancing.
739 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
740 #
741 # This cannot be used for internal load balancing.
742 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
743 #
744 # This cannot be used for internal load balancing.
745 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
746 #
747 # This cannot be used for internal load balancing.
748 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
749 #
750 # This cannot be used for internal load balancing.
751 },
752 ],
753 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
754 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
755 #
756 # When the load balancing scheme is INTERNAL, this field is not used.
757 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
758 #
759 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
760 "A String",
761 ],
762 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
763 #
764 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
765 #
766 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
767 #
768 # When the protocol is UDP, this field is not used.
769 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
770 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
771 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
772 "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.
773 }
774
775
776Returns:
777 An object of the form:
778
779 { # An Operation resource, used to manage asynchronous API requests.
780 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
781 "clientOperationId": "A String", # [Output Only] Reserved for future use.
782 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
783 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
784 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
785 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
786 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
787 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
788 "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.
789 "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.
790 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
791 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
792 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
793 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
794 {
795 "message": "A String", # [Output Only] A human-readable description of the warning code.
796 "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.
797 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
798 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
799 {
800 "value": "A String", # [Output Only] A warning data value corresponding to the key.
801 "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).
802 },
803 ],
804 },
805 ],
806 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
807 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
808 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
809 "name": "A String", # [Output Only] Name of the resource.
810 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
811 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
812 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
813 {
814 "message": "A String", # [Output Only] An optional, human-readable error message.
815 "code": "A String", # [Output Only] The error type identifier for this error.
816 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
817 },
818 ],
819 },
820 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
821 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
822 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
823 }</pre>
824</div>
825
826<div class="method">
827 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
828 <pre>Returns permissions that a caller has on the specified resource.
829
830Args:
831 project: string, Project ID for this request. (required)
832 resource: string, Name of the resource for this request. (required)
833 body: object, The request body. (required)
834 The object takes the form of:
835
836{
837 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
838 "A String",
839 ],
840 }
841
842
843Returns:
844 An object of the form:
845
846 {
847 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
848 "A String",
849 ],
850 }</pre>
851</div>
852
853<div class="method">
854 <code class="details" id="update">update(project, backendService, body)</code>
855 <pre>Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.
856
857Args:
858 project: string, Project ID for this request. (required)
859 backendService: string, Name of the BackendService resource to update. (required)
860 body: object, The request body. (required)
861 The object takes the form of:
862
863{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
864 "connectionDraining": { # Message containing connection draining configuration.
865 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
866 },
867 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
868 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
869 #
870 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
871 #
872 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
873 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
874 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
875 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
876 #
877 # When the load balancing scheme is INTERNAL, this field is not used.
878 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
879 "loadBalancingScheme": "A String",
880 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
881 #
882 # When the load balancing scheme is INTERNAL, this field is not used.
883 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
884 #
885 # This cannot be used for internal load balancing.
886 "backends": [ # The list of backends that serve this BackendService.
887 { # Message containing information of one individual backend.
888 "group": "A String", # The fully-qualified URL of a zonal Instance Group resource. This instance group defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
889 #
890 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
891 #
892 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
893 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
894 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
895 #
896 # This cannot be used for internal load balancing.
897 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle.This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
898 #
899 # This cannot be used for internal load balancing.
900 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
901 #
902 # This cannot be used for internal load balancing.
903 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
904 #
905 # This cannot be used for internal load balancing.
906 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
907 #
908 # This cannot be used for internal load balancing.
909 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
910 #
911 # This cannot be used for internal load balancing.
912 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
913 #
914 # This cannot be used for internal load balancing.
915 },
916 ],
917 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService.
918 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
919 #
920 # When the load balancing scheme is INTERNAL, this field is not used.
921 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.
922 #
923 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
924 "A String",
925 ],
926 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
927 #
928 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
929 #
930 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
931 #
932 # When the protocol is UDP, this field is not used.
933 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
934 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
935 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
936 "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.
937 }
938
939
940Returns:
941 An object of the form:
942
943 { # An Operation resource, used to manage asynchronous API requests.
944 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
945 "clientOperationId": "A String", # [Output Only] Reserved for future use.
946 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
947 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
948 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
949 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
950 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
951 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
952 "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.
953 "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.
954 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
955 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
956 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
957 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
958 {
959 "message": "A String", # [Output Only] A human-readable description of the warning code.
960 "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.
961 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
962 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
963 {
964 "value": "A String", # [Output Only] A warning data value corresponding to the key.
965 "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).
966 },
967 ],
968 },
969 ],
970 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
971 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
972 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
973 "name": "A String", # [Output Only] Name of the resource.
974 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
975 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
976 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
977 {
978 "message": "A String", # [Output Only] An optional, human-readable error message.
979 "code": "A String", # [Output Only] The error type identifier for this error.
980 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
981 },
982 ],
983 },
984 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
985 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
986 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. If creating a persistent disk snapshot, this points to the persistent disk that the snapshot was created from.
987 }</pre>
988</div>
989
990</body></html>