Skip to content

Commit

Permalink
feat(admin): update the api
Browse files Browse the repository at this point in the history
#### admin:directory_v1

The following keys were added:
- resources.chromeosdevices.methods.action.deprecated (Total Keys: 1)
- resources.customer.resources.devices.resources.chromeos.methods.batchChangeStatus (Total Keys: 11)
- schemas.BatchChangeChromeOsDeviceStatusRequest (Total Keys: 6)
- schemas.BatchChangeChromeOsDeviceStatusResponse (Total Keys: 4)
- schemas.ChangeChromeOsDeviceStatusResult (Total Keys: 5)
- schemas.ChangeChromeOsDeviceStatusSucceeded (Total Keys: 2)
- schemas.Status (Total Keys: 8)
  • Loading branch information
yoshi-automation committed Jan 4, 2024
1 parent 1867bd5 commit 4296d58
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/dyn/admin_directory_v1.chromeosdevices.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1><a href="admin_directory_v1.html">Admin SDK API</a> . <a href="admin_directo
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#action">action(customerId, resourceId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).</p>
<p class="firstline">Use [BatchChangeChromeOsDeviceStatus](/admin-sdk/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. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
Expand All @@ -101,7 +101,7 @@ <h2>Instance Methods</h2>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="action">action(customerId, resourceId, body=None, x__xgafv=None)</code>
<pre>Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).
<pre>Use [BatchChangeChromeOsDeviceStatus](/admin-sdk/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. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).

Args:
customerId: string, The unique ID for the customer&#x27;s Google Workspace account. As an account administrator, you can also use the `my_customer` alias to represent your account&#x27;s `customerId`. The `customerId` is also returned as part of the [Users resource](/admin-sdk/directory/v1/reference/users). (required)
Expand Down
48 changes: 48 additions & 0 deletions docs/dyn/admin_directory_v1.customer.devices.chromeos.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,61 @@ <h2>Instance Methods</h2>
</p>
<p class="firstline">Returns the commands Resource.</p>

