Listing S3 Objects
Listing operations list information about S3 Buckets and Objects.
List Objects Request
DEF S3-LIST-OBJECT-RQ.
02 RQ-HDR TYPE S3-HEADER-RQ.
02 OBJECT-NAME TYPE CHARACTER 256.
02 MAX-RP-COUNT TYPE BINARY 32 UNSIGNED.
02 RECURSIVE TYPE BINARY 16.
END
List Objects Reply
DEF S3-CONTENT-ITEM.
02 CONTENT-NAME TYPE CHARACTER 256.
02 CONTENT-ETAG TYPE CHARACTER 256. !Includes dbl-quotes
02 CONTENT-LAST-MODIFIED-GMT TYPE BINARY 64. !TNS julian timestamp (GMT)
02 CONTENT-SIZE TYPE BINARY 64. !Unsigned
02 STORAGE-CLASS TYPE CHARACTER 32.
END
DEF S3-PREFIX-ITEM.
02 PREFIX-NAME TYPE CHARACTER 256.
02 FILLER TYPE CHARACTER 304.
END
DEF S3-BUCKET-ITEM.
02 BUCKET-NAME TYPE CHARACTER 256.
02 BUCKET-CREATION-GMT TYPE BINARY 64. !TNS julian timestamp (GMT)
02 FILLER TYPE CHARACTER 296.
END
DEF S3-LIST-ITEM.
02 ITEM-TYPE TYPE CHARACTER 1. !"B": bucket, "C": content, "P": prefix
02 FILLER TYPE CHARACTER 1.
02 ITEM TYPE CHARACTER 560.
02 CONTENT TYPE S3-CONTENT-ITEM
REDEFINES ITEM.
02 BUCKET TYPE S3-BUCKET-ITEM
REDEFINES ITEM.
02 PREFIX TYPE S3-PREFIX-ITEM
REDEFINES ITEM.
END
DEF S3-LIST-OBJECT-RP.
02 RP-HDR TYPE S3-HEADER-RP.
02 ITEM-COUNT TYPE BINARY 16.
02 ITEM-LIST TYPE S3-LIST-ITEM
OCCURS 0 TO 1000 TIMES
DEPENDING ON ITEM-COUNT.
END