Textract / Client / create_adapter

create_adapter#

Textract.Client.create_adapter(**kwargs)#

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.

See also: AWS API Documentation

Request Syntax

response = client.create_adapter(
    AdapterName='string',
    ClientRequestToken='string',
    Description='string',
    FeatureTypes=[
        'TABLES'|'FORMS'|'QUERIES'|'SIGNATURES'|'LAYOUT',
    ],
    AutoUpdate='ENABLED'|'DISABLED',
    Tags={
        'string': 'string'
    }
)
Parameters:
  • AdapterName (string) –

    [REQUIRED]

    The name to be assigned to the adapter being created.

  • ClientRequestToken (string) –

    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.

    This field is autopopulated if not provided.

  • Description (string) – The description to be assigned to the adapter being created.

  • FeatureTypes (list) –

    [REQUIRED]

    The type of feature that the adapter is being trained on. Currrenly, supported feature types are: QUERIES

    • (string) –

  • AutoUpdate (string) – Controls whether or not the adapter should automatically update.

  • Tags (dict) –

    A list of tags to be added to the adapter.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'AdapterId': 'string'
}

Response Structure

  • (dict) –

    • AdapterId (string) –

      A string containing the unique ID for the adapter that has been created.

Exceptions