getOperation
Metode API asinkron menampilkan hasil sebelum pemrosesan selesai. Gunakan
getOperation
untuk mengambil status operasi asinkron menggunakan
operationId
-nya.
Tanda tangan metode
public Operation getOperation( GetOperationRequest request) throws CommonException;
GetOperationRequest
Nama properti |
Nilai |
Wajib |
Deskripsi |
operationId |
string |
Ya |
ID operasi. |
Perilaku error
Jika terjadi error, library akan menampilkan CommonException
yang berisi salah satu kode error berikut:
Kode error |
AUTHORIZATION_FAIL (jika reseller bukan pemilik operasi tersebut) |
INTERNAL_SERVER_ERROR |
INVALID_OPERATION_ID |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-11-09 UTC.
[null,null,["Terakhir diperbarui pada 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"]]