Admin SDK API . customers . chrome . printers

Instance Methods

batchCreatePrinters(parent, body=None, x__xgafv=None)

Creates printers under given Organization Unit.

batchDeletePrinters(parent, body=None, x__xgafv=None)

Deletes printers in batch.

close()

Close httplib2 connections.

create(parent, body=None, x__xgafv=None)

Creates a printer under given Organization Unit.

delete(name, x__xgafv=None)

Deletes a `Printer`.

get(name, x__xgafv=None)

Returns a `Printer` resource (printer's config).

list(parent, filter=None, orgUnitId=None, pageSize=None, pageToken=None, x__xgafv=None)

List printers configs.

listPrinterModels(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists the supported printer models.

listPrinterModels_next(previous_request, previous_response)

Retrieves the next page of results.

list_next(previous_request, previous_response)

Retrieves the next page of results.

patch(name, body=None, clearMask=None, updateMask=None, x__xgafv=None)

Updates a `Printer` resource.

Method Details

batchCreatePrinters(parent, body=None, x__xgafv=None)
Creates printers under given Organization Unit.

Args:
  parent: string, Required. The name of the customer. Format: customers/{customer_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request for adding new printers in batch.
  "requests": [ # A list of Printers to be created. Max 50 at a time.
    { # Request for adding a new printer.
      "parent": "A String", # Required. The name of the customer. Format: customers/{customer_id}
      "printer": { # Printer configuration. # Required. A printer to create. If you want to place the printer under particular OU then populate printer.org_unit_id filed. Otherwise the printer will be placed under root OU.
        "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
          { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
            "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
            "fieldMask": "A String", # Field that this message concerns.
            "severity": "A String", # Message severity
          },
        ],
        "createTime": "A String", # Output only. Time when printer was created.
        "description": "A String", # Editable. Description of printer.
        "displayName": "A String", # Editable. Name of printer.
        "id": "A String", # Id of the printer. (During printer creation leave empty)
        "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
        "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
        "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
        "uri": "A String", # Editable. Printer URI.
        "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
      },
    },
  ],
}

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

Returns:
  An object of the form:

    { # Response for adding new printers in batch.
  "failures": [ # A list of create failures. Printer IDs are not populated, as printer were not created.
    { # Info about failures
      "errorCode": "A String", # Canonical code for why the update failed to apply.
      "errorMessage": "A String", # Failure reason message.
      "printer": { # Printer configuration. # Failed printer.
        "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
          { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
            "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
            "fieldMask": "A String", # Field that this message concerns.
            "severity": "A String", # Message severity
          },
        ],
        "createTime": "A String", # Output only. Time when printer was created.
        "description": "A String", # Editable. Description of printer.
        "displayName": "A String", # Editable. Name of printer.
        "id": "A String", # Id of the printer. (During printer creation leave empty)
        "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
        "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
        "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
        "uri": "A String", # Editable. Printer URI.
        "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
      },
      "printerId": "A String", # Id of a failed printer.
    },
  ],
  "printers": [ # A list of successfully created printers with their IDs populated.
    { # Printer configuration.
      "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
        { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
          "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
          "fieldMask": "A String", # Field that this message concerns.
          "severity": "A String", # Message severity
        },
      ],
      "createTime": "A String", # Output only. Time when printer was created.
      "description": "A String", # Editable. Description of printer.
      "displayName": "A String", # Editable. Name of printer.
      "id": "A String", # Id of the printer. (During printer creation leave empty)
      "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
      "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
      "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
      "uri": "A String", # Editable. Printer URI.
      "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
    },
  ],
}
batchDeletePrinters(parent, body=None, x__xgafv=None)
Deletes printers in batch.

Args:
  parent: string, Required. The name of the customer. Format: customers/{customer_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Request for deleting existing printers in batch.
  "printerIds": [ # A list of Printer.id that should be deleted. Max 100 at a time.
    "A String",
  ],
}

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

Returns:
  An object of the form:

    { # Response for deleting existing printers in batch.
  "failedPrinters": [ # A list of update failures.
    { # Info about failures
      "errorCode": "A String", # Canonical code for why the update failed to apply.
      "errorMessage": "A String", # Failure reason message.
      "printer": { # Printer configuration. # Failed printer.
        "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
          { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
            "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
            "fieldMask": "A String", # Field that this message concerns.
            "severity": "A String", # Message severity
          },
        ],
        "createTime": "A String", # Output only. Time when printer was created.
        "description": "A String", # Editable. Description of printer.
        "displayName": "A String", # Editable. Name of printer.
        "id": "A String", # Id of the printer. (During printer creation leave empty)
        "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
        "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
        "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
        "uri": "A String", # Editable. Printer URI.
        "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
      },
      "printerId": "A String", # Id of a failed printer.
    },
  ],
  "printerIds": [ # A list of Printer.id that were successfully deleted.
    "A String",
  ],
}
close()
Close httplib2 connections.
create(parent, body=None, x__xgafv=None)
Creates a printer under given Organization Unit.

Args:
  parent: string, Required. The name of the customer. Format: customers/{customer_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Printer configuration.
  "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
    { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
      "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
      "fieldMask": "A String", # Field that this message concerns.
      "severity": "A String", # Message severity
    },
  ],
  "createTime": "A String", # Output only. Time when printer was created.
  "description": "A String", # Editable. Description of printer.
  "displayName": "A String", # Editable. Name of printer.
  "id": "A String", # Id of the printer. (During printer creation leave empty)
  "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
  "uri": "A String", # Editable. Printer URI.
  "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
}

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

