getOperation
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Asynchrone API-Methoden geben ein Ergebnis zurück, bevor die Verarbeitung abgeschlossen ist. Mit getOperation
können Sie den Status eines asynchronen Vorgangs anhand seiner operationId
abrufen.
Methodensignatur
public Operation getOperation( GetOperationRequest request) throws CommonException;
GetOperationRequest
Property-Name |
Wert |
Erforderlich |
Beschreibung |
operationId |
string |
Ja |
Die Vorgangs-ID. |
Fehlerverhalten
Wenn ein Fehler auftritt, gibt die Bibliothek einen CommonException
mit einem der folgenden Fehlercodes zurück:
Fehlercode |
AUTHORIZATION_FAIL (wenn der Reseller nicht der Inhaber des Betriebs ist) |
INTERNAL_SERVER_ERROR |
INVALID_OPERATION_ID |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-29 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-29 (UTC)."],[[["\u003cp\u003eAsynchronous API methods use \u003ccode\u003egetOperation\u003c/code\u003e to check the status of an operation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetOperation\u003c/code\u003e method requires the \u003ccode\u003eoperationId\u003c/code\u003e as a string in the \u003ccode\u003eGetOperationRequest\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCommonException\u003c/code\u003e is thrown if an error occurs during the operation.\u003c/p\u003e\n"],["\u003cp\u003ePossible error codes include \u003ccode\u003eAUTHORIZATION_FAIL\u003c/code\u003e, \u003ccode\u003eINTERNAL_SERVER_ERROR\u003c/code\u003e, and \u003ccode\u003eINVALID_OPERATION_ID\u003c/code\u003e.\u003c/p\u003e\n"]]],["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"],null,["# getOperation\n\nAsynchronous API methods return a result before the processing is complete. Use\n`getOperation` to retrieve the status of an asynchronous operation using its\n`operationId`.\n\nMethod signature\n----------------\n\n public Operation getOperation( GetOperationRequest request) throws CommonException;\n\nGetOperationRequest\n-------------------\n\n| Property name | Value | Required | Description |\n|---------------|----------|----------|-------------------|\n| `operationId` | `string` | Yes | The operation ID. |\n\nError behavior\n--------------\n\nIf an error occurs, the library throws a `CommonException` containing one of the\nfollowing error codes:\n\n| Error code |\n|------------------------------------------------------------------|\n| `AUTHORIZATION_FAIL` (if the reseller doesn't own the operation) |\n| `INTERNAL_SERVER_ERROR` |\n| `INVALID_OPERATION_ID` |"]]