הפונקציה מתחילה ביטול אסינכרוני של פעולה ממושכת. השרת עושה כמיטב יכולתו כדי לבטל את הפעולה, אבל אי אפשר להבטיח שהיא תבוטל. אם השרת לא תומך בשיטה הזו, הוא מחזיר את הערך google.rpc.Code.UNIMPLEMENTED. לקוחות יכולים להשתמש ב-Operations.GetOperation או בשיטות אחרות כדי לבדוק אם הביטול בוצע או אם הפעולה הושלמה למרות הביטול. אם הביטול בוצע בהצלחה, הפעולה לא נמחקת. במקום זאת, היא הופכת לפעולה עם ערך Operation.error עם google.rpc.Status.code של 1, שתואם ל-Code.CANCELLED.
בקשת HTTP
POST https://routeoptimization.googleapis.com/v1/{name=operations/**}:cancel
[[["התוכן קל להבנה","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-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."]]],[]]