Skip to content

/AWS1/IF_TEX=>CREATEADAPTERVERSION()

About CreateAdapterVersion

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.

Method Signature

METHODS /AWS1/IF_TEX~CREATEADAPTERVERSION
  IMPORTING
    !IV_ADAPTERID TYPE /AWS1/TEXADAPTERID OPTIONAL
    !IV_CLIENTREQUESTTOKEN TYPE /AWS1/TEXCLIENTREQUESTTOKEN OPTIONAL
    !IO_DATASETCONFIG TYPE REF TO /AWS1/CL_TEXADAPTERVRSDSCONFIG OPTIONAL
    !IV_KMSKEYID TYPE /AWS1/TEXKMSKEYID OPTIONAL
    !IO_OUTPUTCONFIG TYPE REF TO /AWS1/CL_TEXOUTPUTCONFIG OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_TEXTAGMAP_W=>TT_TAGMAP OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_texcreadaptervrsrsp
  RAISING
    /AWS1/CX_TEXACCESSDENIEDEX
    /AWS1/CX_TEXCONFLICTEXCEPTION
    /AWS1/CX_TEXIDEMPOTENTPRMMIS00
    /AWS1/CX_TEXINTERNALSERVERERR
    /AWS1/CX_TEXINVALIDKMSKEYEX
    /AWS1/CX_TEXINVALIDPARAMETEREX
    /AWS1/CX_TEXINVALIDS3OBJECTEX
    /AWS1/CX_TEXLIMITEXCEEDEDEX
    /AWS1/CX_TEXPROVTHRUPUTEXCDEX
    /AWS1/CX_TEXRESOURCENOTFOUNDEX
    /AWS1/CX_TEXSERVICEQUOTAEXCDEX
    /AWS1/CX_TEXTHROTTLINGEX
    /AWS1/CX_TEXVALIDATIONEX
    /AWS1/CX_TEXCLIENTEXC
    /AWS1/CX_TEXSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_adapterid TYPE /AWS1/TEXADAPTERID /AWS1/TEXADAPTERID

A string containing a unique ID for the adapter that will receive a new version.

io_datasetconfig TYPE REF TO /AWS1/CL_TEXADAPTERVRSDSCONFIG /AWS1/CL_TEXADAPTERVRSDSCONFIG

Specifies a dataset used to train a new adapter version. Takes a ManifestS3Object as the value.

io_outputconfig TYPE REF TO /AWS1/CL_TEXOUTPUTCONFIG /AWS1/CL_TEXOUTPUTCONFIG

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.

Optional arguments:

iv_clientrequesttoken TYPE /AWS1/TEXCLIENTREQUESTTOKEN /AWS1/TEXCLIENTREQUESTTOKEN

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.

iv_kmskeyid TYPE /AWS1/TEXKMSKEYID /AWS1/TEXKMSKEYID

The identifier for your AWS Key Management Service key (AWS KMS key). Used to encrypt your documents.

it_tags TYPE /AWS1/CL_TEXTAGMAP_W=>TT_TAGMAP TT_TAGMAP

A set of tags (key-value pairs) that you want to attach to the adapter version.

RETURNING

oo_output TYPE REF TO /aws1/cl_texcreadaptervrsrsp /AWS1/CL_TEXCREADAPTERVRSRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->createadapterversion(
  io_datasetconfig = new /aws1/cl_texadaptervrsdsconfig(
    io_manifests3object = new /aws1/cl_texs3object(
      iv_bucket = |string|
      iv_name = |string|
      iv_version = |string|
    )
  )
  io_outputconfig = new /aws1/cl_texoutputconfig(
    iv_s3bucket = |string|
    iv_s3prefix = |string|
  )
  it_tags = VALUE /aws1/cl_textagmap_w=>tt_tagmap(
    (
      VALUE /aws1/cl_textagmap_w=>ts_tagmap_maprow(
        value = new /aws1/cl_textagmap_w( |string| )
        key = |string|
      )
    )
  )
  iv_adapterid = |string|
  iv_clientrequesttoken = |string|
  iv_kmskeyid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_adapterid = lo_result->get_adapterid( ).
  lv_adapterversion = lo_result->get_adapterversion( ).
ENDIF.