Data.Cloud.AmazonAPI.TAmazonStorageService.CopyObject

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CopyObject(const DestinationBucket, DestinationObjectName: string;  const SourceBucket, SourceObjectName: string; OptionalParams: TAmazonCopyObjectOptionals = nil; ResponseInfo: TCloudResponseInfo = nil; const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean;

C++

bool __fastcall CopyObject(const System::UnicodeString DestinationBucket, const System::UnicodeString DestinationObjectName, const System::UnicodeString SourceBucket, const System::UnicodeString SourceObjectName, TAmazonCopyObjectOptionals* OptionalParams = (TAmazonCopyObjectOptionals*)(0x0), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), const System::UnicodeString BucketRegion = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
function public
Data.Cloud.AmazonAPI.pas
Data.Cloud.AmazonAPI.hpp
Data.Cloud.AmazonAPI TAmazonStorageService

Description

Copies the specified source object to the given target object.

The OptionalParams instance can be set to provide more control over the request. If you provide a ResponseInfo instance, then you can check the value of the 'x-amz-version-id' header to get the VersionId of the resulting (target) object, if versioning is enabled. If versioning is enabled, then this copy will copy the most recent source object. The 'x-amz-copy-source-version-id' result header specifies the VersionId of the source object that was copied.

See the comments on TAmazonCopyObjectOptionals for more information.

The method returns True if the request was successful, False otherwise.

The following table shows the significance of the parameters:

Parameter Description

DestinationBucket

The bucket the object will be copied into.

DestinationObjectName

The name of the resulting object after the copying.

SourceBucket

The bucket the object being copied is in.

SourceObjectName

The name of the object being copied.

OptionalParams

Optional parameters to refine the request.

ResponseInfo

The optional class for storing response info into.

See Also