Skip to main content

processor_versions

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

Overview

Nameprocessor_versions
TypeResource
Idgoogle.documentai.processor_versions

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the processor version. Format: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}
createTimestring (google-datetime)Output only. The time the processor version was created.
deprecationInfoobjectOutput only. If set, information about the eventual deprecation of this version. (id: GoogleCloudDocumentaiV1ProcessorVersionDeprecationInfo)
displayNamestringThe display name of the processor version.
documentSchemaobjectOutput only. The schema of the processor version. Describes the output. (id: GoogleCloudDocumentaiV1DocumentSchema)
genAiModelInfoobjectOutput only. Information about Generative AI model-based processor versions. (id: GoogleCloudDocumentaiV1ProcessorVersionGenAiModelInfo)
googleManagedbooleanOutput only. Denotes that this ProcessorVersion is managed by Google.
kmsKeyNamestringOutput only. The KMS key name used for encryption.
kmsKeyVersionNamestringOutput only. The KMS key version with which data is encrypted.
latestEvaluationobjectOutput only. The most recently invoked evaluation for the processor version. (id: GoogleCloudDocumentaiV1EvaluationReference)
modelTypestringOutput only. The model type of this processor version.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. The state of the processor version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
projects_locations_processors_processor_versions_getselectprojectsId, locationsId, processorsId, processorVersionsIdGets a processor version detail.
projects_locations_processors_processor_versions_listselectprojectsId, locationsId, processorsIdpageSize, pageTokenLists all versions of a processor.
projects_locations_processors_processor_versions_deletedeleteprojectsId, locationsId, processorsId, processorVersionsIdDeletes the processor version, all artifacts under the processor version will be deleted.
projects_locations_processors_processor_versions_processexecprojectsId, locationsId, processorsId, processorVersionsIdProcesses a single document.
projects_locations_processors_processor_versions_batch_processexecprojectsId, locationsId, processorsId, processorVersionsIdLRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format.
projects_locations_processors_processor_versions_trainexecprojectsId, locationsId, processorsIdTrains a new processor version. Operation metadata is returned as TrainProcessorVersionMetadata.
projects_locations_processors_processor_versions_deployexecprojectsId, locationsId, processorsId, processorVersionsIdDeploys the processor version.
projects_locations_processors_processor_versions_undeployexecprojectsId, locationsId, processorsId, processorVersionsIdUndeploys the processor version.
projects_locations_processors_processor_versions_evaluate_processor_versionexecprojectsId, locationsId, processorsId, processorVersionsIdEvaluates a ProcessorVersion against annotated documents, producing an Evaluation.

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
locationsIdstring
processorVersionsIdstring
processorsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a processor version detail.

SELECT
name,
createTime,
deprecationInfo,
displayName,
documentSchema,
genAiModelInfo,
googleManaged,
kmsKeyName,
kmsKeyVersionName,
latestEvaluation,
modelType,
satisfiesPzi,
satisfiesPzs,
state
FROM google.documentai.processor_versions
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND processorsId = '{{ processorsId }}' -- required
AND processorVersionsId = '{{ processorVersionsId }}' -- required;

DELETE examples

Deletes the processor version, all artifacts under the processor version will be deleted.

DELETE FROM google.documentai.processor_versions
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND processorsId = '{{ processorsId }}' --required
AND processorVersionsId = '{{ processorVersionsId }}' --required;

Lifecycle Methods

Processes a single document.

EXEC google.documentai.processor_versions.projects_locations_processors_processor_versions_process 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@processorsId='{{ processorsId }}' --required,
@processorVersionsId='{{ processorVersionsId }}' --required
@@json=
'{
"inlineDocument": "{{ inlineDocument }}",
"rawDocument": "{{ rawDocument }}",
"gcsDocument": "{{ gcsDocument }}",
"skipHumanReview": {{ skipHumanReview }},
"fieldMask": "{{ fieldMask }}",
"processOptions": "{{ processOptions }}",
"labels": "{{ labels }}",
"imagelessMode": {{ imagelessMode }}
}';