Method: operations.cancel
ज़्यादा समय तक चलने वाले ऑपरेशन को असिंक्रोनस तरीके से रद्द करने की प्रोसेस शुरू करता है. सर्वर, ऑपरेशन को रद्द करने की पूरी कोशिश करता है. हालांकि, इस बात की कोई गारंटी नहीं है कि ऑपरेशन रद्द हो जाएगा. अगर सर्वर पर यह तरीका काम नहीं करता है, तो यह google.rpc.Code.UNIMPLEMENTED
दिखाता है. क्लाइंट, Operations.GetOperation
या अन्य तरीकों का इस्तेमाल करके यह देख सकते हैं कि रद्द करने की प्रोसेस पूरी हुई या नहीं या रद्द करने के बावजूद ऑपरेशन पूरा हुआ या नहीं. रद्द करने की कार्रवाई पूरी होने पर, वह कार्रवाई नहीं मिटती. इसके बजाय, वह Code.CANCELLED
से जुड़ी 1
की google.rpc.Status.code
वैल्यू वाली Operation.error
वैल्यू वाली कार्रवाई बन जाती है.
एचटीटीपी अनुरोध
POST https://vault.googleapis.com/v1/{name=operations/**}:cancel
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
name |
string
उस ऑपरेशन रिसॉर्स का नाम जिसे रद्द करना है.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य भाग
अगर एपीआई सही से जुड़ जाता है, तो रिस्पॉन्स बॉडी में खाली JSON ऑब्जेक्ट होता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/ediscovery
ज़्यादा जानकारी के लिए, OAuth 2.0 Overview देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-02-06 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-02-06 (UTC) को अपडेट किया गया."],[[["Initiates the cancellation process for a long-running operation, although cancellation success is not guaranteed."],["Uses the `POST` method with a specific URL structure including the operation name for cancellation."],["Requires an empty request body and returns an empty response body upon successful cancellation."],["In case of unsupported cancellation by the server, an `UNIMPLEMENTED` error code is returned."],["If cancelled successfully, the operation is not deleted but marked with a `CANCELLED` status code."]]],["This document details the process of initiating asynchronous cancellation for a long-running operation. It uses an HTTP POST request to `vault.googleapis.com/v1/{name=operations/**}:cancel`. The `name` parameter specifies the operation to cancel. The request body must be empty, and a successful response returns an empty JSON object. The server attempts cancellation, and clients can check the status via `Operations.GetOperation`. Successful cancellation results in an `Operation.error` with `Code.CANCELLED`. Authorization requires the `https://www.googleapis.com/auth/ediscovery` OAuth scope.\n"]]