Data.Cloud.AmazonAPI.TAmazonStorageService.GetObjectVersion
Delphi
function GetObjectVersion(const BucketName, ObjectName, VersionId: string;
OptionalParams: TAmazonGetObjectOptionals;
ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil;
const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
function GetObjectVersion(const BucketName, ObjectName, VersionId: string;
ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil;
const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
C++
bool __fastcall GetObjectVersion(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, const System::UnicodeString VersionId, 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 GetObjectVersion(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, const System::UnicodeString VersionId, 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 version, or returns nil.
There are two GetObjectVersion 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 if the object was deleted by verifying there is a '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 a version of. |
|
The ID of the version 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)