adapters
Creates, updates, deletes, gets or lists an adapters resource.
Overview
| Name | adapters |
| Type | Resource |
| Id | aws.textract.adapters |
Fields
The following fields are returned by SELECT queries:
- get_adapter
- list_adapters
| Name | Datatype | Description |
|---|---|---|
adapter_id | string | A string identifying the adapter that information has been retrieved for. |
adapter_name | string | The name of the requested adapter. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
auto_update | string | Binary value indicating if the adapter is being automatically updated or not. (ENABLED, DISABLED) |
creation_time | string (date-time) | The date and time the requested adapter was created at. |
description | string | The description for the requested adapter. (pattern: <code>^[a-zA-Z0-9\s!"#$%'&()*+,-./:;=?@[\]^_`{|}~><]+$</code>) |
feature_types | array | List of the targeted feature types for the requested adapter. |
tags | object | A set of tags (key-value pairs) associated with the adapter that has been retrieved. |
| Name | Datatype | Description |
|---|---|---|
adapter_id | string | A unique identifier for the adapter resource. |
adapter_name | string | A string naming the adapter resource. (pattern: <code>[a-zA-Z0-9-_]+</code>) |
creation_time | string (date-time) | The date and time that the adapter was created. |
feature_types | array | The feature types that the adapter is operating on. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_adapter | select | region | Gets configuration information for an adapter specified by an AdapterId, returning information on AdapterName, Description, CreationTime, AutoUpdate status, and FeatureTypes. | |
list_adapters | select | region | Lists all adapters that match the specified filtration criteria. | |
create_adapter | insert | region, AdapterName, FeatureTypes | Creates an adapter, which can be fine-tuned for enhanced performance on user provided documents. Takes an AdapterName and FeatureType. Currently the only supported feature type is QUERIES. You can also provide a Description, Tags, and a ClientRequestToken. You can choose whether or not the adapter should be AutoUpdated with the AutoUpdate argument. By default, AutoUpdate is set to DISABLED. | |
update_adapter | update | region, AdapterId | Update the configuration for an adapter. FeatureTypes configurations cannot be updated. At least one new parameter must be specified as an argument. | |
delete_adapter | delete | region | Deletes an Amazon Textract adapter. Takes an AdapterId and deletes the adapter specified by the ID. |
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 |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_adapter
- list_adapters
Gets configuration information for an adapter specified by an AdapterId, returning information on AdapterName, Description, CreationTime, AutoUpdate status, and FeatureTypes.
SELECT
adapter_id,
adapter_name,
auto_update,
creation_time,
description,
feature_types,
tags
FROM aws.textract.adapters
WHERE region = '{{ region }}' -- required
;
Lists all adapters that match the specified filtration criteria.
SELECT
adapter_id,
adapter_name,
creation_time,
feature_types
FROM aws.textract.adapters
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_adapter
- Manifest
Creates an adapter, which can be fine-tuned for enhanced performance on user provided documents. Takes an AdapterName and FeatureType. Currently the only supported feature type is QUERIES. You can also provide a Description, Tags, and a ClientRequestToken. You can choose whether or not the adapter should be AutoUpdated with the AutoUpdate argument. By default, AutoUpdate is set to DISABLED.
INSERT INTO aws.textract.adapters (
AdapterName,
ClientRequestToken,
Description,
FeatureTypes,
AutoUpdate,
Tags,
region
)
SELECT
'{{ AdapterName }}' /* required */,
'{{ ClientRequestToken }}',
'{{ Description }}',
'{{ FeatureTypes }}' /* required */,
'{{ AutoUpdate }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
adapter_id
;
# Description fields are for documentation purposes
- name: adapters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the adapters resource.
- name: AdapterName
value: "{{ AdapterName }}"
description: |
The name to be assigned to the adapter being created.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapter requests, the same session is returned. This token is employed to avoid unintentionally creating the same session multiple times.
- name: Description
value: "{{ Description }}"
description: |
The description to be assigned to the adapter being created.
- name: FeatureTypes
value:
- "{{ FeatureTypes }}"
description: |
The type of feature that the adapter is being trained on. Currrenly, supported feature types are: QUERIES
- name: AutoUpdate
value: "{{ AutoUpdate }}"
description: |
Controls whether or not the adapter should automatically update.
valid_values: ['ENABLED', 'DISABLED']
- name: Tags
value: "{{ Tags }}"
description: |
A list of tags to be added to the adapter.
UPDATE examples
- update_adapter
Update the configuration for an adapter. FeatureTypes configurations cannot be updated. At least one new parameter must be specified as an argument.
UPDATE aws.textract.adapters
SET
AdapterId = '{{ AdapterId }}',
Description = '{{ Description }}',
AdapterName = '{{ AdapterName }}',
AutoUpdate = '{{ AutoUpdate }}'
WHERE
region = '{{ region }}' --required
AND AdapterId = '{{ AdapterId }}' --required
RETURNING
adapter_id,
adapter_name,
auto_update,
creation_time,
description,
feature_types;
DELETE examples
- delete_adapter
Deletes an Amazon Textract adapter. Takes an AdapterId and deletes the adapter specified by the ID.
DELETE FROM aws.textract.adapters
WHERE region = '{{ region }}' --required
;