/AWS1/IF_BDO=>CREATEGATEWAYRATELIMIT()¶
About CreateGatewayRateLimit¶
Creates a rate limit for a gateway. Rate limits define throttling rules for each dimension that control request rates, token consumption rates, and concurrent connections through the gateway.
Method Signature¶
METHODS /AWS1/IF_BDO~CREATEGATEWAYRATELIMIT
IMPORTING
!IV_GATEWAYIDENTIFIER TYPE /AWS1/BDOGATEWAYIDENTIFIER OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/BDOCLIENTTOKEN OPTIONAL
!IV_RATELIMITID TYPE /AWS1/BDOGATEWAYRATELIMITID OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/BDOGATEWAYRATELIMITDESC OPTIONAL
!IT_DIMENSIONKEYS TYPE /AWS1/CL_BDODIMENSIONKEYS_W=>TT_DIMENSIONKEYS OPTIONAL
!IT_ENTRIES TYPE /AWS1/CL_BDOLIMITENTRY=>TT_LIMITENTRIES OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdocreategwrlimrsp
RAISING
/AWS1/CX_BDOACCESSDENIEDEX
/AWS1/CX_BDOCONFLICTEXCEPTION
/AWS1/CX_BDOINTERNALSERVEREX
/AWS1/CX_BDORESOURCENOTFOUNDEX
/AWS1/CX_BDOSERVICEQUOTAEXCDEX
/AWS1/CX_BDOTHROTTLINGEX
/AWS1/CX_BDOVALIDATIONEX
/AWS1/CX_BDOCLIENTEXC
/AWS1/CX_BDOSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_gatewayidentifier TYPE /AWS1/BDOGATEWAYIDENTIFIER /AWS1/BDOGATEWAYIDENTIFIER¶
The unique identifier of the gateway to create the rate limit for.
it_dimensionkeys TYPE /AWS1/CL_BDODIMENSIONKEYS_W=>TT_DIMENSIONKEYS TT_DIMENSIONKEYS¶
The ordered list of dimension key names that define the scope of this rate limit. Must be unique per gateway—no two rate limits can share the same dimension keys.
it_entries TYPE /AWS1/CL_BDOLIMITENTRY=>TT_LIMITENTRIES TT_LIMITENTRIES¶
The rule entries that map dimension values to rate configurations.
Optional arguments:¶
iv_clienttoken TYPE /AWS1/BDOCLIENTTOKEN /AWS1/BDOCLIENTTOKEN¶
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
iv_ratelimitid TYPE /AWS1/BDOGATEWAYRATELIMITID /AWS1/BDOGATEWAYRATELIMITID¶
An optional customer-defined identifier for the rate limit. If not provided, the system generates one.
iv_description TYPE /AWS1/BDOGATEWAYRATELIMITDESC /AWS1/BDOGATEWAYRATELIMITDESC¶
An optional human-readable description for this rate limit. If not provided, the rate limit is created without a description.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_bdocreategwrlimrsp /AWS1/CL_BDOCREATEGWRLIMRSP¶
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->creategatewayratelimit(
it_dimensionkeys = VALUE /aws1/cl_bdodimensionkeys_w=>tt_dimensionkeys(
( new /aws1/cl_bdodimensionkeys_w( |string| ) )
)
it_entries = VALUE /aws1/cl_bdolimitentry=>tt_limitentries(
(
new /aws1/cl_bdolimitentry(
it_connections = VALUE /aws1/cl_bdorateconfig=>tt_rateconfigs(
(
new /aws1/cl_bdorateconfig(
iv_period = |string|
iv_rate = '0.1'
)
)
)
it_dimensions = VALUE /aws1/cl_bdodimensions_w=>tt_dimensions(
(
VALUE /aws1/cl_bdodimensions_w=>ts_dimensions_maprow(
key = |string|
value = new /aws1/cl_bdodimensions_w( |string| )
)
)
)
it_requests = VALUE /aws1/cl_bdorateconfig=>tt_rateconfigs(
(
new /aws1/cl_bdorateconfig(
iv_period = |string|
iv_rate = '0.1'
)
)
)
it_tokens = VALUE /aws1/cl_bdorateconfig=>tt_rateconfigs(
(
new /aws1/cl_bdorateconfig(
iv_period = |string|
iv_rate = '0.1'
)
)
)
)
)
)
iv_clienttoken = |string|
iv_description = |string|
iv_gatewayidentifier = |string|
iv_ratelimitid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_gatewayratelimitid = lo_result->get_ratelimitid( ).
lv_gatewayidentifier = lo_result->get_gatewayidentifier( ).
lv_gatewayratelimitdescrip = lo_result->get_description( ).
LOOP AT lo_result->get_dimensionkeys( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_dimensionkey = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_entries( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
LOOP AT lo_row_3->get_dimensions( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_dimensionvalue = lo_value->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_3->get_requests( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_double = lo_row_6->get_rate( ).
lv_period = lo_row_6->get_period( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_3->get_tokens( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_double = lo_row_6->get_rate( ).
lv_period = lo_row_6->get_period( ).
ENDIF.
ENDLOOP.
LOOP AT lo_row_3->get_connections( ) into lo_row_5.
lo_row_6 = lo_row_5.
IF lo_row_6 IS NOT INITIAL.
lv_double = lo_row_6->get_rate( ).
lv_period = lo_row_6->get_period( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
lv_gatewayratelimitstatus = lo_result->get_status( ).
lv_datetimestamp = lo_result->get_createdat( ).
lv_datetimestamp = lo_result->get_updatedat( ).
ENDIF.