/AWS1/CL_WIS=>CREATEKNOWLEDGEBASE()
¶
About CreateKnowledgeBase¶
Creates a knowledge base.
When using this API, you cannot reuse Amazon AppIntegrations
DataIntegrations with external knowledge bases such as Salesforce and ServiceNow. If you do,
you'll get an InvalidRequestException
error.
For example, you're programmatically managing your external knowledge base, and you want to add or remove one of the fields that is being ingested from Salesforce. Do the following:
-
Call DeleteKnowledgeBase.
-
Call DeleteDataIntegration.
-
Call CreateDataIntegration to recreate the DataIntegration or a create different one.
-
Call CreateKnowledgeBase.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_name
TYPE /AWS1/WISNAME
/AWS1/WISNAME
¶
The name of the knowledge base.
iv_knowledgebasetype
TYPE /AWS1/WISKNOWLEDGEBASETYPE
/AWS1/WISKNOWLEDGEBASETYPE
¶
The type of knowledge base. Only CUSTOM knowledge bases allow you to upload your own content. EXTERNAL knowledge bases support integrations with third-party systems whose content is synchronized automatically.
Optional arguments:¶
iv_clienttoken
TYPE /AWS1/WISNONEMPTYSTRING
/AWS1/WISNONEMPTYSTRING
¶
A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.
io_sourceconfiguration
TYPE REF TO /AWS1/CL_WISSOURCECONF
/AWS1/CL_WISSOURCECONF
¶
The source of the knowledge base content. Only set this argument for EXTERNAL knowledge bases.
io_renderingconfiguration
TYPE REF TO /AWS1/CL_WISRENDERINGCONF
/AWS1/CL_WISRENDERINGCONF
¶
Information about how to render the content.
io_serversideencryptionconf
TYPE REF TO /AWS1/CL_WISSERVERSIDEENCCONF
/AWS1/CL_WISSERVERSIDEENCCONF
¶
The configuration information for the customer managed key used for encryption.
This KMS key must have a policy that allows
kms:CreateGrant
,kms:DescribeKey
, andkms:Decrypt/kms:GenerateDataKey
permissions to the IAM identity using the key to invoke Wisdom.For more information about setting up a customer managed key for Wisdom, see Enable Amazon Connect Wisdom for your instance.
iv_description
TYPE /AWS1/WISDESCRIPTION
/AWS1/WISDESCRIPTION
¶
The description.
it_tags
TYPE /AWS1/CL_WISTAGS_W=>TT_TAGS
TT_TAGS
¶
The tags used to organize, track, or control access for this resource.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_wiscreknowledgebase01
/AWS1/CL_WISCREKNOWLEDGEBASE01
¶
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->/aws1/if_wis~createknowledgebase(
io_renderingconfiguration = new /aws1/cl_wisrenderingconf( |string| )
io_serversideencryptionconf = new /aws1/cl_wisserversideencconf( |string| )
io_sourceconfiguration = new /aws1/cl_wissourceconf(
io_appintegrations = new /aws1/cl_wisappintegrationsc00(
it_objectfields = VALUE /aws1/cl_wisobjectfieldslist_w=>tt_objectfieldslist(
( new /aws1/cl_wisobjectfieldslist_w( |string| ) )
)
iv_appintegrationarn = |string|
)
)
it_tags = VALUE /aws1/cl_wistags_w=>tt_tags(
(
VALUE /aws1/cl_wistags_w=>ts_tags_maprow(
key = |string|
value = new /aws1/cl_wistags_w( |string| )
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_knowledgebasetype = |string|
iv_name = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_knowledgebasedata = lo_result->get_knowledgebase( ).
IF lo_knowledgebasedata IS NOT INITIAL.
lv_uuid = lo_knowledgebasedata->get_knowledgebaseid( ).
lv_arn = lo_knowledgebasedata->get_knowledgebasearn( ).
lv_name = lo_knowledgebasedata->get_name( ).
lv_knowledgebasetype = lo_knowledgebasedata->get_knowledgebasetype( ).
lv_knowledgebasestatus = lo_knowledgebasedata->get_status( ).
lv_timestamp = lo_knowledgebasedata->get_lastcontentmodtime( ).
lo_sourceconfiguration = lo_knowledgebasedata->get_sourceconfiguration( ).
IF lo_sourceconfiguration IS NOT INITIAL.
lo_appintegrationsconfigur = lo_sourceconfiguration->get_appintegrations( ).
IF lo_appintegrationsconfigur IS NOT INITIAL.
lv_genericarn = lo_appintegrationsconfigur->get_appintegrationarn( ).
LOOP AT lo_appintegrationsconfigur->get_objectfields( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_renderingconfiguration = lo_knowledgebasedata->get_renderingconfiguration( ).
IF lo_renderingconfiguration IS NOT INITIAL.
lv_uri = lo_renderingconfiguration->get_templateuri( ).
ENDIF.
lo_serversideencryptioncon = lo_knowledgebasedata->get_serversideencryptionconf( ).
IF lo_serversideencryptioncon IS NOT INITIAL.
lv_nonemptystring = lo_serversideencryptioncon->get_kmskeyid( ).
ENDIF.
lv_description = lo_knowledgebasedata->get_description( ).
LOOP AT lo_knowledgebasedata->get_tags( ) into ls_row_2.
lv_key = ls_row_2-key.
lo_value = ls_row_2-value.
IF lo_value IS NOT INITIAL.
lv_tagvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.