/AWS1/IF_GLU=>PUTRESOURCEPOLICY()¶
About PutResourcePolicy¶
Sets the Data Catalog resource policy for access control.
Method Signature¶
METHODS /AWS1/IF_GLU~PUTRESOURCEPOLICY
IMPORTING
!IV_POLICYINJSON TYPE /AWS1/GLUPOLICYJSONSTRING OPTIONAL
!IV_RESOURCEARN TYPE /AWS1/GLUGLUERESOURCEARN OPTIONAL
!IV_POLICYHASHCONDITION TYPE /AWS1/GLUHASHSTRING OPTIONAL
!IV_POLICYEXISTSCONDITION TYPE /AWS1/GLUEXISTCONDITION OPTIONAL
!IV_ENABLEHYBRID TYPE /AWS1/GLUENABLEHYBRIDVALUES OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_gluputresourceplyrsp
RAISING
/AWS1/CX_GLUCONDCHECKFAILUREEX
/AWS1/CX_GLUENTITYNOTFOUNDEX
/AWS1/CX_GLUINTERNALSERVICEEX
/AWS1/CX_GLUINVALIDINPUTEX
/AWS1/CX_GLUOPERATIONTIMEOUTEX
/AWS1/CX_GLUCLIENTEXC
/AWS1/CX_GLUSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_policyinjson TYPE /AWS1/GLUPOLICYJSONSTRING /AWS1/GLUPOLICYJSONSTRING¶
Contains the policy document to set, in JSON format.
Optional arguments:¶
iv_resourcearn TYPE /AWS1/GLUGLUERESOURCEARN /AWS1/GLUGLUERESOURCEARN¶
Do not use. For internal use only.
iv_policyhashcondition TYPE /AWS1/GLUHASHSTRING /AWS1/GLUHASHSTRING¶
The hash value returned when the previous policy was set using
PutResourcePolicy. Its purpose is to prevent concurrent modifications of a policy. Do not use this parameter if no previous policy has been set.
iv_policyexistscondition TYPE /AWS1/GLUEXISTCONDITION /AWS1/GLUEXISTCONDITION¶
A value of
MUST_EXISTis used to update a policy. A value ofNOT_EXISTis used to create a new policy. If a value ofNONEor a null value is used, the call does not depend on the existence of a policy.
iv_enablehybrid TYPE /AWS1/GLUENABLEHYBRIDVALUES /AWS1/GLUENABLEHYBRIDVALUES¶
If
'TRUE', indicates that you are using both methods to grant cross-account access to Data Catalog resources:
By directly updating the resource policy with
PutResourePolicyBy using the Grant permissions command on the Amazon Web Services Management Console.
Must be set to
'TRUE'if you have already used the Management Console to grant cross-account access, otherwise the call fails. Default is 'FALSE'.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_gluputresourceplyrsp /AWS1/CL_GLUPUTRESOURCEPLYRSP¶
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->putresourcepolicy(
iv_enablehybrid = |string|
iv_policyexistscondition = |string|
iv_policyhashcondition = |string|
iv_policyinjson = |string|
iv_resourcearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_hashstring = lo_result->get_policyhash( ).
ENDIF.