1<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.targetPools.html">targetPools</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#addHealthCheck">addHealthCheck(project, region, targetPool, body)</a></code></p> 79<p class="firstline">Adds health check URLs to a target pool.</p> 80<p class="toc_element"> 81 <code><a href="#addInstance">addInstance(project, region, targetPool, body)</a></code></p> 82<p class="firstline">Adds an instance to a target pool.</p> 83<p class="toc_element"> 84 <code><a href="#aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 85<p class="firstline">Retrieves an aggregated list of target pools.</p> 86<p class="toc_element"> 87 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p> 88<p class="firstline">Retrieves the next page of results.</p> 89<p class="toc_element"> 90 <code><a href="#delete">delete(project, region, targetPool)</a></code></p> 91<p class="firstline">Deletes the specified target pool.</p> 92<p class="toc_element"> 93 <code><a href="#get">get(project, region, targetPool)</a></code></p> 94<p class="firstline">Returns the specified target pool. Get a list of available target pools by making a list() request.</p> 95<p class="toc_element"> 96 <code><a href="#getHealth">getHealth(project, region, targetPool, body)</a></code></p> 97<p class="firstline">Gets the most recent health check results for each IP for the instance that is referenced by the given target pool.</p> 98<p class="toc_element"> 99 <code><a href="#insert">insert(project, region, body)</a></code></p> 100<p class="firstline">Creates a target pool in the specified project and region using the data included in the request.</p> 101<p class="toc_element"> 102 <code><a href="#list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</a></code></p> 103<p class="firstline">Retrieves a list of target pools available to the specified project and region.</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"> 108 <code><a href="#removeHealthCheck">removeHealthCheck(project, region, targetPool, body)</a></code></p> 109<p class="firstline">Removes health check URL from a target pool.</p> 110<p class="toc_element"> 111 <code><a href="#removeInstance">removeInstance(project, region, targetPool, body)</a></code></p> 112<p class="firstline">Removes instance URL from a target pool.</p> 113<p class="toc_element"> 114 <code><a href="#setBackup">setBackup(project, region, targetPool, body, failoverRatio=None)</a></code></p> 115<p class="firstline">Changes a backup target pool's configurations.</p> 116<h3>Method Details</h3> 117<div class="method"> 118 <code class="details" id="addHealthCheck">addHealthCheck(project, region, targetPool, body)</code> 119 <pre>Adds health check URLs to a target pool. 120 121Args: 122 project: string, Project ID for this request. (required) 123 region: string, Name of the region scoping this request. (required) 124 targetPool: string, Name of the target pool to add a health check to. (required) 125 body: object, The request body. (required) 126 The object takes the form of: 127 128{ 129 "healthChecks": [ # The HttpHealthCheck to add to the target pool. 130 { # A full or valid partial URL to a health check. For example, the following are valid URLs: 131 # - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check 132 # - projects/project-id/global/httpHealthChecks/health-check 133 # - global/httpHealthChecks/health-check 134 "healthCheck": "A String", 135 }, 136 ], 137 } 138 139 140Returns: 141 An object of the form: 142 143 { # An Operation resource, used to manage asynchronous API requests. 144 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 145 "clientOperationId": "A String", # [Output Only] Reserved for future use. 146 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 147 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 148 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 149 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 150 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 151 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 152 "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. 153 "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. 154 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 155 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 156 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 157 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 158 { 159 "message": "A String", # [Output Only] A human-readable description of the warning code. 160 "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. 161 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 162 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 163 { 164 "value": "A String", # [Output Only] A warning data value corresponding to the key. 165 "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). 166 }, 167 ], 168 }, 169 ], 170 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 171 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 172 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 173 "name": "A String", # [Output Only] Name of the resource. 174 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 175 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 176 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 177 { 178 "message": "A String", # [Output Only] An optional, human-readable error message. 179 "code": "A String", # [Output Only] The error type identifier for this error. 180 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 181 }, 182 ], 183 }, 184 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 185 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 186 "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. 187 }</pre> 188</div> 189 190<div class="method"> 191 <code class="details" id="addInstance">addInstance(project, region, targetPool, body)</code> 192 <pre>Adds an instance to a target pool. 193 194Args: 195 project: string, Project ID for this request. (required) 196 region: string, Name of the region scoping this request. (required) 197 targetPool: string, Name of the TargetPool resource to add instances to. (required) 198 body: object, The request body. (required) 199 The object takes the form of: 200 201{ 202 "instances": [ # A full or partial URL to an instance to add to this target pool. This can be a full or partial URL. For example, the following are valid URLs: 203 # - https://www.googleapis.com/compute/v1/projects/project-id/zones/zone/instances/instance-name 204 # - projects/project-id/zones/zone/instances/instance-name 205 # - zones/zone/instances/instance-name 206 { 207 "instance": "A String", # The URL for a specific instance. 208 }, 209 ], 210 } 211 212 213Returns: 214 An object of the form: 215 216 { # An Operation resource, used to manage asynchronous API requests. 217 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 218 "clientOperationId": "A String", # [Output Only] Reserved for future use. 219 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 220 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 221 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 222 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 223 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 224 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 225 "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. 226 "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. 227 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 228 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 229 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 230 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 231 { 232 "message": "A String", # [Output Only] A human-readable description of the warning code. 233 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 234 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 235 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 236 { 237 "value": "A String", # [Output Only] A warning data value corresponding to the key. 238 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 239 }, 240 ], 241 }, 242 ], 243 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 244 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 245 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 246 "name": "A String", # [Output Only] Name of the resource. 247 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 248 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 249 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 250 { 251 "message": "A String", # [Output Only] An optional, human-readable error message. 252 "code": "A String", # [Output Only] The error type identifier for this error. 253 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 254 }, 255 ], 256 }, 257 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 258 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 259 "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. 260 }</pre> 261</div> 262 263<div class="method"> 264 <code class="details" id="aggregatedList">aggregatedList(project, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 265 <pre>Retrieves an aggregated list of target pools. 266 267Args: 268 project: string, Project ID for this request. (required) 269 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 270 271You 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. 272 273Currently, only sorting by name or creationTimestamp desc is supported. 274 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) 275 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. 276 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 277 278The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 279 280For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 281 282You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 283 284To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 285 286Returns: 287 An object of the form: 288 289 { 290 "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. 291 "items": { # [Output Only] A map of scoped target pool lists. 292 "a_key": { # Name of the scope containing this set of target pools. 293 "warning": { # Informational warning which replaces the list of addresses when the list is empty. 294 "message": "A String", # [Output Only] A human-readable description of the warning code. 295 "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. 296 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 297 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 298 { 299 "value": "A String", # [Output Only] A warning data value corresponding to the key. 300 "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). 301 }, 302 ], 303 }, 304 "targetPools": [ # List of target pools contained in this scope. 305 { # A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. 306 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. 307 # 308 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. 309 # 310 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 311 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 312 "region": "A String", # [Output Only] URL of the region where the target pool resides. 313 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools. 314 "sessionAffinity": "A String", # Sesssion affinity option, must be one of the following values: 315 # NONE: Connections from the same client IP may go to any instance in the pool. 316 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. 317 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. 318 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. 319 "A String", 320 ], 321 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. 322 # 323 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. 324 # 325 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 326 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified. 327 "A String", 328 ], 329 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 330 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 331 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 332 "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. 333 }, 334 ], 335 }, 336 }, 337 "kind": "compute#targetPoolAggregatedList", # [Output Only] Type of resource. Always compute#targetPoolAggregatedList for aggregated lists of target pools. 338 "id": "A String", # [Output Only] Unique identifier for the resource. Defined by the server. 339 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 340 }</pre> 341</div> 342 343<div class="method"> 344 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code> 345 <pre>Retrieves the next page of results. 346 347Args: 348 previous_request: The request for the previous page. (required) 349 previous_response: The response from the request for the previous page. (required) 350 351Returns: 352 A request object that you can call 'execute()' on to request the next 353 page. Returns None if there are no more items in the collection. 354 </pre> 355</div> 356 357<div class="method"> 358 <code class="details" id="delete">delete(project, region, targetPool)</code> 359 <pre>Deletes the specified target pool. 360 361Args: 362 project: string, Project ID for this request. (required) 363 region: string, Name of the region scoping this request. (required) 364 targetPool: string, Name of the TargetPool resource to delete. (required) 365 366Returns: 367 An object of the form: 368 369 { # An Operation resource, used to manage asynchronous API requests. 370 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 371 "clientOperationId": "A String", # [Output Only] Reserved for future use. 372 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 373 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 374 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 375 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 376 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 377 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 378 "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. 379 "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. 380 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 381 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 382 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 383 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 384 { 385 "message": "A String", # [Output Only] A human-readable description of the warning code. 386 "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. 387 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 388 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 389 { 390 "value": "A String", # [Output Only] A warning data value corresponding to the key. 391 "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). 392 }, 393 ], 394 }, 395 ], 396 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 397 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 398 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 399 "name": "A String", # [Output Only] Name of the resource. 400 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 401 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 402 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 403 { 404 "message": "A String", # [Output Only] An optional, human-readable error message. 405 "code": "A String", # [Output Only] The error type identifier for this error. 406 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 407 }, 408 ], 409 }, 410 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 411 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 412 "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. 413 }</pre> 414</div> 415 416<div class="method"> 417 <code class="details" id="get">get(project, region, targetPool)</code> 418 <pre>Returns the specified target pool. Get a list of available target pools by making a list() request. 419 420Args: 421 project: string, Project ID for this request. (required) 422 region: string, Name of the region scoping this request. (required) 423 targetPool: string, Name of the TargetPool resource to return. (required) 424 425Returns: 426 An object of the form: 427 428 { # A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. 429 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. 430 # 431 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. 432 # 433 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 434 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 435 "region": "A String", # [Output Only] URL of the region where the target pool resides. 436 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools. 437 "sessionAffinity": "A String", # Sesssion affinity option, must be one of the following values: 438 # NONE: Connections from the same client IP may go to any instance in the pool. 439 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. 440 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. 441 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. 442 "A String", 443 ], 444 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. 445 # 446 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. 447 # 448 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 449 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified. 450 "A String", 451 ], 452 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 453 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 454 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 455 "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. 456 }</pre> 457</div> 458 459<div class="method"> 460 <code class="details" id="getHealth">getHealth(project, region, targetPool, body)</code> 461 <pre>Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. 462 463Args: 464 project: string, Project ID for this request. (required) 465 region: string, Name of the region scoping this request. (required) 466 targetPool: string, Name of the TargetPool resource to which the queried instance belongs. (required) 467 body: object, The request body. (required) 468 The object takes the form of: 469 470{ 471 "instance": "A String", # The URL for a specific instance. 472} 473 474 475Returns: 476 An object of the form: 477 478 { 479 "kind": "compute#targetPoolInstanceHealth", # [Output Only] Type of resource. Always compute#targetPoolInstanceHealth when checking the health of an instance. 480 "healthStatus": [ 481 { 482 "instance": "A String", # URL of the instance resource. 483 "healthState": "A String", # Health state of the instance. 484 "ipAddress": "A String", # The IP address represented by this resource. 485 "port": 42, # The port on the instance. 486 }, 487 ], 488 }</pre> 489</div> 490 491<div class="method"> 492 <code class="details" id="insert">insert(project, region, body)</code> 493 <pre>Creates a target pool in the specified project and region using the data included in the request. 494 495Args: 496 project: string, Project ID for this request. (required) 497 region: string, Name of the region scoping this request. (required) 498 body: object, The request body. (required) 499 The object takes the form of: 500 501{ # A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. 502 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. 503 # 504 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. 505 # 506 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 507 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 508 "region": "A String", # [Output Only] URL of the region where the target pool resides. 509 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools. 510 "sessionAffinity": "A String", # Sesssion affinity option, must be one of the following values: 511 # NONE: Connections from the same client IP may go to any instance in the pool. 512 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. 513 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. 514 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. 515 "A String", 516 ], 517 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. 518 # 519 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. 520 # 521 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 522 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified. 523 "A String", 524 ], 525 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 526 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 527 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 528 "name": "A String", # Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 529 } 530 531 532Returns: 533 An object of the form: 534 535 { # An Operation resource, used to manage asynchronous API requests. 536 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 537 "clientOperationId": "A String", # [Output Only] Reserved for future use. 538 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 539 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 540 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 541 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 542 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 543 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 544 "progress": 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses. 545 "httpErrorStatusCode": 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a 404 means the resource was not found. 546 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 547 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 548 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 549 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 550 { 551 "message": "A String", # [Output Only] A human-readable description of the warning code. 552 "code": "A String", # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. 553 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 554 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 555 { 556 "value": "A String", # [Output Only] A warning data value corresponding to the key. 557 "key": "A String", # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding). 558 }, 559 ], 560 }, 561 ], 562 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 563 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 564 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 565 "name": "A String", # [Output Only] Name of the resource. 566 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 567 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 568 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 569 { 570 "message": "A String", # [Output Only] An optional, human-readable error message. 571 "code": "A String", # [Output Only] The error type identifier for this error. 572 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 573 }, 574 ], 575 }, 576 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 577 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 578 "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. 579 }</pre> 580</div> 581 582<div class="method"> 583 <code class="details" id="list">list(project, region, orderBy=None, maxResults=None, pageToken=None, filter=None)</code> 584 <pre>Retrieves a list of target pools available to the specified project and region. 585 586Args: 587 project: string, Project ID for this request. (required) 588 region: string, Name of the region scoping this request. (required) 589 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. 590 591You 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. 592 593Currently, only sorting by name or creationTimestamp desc is supported. 594 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) 595 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. 596 filter: string, Sets a filter expression for filtering listed resources, in the form filter={expression}. Your {expression} must be in the format: field_name comparison_string literal_string. 597 598The field_name is the name of the field you want to compare. Only atomic field types are supported (string, number, boolean). The comparison_string must be either eq (equals) or ne (not equals). The literal_string is the string value to filter to. The literal value must be valid for the type of field you are filtering by (string, number, boolean). For string fields, the literal value is interpreted as a regular expression using RE2 syntax. The literal value must match the entire field. 599 600For example, to filter for instances that do not have a name of example-instance, you would use filter=name ne example-instance. 601 602You can filter on nested fields. For example, you could filter on instances that have set the scheduling.automaticRestart field to true. Use filtering on nested fields to take advantage of labels to organize and search for results based on label values. 603 604To filter on multiple expressions, provide each separate expression within parentheses. For example, (scheduling.automaticRestart eq true) (zone eq us-central1-f). Multiple expressions are treated as AND expressions, meaning that resources must match all expressions to pass the filters. 605 606Returns: 607 An object of the form: 608 609 { # Contains a list of TargetPool resources. 610 "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. 611 "items": [ # A list of TargetPool resources. 612 { # A TargetPool resource. This resource defines a pool of instances, an associated HttpHealthCheck resource, and the fallback target pool. 613 "failoverRatio": 3.14, # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. 614 # 615 # If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. 616 # 617 # In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 618 "description": "A String", # An optional description of this resource. Provide this property when you create the resource. 619 "region": "A String", # [Output Only] URL of the region where the target pool resides. 620 "kind": "compute#targetPool", # [Output Only] Type of the resource. Always compute#targetPool for target pools. 621 "sessionAffinity": "A String", # Sesssion affinity option, must be one of the following values: 622 # NONE: Connections from the same client IP may go to any instance in the pool. 623 # CLIENT_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. 624 # CLIENT_IP_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. 625 "instances": [ # A list of resource URLs to the virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. 626 "A String", 627 ], 628 "backupPool": "A String", # This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. 629 # 630 # backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. 631 # 632 # In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. 633 "healthChecks": [ # The URL of the HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. An empty list means all member instances will be considered healthy at all times. Only HttpHealthChecks are supported. Only one health check may be specified. 634 "A String", 635 ], 636 "creationTimestamp": "A String", # [Output Only] Creation timestamp in RFC3339 text format. 637 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 638 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 639 "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. 640 }, 641 ], 642 "kind": "compute#targetPoolList", # [Output Only] Type of resource. Always compute#targetPoolList for lists of target pools. 643 "id": "A String", # [Output Only] Unique identifier for the resource. Defined by the server. 644 "selfLink": "A String", # [Output Only] Server-defined URL for this resource. 645 }</pre> 646</div> 647 648<div class="method"> 649 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 650 <pre>Retrieves the next page of results. 651 652Args: 653 previous_request: The request for the previous page. (required) 654 previous_response: The response from the request for the previous page. (required) 655 656Returns: 657 A request object that you can call 'execute()' on to request the next 658 page. Returns None if there are no more items in the collection. 659 </pre> 660</div> 661 662<div class="method"> 663 <code class="details" id="removeHealthCheck">removeHealthCheck(project, region, targetPool, body)</code> 664 <pre>Removes health check URL from a target pool. 665 666Args: 667 project: string, Project ID for this request. (required) 668 region: string, Name of the region for this request. (required) 669 targetPool: string, Name of the target pool to remove health checks from. (required) 670 body: object, The request body. (required) 671 The object takes the form of: 672 673{ 674 "healthChecks": [ # Health check URL to be removed. This can be a full or valid partial URL. For example, the following are valid URLs: 675 # - https://www.googleapis.com/compute/beta/projects/project/global/httpHealthChecks/health-check 676 # - projects/project/global/httpHealthChecks/health-check 677 # - global/httpHealthChecks/health-check 678 { # A full or valid partial URL to a health check. For example, the following are valid URLs: 679 # - https://www.googleapis.com/compute/beta/projects/project-id/global/httpHealthChecks/health-check 680 # - projects/project-id/global/httpHealthChecks/health-check 681 # - global/httpHealthChecks/health-check 682 "healthCheck": "A String", 683 }, 684 ], 685 } 686 687 688Returns: 689 An object of the form: 690 691 { # An Operation resource, used to manage asynchronous API requests. 692 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 693 "clientOperationId": "A String", # [Output Only] Reserved for future use. 694 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 695 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 696 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 697 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 698 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 699 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 700 "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. 701 "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. 702 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 703 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 704 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 705 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 706 { 707 "message": "A String", # [Output Only] A human-readable description of the warning code. 708 "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. 709 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 710 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 711 { 712 "value": "A String", # [Output Only] A warning data value corresponding to the key. 713 "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). 714 }, 715 ], 716 }, 717 ], 718 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 719 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 720 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 721 "name": "A String", # [Output Only] Name of the resource. 722 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 723 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 724 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 725 { 726 "message": "A String", # [Output Only] An optional, human-readable error message. 727 "code": "A String", # [Output Only] The error type identifier for this error. 728 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 729 }, 730 ], 731 }, 732 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 733 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 734 "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. 735 }</pre> 736</div> 737 738<div class="method"> 739 <code class="details" id="removeInstance">removeInstance(project, region, targetPool, body)</code> 740 <pre>Removes instance URL from a target pool. 741 742Args: 743 project: string, Project ID for this request. (required) 744 region: string, Name of the region scoping this request. (required) 745 targetPool: string, Name of the TargetPool resource to remove instances from. (required) 746 body: object, The request body. (required) 747 The object takes the form of: 748 749{ 750 "instances": [ # URLs of the instances to be removed from target pool. 751 { 752 "instance": "A String", # The URL for a specific instance. 753 }, 754 ], 755 } 756 757 758Returns: 759 An object of the form: 760 761 { # An Operation resource, used to manage asynchronous API requests. 762 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 763 "clientOperationId": "A String", # [Output Only] Reserved for future use. 764 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 765 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 766 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 767 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 768 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 769 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 770 "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. 771 "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. 772 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 773 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 774 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 775 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 776 { 777 "message": "A String", # [Output Only] A human-readable description of the warning code. 778 "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. 779 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 780 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 781 { 782 "value": "A String", # [Output Only] A warning data value corresponding to the key. 783 "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). 784 }, 785 ], 786 }, 787 ], 788 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 789 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 790 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 791 "name": "A String", # [Output Only] Name of the resource. 792 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 793 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 794 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 795 { 796 "message": "A String", # [Output Only] An optional, human-readable error message. 797 "code": "A String", # [Output Only] The error type identifier for this error. 798 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 799 }, 800 ], 801 }, 802 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 803 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 804 "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. 805 }</pre> 806</div> 807 808<div class="method"> 809 <code class="details" id="setBackup">setBackup(project, region, targetPool, body, failoverRatio=None)</code> 810 <pre>Changes a backup target pool's configurations. 811 812Args: 813 project: string, Project ID for this request. (required) 814 region: string, Name of the region scoping this request. (required) 815 targetPool: string, Name of the TargetPool resource to set a backup pool for. (required) 816 body: object, The request body. (required) 817 The object takes the form of: 818 819{ 820 "target": "A String", 821 } 822 823 failoverRatio: number, New failoverRatio value for the target pool. 824 825Returns: 826 An object of the form: 827 828 { # An Operation resource, used to manage asynchronous API requests. 829 "targetId": "A String", # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource. 830 "clientOperationId": "A String", # [Output Only] Reserved for future use. 831 "creationTimestamp": "A String", # [Deprecated] This field is deprecated. 832 "id": "A String", # [Output Only] The unique identifier for the resource. This identifier is defined by the server. 833 "zone": "A String", # [Output Only] The URL of the zone where the operation resides. Only available when performing per-zone operations. 834 "insertTime": "A String", # [Output Only] The time that this operation was requested. This value is in RFC3339 text format. 835 "operationType": "A String", # [Output Only] The type of operation, such as insert, update, or delete, and so on. 836 "httpErrorMessage": "A String", # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND. 837 "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. 838 "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. 839 "statusMessage": "A String", # [Output Only] An optional textual description of the current status of the operation. 840 "status": "A String", # [Output Only] The status of the operation, which can be one of the following: PENDING, RUNNING, or DONE. 841 "description": "A String", # [Output Only] A textual description of the operation, which is set when the operation is created. 842 "warnings": [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated. 843 { 844 "message": "A String", # [Output Only] A human-readable description of the warning code. 845 "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. 846 "data": [ # [Output Only] Metadata about this warning in key: value format. For example: 847 # "data": [ { "key": "scope", "value": "zones/us-east1-d" } 848 { 849 "value": "A String", # [Output Only] A warning data value corresponding to the key. 850 "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). 851 }, 852 ], 853 }, 854 ], 855 "user": "A String", # [Output Only] User who requested the operation, for example: user@example.com. 856 "startTime": "A String", # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format. 857 "kind": "compute#operation", # [Output Only] Type of the resource. Always compute#operation for Operation resources. 858 "name": "A String", # [Output Only] Name of the resource. 859 "region": "A String", # [Output Only] The URL of the region where the operation resides. Only available when performing regional operations. 860 "error": { # [Output Only] If errors are generated during processing of the operation, this field will be populated. 861 "errors": [ # [Output Only] The array of errors encountered while processing this operation. 862 { 863 "message": "A String", # [Output Only] An optional, human-readable error message. 864 "code": "A String", # [Output Only] The error type identifier for this error. 865 "location": "A String", # [Output Only] Indicates the field in the request that caused the error. This property is optional. 866 }, 867 ], 868 }, 869 "endTime": "A String", # [Output Only] The time that this operation was completed. This value is in RFC3339 text format. 870 "selfLink": "A String", # [Output Only] Server-defined URL for the resource. 871 "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. 872 }</pre> 873</div> 874 875</body></html>