adapter_versions
Creates, updates, deletes, gets or lists an adapter_versions resource.
Overview
| Name | adapter_versions |
| Type | Resource |
| Id | aws.textract.adapter_versions |
Fields
The following fields are returned by SELECT queries:
- get_adapter_version
- list_adapter_versions
| Name | Datatype | Description |
|---|---|---|
adapter_id | string | A string containing a unique ID for the adapter version being retrieved. |
adapter_version | string | A string containing the adapter version that has been retrieved. |
creation_time | string (date-time) | The time that the adapter version was created. |
dataset_config | object | Specifies a dataset used to train a new adapter version. Takes a ManifestS3Objec as the value. |
evaluation_metrics | array | The evaluation metrics (F1 score, Precision, and Recall) for the requested version, grouped by baseline metrics and adapter version. |
feature_types | array | List of the targeted feature types for the requested adapter version. |
kms_key_id | string | The identifier for your AWS Key Management Service key (AWS KMS key). Used to encrypt your documents. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$</code>) |
output_config | object | Sets whether or not your output will go to a user created bucket. Used to set the name of the bucket, and the prefix on the output file. OutputConfig is an optional parameter which lets you adjust where your output will be placed. By default, Amazon Textract will store the results internally and can only be accessed by the Get API operations. With OutputConfig enabled, you can set the name of the bucket the output will be sent to the file prefix of the results where you can download your results. Additionally, you can set the KMSKeyID parameter to a customer master key (CMK) to encrypt your output. Without this parameter set Amazon Textract will encrypt server-side using the AWS managed CMK for Amazon S3. Decryption of Customer Content is necessary for processing of the documents by Amazon Textract. If your account is opted out under an AI services opt out policy then all unencrypted Customer Content is immediately and permanently deleted after the Customer Content has been processed by the service. No copy of of the output is retained by Amazon Textract. For information about how to opt out, see Managing AI services opt-out policy. For more information on data privacy, see the Data Privacy FAQ. |
status | string | The status of the adapter version that has been requested. (ACTIVE, AT_RISK, DEPRECATED, CREATION_ERROR, CREATION_IN_PROGRESS) |
status_message | string | A message that describes the status of the requested adapter version. (pattern: <code>^[a-zA-Z0-9\s!"#$%'&()*+,-./:;=?@[\]^_`{|}~><]+$</code>) |
tags | object | A set of tags (key-value pairs) that are associated with the adapter version. |
| Name | Datatype | Description |
|---|---|---|
adapter_id | string | A unique identifier for the adapter associated with a given adapter version. |
adapter_version | string | An identified for a given adapter version. |
creation_time | string (date-time) | The date and time that a given adapter version was created. |
feature_types | array | The feature types that the adapter version is operating on. |
status | string | Contains information on the status of a given adapter version. (ACTIVE, AT_RISK, DEPRECATED, CREATION_ERROR, CREATION_IN_PROGRESS) |
status_message | string | A message explaining the status of a given adapter vesion. (pattern: <code>^[a-zA-Z0-9\s!"#$%'&()*+,-./:;=?@[\]^_`{|}~><]+$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_adapter_version | select | region | Gets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics. | |
list_adapter_versions | select | region | List all version of an adapter that meet the specified filtration criteria. | |
create_adapter_version | insert | region, AdapterId, DatasetConfig, OutputConfig | Creates a new version of an adapter. Operates on a provided AdapterId and a specified dataset provided via the DatasetConfig argument. Requires that you specify an Amazon S3 bucket with the OutputConfig argument. You can provide an optional KMSKeyId, an optional ClientRequestToken, and optional tags. | |
delete_adapter_version | delete | region | Deletes an Amazon Textract adapter version. Requires that you specify both an AdapterId and a AdapterVersion. Deletes the adapter version specified by the AdapterId and the AdapterVersion. |
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_version
- list_adapter_versions
Gets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics.
SELECT
adapter_id,
adapter_version,
creation_time,
dataset_config,
evaluation_metrics,
feature_types,
kms_key_id,
output_config,
status,
status_message,
tags
FROM aws.textract.adapter_versions
WHERE region = '{{ region }}' -- required
;
List all version of an adapter that meet the specified filtration criteria.
SELECT
adapter_id,
adapter_version,
creation_time,
feature_types,
status,
status_message
FROM aws.textract.adapter_versions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_adapter_version
- Manifest
Creates a new version of an adapter. Operates on a provided AdapterId and a specified dataset provided via the DatasetConfig argument. Requires that you specify an Amazon S3 bucket with the OutputConfig argument. You can provide an optional KMSKeyId, an optional ClientRequestToken, and optional tags.
INSERT INTO aws.textract.adapter_versions (
AdapterId,
ClientRequestToken,
DatasetConfig,
KMSKeyId,
OutputConfig,
Tags,
region
)
SELECT
'{{ AdapterId }}' /* required */,
'{{ ClientRequestToken }}',
'{{ DatasetConfig }}' /* required */,
'{{ KMSKeyId }}',
'{{ OutputConfig }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
adapter_id,
adapter_version
;
# Description fields are for documentation purposes
- name: adapter_versions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the adapter_versions resource.
- name: AdapterId
value: "{{ AdapterId }}"
description: |
A string containing a unique ID for the adapter that will receive a new version.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
Idempotent token is used to recognize the request. If the same token is used with multiple CreateAdapterVersion requests, the same session is returned. This token is employed to avoid unintentionally creating the same session multiple times.
- name: DatasetConfig
description: |
Specifies a dataset used to train a new adapter version. Takes a ManifestS3Object as the value.
value:
ManifestS3Object:
Bucket: "{{ Bucket }}"
Name: "{{ Name }}"
Version: "{{ Version }}"
- name: KMSKeyId
value: "{{ KMSKeyId }}"
description: |
The identifier for your AWS Key Management Service key (AWS KMS key). Used to encrypt your documents.
- name: OutputConfig
description: |
Sets whether or not your output will go to a user created bucket. Used to set the name of the bucket, and the prefix on the output file. OutputConfig is an optional parameter which lets you adjust where your output will be placed. By default, Amazon Textract will store the results internally and can only be accessed by the Get API operations. With OutputConfig enabled, you can set the name of the bucket the output will be sent to the file prefix of the results where you can download your results. Additionally, you can set the KMSKeyID parameter to a customer master key (CMK) to encrypt your output. Without this parameter set Amazon Textract will encrypt server-side using the AWS managed CMK for Amazon S3. Decryption of Customer Content is necessary for processing of the documents by Amazon Textract. If your account is opted out under an AI services opt out policy then all unencrypted Customer Content is immediately and permanently deleted after the Customer Content has been processed by the service. No copy of of the output is retained by Amazon Textract. For information about how to opt out, see Managing AI services opt-out policy. For more information on data privacy, see the Data Privacy FAQ.
value:
S3Bucket: "{{ S3Bucket }}"
S3Prefix: "{{ S3Prefix }}"
- name: Tags
value: "{{ Tags }}"
description: |
A set of tags (key-value pairs) that you want to attach to the adapter version.
DELETE examples
- delete_adapter_version
Deletes an Amazon Textract adapter version. Requires that you specify both an AdapterId and a AdapterVersion. Deletes the adapter version specified by the AdapterId and the AdapterVersion.
DELETE FROM aws.textract.adapter_versions
WHERE region = '{{ region }}' --required
;