Bắt đầu huỷ không đồng bộ trên một thao tác chạy trong thời gian dài. Máy chủ sẽ cố gắng hết sức để huỷ thao tác, nhưng không đảm bảo sẽ huỷ thành công. Nếu không hỗ trợ phương thức này, máy chủ sẽ trả về google.rpc.Code.UNIMPLEMENTED. Ứng dụng có thể sử dụng Operations.GetOperation hoặc các phương thức khác để kiểm tra xem thao tác huỷ có thành công hay không hoặc liệu thao tác có hoàn tất mặc dù đã huỷ hay không. Khi huỷ thành công, thao tác sẽ không bị xoá; thay vào đó, thao tác đó sẽ trở thành một thao tác có giá trị Operation.error với google.rpc.Status.code là 1, tương ứng với Code.CANCELLED.
Yêu cầu HTTP
POST https://routeoptimization.googleapis.com/v1/{name=operations/**}:cancel
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-02-10 UTC."],[[["This document details how to cancel a long-running Route Optimization operation using a `POST` request to a specific URL."],["Cancellation is attempted but not guaranteed, and the operation's status can be checked using the `Operations.GetOperation` method."],["Successful cancellation results in the operation having an error code indicating it was canceled but the operation itself is not deleted."],["The request must have an empty body and include the operation's name as a path parameter."],["Authorization requires the `https://www.googleapis.com/auth/cloud-platform` OAuth scope."]]],[]]