/AWS1/IF_BDO=>CREATEGATEWAY()
¶
About CreateGateway¶
Creates a gateway for Amazon Bedrock Agent. A gateway serves as an integration point between your agent and external services.
To create a gateway, you must specify a name, protocol type, and IAM role. The role grants the gateway permission to access Amazon Web Services services and resources.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_name
TYPE /AWS1/BDOGATEWAYNAME
/AWS1/BDOGATEWAYNAME
¶
The name of the gateway. The name must be unique within your account.
iv_rolearn
TYPE /AWS1/BDOROLEARN
/AWS1/BDOROLEARN
¶
The Amazon Resource Name (ARN) of the IAM role that provides permissions for the gateway to access Amazon Web Services services.
iv_protocoltype
TYPE /AWS1/BDOGATEWAYPROTOCOLTYPE
/AWS1/BDOGATEWAYPROTOCOLTYPE
¶
The protocol type for the gateway. Currently supports MCP (Model Context Protocol).
iv_authorizertype
TYPE /AWS1/BDOAUTHORIZERTYPE
/AWS1/BDOAUTHORIZERTYPE
¶
The type of authorizer to use for the gateway.
io_authorizerconfiguration
TYPE REF TO /AWS1/CL_BDOAUTHORIZERCONF
/AWS1/CL_BDOAUTHORIZERCONF
¶
The authorizer configuration for the Gateway.
Optional arguments:¶
iv_description
TYPE /AWS1/BDOGATEWAYDESCRIPTION
/AWS1/BDOGATEWAYDESCRIPTION
¶
The description of the gateway.
iv_clienttoken
TYPE /AWS1/BDOCLIENTTOKEN
/AWS1/BDOCLIENTTOKEN
¶
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request but does not return an error.
io_protocolconfiguration
TYPE REF TO /AWS1/CL_BDOGATEWAYPROTCONF
/AWS1/CL_BDOGATEWAYPROTCONF
¶
The configuration settings for the protocol specified in the protocolType parameter.
iv_kmskeyarn
TYPE /AWS1/BDOKMSKEYARN
/AWS1/BDOKMSKEYARN
¶
The Amazon Resource Name (ARN) of the KMS key used to encrypt data associated with the gateway.
iv_exceptionlevel
TYPE /AWS1/BDOEXCEPTIONLEVEL
/AWS1/BDOEXCEPTIONLEVEL
¶
The verbosity of exception messages. Use DEBUG mode to see granular exception messages from a Gateway. If this parameter is not set, exception messages are by default sanitized for presentation to end users.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_bdocreategatewayrsp
/AWS1/CL_BDOCREATEGATEWAYRSP
¶
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~creategateway(
io_authorizerconfiguration = new /aws1/cl_bdoauthorizerconf(
io_customjwtauthorizer = new /aws1/cl_bdocustomjwtauthrconf(
it_allowedaudience = VALUE /aws1/cl_bdoalwedaudiencelst_w=>tt_allowedaudiencelist(
( new /aws1/cl_bdoalwedaudiencelst_w( |string| ) )
)
it_allowedclients = VALUE /aws1/cl_bdoallowedclislist_w=>tt_allowedclientslist(
( new /aws1/cl_bdoallowedclislist_w( |string| ) )
)
iv_discoveryurl = |string|
)
)
io_protocolconfiguration = new /aws1/cl_bdogatewayprotconf(
io_mcp = new /aws1/cl_bdomcpgatewayconf(
it_supportedversions = VALUE /aws1/cl_bdomcpsupportedvrss_w=>tt_mcpsupportedversions(
( new /aws1/cl_bdomcpsupportedvrss_w( |string| ) )
)
iv_instructions = |string|
iv_searchtype = |string|
)
)
iv_authorizertype = |string|
iv_clienttoken = |string|
iv_description = |string|
iv_exceptionlevel = |string|
iv_kmskeyarn = |string|
iv_name = |string|
iv_protocoltype = |string|
iv_rolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_gatewayarn = lo_result->get_gatewayarn( ).
lv_gatewayid = lo_result->get_gatewayid( ).
lv_gatewayurl = lo_result->get_gatewayurl( ).
lv_datetimestamp = lo_result->get_createdat( ).
lv_datetimestamp = lo_result->get_updatedat( ).
lv_gatewaystatus = lo_result->get_status( ).
LOOP AT lo_result->get_statusreasons( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_statusreason = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_gatewayname = lo_result->get_name( ).
lv_gatewaydescription = lo_result->get_description( ).
lv_rolearn = lo_result->get_rolearn( ).
lv_gatewayprotocoltype = lo_result->get_protocoltype( ).
lo_gatewayprotocolconfigur = lo_result->get_protocolconfiguration( ).
IF lo_gatewayprotocolconfigur IS NOT INITIAL.
lo_mcpgatewayconfiguration = lo_gatewayprotocolconfigur->get_mcp( ).
IF lo_mcpgatewayconfiguration IS NOT INITIAL.
LOOP AT lo_mcpgatewayconfiguration->get_supportedversions( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_mcpversion = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_mcpinstructions = lo_mcpgatewayconfiguration->get_instructions( ).
lv_searchtype = lo_mcpgatewayconfiguration->get_searchtype( ).
ENDIF.
ENDIF.
lv_authorizertype = lo_result->get_authorizertype( ).
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_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_allowedaudience = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_customjwtauthorizerconf->get_allowedclients( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_allowedclient = lo_row_7->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lv_kmskeyarn = lo_result->get_kmskeyarn( ).
lo_workloadidentitydetails = lo_result->get_workloadidentitydetails( ).
IF lo_workloadidentitydetails IS NOT INITIAL.
lv_workloadidentityarn = lo_workloadidentitydetails->get_workloadidentityarn( ).
ENDIF.
lv_exceptionlevel = lo_result->get_exceptionlevel( ).
ENDIF.