/AWS1/IF_NWS=>LISTTEMPLATES()¶
About ListTemplates¶
Lists the templates in the account. You can filter the results by status and page through them using maxResults and nextToken.
Method Signature¶
METHODS /AWS1/IF_NWS~LISTTEMPLATES
IMPORTING
!IV_MAXRESULTS TYPE /AWS1/NWSMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/NWSNEXTTOKEN OPTIONAL
!IV_STATUS TYPE /AWS1/NWSENTITYSTATUSFILTER OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_nwslisttmploutput
RAISING
/AWS1/CX_NWSACCESSDENIEDEX
/AWS1/CX_NWSINTERNALSERVEREX
/AWS1/CX_NWSTHROTTLINGEX
/AWS1/CX_NWSVLDTNEXCEPTION
/AWS1/CX_NWSCLIENTEXC
/AWS1/CX_NWSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_maxresults TYPE /AWS1/NWSMAXRESULTS /AWS1/NWSMAXRESULTS¶
The maximum number of results to return in a single call. Valid range: 1-100. To retrieve the remaining results, use the returned
nextTokenvalue in a subsequent call.
iv_nexttoken TYPE /AWS1/NWSNEXTTOKEN /AWS1/NWSNEXTTOKEN¶
The token for the next page of results. To retrieve the next page, call the operation again and provide this value. When there are no more results, this value is null.
iv_status TYPE /AWS1/NWSENTITYSTATUSFILTER /AWS1/NWSENTITYSTATUSFILTER¶
Filters the results by status, either
ACTIVEorDRAFT.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_nwslisttmploutput /AWS1/CL_NWSLISTTMPLOUTPUT¶
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->listtemplates(
iv_maxresults = 123
iv_nexttoken = |string|
iv_status = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_nexttoken = lo_result->get_nexttoken( ).
LOOP AT lo_result->get_templates( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_templateid = lo_row_1->get_templateid( ).
lv_templatearn = lo_row_1->get_templatearn( ).
lv_templatename = lo_row_1->get_templatename( ).
lv_entitystatus = lo_row_1->get_status( ).
lv_entityversion = lo_row_1->get_version( ).
lv_haspublishedversion = lo_row_1->get_haspublishedversion( ).
lv_templatefirewalltype = lo_row_1->get_firewalltype( ).
lv_datetimestamp = lo_row_1->get_updatedat( ).
ENDIF.
ENDLOOP.
ENDIF.
List templates¶
Lists the published templates in the account, one page at a time.
DATA(lo_result) = lo_client->listtemplates(
iv_maxresults = 10
iv_status = |ACTIVE|
).