Data.Cloud.AmazonAPI.TAmazonStorageService.SetObjectACL

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SetObjectACL(const BucketName, ObjectName: string; ACP: TAmazonAccessControlPolicy;  Headers: TStrings = nil; ResponseInfo: TCloudResponseInfo = nil; BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;
function SetObjectACL(const BucketName, ObjectName: string; ACL: TAmazonACLType;  ResponseInfo: TCloudResponseInfo = nil; BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean; overload;

C++

bool __fastcall SetObjectACL(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, TAmazonAccessControlPolicy* ACP, System::Classes::TStrings* Headers = (System::Classes::TStrings*)(0x0), Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), TAmazonRegion BucketRegion = (TAmazonRegion)(0x0))/* overload */;
bool __fastcall SetObjectACL(const System::UnicodeString BucketName, const System::UnicodeString ObjectName, TAmazonACLType ACL, 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

Sets the ACL for the given object.

There are two overloaded SetObjectACL methods. To set several optional headers, use the first overloaded method. To see a full list, view the Amazon API. Some include: Content-MD5, Content-Type, x-amz-storage-class, and several more. If you provide a ResponseInfo instance and versioning is enabled, then a successful request will result in an 'x-amz-version-id' header being populated, which is the uploaded object's version.

The given ACP holds the owner information as well as the ACL.

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

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 set the ACL for.

ACP

The access control policy containing owner info and the ACL.

Headers

Optional request headers to use.

ResponseInfo

The optional class for storing response info into.

See Also