getOperation
שיטות API אסינכררוניות מחזירות תוצאה לפני שהעיבוד מסתיים. אפשר להשתמש ב-getOperation
כדי לאחזר את הסטטוס של פעולה אסינכרוני באמצעות operationId
שלה.
חתימה של method
public Operation getOperation( GetOperationRequest request) throws CommonException;
GetOperationRequest
שם הנכס |
ערך |
חובה |
תיאור |
operationId |
string |
כן |
מזהה הפעולה. |
התנהגות במקרה של שגיאה
אם מתרחשת שגיאה, הספרייה תקפיץ את השדה CommonException
שמכיל את אחד מקודי השגיאה הבאים:
קוד שגיאה |
AUTHORIZATION_FAIL (אם המפיץ לא הבעלים של הפעולה) |
INTERNAL_SERVER_ERROR |
INVALID_OPERATION_ID |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-11-09 (שעון UTC).
[null,null,["עדכון אחרון: 2024-11-09 (שעון UTC)."],[[["Asynchronous API methods use `getOperation` to check the status of an operation."],["The `getOperation` method requires the `operationId` as a string in the `GetOperationRequest`."],["`CommonException` is thrown if an error occurs during the operation."],["Possible error codes include `AUTHORIZATION_FAIL`, `INTERNAL_SERVER_ERROR`, and `INVALID_OPERATION_ID`."]]],["Asynchronous operations are tracked using `getOperation`, which requires an `operationId` to check their status. The `getOperation` method, part of the API, takes a `GetOperationRequest` and can throw a `CommonException`. Possible errors include `AUTHORIZATION_FAIL` (if the caller lacks ownership), `INTERNAL_SERVER_ERROR`, and `INVALID_OPERATION_ID`. The method returns before the operation is completed, allowing users to periodically retrieve updates via `getOperation`.\n"]]