Method: projects.operations.wait
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
صبر می کند تا عملیات طولانی مدت مشخص شده انجام شود یا حداکثر به یک بازه زمانی مشخص برسد و آخرین حالت را برمی گرداند. اگر عملیات قبلا انجام شده باشد، آخرین حالت بلافاصله برگردانده می شود. اگر مدت زمان تعیین شده بیشتر از مهلت زمانی پیشفرض HTTP/RPC باشد، از مهلت زمانی HTTP/RPC استفاده میشود. اگر سرور از این روش پشتیبانی نمی کند، google.rpc.Code.UNIMPLEMENTED
را برمی گرداند. توجه داشته باشید که این روش بر اساس بهترین تلاش است. ممکن است آخرین وضعیت را قبل از مهلت زمانی مشخص شده (از جمله فورا) برگرداند، به این معنی که حتی پاسخ فوری نیز تضمینی برای انجام عملیات نیست.
درخواست HTTP
POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:wait
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string نام منبع عملیاتی که باید منتظر ماند. |
درخواست بدن
بدنه درخواست حاوی داده هایی با ساختار زیر است:
نمایندگی JSON |
---|
{
"timeout": string
} |
فیلدها |
---|
timeout | string ( Duration format) حداکثر مدت زمان انتظار قبل از اتمام زمان. اگر خالی باقی بماند، انتظار حداکثر زمانی خواهد بود که پروتکل HTTP/RPC زیربنایی اجازه می دهد. اگر مهلت زمینه RPC نیز مشخص شده باشد، از مهلت کوتاهتر استفاده میشود. مدت زمان در ثانیه با حداکثر نه رقم کسری که با ' s ' ختم می شود. مثال: "3.5s" . |
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ حاوی نمونه ای از Operation
است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/earthengine
-
https://www.googleapis.com/auth/cloud-platform
برای اطلاعات بیشتر، بهOAuth 2.0 Overview .
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\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)."]]