/AWS1/CL_AGW=>CREATERESTAPI()
¶
About CreateRestApi¶
Creates a new RestApi resource.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_name
TYPE /AWS1/AGWSTRING
/AWS1/AGWSTRING
¶
The name of the RestApi.
Optional arguments:¶
iv_description
TYPE /AWS1/AGWSTRING
/AWS1/AGWSTRING
¶
The description of the RestApi.
iv_version
TYPE /AWS1/AGWSTRING
/AWS1/AGWSTRING
¶
A version identifier for the API.
iv_clonefrom
TYPE /AWS1/AGWSTRING
/AWS1/AGWSTRING
¶
The ID of the RestApi that you want to clone from.
it_binarymediatypes
TYPE /AWS1/CL_AGWLISTOFSTRING_W=>TT_LISTOFSTRING
TT_LISTOFSTRING
¶
The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.
iv_minimumcompressionsize
TYPE /AWS1/AGWNULLABLEINTEGER
/AWS1/AGWNULLABLEINTEGER
¶
A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.
iv_apikeysource
TYPE /AWS1/AGWAPIKEYSOURCETYPE
/AWS1/AGWAPIKEYSOURCETYPE
¶
The source of the API key for metering requests according to a usage plan. Valid values are:
HEADER
to read the API key from theX-API-Key
header of a request.AUTHORIZER
to read the API key from theUsageIdentifierKey
from a custom authorizer.
io_endpointconfiguration
TYPE REF TO /AWS1/CL_AGWENDPOINTCONF
/AWS1/CL_AGWENDPOINTCONF
¶
The endpoint configuration of this RestApi showing the endpoint types and IP address types of the API.
iv_policy
TYPE /AWS1/AGWSTRING
/AWS1/AGWSTRING
¶
A stringified JSON policy document that applies to this RestApi regardless of the caller and Method configuration.
it_tags
TYPE /AWS1/CL_AGWMAPOFSTRTOSTR_W=>TT_MAPOFSTRINGTOSTRING
TT_MAPOFSTRINGTOSTRING
¶
The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with
aws:
. The tag value can be up to 256 characters.
iv_disableexecuteapiendpoint
TYPE /AWS1/AGWBOOLEAN
/AWS1/AGWBOOLEAN
¶
Specifies whether clients can invoke your API by using the default
execute-api
endpoint. By default, clients can invoke your API with the defaulthttps://{api_id}.execute-api.{region}.amazonaws.com
endpoint. To require that clients use a custom domain name to invoke your API, disable the default endpoint
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_agwrestapi
/AWS1/CL_AGWRESTAPI
¶
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_agw~createrestapi(
io_endpointconfiguration = new /aws1/cl_agwendpointconf(
it_types = VALUE /aws1/cl_agwlistofendpttype_w=>tt_listofendpointtype(
( new /aws1/cl_agwlistofendpttype_w( |string| ) )
)
it_vpcendpointids = VALUE /aws1/cl_agwlistofstring_w=>tt_listofstring(
( new /aws1/cl_agwlistofstring_w( |string| ) )
)
iv_ipaddresstype = |string|
)
it_binarymediatypes = VALUE /aws1/cl_agwlistofstring_w=>tt_listofstring(
( new /aws1/cl_agwlistofstring_w( |string| ) )
)
it_tags = VALUE /aws1/cl_agwmapofstrtostr_w=>tt_mapofstringtostring(
(
VALUE /aws1/cl_agwmapofstrtostr_w=>ts_mapofstringtostring_maprow(
key = |string|
value = new /aws1/cl_agwmapofstrtostr_w( |string| )
)
)
)
iv_apikeysource = |string|
iv_clonefrom = |string|
iv_description = |string|
iv_disableexecuteapiendpoint = ABAP_TRUE
iv_minimumcompressionsize = 123
iv_name = |string|
iv_policy = |string|
iv_version = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_id( ).
lv_string = lo_result->get_name( ).
lv_string = lo_result->get_description( ).
lv_timestamp = lo_result->get_createddate( ).
lv_string = lo_result->get_version( ).
LOOP AT lo_result->get_warnings( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_result->get_binarymediatypes( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_nullableinteger = lo_result->get_minimumcompressionsize( ).
lv_apikeysourcetype = lo_result->get_apikeysource( ).
lo_endpointconfiguration = lo_result->get_endpointconfiguration( ).
IF lo_endpointconfiguration IS NOT INITIAL.
LOOP AT lo_endpointconfiguration->get_types( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_endpointtype = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_ipaddresstype = lo_endpointconfiguration->get_ipaddresstype( ).
LOOP AT lo_endpointconfiguration->get_vpcendpointids( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_string = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_string = lo_result->get_policy( ).
LOOP AT lo_result->get_tags( ) into ls_row_4.
lv_key = ls_row_4-key.
lo_value = ls_row_4-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_value( ).
ENDIF.
ENDLOOP.
lv_boolean = lo_result->get_disableexecuteapiendpt( ).
lv_string = lo_result->get_rootresourceid( ).
ENDIF.