blob: 245f05f87c15ec1de928ee2047a3fc2925d43e2b [file] [log] [blame]
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001<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_v1.html">Compute Engine API</a> . <a href="compute_v1.regionBackendServices.html">regionBackendServices</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#delete">delete(project, region, backendService, requestId=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080079<p class="firstline">Deletes the specified regional BackendService resource.</p>
80<p class="toc_element">
81 <code><a href="#get">get(project, region, backendService)</a></code></p>
82<p class="firstline">Returns the specified regional BackendService resource.</p>
83<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070084 <code><a href="#getHealth">getHealth(project, region, backendService, body=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080085<p class="firstline">Gets the most recent health check results for this regional BackendService.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#insert">insert(project, region, body=None, requestId=None)</a></code></p>
88<p class="firstline">Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080089<p class="toc_element">
90 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
91<p class="firstline">Retrieves the list of regional BackendService resources available to the specified project in the given region.</p>
92<p class="toc_element">
93 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#patch">patch(project, region, backendService, body=None, requestId=None)</a></code></p>
97<p class="firstline">Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#update">update(project, region, backendService, body=None, requestId=None)</a></code></p>
100<p class="firstline">Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.</p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800101<h3>Method Details</h3>
102<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700103 <code class="details" id="delete">delete(project, region, backendService, requestId=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800104 <pre>Deletes the specified regional BackendService resource.
105
106Args:
107 project: string, Project ID for this request. (required)
108 region: string, Name of the region scoping this request. (required)
109 backendService: string, Name of the BackendService resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700110 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.
111
112For 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.
113
114The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800115
116Returns:
117 An object of the form:
118
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 { # Represents an Operation resource.
120 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 # Google Compute Engine has three Operation resources:
122 #
123 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
124 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
126 #
127 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700128 # - For global operations, use the `globalOperations` resource.
129 # - For regional operations, use the `regionOperations` resource.
130 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700132 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800133 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400135 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700136 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700137 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800138 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700139 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
140 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800141 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700142 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800143 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800145 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
146 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
147 {
148 "message": "A String", # [Output Only] A human-readable description of the warning code.
149 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
150 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
151 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
152 {
153 "value": "A String", # [Output Only] A warning data value corresponding to the key.
154 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
155 },
156 ],
157 },
158 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800160 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700161 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
162 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800164 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
165 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
166 {
167 "message": "A String", # [Output Only] An optional, human-readable error message.
168 "code": "A String", # [Output Only] The error type identifier for this error.
169 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
170 },
171 ],
172 },
173 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
174 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
175 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
176 }</pre>
177</div>
178
179<div class="method">
180 <code class="details" id="get">get(project, region, backendService)</code>
181 <pre>Returns the specified regional BackendService resource.
182
183Args:
184 project: string, Project ID for this request. (required)
185 region: string, Name of the region scoping this request. (required)
186 backendService: string, Name of the BackendService resource to return. (required)
187
188Returns:
189 An object of the form:
190
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 { # Represents a Backend Service resource.
192 #
193 # A backend service contains configuration values for Google Cloud Platform load balancing services.
194 #
195 # Backend services in Google Compute Engine can be either regionally or globally scoped.
196 #
197 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
198 #
199 # For more information, read Backend Services.
200 #
201 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800202 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700203 "drainingTimeoutSec": 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].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800204 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800205 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
206 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. 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.
208 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
209 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
210 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
211 # - 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.
212 # - RANDOM: The load balancer selects a random healthy host.
213 # - 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.
214 # - 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, refer to https://ai.google/research/pubs/pub44824
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800215 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700216 # This field is applicable to either:
217 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
218 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700219 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700220 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
221 "loadBalancingScheme": "A String", # 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.
222 "healthChecks": [ # 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. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet NEG backends must not have a health check. A health check must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700223 "A String",
224 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700225 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700226 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700227 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700229 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700230 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700231 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
233 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400234 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700235 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
236 "A String",
237 ],
238 "signedUrlCacheMaxAgeSec": "A String", # 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 "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400239 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
240 "includeQueryString": 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.
241 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700242 "queryStringBlacklist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400243 "A String",
244 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700245 "queryStringWhitelist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400246 "A String",
247 ],
248 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
249 },
250 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 "enableCDN": 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.
252 "outlierDetection": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800253 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700254 # This field is applicable to either:
255 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
256 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
257 "interval": { # 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 "day" or "month". 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.
258 "nanos": 42, # Span of time that'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.
259 "seconds": "A String", # 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
260 },
261 "enforcingConsecutiveErrors": 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.
262 "successRateRequestVolume": 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.
263 "baseEjectionTime": { # 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 "day" or "month". 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.
264 "nanos": 42, # Span of time that'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.
265 "seconds": "A String", # 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
266 },
267 "enforcingConsecutiveGatewayFailure": 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.
268 "successRateMinimumHosts": 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.
269 "consecutiveErrors": 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.
270 "successRateStdevFactor": 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.
271 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
272 "consecutiveGatewayFailure": 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.
273 "enforcingSuccessRate": 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.
274 },
275 "affinityCookieTtlSec": 42, # 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).
276 "consistentHash": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800277 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700278 # This field is applicable to either:
279 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
280 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
281 "httpCookie": { # 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.
282 "path": "A String", # Path to set for the cookie.
283 "name": "A String", # Name of the cookie.
284 "ttl": { # 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 "day" or "month". Range is approximately 10,000 years. # Lifetime of the cookie.
285 "nanos": 42, # Span of time that'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.
286 "seconds": "A String", # 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
287 },
288 },
289 "minimumRingSize": "A String", # 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.
290 "httpHeaderName": "A String", # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
291 },
292 "circuitBreakers": { # 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.
293 #
294 # This field is applicable to either:
295 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
296 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
297 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
298 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
299 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
300 "maxRequestsPerConnection": 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.
301 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
302 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800303 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
304 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700305 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800306 "backends": [ # The list of backends that serve this BackendService.
307 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700308 "group": "A String", # 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's loadBalancingScheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800309 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800310 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700311 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700313 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700314 # - 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.
315 #
316 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800317 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700318 "maxUtilization": 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's balancingMode is UTILIZATION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800319 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
321 "failover": True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
322 "maxConnectionsPerEndpoint": 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'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700323 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700324 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
325 "maxRatePerInstance": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800326 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700327 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800328 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700329 # Not available if the backend's balancingMode is CONNECTION.
330 "maxConnectionsPerInstance": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700331 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700332 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
333 "maxRatePerEndpoint": 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.
334 #
335 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
336 #
337 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800338 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
339 #
340 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -0700341 "maxRate": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800342 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700343 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800344 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700345 # Not available if the backend's balancingMode is CONNECTION.
346 "maxConnections": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800347 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700348 # Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
349 "balancingMode": "A String", # Specifies the balancing mode for the backend.
350 #
351 # 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).
352 #
353 #
354 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
355 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
356 #
357 # 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.
358 #
359 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
360 #
361 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
362 # 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.
363 #
364 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
365 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800366 },
367 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400368 "iap": { # Identity-Aware Proxy
369 "oauth2ClientId": "A String",
370 "enabled": True or False,
371 "oauth2ClientSecret": "A String",
372 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
373 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700374 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
375 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
376 "A String",
377 ],
378 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
379 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.
380 #
381 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700382 "portName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700383 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 #
385 #
386 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
387 "logConfig": { # 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.
388 "sampleRate": 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.
389 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
390 },
391 "network": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
393 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
394 "region": "A String", # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 "timeoutSec": 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.
396 "failoverPolicy": { # 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.
397 "dropTrafficIfUnhealthy": 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.
398 #
399 # The default is false.
400 "failoverRatio": 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.
401 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
402 #
403 # The default is false.
404 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800405 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800406 }</pre>
407</div>
408
409<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700410 <code class="details" id="getHealth">getHealth(project, region, backendService, body=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800411 <pre>Gets the most recent health check results for this regional BackendService.
412
413Args:
414 project: string, A parameter (required)
415 region: string, Name of the region scoping this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700416 backendService: string, Name of the BackendService resource for which to get health. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800418 The object takes the form of:
419
420{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700421 "group": "A String", # A URI referencing one of the instance groups or network endpoint groups listed in the backend service.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800422 }
423
424
425Returns:
426 An object of the form:
427
428 {
429 "kind": "compute#backendServiceGroupHealth", # [Output Only] Type of resource. Always compute#backendServiceGroupHealth for the health of backend services.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700430 "healthStatus": [ # Health state of the backend instances or endpoints in requested instance or network endpoint group, determined based on configured health checks.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800431 {
432 "instance": "A String", # URL of the instance resource.
433 "healthState": "A String", # Health state of the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 "ipAddress": "A String", # A forwarding rule IP address assigned to this instance.
435 "port": 42, # The named port of the instance group, not necessarily the port that is health-checked.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800436 },
437 ],
438 }</pre>
439</div>
440
441<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700442 <code class="details" id="insert">insert(project, region, body=None, requestId=None)</code>
443 <pre>Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Understanding backend services for more information.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800444
445Args:
446 project: string, Project ID for this request. (required)
447 region: string, Name of the region scoping this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700448 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800449 The object takes the form of:
450
Dan O'Mearadd494642020-05-01 07:42:23 -0700451{ # Represents a Backend Service resource.
452 #
453 # A backend service contains configuration values for Google Cloud Platform load balancing services.
454 #
455 # Backend services in Google Compute Engine can be either regionally or globally scoped.
456 #
457 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
458 #
459 # For more information, read Backend Services.
460 #
461 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800462 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700463 "drainingTimeoutSec": 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].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800464 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800465 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
466 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700467 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. 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.
468 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
469 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
470 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
471 # - 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.
472 # - RANDOM: The load balancer selects a random healthy host.
473 # - 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.
474 # - 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, refer to https://ai.google/research/pubs/pub44824
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800475 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700476 # This field is applicable to either:
477 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
478 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700479 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700480 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
481 "loadBalancingScheme": "A String", # 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.
482 "healthChecks": [ # 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. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet NEG backends must not have a health check. A health check must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 "A String",
484 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700485 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700487 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700488 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700489 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700490 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700491 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700492 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
493 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400494 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
496 "A String",
497 ],
498 "signedUrlCacheMaxAgeSec": "A String", # 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 "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400499 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
500 "includeQueryString": 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.
501 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700502 "queryStringBlacklist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400503 "A String",
504 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 "queryStringWhitelist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400506 "A String",
507 ],
508 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
509 },
510 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700511 "enableCDN": 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.
512 "outlierDetection": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800513 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 # This field is applicable to either:
515 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
516 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
517 "interval": { # 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 "day" or "month". 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.
518 "nanos": 42, # Span of time that'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.
519 "seconds": "A String", # 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
520 },
521 "enforcingConsecutiveErrors": 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.
522 "successRateRequestVolume": 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.
523 "baseEjectionTime": { # 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 "day" or "month". 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.
524 "nanos": 42, # Span of time that'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.
525 "seconds": "A String", # 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
526 },
527 "enforcingConsecutiveGatewayFailure": 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.
528 "successRateMinimumHosts": 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.
529 "consecutiveErrors": 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.
530 "successRateStdevFactor": 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.
531 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
532 "consecutiveGatewayFailure": 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.
533 "enforcingSuccessRate": 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.
534 },
535 "affinityCookieTtlSec": 42, # 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).
536 "consistentHash": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800537 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700538 # This field is applicable to either:
539 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
540 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
541 "httpCookie": { # 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.
542 "path": "A String", # Path to set for the cookie.
543 "name": "A String", # Name of the cookie.
544 "ttl": { # 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 "day" or "month". Range is approximately 10,000 years. # Lifetime of the cookie.
545 "nanos": 42, # Span of time that'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.
546 "seconds": "A String", # 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
547 },
548 },
549 "minimumRingSize": "A String", # 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.
550 "httpHeaderName": "A String", # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
551 },
552 "circuitBreakers": { # 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.
553 #
554 # This field is applicable to either:
555 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
556 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
557 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
558 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
559 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
560 "maxRequestsPerConnection": 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.
561 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
562 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800563 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
564 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700565 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800566 "backends": [ # The list of backends that serve this BackendService.
567 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700568 "group": "A String", # 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's loadBalancingScheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800569 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800570 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700571 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700572 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700573 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700574 # - 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.
575 #
576 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800577 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 "maxUtilization": 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's balancingMode is UTILIZATION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800579 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700580 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
581 "failover": True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
582 "maxConnectionsPerEndpoint": 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'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700583 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700584 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
585 "maxRatePerInstance": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800586 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800588 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700589 # Not available if the backend's balancingMode is CONNECTION.
590 "maxConnectionsPerInstance": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700592 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
593 "maxRatePerEndpoint": 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.
594 #
595 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
596 #
597 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800598 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
599 #
600 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -0700601 "maxRate": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800602 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800604 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700605 # Not available if the backend's balancingMode is CONNECTION.
606 "maxConnections": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800607 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700608 # Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
609 "balancingMode": "A String", # Specifies the balancing mode for the backend.
610 #
611 # 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).
612 #
613 #
614 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
615 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
616 #
617 # 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.
618 #
619 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
620 #
621 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
622 # 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.
623 #
624 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
625 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800626 },
627 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400628 "iap": { # Identity-Aware Proxy
629 "oauth2ClientId": "A String",
630 "enabled": True or False,
631 "oauth2ClientSecret": "A String",
632 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
633 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700634 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
635 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
636 "A String",
637 ],
638 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
639 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.
640 #
641 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700642 "portName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700643 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700644 #
645 #
646 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
647 "logConfig": { # 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.
648 "sampleRate": 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.
649 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
650 },
651 "network": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700652 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
653 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
654 "region": "A String", # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700655 "timeoutSec": 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.
656 "failoverPolicy": { # 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.
657 "dropTrafficIfUnhealthy": 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.
658 #
659 # The default is false.
660 "failoverRatio": 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.
661 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
662 #
663 # The default is false.
664 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800665 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800666 }
667
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700668 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.
669
670For 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.
671
672The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800673
674Returns:
675 An object of the form:
676
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700677 { # Represents an Operation resource.
678 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700679 # Google Compute Engine has three Operation resources:
680 #
681 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
682 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700683 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
684 #
685 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700686 # - For global operations, use the `globalOperations` resource.
687 # - For regional operations, use the `regionOperations` resource.
688 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700690 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800691 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700692 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400693 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700695 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800696 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700697 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
698 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800699 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800701 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700702 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800703 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
704 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
705 {
706 "message": "A String", # [Output Only] A human-readable description of the warning code.
707 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
708 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
709 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
710 {
711 "value": "A String", # [Output Only] A warning data value corresponding to the key.
712 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
713 },
714 ],
715 },
716 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700717 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800718 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
720 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800722 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
723 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
724 {
725 "message": "A String", # [Output Only] An optional, human-readable error message.
726 "code": "A String", # [Output Only] The error type identifier for this error.
727 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
728 },
729 ],
730 },
731 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
732 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
733 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
734 }</pre>
735</div>
736
737<div class="method">
738 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
739 <pre>Retrieves the list of regional BackendService resources available to the specified project in the given region.
740
741Args:
742 project: string, Project ID for this request. (required)
743 region: string, Name of the region scoping this request. (required)
744 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
745
Dan O'Mearadd494642020-05-01 07:42:23 -0700746You can also sort results in descending order based on the creation timestamp using `orderBy="creationTimestamp desc"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800747
Dan O'Mearadd494642020-05-01 07:42:23 -0700748Currently, only sorting by `name` or `creationTimestamp desc` is supported.
749 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`)
750 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.
751 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;`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800752
Dan O'Mearadd494642020-05-01 07:42:23 -0700753For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800754
Dan O'Mearadd494642020-05-01 07:42:23 -0700755You 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800756
Dan O'Mearadd494642020-05-01 07:42:23 -0700757To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true) ```
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800758
759Returns:
760 An object of the form:
761
762 { # Contains a list of BackendService resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400763 "nextPageToken": "A String", # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 "kind": "compute#backendServiceList", # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800765 "items": [ # A list of BackendService resources.
Dan O'Mearadd494642020-05-01 07:42:23 -0700766 { # Represents a Backend Service resource.
767 #
768 # A backend service contains configuration values for Google Cloud Platform load balancing services.
769 #
770 # Backend services in Google Compute Engine can be either regionally or globally scoped.
771 #
772 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
773 #
774 # For more information, read Backend Services.
775 #
776 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800777 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700778 "drainingTimeoutSec": 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].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800779 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800780 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
781 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700782 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. 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.
783 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
784 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
785 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
786 # - 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.
787 # - RANDOM: The load balancer selects a random healthy host.
788 # - 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.
789 # - 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, refer to https://ai.google/research/pubs/pub44824
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800790 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700791 # This field is applicable to either:
792 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
793 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
796 "loadBalancingScheme": "A String", # 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.
797 "healthChecks": [ # 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. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet NEG backends must not have a health check. A health check must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 "A String",
799 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700800 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700801 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700802 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700803 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700804 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700805 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700807 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
808 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400809 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700810 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
811 "A String",
812 ],
813 "signedUrlCacheMaxAgeSec": "A String", # 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 "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400814 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
815 "includeQueryString": 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.
816 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700817 "queryStringBlacklist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400818 "A String",
819 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700820 "queryStringWhitelist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400821 "A String",
822 ],
823 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
824 },
825 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700826 "enableCDN": 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.
827 "outlierDetection": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800828 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700829 # This field is applicable to either:
830 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
831 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
832 "interval": { # 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 "day" or "month". 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.
833 "nanos": 42, # Span of time that'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.
834 "seconds": "A String", # 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
835 },
836 "enforcingConsecutiveErrors": 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.
837 "successRateRequestVolume": 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.
838 "baseEjectionTime": { # 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 "day" or "month". 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.
839 "nanos": 42, # Span of time that'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.
840 "seconds": "A String", # 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
841 },
842 "enforcingConsecutiveGatewayFailure": 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.
843 "successRateMinimumHosts": 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.
844 "consecutiveErrors": 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.
845 "successRateStdevFactor": 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.
846 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
847 "consecutiveGatewayFailure": 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.
848 "enforcingSuccessRate": 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.
849 },
850 "affinityCookieTtlSec": 42, # 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).
851 "consistentHash": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800852 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700853 # This field is applicable to either:
854 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
855 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
856 "httpCookie": { # 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.
857 "path": "A String", # Path to set for the cookie.
858 "name": "A String", # Name of the cookie.
859 "ttl": { # 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 "day" or "month". Range is approximately 10,000 years. # Lifetime of the cookie.
860 "nanos": 42, # Span of time that'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.
861 "seconds": "A String", # 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
862 },
863 },
864 "minimumRingSize": "A String", # 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.
865 "httpHeaderName": "A String", # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
866 },
867 "circuitBreakers": { # 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.
868 #
869 # This field is applicable to either:
870 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
871 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
872 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
873 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
874 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
875 "maxRequestsPerConnection": 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.
876 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
877 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800878 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
879 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700880 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800881 "backends": [ # The list of backends that serve this BackendService.
882 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700883 "group": "A String", # 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's loadBalancingScheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800884 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800885 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700886 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700887 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700888 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700889 # - 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.
890 #
891 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800892 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700893 "maxUtilization": 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's balancingMode is UTILIZATION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800894 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700895 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
896 "failover": True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
897 "maxConnectionsPerEndpoint": 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'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700898 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700899 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
900 "maxRatePerInstance": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800901 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700902 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800903 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700904 # Not available if the backend's balancingMode is CONNECTION.
905 "maxConnectionsPerInstance": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700906 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700907 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
908 "maxRatePerEndpoint": 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.
909 #
910 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
911 #
912 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800913 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
914 #
915 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -0700916 "maxRate": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800917 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700918 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800919 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700920 # Not available if the backend's balancingMode is CONNECTION.
921 "maxConnections": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800922 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700923 # Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
924 "balancingMode": "A String", # Specifies the balancing mode for the backend.
925 #
926 # 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).
927 #
928 #
929 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
930 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
931 #
932 # 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.
933 #
934 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
935 #
936 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
937 # 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.
938 #
939 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
940 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800941 },
942 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400943 "iap": { # Identity-Aware Proxy
944 "oauth2ClientId": "A String",
945 "enabled": True or False,
946 "oauth2ClientSecret": "A String",
947 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
948 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700949 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
950 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
951 "A String",
952 ],
953 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
954 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.
955 #
956 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700957 "portName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700958 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700959 #
960 #
961 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
962 "logConfig": { # 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.
963 "sampleRate": 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.
964 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
965 },
966 "network": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700967 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
968 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
969 "region": "A String", # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700970 "timeoutSec": 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.
971 "failoverPolicy": { # 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.
972 "dropTrafficIfUnhealthy": 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.
973 #
974 # The default is false.
975 "failoverRatio": 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.
976 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
977 #
978 # The default is false.
979 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800980 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800981 },
982 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700983 "warning": { # [Output Only] Informational warning message.
984 "message": "A String", # [Output Only] A human-readable description of the warning code.
985 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
986 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
987 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
988 {
989 "value": "A String", # [Output Only] A warning data value corresponding to the key.
990 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
991 },
992 ],
993 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800994 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
995 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
996 }</pre>
997</div>
998
999<div class="method">
1000 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1001 <pre>Retrieves the next page of results.
1002
1003Args:
1004 previous_request: The request for the previous page. (required)
1005 previous_response: The response from the request for the previous page. (required)
1006
1007Returns:
1008 A request object that you can call 'execute()' on to request the next
1009 page. Returns None if there are no more items in the collection.
1010 </pre>
1011</div>
1012
1013<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001014 <code class="details" id="patch">patch(project, region, backendService, body=None, requestId=None)</code>
1015 <pre>Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001016
1017Args:
1018 project: string, Project ID for this request. (required)
1019 region: string, Name of the region scoping this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001020 backendService: string, Name of the BackendService resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001021 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001022 The object takes the form of:
1023
Dan O'Mearadd494642020-05-01 07:42:23 -07001024{ # Represents a Backend Service resource.
1025 #
1026 # A backend service contains configuration values for Google Cloud Platform load balancing services.
1027 #
1028 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1029 #
1030 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1031 #
1032 # For more information, read Backend Services.
1033 #
1034 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001035 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -07001036 "drainingTimeoutSec": 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].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001037 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001038 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1039 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. 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.
1041 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
1042 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1043 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1044 # - 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.
1045 # - RANDOM: The load balancer selects a random healthy host.
1046 # - 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.
1047 # - 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, refer to https://ai.google/research/pubs/pub44824
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001048 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001049 # This field is applicable to either:
1050 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1051 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001052 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
1054 "loadBalancingScheme": "A String", # 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.
1055 "healthChecks": [ # 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. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet NEG backends must not have a health check. A health check must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001056 "A String",
1057 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001058 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001059 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001060 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001061 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001062 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001063 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001064 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001065 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1066 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001067 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001068 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1069 "A String",
1070 ],
1071 "signedUrlCacheMaxAgeSec": "A String", # 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 "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001072 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1073 "includeQueryString": 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.
1074 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 "queryStringBlacklist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001076 "A String",
1077 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001078 "queryStringWhitelist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001079 "A String",
1080 ],
1081 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1082 },
1083 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001084 "enableCDN": 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.
1085 "outlierDetection": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001086 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001087 # This field is applicable to either:
1088 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1089 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1090 "interval": { # 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 "day" or "month". 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.
1091 "nanos": 42, # Span of time that'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.
1092 "seconds": "A String", # 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
1093 },
1094 "enforcingConsecutiveErrors": 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.
1095 "successRateRequestVolume": 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.
1096 "baseEjectionTime": { # 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 "day" or "month". 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.
1097 "nanos": 42, # Span of time that'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.
1098 "seconds": "A String", # 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
1099 },
1100 "enforcingConsecutiveGatewayFailure": 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.
1101 "successRateMinimumHosts": 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.
1102 "consecutiveErrors": 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.
1103 "successRateStdevFactor": 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.
1104 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1105 "consecutiveGatewayFailure": 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.
1106 "enforcingSuccessRate": 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.
1107 },
1108 "affinityCookieTtlSec": 42, # 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).
1109 "consistentHash": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001110 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 # This field is applicable to either:
1112 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1113 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1114 "httpCookie": { # 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.
1115 "path": "A String", # Path to set for the cookie.
1116 "name": "A String", # Name of the cookie.
1117 "ttl": { # 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 "day" or "month". Range is approximately 10,000 years. # Lifetime of the cookie.
1118 "nanos": 42, # Span of time that'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.
1119 "seconds": "A String", # 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
1120 },
1121 },
1122 "minimumRingSize": "A String", # 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.
1123 "httpHeaderName": "A String", # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
1124 },
1125 "circuitBreakers": { # 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.
1126 #
1127 # This field is applicable to either:
1128 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1129 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1130 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1131 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1132 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1133 "maxRequestsPerConnection": 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.
1134 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1135 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001136 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1137 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001138 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001139 "backends": [ # The list of backends that serve this BackendService.
1140 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001141 "group": "A String", # 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's loadBalancingScheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001142 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001143 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001144 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001145 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001146 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001147 # - 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.
1148 #
1149 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001150 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001151 "maxUtilization": 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's balancingMode is UTILIZATION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001152 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001153 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1154 "failover": True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
1155 "maxConnectionsPerEndpoint": 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'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
1158 "maxRatePerInstance": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001159 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001160 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001161 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001162 # Not available if the backend's balancingMode is CONNECTION.
1163 "maxConnectionsPerInstance": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001164 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001165 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
1166 "maxRatePerEndpoint": 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.
1167 #
1168 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1169 #
1170 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001171 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
1172 #
1173 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07001174 "maxRate": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001175 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001176 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001177 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001178 # Not available if the backend's balancingMode is CONNECTION.
1179 "maxConnections": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001180 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001181 # Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
1182 "balancingMode": "A String", # Specifies the balancing mode for the backend.
1183 #
1184 # 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).
1185 #
1186 #
1187 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1188 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1189 #
1190 # 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.
1191 #
1192 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1193 #
1194 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1195 # 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.
1196 #
1197 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1198 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001199 },
1200 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001201 "iap": { # Identity-Aware Proxy
1202 "oauth2ClientId": "A String",
1203 "enabled": True or False,
1204 "oauth2ClientSecret": "A String",
1205 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1206 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1208 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1209 "A String",
1210 ],
1211 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1212 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.
1213 #
1214 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001215 "portName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001216 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001217 #
1218 #
1219 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
1220 "logConfig": { # 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.
1221 "sampleRate": 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.
1222 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1223 },
1224 "network": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001225 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1226 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1227 "region": "A String", # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001228 "timeoutSec": 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.
1229 "failoverPolicy": { # 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.
1230 "dropTrafficIfUnhealthy": 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.
1231 #
1232 # The default is false.
1233 "failoverRatio": 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.
1234 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
1235 #
1236 # The default is false.
1237 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001238 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001239 }
1240
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 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.
1242
1243For 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.
1244
1245The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001246
1247Returns:
1248 An object of the form:
1249
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001250 { # Represents an Operation resource.
1251 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001252 # Google Compute Engine has three Operation resources:
1253 #
1254 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1255 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001256 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1257 #
1258 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001259 # - For global operations, use the `globalOperations` resource.
1260 # - For regional operations, use the `regionOperations` resource.
1261 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001262 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001263 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001264 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001265 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001266 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001267 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001268 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001269 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1271 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001272 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001273 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001274 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001275 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001276 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1277 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1278 {
1279 "message": "A String", # [Output Only] A human-readable description of the warning code.
1280 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1281 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1282 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1283 {
1284 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1285 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1286 },
1287 ],
1288 },
1289 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001290 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001291 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001292 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1293 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001294 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001295 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1296 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1297 {
1298 "message": "A String", # [Output Only] An optional, human-readable error message.
1299 "code": "A String", # [Output Only] The error type identifier for this error.
1300 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1301 },
1302 ],
1303 },
1304 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1305 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1306 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1307 }</pre>
1308</div>
1309
1310<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001311 <code class="details" id="update">update(project, region, backendService, body=None, requestId=None)</code>
1312 <pre>Updates the specified regional BackendService resource with the data included in the request. There are several Understanding backend services to keep in mind when updating a backend service. Read Understanding backend services for more information.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001313
1314Args:
1315 project: string, Project ID for this request. (required)
1316 region: string, Name of the region scoping this request. (required)
1317 backendService: string, Name of the BackendService resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001318 body: object, The request body.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001319 The object takes the form of:
1320
Dan O'Mearadd494642020-05-01 07:42:23 -07001321{ # Represents a Backend Service resource.
1322 #
1323 # A backend service contains configuration values for Google Cloud Platform load balancing services.
1324 #
1325 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1326 #
1327 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1328 #
1329 # For more information, read Backend Services.
1330 #
1331 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001332 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -07001333 "drainingTimeoutSec": 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].
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001334 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001335 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1336 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001337 # Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, or UDP. 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.
1338 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
1339 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1340 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1341 # - 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.
1342 # - RANDOM: The load balancer selects a random healthy host.
1343 # - 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.
1344 # - 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, refer to https://ai.google/research/pubs/pub44824
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001345 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 # This field is applicable to either:
1347 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1348 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001349 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001350 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
1351 "loadBalancingScheme": "A String", # 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.
1352 "healthChecks": [ # 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. Backend services with instance group or zonal NEG backends must have a health check. Backend services with internet NEG backends must not have a health check. A health check must
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001353 "A String",
1354 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE. Session affinity is not applicable if the --protocol is UDP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001356 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001357 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001358 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001359 # When the loadBalancingScheme is INTERNAL, possible values are NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001360 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # When the loadBalancingScheme is INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED, possible values are NONE, CLIENT_IP, GENERATED_COOKIE, HEADER_FIELD, or HTTP_COOKIE.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001362 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1363 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001364 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001365 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1366 "A String",
1367 ],
1368 "signedUrlCacheMaxAgeSec": "A String", # 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 "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001369 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1370 "includeQueryString": 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.
1371 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -07001372 "queryStringBlacklist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001373 "A String",
1374 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001375 "queryStringWhitelist": [ # 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. '&amp;' and '=' will be percent encoded and not treated as delimiters.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001376 "A String",
1377 ],
1378 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1379 },
1380 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001381 "enableCDN": 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.
1382 "outlierDetection": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001383 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001384 # This field is applicable to either:
1385 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1386 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1387 "interval": { # 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 "day" or "month". 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.
1388 "nanos": 42, # Span of time that'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.
1389 "seconds": "A String", # 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
1390 },
1391 "enforcingConsecutiveErrors": 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.
1392 "successRateRequestVolume": 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.
1393 "baseEjectionTime": { # 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 "day" or "month". 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.
1394 "nanos": 42, # Span of time that'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.
1395 "seconds": "A String", # 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
1396 },
1397 "enforcingConsecutiveGatewayFailure": 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.
1398 "successRateMinimumHosts": 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.
1399 "consecutiveErrors": 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.
1400 "successRateStdevFactor": 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.
1401 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1402 "consecutiveGatewayFailure": 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.
1403 "enforcingSuccessRate": 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.
1404 },
1405 "affinityCookieTtlSec": 42, # 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).
1406 "consistentHash": { # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001407 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001408 # This field is applicable to either:
1409 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1410 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1411 "httpCookie": { # 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.
1412 "path": "A String", # Path to set for the cookie.
1413 "name": "A String", # Name of the cookie.
1414 "ttl": { # 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 "day" or "month". Range is approximately 10,000 years. # Lifetime of the cookie.
1415 "nanos": 42, # Span of time that'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.
1416 "seconds": "A String", # 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
1417 },
1418 },
1419 "minimumRingSize": "A String", # 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.
1420 "httpHeaderName": "A String", # The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER_FIELD.
1421 },
1422 "circuitBreakers": { # 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.
1423 #
1424 # This field is applicable to either:
1425 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1426 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1427 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1428 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1429 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1430 "maxRequestsPerConnection": 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.
1431 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1432 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001433 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1434 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001435 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001436 "backends": [ # The list of backends that serve this BackendService.
1437 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001438 "group": "A String", # 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's loadBalancingScheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001439 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001440 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001441 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001442 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001443 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001444 # - 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.
1445 #
1446 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001447 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001448 "maxUtilization": 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's balancingMode is UTILIZATION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001449 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001450 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1451 "failover": True or False, # This field designates whether this is a failover backend. More than one failover backend can be configured for a given BackendService.
1452 "maxConnectionsPerEndpoint": 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'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001453 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001454 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerEndpoint even though its backends require a balancing mode of CONNECTION.
1455 "maxRatePerInstance": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001456 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001457 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001458 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001459 # Not available if the backend's balancingMode is CONNECTION.
1460 "maxConnectionsPerInstance": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001461 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001462 # Not available if the backend's balancingMode is RATE. Internal TCP/UDP load balancing does not support setting maxConnectionsPerInstance even though its backends require a balancing mode of CONNECTION.
1463 "maxRatePerEndpoint": 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.
1464 #
1465 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1466 #
1467 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001468 "capacityScaler": 3.14, # A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0].
1469 #
1470 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07001471 "maxRate": 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001472 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001473 # If the backend's balancingMode is UTILIZATION, this is an optional parameter. If the backend's balancingMode is RATE, you must specify maxRate, maxRatePerInstance, or maxRatePerEndpoint.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001474 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001475 # Not available if the backend's balancingMode is CONNECTION.
1476 "maxConnections": 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's balancingMode is UTILIZATION, this is an optional parameter. If the backend'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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001477 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001478 # Not available if the backend's balancingMode is RATE. If the loadBalancingScheme is INTERNAL, then maxConnections is not supported, even though the backend requires a balancing mode of CONNECTION.
1479 "balancingMode": "A String", # Specifies the balancing mode for the backend.
1480 #
1481 # 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).
1482 #
1483 #
1484 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1485 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1486 #
1487 # 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.
1488 #
1489 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1490 #
1491 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1492 # 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.
1493 #
1494 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1495 # 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.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001496 },
1497 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001498 "iap": { # Identity-Aware Proxy
1499 "oauth2ClientId": "A String",
1500 "enabled": True or False,
1501 "oauth2ClientSecret": "A String",
1502 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1503 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001504 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1505 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1506 "A String",
1507 ],
1508 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1509 "fingerprint": "A String", # Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a BackendService. An up-to-date fingerprint must be provided in order to update the BackendService, otherwise the request will fail with error 412 conditionNotMet.
1510 #
1511 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001512 "portName": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001513 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001514 #
1515 #
1516 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
1517 "logConfig": { # 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.
1518 "sampleRate": 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.
1519 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1520 },
1521 "network": "A String", # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001522 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1523 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1524 "region": "A String", # [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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001525 "timeoutSec": 42, # The backend service timeout has a different meaning depending on the type of load balancer. For more information read, Backend service settings The default is 30 seconds.
1526 "failoverPolicy": { # 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.
1527 "dropTrafficIfUnhealthy": 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.
1528 #
1529 # The default is false.
1530 "failoverRatio": 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.
1531 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
1532 #
1533 # The default is false.
1534 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001535 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001536 }
1537
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001538 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.
1539
1540For 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.
1541
1542The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001543
1544Returns:
1545 An object of the form:
1546
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001547 { # Represents an Operation resource.
1548 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001549 # Google Compute Engine has three Operation resources:
1550 #
1551 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1552 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001553 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1554 #
1555 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001556 # - For global operations, use the `globalOperations` resource.
1557 # - For regional operations, use the `regionOperations` resource.
1558 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001559 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001560 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001561 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001562 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001563 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001564 "id": "A String", # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001565 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001566 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1568 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001569 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
Dan O'Mearadd494642020-05-01 07:42:23 -07001570 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001571 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001572 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001573 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1574 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1575 {
1576 "message": "A String", # [Output Only] A human-readable description of the warning code.
1577 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1578 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1579 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1580 {
1581 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1582 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1583 },
1584 ],
1585 },
1586 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001587 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001588 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001589 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1590 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001592 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1593 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1594 {
1595 "message": "A String", # [Output Only] An optional, human-readable error message.
1596 "code": "A String", # [Output Only] The error type identifier for this error.
1597 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1598 },
1599 ],
1600 },
1601 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1602 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1603 "targetLink": "A String", # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1604 }</pre>
1605</div>
1606
1607</body></html>