getOperation
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
非同步 API 方法會在處理程序完成前傳回結果。使用 getOperation 搭配 operationId 擷取非同步作業的狀態。
方法簽章
public Operation getOperation( GetOperationRequest request) throws CommonException;
GetOperationRequest
| 屬性名稱 | 值 | 必填 | 說明 | 
| operationId | string | 是 | 作業 ID。 | 
錯誤行為
如果發生錯誤,程式庫會擲回 CommonException,其中包含下列其中一個錯誤代碼:
| 錯誤代碼 | 
| AUTHORIZATION_FAIL(如果經銷商不是營運的擁有者) | 
| INTERNAL_SERVER_ERROR | 
| INVALID_OPERATION_ID | 
  
  
  
 
  
    
    
      
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-08-29 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[],["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"]]