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.
Thay vào đó, hãy sử dụng BatchChangeChromeOsDeviceStatus. Thực hiện hành động ảnh hưởng đến Thiết bị Chrome OS. Chỉ số này bao gồm việc huỷ cấp phép, tắt và bật lại thiết bị.
Yêu cầu HTTP
POST https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action
Mã nhận dạng duy nhất cho tài khoản Google Workspace của khách hàng. Là quản trị viên tài khoản, bạn cũng có thể sử dụng bí danh my_customer để đại diện cho customerId của tài khoản. customerId cũng được trả về trong tài nguyên Người dùng.
resourceId
string
Mã nhận dạng duy nhất của thiết bị. resourceId được trả về trong phản hồi từ phương thức chromeosdevices.list.
Dữ liệu về nội dung cập nhật trạng thái của một thiết bị Chrome OS.
Biểu diễn dưới dạng JSON
{"action": string,"deprovisionReason": string}
Trường
action
string
chromeosdevices.action sẽ được thực hiện trên thiết bị Chrome OS.
Các giá trị được chấp nhận là:
deprovision: Xoá một thiết bị khỏi hoạt động quản lý vì thiết bị đó không còn hoạt động, đang được bán lại hoặc đang được gửi để trả lại / sửa chữa, hãy sử dụng thao tác huỷ cấp phép để tách thiết bị đó khỏi hoạt động quản lý.
disable: Nếu cho rằng một thiết bị trong tổ chức của bạn đã bị mất hoặc bị đánh cắp, bạn có thể tắt thiết bị đó để không ai khác có thể sử dụng. Khi một thiết bị bị vô hiệu hoá, người dùng sẽ chỉ thấy một màn hình thông báo rằng thiết bị đã bị vô hiệu hoá và thông tin liên hệ mà bạn muốn cung cấp về nơi trả lại thiết bị.
reenable: Bật lại một thiết bị đã tắt khi tìm thấy thiết bị bị thất lạc hoặc trả lại thiết bị bị mất. Bạn cũng có thể sử dụng tính năng này nếu vô tình đánh dấu một thiết bị Chrome là đã tắt.
pre_provisioned_disable: Thiết bị được cấp trước không thể đăng ký. Quản trị viên có thể bật lại thiết bị để cho phép Quy trình đăng ký không tiếp xúc bằng cách thay đổi trạng thái thành "pre_provisioned_reenable". Lưu ý: Ở trạng thái này, bạn có thể huỷ cấp phép thiết bị.
pre_provisioned_reenable: Thiết bị được nhà sản xuất thiết bị gốc (OEM) cấp trước. Những thiết bị ở trạng thái này đủ điều kiện sử dụng tính năng Thiết lập tự động.
deprovisionReason
string
Chỉ được dùng khi hành động là huỷ cấp phép. Với thao tác huỷ cấp phép, trường này là bắt buộc.
Các giá trị được chấp nhận là:
different_model_replacement: Sử dụng nếu bạn đang nâng cấp hoặc thay thế thiết bị bằng một mẫu mới hơn của cùng một thiết bị.
retiring_device: Sử dụng nếu bạn bán lại, quyên góp hoặc ngừng sử dụng thiết bị vĩnh viễn.
same_model_replacement: Sử dụng nếu thiết bị gặp sự cố phần cứng và thiết bị đó đang được thay thế bằng cùng một mẫu hoặc một mẫu thay thế tương tự từ nhà cung cấp / nhà sản xuất dịch vụ sửa chữa.
upgrade_transfer: Sử dụng nếu bạn thay thế thiết bị CloudReady bằng Chromebook trong vòng một năm.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Method: chromeosdevices.action\n\n| This item is deprecated!\nUse [BatchChangeChromeOsDeviceStatus](https://developers.google.com/workspace/admin/directory/reference/rest/v1/customer.devices.chromeos/batchChangeStatus) instead. Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices.\n| **Warning:**\n|\n| \u003cbr /\u003e\n|\n| - Deprovisioning a device will stop device policy syncing and remove device-level printers. After a device is deprovisioned, it must be wiped before it can be re-enrolled.\n| - Lost or stolen devices should use the disable action.\n| - Re-enabling a disabled device will consume a device license. If you do not have sufficient licenses available when completing the re-enable action, you will receive an error. \n| For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).\n\n### HTTP request\n\n`POST https://admin.googleapis.com/admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customerId` | `string` The unique ID for the customer's Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account's `customerId`. The `customerId` is also returned as part of the [Users resource](https://developers.google.com/workspace/admin/directory/v1/reference/users). |\n| `resourceId` | `string` The unique ID of the device. The `resourceId`s are returned in the response from the [chromeosdevices.list](https://developers.google.com/workspace/admin/directory/v1/reference/chromeosdevices/list) method. |\n\n### Request body\n\nThe request body contains an instance of [ChromeOsDeviceAction](/workspace/admin/directory/reference/rest/v1/chromeosdevices/action#ChromeOsDeviceAction).\n\n### Response body\n\nIf successful, the response is a generic HTTP response whose format is defined by the method.\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.directory.device.chromeos`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nChromeOsDeviceAction\n--------------------\n\nData about an update to the status of a Chrome OS device.\n\n| JSON representation |\n|-----------------------------------------------------------|\n| ``` { \"action\": string, \"deprovisionReason\": string } ``` |\n\n| Fields ||\n|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `action` | `string` \u003cbr /\u003e chromeosdevices.action to be taken on the Chrome OS device. Acceptable values are: - `deprovision`: Remove a device from management that is no longer active, being resold, or is being submitted for return / repair, use the deprovision action to dissociate it from management. - `disable`: If you believe a device in your organization has been lost or stolen, you can disable the device so that no one else can use it. When a device is disabled, all the user can see when turning on the Chrome device is a screen telling them that it's been disabled, and your desired contact information of where to return the device.**Note**: Configuration of the message to appear on a disabled device must be completed within the Admin Console. - `reenable`: Re-enable a disabled device when a misplaced device is found or a lost device is returned. You can also use this feature if you accidentally mark a Chrome device as disabled.**Note**: The re-enable action can only be performed on devices marked as disabled. - `pre_provisioned_disable`: A pre-provisioned device that cannot enroll. An admin can re-enable the device to allow Zero-Touch Enrollment by changing the status to \"pre_provisioned_reenable\". **Note**: From this state the device can be deprovisioned. - `pre_provisioned_reenable`: Device is pre-provisioned by OEMs. Devices in this state are eligible for Zero-Touch Enrollment. |\n| `deprovisionReason` | `string` \u003cbr /\u003e Only used when the action is deprovision. With the deprovision action, this field is required. \u003cbr /\u003e | **Note**: The deprovision reason is audited because it might have implications on licenses for perpetual subscription customers. \u003cbr /\u003e Acceptable values are: - `different_model_replacement`: Use if you're upgrading or replacing your device with a newer model of the same device. - `retiring_device`: Use if you're reselling, donating, or permanently removing the device from use. - `same_model_replacement`: Use if a hardware issue was encountered on a device and it is being replaced with the same model or a like-model replacement from a repair vendor / manufacturer. - `upgrade_transfer`: Use if you're replacing your Cloud Ready devices with Chromebooks within one year. |"]]