blob: 7132a80bb175ee98801010032d4814329c709536 [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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800173 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700174 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
175 #
176 # This cannot be used for internal load balancing.
177 "backends": [ # The list of backends that serve this BackendService.
178 { # Message containing information of one individual backend.
179 "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.
180 #
181 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
182 #
183 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
184 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
185 "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].
186 #
187 # This cannot be used for internal load balancing.
188 "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.
189 #
190 # This cannot be used for internal load balancing.
191 "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.
192 #
193 # This cannot be used for internal load balancing.
194 "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].
195 #
196 # This cannot be used for internal load balancing.
197 "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.
198 #
199 # This cannot be used for internal load balancing.
200 "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.
201 #
202 # This cannot be used for internal load balancing.
203 "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).
204 #
205 # This cannot be used for internal load balancing.
206 },
207 ],
208 "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.
209 "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.
210 #
211 # When the load balancing scheme is INTERNAL, this field is not used.
212 "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.
213 #
214 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
215 "A String",
216 ],
217 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
218 #
219 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
220 #
221 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
222 #
223 # When the protocol is UDP, this field is not used.
224 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
226 "oauth2ClientId": "A String",
227 "enabled": True or False,
228 "oauth2ClientSecret": "A String",
229 "oauth2ClientSecretSha256": "A String",
230 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700231 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
232 "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.
233 },
234 ],
235 },
236 },
237 "kind": "compute#backendServiceAggregatedList", # Type of resource.
238 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
239 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
240 }</pre>
241</div>
242
243<div class="method">
244 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
245 <pre>Retrieves the next page of results.
246
247Args:
248 previous_request: The request for the previous page. (required)
249 previous_response: The response from the request for the previous page. (required)
250
251Returns:
252 A request object that you can call 'execute()' on to request the next
253 page. Returns None if there are no more items in the collection.
254 </pre>
255</div>
256
257<div class="method">
258 <code class="details" id="delete">delete(project, backendService)</code>
259 <pre>Deletes the specified BackendService resource.
260
261Args:
262 project: string, Project ID for this request. (required)
263 backendService: string, Name of the BackendService resource to delete. (required)
264
265Returns:
266 An object of the form:
267
268 { # An Operation resource, used to manage asynchronous API requests.
269 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
270 "clientOperationId": "A String", # [Output Only] Reserved for future use.
271 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
272 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
273 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
274 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
275 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
276 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
277 "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.
278 "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.
279 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
280 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
281 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
282 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
283 {
284 "message": "A String", # [Output Only] A human-readable description of the warning code.
285 "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.
286 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
287 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
288 {
289 "value": "A String", # [Output Only] A warning data value corresponding to the key.
290 "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).
291 },
292 ],
293 },
294 ],
295 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
296 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
297 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
298 "name": "A String", # [Output Only] Name of the resource.
299 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
300 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
301 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
302 {
303 "message": "A String", # [Output Only] An optional, human-readable error message.
304 "code": "A String", # [Output Only] The error type identifier for this error.
305 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
306 },
307 ],
308 },
309 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
310 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800311 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700312 }</pre>
313</div>
314
315<div class="method">
316 <code class="details" id="get">get(project, backendService)</code>
317 <pre>Returns the specified BackendService resource. Get a list of available backend services by making a list() request.
318
319Args:
320 project: string, Project ID for this request. (required)
321 backendService: string, Name of the BackendService resource to return. (required)
322
323Returns:
324 An object of the form:
325
326 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
327 "connectionDraining": { # Message containing connection draining configuration.
328 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
329 },
330 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
331 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
332 #
333 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
334 #
335 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
336 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
337 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
338 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
339 #
340 # When the load balancing scheme is INTERNAL, this field is not used.
341 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
342 "loadBalancingScheme": "A String",
343 "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.
344 #
345 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800346 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700347 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
348 #
349 # This cannot be used for internal load balancing.
350 "backends": [ # The list of backends that serve this BackendService.
351 { # Message containing information of one individual backend.
352 "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.
353 #
354 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
355 #
356 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
357 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
358 "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].
359 #
360 # This cannot be used for internal load balancing.
361 "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.
362 #
363 # This cannot be used for internal load balancing.
364 "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.
365 #
366 # This cannot be used for internal load balancing.
367 "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].
368 #
369 # This cannot be used for internal load balancing.
370 "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.
371 #
372 # This cannot be used for internal load balancing.
373 "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.
374 #
375 # This cannot be used for internal load balancing.
376 "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).
377 #
378 # This cannot be used for internal load balancing.
379 },
380 ],
381 "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.
382 "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.
383 #
384 # When the load balancing scheme is INTERNAL, this field is not used.
385 "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.
386 #
387 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
388 "A String",
389 ],
390 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
391 #
392 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
393 #
394 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
395 #
396 # When the protocol is UDP, this field is not used.
397 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800398 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
399 "oauth2ClientId": "A String",
400 "enabled": True or False,
401 "oauth2ClientSecret": "A String",
402 "oauth2ClientSecretSha256": "A String",
403 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700404 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
405 "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.
406 }</pre>
407</div>
408
409<div class="method">
410 <code class="details" id="getHealth">getHealth(project, backendService, body)</code>
411 <pre>Gets the most recent health check results for this BackendService.
412
413Args:
414 project: string, A parameter (required)
415 backendService: string, Name of the BackendService resource to which the queried instance belongs. (required)
416 body: object, The request body. (required)
417 The object takes the form of:
418
419{
420 "group": "A String", # A URI referencing one of the instance groups listed in the backend service.
421 }
422
423
424Returns:
425 An object of the form:
426
427 {
428 "kind": "compute#backendServiceGroupHealth", # [Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.
429 "healthStatus": [
430 {
431 "instance": "A String", # URL of the instance resource.
432 "healthState": "A String", # Health state of the instance.
433 "ipAddress": "A String", # The IP address represented by this resource.
434 "port": 42, # The port on the instance.
435 },
436 ],
437 }</pre>
438</div>
439
440<div class="method">
441 <code class="details" id="insert">insert(project, body)</code>
442 <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.
443
444Args:
445 project: string, Project ID for this request. (required)
446 body: object, The request body. (required)
447 The object takes the form of:
448
449{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
450 "connectionDraining": { # Message containing connection draining configuration.
451 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
452 },
453 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
454 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
455 #
456 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
457 #
458 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
459 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
460 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
461 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
462 #
463 # When the load balancing scheme is INTERNAL, this field is not used.
464 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
465 "loadBalancingScheme": "A String",
466 "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.
467 #
468 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800469 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700470 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
471 #
472 # This cannot be used for internal load balancing.
473 "backends": [ # The list of backends that serve this BackendService.
474 { # Message containing information of one individual backend.
475 "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.
476 #
477 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
478 #
479 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
480 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
481 "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].
482 #
483 # This cannot be used for internal load balancing.
484 "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.
485 #
486 # This cannot be used for internal load balancing.
487 "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.
488 #
489 # This cannot be used for internal load balancing.
490 "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].
491 #
492 # This cannot be used for internal load balancing.
493 "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.
494 #
495 # This cannot be used for internal load balancing.
496 "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.
497 #
498 # This cannot be used for internal load balancing.
499 "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).
500 #
501 # This cannot be used for internal load balancing.
502 },
503 ],
504 "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.
505 "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.
506 #
507 # When the load balancing scheme is INTERNAL, this field is not used.
508 "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.
509 #
510 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
511 "A String",
512 ],
513 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
514 #
515 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
516 #
517 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
518 #
519 # When the protocol is UDP, this field is not used.
520 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800521 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
522 "oauth2ClientId": "A String",
523 "enabled": True or False,
524 "oauth2ClientSecret": "A String",
525 "oauth2ClientSecretSha256": "A String",
526 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700527 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
528 "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.
529 }
530
531
532Returns:
533 An object of the form:
534
535 { # An Operation resource, used to manage asynchronous API requests.
536 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
537 "clientOperationId": "A String", # [Output Only] Reserved for future use.
538 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
539 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
540 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
541 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
542 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
543 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
544 "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.
545 "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.
546 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
547 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
548 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
549 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
550 {
551 "message": "A String", # [Output Only] A human-readable description of the warning code.
552 "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.
553 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
554 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
555 {
556 "value": "A String", # [Output Only] A warning data value corresponding to the key.
557 "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).
558 },
559 ],
560 },
561 ],
562 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
563 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
564 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
565 "name": "A String", # [Output Only] Name of the resource.
566 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
567 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
568 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
569 {
570 "message": "A String", # [Output Only] An optional, human-readable error message.
571 "code": "A String", # [Output Only] The error type identifier for this error.
572 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
573 },
574 ],
575 },
576 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
577 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800578 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700579 }</pre>
580</div>
581
582<div class="method">
583 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
584 <pre>Retrieves the list of BackendService resources available to the specified project.
585
586Args:
587 project: string, Project ID for this request. (required)
588 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
589
590You 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.
591
592Currently, only sorting by name or creationTimestamp desc is supported.
593 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.
594 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.
595 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.
596
597The 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.
598
599For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance.
600
601You 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.
602
603To 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.
604
605Returns:
606 An object of the form:
607
608 { # Contains a list of BackendService resources.
609 "nextPageToken": "A String", # [Output Only] A token used to continue a truncated list request.
610 "items": [ # A list of BackendService resources.
611 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
612 "connectionDraining": { # Message containing connection draining configuration.
613 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
614 },
615 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
616 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
617 #
618 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
619 #
620 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
621 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
622 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
623 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
624 #
625 # When the load balancing scheme is INTERNAL, this field is not used.
626 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
627 "loadBalancingScheme": "A String",
628 "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.
629 #
630 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800631 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700632 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
633 #
634 # This cannot be used for internal load balancing.
635 "backends": [ # The list of backends that serve this BackendService.
636 { # Message containing information of one individual backend.
637 "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.
638 #
639 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
640 #
641 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
642 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
643 "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].
644 #
645 # This cannot be used for internal load balancing.
646 "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.
647 #
648 # This cannot be used for internal load balancing.
649 "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.
650 #
651 # This cannot be used for internal load balancing.
652 "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].
653 #
654 # This cannot be used for internal load balancing.
655 "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.
656 #
657 # This cannot be used for internal load balancing.
658 "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.
659 #
660 # This cannot be used for internal load balancing.
661 "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).
662 #
663 # This cannot be used for internal load balancing.
664 },
665 ],
666 "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.
667 "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.
668 #
669 # When the load balancing scheme is INTERNAL, this field is not used.
670 "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.
671 #
672 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
673 "A String",
674 ],
675 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
676 #
677 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
678 #
679 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
680 #
681 # When the protocol is UDP, this field is not used.
682 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800683 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
684 "oauth2ClientId": "A String",
685 "enabled": True or False,
686 "oauth2ClientSecret": "A String",
687 "oauth2ClientSecretSha256": "A String",
688 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700689 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
690 "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.
691 },
692 ],
693 "kind": "compute#backendServiceList", # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
694 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
695 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
696 }</pre>
697</div>
698
699<div class="method">
700 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
701 <pre>Retrieves the next page of results.
702
703Args:
704 previous_request: The request for the previous page. (required)
705 previous_response: The response from the request for the previous page. (required)
706
707Returns:
708 A request object that you can call 'execute()' on to request the next
709 page. Returns None if there are no more items in the collection.
710 </pre>
711</div>
712
713<div class="method">
714 <code class="details" id="patch">patch(project, backendService, body)</code>
715 <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.
716
717Args:
718 project: string, Project ID for this request. (required)
719 backendService: string, Name of the BackendService resource to update. (required)
720 body: object, The request body. (required)
721 The object takes the form of:
722
723{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
724 "connectionDraining": { # Message containing connection draining configuration.
725 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
726 },
727 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
728 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
729 #
730 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
731 #
732 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
733 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
734 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
735 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
736 #
737 # When the load balancing scheme is INTERNAL, this field is not used.
738 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
739 "loadBalancingScheme": "A String",
740 "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.
741 #
742 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800743 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700744 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
745 #
746 # This cannot be used for internal load balancing.
747 "backends": [ # The list of backends that serve this BackendService.
748 { # Message containing information of one individual backend.
749 "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.
750 #
751 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
752 #
753 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
754 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
755 "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].
756 #
757 # This cannot be used for internal load balancing.
758 "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.
759 #
760 # This cannot be used for internal load balancing.
761 "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.
762 #
763 # This cannot be used for internal load balancing.
764 "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].
765 #
766 # This cannot be used for internal load balancing.
767 "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.
768 #
769 # This cannot be used for internal load balancing.
770 "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.
771 #
772 # This cannot be used for internal load balancing.
773 "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).
774 #
775 # This cannot be used for internal load balancing.
776 },
777 ],
778 "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.
779 "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.
780 #
781 # When the load balancing scheme is INTERNAL, this field is not used.
782 "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.
783 #
784 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
785 "A String",
786 ],
787 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
788 #
789 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
790 #
791 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
792 #
793 # When the protocol is UDP, this field is not used.
794 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800795 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
796 "oauth2ClientId": "A String",
797 "enabled": True or False,
798 "oauth2ClientSecret": "A String",
799 "oauth2ClientSecretSha256": "A String",
800 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700801 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
802 "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.
803 }
804
805
806Returns:
807 An object of the form:
808
809 { # An Operation resource, used to manage asynchronous API requests.
810 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
811 "clientOperationId": "A String", # [Output Only] Reserved for future use.
812 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
813 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
814 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
815 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
816 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
817 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
818 "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.
819 "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.
820 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
821 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
822 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
823 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
824 {
825 "message": "A String", # [Output Only] A human-readable description of the warning code.
826 "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.
827 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
828 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
829 {
830 "value": "A String", # [Output Only] A warning data value corresponding to the key.
831 "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).
832 },
833 ],
834 },
835 ],
836 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
837 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
838 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
839 "name": "A String", # [Output Only] Name of the resource.
840 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
841 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
842 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
843 {
844 "message": "A String", # [Output Only] An optional, human-readable error message.
845 "code": "A String", # [Output Only] The error type identifier for this error.
846 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
847 },
848 ],
849 },
850 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
851 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800852 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700853 }</pre>
854</div>
855
856<div class="method">
857 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body)</code>
858 <pre>Returns permissions that a caller has on the specified resource.
859
860Args:
861 project: string, Project ID for this request. (required)
862 resource: string, Name of the resource for this request. (required)
863 body: object, The request body. (required)
864 The object takes the form of:
865
866{
867 "permissions": [ # The set of permissions to check for the 'resource'. Permissions with wildcards (such as '*' or 'storage.*') are not allowed.
868 "A String",
869 ],
870 }
871
872
873Returns:
874 An object of the form:
875
876 {
877 "permissions": [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
878 "A String",
879 ],
880 }</pre>
881</div>
882
883<div class="method">
884 <code class="details" id="update">update(project, backendService, body)</code>
885 <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.
886
887Args:
888 project: string, Project ID for this request. (required)
889 backendService: string, Name of the BackendService resource to update. (required)
890 body: object, The request body. (required)
891 The object takes the form of:
892
893{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity.
894 "connectionDraining": { # Message containing connection draining configuration.
895 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
896 },
897 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
898 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
899 #
900 # Possible values are HTTP, HTTPS, HTTP2, TCP and SSL. The default is HTTP.
901 #
902 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
903 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
904 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
905 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
906 #
907 # When the load balancing scheme is INTERNAL, this field is not used.
908 "region": "A String", # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services.
909 "loadBalancingScheme": "A String",
910 "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.
911 #
912 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800913 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700914 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
915 #
916 # This cannot be used for internal load balancing.
917 "backends": [ # The list of backends that serve this BackendService.
918 { # Message containing information of one individual backend.
919 "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.
920 #
921 # Note that you must specify an Instance Group resource using the fully-qualified URL, rather than a partial URL.
922 #
923 # When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService.
924 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
925 "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].
926 #
927 # This cannot be used for internal load balancing.
928 "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.
929 #
930 # This cannot be used for internal load balancing.
931 "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.
932 #
933 # This cannot be used for internal load balancing.
934 "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].
935 #
936 # This cannot be used for internal load balancing.
937 "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.
938 #
939 # This cannot be used for internal load balancing.
940 "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.
941 #
942 # This cannot be used for internal load balancing.
943 "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).
944 #
945 # This cannot be used for internal load balancing.
946 },
947 ],
948 "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.
949 "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.
950 #
951 # When the load balancing scheme is INTERNAL, this field is not used.
952 "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.
953 #
954 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
955 "A String",
956 ],
957 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
958 #
959 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
960 #
961 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
962 #
963 # When the protocol is UDP, this field is not used.
964 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800965 "iap": { # Identity-Aware Proxy (Cloud Gatekeeper)
966 "oauth2ClientId": "A String",
967 "enabled": True or False,
968 "oauth2ClientSecret": "A String",
969 "oauth2ClientSecretSha256": "A String",
970 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700971 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
972 "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.
973 }
974
975
976Returns:
977 An object of the form:
978
979 { # An Operation resource, used to manage asynchronous API requests.
980 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
981 "clientOperationId": "A String", # [Output Only] Reserved for future use.
982 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
983 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
984 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations.
985 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
986 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
987 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
988 "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.
989 "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.
990 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
991 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
992 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
993 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
994 {
995 "message": "A String", # [Output Only] A human-readable description of the warning code.
996 "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.
997 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
998 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
999 {
1000 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1001 "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).
1002 },
1003 ],
1004 },
1005 ],
1006 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1007 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1008 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1009 "name": "A String", # [Output Only] Name of the resource.
1010 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations.
1011 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1012 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1013 {
1014 "message": "A String", # [Output Only] An optional, human-readable error message.
1015 "code": "A String", # [Output Only] The error type identifier for this error.
1016 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1017 },
1018 ],
1019 },
1020 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1021 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001022 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001023 }</pre>
1024</div>
1025
1026</body></html>