printers
Creates, updates, deletes, gets or lists a printers
resource.
Overview
Name | printers |
Type | Resource |
Id | googleadmin.directory.printers |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Id of the printer. (During printer creation leave empty) |
name | string | Identifier. The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty) |
auxiliaryMessages | array | Output only. Auxiliary messages about issues with the printer configuration if any. |
createTime | string (google-datetime) | Output only. Time when printer was created. |
description | string | Editable. Description of printer. |
displayName | string | Editable. Name of printer. |
makeAndModel | string | Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response. |
orgUnitId | string | Organization Unit that owns this printer (Only can be set during Printer creation) |
uri | string | Editable. Printer URI. |
useDriverlessConfig | boolean | Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | Id of the printer. (During printer creation leave empty) |
name | string | Identifier. The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty) |
auxiliaryMessages | array | Output only. Auxiliary messages about issues with the printer configuration if any. |
createTime | string (google-datetime) | Output only. Time when printer was created. |
description | string | Editable. Description of printer. |
displayName | string | Editable. Name of printer. |
makeAndModel | string | Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response. |
orgUnitId | string | Organization Unit that owns this printer (Only can be set during Printer creation) |
uri | string | Editable. Printer URI. |
useDriverlessConfig | boolean | Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | customersId , printersId | Returns a Printer resource (printer's config). | |
list | select | customersId | pageSize , pageToken , orgUnitId , filter , orderBy | List printers configs. |
create | insert | customersId | Creates a printer under given Organization Unit. | |
batch_create_printers | insert | customersId | Creates printers under given Organization Unit. | |
patch | update | customersId , printersId | updateMask , clearMask | Updates a Printer resource. |
delete | delete | customersId , printersId | Deletes a Printer . | |
batch_delete_printers | delete | customersId | Deletes printers in batch. |
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.
Name | Datatype | Description |
---|---|---|
customersId | string | |
printersId | string | |
clearMask | string (google-fieldmask) | |
filter | string | |
orderBy | string | |
orgUnitId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Returns a Printer
resource (printer's config).
SELECT
id,
name,
auxiliaryMessages,
createTime,
description,
displayName,
makeAndModel,
orgUnitId,
uri,
useDriverlessConfig
FROM googleadmin.directory.printers
WHERE customersId = '{{ customersId }}' -- required
AND printersId = '{{ printersId }}' -- required;
List printers configs.
SELECT
id,
name,
auxiliaryMessages,
createTime,
description,
displayName,
makeAndModel,
orgUnitId,
uri,
useDriverlessConfig
FROM googleadmin.directory.printers
WHERE customersId = '{{ customersId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orgUnitId = '{{ orgUnitId }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- batch_create_printers
- Manifest
Creates a printer under given Organization Unit.
INSERT INTO googleadmin.directory.printers (
data__name,
data__id,
data__displayName,
data__description,
data__makeAndModel,
data__uri,
data__orgUnitId,
data__useDriverlessConfig,
customersId
)
SELECT
'{{ name }}',
'{{ id }}',
'{{ displayName }}',
'{{ description }}',
'{{ makeAndModel }}',
'{{ uri }}',
'{{ orgUnitId }}',
{{ useDriverlessConfig }},
'{{ customersId }}'
RETURNING
id,
name,
auxiliaryMessages,
createTime,
description,
displayName,
makeAndModel,
orgUnitId,
uri,
useDriverlessConfig
;
Creates printers under given Organization Unit.
INSERT INTO googleadmin.directory.printers (
data__requests,
customersId
)
SELECT
'{{ requests }}',
'{{ customersId }}'
RETURNING
failures,
printers
;
# Description fields are for documentation purposes
- name: printers
props:
- name: customersId
value: string
description: Required parameter for the printers resource.
- name: name
value: string
description: >
Identifier. The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
- name: id
value: string
description: >
Id of the printer. (During printer creation leave empty)
- name: displayName
value: string
description: >
Editable. Name of printer.
- name: description
value: string
description: >
Editable. Description of printer.
- name: makeAndModel
value: string
description: >
Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
- name: uri
value: string
description: >
Editable. Printer URI.
- name: orgUnitId
value: string
description: >
Organization Unit that owns this printer (Only can be set during Printer creation)
- name: useDriverlessConfig
value: boolean
description: >
Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
- name: requests
value: array
description: >
A list of Printers to be created. Max 50 at a time.
UPDATE
examples
- patch
Updates a Printer
resource.
UPDATE googleadmin.directory.printers
SET
data__name = '{{ name }}',
data__id = '{{ id }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__makeAndModel = '{{ makeAndModel }}',
data__uri = '{{ uri }}',
data__orgUnitId = '{{ orgUnitId }}',
data__useDriverlessConfig = {{ useDriverlessConfig }}
WHERE
customersId = '{{ customersId }}' --required
AND printersId = '{{ printersId }}' --required
AND updateMask = '{{ updateMask}}'
AND clearMask = '{{ clearMask}}'
RETURNING
id,
name,
auxiliaryMessages,
createTime,
description,
displayName,
makeAndModel,
orgUnitId,
uri,
useDriverlessConfig;
DELETE
examples
- delete
- batch_delete_printers
Deletes a Printer
.
DELETE FROM googleadmin.directory.printers
WHERE customersId = '{{ customersId }}' --required
AND printersId = '{{ printersId }}' --required;
Deletes printers in batch.
DELETE FROM googleadmin.directory.printers
WHERE customersId = '{{ customersId }}' --required;