Method: projects.operations.cancel
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เริ่มการยกเลิกแบบไม่พร้อมกันในการดำเนินการที่ใช้เวลานาน เซิร์ฟเวอร์จะพยายามยกเลิกการดำเนินการอย่างเต็มที่ แต่ไม่ได้รับประกันว่าจะสำเร็จ หากเซิร์ฟเวอร์ไม่รองรับวิธีนี้ ระบบจะแสดงผลเป็น google.rpc.Code.UNIMPLEMENTED
ลูกค้าสามารถใช้ Operations.GetOperation
หรือวิธีอื่นๆ เพื่อตรวจสอบว่าการยกเลิกสําเร็จหรือไม่ หรือการดำเนินการเสร็จสมบูรณ์แม้จะมีการยกเลิกหรือไม่ เมื่อยกเลิกสำเร็จ ระบบจะไม่ลบการดำเนินการ แต่การดำเนินการจะกลายเป็นการดำเนินการที่มีค่า Operation.error
ที่มี google.rpc.Status.code
เป็น 1
ซึ่งสอดคล้องกับ Code.CANCELLED
คำขอ HTTP
POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:cancel
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์เส้นทาง
พารามิเตอร์ |
name |
string
ชื่อของทรัพยากรการดำเนินการที่จะยกเลิก
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะเป็นออบเจ็กต์ JSON ว่าง
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth ต่อไปนี้
https://www.googleapis.com/auth/earthengine
https://www.googleapis.com/auth/cloud-platform
ดูข้อมูลเพิ่มเติมได้ที่ OAuth 2.0 Overview
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eInitiates an asynchronous cancellation request for a long-running Earth Engine operation, with no guarantee of success and returning \u003ccode\u003egoogle.rpc.Code.UNIMPLEMENTED\u003c/code\u003e if unsupported by the server.\u003c/p\u003e\n"],["\u003cp\u003eClients should use alternative methods such as \u003ccode\u003eOperations.GetOperation\u003c/code\u003e to confirm cancellation success or if the operation completed despite the request.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful cancellation marks the operation with an error having a \u003ccode\u003egoogle.rpc.Status.code\u003c/code\u003e of 1 (\u003ccode\u003eCode.CANCELLED\u003c/code\u003e) instead of deleting it.\u003c/p\u003e\n"],["\u003cp\u003eThis request requires an empty body and utilizes the \u003ccode\u003ePOST\u003c/code\u003e method with specific path parameters and authorization scopes documented.\u003c/p\u003e\n"]]],[],null,["# Method: projects.operations.cancel\n\nStarts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use [Operations.GetOperation](/earth-engine/reference/rest/v1alpha/projects.operations/get#google.longrunning.Operations.GetOperation) or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an [Operation.error](/earth-engine/reference/rest/Shared.Types/ListOperationsResponse#Operation.FIELDS.error) value with a [google.rpc.Status.code](/earth-engine/reference/rest/Shared.Types/ListOperationsResponse#Status.FIELDS.code) of `1`, corresponding to `Code.CANCELLED`.\n\n### HTTP request\n\n`POST https://earthengine.googleapis.com/v1alpha/{name=projects/*/operations/**}:cancel`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------|\n| `name` | `string` The name of the operation resource to be cancelled. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body is an empty JSON object.\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/earthengine`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]