Skip to content

/AWS1/IF_BDO=>GETAGENTRUNTIME()

About GetAgentRuntime

Gets an Amazon Bedrock AgentCore Runtime.

Method Signature

IMPORTING

Required arguments:

iv_agentruntimeid TYPE /AWS1/BDOAGENTRUNTIMEID /AWS1/BDOAGENTRUNTIMEID

The unique identifier of the AgentCore Runtime to retrieve.

Optional arguments:

iv_agentruntimeversion TYPE /AWS1/BDOAGENTRUNTIMEVERSION /AWS1/BDOAGENTRUNTIMEVERSION

The version of the AgentCore Runtime to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdogetagentruntimersp /AWS1/CL_BDOGETAGENTRUNTIMERSP

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_bdo~getagentruntime(
  iv_agentruntimeid = |string|
  iv_agentruntimeversion = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_agentruntimearn = lo_result->get_agentruntimearn( ).
  lo_workloadidentitydetails = lo_result->get_workloadidentitydetails( ).
  IF lo_workloadidentitydetails IS NOT INITIAL.
    lv_workloadidentityarn = lo_workloadidentitydetails->get_workloadidentityarn( ).
  ENDIF.
  lv_agentruntimename = lo_result->get_agentruntimename( ).
  lv_description = lo_result->get_description( ).
  lv_agentruntimeid = lo_result->get_agentruntimeid( ).
  lv_agentruntimeversion = lo_result->get_agentruntimeversion( ).
  lv_datetimestamp = lo_result->get_createdat( ).
  lv_datetimestamp = lo_result->get_lastupdatedat( ).
  lv_rolearn = lo_result->get_rolearn( ).
  lo_agentruntimeartifact = lo_result->get_agentruntimeartifact( ).
  IF lo_agentruntimeartifact IS NOT INITIAL.
    lo_containerconfiguration = lo_agentruntimeartifact->get_containerconfiguration( ).
    IF lo_containerconfiguration IS NOT INITIAL.
      lv_runtimecontaineruri = lo_containerconfiguration->get_containeruri( ).
    ENDIF.
  ENDIF.
  lo_networkconfiguration = lo_result->get_networkconfiguration( ).
  IF lo_networkconfiguration IS NOT INITIAL.
    lv_networkmode = lo_networkconfiguration->get_networkmode( ).
    lo_vpcconfig = lo_networkconfiguration->get_networkmodeconfig( ).
    IF lo_vpcconfig IS NOT INITIAL.
      LOOP AT lo_vpcconfig->get_securitygroups( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_securitygroupid = lo_row_1->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_vpcconfig->get_subnets( ) into lo_row_2.
        lo_row_3 = lo_row_2.
        IF lo_row_3 IS NOT INITIAL.
          lv_subnetid = lo_row_3->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lo_protocolconfiguration = lo_result->get_protocolconfiguration( ).
  IF lo_protocolconfiguration IS NOT INITIAL.
    lv_serverprotocol = lo_protocolconfiguration->get_serverprotocol( ).
  ENDIF.
  LOOP AT lo_result->get_environmentvariables( ) into ls_row_4.
    lv_key = ls_row_4-key.
    lo_value = ls_row_4-value.
    IF lo_value IS NOT INITIAL.
      lv_environmentvariablevalu = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  lo_authorizerconfiguration = lo_result->get_authorizerconfiguration( ).
  IF lo_authorizerconfiguration IS NOT INITIAL.
    lo_customjwtauthorizerconf = lo_authorizerconfiguration->get_customjwtauthorizer( ).
    IF lo_customjwtauthorizerconf IS NOT INITIAL.
      lv_discoveryurl = lo_customjwtauthorizerconf->get_discoveryurl( ).
      LOOP AT lo_customjwtauthorizerconf->get_allowedaudience( ) into lo_row_5.
        lo_row_6 = lo_row_5.
        IF lo_row_6 IS NOT INITIAL.
          lv_allowedaudience = lo_row_6->get_value( ).
        ENDIF.
      ENDLOOP.
      LOOP AT lo_customjwtauthorizerconf->get_allowedclients( ) into lo_row_7.
        lo_row_8 = lo_row_7.
        IF lo_row_8 IS NOT INITIAL.
          lv_allowedclient = lo_row_8->get_value( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDIF.
  lo_requestheaderconfigurat = lo_result->get_requestheaderconf( ).
  IF lo_requestheaderconfigurat IS NOT INITIAL.
    LOOP AT lo_requestheaderconfigurat->get_requestheaderallowlist( ) into lo_row_9.
      lo_row_10 = lo_row_9.
      IF lo_row_10 IS NOT INITIAL.
        lv_headername = lo_row_10->get_value( ).
      ENDIF.
    ENDLOOP.
  ENDIF.
  lv_agentruntimestatus = lo_result->get_status( ).
ENDIF.