/AWS1/IF_AGW=>CREATEDEPLOYMENT()¶
About CreateDeployment¶
Creates a Deployment resource, which makes a specified RestApi callable over the internet.
Method Signature¶
METHODS /AWS1/IF_AGW~CREATEDEPLOYMENT
IMPORTING
!IV_RESTAPIID TYPE /AWS1/AGWSTRING OPTIONAL
!IV_STAGENAME TYPE /AWS1/AGWSTRING OPTIONAL
!IV_STAGEDESCRIPTION TYPE /AWS1/AGWSTRING OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/AGWSTRING OPTIONAL
!IV_CACHECLUSTERENABLED TYPE /AWS1/AGWNULLABLEBOOLEAN OPTIONAL
!IV_CACHECLUSTERSIZE TYPE /AWS1/AGWCACHECLUSTERSIZE OPTIONAL
!IT_VARIABLES TYPE /AWS1/CL_AGWMAPOFSTRTOSTR_W=>TT_MAPOFSTRINGTOSTRING OPTIONAL
!IO_CANARYSETTINGS TYPE REF TO /AWS1/CL_AGWDEPLOYMENTCANARY00 OPTIONAL
!IV_TRACINGENABLED TYPE /AWS1/AGWNULLABLEBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_agwdeployment
RAISING
/AWS1/CX_AGWBADREQUESTEX
/AWS1/CX_AGWCONFLICTEXCEPTION
/AWS1/CX_AGWLIMITEXCEEDEDEX
/AWS1/CX_AGWNOTFOUNDEXCEPTION
/AWS1/CX_AGWSERVICEUNAVAILEX
/AWS1/CX_AGWTOOMANYREQUESTSEX
/AWS1/CX_AGWUNAUTHORIZEDEX
/AWS1/CX_AGWCLIENTEXC
/AWS1/CX_AGWSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_restapiid TYPE /AWS1/AGWSTRING /AWS1/AGWSTRING¶
The string identifier of the associated RestApi.
Optional arguments:¶
iv_stagename TYPE /AWS1/AGWSTRING /AWS1/AGWSTRING¶
The name of the Stage resource for the Deployment resource to create.
iv_stagedescription TYPE /AWS1/AGWSTRING /AWS1/AGWSTRING¶
The description of the Stage resource for the Deployment resource to create.
iv_description TYPE /AWS1/AGWSTRING /AWS1/AGWSTRING¶
The description for the Deployment resource to create.
iv_cacheclusterenabled TYPE /AWS1/AGWNULLABLEBOOLEAN /AWS1/AGWNULLABLEBOOLEAN¶
Enables a cache cluster for the Stage resource specified in the input.
iv_cacheclustersize TYPE /AWS1/AGWCACHECLUSTERSIZE /AWS1/AGWCACHECLUSTERSIZE¶
The stage's cache capacity in GB. For more information about choosing a cache size, see Enabling API caching to enhance responsiveness.
it_variables TYPE /AWS1/CL_AGWMAPOFSTRTOSTR_W=>TT_MAPOFSTRINGTOSTRING TT_MAPOFSTRINGTOSTRING¶
A map that defines the stage variables for the Stage resource that is associated with the new deployment. Variable names can have alphanumeric and underscore characters, and the values must match
[A-Za-z0-9-._~:/?#&=,]+.
io_canarysettings TYPE REF TO /AWS1/CL_AGWDEPLOYMENTCANARY00 /AWS1/CL_AGWDEPLOYMENTCANARY00¶
The input configuration for the canary deployment when the deployment is a canary release deployment.
iv_tracingenabled TYPE /AWS1/AGWNULLABLEBOOLEAN /AWS1/AGWNULLABLEBOOLEAN¶
Specifies whether active tracing with X-ray is enabled for the Stage.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_agwdeployment /AWS1/CL_AGWDEPLOYMENT¶
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->createdeployment(
io_canarysettings = new /aws1/cl_agwdeploymentcanary00(
it_stagevariableoverrides = 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_percenttraffic = '0.1'
iv_usestagecache = ABAP_TRUE
)
it_variables = 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_cacheclusterenabled = ABAP_TRUE
iv_cacheclustersize = |string|
iv_description = |string|
iv_restapiid = |string|
iv_stagedescription = |string|
iv_stagename = |string|
iv_tracingenabled = ABAP_TRUE
).
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_description( ).
lv_timestamp = lo_result->get_createddate( ).
LOOP AT lo_result->get_apisummary( ) into ls_row.
lv_key = ls_row-key.
LOOP AT ls_row-value into ls_row_1.
lv_key = ls_row_1-key.
lo_value = ls_row_1-value.
IF lo_value IS NOT INITIAL.
lv_string = lo_value->get_authorizationtype( ).
lv_boolean = lo_value->get_apikeyrequired( ).
ENDIF.
ENDLOOP.
ENDLOOP.
ENDIF.