Data.Cloud.AmazonAPI.TAmazonStorageService.SetObjectACL
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 |
---|---|
|
The name of the bucket the object is in. |
|
The name of the object to set the ACL for. |
|
The access control policy containing owner info and the ACL. |
|
Optional request headers to use. |
|
The optional class for storing response info into. |
See Also
- Data.Cloud.AmazonAPI.TAmazonAccessControlPolicy
- Data.Cloud.AmazonAPI.TAmazonACLType
- Data.Cloud.AmazonAPI.TAmazonStorageService.GetObjectACLXML
- 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)