processors
Creates, updates, deletes, gets or lists a processors
resource.
Overview
Name | processors |
Type | Resource |
Id | google.documentai.processors |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor} |
createTime | string | The time the processor was created. |
defaultProcessorVersion | string | The default processor version. |
displayName | string | The display name of the processor. |
kmsKeyName | string | The KMS key used for encryption and decryption in CMEK scenarios. |
processEndpoint | string | Output only. Immutable. The http endpoint that can be called to invoke processing. |
processorVersionAliases | array | Output only. The processor version aliases. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
state | string | Output only. The state of the processor. |
type | string | The processor type, such as: OCR_PROCESSOR , INVOICE_PROCESSOR . To get a list of processor types, see FetchProcessorTypes. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_processors_get | SELECT | locationsId, processorsId, projectsId | Gets a processor detail. |
projects_locations_processors_list | SELECT | locationsId, projectsId | Lists all processors which belong to this project. |
projects_locations_processors_create | INSERT | locationsId, projectsId | Creates 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_delete | DELETE | locationsId, processorsId, projectsId | Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor. |
projects_locations_processors_batch_process | EXEC | locationsId, processorsId, projectsId | LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. |
projects_locations_processors_disable | EXEC | locationsId, processorsId, projectsId | Disables a processor |
projects_locations_processors_enable | EXEC | locationsId, processorsId, projectsId | Enables a processor |
projects_locations_processors_process | EXEC | locationsId, processorsId, projectsId | Processes a single document. |
projects_locations_processors_set_default_processor_version | EXEC | locationsId, processorsId, projectsId | Set 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.documentai.processors (
locationsId,
projectsId,
defaultProcessorVersion,
kmsKeyName,
type,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ defaultProcessorVersion }}',
'{{ kmsKeyName }}',
'{{ type }}',
'{{ displayName }}'
;
- name: your_resource_model_name
props:
- name: satisfiesPzi
value: boolean
- name: processEndpoint
value: string
- name: satisfiesPzs
value: boolean
- name: defaultProcessorVersion
value: string
- name: state
value: string
- name: createTime
value: string
- name: processorVersionAliases
value:
- - name: processorVersion
value: string
- name: alias
value: string
- name: kmsKeyName
value: string
- name: name
value: string
- name: type
value: string
- name: displayName
value: string
DELETE
example
Deletes the specified processors
resource.
/*+ delete */
DELETE FROM google.documentai.processors
WHERE locationsId = '{{ locationsId }}'
AND processorsId = '{{ processorsId }}'
AND projectsId = '{{ projectsId }}';