Method: enterprises.devices.operations.cancel
يبدأ إلغاء غير متزامن لعملية تستغرق وقتًا طويلاً. يبذل الخادم قصارى جهده لإلغاء العملية، ولكن لا يمكن ضمان نجاح ذلك. إذا كان الخادم لا يتيح هذه الطريقة، يتم عرض google.rpc.Code.UNIMPLEMENTED
. يمكن للعملاء استخدام Operations.GetOperation
أو طرق أخرى للتحقّق مما إذا تم إلغاء الاشتراك أو اكتمال العملية على الرغم من إلغاء الاشتراك. في حال إلغاء العملية بنجاح، لا يتم حذفها، بل تصبح عملية ذات قيمة Operation.error
وgoogle.rpc.Status.code
= 1
، ما يعادل Code.CANCELLED
.
طلب HTTP
POST https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*/operations/*}:cancel
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
name |
string
اسم مورد العملية المطلوب إلغاؤه.
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يكون نص الاستجابة هو عنصر JSON فارغ.
نطاقات التفويض
يجب توفير نطاق OAuth التالي:
https://www.googleapis.com/auth/androidmanagement
لمزيد من المعلومات، يُرجى الاطّلاع على OAuth 2.0 Overview.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-01-30 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-01-30 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]