blob: bea3987538c107f2c6517f4cf268e85c0a3bf833 [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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#addSignedUrlKey">addSignedUrlKey(project, backendService, body, requestId=None)</a></code></p>
79<p class="firstline">Adds a key for validating requests with signed URLs for this backend service.</p>
80<p class="toc_element">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -080081 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p>
82<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">
96 <code><a href="#getHealth">getHealth(project, backendService, body)</a></code></p>
97<p class="firstline">Gets the most recent health check results for this BackendService.</p>
98<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070099 <code><a href="#insert">insert(project, body, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100<p class="firstline">Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.</p>
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">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 <code><a href="#patch">patch(project, backendService, body, requestId=None)</a></code></p>
109<p class="firstline">Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700110<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700111 <code><a href="#setSecurityPolicy">setSecurityPolicy(project, backendService, body, requestId=None)</a></code></p>
112<p class="firstline">Sets the security policy for the specified backend service.</p>
113<p class="toc_element">
114 <code><a href="#update">update(project, backendService, body, requestId=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700115<p class="firstline">Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.</p>
Craig Citro065b5302014-08-14 00:47:23 -0700116<h3>Method Details</h3>
117<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700118 <code class="details" id="addSignedUrlKey">addSignedUrlKey(project, backendService, body, requestId=None)</code>
119 <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)
124 body: object, The request body. (required)
125 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 #
143 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
144 #
145 # Operations can be global, regional or zonal.
146 # - For global operations, use the globalOperations resource.
147 # - For regional operations, use the regionOperations resource.
148 # - For zonal operations, use the zonalOperations resource.
149 #
150 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
151 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
152 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
153 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
154 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
155 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
156 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
157 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
158 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
159 "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.
160 "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.
161 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
162 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
163 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
164 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
165 {
166 "message": "A String", # [Output Only] A human-readable description of the warning code.
167 "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.
168 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
169 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
170 {
171 "value": "A String", # [Output Only] A warning data value corresponding to the key.
172 "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).
173 },
174 ],
175 },
176 ],
177 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
178 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
179 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
180 "name": "A String", # [Output Only] Name of the resource.
181 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
182 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
183 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
184 {
185 "message": "A String", # [Output Only] An optional, human-readable error message.
186 "code": "A String", # [Output Only] The error type identifier for this error.
187 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
188 },
189 ],
190 },
191 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
192 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
193 "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.
194 }</pre>
195</div>
196
197<div class="method">
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800198 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
199 <pre>Retrieves the list of all BackendService resources, regional and global, available to the specified project.
200
201Args:
202 project: string, Name of the project scoping this request. (required)
203 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
204
205You 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.
206
207Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400208 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)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800209 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 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 =, !=, >, or <.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800211
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700212For 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 -0800213
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214You 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 -0800215
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700216To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake"). By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. For example, (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.automaticRestart = true).
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800217
218Returns:
219 An object of the form:
220
221 { # Contains a list of BackendServicesScopedList.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700222 "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.
223 "kind": "compute#backendServiceAggregatedList", # Type of resource.
224 "items": { # A list of BackendServicesScopedList resources.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800225 "a_key": { # Name of the scope containing this set of BackendServices.
226 "warning": { # Informational warning which replaces the list of backend services when the list is empty.
227 "message": "A String", # [Output Only] A human-readable description of the warning code.
228 "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.
229 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
230 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
231 {
232 "value": "A String", # [Output Only] A warning data value corresponding to the key.
233 "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).
234 },
235 ],
236 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700237 "backendServices": [ # A list of BackendServices contained in this scope.
238 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800239 "connectionDraining": { # Message containing connection draining configuration.
240 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
241 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800242 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
243 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400244 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800245 #
246 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
248 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
249 #
250 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
251 "A String",
252 ],
253 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
254 #
255 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
256 #
257 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
258 #
259 # When the protocol is UDP, this field is not used.
260 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
261 "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 -0400262 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
264 "A String",
265 ],
266 "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 -0400267 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
268 "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.
269 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
270 "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. '&' and '=' will be percent encoded and not treated as delimiters.
271 "A String",
272 ],
273 "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. '&' and '=' will be percent encoded and not treated as delimiters.
274 "A String",
275 ],
276 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
277 },
278 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800279 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
280 #
281 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800282 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
283 #
284 # When the load balancing scheme is INTERNAL, this field is not used.
285 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
286 #
287 # This cannot be used for internal load balancing.
288 "backends": [ # The list of backends that serve this BackendService.
289 { # Message containing information of one individual backend.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700290 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800291 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800293 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
295 #
296 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
297 #
298 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800299 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
300 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
301 #
302 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700303 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
304 #
305 # This cannot be used for internal load balancing.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400306 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800307 #
308 # This cannot be used for internal load balancing.
309 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
310 #
311 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700312 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
313 #
314 # This cannot be used for internal load balancing.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800315 "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].
316 #
317 # This cannot be used for internal load balancing.
318 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
319 #
320 # This cannot be used for internal load balancing.
321 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
322 #
323 # This cannot be used for internal load balancing.
324 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
325 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700326 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800327 },
328 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400329 "iap": { # Identity-Aware Proxy
330 "oauth2ClientId": "A String",
331 "enabled": True or False,
332 "oauth2ClientSecret": "A String",
333 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
334 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700335 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
336 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
337 "A String",
338 ],
339 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
340 "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.
341 #
342 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
343 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
344 #
345 # When the load balancing scheme is INTERNAL, this field is not used.
346 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
347 "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.
348 "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.
349 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800350 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800351 },
352 ],
353 },
354 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700355 "warning": { # [Output Only] Informational warning message.
356 "message": "A String", # [Output Only] A human-readable description of the warning code.
357 "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.
358 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
359 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
360 {
361 "value": "A String", # [Output Only] A warning data value corresponding to the key.
362 "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).
363 },
364 ],
365 },
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800366 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
367 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
368 }</pre>
369</div>
370
371<div class="method">
372 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
373 <pre>Retrieves the next page of results.
374
375Args:
376 previous_request: The request for the previous page. (required)
377 previous_response: The response from the request for the previous page. (required)
378
379Returns:
380 A request object that you can call 'execute()' on to request the next
381 page. Returns None if there are no more items in the collection.
382 </pre>
383</div>
384
385<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700386 <code class="details" id="delete">delete(project, backendService, requestId=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700387 <pre>Deletes the specified BackendService resource.
388
389Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800390 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700391 backendService: string, Name of the BackendService resource to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700392 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.
393
394For 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.
395
396The 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 -0700397
398Returns:
399 An object of the form:
400
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 { # Represents an Operation resource.
402 #
403 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
404 #
405 # Operations can be global, regional or zonal.
406 # - For global operations, use the globalOperations resource.
407 # - For regional operations, use the regionOperations resource.
408 # - For zonal operations, use the zonalOperations resource.
409 #
410 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800411 "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 -0700412 "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 -0400413 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800414 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700415 "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 -0800416 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
417 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000418 "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 -0800419 "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.
420 "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 -0800421 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800422 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
423 "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 +0000424 "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 -0700425 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800426 "message": "A String", # [Output Only] A human-readable description of the warning code.
427 "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.
428 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
429 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700430 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000431 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700432 "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 -0700433 },
434 ],
435 },
436 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000437 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800438 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
439 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000440 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700441 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
442 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
443 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
444 {
445 "message": "A String", # [Output Only] An optional, human-readable error message.
446 "code": "A String", # [Output Only] The error type identifier for this error.
447 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
448 },
449 ],
450 },
451 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
452 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
453 "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.
454 }</pre>
455</div>
456
457<div class="method">
458 <code class="details" id="deleteSignedUrlKey">deleteSignedUrlKey(project, backendService, keyName, requestId=None)</code>
459 <pre>Deletes a key for validating requests with signed URLs for this backend service.
460
461Args:
462 project: string, Project ID for this request. (required)
463 backendService: string, Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. (required)
464 keyName: string, The name of the Signed URL Key to delete. (required)
465 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.
466
467For 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.
468
469The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
470
471Returns:
472 An object of the form:
473
474 { # Represents an Operation resource.
475 #
476 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
477 #
478 # Operations can be global, regional or zonal.
479 # - For global operations, use the globalOperations resource.
480 # - For regional operations, use the regionOperations resource.
481 # - For zonal operations, use the zonalOperations resource.
482 #
483 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
484 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
485 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
486 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
487 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
488 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
489 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
490 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
491 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
492 "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.
493 "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.
494 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
495 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
496 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
497 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
498 {
499 "message": "A String", # [Output Only] A human-readable description of the warning code.
500 "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.
501 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
502 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
503 {
504 "value": "A String", # [Output Only] A warning data value corresponding to the key.
505 "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).
506 },
507 ],
508 },
509 ],
510 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
511 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
512 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
513 "name": "A String", # [Output Only] Name of the resource.
514 "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 +0000515 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800516 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700517 {
Craig Citroe633be12015-03-02 13:40:36 -0800518 "message": "A String", # [Output Only] An optional, human-readable error message.
519 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700520 "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 -0700521 },
522 ],
523 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800524 "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 -0700525 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800526 "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 -0700527 }</pre>
528</div>
529
530<div class="method">
531 <code class="details" id="get">get(project, backendService)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700532 <pre>Returns the specified BackendService resource. Gets a list of available backend services.
Craig Citro065b5302014-08-14 00:47:23 -0700533
534Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800535 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700536 backendService: string, Name of the BackendService resource to return. (required)
537
538Returns:
539 An object of the form:
540
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700542 "connectionDraining": { # Message containing connection draining configuration.
543 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
544 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800545 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
546 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400547 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700548 #
549 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700550 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
551 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
552 #
553 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
554 "A String",
555 ],
556 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
557 #
558 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
559 #
560 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
561 #
562 # When the protocol is UDP, this field is not used.
563 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
564 "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 -0400565 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700566 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
567 "A String",
568 ],
569 "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 -0400570 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
571 "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.
572 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
573 "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. '&' and '=' will be percent encoded and not treated as delimiters.
574 "A String",
575 ],
576 "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. '&' and '=' will be percent encoded and not treated as delimiters.
577 "A String",
578 ],
579 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
580 },
581 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700582 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
583 #
584 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700585 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
586 #
587 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800588 "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 -0700589 #
590 # This cannot be used for internal load balancing.
Craig Citro065b5302014-08-14 00:47:23 -0700591 "backends": [ # The list of backends that serve this BackendService.
592 { # Message containing information of one individual backend.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700593 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700594 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700595 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700596 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700597 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
598 #
599 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
600 #
601 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800602 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700603 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700604 #
605 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700606 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
607 #
608 # This cannot be used for internal load balancing.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400609 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700610 #
611 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700612 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
613 #
614 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700615 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
616 #
617 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700618 "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 -0700619 #
620 # This cannot be used for internal load balancing.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800621 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700622 #
623 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700624 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
625 #
626 # This cannot be used for internal load balancing.
627 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700628 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700629 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
Craig Citro065b5302014-08-14 00:47:23 -0700630 },
631 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400632 "iap": { # Identity-Aware Proxy
633 "oauth2ClientId": "A String",
634 "enabled": True or False,
635 "oauth2ClientSecret": "A String",
636 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
637 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700638 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
639 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
640 "A String",
641 ],
642 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
643 "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.
644 #
645 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
646 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
647 #
648 # When the load balancing scheme is INTERNAL, this field is not used.
649 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
650 "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.
651 "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.
652 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
Takashi Matsuo06694102015-09-11 13:55:40 -0700653 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700654 }</pre>
655</div>
656
657<div class="method">
658 <code class="details" id="getHealth">getHealth(project, backendService, body)</code>
659 <pre>Gets the most recent health check results for this BackendService.
660
661Args:
662 project: string, A parameter (required)
663 backendService: string, Name of the BackendService resource to which the queried instance belongs. (required)
664 body: object, The request body. (required)
665 The object takes the form of:
666
667{
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700668 "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 -0700669 }
670
671
672Returns:
673 An object of the form:
674
675 {
Takashi Matsuo06694102015-09-11 13:55:40 -0700676 "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 -0700677 "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 -0700678 {
679 "instance": "A String", # URL of the instance resource.
680 "healthState": "A String", # Health state of the instance.
681 "ipAddress": "A String", # The IP address represented by this resource.
Craig Citro0e5b9bf2014-10-15 10:26:14 -0700682 "port": 42, # The port on the instance.
Craig Citro065b5302014-08-14 00:47:23 -0700683 },
684 ],
685 }</pre>
686</div>
687
688<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700689 <code class="details" id="insert">insert(project, body, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800690 <pre>Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information.
Craig Citro065b5302014-08-14 00:47:23 -0700691
692Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800693 project: string, Project ID for this request. (required)
Craig Citro065b5302014-08-14 00:47:23 -0700694 body: object, The request body. (required)
695 The object takes the form of:
696
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700697{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700698 "connectionDraining": { # Message containing connection draining configuration.
699 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
700 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800701 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
702 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400703 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700704 #
705 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700706 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
707 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
708 #
709 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
710 "A String",
711 ],
712 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
713 #
714 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
715 #
716 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
717 #
718 # When the protocol is UDP, this field is not used.
719 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
720 "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 -0400721 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700722 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
723 "A String",
724 ],
725 "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 -0400726 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
727 "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.
728 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
729 "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. '&' and '=' will be percent encoded and not treated as delimiters.
730 "A String",
731 ],
732 "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. '&' and '=' will be percent encoded and not treated as delimiters.
733 "A String",
734 ],
735 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
736 },
737 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700738 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
739 #
740 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700741 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
742 #
743 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800744 "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 -0700745 #
746 # This cannot be used for internal load balancing.
Craig Citro065b5302014-08-14 00:47:23 -0700747 "backends": [ # The list of backends that serve this BackendService.
748 { # Message containing information of one individual backend.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700749 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700750 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700751 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700752 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
754 #
755 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
756 #
757 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800758 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700759 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700760 #
761 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700762 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
763 #
764 # This cannot be used for internal load balancing.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400765 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700766 #
767 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700768 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
769 #
770 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700771 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
772 #
773 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700774 "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 -0700775 #
776 # This cannot be used for internal load balancing.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800777 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700778 #
779 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700780 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
781 #
782 # This cannot be used for internal load balancing.
783 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700784 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700785 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
Craig Citro065b5302014-08-14 00:47:23 -0700786 },
787 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400788 "iap": { # Identity-Aware Proxy
789 "oauth2ClientId": "A String",
790 "enabled": True or False,
791 "oauth2ClientSecret": "A String",
792 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
793 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700794 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
795 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
796 "A String",
797 ],
798 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
799 "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.
800 #
801 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
802 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
803 #
804 # When the load balancing scheme is INTERNAL, this field is not used.
805 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
806 "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.
807 "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.
808 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
Takashi Matsuo06694102015-09-11 13:55:40 -0700809 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -0700810 }
811
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700812 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.
813
814For 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.
815
816The 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 -0700817
818Returns:
819 An object of the form:
820
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700821 { # Represents an Operation resource.
822 #
823 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
824 #
825 # Operations can be global, regional or zonal.
826 # - For global operations, use the globalOperations resource.
827 # - For regional operations, use the regionOperations resource.
828 # - For zonal operations, use the zonalOperations resource.
829 #
830 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800831 "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 -0700832 "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 -0400833 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800834 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700835 "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 -0800836 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
837 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000838 "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 -0800839 "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.
840 "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 -0800841 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800842 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
843 "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 +0000844 "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 -0700845 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800846 "message": "A String", # [Output Only] A human-readable description of the warning code.
847 "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.
848 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
849 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -0700850 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000851 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700852 "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 -0700853 },
854 ],
855 },
856 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000857 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800858 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
859 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +0000860 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700861 "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 +0000862 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -0800863 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -0700864 {
Craig Citroe633be12015-03-02 13:40:36 -0800865 "message": "A String", # [Output Only] An optional, human-readable error message.
866 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -0700867 "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 -0700868 },
869 ],
870 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800871 "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 -0700872 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -0800873 "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 -0700874 }</pre>
875</div>
876
877<div class="method">
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700878 <code class="details" id="list">list(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code>
Craig Citro065b5302014-08-14 00:47:23 -0700879 <pre>Retrieves the list of BackendService resources available to the specified project.
880
881Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800882 project: string, Project ID for this request. (required)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700883 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
884
885You 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.
886
887Currently, only sorting by name or creationTimestamp desc is supported.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400888 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)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800889 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700890 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 =, !=, >, or <.
Takashi Matsuo06694102015-09-11 13:55:40 -0700891
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700892For 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 -0700893
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700894You 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 -0800895
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700896To 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 -0700897
898Returns:
899 An object of the form:
900
901 { # Contains a list of BackendService resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400902 "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 -0700903 "kind": "compute#backendServiceList", # [Output Only] Type of resource. Always compute#backendServiceList for lists of backend services.
Craig Citroe633be12015-03-02 13:40:36 -0800904 "items": [ # A list of BackendService resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700905 { # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700906 "connectionDraining": { # Message containing connection draining configuration.
907 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
908 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800909 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
910 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400911 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700912 #
913 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700914 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
915 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
916 #
917 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
918 "A String",
919 ],
920 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
921 #
922 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
923 #
924 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
925 #
926 # When the protocol is UDP, this field is not used.
927 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
928 "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 -0400929 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700930 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
931 "A String",
932 ],
933 "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 -0400934 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
935 "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.
936 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
937 "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. '&' and '=' will be percent encoded and not treated as delimiters.
938 "A String",
939 ],
940 "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. '&' and '=' will be percent encoded and not treated as delimiters.
941 "A String",
942 ],
943 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
944 },
945 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700946 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
947 #
948 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700949 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
950 #
951 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800952 "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 -0700953 #
954 # This cannot be used for internal load balancing.
Craig Citro065b5302014-08-14 00:47:23 -0700955 "backends": [ # The list of backends that serve this BackendService.
956 { # Message containing information of one individual backend.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700957 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700958 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700960 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700961 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
962 #
963 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
964 #
965 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800966 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -0700967 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700968 #
969 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
971 #
972 # This cannot be used for internal load balancing.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400973 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700974 #
975 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700976 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
977 #
978 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700979 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
980 #
981 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700982 "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 -0700983 #
984 # This cannot be used for internal load balancing.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800985 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700986 #
987 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700988 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
989 #
990 # This cannot be used for internal load balancing.
991 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -0700992 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700993 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
Craig Citro065b5302014-08-14 00:47:23 -0700994 },
995 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400996 "iap": { # Identity-Aware Proxy
997 "oauth2ClientId": "A String",
998 "enabled": True or False,
999 "oauth2ClientSecret": "A String",
1000 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1001 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001002 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1003 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1004 "A String",
1005 ],
1006 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1007 "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.
1008 #
1009 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
1010 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
1011 #
1012 # When the load balancing scheme is INTERNAL, this field is not used.
1013 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1014 "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.
1015 "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.
1016 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
Takashi Matsuo06694102015-09-11 13:55:40 -07001017 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -07001018 },
1019 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001020 "warning": { # [Output Only] Informational warning message.
1021 "message": "A String", # [Output Only] A human-readable description of the warning code.
1022 "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.
1023 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1024 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1025 {
1026 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1027 "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).
1028 },
1029 ],
1030 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001031 "id": "A String", # [Output Only] Unique identifier for the resource; defined by the server.
Takashi Matsuo06694102015-09-11 13:55:40 -07001032 "selfLink": "A String", # [Output Only] Server-defined URL for this resource.
Craig Citro065b5302014-08-14 00:47:23 -07001033 }</pre>
1034</div>
1035
1036<div class="method">
1037 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1038 <pre>Retrieves the next page of results.
1039
1040Args:
1041 previous_request: The request for the previous page. (required)
1042 previous_response: The response from the request for the previous page. (required)
1043
1044Returns:
1045 A request object that you can call 'execute()' on to request the next
1046 page. Returns None if there are no more items in the collection.
1047 </pre>
1048</div>
1049
1050<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001051 <code class="details" id="patch">patch(project, backendService, body, requestId=None)</code>
1052 <pre>Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Craig Citro065b5302014-08-14 00:47:23 -07001053
1054Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001055 project: string, Project ID for this request. (required)
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001056 backendService: string, Name of the BackendService resource to patch. (required)
Craig Citro065b5302014-08-14 00:47:23 -07001057 body: object, The request body. (required)
1058 The object takes the form of:
1059
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001060{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001061 "connectionDraining": { # Message containing connection draining configuration.
1062 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
1063 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001064 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1065 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001066 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001067 #
1068 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001069 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
1070 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
1071 #
1072 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
1073 "A String",
1074 ],
1075 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
1076 #
1077 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
1078 #
1079 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
1080 #
1081 # When the protocol is UDP, this field is not used.
1082 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1083 "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 -04001084 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001085 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1086 "A String",
1087 ],
1088 "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 -04001089 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1090 "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.
1091 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
1092 "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. '&' and '=' will be percent encoded and not treated as delimiters.
1093 "A String",
1094 ],
1095 "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. '&' and '=' will be percent encoded and not treated as delimiters.
1096 "A String",
1097 ],
1098 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1099 },
1100 },
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001101 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
1102 #
1103 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001104 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
1105 #
1106 # When the load balancing scheme is INTERNAL, this field is not used.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001107 "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 -07001108 #
1109 # This cannot be used for internal load balancing.
Craig Citro065b5302014-08-14 00:47:23 -07001110 "backends": [ # The list of backends that serve this BackendService.
1111 { # Message containing information of one individual backend.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
Takashi Matsuo06694102015-09-11 13:55:40 -07001113 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001114 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001115 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001116 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
1117 #
1118 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
1119 #
1120 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001121 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
Takashi Matsuo06694102015-09-11 13:55:40 -07001122 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001123 #
1124 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001125 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
1126 #
1127 # This cannot be used for internal load balancing.
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001128 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001129 #
1130 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001131 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
1132 #
1133 # This cannot be used for internal load balancing.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001134 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
1135 #
1136 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001137 "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 -07001138 #
1139 # This cannot be used for internal load balancing.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001140 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001141 #
1142 # This cannot be used for internal load balancing.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -07001143 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
1144 #
1145 # This cannot be used for internal load balancing.
1146 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
Jon Wayne Parrott7d5badb2016-08-16 12:44:29 -07001147 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001148 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
Craig Citro065b5302014-08-14 00:47:23 -07001149 },
1150 ],
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001151 "iap": { # Identity-Aware Proxy
1152 "oauth2ClientId": "A String",
1153 "enabled": True or False,
1154 "oauth2ClientSecret": "A String",
1155 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1156 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001157 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1158 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1159 "A String",
1160 ],
1161 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1162 "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.
1163 #
1164 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
1165 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
1166 #
1167 # When the load balancing scheme is INTERNAL, this field is not used.
1168 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1169 "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.
1170 "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.
1171 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
Takashi Matsuo06694102015-09-11 13:55:40 -07001172 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Craig Citro065b5302014-08-14 00:47:23 -07001173 }
1174
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001175 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.
1176
1177For 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.
1178
1179The 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 -07001180
1181Returns:
1182 An object of the form:
1183
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001184 { # Represents an Operation resource.
1185 #
1186 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1187 #
1188 # Operations can be global, regional or zonal.
1189 # - For global operations, use the globalOperations resource.
1190 # - For regional operations, use the regionOperations resource.
1191 # - For zonal operations, use the zonalOperations resource.
1192 #
1193 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001194 "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 -07001195 "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 -04001196 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001197 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001198 "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 -08001199 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1200 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001201 "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 -08001202 "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.
1203 "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 -08001204 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001205 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1206 "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 +00001207 "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 -07001208 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001209 "message": "A String", # [Output Only] A human-readable description of the warning code.
1210 "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.
1211 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1212 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001213 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001214 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001215 "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 -07001216 },
1217 ],
1218 },
1219 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001220 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001221 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1222 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001223 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001224 "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 +00001225 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001226 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001227 {
Craig Citroe633be12015-03-02 13:40:36 -08001228 "message": "A String", # [Output Only] An optional, human-readable error message.
1229 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001230 "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 -07001231 },
1232 ],
1233 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001234 "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 -07001235 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001236 "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 -07001237 }</pre>
1238</div>
1239
1240<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001241 <code class="details" id="setSecurityPolicy">setSecurityPolicy(project, backendService, body, requestId=None)</code>
1242 <pre>Sets the security policy for the specified backend service.
Craig Citro065b5302014-08-14 00:47:23 -07001243
1244Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001245 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001246 backendService: string, Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. (required)
Craig Citro065b5302014-08-14 00:47:23 -07001247 body: object, The request body. (required)
1248 The object takes the form of:
1249
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001250{
1251 "securityPolicy": "A String",
Craig Citro065b5302014-08-14 00:47:23 -07001252 }
1253
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001254 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.
1255
1256For 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.
1257
1258The 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 -07001259
1260Returns:
1261 An object of the form:
1262
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001263 { # Represents an Operation resource.
1264 #
1265 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1266 #
1267 # Operations can be global, regional or zonal.
1268 # - For global operations, use the globalOperations resource.
1269 # - For regional operations, use the regionOperations resource.
1270 # - For zonal operations, use the zonalOperations resource.
1271 #
1272 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001273 "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 -07001274 "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 -04001275 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001276 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001277 "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 -08001278 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1279 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001280 "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 -08001281 "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.
1282 "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 -08001283 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001284 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1285 "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 +00001286 "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 -07001287 {
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001288 "message": "A String", # [Output Only] A human-readable description of the warning code.
1289 "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.
1290 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1291 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
Craig Citro065b5302014-08-14 00:47:23 -07001292 {
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001293 "value": "A String", # [Output Only] A warning data value corresponding to the key.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001294 "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 -07001295 },
1296 ],
1297 },
1298 ],
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001299 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001300 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1301 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
Nathaniel Manista5cbe5ba2015-03-10 23:29:22 +00001302 "name": "A String", # [Output Only] Name of the resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001303 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1304 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1305 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
1306 {
1307 "message": "A String", # [Output Only] An optional, human-readable error message.
1308 "code": "A String", # [Output Only] The error type identifier for this error.
1309 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1310 },
1311 ],
1312 },
1313 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1314 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1315 "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.
1316 }</pre>
1317</div>
1318
1319<div class="method">
1320 <code class="details" id="update">update(project, backendService, body, requestId=None)</code>
1321 <pre>Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information.
1322
1323Args:
1324 project: string, Project ID for this request. (required)
1325 backendService: string, Name of the BackendService resource to update. (required)
1326 body: object, The request body. (required)
1327 The object takes the form of:
1328
1329{ # A BackendService resource. This resource defines a group of backend virtual machines and their serving capacity. (== resource_for v1.backendService ==) (== resource_for beta.backendService ==)
1330 "connectionDraining": { # Message containing connection draining configuration.
1331 "drainingTimeoutSec": 42, # Time for which instance will be drained (not accept new connections, but still work to finish started).
1332 },
1333 "protocol": "A String", # The protocol this BackendService uses to communicate with backends.
1334 #
1335 # Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
1336 #
1337 # For internal load balancing, the possible values are TCP and UDP, and the default is TCP.
1338 "loadBalancingScheme": "A String", # Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Possible values are INTERNAL and EXTERNAL.
1339 "healthChecks": [ # The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required for Compute Engine backend services. A health check must not be specified for App Engine backend and Cloud Function backend.
1340 #
1341 # For internal load balancing, a URL to a HealthCheck resource must be specified instead.
1342 "A String",
1343 ],
1344 "sessionAffinity": "A String", # Type of session affinity to use. The default is NONE.
1345 #
1346 # When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or GENERATED_COOKIE.
1347 #
1348 # When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP, CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
1349 #
1350 # When the protocol is UDP, this field is not used.
1351 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format.
1352 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1353 "cdnPolicy": { # Message containing Cloud CDN configuration for a backend service. # Cloud CDN configuration for this BackendService.
1354 "signedUrlKeyNames": [ # [Output Only] Names of the keys for signing request URLs.
1355 "A String",
1356 ],
1357 "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.
1358 "cacheKeyPolicy": { # Message containing what to include in the cache key for a request for Cloud CDN. # The CacheKeyPolicy for this CdnPolicy.
1359 "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.
1360 "includeHost": True or False, # If true, requests to different hosts will be cached separately.
1361 "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. '&' and '=' will be percent encoded and not treated as delimiters.
1362 "A String",
1363 ],
1364 "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. '&' and '=' will be percent encoded and not treated as delimiters.
1365 "A String",
1366 ],
1367 "includeProtocol": True or False, # If true, http and https requests will be cached separately.
1368 },
1369 },
1370 "enableCDN": True or False, # If true, enable Cloud CDN for this BackendService.
1371 #
1372 # When the load balancing scheme is INTERNAL, this field is not used.
1373 "affinityCookieTtlSec": 42, # Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.
1374 #
1375 # When the load balancing scheme is INTERNAL, this field is not used.
1376 "port": 42, # Deprecated in favor of portName. The TCP port to connect on the backend. The default value is 80.
1377 #
1378 # This cannot be used for internal load balancing.
1379 "backends": [ # The list of backends that serve this BackendService.
1380 { # Message containing information of one individual backend.
1381 "group": "A String", # The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource.
1382 #
1383 # For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group.
1384 #
1385 # Backend service can not contain mix of Instance Group and Network Endpoint Group backends.
1386 #
1387 # Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL.
1388 #
1389 # When the BackendService has load balancing scheme INTERNAL, the instance group must be within the same region as the BackendService. Network Endpoint Groups are not supported for INTERNAL load balancing scheme.
1390 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1391 "maxUtilization": 3.14, # Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0].
1392 #
1393 # This cannot be used for internal load balancing.
1394 "maxConnectionsPerEndpoint": 42, # The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set.
1395 #
1396 # This cannot be used for internal load balancing.
1397 "maxRatePerInstance": 3.14, # The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
1398 #
1399 # This cannot be used for internal load balancing.
1400 "maxConnectionsPerInstance": 42, # The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
1401 #
1402 # This cannot be used for internal load balancing.
1403 "maxRatePerEndpoint": 3.14, # The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set.
1404 #
1405 # This cannot be used for internal load balancing.
1406 "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].
1407 #
1408 # This cannot be used for internal load balancing.
1409 "maxRate": 42, # The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.
1410 #
1411 # This cannot be used for internal load balancing.
1412 "maxConnections": 42, # The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set.
1413 #
1414 # This cannot be used for internal load balancing.
1415 "balancingMode": "A String", # Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL).
1416 #
1417 # For Internal Load Balancing, the default and only supported mode is CONNECTION.
1418 },
1419 ],
1420 "iap": { # Identity-Aware Proxy
1421 "oauth2ClientId": "A String",
1422 "enabled": True or False,
1423 "oauth2ClientSecret": "A String",
1424 "oauth2ClientSecretSha256": "A String", # [Output Only] SHA256 hash value for the field oauth2_client_secret above.
1425 },
1426 "description": "A String", # An optional description of this resource. Provide this property when you create the resource.
1427 "customRequestHeaders": [ # Headers that the HTTP/S load balancer should add to proxied requests.
1428 "A String",
1429 ],
1430 "securityPolicy": "A String", # [Output Only] The resource URL for the security policy associated with this backend service.
1431 "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.
1432 #
1433 # To see the latest fingerprint, make a get() request to retrieve a BackendService.
1434 "portName": "A String", # Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL.
1435 #
1436 # When the load balancing scheme is INTERNAL, this field is not used.
1437 "kind": "compute#backendService", # [Output Only] Type of resource. Always compute#backendService for backend services.
1438 "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.
1439 "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.
1440 "timeoutSec": 42, # How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.
1441 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
1442 }
1443
1444 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.
1445
1446For 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.
1447
1448The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1449
1450Returns:
1451 An object of the form:
1452
1453 { # Represents an Operation resource.
1454 #
1455 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1456 #
1457 # Operations can be global, regional or zonal.
1458 # - For global operations, use the globalOperations resource.
1459 # - For regional operations, use the regionOperations resource.
1460 # - For zonal operations, use the zonalOperations resource.
1461 #
1462 # For more information, read Global, Regional, and Zonal Resources. (== resource_for v1.globalOperations ==) (== resource_for beta.globalOperations ==) (== resource_for v1.regionOperations ==) (== resource_for beta.regionOperations ==) (== resource_for v1.zoneOperations ==) (== resource_for beta.zoneOperations ==)
1463 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1464 "clientOperationId": "A String", # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1465 "creationTimestamp": "A String", # [Deprecated] This field is deprecated.
1466 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server.
1467 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1468 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1469 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on.
1470 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND.
1471 "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.
1472 "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.
1473 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation.
1474 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE.
1475 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created.
1476 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1477 {
1478 "message": "A String", # [Output Only] A human-readable description of the warning code.
1479 "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.
1480 "data": [ # [Output Only] Metadata about this warning in key: value format. For example:
1481 # "data": [ { "key": "scope", "value": "zones/us-east1-d" }
1482 {
1483 "value": "A String", # [Output Only] A warning data value corresponding to the key.
1484 "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).
1485 },
1486 ],
1487 },
1488 ],
1489 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com.
1490 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1491 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources.
1492 "name": "A String", # [Output Only] Name of the resource.
1493 "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 +00001494 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
Craig Citroe633be12015-03-02 13:40:36 -08001495 "errors": [ # [Output Only] The array of errors encountered while processing this operation.
Craig Citro065b5302014-08-14 00:47:23 -07001496 {
Craig Citroe633be12015-03-02 13:40:36 -08001497 "message": "A String", # [Output Only] An optional, human-readable error message.
1498 "code": "A String", # [Output Only] The error type identifier for this error.
Jon Wayne Parrott0a471d32016-05-19 10:54:38 -07001499 "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 -07001500 },
1501 ],
1502 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001503 "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 -07001504 "selfLink": "A String", # [Output Only] Server-defined URL for the resource.
Jon Wayne Parrott692617a2017-01-06 09:58:29 -08001505 "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 -07001506 }</pre>
1507</div>
1508
1509</body></html>