Skip to main content

processors

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

Overview

Nameprocessors
TypeResource
Idgoogle.documentai.processors

Fields

NameDatatypeDescription
namestringOutput only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}
createTimestringThe time the processor was created.
defaultProcessorVersionstringThe default processor version.
displayNamestringThe display name of the processor.
kmsKeyNamestringThe KMS key used for encryption and decryption in CMEK scenarios.
processEndpointstringOutput only. Immutable. The http endpoint that can be called to invoke processing.
processorVersionAliasesarrayOutput only. The processor version aliases.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The state of the processor.
typestringThe processor type, such as: OCR_PROCESSOR, INVOICE_PROCESSOR. To get a list of processor types, see FetchProcessorTypes.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_processors_getSELECTlocationsId, processorsId, projectsIdGets a processor detail.
projects_locations_processors_listSELECTlocationsId, projectsIdLists all processors which belong to this project.
projects_locations_processors_createINSERTlocationsId, projectsIdCreates a processor from the ProcessorType provided. The processor will be at ENABLED state by default after its creation. Note that this method requires the documentai.processors.create permission on the project, which is highly privileged. A user or service account with this permission can create new processors that can interact with any gcs bucket in your project.
projects_locations_processors_deleteDELETElocationsId, processorsId, projectsIdDeletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.
projects_locations_processors_batch_processEXEClocationsId, processorsId, projectsIdLRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
projects_locations_processors_disableEXEClocationsId, processorsId, projectsIdDisables a processor
projects_locations_processors_enableEXEClocationsId, processorsId, projectsIdEnables a processor
projects_locations_processors_processEXEClocationsId, processorsId, projectsIdProcesses a single document.
projects_locations_processors_set_default_processor_versionEXEClocationsId, processorsId, projectsIdSet the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.

SELECT examples

Lists all processors which belong to this project.

SELECT
name,
createTime,
defaultProcessorVersion,
displayName,
kmsKeyName,
processEndpoint,
processorVersionAliases,
satisfiesPzi,
satisfiesPzs,
state,
type
FROM google.documentai.processors
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new processors resource.

/*+ create */
INSERT INTO google.documentai.processors (
locationsId,
projectsId,
defaultProcessorVersion,
kmsKeyName,
type,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ defaultProcessorVersion }}',
'{{ kmsKeyName }}',
'{{ type }}',
'{{ displayName }}'
;

DELETE example

Deletes the specified processors resource.

/*+ delete */
DELETE FROM google.documentai.processors
WHERE locationsId = '{{ locationsId }}'
AND processorsId = '{{ processorsId }}'
AND projectsId = '{{ projectsId }}';