<p class="toc_element">
<code><a href="#batchChangeStatus">batchChangeStatus(customerId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Changes the status of a batch of ChromeOS devices. For more information about changing a ChromeOS device state [Repair, repurpose, or retire ChromeOS devices](https://support.google.com/chrome/a/answer/3523633).</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#issueCommand">issueCommand(customerId, deviceId, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Issues a command for the device to execute.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="batchChangeStatus">batchChangeStatus(customerId, body=None, x__xgafv=None)</code>
<pre>Changes the status of a batch of ChromeOS devices. For more information about changing a ChromeOS device state [Repair, repurpose, or retire ChromeOS devices](https://support.google.com/chrome/a/answer/3523633).

Args:
customerId: string, Required. Immutable ID of the Google Workspace account. (required)
body: object, The request body.
The object takes the form of:

{ # A request for changing the status of a batch of ChromeOS devices.
&quot;changeChromeOsDeviceStatusAction&quot;: &quot;A String&quot;, # Required. The action to take on the ChromeOS device in order to change its status.
&quot;deprovisionReason&quot;: &quot;A String&quot;, # Optional. The reason behind a device deprovision. Must be provided if &#x27;changeChromeOsDeviceStatusAction&#x27; is set to &#x27;CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DEPROVISION&#x27;. Otherwise, omit this field.
&quot;deviceIds&quot;: [ # Required. List of the IDs of the ChromeOS devices to change. Maximum 50.
&quot;A String&quot;,
],
}

x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format

Returns:
An object of the form:

{ # The response of changing the status of a batch of ChromeOS devices.
&quot;changeChromeOsDeviceStatusResults&quot;: [ # The results for each of the ChromeOS devices provided in the request.
{ # The result of a single ChromeOS device for a Change state operation.
&quot;deviceId&quot;: &quot;A String&quot;, # The unique ID of the ChromeOS device.
&quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure.
&quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
&quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
&quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
},
],
&quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
&quot;response&quot;: { # Response for a successful ChromeOS device status change. # The device could change its status successfully.
},
},
],
}</pre>
</div>

<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
}
}
},
"revision": "20231128",
"revision": "20240102",
"rootUrl": "https://admin.googleapis.com/",
"schemas": {
"Application": {
Expand Down
171 changes: 169 additions & 2 deletions googleapiclient/discovery_cache/documents/admin.directory_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@
"chromeosdevices": {
"methods": {
"action": {
"description": "Takes an action that affects a Chrome OS Device. This includes deprovisioning, disabling, and re-enabling devices. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).",
"deprecated": true,
"description": "Use [BatchChangeChromeOsDeviceStatus](/admin-sdk/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. *Warning:* * 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. * Lost or stolen devices should use the disable action. * 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. For more information about deprovisioning and disabling devices, visit the [help center](https://support.google.com/chrome/a/answer/3523633).",
"flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{resourceId}/action",
"httpMethod": "POST",
"id": "directory.chromeosdevices.action",
Expand Down Expand Up @@ -613,6 +614,33 @@
"resources": {
"chromeos": {
"methods": {
"batchChangeStatus": {
"description": "Changes the status of a batch of ChromeOS devices. For more information about changing a ChromeOS device state [Repair, repurpose, or retire ChromeOS devices](https://support.google.com/chrome/a/answer/3523633).",
"flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus",
"httpMethod": "POST",
"id": "admin.customer.devices.chromeos.batchChangeStatus",
"parameterOrder": [
"customerId"
],
"parameters": {
"customerId": {
"description": "Required. Immutable ID of the Google Workspace account.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "admin/directory/v1/customer/{customerId}/devices/chromeos:batchChangeStatus",
"request": {
"$ref": "BatchChangeChromeOsDeviceStatusRequest"
},
"response": {
"$ref": "BatchChangeChromeOsDeviceStatusResponse"
},
"scopes": [
"https://www.googleapis.com/auth/admin.directory.device.chromeos"
]
},
"issueCommand": {
"description": "Issues a command for the device to execute.",
"flatPath": "admin/directory/v1/customer/{customerId}/devices/chromeos/{deviceId}:issueCommand",
Expand Down Expand Up @@ -4643,7 +4671,7 @@
}
}
},
"revision": "20231128",
"revision": "20240102",
"rootUrl": "https://admin.googleapis.com/",
"schemas": {
"Alias": {
Expand Down Expand Up @@ -4782,6 +4810,93 @@
},
"type": "object"
},
"BatchChangeChromeOsDeviceStatusRequest": {
"description": "A request for changing the status of a batch of ChromeOS devices.",
"id": "BatchChangeChromeOsDeviceStatusRequest",
"properties": {
"changeChromeOsDeviceStatusAction": {
"description": "Required. The action to take on the ChromeOS device in order to change its status.",
"enum": [
"CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_UNSPECIFIED",
"CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DEPROVISION",
"CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DISABLE",
"CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_REENABLE"
],
"enumDescriptions": [
"Default value. Value is unused.",
"Deprovisions a ChromeOS device. If you have ChromeOS devices that are no longer being used in your organization, you should deprovision them so that you\u2019re no longer managing them. Deprovisioning the device removes all policies that were on the device as well as device-level printers and the ability to use the device as a kiosk. Depending on the upgrade that\u2019s associated with the device this action might release the license back into the license pool; which allows you to use the license on a different device.",
"Disables a ChromeOS device. Use this action if a user loses their device or it\u2019s stolen, this makes it such that the device is still managed, so it will still receive policies, but no one can use it. Depending on the upgrade that\u2019s associated with the device this action might release the license back into the license pool; which allows you to use the license on a different device.",
"Reenables a ChromeOS device to be used after being disabled. Reenables the device once it's no longer lost or it's been recovered. This allows the device to be used again. Depending on the upgrade associated with the device this might consume one license from the license pool, meaning that if there aren't enough licenses available the operation will fail."
],
"type": "string"
},
"deprovisionReason": {
"description": "Optional. The reason behind a device deprovision. Must be provided if 'changeChromeOsDeviceStatusAction' is set to 'CHANGE_CHROME_OS_DEVICE_STATUS_ACTION_DEPROVISION'. Otherwise, omit this field.",
"enum": [
"DEPROVISION_REASON_UNSPECIFIED",
"DEPROVISION_REASON_SAME_MODEL_REPLACEMENT",
"DEPROVISION_REASON_UPGRADE",
"DEPROVISION_REASON_DOMAIN_MOVE",
"DEPROVISION_REASON_SERVICE_EXPIRATION",
"DEPROVISION_REASON_OTHER",
"DEPROVISION_REASON_DIFFERENT_MODEL_REPLACEMENT",
"DEPROVISION_REASON_RETIRING_DEVICE",
"DEPROVISION_REASON_UPGRADE_TRANSFER",
"DEPROVISION_REASON_NOT_REQUIRED",
"DEPROVISION_REASON_REPAIR_CENTER"
],
"enumDeprecated": [
false,
false,
true,
true,
true,
true,
false,
false,
false,
false,
false
],
"enumDescriptions": [
"The deprovision reason is unknown.",
"Same model replacement. You have return materials authorization (RMA) or you are replacing a malfunctioning device under warranty with the same device model.",
"The device was upgraded.",
"The device's domain was changed.",
"Service expired for the device.",
"The device was deprovisioned for a legacy reason that is no longer supported.",
"Different model replacement. You are replacing this device with an upgraded or newer device model.",
"Retiring from fleet. You are donating, discarding, or otherwise removing the device from use.",
"ChromeOS Flex upgrade transfer. This is a ChromeOS Flex device that you are replacing with a Chromebook within a year.",
"A reason was not required. For example, the licenses were returned to the customer's license pool.",
"The device was deprovisioned by the Repair Service Center. Can only be set by Repair Service Center during RMA."
],
"type": "string"
},
"deviceIds": {
"description": "Required. List of the IDs of the ChromeOS devices to change. Maximum 50.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"BatchChangeChromeOsDeviceStatusResponse": {
"description": "The response of changing the status of a batch of ChromeOS devices.",
"id": "BatchChangeChromeOsDeviceStatusResponse",
"properties": {
"changeChromeOsDeviceStatusResults": {
"description": "The results for each of the ChromeOS devices provided in the request.",
"items": {
"$ref": "ChangeChromeOsDeviceStatusResult"
},
"type": "array"
}
},
"type": "object"
},
"BatchCreatePrintServersRequest": {
"description": "Request to add multiple new print servers in a batch.",
"id": "BatchCreatePrintServersRequest",
Expand Down Expand Up @@ -5151,6 +5266,31 @@
},
"type": "object"
},
"ChangeChromeOsDeviceStatusResult": {
"description": "The result of a single ChromeOS device for a Change state operation.",
"id": "ChangeChromeOsDeviceStatusResult",
"properties": {
"deviceId": {
"description": "The unique ID of the ChromeOS device.",
"type": "string"
},
"error": {
"$ref": "Status",
"description": "The error result of the operation in case of failure."
},
"response": {
"$ref": "ChangeChromeOsDeviceStatusSucceeded",
"description": "The device could change its status successfully."
}
},
"type": "object"
},
"ChangeChromeOsDeviceStatusSucceeded": {
"description": "Response for a successful ChromeOS device status change.",
"id": "ChangeChromeOsDeviceStatusSucceeded",
"properties": {},
"type": "object"
},
"Channel": {
"description": "An notification channel used to watch for resource changes.",
"id": "Channel",
Expand Down Expand Up @@ -7470,6 +7610,33 @@
},
"type": "object"
},
"Status": {
"description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
"id": "Status",
"properties": {
"code": {
"description": "The status code, which should be an enum value of google.rpc.Code.",
"format": "int32",
"type": "integer"
},
"details": {
"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
"items": {
"additionalProperties": {
"description": "Properties of the object. Contains field @type with type URL.",
"type": "any"
},
"type": "object"
},
"type": "array"
},
"message": {
"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
"type": "string"
}
},
"type": "object"
},
"Token": {
"description": "JSON template for token resource in Directory API.",
"id": "Token",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
}
}
},
"revision": "20231128",
"revision": "20240102",
"rootUrl": "https://admin.googleapis.com/",
"schemas": {
"Activities": {
Expand Down

0 comments on commit 4296d58

Please sign in to comment.