/AWS1/IF_QQC=>LISTAIPROMPTVERSIONS()¶
About ListAIPromptVersions¶
Lists AI Prompt versions.
Method Signature¶
METHODS /AWS1/IF_QQC~LISTAIPROMPTVERSIONS
IMPORTING
!IV_ASSISTANTID TYPE /AWS1/QQCUUIDORARN OPTIONAL
!IV_AIPROMPTID TYPE /AWS1/QQCUUIDORARNOREITHERWQ00 OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/QQCNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/QQCMAXRESULTS OPTIONAL
!IV_ORIGIN TYPE /AWS1/QQCORIGIN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_qqclstaipromptvrssrsp
RAISING
/AWS1/CX_QQCACCESSDENIEDEX
/AWS1/CX_QQCRESOURCENOTFOUNDEX
/AWS1/CX_QQCTHROTTLINGEX
/AWS1/CX_QQCUNAUTHORIZEDEX
/AWS1/CX_QQCVALIDATIONEX
/AWS1/CX_QQCCLIENTEXC
/AWS1/CX_QQCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_assistantid TYPE /AWS1/QQCUUIDORARN /AWS1/QQCUUIDORARN¶
The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN.
iv_aipromptid TYPE /AWS1/QQCUUIDORARNOREITHERWQ00 /AWS1/QQCUUIDORARNOREITHERWQ00¶
The identifier of the Amazon Q in Connect AI prompt for which versions are to be listed.
Optional arguments:¶
iv_nexttoken TYPE /AWS1/QQCNEXTTOKEN /AWS1/QQCNEXTTOKEN¶
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
iv_maxresults TYPE /AWS1/QQCMAXRESULTS /AWS1/QQCMAXRESULTS¶
The maximum number of results to return per page.
iv_origin TYPE /AWS1/QQCORIGIN /AWS1/QQCORIGIN¶
The origin of the AI Prompt versions to be listed.
SYSTEMfor a default AI Agent created by Q in Connect orCUSTOMERfor an AI Agent created by calling AI Agent creation APIs.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_qqclstaipromptvrssrsp /AWS1/CL_QQCLSTAIPROMPTVRSSRSP¶
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->listaipromptversions(
iv_aipromptid = |string|
iv_assistantid = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_origin = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_aipromptversionsummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_aipromptsummary = lo_row_1->get_aipromptsummary( ).
IF lo_aipromptsummary IS NOT INITIAL.
lv_name = lo_aipromptsummary->get_name( ).
lv_uuid = lo_aipromptsummary->get_assistantid( ).
lv_arn = lo_aipromptsummary->get_assistantarn( ).
lv_uuid = lo_aipromptsummary->get_aipromptid( ).
lv_aiprompttype = lo_aipromptsummary->get_type( ).
lv_arn = lo_aipromptsummary->get_aipromptarn( ).
lv_timestamp = lo_aipromptsummary->get_modifiedtime( ).
lv_aiprompttemplatetype = lo_aipromptsummary->get_templatetype( ).
lv_aipromptmodelidentifier = lo_aipromptsummary->get_modelid( ).
lv_aipromptapiformat = lo_aipromptsummary->get_apiformat( ).
lv_visibilitystatus = lo_aipromptsummary->get_visibilitystatus( ).
lv_origin = lo_aipromptsummary->get_origin( ).
lv_description = lo_aipromptsummary->get_description( ).
lv_status = lo_aipromptsummary->get_status( ).
LOOP AT lo_aipromptsummary->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.
lv_version = lo_row_1->get_versionnumber( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.