/AWS1/IF_TNB=>UPDATEVOCABULARYFILTER()¶
About UpdateVocabularyFilter¶
Updates an existing custom vocabulary filter with a new list of words. The new list you provide overwrites all previous entries; you cannot append new terms onto an existing custom vocabulary filter.
Method Signature¶
METHODS /AWS1/IF_TNB~UPDATEVOCABULARYFILTER
IMPORTING
!IV_VOCABULARYFILTERNAME TYPE /AWS1/TNBVOCABULARYFILTERNAME OPTIONAL
!IT_WORDS TYPE /AWS1/CL_TNBWORDS_W=>TT_WORDS OPTIONAL
!IV_VOCABULARYFILTERFILEURI TYPE /AWS1/TNBURI OPTIONAL
!IV_DATAACCESSROLEARN TYPE /AWS1/TNBDATAACCESSROLEARN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tnbupvocabularyfilt01
RAISING
/AWS1/CX_TNBBADREQUESTEX
/AWS1/CX_TNBINTERNALFAILUREEX
/AWS1/CX_TNBLIMITEXCEEDEDEX
/AWS1/CX_TNBNOTFOUNDEXCEPTION
/AWS1/CX_TNBCLIENTEXC
/AWS1/CX_TNBSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_vocabularyfiltername TYPE /AWS1/TNBVOCABULARYFILTERNAME /AWS1/TNBVOCABULARYFILTERNAME¶
The name of the custom vocabulary filter you want to update. Custom vocabulary filter names are case sensitive.
Optional arguments:¶
it_words TYPE /AWS1/CL_TNBWORDS_W=>TT_WORDS TT_WORDS¶
Use this parameter if you want to update your custom vocabulary filter by including all desired terms, as comma-separated values, within your request. The other option for updating your vocabulary filter is to save your entries in a text file and upload them to an Amazon S3 bucket, then specify the location of your file using the
VocabularyFilterFileUriparameter.Note that if you include
Wordsin your request, you cannot useVocabularyFilterFileUri; you must choose one or the other.Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary filter request fails. Refer to Character Sets for Custom Vocabularies to get the character set for your language.
iv_vocabularyfilterfileuri TYPE /AWS1/TNBURI /AWS1/TNBURI¶
The Amazon S3 location of the text file that contains your custom vocabulary filter terms. The URI must be located in the same Amazon Web Services Region as the resource you're calling.
Here's an example URI path:
s3://DOC-EXAMPLE-BUCKET/my-vocab-filter-file.txtNote that if you include
VocabularyFilterFileUriin your request, you cannot useWords; you must choose one or the other.
iv_dataaccessrolearn TYPE /AWS1/TNBDATAACCESSROLEARN /AWS1/TNBDATAACCESSROLEARN¶
The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files (in this case, your custom vocabulary filter). If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.
IAM role ARNs have the format
arn:partition:iam::account:role/role-name-with-path. For example:arn:aws:iam::111122223333:role/Admin.For more information, see IAM ARNs.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_tnbupvocabularyfilt01 /AWS1/CL_TNBUPVOCABULARYFILT01¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
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->updatevocabularyfilter(
it_words = VALUE /aws1/cl_tnbwords_w=>tt_words(
( new /aws1/cl_tnbwords_w( |string| ) )
)
iv_dataaccessrolearn = |string|
iv_vocabularyfilterfileuri = |string|
iv_vocabularyfiltername = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_vocabularyfiltername = lo_result->get_vocabularyfiltername( ).
lv_languagecode = lo_result->get_languagecode( ).
lv_datetime = lo_result->get_lastmodifiedtime( ).
ENDIF.