/AWS1/IF_ERN=>ADDPOLICYSTATEMENT()¶
About AddPolicyStatement¶
Adds a policy statement object. To retrieve a list of existing policy statements, use the GetPolicy API.
Method Signature¶
METHODS /AWS1/IF_ERN~ADDPOLICYSTATEMENT
IMPORTING
!IV_ARN TYPE /AWS1/ERNVENICEGLOBALARN OPTIONAL
!IV_STATEMENTID TYPE /AWS1/ERNSTATEMENTID OPTIONAL
!IV_EFFECT TYPE /AWS1/ERNSTATEMENTEFFECT OPTIONAL
!IT_ACTION TYPE /AWS1/CL_ERNSTMTACTIONLIST_W=>TT_STATEMENTACTIONLIST OPTIONAL
!IT_PRINCIPAL TYPE /AWS1/CL_ERNSTMTPRINCLIST_W=>TT_STATEMENTPRINCIPALLIST OPTIONAL
!IV_CONDITION TYPE /AWS1/ERNSTATEMENTCONDITION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ernaddplystmtoutput
RAISING
/AWS1/CX_ERNACCESSDENIEDEX
/AWS1/CX_ERNCONFLICTEXCEPTION
/AWS1/CX_ERNINTERNALSERVEREX
/AWS1/CX_ERNRESOURCENOTFOUNDEX
/AWS1/CX_ERNTHROTTLINGEX
/AWS1/CX_ERNVALIDATIONEX
/AWS1/CX_ERNCLIENTEXC
/AWS1/CX_ERNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_arn TYPE /AWS1/ERNVENICEGLOBALARN /AWS1/ERNVENICEGLOBALARN¶
The Amazon Resource Name (ARN) of the resource that will be accessed by the principal.
iv_statementid TYPE /AWS1/ERNSTATEMENTID /AWS1/ERNSTATEMENTID¶
A statement identifier that differentiates the statement from others in the same policy.
iv_effect TYPE /AWS1/ERNSTATEMENTEFFECT /AWS1/ERNSTATEMENTEFFECT¶
Determines whether the permissions specified in the policy are to be allowed (
Allow) or denied (Deny).If you set the value of the
effectparameter toDenyfor theAddPolicyStatementoperation, you must also set the value of theeffectparameter in thepolicytoDenyfor thePutPolicyoperation.
it_action TYPE /AWS1/CL_ERNSTMTACTIONLIST_W=>TT_STATEMENTACTIONLIST TT_STATEMENTACTIONLIST¶
The action that the principal can use on the resource.
For example,
entityresolution:GetIdMappingJob,entityresolution:GetMatchingJob.
it_principal TYPE /AWS1/CL_ERNSTMTPRINCLIST_W=>TT_STATEMENTPRINCIPALLIST TT_STATEMENTPRINCIPALLIST¶
The Amazon Web Services service or Amazon Web Services account that can access the resource defined as ARN.
Optional arguments:¶
iv_condition TYPE /AWS1/ERNSTATEMENTCONDITION /AWS1/ERNSTATEMENTCONDITION¶
A set of condition keys that you can use in key policies.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ernaddplystmtoutput /AWS1/CL_ERNADDPLYSTMTOUTPUT¶
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->addpolicystatement(
it_action = VALUE /aws1/cl_ernstmtactionlist_w=>tt_statementactionlist(
( new /aws1/cl_ernstmtactionlist_w( |string| ) )
)
it_principal = VALUE /aws1/cl_ernstmtprinclist_w=>tt_statementprincipallist(
( new /aws1/cl_ernstmtprinclist_w( |string| ) )
)
iv_arn = |string|
iv_condition = |string|
iv_effect = |string|
iv_statementid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_veniceglobalarn = lo_result->get_arn( ).
lv_policytoken = lo_result->get_token( ).
lv_policydocument = lo_result->get_policy( ).
ENDIF.