/AWS1/IF_QST=>CREATEKNOWLEDGEBASE()¶
About CreateKnowledgeBase¶
Creates a knowledge base from a specified data source. Supported data source connector types include:
-
S3_KNOWLEDGE_BASE– Uses an Amazon S3 bucket as the data source. -
WEB_CRAWLER– Uses web pages indexed by the built-in web crawler as the data source. -
GOOGLE_DRIVE– Uses Google Drive as the data source. Supports service account authentication only. -
SHAREPOINT– Uses SharePoint as the data source. Supports two-legged OAuth only. -
ONE_DRIVE– Uses OneDrive as the data source. Supports two-legged OAuth only.
Method Signature¶
METHODS /AWS1/IF_QST~CREATEKNOWLEDGEBASE
IMPORTING
!IV_AWSACCOUNTID TYPE /AWS1/QSTKBAWSACCOUNTID OPTIONAL
!IV_KNOWLEDGEBASEID TYPE /AWS1/QSTKNOWLEDGEBASEID OPTIONAL
!IV_NAME TYPE /AWS1/QSTKNOWLEDGEBASENAME OPTIONAL
!IV_DATASOURCEARN TYPE /AWS1/QSTDATASOURCEARN OPTIONAL
!IO_KNOWLEDGEBASECONF TYPE REF TO /AWS1/CL_QSTKNOWLEDGEBASECONF OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/QSTKNOWLEDGEBASEDESC OPTIONAL
!IT_PERMISSIONS TYPE /AWS1/CL_QSTRESOURCEPERMISSION=>TT_RESOURCEPERMISSIONLIST OPTIONAL
!IO_MEDIAEXTRACTIONCONF TYPE REF TO /AWS1/CL_QSTMEDIAEXTCONF OPTIONAL
!IO_ACCESSCONTROLCONF TYPE REF TO /AWS1/CL_QSTACCESSCONTROLCONF OPTIONAL
!IV_PRIMARYOWNERARN TYPE /AWS1/QSTSTRING OPTIONAL
!IT_TAGS TYPE /AWS1/CL_QSTTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_qstcreknwldgbasersp
RAISING
/AWS1/CX_QSTACCESSDENIEDEX
/AWS1/CX_QSTINTERNALFAILUREEX
/AWS1/CX_QSTINVPARAMVALUEEX
/AWS1/CX_QSTINVALIDREQUESTEX
/AWS1/CX_QSTLIMITEXCEEDEDEX
/AWS1/CX_QSTPRECONDNOTMETEX
/AWS1/CX_QSTRESOURCEEXISTSEX
/AWS1/CX_QSTRESOURCENOTFOUNDEX
/AWS1/CX_QSTTHROTTLINGEX
/AWS1/CX_QSTCLIENTEXC
/AWS1/CX_QSTSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_awsaccountid TYPE /AWS1/QSTKBAWSACCOUNTID /AWS1/QSTKBAWSACCOUNTID¶
The ID of the Amazon Web Services account that contains the knowledge base.
iv_knowledgebaseid TYPE /AWS1/QSTKNOWLEDGEBASEID /AWS1/QSTKNOWLEDGEBASEID¶
The unique identifier for the knowledge base.
iv_name TYPE /AWS1/QSTKNOWLEDGEBASENAME /AWS1/QSTKNOWLEDGEBASENAME¶
The name of the knowledge base.
iv_datasourcearn TYPE /AWS1/QSTDATASOURCEARN /AWS1/QSTDATASOURCEARN¶
The Amazon Resource Name (ARN) of the data source for the knowledge base.
io_knowledgebaseconf TYPE REF TO /AWS1/CL_QSTKNOWLEDGEBASECONF /AWS1/CL_QSTKNOWLEDGEBASECONF¶
The configuration settings for a knowledge base.
Optional arguments:¶
iv_description TYPE /AWS1/QSTKNOWLEDGEBASEDESC /AWS1/QSTKNOWLEDGEBASEDESC¶
A description for the knowledge base. If you don't specify a description, the knowledge base is created without one.
it_permissions TYPE /AWS1/CL_QSTRESOURCEPERMISSION=>TT_RESOURCEPERMISSIONLIST TT_RESOURCEPERMISSIONLIST¶
A list of resource permissions on the knowledge base. Each entry grants a specified Amazon QuickSight principal either owner or viewer access. If you don't specify permissions, only the primary owner (if provided) receives owner access.
io_mediaextractionconf TYPE REF TO /AWS1/CL_QSTMEDIAEXTCONF /AWS1/CL_QSTMEDIAEXTCONF¶
The configuration for media extraction from knowledge base documents.
io_accesscontrolconf TYPE REF TO /AWS1/CL_QSTACCESSCONTROLCONF /AWS1/CL_QSTACCESSCONTROLCONF¶
The access control configuration for the knowledge base. If you don't specify this parameter, document-level ACLs are disabled.
iv_primaryownerarn TYPE /AWS1/QSTSTRING /AWS1/QSTSTRING¶
The Amazon Resource Name (ARN) of the primary owner for the knowledge base. The specified user is always granted owner access, regardless of what is specified in the
Permissionsfield. If you don't specify a primary owner, the knowledge base is created without one.
it_tags TYPE /AWS1/CL_QSTTAG=>TT_TAGLIST TT_TAGLIST¶
The tags to assign to the knowledge base. If you don't specify tags, the knowledge base is created without tags.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_qstcreknwldgbasersp /AWS1/CL_QSTCREKNWLDGBASERSP¶
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->createknowledgebase(
io_accesscontrolconf = new /aws1/cl_qstaccesscontrolconf( ABAP_TRUE )
io_knowledgebaseconf = new /aws1/cl_qstknowledgebaseconf(
io_templateconfiguration = new /aws1/cl_qstkbtemplateconf(
io_template = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
)
)
io_mediaextractionconf = new /aws1/cl_qstmediaextconf(
io_audioextractionconf = new /aws1/cl_qstaudioextconf( |string| )
io_imageextractionconf = new /aws1/cl_qstimageextconf( |string| )
io_videoextractionconf = new /aws1/cl_qstvideoextconf(
iv_videoextractionstatus = |string|
iv_videoextractiontype = |string|
)
)
it_permissions = VALUE /aws1/cl_qstresourcepermission=>tt_resourcepermissionlist(
(
new /aws1/cl_qstresourcepermission(
it_actions = VALUE /aws1/cl_qstactionlist_w=>tt_actionlist(
( new /aws1/cl_qstactionlist_w( |string| ) )
)
iv_principal = |string|
)
)
)
it_tags = VALUE /aws1/cl_qsttag=>tt_taglist(
(
new /aws1/cl_qsttag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_awsaccountid = |string|
iv_datasourcearn = |string|
iv_description = |string|
iv_knowledgebaseid = |string|
iv_name = |string|
iv_primaryownerarn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_knowledgebasearn = lo_result->get_knowledgebasearn( ).
lv_knowledgebaseid = lo_result->get_knowledgebaseid( ).
lv_datasetstatus = lo_result->get_creationstatus( ).
lv_string = lo_result->get_requestid( ).
lv_statuscode = lo_result->get_status( ).
ENDIF.