/AWS1/CL_S3=>GETBUCKETMETADATACONF()
¶
About GetBucketMetadataConfiguration¶
Retrieves the S3 Metadata configuration for a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.
You can use the V2 GetBucketMetadataConfiguration
API operation with V1 or V2
metadata configurations. However, if you try to use the V1
GetBucketMetadataTableConfiguration
API operation with V2 configurations, you
will receive an HTTP 405 Method Not Allowed
error.
- Permissions
-
To use this operation, you must have the
s3:GetBucketMetadataTableConfiguration
permission. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.The IAM policy action name is the same for the V1 and V2 API operations.
The following operations are related to GetBucketMetadataConfiguration
:
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_bucket
TYPE /AWS1/S3_BUCKETNAME
/AWS1/S3_BUCKETNAME
¶
The general purpose bucket that corresponds to the metadata configuration that you want to retrieve.
Optional arguments:¶
iv_expectedbucketowner
TYPE /AWS1/S3_ACCOUNTID
/AWS1/S3_ACCOUNTID
¶
The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration for.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_s3_getbktmetconfout00
/AWS1/CL_S3_GETBKTMETCONFOUT00
¶
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->/aws1/if_s3~getbucketmetadataconf(
iv_bucket = |string|
iv_expectedbucketowner = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_getbucketmetadataconfig = lo_result->get_getbucketmetconfresult( ).
IF lo_getbucketmetadataconfig IS NOT INITIAL.
lo_metadataconfigurationre = lo_getbucketmetadataconfig->get_metadataconfresult( ).
IF lo_metadataconfigurationre IS NOT INITIAL.
lo_destinationresult = lo_metadataconfigurationre->get_destinationresult( ).
IF lo_destinationresult IS NOT INITIAL.
lv_s3tablesbuckettype = lo_destinationresult->get_tablebuckettype( ).
lv_s3tablesbucketarn = lo_destinationresult->get_tablebucketarn( ).
lv_s3tablesnamespace = lo_destinationresult->get_tablenamespace( ).
ENDIF.
lo_journaltableconfigurati = lo_metadataconfigurationre->get_journaltableconfresult( ).
IF lo_journaltableconfigurati IS NOT INITIAL.
lv_metadatatablestatus = lo_journaltableconfigurati->get_tablestatus( ).
lo_errordetails = lo_journaltableconfigurati->get_error( ).
IF lo_errordetails IS NOT INITIAL.
lv_errorcode = lo_errordetails->get_errorcode( ).
lv_errormessage = lo_errordetails->get_errormessage( ).
ENDIF.
lv_s3tablesname = lo_journaltableconfigurati->get_tablename( ).
lv_s3tablesarn = lo_journaltableconfigurati->get_tablearn( ).
lo_recordexpiration = lo_journaltableconfigurati->get_recordexpiration( ).
IF lo_recordexpiration IS NOT INITIAL.
lv_expirationstate = lo_recordexpiration->get_expiration( ).
lv_recordexpirationdays = lo_recordexpiration->get_days( ).
ENDIF.
ENDIF.
lo_inventorytableconfigura = lo_metadataconfigurationre->get_inventorytableconfresult( ).
IF lo_inventorytableconfigura IS NOT INITIAL.
lv_inventoryconfigurations = lo_inventorytableconfigura->get_configurationstate( ).
lv_metadatatablestatus = lo_inventorytableconfigura->get_tablestatus( ).
lo_errordetails = lo_inventorytableconfigura->get_error( ).
IF lo_errordetails IS NOT INITIAL.
lv_errorcode = lo_errordetails->get_errorcode( ).
lv_errormessage = lo_errordetails->get_errormessage( ).
ENDIF.
lv_s3tablesname = lo_inventorytableconfigura->get_tablename( ).
lv_s3tablesarn = lo_inventorytableconfigura->get_tablearn( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.