/AWS1/IF_BDC=>INGESTDATA()¶
About IngestData¶
Submits content directly for ingestion to generate long-term memory records in a AgentCore Memory resource.
To use this operation, you must have the bedrock-agentcore:IngestData permission.
Method Signature¶
METHODS /AWS1/IF_BDC~INGESTDATA
IMPORTING
!IV_MEMORYID TYPE /AWS1/BDCMEMORYID OPTIONAL
!IO_SOURCE TYPE REF TO /AWS1/CL_BDCCONTENTSOURCE OPTIONAL
!IV_CONTENTTIMESTAMP TYPE /AWS1/BDCTIMESTAMP OPTIONAL
!IV_ACTORID TYPE /AWS1/BDCACTORID OPTIONAL
!IV_SESSIONID TYPE /AWS1/BDCSESSIONID OPTIONAL
!IO_EXTRACTIONCONFIG TYPE REF TO /AWS1/CL_BDCEXTRACTIONCONFIG OPTIONAL
!IT_METADATA TYPE /AWS1/CL_BDCMETADATAVALUE=>TT_METADATAMAP OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/BDCSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcingestdataoutput
RAISING
/AWS1/CX_BDCACCESSDENIEDEX
/AWS1/CX_BDCRESOURCENOTFOUNDEX
/AWS1/CX_BDCSERVICEEXCEPTION
/AWS1/CX_BDCSERVICEQUOTAEXCDEX
/AWS1/CX_BDCTHROTTLEDEXCEPTION
/AWS1/CX_BDCVALIDATIONEX
/AWS1/CX_BDCCLIENTEXC
/AWS1/CX_BDCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_memoryid TYPE /AWS1/BDCMEMORYID /AWS1/BDCMEMORYID¶
The identifier of the AgentCore Memory resource to ingest content into.
io_source TYPE REF TO /AWS1/CL_BDCCONTENTSOURCE /AWS1/CL_BDCCONTENTSOURCE¶
The content to ingest. Only inline content is supported.
iv_contenttimestamp TYPE /AWS1/BDCTIMESTAMP /AWS1/BDCTIMESTAMP¶
The timestamp of when the content occurred.
iv_actorid TYPE /AWS1/BDCACTORID /AWS1/BDCACTORID¶
The identifier of the actor associated with this content. An actor represents an entity that participates in sessions and generates content.
Optional arguments:¶
iv_sessionid TYPE /AWS1/BDCSESSIONID /AWS1/BDCSESSIONID¶
The identifier of the session that the content belongs to. If not provided, a session identifier is generated and returned in the response.
io_extractionconfig TYPE REF TO /AWS1/CL_BDCEXTRACTIONCONFIG /AWS1/CL_BDCEXTRACTIONCONFIG¶
The extraction configuration for long-term memory records. Use this parameter to specify namespace variable keys and their values for namespace substitution during extraction.
it_metadata TYPE /AWS1/CL_BDCMETADATAVALUE=>TT_METADATAMAP TT_METADATAMAP¶
The key-value metadata to attach to the content.
iv_clienttoken TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING¶
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, AgentCore ignores the request, but does not return an error.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdcingestdataoutput /AWS1/CL_BDCINGESTDATAOUTPUT¶
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->ingestdata(
io_extractionconfig = new /aws1/cl_bdcextractionconfig(
it_namespacevariables = VALUE /aws1/cl_bdcnmspcvarblsmap_w=>tt_namespacevariablesmap(
(
VALUE /aws1/cl_bdcnmspcvarblsmap_w=>ts_namespacevarblsmap_maprow(
key = |string|
value = new /aws1/cl_bdcnmspcvarblsmap_w( |string| )
)
)
)
)
io_source = new /aws1/cl_bdccontentsource(
io_inline = new /aws1/cl_bdcinlinememorycont(
it_payload = VALUE /aws1/cl_bdcingestpayloadtype=>tt_ingestpayloadlist(
(
new /aws1/cl_bdcingestpayloadtype(
io_conversational = new /aws1/cl_bdcconversational(
io_content = new /aws1/cl_bdccontent( |string| )
iv_role = |string|
)
io_json = new /aws1/cl_bdcmemoryjsondata(
io_content = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
)
)
)
)
)
)
it_metadata = VALUE /aws1/cl_bdcmetadatavalue=>tt_metadatamap(
(
VALUE /aws1/cl_bdcmetadatavalue=>ts_metadatamap_maprow(
key = |string|
value = new /aws1/cl_bdcmetadatavalue( |string| )
)
)
)
iv_actorid = |string|
iv_clienttoken = |string|
iv_contenttimestamp = '20150101000000.0000000'
iv_memoryid = |string|
iv_sessionid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_sessionid = lo_result->get_sessionid( ).
ENDIF.