/AWS1/IF_MDS=>PUTCONTAINERPOLICY()¶
About PutContainerPolicy¶
Creates an access policy for the specified container to restrict the users and clients that can access it. For information about the data that is included in an access policy, see the AWS Identity and Access Management User Guide.
For this release of the REST API, you can create only one policy for a container. If
you enter PutContainerPolicy twice, the second command modifies the existing
policy.
Method Signature¶
METHODS /AWS1/IF_MDS~PUTCONTAINERPOLICY
IMPORTING
!IV_CONTAINERNAME TYPE /AWS1/MDSCONTAINERNAME OPTIONAL
!IV_POLICY TYPE /AWS1/MDSCONTAINERPOLICY OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_mdsputcontainerplyout
RAISING
/AWS1/CX_MDSCONTAINERINUSEEX
/AWS1/CX_MDSCONTAINERNOTFNDEX
/AWS1/CX_MDSINTERNALSERVERERR
/AWS1/CX_MDSCLIENTEXC
/AWS1/CX_MDSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_containername TYPE /AWS1/MDSCONTAINERNAME /AWS1/MDSCONTAINERNAME¶
The name of the container.
iv_policy TYPE /AWS1/MDSCONTAINERPOLICY /AWS1/MDSCONTAINERPOLICY¶
The contents of the policy, which includes the following:
One
VersiontagOne
Statementtag that contains the standard tags for the policy.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_mdsputcontainerplyout /AWS1/CL_MDSPUTCONTAINERPLYOUT¶
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->putcontainerpolicy(
iv_containername = |string|
iv_policy = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.