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