Skip to main content

adapter_versions

Creates, updates, deletes, gets or lists an adapter_versions resource.

Overview

Nameadapter_versions
TypeResource
Idaws.textract.adapter_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
adapter_idstringA string containing a unique ID for the adapter version being retrieved.
adapter_versionstringA string containing the adapter version that has been retrieved.
creation_timestring (date-time)The time that the adapter version was created.
dataset_configobjectSpecifies a dataset used to train a new adapter version. Takes a ManifestS3Objec as the value.
evaluation_metricsarrayThe evaluation metrics (F1 score, Precision, and Recall) for the requested version, grouped by baseline metrics and adapter version.
feature_typesarrayList of the targeted feature types for the requested adapter version.
kms_key_idstringThe 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_configobjectSets 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.
statusstringThe status of the adapter version that has been requested. (ACTIVE, AT_RISK, DEPRECATED, CREATION_ERROR, CREATION_IN_PROGRESS)
status_messagestringA message that describes the status of the requested adapter version. (pattern: <code>^[a-zA-Z0-9\s!"#$%'&()*+,-./:;=?@&#91;\&#93;^_`&#123;|&#125;~><]+$</code>)
tagsobjectA set of tags (key-value pairs) that are associated with the adapter version.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_adapter_versionselectregionGets configuration information for the specified adapter version, including: AdapterId, AdapterVersion, FeatureTypes, Status, StatusMessage, DatasetConfig, KMSKeyId, OutputConfig, Tags and EvaluationMetrics.
list_adapter_versionsselectregionList all version of an adapter that meet the specified filtration criteria.
create_adapter_versioninsertregion, AdapterId, DatasetConfig, OutputConfigCreates 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_versiondeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

DELETE examples

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
;