Method: projects.operations.wait
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chờ cho đến khi thao tác chạy trong thời gian dài được chỉ định hoàn tất hoặc đạt đến thời gian chờ tối đa được chỉ định, trả về trạng thái mới nhất. Nếu thao tác đã hoàn tất, trạng thái mới nhất sẽ được trả về ngay lập tức. Nếu thời gian chờ được chỉ định lớn hơn thời gian chờ HTTP/RPC mặc định, thì thời gian chờ HTTP/RPC sẽ được sử dụng. Nếu không hỗ trợ phương thức này, máy chủ sẽ trả về google.rpc.Code.UNIMPLEMENTED
. Xin lưu ý rằng phương thức này được thực hiện trên cơ sở nỗ lực tối đa. Phương thức này có thể trả về trạng thái mới nhất trước khi hết thời gian chờ đã chỉ định (bao gồm cả ngay lập tức), nghĩa là ngay cả khi có phản hồi ngay lập tức thì cũng không đảm bảo rằng thao tác đã hoàn tất.
Yêu cầu HTTP
POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:wait
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
name |
string
Tên của tài nguyên thao tác cần chờ.
|
Nội dung yêu cầu
Nội dung yêu cầu chứa dữ liệu có cấu trúc sau:
Biểu diễn dưới dạng JSON |
{
"timeout": string
} |
Trường |
timeout |
string (Duration format)
Thời lượng tối đa để chờ trước khi hết thời gian chờ. Nếu bạn để trống, thời gian chờ sẽ là tối đa thời gian mà giao thức HTTP/RPC cơ bản cho phép. Nếu bạn cũng chỉ định thời hạn ngữ cảnh RPC, thì thời hạn ngắn hơn sẽ được sử dụng. Thời lượng tính bằng giây, có tối đa 9 chữ số thập phân, kết thúc bằng "s ". Ví dụ: "3.5s" .
|
Nội dung phản hồi
Nếu thành công, nội dung phản hồi sẽ chứa một phiên bản của Operation
.
Phạm vi uỷ quyền
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/cloud-platform
Để biết thêm thông tin, hãy xem OAuth 2.0 Overview.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eWaits for a specified operation to complete or until a timeout is reached, returning the operation's latest state.\u003c/p\u003e\n"],["\u003cp\u003eUses the HTTP/RPC timeout or the specified timeout, whichever is shorter.\u003c/p\u003e\n"],["\u003cp\u003eMay return the latest state before the timeout, so an immediate response doesn't guarantee completion.\u003c/p\u003e\n"],["\u003cp\u003eRequires specific OAuth scopes for authorization, like \u003ccode\u003ehttps://www.googleapis.com/auth/earthengine\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the server doesn't support this method, it returns \u003ccode\u003egoogle.rpc.Code.UNIMPLEMENTED\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.operations.wait\n\nWaits 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.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:wait`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------------------|\n| `name` | `string` The name of the operation resource to wait on. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------|\n| ``` { \"timeout\": string } ``` |\n\n| Fields ||\n|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `timeout` | `string (`[Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration)` format)` 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. A duration in seconds with up to nine fractional digits, ending with '`s`'. Example: `\"3.5s\"`. |\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/earth-engine/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]