Skip to main content

commands

Creates, updates, deletes, gets or lists a commands resource.

Overview

Namecommands
TypeResource
Idgoogleadmin.directory.commands

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
commandExpireTimestring (google-datetime)The time at which the command will expire. If the device doesn't execute the command within this time the command will become expired.
commandIdstring (int64)Unique ID of a device command.
commandResultobjectThe result of the command execution. (id: DirectoryChromeosdevicesCommandResult)
issueTimestring (google-datetime)The timestamp when the command was issued by the admin.
payloadstringThe payload that the command specified, if any.
statestringIndicates the command state. (STATE_UNSPECIFIED, PENDING, EXPIRED, CANCELLED, SENT_TO_CLIENT, ACKED_BY_CLIENT, EXECUTED_BY_CLIENT)
typestringThe type of the command. (COMMAND_TYPE_UNSPECIFIED, REBOOT, TAKE_A_SCREENSHOT, SET_VOLUME, WIPE_USERS, REMOTE_POWERWASH, DEVICE_START_CRD_SESSION, CAPTURE_LOGS, FETCH_CRD_AVAILABILITY_INFO, FETCH_SUPPORT_PACKET)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcustomerId, deviceId, commandIdGets command data a specific command issued to the device.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
commandIdstring
customerIdstring
deviceIdstring

SELECT examples

Gets command data a specific command issued to the device.

SELECT
commandExpireTime,
commandId,
commandResult,
issueTime,
payload,
state,
type
FROM googleadmin.directory.commands
WHERE customerId = '{{ customerId }}' -- required
AND deviceId = '{{ deviceId }}' -- required
AND commandId = '{{ commandId }}' -- required
;