/AWS1/IF_S3=>GETOBJECTANNOTATION()¶
About GetObjectAnnotation¶
Retrieves an annotation from an Amazon S3 object. To use this operation, you must have the
s3:GetObjectAnnotation permission.
If checksum mode is enabled via the x-amz-checksum-mode header, Amazon S3
returns the stored checksum in the response headers for client-side validation.
Annotations are not supported by the following features: S3 Inventory Reports, API Gateway, S3 Storage Lens, Amazon S3 File Gateway, Amazon FSx, S3 on Outposts, and S3 Express One Zone (directory buckets).
The following operations are related to GetObjectAnnotation:
Method Signature¶
METHODS /AWS1/IF_S3~GETOBJECTANNOTATION
IMPORTING
!IV_BUCKET TYPE /AWS1/S3_BUCKETNAME OPTIONAL
!IV_KEY TYPE /AWS1/S3_OBJECTKEY OPTIONAL
!IV_ANNOTATIONNAME TYPE /AWS1/S3_ANNOTATIONNAME OPTIONAL
!IV_VERSIONID TYPE /AWS1/S3_OBJECTVERSIONID OPTIONAL
!IV_REQUESTPAYER TYPE /AWS1/S3_REQUESTPAYER OPTIONAL
!IV_EXPECTEDBUCKETOWNER TYPE /AWS1/S3_ACCOUNTID OPTIONAL
!IV_CHECKSUMMODE TYPE /AWS1/S3_CHECKSUMMODE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3_getobjannotoutput
RAISING
/AWS1/CX_S3_NOSUCHANNOTATION
/AWS1/CX_S3_NOSUCHBUCKET
/AWS1/CX_S3_NOSUCHKEY
/AWS1/CX_S3_CLIENTEXC
/AWS1/CX_S3_SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_bucket TYPE /AWS1/S3_BUCKETNAME /AWS1/S3_BUCKETNAME¶
The name of the bucket that contains the object.
iv_key TYPE /AWS1/S3_OBJECTKEY /AWS1/S3_OBJECTKEY¶
The object key.
iv_annotationname TYPE /AWS1/S3_ANNOTATIONNAME /AWS1/S3_ANNOTATIONNAME¶
The name of the annotation to retrieve.
Length Constraints: Minimum length of 1. Maximum length of 512 bytes.
Optional arguments:¶
iv_versionid TYPE /AWS1/S3_OBJECTVERSIONID /AWS1/S3_OBJECTVERSIONID¶
The version ID of the object.
iv_requestpayer TYPE /AWS1/S3_REQUESTPAYER /AWS1/S3_REQUESTPAYER¶
Confirms that the requester knows that they will be charged for the request. Bucket owners need not specify this parameter in their requests. If either the source or destination S3 bucket has Requester Pays enabled, the requester will pay for the corresponding charges. For information about downloading objects from Requester Pays buckets, see Downloading Objects in Requester Pays Buckets in the Amazon S3 User Guide.
This functionality is not supported for directory buckets.
iv_expectedbucketowner TYPE /AWS1/S3_ACCOUNTID /AWS1/S3_ACCOUNTID¶
The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with an HTTP 403 (Access Denied) error.
iv_checksummode TYPE /AWS1/S3_CHECKSUMMODE /AWS1/S3_CHECKSUMMODE¶
Set to
ENABLEDto validate the checksum of the annotation payload on retrieval.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3_getobjannotoutput /AWS1/CL_S3_GETOBJANNOTOUTPUT¶
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->getobjectannotation(
iv_annotationname = |string|
iv_bucket = |string|
iv_checksummode = |string|
iv_expectedbucketowner = |string|
iv_key = |string|
iv_requestpayer = |string|
iv_versionid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_streamingblob = lo_result->get_annotationpayload( ).
lv_objectversionid = lo_result->get_objectversionid( ).
lv_lastmodified = lo_result->get_lastmodified( ).
lv_contentlength = lo_result->get_contentlength( ).
lv_etag = lo_result->get_etag( ).
lv_checksumcrc32 = lo_result->get_checksumcrc32( ).
lv_checksumcrc32c = lo_result->get_checksumcrc32c( ).
lv_checksumcrc64nvme = lo_result->get_checksumcrc64nvme( ).
lv_checksumsha1 = lo_result->get_checksumsha1( ).
lv_checksumsha256 = lo_result->get_checksumsha256( ).
lv_checksumsha512 = lo_result->get_checksumsha512( ).
lv_checksummd5 = lo_result->get_checksummd5( ).
lv_checksumxxhash64 = lo_result->get_checksumxxhash64( ).
lv_checksumxxhash3 = lo_result->get_checksumxxhash3( ).
lv_checksumxxhash128 = lo_result->get_checksumxxhash128( ).
lv_checksumtype = lo_result->get_checksumtype( ).
lv_serversideencryption = lo_result->get_serversideencryption( ).
lv_requestcharged = lo_result->get_requestcharged( ).
lv_replicationstatus = lo_result->get_replicationstatus( ).
ENDIF.