لغو ناهمزمان را در یک عملیات طولانی مدت شروع می کند. سرور تمام تلاش خود را برای لغو عملیات انجام می دهد، اما موفقیت تضمین نشده است. اگر سرور از این روش پشتیبانی نمیکند، google.rpc.Code.UNIMPLEMENTED برمیگرداند. مشتریان میتوانند از Operations.GetOperation یا روشهای دیگر برای بررسی اینکه آیا لغو موفقیتآمیز بوده است یا اینکه علیرغم لغو، عملیات تکمیل شده است، استفاده کنند. در صورت لغو موفقیت آمیز، عملیات حذف نمی شود. در عوض، به عملیاتی با مقدار Operation.error با google.rpc.Status.code1 تبدیل می شود که مربوط به Code.CANCELLED است.
درخواست HTTP
POST https://vault.googleapis.com/v1/{name=operations/**}:cancel
تاریخ آخرین بهروزرسانی 2025-02-05 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-02-05 بهوقت ساعت هماهنگ جهانی."],[[["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"]]