/AWS1/IF_VPS=>GETPOLICYTEMPLATE()¶
About GetPolicyTemplate¶
Retrieve the details for the specified policy template in the specified policy store.
Method Signature¶
METHODS /AWS1/IF_VPS~GETPOLICYTEMPLATE
IMPORTING
!IV_POLICYSTOREID TYPE /AWS1/VPSPOLICYSTOREID OPTIONAL
!IV_POLICYTEMPLATEID TYPE /AWS1/VPSPOLICYTEMPLATEID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_vpsgetplytmploutput
RAISING
/AWS1/CX_VPSACCESSDENIEDEX
/AWS1/CX_VPSINTERNALSERVEREX
/AWS1/CX_VPSTHROTTLINGEX
/AWS1/CX_VPSVALIDATIONEX
/AWS1/CX_VPSRESOURCENOTFOUNDEX
/AWS1/CX_VPSCLIENTEXC
/AWS1/CX_VPSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_policystoreid TYPE /AWS1/VPSPOLICYSTOREID /AWS1/VPSPOLICYSTOREID¶
Specifies the ID of the policy store that contains the policy template that you want information about.
To specify a policy store, use its ID or alias name. When using an alias name, prefix it with
policy-store-alias/. For example:
ID:
PSEXAMPLEabcdefg111111Alias name:
policy-store-alias/example-policy-storeTo view aliases, use ListPolicyStoreAliases.
iv_policytemplateid TYPE /AWS1/VPSPOLICYTEMPLATEID /AWS1/VPSPOLICYTEMPLATEID¶
Specifies the ID of the policy template that you want information about.
You can use the policy template name in place of the policy template ID. When using a name, prefix it with
name/. For example:
ID:
PTEXAMPLEabcdefg111111Name:
name/example-policy-template
RETURNING¶
oo_output TYPE REF TO /aws1/cl_vpsgetplytmploutput /AWS1/CL_VPSGETPLYTMPLOUTPUT¶
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->getpolicytemplate(
iv_policystoreid = |string|
iv_policytemplateid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_policystoreid = lo_result->get_policystoreid( ).
lv_policytemplateid = lo_result->get_policytemplateid( ).
lv_policytemplatedescripti = lo_result->get_description( ).
lv_policystatement = lo_result->get_statement( ).
lv_timestampformat = lo_result->get_createddate( ).
lv_timestampformat = lo_result->get_lastupdateddate( ).
lv_policytemplatename = lo_result->get_name( ).
ENDIF.
GetPolicyTemplate¶
The following example displays the details of the specified policy template.
DATA(lo_result) = lo_client->getpolicytemplate(
iv_policystoreid = |C7v5xMplfFH3i3e4Jrzb1a|
iv_policytemplateid = |PTEXAMPLEabcdefg111111|
).
To retrieve a policy template by name¶
The following example retrieves the details of a policy template using its name instead of its ID.
DATA(lo_result) = lo_client->getpolicytemplate(
iv_policystoreid = |C7v5xMplfFH3i3e4Jrzb1a|
iv_policytemplateid = |name/example-policy-template|
).