Skip to content

/AWS1/IF_QST=>CREATEAGENT()

About CreateAgent

Creates an agent in Amazon QuickSight.

Method Signature

METHODS /AWS1/IF_QST~CREATEAGENT
  IMPORTING
    !IT_SPACES TYPE /AWS1/CL_QSTCREAGREQPACESLST_W=>TT_CREATEAGENTREQSPACESLIST OPTIONAL
    !IT_ACTIONCONNECTORS TYPE /AWS1/CL_QSTCREAGREQACTCNRSL00=>TT_CREATEAGENTREQACTCNCTRSLIST OPTIONAL
    !IV_AWSACCOUNTID TYPE /AWS1/QSTAWSACCOUNTID OPTIONAL
    !IV_AGENTID TYPE /AWS1/QSTAGENTID OPTIONAL
    !IV_NAME TYPE /AWS1/QSTAGENTNAME OPTIONAL
    !IV_DESCRIPTION TYPE /AWS1/QSTAGENTDESCRIPTION OPTIONAL
    !IV_ICONID TYPE /AWS1/QSTICONID OPTIONAL
    !IT_STARTERPROMPTS TYPE /AWS1/CL_QSTSTARTERPRMPTLIST_W=>TT_STARTERPROMPTLIST OPTIONAL
    !IV_WELCOMEMESSAGE TYPE /AWS1/QSTWELCOMEMESSAGE OPTIONAL
    !IV_AGENTLIFECYCLE TYPE /AWS1/QSTAGENTLIFECYCLE OPTIONAL
    !IO_CUSTOMPROMPTINPUT TYPE REF TO /AWS1/CL_QSTCUSTOMPROMPTINPUT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_qstcreateagentrsp
  RAISING
    /AWS1/CX_QSTACCESSDENIEDEX
    /AWS1/CX_QSTCONFLICTEXCEPTION
    /AWS1/CX_QSTINTERNALFAILUREEX
    /AWS1/CX_QSTINVPARAMVALUEEX
    /AWS1/CX_QSTLIMITEXCEEDEDEX
    /AWS1/CX_QSTPRECONDNOTMETEX
    /AWS1/CX_QSTRESOURCEEXISTSEX
    /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/QSTAWSACCOUNTID /AWS1/QSTAWSACCOUNTID

The ID of the Amazon Web Services account that contains the agent.

iv_agentid TYPE /AWS1/QSTAGENTID /AWS1/QSTAGENTID

A unique identifier for the agent.

iv_name TYPE /AWS1/QSTAGENTNAME /AWS1/QSTAGENTNAME

The name of the agent.

Optional arguments:

it_spaces TYPE /AWS1/CL_QSTCREAGREQPACESLST_W=>TT_CREATEAGENTREQSPACESLIST TT_CREATEAGENTREQSPACESLIST

The Amazon Resource Names (ARNs) of the spaces to attach to the agent.

it_actionconnectors TYPE /AWS1/CL_QSTCREAGREQACTCNRSL00=>TT_CREATEAGENTREQACTCNCTRSLIST TT_CREATEAGENTREQACTCNCTRSLIST

The Amazon Resource Names (ARNs) of the action connectors to attach to the agent.

iv_description TYPE /AWS1/QSTAGENTDESCRIPTION /AWS1/QSTAGENTDESCRIPTION

A description of the agent.

iv_iconid TYPE /AWS1/QSTICONID /AWS1/QSTICONID

The icon identifier for the agent.

it_starterprompts TYPE /AWS1/CL_QSTSTARTERPRMPTLIST_W=>TT_STARTERPROMPTLIST TT_STARTERPROMPTLIST

A list of starter prompts that are displayed to users when they begin interacting with the agent.

iv_welcomemessage TYPE /AWS1/QSTWELCOMEMESSAGE /AWS1/QSTWELCOMEMESSAGE

The welcome message that is displayed when a user starts a conversation with the agent.

iv_agentlifecycle TYPE /AWS1/QSTAGENTLIFECYCLE /AWS1/QSTAGENTLIFECYCLE

The lifecycle state of the agent. Valid values are PREVIEW and PUBLISHED.

io_custompromptinput TYPE REF TO /AWS1/CL_QSTCUSTOMPROMPTINPUT /AWS1/CL_QSTCUSTOMPROMPTINPUT

The custom prompt configuration for the agent.

RETURNING

oo_output TYPE REF TO /aws1/cl_qstcreateagentrsp /AWS1/CL_QSTCREATEAGENTRSP

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->createagent(
  io_custompromptinput = new /aws1/cl_qstcustompromptinput(
    io_existingprompt = new /aws1/cl_qstcustompromptpfl(
      iv_modelprofileid = |string|
      iv_qbsawsaccountid = |string|
      iv_subscriptionid = |string|
    )
    io_newprompt = new /aws1/cl_qstcustprmptinpparms(
      iv_custominstructions = |string|
      iv_identity = |string|
      iv_outputstyle = |string|
      iv_responselength = |string|
      iv_tone = |string|
    )
  )
  it_actionconnectors = VALUE /aws1/cl_qstcreagreqactcnrsl00=>tt_createagentreqactcnctrslist(
    ( new /aws1/cl_qstcreagreqactcnrsl00( |string| ) )
  )
  it_spaces = VALUE /aws1/cl_qstcreagreqpaceslst_w=>tt_createagentreqspaceslist(
    ( new /aws1/cl_qstcreagreqpaceslst_w( |string| ) )
  )
  it_starterprompts = VALUE /aws1/cl_qststarterprmptlist_w=>tt_starterpromptlist(
    ( new /aws1/cl_qststarterprmptlist_w( |string| ) )
  )
  iv_agentid = |string|
  iv_agentlifecycle = |string|
  iv_awsaccountid = |string|
  iv_description = |string|
  iv_iconid = |string|
  iv_name = |string|
  iv_welcomemessage = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_agentarn = lo_result->get_arn( ).
  lv_agentid = lo_result->get_agentid( ).
  lv_agentstatus = lo_result->get_agentstatus( ).
  lv_agentname = lo_result->get_agentname( ).
  lv_string = lo_result->get_requestid( ).
ENDIF.