/AWS1/IF_S3C=>PUTPUBLICACCESSBLOCK()¶
About PutPublicAccessBlock¶
This operation is not supported by directory buckets.
Creates or modifies the PublicAccessBlock configuration for an
Amazon Web Services account. This operation may be restricted when the account is managed by
organization-level Block Public Access policies. You might get an Access Denied (403) error
when the account is managed by organization-level Block Public Access policies.
Organization-level policies override account-level settings, preventing direct
account-level modifications. For this operation, users must have the
s3:PutAccountPublicAccessBlock permission. For more information, see
Using Amazon S3 block public access.
Related actions include:
Method Signature¶
METHODS /AWS1/IF_S3C~PUTPUBLICACCESSBLOCK
IMPORTING
!IO_PUBLICACCESSBLOCKCONF TYPE REF TO /AWS1/CL_S3CPUBLICACCBLOCKCONF OPTIONAL
!IV_ACCOUNTID TYPE /AWS1/S3CACCOUNTID OPTIONAL
RAISING
/AWS1/CX_S3CCLIENTEXC
/AWS1/CX_S3CSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
io_publicaccessblockconf TYPE REF TO /AWS1/CL_S3CPUBLICACCBLOCKCONF /AWS1/CL_S3CPUBLICACCBLOCKCONF¶
The
PublicAccessBlockconfiguration that you want to apply to the specified Amazon Web Services account.
iv_accountid TYPE /AWS1/S3CACCOUNTID /AWS1/S3CACCOUNTID¶
The account ID for the Amazon Web Services account whose
PublicAccessBlockconfiguration you want to set.
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.
lo_client->putpublicaccessblock(
io_publicaccessblockconf = new /aws1/cl_s3cpublicaccblockconf(
iv_blockpublicacls = ABAP_TRUE
iv_blockpublicpolicy = ABAP_TRUE
iv_ignorepublicacls = ABAP_TRUE
iv_restrictpublicbuckets = ABAP_TRUE
)
iv_accountid = |string|
).