blob: 90057fc7ad26759f9374fa30cf66586c7eff9229 [file] [log] [blame]
Craig Citro065b5302014-08-14 00:47:23 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.backendServices.html">backendServices</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#addSignedUrlKey">addSignedUrlKey(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Adds a key for validating requests with signed URLs for this backend service.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</a></code></p>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080082<p class="firstline">Retrieves the list of all BackendService resources, regional and global, available to the specified project.</p>
83<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070087 <code><a href="#delete">delete(project, backendService, requestId=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070088<p class="firstline">Deletes the specified BackendService resource.</p>
89<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070090 <code><a href="#deleteSignedUrlKey">deleteSignedUrlKey(project, backendService, keyName, requestId=None)</a></code></p>
91<p class="firstline">Deletes a key for validating requests with signed URLs for this backend service.</p>
92<p class="toc_element">
Craig Citro065b5302014-08-14 00:47:23 -070093 <code><a href="#get">get(project, backendService)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Returns the specified BackendService resource. Gets a list of available backend services.</p>
Craig Citro065b5302014-08-14 00:47:23 -070095<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#getHealth">getHealth(project, backendService, body=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -070097<p class="firstline">Gets the most recent health check results for this BackendService.</p>
98<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#insert">insert(project, body=None, requestId=None)</a></code></p>
100<p class="firstline">Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700101<p class="toc_element">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700102 <code><a href="#list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
Craig Citro065b5302014-08-14 00:47:23 -0700103<p class="firstline">Retrieves the list of BackendService resources available to the specified project.</p>
104<p class="toc_element">
105 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#patch">patch(project, backendService, body=None, requestId=None)</a></code></p>
109<p class="firstline">Patches the specified 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>
Craig Citro065b5302014-08-14 00:47:23 -0700110<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 <code><a href="#setSecurityPolicy">setSecurityPolicy(project, backendService, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700112<p class="firstline">Sets the security policy for the specified backend service.</p>
113<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700114 <code><a href="#update">update(project, backendService, body=None, requestId=None)</a></code></p>
115<p class="firstline">Updates the specified 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>
Craig Citro065b5302014-08-14 00:47:23 -0700116<h3>Method Details</h3>
117<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700118 <code class="details" id="addSignedUrlKey">addSignedUrlKey(project, backendService, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700119 <pre>Adds a key for validating requests with signed URLs for this backend service.
120
121Args:
122 project: string, Project ID for this request. (required)
123 backendService: string, Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700124 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 The object takes the form of:
126
127{ # Represents a customer-supplied Signing Key used by Cloud CDN Signed URLs
128 "keyName": "A String", # Name of the key. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
129 "keyValue": "A String", # 128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string.
130 }
131
132 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.
133
134For 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.
135
136The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
137
138Returns:
139 An object of the form:
140
141 { # Represents an Operation resource.
142 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700143 # Google Compute Engine has three Operation resources:
144 #
145 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
146 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700147 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
148 #
149 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 # - For global operations, use the `globalOperations` resource.
151 # - For regional operations, use the `regionOperations` resource.
152 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700155 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
156 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
157 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700158 "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 -0700159 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
160 "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 -0700161 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
162 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700163 "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 -0700164 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700165 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700166 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700167 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
168 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
169 {
170 "message": "A String", # [Output Only] A human-readable description of the warning code.
171 "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.
172 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
173 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
174 {
175 "value": "A String", # [Output Only] A warning data value corresponding to the key.
176 "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).
177 },
178 ],
179 },
180 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700181 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700182 "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 -0700183 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
184 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
186 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
187 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
188 {
189 "message": "A String", # [Output Only] An optional, human-readable error message.
190 "code": "A String", # [Output Only] The error type identifier for this error.
191 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
192 },
193 ],
194 },
195 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
196 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
197 "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.
198 }</pre>
199</div>
200
201<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700202 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None, includeAllScopes=None)</code>
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800203 <pre>Retrieves the list of all BackendService resources, regional and global, available to the specified project.
204
205Args:
206 project: string, Name of the project scoping this request. (required)
207 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
208
Dan O'Mearadd494642020-05-01 07:42:23 -0700209You 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 -0800210
Dan O'Mearadd494642020-05-01 07:42:23 -0700211Currently, only sorting by `name` or `creationTimestamp desc` is supported.
212 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`)
213 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.
214 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 -0800215
Dan O'Mearadd494642020-05-01 07:42:23 -0700216For 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 -0800217
Dan O'Mearadd494642020-05-01 07:42:23 -0700218You 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 -0800219
Dan O'Mearadd494642020-05-01 07:42:23 -0700220To 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) ```
221 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800222
223Returns:
224 An object of the form:
225
226 { # Contains a list of BackendServicesScopedList.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700227 "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.
228 "kind": "compute#backendServiceAggregatedList", # Type of resource.
229 "items": { # A list of BackendServicesScopedList resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800230 "a_key": { # Name of the scope containing this set of BackendServices.
231 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
232 "message": "A String", # [Output Only] A human-readable description of the warning code.
233 "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.
234 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
235 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
236 {
237 "value": "A String", # [Output Only] A warning data value corresponding to the key.
238 "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).
239 },
240 ],
241 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 "backendServices": [ # A list of BackendServices contained in this scope.
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 { # Represents a Backend Service resource.
244 #
245 # A backend service contains configuration values for Google Cloud Platform load balancing services.
246 #
247 # Backend services in Google Compute Engine can be either regionally or globally scoped.
248 #
249 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
250 #
251 # For more information, read Backend Services.
252 #
253 # (== resource_for {$api_version}.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800254 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700255 "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 -0800256 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800257 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
258 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 # 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.
260 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
261 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
262 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
263 # - 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.
264 # - RANDOM: The load balancer selects a random healthy host.
265 # - 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.
266 # - 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 -0800267 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 # This field is applicable to either:
269 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
270 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700272 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
273 "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.
274 "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 -0700275 "A String",
276 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "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 -0700278 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700279 # 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 -0700280 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700281 # 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 -0700282 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700283 # 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 -0700284 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
285 "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 -0400286 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700287 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
288 "A String",
289 ],
290 "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 -0400291 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
292 "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.
293 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700294 "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 -0400295 "A String",
296 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 "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 -0400298 "A String",
299 ],
300 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
301 },
302 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700303 "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.
304 "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 -0800305 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700306 # This field is applicable to either:
307 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
308 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
309 "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.
310 "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.
311 "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
312 },
313 "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.
314 "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.
315 "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.
316 "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.
317 "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
318 },
319 "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.
320 "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.
321 "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.
322 "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.
323 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
324 "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.
325 "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.
326 },
327 "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).
328 "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 -0800329 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700330 # This field is applicable to either:
331 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
332 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
333 "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.
334 "path": "A String", # Path to set for the cookie.
335 "name": "A String", # Name of the cookie.
336 "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.
337 "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.
338 "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
339 },
340 },
341 "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.
342 "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.
343 },
344 "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.
345 #
346 # This field is applicable to either:
347 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
348 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
349 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
350 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
351 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
352 "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.
353 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
354 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800355 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
356 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700357 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800358 "backends": [ # The list of backends that serve this BackendService.
359 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700360 "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 -0800361 #
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800362 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700363 # - 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 -0700364 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700365 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700366 # - 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.
367 #
368 # 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 -0800369 "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 -0700370 "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 -0800371 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700372 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
373 "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.
374 "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 -0700375 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700376 # 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.
377 "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 -0800378 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700379 # 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 -0800380 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700381 # Not available if the backend's balancingMode is CONNECTION.
382 "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 -0700383 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700384 # 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.
385 "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.
386 #
387 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
388 #
389 # Not available if the backend's balancingMode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800390 "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].
391 #
392 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -0700393 "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 -0800394 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700395 # 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 -0800396 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700397 # Not available if the backend's balancingMode is CONNECTION.
398 "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 -0800399 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700400 # 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.
401 "balancingMode": "A String", # Specifies the balancing mode for the backend.
402 #
403 # 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).
404 #
405 #
406 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
407 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
408 #
409 # 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.
410 #
411 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
412 #
413 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
414 # 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.
415 #
416 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
417 # 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 -0800418 },
419 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400420 "iap": { # Identity-Aware Proxy
421 "oauth2ClientId": "A String",
422 "enabled": True or False,
423 "oauth2ClientSecret": "A String",
424 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
425 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700426 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
427 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
428 "A String",
429 ],
430 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
431 "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.
432 #
433 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700434 "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 -0700435 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700436 #
437 #
438 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
439 "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.
440 "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.
441 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
442 },
443 "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 -0700444 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
445 "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.
446 "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 -0700447 "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.
448 "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.
449 "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.
450 #
451 # The default is false.
452 "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.
453 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
454 #
455 # The default is false.
456 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800457 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800458 },
459 ],
460 },
461 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 "warning": { # [Output Only] Informational warning message.
463 "message": "A String", # [Output Only] A human-readable description of the warning code.
464 "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.
465 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
466 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
467 {
468 "value": "A String", # [Output Only] A warning data value corresponding to the key.
469 "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).
470 },
471 ],
472 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800473 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
474 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
475 }</pre>
476</div>
477
478<div class="method">
479 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
480 <pre>Retrieves the next page of results.
481
482Args:
483 previous_request: The request for the previous page. (required)
484 previous_response: The response from the request for the previous page. (required)
485
486Returns:
487 A request object that you can call 'execute()' on to request the next
488 page. Returns None if there are no more items in the collection.
489 </pre>
490</div>
491
492<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700493 <code class="details" id="delete">delete(project, backendService, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700494 <pre>Deletes the specified BackendService resource.
495
496Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800497 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700498 backendService: string, Name of the BackendService resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700499 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.
500
501For 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.
502
503The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -0700504
505Returns:
506 An object of the form:
507
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700508 { # Represents an Operation resource.
509 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700510 # Google Compute Engine has three Operation resources:
511 #
512 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
513 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700514 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
515 #
516 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700517 # - For global operations, use the `globalOperations` resource.
518 # - For regional operations, use the `regionOperations` resource.
519 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700520 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700521 # 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 Parrott36e41bc2016-02-19 16:02:29 -0800522 "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 -0700523 "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 -0400524 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700525 "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 -0700526 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800527 "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 -0700528 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
529 "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 Parrott36e41bc2016-02-19 16:02:29 -0800530 "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 -0700531 "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.
Craig Citroe633be12015-03-02 13:40:36 -0800532 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700533 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800534 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000535 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -0700536 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800537 "message": "A String", # [Output Only] A human-readable description of the warning code.
538 "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.
539 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
540 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700541 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000542 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700543 "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).
Craig Citro065b5302014-08-14 00:47:23 -0700544 },
545 ],
546 },
547 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700548 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800549 "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 -0700550 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
551 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700552 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
553 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
554 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
555 {
556 "message": "A String", # [Output Only] An optional, human-readable error message.
557 "code": "A String", # [Output Only] The error type identifier for this error.
558 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
559 },
560 ],
561 },
562 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
563 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
564 "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.
565 }</pre>
566</div>
567
568<div class="method">
569 <code class="details" id="deleteSignedUrlKey">deleteSignedUrlKey(project, backendService, keyName, requestId=None)</code>
570 <pre>Deletes a key for validating requests with signed URLs for this backend service.
571
572Args:
573 project: string, Project ID for this request. (required)
574 backendService: string, Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. (required)
575 keyName: string, The name of the Signed URL Key to delete. (required)
576 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.
577
578For 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.
579
580The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
581
582Returns:
583 An object of the form:
584
585 { # Represents an Operation resource.
586 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700587 # Google Compute Engine has three Operation resources:
588 #
589 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
590 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700591 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
592 #
593 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700594 # - For global operations, use the `globalOperations` resource.
595 # - For regional operations, use the `regionOperations` resource.
596 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700598 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700599 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
600 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
601 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -0700602 "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 -0700603 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
604 "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 -0700605 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
606 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700607 "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 -0700608 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700609 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700610 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700611 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
612 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
613 {
614 "message": "A String", # [Output Only] A human-readable description of the warning code.
615 "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.
616 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
617 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
618 {
619 "value": "A String", # [Output Only] A warning data value corresponding to the key.
620 "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).
621 },
622 ],
623 },
624 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700625 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700626 "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 -0700627 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
628 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000630 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800631 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700632 {
Craig Citroe633be12015-03-02 13:40:36 -0800633 "message": "A String", # [Output Only] An optional, human-readable error message.
634 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700635 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -0700636 },
637 ],
638 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800639 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -0700640 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800641 "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.
Craig Citro065b5302014-08-14 00:47:23 -0700642 }</pre>
643</div>
644
645<div class="method">
646 <code class="details" id="get">get(project, backendService)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700647 <pre>Returns the specified BackendService resource. Gets a list of available backend services.
Craig Citro065b5302014-08-14 00:47:23 -0700648
649Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800650 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700651 backendService: string, Name of the BackendService resource to return. (required)
652
653Returns:
654 An object of the form:
655
Dan O'Mearadd494642020-05-01 07:42:23 -0700656 { # Represents a Backend Service resource.
657 #
658 # A backend service contains configuration values for Google Cloud Platform load balancing services.
659 #
660 # Backend services in Google Compute Engine can be either regionally or globally scoped.
661 #
662 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
663 #
664 # For more information, read Backend Services.
665 #
666 # (== resource_for {$api_version}.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700667 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700668 "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].
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700669 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800670 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
671 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700672 # 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.
673 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
674 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
675 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
676 # - 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.
677 # - RANDOM: The load balancer selects a random healthy host.
678 # - 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.
679 # - 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 Parrott7d5badb2016-08-16 12:44:29 -0700680 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700681 # This field is applicable to either:
682 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
683 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700684 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700685 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
686 "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.
687 "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 -0700688 "A String",
689 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700690 "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 -0700691 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700692 # 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 -0700693 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700694 # 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 -0700695 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700696 # 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 -0700697 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
698 "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 -0400699 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700700 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
701 "A String",
702 ],
703 "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 -0400704 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
705 "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.
706 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700707 "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 -0400708 "A String",
709 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700710 "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 -0400711 "A String",
712 ],
713 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
714 },
715 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700716 "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.
717 "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 Parrott7d5badb2016-08-16 12:44:29 -0700718 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700719 # This field is applicable to either:
720 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
721 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
722 "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.
723 "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.
724 "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
725 },
726 "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.
727 "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.
728 "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.
729 "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.
730 "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
731 },
732 "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.
733 "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.
734 "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.
735 "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.
736 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
737 "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.
738 "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.
739 },
740 "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).
741 "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 Parrott7d5badb2016-08-16 12:44:29 -0700742 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700743 # This field is applicable to either:
744 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
745 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
746 "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.
747 "path": "A String", # Path to set for the cookie.
748 "name": "A String", # Name of the cookie.
749 "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.
750 "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.
751 "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
752 },
753 },
754 "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.
755 "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.
756 },
757 "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.
758 #
759 # This field is applicable to either:
760 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
761 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
762 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
763 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
764 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
765 "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.
766 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
767 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800768 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700769 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700770 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Craig Citro065b5302014-08-14 00:47:23 -0700771 "backends": [ # The list of backends that serve this BackendService.
772 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -0700773 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -0700774 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700775 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700776 # - 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 -0700777 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700778 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700779 # - 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.
780 #
781 # 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 Parrott36e41bc2016-02-19 16:02:29 -0800782 "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 -0700783 "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 Parrott7d5badb2016-08-16 12:44:29 -0700784 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700785 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
786 "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.
787 "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 -0700788 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700789 # 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.
790 "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 Parrott7d5badb2016-08-16 12:44:29 -0700791 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700792 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700793 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700794 # Not available if the backend's balancingMode is CONNECTION.
795 "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 -0700796 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700797 # 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.
798 "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.
799 #
800 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
801 #
802 # Not available if the backend's balancingMode is CONNECTION.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700803 "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].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700804 #
805 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 "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 Parrott7d5badb2016-08-16 12:44:29 -0700807 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700808 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700809 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 # Not available if the backend's balancingMode is CONNECTION.
811 "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 Parrott7d5badb2016-08-16 12:44:29 -0700812 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700813 # 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.
814 "balancingMode": "A String", # Specifies the balancing mode for the backend.
815 #
816 # 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).
817 #
818 #
819 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
820 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
821 #
822 # 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.
823 #
824 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
825 #
826 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
827 # 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.
828 #
829 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
830 # 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.
Craig Citro065b5302014-08-14 00:47:23 -0700831 },
832 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400833 "iap": { # Identity-Aware Proxy
834 "oauth2ClientId": "A String",
835 "enabled": True or False,
836 "oauth2ClientSecret": "A String",
837 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
838 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700839 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
840 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
841 "A String",
842 ],
843 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
844 "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.
845 #
846 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -0700847 "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 -0700848 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700849 #
850 #
851 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
852 "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.
853 "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.
854 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
855 },
856 "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 -0700857 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
858 "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.
859 "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 -0700860 "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.
861 "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.
862 "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.
863 #
864 # The default is false.
865 "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.
866 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
867 #
868 # The default is false.
869 },
Takashi Matsuo06694102015-09-11 13:55:40 -0700870 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700871 }</pre>
872</div>
873
874<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700875 <code class="details" id="getHealth">getHealth(project, backendService, body=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700876 <pre>Gets the most recent health check results for this BackendService.
877
Dan O'Mearadd494642020-05-01 07:42:23 -0700878Example request body:
879
880{ "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
881
Craig Citro065b5302014-08-14 00:47:23 -0700882Args:
883 project: string, A parameter (required)
884 backendService: string, Name of the BackendService resource to which the queried instance belongs. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700885 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700886 The object takes the form of:
887
888{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700889 "group": "A String", # A URI referencing one of the instance groups or network endpoint groups listed in the backend service.
Craig Citro065b5302014-08-14 00:47:23 -0700890 }
891
892
893Returns:
894 An object of the form:
895
896 {
Takashi Matsuo06694102015-09-11 13:55:40 -0700897 "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 -0700898 "healthStatus": [ # Health state of the backend instances or endpoints in requested instance or network endpoint group, determined based on configured health checks.
Craig Citro065b5302014-08-14 00:47:23 -0700899 {
900 "instance": "A String", # URL of the instance resource.
901 "healthState": "A String", # Health state of the instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700902 "ipAddress": "A String", # A forwarding rule IP address assigned to this instance.
903 "port": 42, # The named port of the instance group, not necessarily the port that is health-checked.
Craig Citro065b5302014-08-14 00:47:23 -0700904 },
905 ],
906 }</pre>
907</div>
908
909<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700910 <code class="details" id="insert">insert(project, body=None, requestId=None)</code>
911 <pre>Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Understanding backend services for more information.
Craig Citro065b5302014-08-14 00:47:23 -0700912
913Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800914 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700915 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -0700916 The object takes the form of:
917
Dan O'Mearadd494642020-05-01 07:42:23 -0700918{ # Represents a Backend Service resource.
919 #
920 # A backend service contains configuration values for Google Cloud Platform load balancing services.
921 #
922 # Backend services in Google Compute Engine can be either regionally or globally scoped.
923 #
924 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
925 #
926 # For more information, read Backend Services.
927 #
928 # (== resource_for {$api_version}.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700929 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -0700930 "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].
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700931 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800932 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
933 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700934 # 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.
935 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
936 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
937 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
938 # - 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.
939 # - RANDOM: The load balancer selects a random healthy host.
940 # - 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.
941 # - 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 Parrott7d5badb2016-08-16 12:44:29 -0700942 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700943 # This field is applicable to either:
944 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
945 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700946 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700947 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
948 "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.
949 "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 -0700950 "A String",
951 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700952 "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 -0700953 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700954 # 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 -0700955 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700956 # 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 -0700957 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700958 # 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 -0700959 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
960 "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 -0400961 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700962 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
963 "A String",
964 ],
965 "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 -0400966 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
967 "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.
968 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -0700969 "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 -0400970 "A String",
971 ],
Dan O'Mearadd494642020-05-01 07:42:23 -0700972 "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 -0400973 "A String",
974 ],
975 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
976 },
977 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700978 "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.
979 "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 Parrott7d5badb2016-08-16 12:44:29 -0700980 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700981 # This field is applicable to either:
982 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
983 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
984 "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.
985 "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.
986 "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
987 },
988 "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.
989 "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.
990 "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.
991 "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.
992 "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
993 },
994 "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.
995 "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.
996 "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.
997 "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.
998 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
999 "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.
1000 "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.
1001 },
1002 "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).
1003 "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 Parrott7d5badb2016-08-16 12:44:29 -07001004 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001005 # This field is applicable to either:
1006 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1007 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1008 "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.
1009 "path": "A String", # Path to set for the cookie.
1010 "name": "A String", # Name of the cookie.
1011 "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.
1012 "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.
1013 "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
1014 },
1015 },
1016 "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.
1017 "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.
1018 },
1019 "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.
1020 #
1021 # This field is applicable to either:
1022 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1023 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1024 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1025 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1026 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1027 "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.
1028 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1029 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001030 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001031 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001032 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Craig Citro065b5302014-08-14 00:47:23 -07001033 "backends": [ # The list of backends that serve this BackendService.
1034 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001035 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001036 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001037 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001038 # - 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 -07001039 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001040 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001041 # - 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.
1042 #
1043 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001044 "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 -07001045 "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 Parrott7d5badb2016-08-16 12:44:29 -07001046 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001047 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1048 "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.
1049 "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 -07001050 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001051 # 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.
1052 "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 Parrott7d5badb2016-08-16 12:44:29 -07001053 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001054 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001055 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001056 # Not available if the backend's balancingMode is CONNECTION.
1057 "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 -07001058 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001059 # 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.
1060 "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.
1061 #
1062 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1063 #
1064 # Not available if the backend's balancingMode is CONNECTION.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001065 "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].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001066 #
1067 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07001068 "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 Parrott7d5badb2016-08-16 12:44:29 -07001069 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001070 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001071 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001072 # Not available if the backend's balancingMode is CONNECTION.
1073 "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 Parrott7d5badb2016-08-16 12:44:29 -07001074 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001075 # 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.
1076 "balancingMode": "A String", # Specifies the balancing mode for the backend.
1077 #
1078 # 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).
1079 #
1080 #
1081 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1082 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1083 #
1084 # 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.
1085 #
1086 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1087 #
1088 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1089 # 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.
1090 #
1091 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1092 # 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.
Craig Citro065b5302014-08-14 00:47:23 -07001093 },
1094 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001095 "iap": { # Identity-Aware Proxy
1096 "oauth2ClientId": "A String",
1097 "enabled": True or False,
1098 "oauth2ClientSecret": "A String",
1099 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1100 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001101 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1102 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1103 "A String",
1104 ],
1105 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1106 "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.
1107 #
1108 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 "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 -07001110 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001111 #
1112 #
1113 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
1114 "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.
1115 "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.
1116 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1117 },
1118 "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 -07001119 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1120 "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.
1121 "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 -07001122 "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.
1123 "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.
1124 "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.
1125 #
1126 # The default is false.
1127 "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.
1128 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
1129 #
1130 # The default is false.
1131 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001132 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -07001133 }
1134
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001135 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.
1136
1137For 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.
1138
1139The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07001140
1141Returns:
1142 An object of the form:
1143
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001144 { # Represents an Operation resource.
1145 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001146 # Google Compute Engine has three Operation resources:
1147 #
1148 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1149 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001150 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1151 #
1152 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001153 # - For global operations, use the `globalOperations` resource.
1154 # - For regional operations, use the `regionOperations` resource.
1155 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001156 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001157 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001158 "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 -07001159 "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 -04001160 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001161 "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 -07001162 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001163 "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 -07001164 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1165 "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 Parrott36e41bc2016-02-19 16:02:29 -08001166 "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 -07001167 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001168 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001169 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001170 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001171 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -07001172 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001173 "message": "A String", # [Output Only] A human-readable description of the warning code.
1174 "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.
1175 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1176 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001177 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001178 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001179 "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).
Craig Citro065b5302014-08-14 00:47:23 -07001180 },
1181 ],
1182 },
1183 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001184 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001185 "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 -07001186 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1187 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001188 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001189 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001190 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001191 {
Craig Citroe633be12015-03-02 13:40:36 -08001192 "message": "A String", # [Output Only] An optional, human-readable error message.
1193 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001194 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -07001195 },
1196 ],
1197 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001198 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001199 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001200 "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.
Craig Citro065b5302014-08-14 00:47:23 -07001201 }</pre>
1202</div>
1203
1204<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001205 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -07001206 <pre>Retrieves the list of BackendService resources available to the specified project.
1207
1208Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001209 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001210 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1211
Dan O'Mearadd494642020-05-01 07:42:23 -07001212You 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001213
Dan O'Mearadd494642020-05-01 07:42:23 -07001214Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1215 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`)
1216 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.
1217 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;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001218
Dan O'Mearadd494642020-05-01 07:42:23 -07001219For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001220
Dan O'Mearadd494642020-05-01 07:42:23 -07001221You 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 Parrott36e41bc2016-02-19 16:02:29 -08001222
Dan O'Mearadd494642020-05-01 07:42:23 -07001223To 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) ```
Craig Citro065b5302014-08-14 00:47:23 -07001224
1225Returns:
1226 An object of the form:
1227
1228 { # Contains a list of BackendService resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001229 "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 -07001230 "kind": "compute#backendServiceList", # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
Craig Citroe633be12015-03-02 13:40:36 -08001231 "items": [ # A list of BackendService resources.
Dan O'Mearadd494642020-05-01 07:42:23 -07001232 { # Represents a Backend Service resource.
1233 #
1234 # A backend service contains configuration values for Google Cloud Platform load balancing services.
1235 #
1236 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1237 #
1238 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1239 #
1240 # For more information, read Backend Services.
1241 #
1242 # (== resource_for {$api_version}.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001243 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -07001244 "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].
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001245 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001246 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1247 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001248 # 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.
1249 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
1250 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1251 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1252 # - 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.
1253 # - RANDOM: The load balancer selects a random healthy host.
1254 # - 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.
1255 # - 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 Parrott7d5badb2016-08-16 12:44:29 -07001256 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001257 # This field is applicable to either:
1258 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1259 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001260 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001261 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
1262 "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.
1263 "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 -07001264 "A String",
1265 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001266 "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 -07001267 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001268 # 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 -07001269 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001270 # 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 -07001271 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001272 # 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 -07001273 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1274 "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 -04001275 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001276 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1277 "A String",
1278 ],
1279 "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 -04001280 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1281 "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.
1282 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -07001283 "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 -04001284 "A String",
1285 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001286 "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 -04001287 "A String",
1288 ],
1289 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1290 },
1291 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001292 "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.
1293 "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 Parrott7d5badb2016-08-16 12:44:29 -07001294 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001295 # This field is applicable to either:
1296 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1297 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1298 "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.
1299 "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.
1300 "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
1301 },
1302 "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.
1303 "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.
1304 "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.
1305 "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.
1306 "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
1307 },
1308 "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.
1309 "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.
1310 "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.
1311 "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.
1312 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1313 "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.
1314 "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.
1315 },
1316 "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).
1317 "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 Parrott7d5badb2016-08-16 12:44:29 -07001318 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001319 # This field is applicable to either:
1320 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1321 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1322 "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.
1323 "path": "A String", # Path to set for the cookie.
1324 "name": "A String", # Name of the cookie.
1325 "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.
1326 "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.
1327 "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
1328 },
1329 },
1330 "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.
1331 "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.
1332 },
1333 "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.
1334 #
1335 # This field is applicable to either:
1336 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1337 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1338 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1339 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1340 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1341 "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.
1342 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1343 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001344 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001345 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Craig Citro065b5302014-08-14 00:47:23 -07001347 "backends": [ # The list of backends that serve this BackendService.
1348 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001349 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001350 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001351 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001352 # - 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 -07001353 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001354 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001355 # - 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.
1356 #
1357 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001358 "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 -07001359 "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 Parrott7d5badb2016-08-16 12:44:29 -07001360 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001361 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1362 "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.
1363 "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 -07001364 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001365 # 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.
1366 "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 Parrott7d5badb2016-08-16 12:44:29 -07001367 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001368 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001369 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001370 # Not available if the backend's balancingMode is CONNECTION.
1371 "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 -07001372 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001373 # 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.
1374 "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.
1375 #
1376 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1377 #
1378 # Not available if the backend's balancingMode is CONNECTION.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001379 "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].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001380 #
1381 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07001382 "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 Parrott7d5badb2016-08-16 12:44:29 -07001383 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001384 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001385 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001386 # Not available if the backend's balancingMode is CONNECTION.
1387 "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 Parrott7d5badb2016-08-16 12:44:29 -07001388 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001389 # 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.
1390 "balancingMode": "A String", # Specifies the balancing mode for the backend.
1391 #
1392 # 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).
1393 #
1394 #
1395 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1396 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1397 #
1398 # 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.
1399 #
1400 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1401 #
1402 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1403 # 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.
1404 #
1405 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1406 # 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.
Craig Citro065b5302014-08-14 00:47:23 -07001407 },
1408 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001409 "iap": { # Identity-Aware Proxy
1410 "oauth2ClientId": "A String",
1411 "enabled": True or False,
1412 "oauth2ClientSecret": "A String",
1413 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1414 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001415 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1416 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1417 "A String",
1418 ],
1419 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1420 "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.
1421 #
1422 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001423 "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 -07001424 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001425 #
1426 #
1427 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
1428 "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.
1429 "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.
1430 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1431 },
1432 "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 -07001433 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1434 "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.
1435 "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 -07001436 "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.
1437 "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.
1438 "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.
1439 #
1440 # The default is false.
1441 "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.
1442 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
1443 #
1444 # The default is false.
1445 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001446 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -07001447 },
1448 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001449 "warning": { # [Output Only] Informational warning message.
1450 "message": "A String", # [Output Only] A human-readable description of the warning code.
1451 "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.
1452 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1453 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1454 {
1455 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1456 "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).
1457 },
1458 ],
1459 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001460 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07001461 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Craig Citro065b5302014-08-14 00:47:23 -07001462 }</pre>
1463</div>
1464
1465<div class="method">
1466 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1467 <pre>Retrieves the next page of results.
1468
1469Args:
1470 previous_request: The request for the previous page. (required)
1471 previous_response: The response from the request for the previous page. (required)
1472
1473Returns:
1474 A request object that you can call 'execute()' on to request the next
1475 page. Returns None if there are no more items in the collection.
1476 </pre>
1477</div>
1478
1479<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 <code class="details" id="patch">patch(project, backendService, body=None, requestId=None)</code>
1481 <pre>Patches the specified 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.
Craig Citro065b5302014-08-14 00:47:23 -07001482
1483Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001484 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001485 backendService: string, Name of the BackendService resource to patch. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001486 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07001487 The object takes the form of:
1488
Dan O'Mearadd494642020-05-01 07:42:23 -07001489{ # Represents a Backend Service resource.
1490 #
1491 # A backend service contains configuration values for Google Cloud Platform load balancing services.
1492 #
1493 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1494 #
1495 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1496 #
1497 # For more information, read Backend Services.
1498 #
1499 # (== resource_for {$api_version}.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001500 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -07001501 "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].
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001502 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001503 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1504 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001505 # 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.
1506 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
1507 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1508 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1509 # - 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.
1510 # - RANDOM: The load balancer selects a random healthy host.
1511 # - 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.
1512 # - 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 Parrott7d5badb2016-08-16 12:44:29 -07001513 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001514 # This field is applicable to either:
1515 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1516 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001517 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001518 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
1519 "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.
1520 "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 -07001521 "A String",
1522 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001523 "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 -07001524 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001525 # 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 -07001526 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001527 # 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 -07001528 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001529 # 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 -07001530 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1531 "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 -04001532 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001533 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1534 "A String",
1535 ],
1536 "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 -04001537 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1538 "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.
1539 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -07001540 "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 -04001541 "A String",
1542 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001543 "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 -04001544 "A String",
1545 ],
1546 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1547 },
1548 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001549 "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.
1550 "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 Parrott7d5badb2016-08-16 12:44:29 -07001551 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001552 # This field is applicable to either:
1553 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1554 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1555 "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.
1556 "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.
1557 "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
1558 },
1559 "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.
1560 "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.
1561 "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.
1562 "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.
1563 "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
1564 },
1565 "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.
1566 "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.
1567 "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.
1568 "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.
1569 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1570 "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.
1571 "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.
1572 },
1573 "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).
1574 "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 Parrott7d5badb2016-08-16 12:44:29 -07001575 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001576 # This field is applicable to either:
1577 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1578 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1579 "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.
1580 "path": "A String", # Path to set for the cookie.
1581 "name": "A String", # Name of the cookie.
1582 "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.
1583 "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.
1584 "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
1585 },
1586 },
1587 "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.
1588 "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.
1589 },
1590 "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.
1591 #
1592 # This field is applicable to either:
1593 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1594 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1595 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1596 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1597 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1598 "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.
1599 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1600 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001601 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001602 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001603 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Craig Citro065b5302014-08-14 00:47:23 -07001604 "backends": [ # The list of backends that serve this BackendService.
1605 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001606 "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.
Takashi Matsuo06694102015-09-11 13:55:40 -07001607 #
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001608 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001609 # - 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 -07001610 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001611 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001612 # - 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.
1613 #
1614 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001615 "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 -07001616 "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 Parrott7d5badb2016-08-16 12:44:29 -07001617 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001618 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1619 "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.
1620 "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 -07001621 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001622 # 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.
1623 "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 Parrott7d5badb2016-08-16 12:44:29 -07001624 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001625 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001626 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001627 # Not available if the backend's balancingMode is CONNECTION.
1628 "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 -07001629 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001630 # 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.
1631 "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.
1632 #
1633 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
1634 #
1635 # Not available if the backend's balancingMode is CONNECTION.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001636 "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].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001637 #
1638 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07001639 "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 Parrott7d5badb2016-08-16 12:44:29 -07001640 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001641 # 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.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001642 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001643 # Not available if the backend's balancingMode is CONNECTION.
1644 "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 Parrott7d5badb2016-08-16 12:44:29 -07001645 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001646 # 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.
1647 "balancingMode": "A String", # Specifies the balancing mode for the backend.
1648 #
1649 # 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).
1650 #
1651 #
1652 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
1653 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
1654 #
1655 # 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.
1656 #
1657 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
1658 #
1659 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
1660 # 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.
1661 #
1662 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
1663 # 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.
Craig Citro065b5302014-08-14 00:47:23 -07001664 },
1665 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001666 "iap": { # Identity-Aware Proxy
1667 "oauth2ClientId": "A String",
1668 "enabled": True or False,
1669 "oauth2ClientSecret": "A String",
1670 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1671 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001672 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1673 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1674 "A String",
1675 ],
1676 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1677 "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.
1678 #
1679 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07001680 "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 -07001681 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001682 #
1683 #
1684 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
1685 "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.
1686 "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.
1687 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
1688 },
1689 "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 -07001690 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1691 "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.
1692 "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 -07001693 "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.
1694 "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.
1695 "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.
1696 #
1697 # The default is false.
1698 "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.
1699 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
1700 #
1701 # The default is false.
1702 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001703 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -07001704 }
1705
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001706 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.
1707
1708For 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.
1709
1710The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07001711
1712Returns:
1713 An object of the form:
1714
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001715 { # Represents an Operation resource.
1716 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001717 # Google Compute Engine has three Operation resources:
1718 #
1719 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1720 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001721 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1722 #
1723 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001724 # - For global operations, use the `globalOperations` resource.
1725 # - For regional operations, use the `regionOperations` resource.
1726 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001728 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001729 "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 -07001730 "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 -04001731 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001732 "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 -07001733 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001734 "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 -07001735 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1736 "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 Parrott36e41bc2016-02-19 16:02:29 -08001737 "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 -07001738 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001739 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001740 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001741 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001742 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -07001743 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001744 "message": "A String", # [Output Only] A human-readable description of the warning code.
1745 "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.
1746 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1747 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001748 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001749 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001750 "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).
Craig Citro065b5302014-08-14 00:47:23 -07001751 },
1752 ],
1753 },
1754 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001755 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001756 "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 -07001757 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1758 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001759 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001760 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001761 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001762 {
Craig Citroe633be12015-03-02 13:40:36 -08001763 "message": "A String", # [Output Only] An optional, human-readable error message.
1764 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001765 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -07001766 },
1767 ],
1768 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001769 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07001770 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001771 "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.
Craig Citro065b5302014-08-14 00:47:23 -07001772 }</pre>
1773</div>
1774
1775<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001776 <code class="details" id="setSecurityPolicy">setSecurityPolicy(project, backendService, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001777 <pre>Sets the security policy for the specified backend service.
Craig Citro065b5302014-08-14 00:47:23 -07001778
1779Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001780 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001781 backendService: string, Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001782 body: object, The request body.
Craig Citro065b5302014-08-14 00:47:23 -07001783 The object takes the form of:
1784
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001785{
1786 "securityPolicy": "A String",
Craig Citro065b5302014-08-14 00:47:23 -07001787 }
1788
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001789 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.
1790
1791For 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.
1792
1793The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Craig Citro065b5302014-08-14 00:47:23 -07001794
1795Returns:
1796 An object of the form:
1797
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001798 { # Represents an Operation resource.
1799 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001800 # Google Compute Engine has three Operation resources:
1801 #
1802 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1803 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001804 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1805 #
1806 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001807 # - For global operations, use the `globalOperations` resource.
1808 # - For regional operations, use the `regionOperations` resource.
1809 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001810 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001811 # 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 Parrott36e41bc2016-02-19 16:02:29 -08001812 "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 -07001813 "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 -04001814 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07001815 "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 -07001816 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001817 "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 -07001818 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1819 "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 Parrott36e41bc2016-02-19 16:02:29 -08001820 "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 -07001821 "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.
Craig Citroe633be12015-03-02 13:40:36 -08001822 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07001823 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001824 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001825 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
Craig Citro065b5302014-08-14 00:47:23 -07001826 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001827 "message": "A String", # [Output Only] A human-readable description of the warning code.
1828 "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.
1829 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1830 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001831 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001832 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001833 "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).
Craig Citro065b5302014-08-14 00:47:23 -07001834 },
1835 ],
1836 },
1837 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001838 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001839 "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 -07001840 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1841 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001842 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1843 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1844 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1845 {
1846 "message": "A String", # [Output Only] An optional, human-readable error message.
1847 "code": "A String", # [Output Only] The error type identifier for this error.
1848 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1849 },
1850 ],
1851 },
1852 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1853 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1854 "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.
1855 }</pre>
1856</div>
1857
1858<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001859 <code class="details" id="update">update(project, backendService, body=None, requestId=None)</code>
1860 <pre>Updates the specified 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001861
1862Args:
1863 project: string, Project ID for this request. (required)
1864 backendService: string, Name of the BackendService resource to update. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001865 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001866 The object takes the form of:
1867
Dan O'Mearadd494642020-05-01 07:42:23 -07001868{ # Represents a Backend Service resource.
1869 #
1870 # A backend service contains configuration values for Google Cloud Platform load balancing services.
1871 #
1872 # Backend services in Google Compute Engine can be either regionally or globally scoped.
1873 #
1874 # * [Global](/compute/docs/reference/rest/{$api_version}/backendServices) * [Regional](/compute/docs/reference/rest/{$api_version}/regionBackendServices)
1875 #
1876 # For more information, read Backend Services.
1877 #
1878 # (== resource_for {$api_version}.backendService ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001879 "connectionDraining": { # Message containing connection draining configuration.
Dan O'Mearadd494642020-05-01 07:42:23 -07001880 "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].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001881 },
1882 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1883 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001884 # 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.
1885 "localityLbPolicy": "A String", # The load balancing algorithm used within the scope of the locality. The possible values are:
1886 # - ROUND_ROBIN: This is a simple policy in which each healthy backend is selected in round robin order. This is the default.
1887 # - LEAST_REQUEST: An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests.
1888 # - 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.
1889 # - RANDOM: The load balancer selects a random healthy host.
1890 # - 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.
1891 # - 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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001892 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001893 # This field is applicable to either:
1894 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1895 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001896 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001897 # If sessionAffinity is not NONE, and this field is not set to &gt;MAGLEV or RING_HASH, session affinity settings will not take effect.
1898 "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.
1899 "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 -07001900 "A String",
1901 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001902 "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 -07001903 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001904 # 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 -07001905 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001906 # 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 -07001907 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001908 # 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 -07001909 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1910 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1911 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
1912 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1913 "A String",
1914 ],
1915 "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.
1916 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1917 "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.
1918 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
Dan O'Mearadd494642020-05-01 07:42:23 -07001919 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001920 "A String",
1921 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001922 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001923 "A String",
1924 ],
1925 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1926 },
1927 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001928 "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.
1929 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001931 # This field is applicable to either:
1932 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1933 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1934 "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.
1935 "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.
1936 "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
1937 },
1938 "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.
1939 "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.
1940 "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.
1941 "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.
1942 "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
1943 },
1944 "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.
1945 "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.
1946 "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.
1947 "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.
1948 "maxEjectionPercent": 42, # Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 50%.
1949 "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.
1950 "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.
1951 },
1952 "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).
1953 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001954 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001955 # This field is applicable to either:
1956 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1957 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1958 "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.
1959 "path": "A String", # Path to set for the cookie.
1960 "name": "A String", # Name of the cookie.
1961 "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.
1962 "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.
1963 "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
1964 },
1965 },
1966 "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.
1967 "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.
1968 },
1969 "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.
1970 #
1971 # This field is applicable to either:
1972 # - A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2, and load_balancing_scheme set to INTERNAL_MANAGED.
1973 # - A global backend service with the load_balancing_scheme set to INTERNAL_SELF_MANAGED.
1974 "maxRequests": 42, # The maximum number of parallel requests that allowed to the backend service. If not specified, there is no limit.
1975 "maxRetries": 42, # The maximum number of parallel retries allowed to the backend cluster. If not specified, the default is 1.
1976 "maxPendingRequests": 42, # The maximum number of pending requests allowed to the backend service. If not specified, there is no limit.
1977 "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.
1978 "maxConnections": 42, # The maximum number of connections to the backend service. If not specified, there is no limit.
1979 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1981 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001982 # This cannot be used if the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001983 "backends": [ # The list of backends that serve this BackendService.
1984 { # Message containing information of one individual backend.
Dan O'Mearadd494642020-05-01 07:42:23 -07001985 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001986 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001987 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001988 # - 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 -07001989 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001990 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001991 # - 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.
1992 #
1993 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001994 "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 -07001995 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001996 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001997 # This parameter can be used in conjunction with maxRate, maxRatePerInstance, maxConnections (except for regional managed instance groups), or maxConnectionsPerInstance.
1998 "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.
1999 "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 -07002000 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002001 # 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.
2002 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002003 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002004 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002005 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 # Not available if the backend's balancingMode is CONNECTION.
2007 "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 -07002008 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002009 # 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.
2010 "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.
2011 #
2012 # If the backend's balancingMode is RATE, you must specify either this parameter, maxRate (except for regional managed instance groups), or maxRatePerInstance.
2013 #
2014 # Not available if the backend's balancingMode is CONNECTION.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002015 "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].
2016 #
2017 # This cannot be used for internal load balancing.
Dan O'Mearadd494642020-05-01 07:42:23 -07002018 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002019 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002020 # 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002021 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002022 # Not available if the backend's balancingMode is CONNECTION.
2023 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002024 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002025 # 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.
2026 "balancingMode": "A String", # Specifies the balancing mode for the backend.
2027 #
2028 # 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).
2029 #
2030 #
2031 # - If the load balancing mode is CONNECTION, then the load is spread based on how many concurrent connections the backend can handle.
2032 # You can use the CONNECTION balancing mode if the protocol for the backend service is SSL, TCP, or UDP.
2033 #
2034 # 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.
2035 #
2036 # If the loadBalancingScheme for the backend service is INTERNAL (internal TCP/UDP load balancers), you cannot specify any additional parameters.
2037 #
2038 # - If the load balancing mode is RATE, the load is spread based on the rate of HTTP requests per second (RPS).
2039 # 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.
2040 #
2041 # - If the load balancing mode is UTILIZATION, the load is spread based on the backend utilization of instances in an instance group.
2042 # You can use the UTILIZATION balancing mode if the loadBalancingScheme of the backend service is EXTERNAL, INTERNAL_SELF_MANAGED, or INTERNAL_MANAGED and the backends are instance groups. There are no restrictions on the backend service protocol.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002043 },
2044 ],
2045 "iap": { # Identity-Aware Proxy
2046 "oauth2ClientId": "A String",
2047 "enabled": True or False,
2048 "oauth2ClientSecret": "A String",
2049 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
2050 },
2051 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
2052 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
2053 "A String",
2054 ],
2055 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
2056 "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.
2057 #
2058 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
Dan O'Mearadd494642020-05-01 07:42:23 -07002059 "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 -07002060 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002061 #
2062 #
2063 # Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Blaancing).
2064 "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.
2065 "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.
2066 "enable": True or False, # This field denotes whether to enable logging for the load balancer traffic served by this backend service.
2067 },
2068 "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 -07002069 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
2070 "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.
2071 "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 -07002072 "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.
2073 "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.
2074 "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.
2075 #
2076 # The default is false.
2077 "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.
2078 "disableConnectionDrainOnFailover": True or False, # This can be set to true only if the protocol is TCP.
2079 #
2080 # The default is false.
2081 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002082 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
2083 }
2084
2085 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.
2086
2087For 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.
2088
2089The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2090
2091Returns:
2092 An object of the form:
2093
2094 { # Represents an Operation resource.
2095 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002096 # Google Compute Engine has three Operation resources:
2097 #
2098 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2099 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002100 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2101 #
2102 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002103 # - For global operations, use the `globalOperations` resource.
2104 # - For regional operations, use the `regionOperations` resource.
2105 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002106 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002107 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002108 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2109 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2110 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Dan O'Mearadd494642020-05-01 07:42:23 -07002111 "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 -07002112 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2113 "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 -07002114 "operationType": "A String", # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2115 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 "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 -07002117 "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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002119 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002120 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
2121 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2122 {
2123 "message": "A String", # [Output Only] A human-readable description of the warning code.
2124 "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.
2125 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
2126 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
2127 {
2128 "value": "A String", # [Output Only] A warning data value corresponding to the key.
2129 "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).
2130 },
2131 ],
2132 },
2133 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002134 "user": "A String", # [Output Only] User who requested the operation, for example: `user@example.com`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002135 "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 -07002136 "kind": "compute#operation", # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2137 "name": "A String", # [Output Only] Name of the operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002138 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00002139 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08002140 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07002141 {
Craig Citroe633be12015-03-02 13:40:36 -08002142 "message": "A String", # [Output Only] An optional, human-readable error message.
2143 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07002144 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
Craig Citro065b5302014-08-14 00:47:23 -07002145 },
2146 ],
2147 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002148 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
Takashi Matsuo06694102015-09-11 13:55:40 -07002149 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08002150 "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.
Craig Citro065b5302014-08-14 00:47:23 -07002151 }</pre>
2152</div>
2153
2154</body></html>