Data.Cloud.AmazonAPI.TAmazonStorageService.GetObjectVersion

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetObjectVersion(const BucketName, ObjectName, VersionId: string;  OptionalParams: TAmazonGetObjectOptionals; ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil; BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
function GetObjectVersion(const BucketName, ObjectName, VersionId: string;  ObjectStream: TStream; ResponseInfo: TCloudResponseInfo = nil; 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), TAmazonRegion BucketRegion = (TAmazonRegion)(0x0))/* 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), TAmazonRegion BucketRegion = (TAmazonRegion)(0x0))/* 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

BucketName

The name of the bucket the object is in.

ObjectName

The name of the object to get a version of.

VersionId

The ID of the version to get.

OptionalParams

The optional parameters or headers to use in the request.

ObjectStream

The stream to write to. Must not be nil.

ResponseInfo

The optional class for storing response info into.

See Also