IS3Bucket
Interface in AWS.S3
Interface for S3 Buckets.
Properties
Client
property Client: IS3Client
Type: IS3Client
The S3 Client used to perform actions on this bucket.
CreationDate
property CreationDate: TOptional<TDateTime>
The date and time the bucket was created.
Exists
property Exists: Boolean
Indicates if a bucket exists on Amazon S3.
Location
property Location: string
Specifies the region in which the bucket resides.
Name
property Name: string
The bucket's name.
Methods
GetObject
function GetObject(const AKey: string): IS3Object;
Fetches an object from the bucket.
var LBucket := TS3Bucket.Create('my-bucket') as IS3Bucket; var LObject := LBucket.Object('my-object'); // Do something with LObject. )
Parameters
| Name | Description |
|---|---|
AKey | The object key to retrieve. |
Returns
An IS3Object instance.
Objects
function Objects(const ARequest: IS3ListObjectsV2Request = nil): IS3Objects;
Lists objects in the bucket.
var LBucket := TS3Bucket.Create('my-bucket') as IS3Bucket; for var LObject in LBucket.Objects do begin // Do something with LObject. end; )
Parameters
| Name | Description |
|---|---|
ARequest | An optional request to refine the list from the bucket. |
Returns
A list of IS3Object instances.