Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Espera hasta que se complete la operación de larga duración especificada o hasta que se alcance un tiempo de espera máximo determinado y devuelve el estado más reciente. Si la operación ya se ha completado, se devuelve inmediatamente el estado más reciente. Si el tiempo de espera especificado es superior al tiempo de espera predeterminado de HTTP/RPC, se usará el tiempo de espera de HTTP/RPC. Si el servidor no admite este método, devuelve google.rpc.Code.UNIMPLEMENTED. Ten en cuenta que este método se aplica en la medida de lo posible. Puede devolver el estado más reciente antes del tiempo de espera especificado (incluso inmediatamente), lo que significa que, aunque la respuesta sea inmediata, no se garantiza que la operación se haya completado.
Solicitud HTTP
POST https://{TRANSLATION_GDC_ENDPOINT}/v3/{name}:wait
Parámetros de ruta
Parámetros
name
string
Nombre del recurso de operación que se va a esperar.
Cuerpo de la solicitud
El cuerpo de la solicitud contiene datos que presentan la siguiente estructura:
Duración máxima de espera antes de que se agote el tiempo de espera. Si se deja en blanco, la espera será como máximo el tiempo permitido por el protocolo HTTP/RPC subyacente. Si también se especifica el plazo del contexto de RPC, se usará el más corto.
Duración en segundos con hasta nueve decimales, que termina con "s". Por ejemplo: "3.5s".
Cuerpo de la respuesta
Si la solicitud se hace correctamente, en el cuerpo de la respuesta se incluye una instancia de Operation.
Permisos de autorización
Debes disponer de uno de los siguientes permisos de OAuth:
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-21 (UTC)."],[[["\u003cp\u003eThis operation waits for a long-running process to complete or until a specified timeout, returning the latest state of the operation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ename\u003c/code\u003e parameter in the request path indicates the specific operation to wait for.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include a \u003ccode\u003etimeout\u003c/code\u003e field, which is a string in duration format that sets the maximum wait time, otherwise the HTTP/RPC timeout will apply.\u003c/p\u003e\n"],["\u003cp\u003eA successful response will return an instance of an Operation object.\u003c/p\u003e\n"],["\u003cp\u003eThis operation requires one of two specific OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-translation\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\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://{TRANSLATION_GDC_ENDPOINT}/v3/{name}:wait`\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/distributed-cloud/hosted/docs/latest/gdch/apis/vertex-ai/translation/rest/v3/projects.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-translation`\n- `https://www.googleapis.com/auth/cloud-platform`"]]