blob: 39759960b721c22a69aa71406ff59b17e12a76d8 [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">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addSignedUrlKey">addSignedUrlKey(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds a key for validating requests with signed URLs for this backend service.</p>
80<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Retrieves the list of all BackendService resources, regional and global, available to the specified project.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070087 <code><a href="#close">close()</a></code></p>
88<p class="firstline">Close httplib2 connections.</p>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#delete">delete(project, backendService, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070091<p class="firstline">Deletes the specified BackendService resource.</p>
92<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070093 <code><a href="#deleteSignedUrlKey">deleteSignedUrlKey(project, backendService, keyName, requestId=None)</a></code></p>
94<p class="firstline">Deletes a key for validating requests with signed URLs for this backend service.</p>
95<p class="toc_element">
Sai Cheemalapatidf613972016-10-21 13:59:49 -070096 <code><a href="#get">get(project, backendService)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Returns the specified BackendService resource. Gets a list of available backend services.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#getHealth">getHealth(project, backendService, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700100<p class="firstline">Gets the most recent health check results for this BackendService.</p>
101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103<p class="firstline">Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700104<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700105 <code><a href="#list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700106<p class="firstline">Retrieves the list of BackendService resources available to the specified project.</p>
107<p class="toc_element">
108 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
109<p class="firstline">Retrieves the next page of results.</p>
110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#patch">patch(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700112<p class="firstline">Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#setSecurityPolicy">setSecurityPolicy(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700115<p class="firstline">Sets the security policy for the specified backend service.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700116<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700117 <code><a href="#testIamPermissions">testIamPermissions(project, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700118<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
119<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700120 <code><a href="#update">update(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<h3>Method Details</h3>
123<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 <code class="details" id="addSignedUrlKey">addSignedUrlKey(project, backendService, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 <pre>Adds a key for validating requests with signed URLs for this backend service.
126
127Args:
128 project: string, Project ID for this request. (required)
129 backendService: string, Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700130 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 The object takes the form of:
132
133{ # Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;keyName&quot;: &quot;A String&quot;, # Name of the key. 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.
135 &quot;keyValue&quot;: &quot;A String&quot;, # 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136 }
137
138 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
139
140For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
141
142The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
143
144Returns:
145 An object of the form:
146
147 { # Represents an Operation resource.
148 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700149 # Google Compute Engine has three Operation resources:
150 #
151 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
152 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
154 #
155 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 # - For global operations, use the `globalOperations` resource.
157 # - For regional operations, use the `regionOperations` resource.
158 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700160 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
162 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
163 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
164 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
165 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
166 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
169 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
170 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 },
172 ],
173 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
175 &quot;httpErrorStatusCode&quot;: 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.
176 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
177 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
178 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
179 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
180 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
181 &quot;progress&quot;: 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.
182 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
183 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
184 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
185 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
186 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
187 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
188 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
189 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
190 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
191 {
192 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
193 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
194 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
195 {
196 &quot;key&quot;: &quot;A String&quot;, # [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).
197 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
198 },
199 ],
200 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
201 },
202 ],
203 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 }</pre>
205</div>
206
207<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700209 <pre>Retrieves the list of all BackendService resources, regional and global, available to the specified project.
210
211Args:
212 project: string, Name of the project scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700213 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700214
Dan O'Mearadd494642020-05-01 07:42:23 -0700215For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700216
Dan O'Mearadd494642020-05-01 07:42:23 -0700217You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700218
Bu Sun Kim65020912020-05-20 12:08:20 -0700219To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700220 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700221 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
222 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
223
224You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
225
226Currently, only sorting by `name` or `creationTimestamp desc` is supported.
227 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700228 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700229
230Returns:
231 An object of the form:
232
233 { # Contains a list of BackendServicesScopedList.
Bu Sun Kim65020912020-05-20 12:08:20 -0700234 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
235 &quot;items&quot;: { # A list of BackendServicesScopedList resources.
236 &quot;a_key&quot;: { # Name of the scope containing this set of BackendServices.
237 &quot;backendServices&quot;: [ # A list of BackendServices contained in this scope.
238 { # Represents a Backend Service resource.
239 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700240 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 #
242 # Backend services in Google Compute Engine can be either regionally or globally scoped.
243 #
244 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
245 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700246 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700247 #
248 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700249 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
250 #
251 # 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 is one day (86,400).
252 #
253 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700254 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
255 { # Message containing information of one individual backend.
256 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
257 #
258 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
259 #
260 #
261 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
262 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
263 #
264 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
265 #
266 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
267 #
268 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
269 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
270 #
271 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
272 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700273 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -0700274 #
275 # This cannot be used for internal load balancing.
276 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
277 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
278 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
279 #
280 #
281 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
282 #
283 #
284 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
285 #
286 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
287 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
288 #
289 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
290 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
291 #
292 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
293 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
294 #
295 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
296 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
297 #
298 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
299 #
300 # Not available if the backend&#x27;s balancingMode is CONNECTION.
301 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
302 #
303 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
304 #
305 # Not available if the backend&#x27;s balancingMode is CONNECTION.
306 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
307 #
308 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
309 #
310 # Not available if the backend&#x27;s balancingMode is CONNECTION.
311 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
312 #
313 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
314 },
315 ],
316 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700317 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
318 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
319 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
320 },
321 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
323 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
324 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
325 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
326 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
327 &quot;A String&quot;,
328 ],
329 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
330 &quot;A String&quot;,
331 ],
332 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700333 &quot;cacheMode&quot;: &quot;A String&quot;,
334 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
335 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
336 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
337 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
338 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
339 { # Specify CDN TTLs for response error codes.
340 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
341 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
342 },
343 ],
344 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -0700345 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
346 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
347 &quot;A String&quot;,
348 ],
349 },
350 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
351 #
352 # This field is applicable to either:
353 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
354 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700355 #
356 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
358 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
359 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
360 },
361 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
362 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
363 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
364 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
365 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
366 },
367 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
368 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
369 },
370 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
371 #
372 # This field is applicable to either:
373 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
374 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700375 #
376 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700377 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
378 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
379 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
380 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
381 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
382 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
383 },
384 },
385 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
386 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
387 },
388 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
389 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
390 &quot;A String&quot;,
391 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700392 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
393 &quot;A String&quot;,
394 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700395 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
396 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
397 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
398 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
399 #
400 # The default is false.
401 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
402 #
403 # The default is false.
404 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
405 },
406 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
407 #
408 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700409 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;A String&quot;,
411 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700412 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
413 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
414 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
415 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
417 },
418 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
419 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
420 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
421 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
422 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
423 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
424 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
425 # - RANDOM: The load balancer selects a random healthy host.
426 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700427 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 #
429 # This field is applicable to either:
430 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
431 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
432 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700433 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
434 #
435 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700436 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
437 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
438 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
439 },
440 &quot;name&quot;: &quot;A String&quot;, # 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.
441 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
442 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
443 #
444 # This field is applicable to either:
445 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
446 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700447 #
448 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700449 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
450 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
451 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
452 },
453 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
454 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
455 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
456 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
457 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
458 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
459 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
460 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
461 },
462 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
463 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
464 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
465 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
466 },
467 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
468 #
469 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
470 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
471 #
472 #
473 #
474 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
475 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
476 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700477 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
478 #
479 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700480 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
481 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
482 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
483 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
484 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700485 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
486 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
487 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
488 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700489 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700490 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
491 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
492 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700493 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -0700494 &quot;A String&quot;,
495 ],
496 },
497 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
498 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
499 #
500 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
501 #
502 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
503 #
504 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700505 #
506 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700507 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -0700508 },
509 ],
510 &quot;warning&quot;: { # Informational warning which replaces the list of backend services when the list is empty.
511 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
512 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
513 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700514 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700515 &quot;key&quot;: &quot;A String&quot;, # [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).
516 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700517 },
518 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700519 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700520 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700521 },
522 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 &quot;kind&quot;: &quot;compute#backendServiceAggregatedList&quot;, # Type of resource.
524 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
525 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700526 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
527 &quot;A String&quot;,
528 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700529 &quot;warning&quot;: { # [Output Only] Informational warning message.
530 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
531 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
532 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700533 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700534 &quot;key&quot;: &quot;A String&quot;, # [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).
535 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 },
537 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700538 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700539 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700540 }</pre>
541</div>
542
543<div class="method">
544 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
545 <pre>Retrieves the next page of results.
546
547Args:
548 previous_request: The request for the previous page. (required)
549 previous_response: The response from the request for the previous page. (required)
550
551Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700552 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700553 page. Returns None if there are no more items in the collection.
554 </pre>
555</div>
556
557<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700558 <code class="details" id="close">close()</code>
559 <pre>Close httplib2 connections.</pre>
560</div>
561
562<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700563 <code class="details" id="delete">delete(project, backendService, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700564 <pre>Deletes the specified BackendService resource.
565
566Args:
567 project: string, Project ID for this request. (required)
568 backendService: string, Name of the BackendService resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700569 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
570
571For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
572
573The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700574
575Returns:
576 An object of the form:
577
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700578 { # Represents an Operation resource.
579 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 # Google Compute Engine has three Operation resources:
581 #
582 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
583 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700584 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
585 #
586 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 # - For global operations, use the `globalOperations` resource.
588 # - For regional operations, use the `regionOperations` resource.
589 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700590 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700591 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700592 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
593 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
594 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
595 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
596 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
597 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700598 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700599 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
600 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
601 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700602 },
603 ],
604 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700605 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
606 &quot;httpErrorStatusCode&quot;: 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.
607 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
608 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
609 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
610 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
611 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
612 &quot;progress&quot;: 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.
613 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
614 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
615 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
616 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
617 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
618 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
619 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
620 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
621 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
622 {
623 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
624 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
625 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
626 {
627 &quot;key&quot;: &quot;A String&quot;, # [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).
628 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
629 },
630 ],
631 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
632 },
633 ],
634 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700635 }</pre>
636</div>
637
638<div class="method">
639 <code class="details" id="deleteSignedUrlKey">deleteSignedUrlKey(project, backendService, keyName, requestId=None)</code>
640 <pre>Deletes a key for validating requests with signed URLs for this backend service.
641
642Args:
643 project: string, Project ID for this request. (required)
644 backendService: string, Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. (required)
645 keyName: string, The name of the Signed URL Key to delete. (required)
646 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
647
648For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
649
650The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
651
652Returns:
653 An object of the form:
654
655 { # Represents an Operation resource.
656 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700657 # Google Compute Engine has three Operation resources:
658 #
659 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
660 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700661 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
662 #
663 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700664 # - For global operations, use the `globalOperations` resource.
665 # - For regional operations, use the `regionOperations` resource.
666 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700667 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700668 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700669 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
670 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
671 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
672 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
673 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
674 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700675 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700676 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
677 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
678 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700679 },
680 ],
681 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700682 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
683 &quot;httpErrorStatusCode&quot;: 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.
684 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
685 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
686 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
687 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
688 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
689 &quot;progress&quot;: 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.
690 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
691 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
692 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
693 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
694 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
695 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
696 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
697 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
698 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
699 {
700 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
701 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
702 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
703 {
704 &quot;key&quot;: &quot;A String&quot;, # [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).
705 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
706 },
707 ],
708 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
709 },
710 ],
711 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700712 }</pre>
713</div>
714
715<div class="method">
716 <code class="details" id="get">get(project, backendService)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700717 <pre>Returns the specified BackendService resource. Gets a list of available backend services.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700718
719Args:
720 project: string, Project ID for this request. (required)
721 backendService: string, Name of the BackendService resource to return. (required)
722
723Returns:
724 An object of the form:
725
Dan O'Mearadd494642020-05-01 07:42:23 -0700726 { # Represents a Backend Service resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700727 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700728 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -0700729 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700730 # Backend services in Google Compute Engine can be either regionally or globally scoped.
Bu Sun Kim65020912020-05-20 12:08:20 -0700731 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700732 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
Bu Sun Kim65020912020-05-20 12:08:20 -0700733 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700734 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -0700735 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700736 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700737 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
738 #
739 # 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 is one day (86,400).
740 #
741 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700742 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700743 { # Message containing information of one individual backend.
Bu Sun Kim65020912020-05-20 12:08:20 -0700744 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700745 #
746 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
747 #
748 #
749 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
750 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
751 #
752 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
753 #
754 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
755 #
756 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
757 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
758 #
759 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
760 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700761 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -0700762 #
763 # This cannot be used for internal load balancing.
764 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
765 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
766 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
767 #
768 #
769 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
770 #
771 #
772 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
773 #
774 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
775 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
776 #
777 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
778 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
779 #
780 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
781 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
782 #
783 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
784 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
785 #
786 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
787 #
788 # Not available if the backend&#x27;s balancingMode is CONNECTION.
789 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
790 #
791 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
792 #
793 # Not available if the backend&#x27;s balancingMode is CONNECTION.
794 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
795 #
796 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
797 #
798 # Not available if the backend&#x27;s balancingMode is CONNECTION.
799 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
800 #
801 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700802 },
803 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700804 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700805 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
806 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
807 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
808 },
809 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700810 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
811 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
812 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
813 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
814 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
815 &quot;A String&quot;,
816 ],
817 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
818 &quot;A String&quot;,
819 ],
820 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700821 &quot;cacheMode&quot;: &quot;A String&quot;,
822 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
823 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
824 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
825 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
826 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
827 { # Specify CDN TTLs for response error codes.
828 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
829 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
830 },
831 ],
832 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -0700833 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
834 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
835 &quot;A String&quot;,
836 ],
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800837 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700838 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
839 #
840 # This field is applicable to either:
841 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
842 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700843 #
844 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700845 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
846 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
847 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
848 },
849 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
850 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
851 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
852 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
853 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
854 },
855 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
856 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
857 },
858 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
859 #
860 # This field is applicable to either:
861 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
862 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700863 #
864 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
866 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
867 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
868 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
869 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
870 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
871 },
872 },
873 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
874 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
875 },
876 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
877 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
878 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700880 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
881 &quot;A String&quot;,
882 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700883 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
884 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
885 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
886 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
887 #
888 # The default is false.
889 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
890 #
891 # The default is false.
892 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
893 },
894 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
895 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700897 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -0700898 &quot;A String&quot;,
899 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700900 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
901 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
902 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
903 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700904 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700905 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700906 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
907 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
908 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
909 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
910 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
911 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
912 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
913 # - RANDOM: The load balancer selects a random healthy host.
914 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700915 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -0700916 #
917 # This field is applicable to either:
918 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
919 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
920 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700921 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
922 #
923 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700924 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
925 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
926 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700927 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 &quot;name&quot;: &quot;A String&quot;, # 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.
929 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
930 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
931 #
932 # This field is applicable to either:
933 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
934 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700935 #
936 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -0700937 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
938 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
939 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
940 },
941 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
942 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
943 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
944 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
945 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
946 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
947 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
948 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
949 },
950 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
951 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
952 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
953 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
954 },
955 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
956 #
957 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
958 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
959 #
960 #
961 #
962 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
963 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
964 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700965 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
966 #
967 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -0700968 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
969 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
970 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
971 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
972 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700973 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
974 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
975 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
976 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700977 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700978 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
979 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
980 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700981 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -0700982 &quot;A String&quot;,
983 ],
984 },
985 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
986 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
987 #
988 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
989 #
990 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
991 #
992 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700993 #
994 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700995 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -0700996 }</pre>
997</div>
998
999<div class="method">
1000 <code class="details" id="getHealth">getHealth(project, backendService, body=None)</code>
1001 <pre>Gets the most recent health check results for this BackendService.
1002
1003Example request body:
1004
1005{ &quot;group&quot;: &quot;/zones/us-east1-b/instanceGroups/lb-backend-example&quot; }
1006
1007Args:
1008 project: string, A parameter (required)
1009 backendService: string, Name of the BackendService resource to which the queried instance belongs. (required)
1010 body: object, The request body.
1011 The object takes the form of:
1012
1013{
1014 &quot;group&quot;: &quot;A String&quot;, # A URI referencing one of the instance groups or network endpoint groups listed in the backend service.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001015 }
1016
Bu Sun Kim65020912020-05-20 12:08:20 -07001017
1018Returns:
1019 An object of the form:
1020
1021 {
1022 &quot;annotations&quot;: { # Metadata defined as annotations on the network endpoint group.
1023 &quot;a_key&quot;: &quot;A String&quot;,
1024 },
1025 &quot;healthStatus&quot;: [ # Health state of the backend instances or endpoints in requested instance or network endpoint group, determined based on configured health checks.
1026 {
1027 &quot;annotations&quot;: { # Metadata defined as annotations for network endpoint.
1028 &quot;a_key&quot;: &quot;A String&quot;,
1029 },
1030 &quot;healthState&quot;: &quot;A String&quot;, # Health state of the instance.
1031 &quot;instance&quot;: &quot;A String&quot;, # URL of the instance resource.
1032 &quot;ipAddress&quot;: &quot;A String&quot;, # A forwarding rule IP address assigned to this instance.
1033 &quot;port&quot;: 42, # The named port of the instance group, not necessarily the port that is health-checked.
1034 },
1035 ],
1036 &quot;kind&quot;: &quot;compute#backendServiceGroupHealth&quot;, # [Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.
1037 }</pre>
1038</div>
1039
1040<div class="method">
1041 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001042 <pre>Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.
Bu Sun Kim65020912020-05-20 12:08:20 -07001043
1044Args:
1045 project: string, Project ID for this request. (required)
1046 body: object, The request body.
1047 The object takes the form of:
1048
1049{ # Represents a Backend Service resource.
1050 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001051 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -07001052 #
1053 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1054 #
1055 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1056 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001057 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001058 #
1059 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001060 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
1061 #
1062 # 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 is one day (86,400).
1063 #
1064 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
1066 { # Message containing information of one individual backend.
1067 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
1068 #
1069 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
1070 #
1071 #
1072 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1073 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1074 #
1075 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1076 #
1077 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1078 #
1079 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1080 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
1081 #
1082 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1083 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001084 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -07001085 #
1086 # This cannot be used for internal load balancing.
1087 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1088 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
1089 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
1090 #
1091 #
1092 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
1093 #
1094 #
1095 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
1096 #
1097 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
1098 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1099 #
1100 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
1101 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
1102 #
1103 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
1104 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
1105 #
1106 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
1107 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
1108 #
1109 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
1110 #
1111 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1112 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
1113 #
1114 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1115 #
1116 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1117 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
1118 #
1119 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
1120 #
1121 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1122 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
1123 #
1124 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1125 },
1126 ],
1127 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001128 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
1129 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
1130 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
1131 },
1132 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001133 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1134 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
1135 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
1136 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
1137 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1138 &quot;A String&quot;,
1139 ],
1140 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1141 &quot;A String&quot;,
1142 ],
1143 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001144 &quot;cacheMode&quot;: &quot;A String&quot;,
1145 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
1146 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1147 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1148 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
1149 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
1150 { # Specify CDN TTLs for response error codes.
1151 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
1152 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1153 },
1154 ],
1155 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -07001156 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
1157 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
1158 &quot;A String&quot;,
1159 ],
1160 },
1161 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
1162 #
1163 # This field is applicable to either:
1164 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1165 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001166 #
1167 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001168 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
1169 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1170 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1171 },
1172 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1173 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1174 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1175 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
1176 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1177 },
1178 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
1179 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
1180 },
1181 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
1182 #
1183 # This field is applicable to either:
1184 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1185 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001186 #
1187 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001188 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
1189 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
1190 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
1191 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
1192 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1193 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1194 },
1195 },
1196 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
1197 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
1198 },
1199 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1200 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
1201 &quot;A String&quot;,
1202 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001203 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
1204 &quot;A String&quot;,
1205 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001206 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1207 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
1208 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
1209 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
1210 #
1211 # The default is false.
1212 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
1213 #
1214 # The default is false.
1215 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
1216 },
1217 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
1218 #
1219 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001220 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -07001221 &quot;A String&quot;,
1222 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001223 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
1224 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
1225 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
1226 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1228 },
1229 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1230 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
1231 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
1232 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
1233 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1234 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1235 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
1236 # - RANDOM: The load balancer selects a random healthy host.
1237 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001238 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 #
1240 # This field is applicable to either:
1241 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1242 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1243 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001244 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
1245 #
1246 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001247 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
1248 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1249 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
1250 },
1251 &quot;name&quot;: &quot;A String&quot;, # 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.
1252 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
1253 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
1254 #
1255 # This field is applicable to either:
1256 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1257 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001258 #
1259 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001260 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
1261 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1262 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1263 },
1264 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
1265 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
1266 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
1267 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1268 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1269 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
1270 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1271 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1272 },
1273 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1274 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
1275 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
1276 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
1277 },
1278 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1279 #
1280 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1281 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
1282 #
1283 #
1284 #
1285 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1286 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
1287 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001288 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
1289 #
1290 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001291 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1292 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
1293 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
1294 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1295 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001296 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
1297 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
1298 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1299 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001300 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001301 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
1302 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
1303 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001304 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -07001305 &quot;A String&quot;,
1306 ],
1307 },
1308 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1309 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
1310 #
1311 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
1312 #
1313 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
1314 #
1315 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001316 #
1317 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001318 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -07001319}
1320
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001321 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1322
1323For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1324
1325The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001326
1327Returns:
1328 An object of the form:
1329
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001330 { # Represents an Operation resource.
1331 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001332 # Google Compute Engine has three Operation resources:
1333 #
1334 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1335 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001336 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1337 #
1338 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001339 # - For global operations, use the `globalOperations` resource.
1340 # - For regional operations, use the `regionOperations` resource.
1341 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001342 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001343 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001344 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1345 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1346 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1347 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1348 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1349 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001350 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001351 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1352 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1353 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001354 },
1355 ],
1356 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001357 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1358 &quot;httpErrorStatusCode&quot;: 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.
1359 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1360 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1361 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1362 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1363 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1364 &quot;progress&quot;: 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.
1365 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1366 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1367 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1368 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1369 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1370 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1371 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
1372 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1373 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1374 {
1375 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1376 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1377 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1378 {
1379 &quot;key&quot;: &quot;A String&quot;, # [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).
1380 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1381 },
1382 ],
1383 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1384 },
1385 ],
1386 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001387 }</pre>
1388</div>
1389
1390<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001391 <code class="details" id="list">list(project, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001392 <pre>Retrieves the list of BackendService resources available to the specified project.
1393
1394Args:
1395 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001396 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001397
Dan O'Mearadd494642020-05-01 07:42:23 -07001398For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001399
Dan O'Mearadd494642020-05-01 07:42:23 -07001400You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001401
Bu Sun Kim65020912020-05-20 12:08:20 -07001402To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1403 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1404 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1405
1406You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. 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.
1407
1408Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1409 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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001410 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001411
1412Returns:
1413 An object of the form:
1414
1415 { # Contains a list of BackendService resources.
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1417 &quot;items&quot;: [ # A list of BackendService resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 { # Represents a Backend Service resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001419 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001420 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -07001421 #
1422 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1423 #
1424 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1425 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001426 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001427 #
1428 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001429 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
1430 #
1431 # 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 is one day (86,400).
1432 #
1433 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
1435 { # Message containing information of one individual backend.
1436 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
1437 #
1438 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
1439 #
1440 #
1441 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1442 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1443 #
1444 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1445 #
1446 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1447 #
1448 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1449 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
1450 #
1451 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1452 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001453 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -07001454 #
1455 # This cannot be used for internal load balancing.
1456 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1457 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
1458 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
1459 #
1460 #
1461 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
1462 #
1463 #
1464 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
1465 #
1466 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
1467 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1468 #
1469 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
1470 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
1471 #
1472 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
1473 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
1474 #
1475 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
1476 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
1477 #
1478 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
1479 #
1480 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1481 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
1482 #
1483 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1484 #
1485 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1486 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
1487 #
1488 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
1489 #
1490 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1491 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
1492 #
1493 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001494 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001495 ],
1496 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001497 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
1498 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
1499 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
1500 },
1501 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001502 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1503 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
1504 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
1505 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
1506 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1507 &quot;A String&quot;,
1508 ],
1509 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1510 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001511 ],
1512 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001513 &quot;cacheMode&quot;: &quot;A String&quot;,
1514 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
1515 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1516 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1517 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
1518 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
1519 { # Specify CDN TTLs for response error codes.
1520 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
1521 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1522 },
1523 ],
1524 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -07001525 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
1526 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
1527 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001528 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001529 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001530 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
1531 #
1532 # This field is applicable to either:
1533 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1534 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001535 #
1536 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001537 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
1538 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1539 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1540 },
1541 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1542 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1543 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1544 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
1545 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1546 },
1547 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
1548 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
1549 },
1550 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
1551 #
1552 # This field is applicable to either:
1553 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1554 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001555 #
1556 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
1558 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
1559 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
1560 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
1561 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1562 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1563 },
1564 },
1565 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
1566 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
1567 },
1568 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1569 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
1570 &quot;A String&quot;,
1571 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001572 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
1573 &quot;A String&quot;,
1574 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001575 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1576 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
1577 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
1578 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
1579 #
1580 # The default is false.
1581 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
1582 #
1583 # The default is false.
1584 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
1585 },
1586 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
1587 #
1588 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001589 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -07001590 &quot;A String&quot;,
1591 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001592 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
1593 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
1594 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
1595 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001596 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1597 },
1598 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1599 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
1600 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
1601 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
1602 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1603 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1604 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
1605 # - RANDOM: The load balancer selects a random healthy host.
1606 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001607 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -07001608 #
1609 # This field is applicable to either:
1610 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1611 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1612 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001613 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
1614 #
1615 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001616 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
1617 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1618 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
1619 },
1620 &quot;name&quot;: &quot;A String&quot;, # 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.
1621 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
1622 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
1623 #
1624 # This field is applicable to either:
1625 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1626 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001627 #
1628 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001629 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
1630 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1631 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1632 },
1633 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
1634 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
1635 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
1636 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1637 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1638 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
1639 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1640 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1641 },
1642 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1643 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
1644 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
1645 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
1646 },
1647 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1648 #
1649 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1650 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
1651 #
1652 #
1653 #
1654 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1655 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
1656 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001657 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
1658 #
1659 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001660 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1661 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
1662 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
1663 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1664 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001665 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
1666 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
1667 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1668 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001669 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001670 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
1671 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
1672 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001673 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -07001674 &quot;A String&quot;,
1675 ],
1676 },
1677 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1678 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
1679 #
1680 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
1681 #
1682 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
1683 #
1684 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001685 #
1686 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001687 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -07001688 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001689 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001690 &quot;kind&quot;: &quot;compute#backendServiceList&quot;, # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
1691 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1692 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1693 &quot;warning&quot;: { # [Output Only] Informational warning message.
1694 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1695 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1696 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001697 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 &quot;key&quot;: &quot;A String&quot;, # [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).
1699 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001700 },
1701 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001702 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001703 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001704 }</pre>
1705</div>
1706
1707<div class="method">
1708 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1709 <pre>Retrieves the next page of results.
1710
1711Args:
1712 previous_request: The request for the previous page. (required)
1713 previous_response: The response from the request for the previous page. (required)
1714
1715Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001716 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001717 page. Returns None if there are no more items in the collection.
1718 </pre>
1719</div>
1720
1721<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001722 <code class="details" id="patch">patch(project, backendService, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001723 <pre>Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001724
1725Args:
1726 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001727 backendService: string, Name of the BackendService resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001728 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001729 The object takes the form of:
1730
Dan O'Mearadd494642020-05-01 07:42:23 -07001731{ # Represents a Backend Service resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001732 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001733 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -07001734 #
1735 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1736 #
1737 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1738 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001739 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -07001740 #
1741 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001742 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
1743 #
1744 # 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 is one day (86,400).
1745 #
1746 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001747 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
1748 { # Message containing information of one individual backend.
1749 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
1750 #
1751 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
1752 #
1753 #
1754 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1755 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1756 #
1757 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1758 #
1759 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1760 #
1761 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1762 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
1763 #
1764 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1765 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001766 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -07001767 #
1768 # This cannot be used for internal load balancing.
1769 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1770 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
1771 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
1772 #
1773 #
1774 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
1775 #
1776 #
1777 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
1778 #
1779 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
1780 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
1781 #
1782 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
1783 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
1784 #
1785 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
1786 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
1787 #
1788 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
1789 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
1790 #
1791 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
1792 #
1793 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1794 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
1795 #
1796 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1797 #
1798 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1799 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
1800 #
1801 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
1802 #
1803 # Not available if the backend&#x27;s balancingMode is CONNECTION.
1804 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
1805 #
1806 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001807 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001808 ],
1809 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001810 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
1811 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
1812 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
1813 },
1814 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001815 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1816 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
1817 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
1818 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
1819 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1820 &quot;A String&quot;,
1821 ],
1822 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
1823 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001824 ],
1825 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001826 &quot;cacheMode&quot;: &quot;A String&quot;,
1827 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
1828 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1829 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1830 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
1831 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
1832 { # Specify CDN TTLs for response error codes.
1833 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
1834 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
1835 },
1836 ],
1837 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -07001838 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
1839 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
1840 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001842 },
1843 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
1844 #
1845 # This field is applicable to either:
1846 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1847 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001848 #
1849 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001850 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
1851 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1852 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
1853 },
1854 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1855 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1856 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1857 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
1858 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1859 },
1860 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
1861 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
1862 },
1863 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
1864 #
1865 # This field is applicable to either:
1866 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1867 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001868 #
1869 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001870 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
1871 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
1872 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
1873 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
1874 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1875 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001876 },
1877 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001878 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
1879 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
1880 },
1881 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
1882 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
1883 &quot;A String&quot;,
1884 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001885 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
1886 &quot;A String&quot;,
1887 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001888 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1889 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
1890 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
1891 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
1892 #
1893 # The default is false.
1894 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
1895 #
1896 # The default is false.
1897 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
1898 },
1899 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
1900 #
1901 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001902 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -07001903 &quot;A String&quot;,
1904 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001905 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
1906 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
1907 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
1908 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -07001909 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1910 },
1911 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1912 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
1913 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
1914 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
1915 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1916 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1917 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
1918 # - RANDOM: The load balancer selects a random healthy host.
1919 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001920 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -07001921 #
1922 # This field is applicable to either:
1923 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1924 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1925 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001926 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
1927 #
1928 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001929 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
1930 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1931 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
1932 },
1933 &quot;name&quot;: &quot;A String&quot;, # 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.
1934 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
1935 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
1936 #
1937 # This field is applicable to either:
1938 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1939 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001940 #
1941 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07001942 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
1943 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1944 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001945 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001946 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
1947 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
1948 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
1949 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1950 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
1951 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
1952 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
1953 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001955 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1956 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
1957 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
1958 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
1959 },
1960 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1961 #
1962 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1963 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
1964 #
1965 #
1966 #
1967 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
1968 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
1969 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001970 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
1971 #
1972 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001973 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
1974 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
1975 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
1976 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1977 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001978 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
1979 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
1980 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
1981 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001982 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001983 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
1984 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
1985 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001986 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -07001987 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001988 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001989 },
1990 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1991 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
1992 #
1993 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
1994 #
1995 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
1996 #
1997 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001998 #
1999 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002000 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -07002001}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002002
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002003 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2004
2005For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2006
2007The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002008
2009Returns:
2010 An object of the form:
2011
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002012 { # Represents an Operation resource.
2013 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002014 # Google Compute Engine has three Operation resources:
2015 #
2016 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2017 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002018 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2019 #
2020 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002021 # - For global operations, use the `globalOperations` resource.
2022 # - For regional operations, use the `regionOperations` resource.
2023 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002024 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002025 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002026 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2027 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2028 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2029 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2030 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2031 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002032 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002033 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2034 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2035 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002036 },
2037 ],
2038 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002039 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2040 &quot;httpErrorStatusCode&quot;: 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.
2041 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2042 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2043 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2044 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2045 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2046 &quot;progress&quot;: 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.
2047 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2048 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2049 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2050 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2051 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2052 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2053 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2054 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2055 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2056 {
2057 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2058 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2059 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2060 {
2061 &quot;key&quot;: &quot;A String&quot;, # [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).
2062 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2063 },
2064 ],
2065 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2066 },
2067 ],
2068 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002069 }</pre>
2070</div>
2071
2072<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002073 <code class="details" id="setSecurityPolicy">setSecurityPolicy(project, backendService, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002074 <pre>Sets the security policy for the specified backend service.
2075
2076Args:
2077 project: string, Project ID for this request. (required)
2078 backendService: string, Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002079 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002080 The object takes the form of:
2081
2082{
Bu Sun Kim65020912020-05-20 12:08:20 -07002083 &quot;securityPolicy&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002084 }
2085
2086 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2087
2088For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2089
2090The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2091
2092Returns:
2093 An object of the form:
2094
2095 { # Represents an Operation resource.
2096 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002097 # Google Compute Engine has three Operation resources:
2098 #
2099 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2100 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002101 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2102 #
2103 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002104 # - For global operations, use the `globalOperations` resource.
2105 # - For regional operations, use the `regionOperations` resource.
2106 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002107 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002108 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002109 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2110 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2111 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2112 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2113 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2114 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002115 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002116 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2117 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2118 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002119 },
2120 ],
2121 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002122 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2123 &quot;httpErrorStatusCode&quot;: 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.
2124 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2125 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2126 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2127 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2128 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2129 &quot;progress&quot;: 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.
2130 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2131 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2132 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2133 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2134 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2135 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2136 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2137 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2138 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2139 {
2140 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2141 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2142 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2143 {
2144 &quot;key&quot;: &quot;A String&quot;, # [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).
2145 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2146 },
2147 ],
2148 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2149 },
2150 ],
2151 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002152 }</pre>
2153</div>
2154
2155<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002156 <code class="details" id="testIamPermissions">testIamPermissions(project, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002157 <pre>Returns permissions that a caller has on the specified resource.
2158
2159Args:
2160 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002161 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002162 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002163 The object takes the form of:
2164
2165{
Bu Sun Kim65020912020-05-20 12:08:20 -07002166 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2167 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002168 ],
2169 }
2170
2171
2172Returns:
2173 An object of the form:
2174
2175 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002176 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2177 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002178 ],
2179 }</pre>
2180</div>
2181
2182<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002183 <code class="details" id="update">update(project, backendService, body=None, requestId=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002184 <pre>Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002185
2186Args:
2187 project: string, Project ID for this request. (required)
2188 backendService: string, Name of the BackendService resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002189 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002190 The object takes the form of:
2191
Dan O'Mearadd494642020-05-01 07:42:23 -07002192{ # Represents a Backend Service resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07002193 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002194 # A backend service defines how Google Cloud load balancers distribute traffic. The backend service configuration contains a set of values, such as the protocol used to connect to backends, various distribution and session settings, health checks, and timeouts. These settings provide fine-grained control over how your load balancer behaves. Most of the settings have default values that allow for easy configuration if you need to get started quickly.
Bu Sun Kim65020912020-05-20 12:08:20 -07002195 #
2196 # Backend services in Google Compute Engine can be either regionally or globally scoped.
2197 #
2198 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
2199 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002200 # For more information, see Backend Services.
Bu Sun Kim65020912020-05-20 12:08:20 -07002201 #
2202 # (== resource_for {$api_version}.backendService ==)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002203 &quot;affinityCookieTtlSec&quot;: 42, # Lifetime of cookies in seconds. Only applicable if the loadBalancingScheme is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the protocol is HTTP or HTTPS, and the sessionAffinity is GENERATED_COOKIE, or HTTP_COOKIE.
2204 #
2205 # 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 is one day (86,400).
2206 #
2207 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002208 &quot;backends&quot;: [ # The list of backends that serve this BackendService.
2209 { # Message containing information of one individual backend.
2210 &quot;balancingMode&quot;: &quot;A String&quot;, # Specifies the balancing mode for the backend.
2211 #
2212 # When choosing a balancing mode, you need to consider the loadBalancingScheme, and protocol for the backend service, as well as the type of backend (instance group or NEG).
2213 #
2214 #
2215 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
2216 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
2217 #
2218 # If the loadBalancingScheme for the backend service is EXTERNAL (SSL Proxy and TCP Proxy load balancers), you must also specify exactly one of the following parameters: maxConnections (except for regional managed instance groups), maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
2219 #
2220 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
2221 #
2222 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
2223 # You can use the RATE balancing mode if the protocol for the backend service is HTTP or HTTPS. You must specify exactly one of the following parameters: maxRate (except for regional managed instance groups), maxRatePerInstance, or maxRatePerEndpoint.
2224 #
2225 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
2226 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002227 &quot;capacityScaler&quot;: 3.14, # A multiplier applied to the group&#x27;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 and [0.1,1.0]. You cannot configure a setting larger than 0 and smaller than 0.1. You cannot configure a setting of 0 when there is only one backend attached to the backend service.
Bu Sun Kim65020912020-05-20 12:08:20 -07002228 #
2229 # This cannot be used for internal load balancing.
2230 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2231 &quot;failover&quot;: True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
2232 &quot;group&quot;: &quot;A String&quot;, # The fully-qualified URL of an instance group or network endpoint group (NEG) resource. The type of backend that a backend service supports depends on the backend service&#x27;s loadBalancingScheme.
2233 #
2234 #
2235 # - When the loadBalancingScheme for the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, the backend can be either an instance group or a NEG. The backends on the backend service must be either all instance groups or all NEGs. You cannot mix instance group and NEG backends on the same backend service.
2236 #
2237 #
2238 # - When the loadBalancingScheme for the backend service is INTERNAL, the backend must be an instance group in the same region as the backend service. NEGs are not supported.
2239 #
2240 # You must use the fully-qualified URL (starting with https://www.googleapis.com/) to specify the instance group or NEG. Partial URLs are not supported.
2241 &quot;maxConnections&quot;: 42, # Defines a target maximum number of simultaneous connections that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnectionsPerInstance, or maxConnectionsPerEndpoint.
2242 #
2243 # Not available if the backend&#x27;s balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
2244 &quot;maxConnectionsPerEndpoint&quot;: 42, # Defines a target maximum number of simultaneous connections for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a maximum number of target maximum simultaneous connections for the NEG. If the backend&#x27;s balancingMode is CONNECTION, and the backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerInstance.
2245 #
2246 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
2247 &quot;maxConnectionsPerInstance&quot;: 42, # Defines a target maximum number of simultaneous connections for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum number of simultaneous connections for the whole instance group. If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is CONNECTION, and backend is attached to a backend service whose loadBalancingScheme is EXTERNAL, you must specify either this parameter, maxConnections, or maxConnectionsPerEndpoint.
2248 #
2249 # Not available if the backend&#x27;s balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
2250 &quot;maxRate&quot;: 42, # Defines a maximum number of HTTP requests per second (RPS) that the backend can handle. Valid for network endpoint group and instance group backends (except for regional managed instance groups). Must not be defined if the backend is a managed instance group that uses autoscaling based on load balancing.
2251 #
2252 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
2253 #
2254 # Not available if the backend&#x27;s balancingMode is CONNECTION.
2255 &quot;maxRatePerEndpoint&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for an endpoint of a NEG. This is multiplied by the number of endpoints in the NEG to implicitly calculate a target maximum rate for the NEG.
2256 #
2257 # If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
2258 #
2259 # Not available if the backend&#x27;s balancingMode is CONNECTION.
2260 &quot;maxRatePerInstance&quot;: 3.14, # Defines a maximum target for requests per second (RPS) for a single VM in a backend instance group. This is multiplied by the number of instances in the instance group to implicitly calculate a target maximum rate for the whole instance group.
2261 #
2262 # If the backend&#x27;s balancingMode is UTILIZATION, this is an optional parameter. If the backend&#x27;s balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
2263 #
2264 # Not available if the backend&#x27;s balancingMode is CONNECTION.
2265 &quot;maxUtilization&quot;: 3.14, # Defines the maximum average backend utilization of a backend VM in an instance group. The valid range is [0.0, 1.0]. This is an optional parameter if the backend&#x27;s balancingMode is UTILIZATION.
2266 #
2267 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002268 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002269 ],
2270 &quot;cdnPolicy&quot;: { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002271 &quot;bypassCacheOnRequestHeaders&quot;: [ # Bypass the cache when the specified request headers are matched - e.g. Pragma or Authorization headers. Up to 5 headers can be specified. The cache is bypassed for all cdnPolicy.cacheMode settings.
2272 { # Bypass the cache when the specified request headers are present, e.g. Pragma or Authorization headers. Values are case insensitive. The presence of such a header overrides the cache_mode setting.
2273 &quot;headerName&quot;: &quot;A String&quot;, # The header field name to match on when bypassing cache. Values are case-insensitive.
2274 },
2275 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002276 &quot;cacheKeyPolicy&quot;: { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
2277 &quot;includeHost&quot;: True or False, # If true, requests to different hosts will be cached separately.
2278 &quot;includeProtocol&quot;: True or False, # If true, http and https requests will be cached separately.
2279 &quot;includeQueryString&quot;: True or False, # If true, include query string parameters in the cache key according to query_string_whitelist and query_string_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely.
2280 &quot;queryStringBlacklist&quot;: [ # Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
2281 &quot;A String&quot;,
2282 ],
2283 &quot;queryStringWhitelist&quot;: [ # Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query_string_whitelist or query_string_blacklist, not both. &#x27;&amp;&#x27; and &#x27;=&#x27; will be percent encoded and not treated as delimiters.
2284 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002285 ],
2286 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002287 &quot;cacheMode&quot;: &quot;A String&quot;,
2288 &quot;clientTtl&quot;: 42, # Specifies a separate client (e.g. browser client) TTL, separate from the TTL for Cloud CDN&#x27;s edge caches. Leaving this empty will use the same cache TTL for both Cloud CDN and the client-facing response. The maximum allowed value is 86400s (1 day).
2289 &quot;defaultTtl&quot;: 42, # Specifies the default TTL for cached content served by this origin for responses that do not have an existing valid TTL (max-age or s-max-age). Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The value of defaultTTL cannot be set to a value greater than that of maxTTL, but can be equal. When the cacheMode is set to FORCE_CACHE_ALL, the defaultTTL will overwrite the TTL set in all responses. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
2290 &quot;maxTtl&quot;: 42, # Specifies the maximum allowed TTL for cached content served by this origin. Cache directives that attempt to set a max-age or s-maxage higher than this, or an Expires header more than maxTTL seconds in the future will be capped at the value of maxTTL, as if it were the value of an s-maxage Cache-Control directive. Headers sent to the client will not be modified. Setting a TTL of &quot;0&quot; means &quot;always revalidate&quot;. The maximum allowed value is 31,622,400s (1 year), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
2291 &quot;negativeCaching&quot;: True or False, # Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. By default, Cloud CDN will apply the following default TTLs to these status codes: HTTP 300 (Multiple Choice), 301, 308 (Permanent Redirects): 10m HTTP 404 (Not Found), 410 (Gone), 451 (Unavailable For Legal Reasons): 120s HTTP 405 (Method Not Found), 421 (Misdirected Request), 501 (Not Implemented): 60s These defaults can be overridden in negative_caching_policy
2292 &quot;negativeCachingPolicy&quot;: [ # Sets a cache TTL for the specified HTTP status code. negative_caching must be enabled to configure negative_caching_policy. Omitting the policy and leaving negative_caching enabled will use Cloud CDN&#x27;s default cache TTLs. Note that when specifying an explicit negative_caching_policy, you should take care to specify a cache TTL for all response codes that you wish to cache. Cloud CDN will not apply any default negative caching when a policy exists.
2293 { # Specify CDN TTLs for response error codes.
2294 &quot;code&quot;: 42, # The HTTP status code to define a TTL against. Only HTTP status codes 300, 301, 308, 404, 405, 410, 421, 451 and 501 are can be specified as values, and you cannot specify a status code more than once.
2295 &quot;ttl&quot;: 42, # The TTL (in seconds) to cache responses with the corresponding status code for. The maximum allowed value is 1800s (30 minutes), noting that infrequently accessed objects may be evicted from the cache before the defined TTL.
2296 },
2297 ],
2298 &quot;serveWhileStale&quot;: 42, # Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default &quot;max-stale&quot; duration for any cached responses that do not specify a max-stale directive. Stale responses that exceed the TTL configured here will not be served. The default limit (max-stale) is 86400s (1 day), which will allow stale content to be served up to this limit beyond the max-age (or s-max-age) of a cached response. The maximum allowed value is 604800 (1 week). Set this to zero (0) to disable serve-while-stale.
Bu Sun Kim65020912020-05-20 12:08:20 -07002299 &quot;signedUrlCacheMaxAgeSec&quot;: &quot;A String&quot;, # Maximum number of seconds the response to a signed URL request will be considered fresh. After this time period, the response will be revalidated before being served. Defaults to 1hr (3600s). When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a &quot;Cache-Control: public, max-age=[TTL]&quot; header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
2300 &quot;signedUrlKeyNames&quot;: [ # [Output Only] Names of the keys for signing request URLs.
2301 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002302 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002303 },
2304 &quot;circuitBreakers&quot;: { # Settings controlling the volume of connections to a backend service. # Settings controlling the volume of connections to a backend service. If not set, this feature is considered disabled.
2305 #
2306 # This field is applicable to either:
2307 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
2308 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002309 #
2310 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002311 &quot;connectTimeout&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The timeout for new network connections to hosts.
2312 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2313 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
2314 },
2315 &quot;maxConnections&quot;: 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
2316 &quot;maxPendingRequests&quot;: 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
2317 &quot;maxRequests&quot;: 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
2318 &quot;maxRequestsPerConnection&quot;: 42, # Maximum requests for a single connection to the backend service. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive.
2319 &quot;maxRetries&quot;: 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
2320 },
2321 &quot;connectionDraining&quot;: { # Message containing connection draining configuration.
2322 &quot;drainingTimeoutSec&quot;: 42, # The amount of time in seconds to allow existing connections to persist while on unhealthy backend VMs. Only applicable if the protocol is not UDP. The valid range is [0, 3600].
2323 },
2324 &quot;consistentHash&quot;: { # This message defines settings for a consistent hash style load balancer. # Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field is only applicable when localityLbPolicy is set to MAGLEV or RING_HASH.
2325 #
2326 # This field is applicable to either:
2327 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
2328 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002329 #
2330 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002331 &quot;httpCookie&quot;: { # The information about the HTTP Cookie on which the hash function is based for load balancing policies that use a consistent hash. # Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP_COOKIE.
2332 &quot;name&quot;: &quot;A String&quot;, # Name of the cookie.
2333 &quot;path&quot;: &quot;A String&quot;, # Path to set for the cookie.
2334 &quot;ttl&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Lifetime of the cookie.
2335 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2336 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002337 },
2338 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002339 &quot;httpHeaderName&quot;: &quot;A String&quot;, # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
2340 &quot;minimumRingSize&quot;: &quot;A String&quot;, # The minimum number of virtual nodes to use for the hash ring. Defaults to 1024. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node.
2341 },
2342 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] Creation timestamp in RFC3339 text format.
2343 &quot;customRequestHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied requests.
2344 &quot;A String&quot;,
2345 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002346 &quot;customResponseHeaders&quot;: [ # Headers that the HTTP/S load balancer should add to proxied responses.
2347 &quot;A String&quot;,
2348 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002349 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2350 &quot;enableCDN&quot;: True or False, # If true, enables Cloud CDN for the backend service. Only applicable if the loadBalancingScheme is EXTERNAL and the protocol is HTTP or HTTPS.
2351 &quot;failoverPolicy&quot;: { # Applicable only to Failover for Internal TCP/UDP Load Balancing. On failover or failback, this field indicates whether connection draining will be honored. GCP has a fixed connection draining timeout of 10 minutes. A setting of true terminates existing TCP connections to the active pool during failover and failback, immediately draining traffic. A setting of false allows existing TCP connections to persist, even on VMs no longer in the active pool, for up to the duration of the connection draining timeout (10 minutes). # Applicable only to Failover for Internal TCP/UDP Load Balancing. Requires at least one backend instance group to be defined as a backup (failover) backend.
2352 &quot;disableConnectionDrainOnFailover&quot;: True or False, # This can be set to true only if the protocol is TCP.
2353 #
2354 # The default is false.
2355 &quot;dropTrafficIfUnhealthy&quot;: True or False, # Applicable only to Failover for Internal TCP/UDP Load Balancing. If set to true, connections to the load balancer are dropped when all primary and all backup backend VMs are unhealthy. If set to false, connections are distributed among all primary VMs when all primary and all backup backend VMs are unhealthy.
2356 #
2357 # The default is false.
2358 &quot;failoverRatio&quot;: 3.14, # Applicable only to Failover for Internal TCP/UDP Load Balancing. The value of the field must be in the range [0, 1]. If the value is 0, the load balancer performs a failover when the number of healthy primary VMs equals zero. For all other values, the load balancer performs a failover when the total number of healthy primary VMs is less than this ratio.
2359 },
2360 &quot;fingerprint&quot;: &quot;A String&quot;, # 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, otherwise the request will fail with error 412 conditionNotMet.
2361 #
2362 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002363 &quot;healthChecks&quot;: [ # The list of URLs to the healthChecks, httpHealthChecks (legacy), or httpsHealthChecks (legacy) resource for health checking this backend service. Not all backend services support legacy health checks. See Load balancer guide. Currently, at most one health check can be specified for each backend service. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet or serverless NEG backends must not have a health check.
Bu Sun Kim65020912020-05-20 12:08:20 -07002364 &quot;A String&quot;,
2365 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002366 &quot;iap&quot;: { # Identity-Aware Proxy # The configurations for Identity-Aware Proxy on this resource.
2367 &quot;enabled&quot;: True or False, # Whether the serving infrastructure will authenticate and authorize all incoming requests. If true, the oauth2ClientId and oauth2ClientSecret fields must be non-empty.
2368 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # OAuth2 client ID to use for the authentication flow.
2369 &quot;oauth2ClientSecret&quot;: &quot;A String&quot;, # OAuth2 client secret to use for the authentication flow. For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2ClientSecretSha256 field.
Bu Sun Kim65020912020-05-20 12:08:20 -07002370 &quot;oauth2ClientSecretSha256&quot;: &quot;A String&quot;, # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
2371 },
2372 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2373 &quot;kind&quot;: &quot;compute#backendService&quot;, # [Output Only] Type of resource. Always compute#backendService for backend services.
2374 &quot;loadBalancingScheme&quot;: &quot;A String&quot;, # Specifies the load balancer type. Choose EXTERNAL for load balancers that receive traffic from external clients. Choose INTERNAL for Internal TCP/UDP Load Balancing. Choose INTERNAL_MANAGED for Internal HTTP(S) Load Balancing. Choose INTERNAL_SELF_MANAGED for Traffic Director. A backend service created for one type of load balancing cannot be used with another. For more information, refer to Choosing a load balancer.
2375 &quot;localityLbPolicy&quot;: &quot;A String&quot;, # The load balancing algorithm used within the scope of the locality. The possible values are:
2376 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
2377 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
2378 # - RING_HASH: The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests.
2379 # - RANDOM: The load balancer selects a random healthy host.
2380 # - ORIGINAL_DESTINATION: Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002381 # - MAGLEV: used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, see https://ai.google/research/pubs/pub44824
Bu Sun Kim65020912020-05-20 12:08:20 -07002382 #
2383 # This field is applicable to either:
2384 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
2385 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
2386 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002387 # If sessionAffinity is not NONE, and this field is not set to MAGLEV or RING_HASH, session affinity settings will not take effect.
2388 #
2389 # Only the default ROUND_ROBIN policy is supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002390 &quot;logConfig&quot;: { # The available logging options for the load balancer traffic served by this backend service. # This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver.
2391 &quot;enable&quot;: True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
2392 &quot;sampleRate&quot;: 3.14, # This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0.
2393 },
2394 &quot;name&quot;: &quot;A String&quot;, # 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.
2395 &quot;network&quot;: &quot;A String&quot;, # The URL of the network to which this backend service belongs. This field can only be spcified when the load balancing scheme is set to INTERNAL.
2396 &quot;outlierDetection&quot;: { # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. # Settings controlling the eviction of unhealthy hosts from the load balancing pool for the backend service. If not set, this feature is considered disabled.
2397 #
2398 # This field is applicable to either:
2399 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
2400 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002401 #
2402 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kim65020912020-05-20 12:08:20 -07002403 &quot;baseEjectionTime&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # The base time that a host is ejected for. The real ejection time is equal to the base ejection time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s.
2404 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2405 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002406 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 &quot;consecutiveErrors&quot;: 42, # Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5.
2408 &quot;consecutiveGatewayFailure&quot;: 42, # The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 3.
2409 &quot;enforcingConsecutiveErrors&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0.
2410 &quot;enforcingConsecutiveGatewayFailure&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
2411 &quot;enforcingSuccessRate&quot;: 42, # The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100.
2412 &quot;interval&quot;: { # A Duration represents a fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like &quot;day&quot; or &quot;month&quot;. Range is approximately 10,000 years. # Time interval between ejection analysis sweeps. This can result in both new ejections as well as hosts being returned to service. Defaults to 1 second.
2413 &quot;nanos&quot;: 42, # Span of time that&#x27;s a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive.
2414 &quot;seconds&quot;: &quot;A String&quot;, # Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002415 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002416 &quot;maxEjectionPercent&quot;: 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
2417 &quot;successRateMinimumHosts&quot;: 42, # The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5.
2418 &quot;successRateRequestVolume&quot;: 42, # The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100.
2419 &quot;successRateStdevFactor&quot;: 42, # This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev * success_rate_stdev_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900.
2420 },
2421 &quot;port&quot;: 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
2422 #
2423 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
2424 &quot;portName&quot;: &quot;A String&quot;, # A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL_MANAGED, or INTERNAL_SELF_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs.
2425 #
2426 #
2427 #
2428 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
2429 &quot;protocol&quot;: &quot;A String&quot;, # The protocol this BackendService uses to communicate with backends.
2430 #
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002431 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancer or for Traffic Director for more information.
2432 #
2433 # Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.
Bu Sun Kim65020912020-05-20 12:08:20 -07002434 &quot;region&quot;: &quot;A String&quot;, # [Output Only] URL of the region where the regional backend service resides. This field is not applicable to global backend services. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
2435 &quot;securityPolicy&quot;: &quot;A String&quot;, # [Output Only] The resource URL for the security policy associated with this backend service.
2436 &quot;securitySettings&quot;: { # The authentication and authorization settings for a BackendService. # This field specifies the security policy that applies to this backend service. This field is applicable to either:
2437 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
2438 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002439 &quot;authentication&quot;: &quot;A String&quot;, # [Deprecated] Use clientTlsPolicy instead.
2440 &quot;clientTlsPolicy&quot;: &quot;A String&quot;, # Optional. A URL referring to a networksecurity.ClientTlsPolicy resource that describes how clients should authenticate with this service&#x27;s backends.
2441 # clientTlsPolicy only applies to a global BackendService with the loadBalancingScheme set to INTERNAL_SELF_MANAGED.
2442 # If left blank, communications are not encrypted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002443 # Note: This field currently has no impact.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002444 &quot;subjectAltNames&quot;: [ # Optional. A list of Subject Alternative Names (SANs) that the client verifies during a mutual TLS handshake with an server/endpoint for this BackendService. When the server presents its X.509 certificate to the client, the client inspects the certificate&#x27;s subjectAltName field. If the field contains one of the specified values, the communication continues. Otherwise, it fails. This additional check enables the client to verify that the server is authorized to run the requested service.
2445 # Note that the contents of the server certificate&#x27;s subjectAltName field are configured by the Public Key Infrastructure which provisions server identities.
2446 # Only applies to a global BackendService with loadBalancingScheme set to INTERNAL_SELF_MANAGED. Only applies when BackendService has an attached clientTlsPolicy with clientCertificate (mTLS mode).
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002447 # Note: This field currently has no impact.
Bu Sun Kim65020912020-05-20 12:08:20 -07002448 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002449 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002450 },
2451 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2452 &quot;sessionAffinity&quot;: &quot;A String&quot;, # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
2453 #
2454 # When the loadBalancingScheme is EXTERNAL, possible values are NONE, CLIENT_IP, or GENERATED_COOKIE. You can use GENERATED_COOKIE if the protocol is HTTP or HTTPS.
2455 #
2456 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
2457 #
2458 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002459 #
2460 # Not supported when the backend service is referenced by a URL map that is bound to target gRPC proxy that has validateForProxyless field set to true.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002461 &quot;timeoutSec&quot;: 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information see, Backend service settings The default is 30 seconds.
Bu Sun Kim65020912020-05-20 12:08:20 -07002462}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002463
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002464 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2465
2466For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2467
2468The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002469
2470Returns:
2471 An object of the form:
2472
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002473 { # Represents an Operation resource.
2474 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002475 # Google Compute Engine has three Operation resources:
2476 #
2477 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2478 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002479 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2480 #
2481 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002482 # - For global operations, use the `globalOperations` resource.
2483 # - For regional operations, use the `regionOperations` resource.
2484 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002485 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002486 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002487 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2488 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2489 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2490 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2491 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2492 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002493 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002494 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2495 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2496 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002497 },
2498 ],
2499 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002500 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2501 &quot;httpErrorStatusCode&quot;: 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.
2502 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2503 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2504 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2505 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2506 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2507 &quot;progress&quot;: 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.
2508 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2509 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2510 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2511 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2512 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2513 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2514 &quot;targetLink&quot;: &quot;A String&quot;, # [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.
2515 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2516 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2517 {
2518 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2519 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2520 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2521 {
2522 &quot;key&quot;: &quot;A String&quot;, # [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).
2523 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2524 },
2525 ],
2526 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2527 },
2528 ],
2529 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002530 }</pre>
2531</div>
2532
2533</body></html>