Returns:
  An object of the form:

    { # Printer configuration.
  "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
    { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
      "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
      "fieldMask": "A String", # Field that this message concerns.
      "severity": "A String", # Message severity
    },
  ],
  "createTime": "A String", # Output only. Time when printer was created.
  "description": "A String", # Editable. Description of printer.
  "displayName": "A String", # Editable. Name of printer.
  "id": "A String", # Id of the printer. (During printer creation leave empty)
  "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
  "uri": "A String", # Editable. Printer URI.
  "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
}
delete(name, x__xgafv=None)
Deletes a `Printer`.

Args:
  name: string, Required. The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}
get(name, x__xgafv=None)
Returns a `Printer` resource (printer's config).

Args:
  name: string, Required. The name of the printer to retrieve. Format: customers/{customer_id}/chrome/printers/{printer_id} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Printer configuration.
  "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
    { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
      "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
      "fieldMask": "A String", # Field that this message concerns.
      "severity": "A String", # Message severity
    },
  ],
  "createTime": "A String", # Output only. Time when printer was created.
  "description": "A String", # Editable. Description of printer.
  "displayName": "A String", # Editable. Name of printer.
  "id": "A String", # Id of the printer. (During printer creation leave empty)
  "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
  "uri": "A String", # Editable. Printer URI.
  "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
}
list(parent, filter=None, orgUnitId=None, pageSize=None, pageToken=None, x__xgafv=None)
List printers configs.

Args:
  parent: string, Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id} (required)
  filter: string, Search query. Search syntax is shared between this api and Admin Console printers pages.
  orgUnitId: string, Organization Unit that we want to list the printers for. When org_unit is not present in the request then all printers of the customer are returned (or filtered). When org_unit is present in the request then only printers available to this OU will be returned (owned or inherited). You may see if printer is owned or inherited for this OU by looking at Printer.org_unit_id.
  pageSize: integer, The maximum number of objects to return. The service may return fewer than this value.
  pageToken: string, A page token, received from a previous call.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for listing printers.
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  "printers": [ # List of printers. If `org_unit_id` was given in the request, then only printers visible for this OU will be returned. If `org_unit_id` was given in the request, then all printers will be returned.
    { # Printer configuration.
      "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
        { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
          "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
          "fieldMask": "A String", # Field that this message concerns.
          "severity": "A String", # Message severity
        },
      ],
      "createTime": "A String", # Output only. Time when printer was created.
      "description": "A String", # Editable. Description of printer.
      "displayName": "A String", # Editable. Name of printer.
      "id": "A String", # Id of the printer. (During printer creation leave empty)
      "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
      "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
      "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
      "uri": "A String", # Editable. Printer URI.
      "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
    },
  ],
}
listPrinterModels(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists the supported printer models.

Args:
  parent: string, Required. The name of the customer who owns this collection of printers. Format: customers/{customer_id} (required)
  filter: string, Filer to list only models by a given manufacturer in format: "manufacturer:Brother". Search syntax is shared between this api and Admin Console printers pages.
  pageSize: integer, The maximum number of objects to return. The service may return fewer than this value.
  pageToken: string, A page token, received from a previous call.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for listing allowed printer models.
  "nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
  "printerModels": [ # Printer models that are currently allowed to be configured for ChromeOs. Some printers may be added or removed over time.
    { # Printer manufacturer and model
      "displayName": "A String", # Display name. eq. "Brother MFC-8840D"
      "makeAndModel": "A String", # Make and model as represented in "make_and_model" field in Printer object. eq. "brother mfc-8840d"
      "manufacturer": "A String", # Manufacturer. eq. "Brother"
    },
  ],
}
listPrinterModels_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
patch(name, body=None, clearMask=None, updateMask=None, x__xgafv=None)
Updates a `Printer` resource.

Args:
  name: string, The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty) (required)
  body: object, The request body.
    The object takes the form of:

{ # Printer configuration.
  "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
    { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
      "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
      "fieldMask": "A String", # Field that this message concerns.
      "severity": "A String", # Message severity
    },
  ],
  "createTime": "A String", # Output only. Time when printer was created.
  "description": "A String", # Editable. Description of printer.
  "displayName": "A String", # Editable. Name of printer.
  "id": "A String", # Id of the printer. (During printer creation leave empty)
  "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
  "uri": "A String", # Editable. Printer URI.
  "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
}

  clearMask: string, The list of fields to be cleared. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.
  updateMask: string, The list of fields to be updated. Note, some of the fields are read only and cannot be updated. Values for not specified fields will be patched.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Printer configuration.
  "auxiliaryMessages": [ # Output only. Auxiliary messages about issues with the printer configuration if any.
    { # Auxiliary message about issues with printers or settings. Example: {message_type:AUXILIARY_MESSAGE_WARNING, field_mask:make_and_model, message:"Given printer is invalid or no longer supported."}
      "auxiliaryMessage": "A String", # Human readable message in English. Example: "Given printer is invalid or no longer supported."
      "fieldMask": "A String", # Field that this message concerns.
      "severity": "A String", # Message severity
    },
  ],
  "createTime": "A String", # Output only. Time when printer was created.
  "description": "A String", # Editable. Description of printer.
  "displayName": "A String", # Editable. Name of printer.
  "id": "A String", # Id of the printer. (During printer creation leave empty)
  "makeAndModel": "A String", # Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in ListPrinterModels response.
  "name": "A String", # The resource name of the Printer object, in the format customers/{customer-id}/printers/{printer-id} (During printer creation leave empty)
  "orgUnitId": "A String", # Organization Unit that owns this printer (Only can be set during Printer creation)
  "uri": "A String", # Editable. Printer URI.
  "useDriverlessConfig": True or False, # Editable. flag to use driverless configuration or not. If it's set to be true, make_and_model can be ignored
}