Data.Cloud.AmazonAPI.TAmazonStorageService.GetObject
Delphi
function GetObject(const BucketName, ObjectName: string; OptionalParams: TAmazonGetObjectOptionals;
ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil;
const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
function GetObject(const BucketName, ObjectName: string;
ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil;
const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
C++
bool __fastcall GetObject(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, const TAmazonGetObjectOptionals &OptionalParams, System::Classes::TStream* ObjectStream, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), const TAmazonRegion BucketRegion = System::UnicodeString())/* overload */;
bool __fastcall GetObject(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, System::Classes::TStream* ObjectStream, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), const TAmazonRegion BucketRegion = System::UnicodeString())/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Cloud.AmazonAPI.pas Data.Cloud.AmazonAPI.hpp |
Data.Cloud.AmazonAPI | TAmazonStorageService |
Description
Writes the stream for the given object, or returns nil.
There are two GetObject overloaded methods. To control the request, use the first overloaded method with the OptionalParams
parameter.
If the request fails on a 404 (File Not Found) error, then the requested object may have been deleted. If you provide a ResponseInfo
instance, then you can check whether the object was deleted. To check this, verify that there is an 'x-amz-delete-marker' response header and its value is set to True.
The method returns the object stream or nil.
The following table shows the significance of the parameters:
Parameter | Description |
---|---|
|
The name of the bucket the object is in. |
|
The name of the object to get. |
|
The optional parameters or headers to use in the request. |
|
The stream to write to. Must not be nil. |
|
The optional class for storing response info into. |
See Also
- Data.Cloud.AmazonAPI.TAmazonGetObjectOptionals
- System.Classes.TStream
- Data.Cloud.AmazonAPI.TAmazonStorageService.CopyObject
- Data.Cloud.AmazonAPI.TAmazonStorageService.UploadObject
- Data.Cloud.AmazonAPI.TAmazonStorageService.GetObjectACL
- Data.Cloud.AmazonAPI.TAmazonStorageService.DeleteObject
- Introduction to Amazon S3 (amazonwebservices.com)