Method: enterprises.devices.operations.cancel
ज़्यादा समय तक चलने वाले ऑपरेशन को असिंक्रोनस तरीके से रद्द करने की प्रोसेस शुरू करता है. सर्वर, ऑपरेशन को रद्द करने की पूरी कोशिश करता है. हालांकि, इस बात की कोई गारंटी नहीं है कि ऑपरेशन रद्द हो जाएगा. अगर सर्वर पर यह तरीका काम नहीं करता है, तो यह google.rpc.Code.UNIMPLEMENTED
दिखाता है. क्लाइंट, Operations.GetOperation
या अन्य तरीकों का इस्तेमाल करके यह देख सकते हैं कि रद्द करने की प्रोसेस पूरी हुई या नहीं या रद्द करने के बावजूद ऑपरेशन पूरा हुआ या नहीं. रद्द करने की कार्रवाई पूरी होने पर, वह कार्रवाई नहीं मिटती. इसके बजाय, वह Code.CANCELLED
से जुड़ी 1
की google.rpc.Status.code
वैल्यू वाली Operation.error
वैल्यू वाली कार्रवाई बन जाती है.
एचटीटीपी अनुरोध
POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*/operations/*}:cancel
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
name |
string
उस ऑपरेशन रिसॉर्स का नाम जिसे रद्द करना है.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य भाग
अगर एपीआई सही से जुड़ जाता है, तो रिस्पॉन्स बॉडी में खाली JSON ऑब्जेक्ट होता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/androidmanagement
ज़्यादा जानकारी के लिए, OAuth 2.0 Overview देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-01-30 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-01-30 (UTC) को अपडेट किया गया."],[[["Cancels a long-running operation asynchronously, with the server making a best effort to cancel the operation but success is not guaranteed."],["Uses an HTTP POST request to `https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*/operations/*}:cancel` with the operation name as a path parameter and an empty request body."],["If cancellation is successful, the response body will be empty and the operation will have an error value with a code of 1, indicating cancellation."],["Requires authorization with the `https://www.googleapis.com/auth/androidmanagement` OAuth scope."]]],["This document details the process of initiating asynchronous cancellation for a long-running operation. The core action is sending a `POST` request to a specific URL, defined by a path parameter `name`, indicating the operation to cancel. The request body must be empty. A successful cancellation results in an empty JSON object response, and the operation's error code is set to `1` (`Code.CANCELLED`). The authorization requires the `https://www.googleapis.com/auth/androidmanagement` OAuth scope. The server might not support this method, and cancellation is not guaranteed.\n"]]