Data.Cloud.AmazonAPI.TAmazonStorageService.SetBucketPolicy

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Data.Cloud.AmazonAPI.pas
Data.Cloud.AmazonAPI.hpp
Unit: Data.Cloud.AmazonAPI
Parent: TAmazonStorageService

Delphi

function SetBucketPolicy(const BucketName: string; Policy: TJSONObject;
ResponseInfo: TCloudResponseInfo = nil;
const BucketRegion: TAmazonRegion = amzrNotSpecified): Boolean;

C++

bool __fastcall SetBucketPolicy(const System::UnicodeString BucketName, System::Json::TJSONObject* Policy, Data::Cloud::Cloudapi::TCloudResponseInfo* ResponseInfo = (Data::Cloud::Cloudapi::TCloudResponseInfo*)(0x0), const TAmazonRegion BucketRegion = System::UnicodeString());

Description

Sets the policy for the given bucket.

SetBucketPolicy sets the policy for the given bucket.

For information on the JSON format policy, see the Amazon S3 documentation.

The method returns True if successful, and False otherwise.

The following table shows the significance of the parameters:

Parameter Description

BucketName

The name of the bucket to set the policy for.

Policy

The policy, formatted as a JSON object.

ResponseInfo

The optional class for storing response info into.

See Also