Skip to content

Commit

Permalink
feat(run): update the api
Browse files Browse the repository at this point in the history
#### run:v2

The following keys were added:
- resources.projects.resources.locations.resources.operations.methods.wait (Total Keys: 12)
- schemas.GoogleLongrunningWaitOperationRequest (Total Keys: 4)
  • Loading branch information
yoshi-automation committed Jan 24, 2023
1 parent 79e78d1 commit b1c0b1b
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 2 deletions.
45 changes: 45 additions & 0 deletions docs/dyn/run_v2.projects.locations.operations.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ <h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#wait">wait(name, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
Expand Down Expand Up @@ -205,4 +208,46 @@ <h3>Method Details</h3>
</pre>
</div>

<div class="method">
<code class="details" id="wait">wait(name, body=None, x__xgafv=None)</code>
<pre>Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.

Args:
name: string, The name of the operation resource to wait on. (required)
body: object, The request body.
The object takes the form of:

{ # The request message for Operations.WaitOperation.
&quot;timeout&quot;: &quot;A String&quot;, # The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # This resource represents a long-running operation that is the result of a network API call.
&quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
&quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
&quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
}</pre>
</div>

</body></html>
2 changes: 1 addition & 1 deletion googleapiclient/discovery_cache/documents/run.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@
}
}
},
"revision": "20230108",
"revision": "20230113",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"Addressable": {
Expand Down
42 changes: 41 additions & 1 deletion googleapiclient/discovery_cache/documents/run.v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,34 @@
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
},
"wait": {
"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.",
"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait",
"httpMethod": "POST",
"id": "run.projects.locations.operations.wait",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "The name of the operation resource to wait on.",
"location": "path",
"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v2/{+name}:wait",
"request": {
"$ref": "GoogleLongrunningWaitOperationRequest"
},
"response": {
"$ref": "GoogleLongrunningOperation"
},
"scopes": [
"https://www.googleapis.com/auth/cloud-platform"
]
}
}
},
Expand Down Expand Up @@ -1059,7 +1087,7 @@
}
}
},
"revision": "20230108",
"revision": "20230113",
"rootUrl": "https://run.googleapis.com/",
"schemas": {
"GoogleCloudRunV2BinaryAuthorization": {
Expand Down Expand Up @@ -3072,6 +3100,18 @@
},
"type": "object"
},
"GoogleLongrunningWaitOperationRequest": {
"description": "The request message for Operations.WaitOperation.",
"id": "GoogleLongrunningWaitOperationRequest",
"properties": {
"timeout": {
"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.",
"format": "google-duration",
"type": "string"
}
},
"type": "object"
},
"GoogleProtobufEmpty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "GoogleProtobufEmpty",
Expand Down

0 comments on commit b1c0b1b

Please sign in to comment.