Method: drives.delete
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Xoá vĩnh viễn một bộ nhớ dùng chung mà người dùng là organizer
. Bộ nhớ dùng chung không thể chứa bất kỳ mục nào chưa bị xoá vào thùng rác. Để biết thêm thông tin, hãy xem bài viết Quản lý bộ nhớ dùng chung.
Yêu cầu HTTP
DELETE https://www.googleapis.com/drive/v3/drives/{driveId}
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Thông số |
driveId |
string
Mã nhận dạng của bộ nhớ dùng chung.
|
Tham số truy vấn
Thông số |
useDomainAdminAccess |
boolean
Đưa ra yêu cầu với tư cách là quản trị viên miền; nếu được đặt thành true, thì người yêu cầu sẽ được cấp quyền truy cập nếu họ là quản trị viên của miền mà bộ nhớ dùng chung thuộc về.
|
allowItemDeletion |
boolean
Có nên xoá cả những mục trong bộ nhớ dùng chung đó hay không. Bạn chỉ có thể sử dụng lựa chọn này khi useDomainAdminAccess cũng được đặt thành true .
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ là một đối tượng JSON trống.
Phạm vi uỷ quyền
Yêu cầu phạm vi OAuth sau:
https://www.googleapis.com/auth/drive
Một số phạm vi bị hạn chế và yêu cầu bạn phải đánh giá bảo mật để ứng dụng của bạn có thể sử dụng các phạm vi đó. Để biết thêm thông tin, hãy xem Hướng dẫn uỷ quyền.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-13 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-13 UTC."],[],[],null,["# Method: drives.delete\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nPermanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items. For more information, see [Manage shared drives](https://developers.google.com/workspace/drive/api/guides/manage-shareddrives).\n\n### HTTP request\n\n`DELETE https://www.googleapis.com/drive/v3/drives/{driveId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------|--------------------------------------|\n| `driveId` | `string` The ID of the shared drive. |\n\n### Query parameters\n\n| Parameters ||\n|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `useDomainAdminAccess` | `boolean` Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. |\n| `allowItemDeletion` | `boolean` Whether any items inside the shared drive should also be deleted. This option is only supported when `useDomainAdminAccess` is also set to `true`. |\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 the following OAuth scope:\n\n- `https://www.googleapis.com/auth/drive`\n\nSome scopes are restricted and require a security assessment for your app to use them. For more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]