Cloud Storage Client - Class Acl (1.48.3)

Reference documentation and code samples for the Cloud Storage Client class Acl.

Google Cloud Storage uses access control lists (ACLs) to manage bucket and object access. ACLs are the mechanism you use to share objects with other users and allow other users to access your buckets and objects. For more information please see the overview on access-control .

Example:

 use Google\Cloud\Storage\StorageClient;

$storage = new StorageClient();

$bucket = $storage->bucket('my-bucket');
$acl = $bucket->acl(); 

Namespace

Google \ Cloud \ Storage

Methods

__construct

Parameters
Name
Description
connection
Connection\ConnectionInterface

Represents a connection to Cloud Storage. This object is created by StorageClient, and should not be instantiated outside of this client.

type
string

The type of access control this instance applies to.

identity
array

Represents which bucket, file, or generation this instance applies to.

delete

Parameters
Name
Description
entity
string

The entity to delete.

options
array

[optional] Configuration Options.

Returns
Type
Description
void

get

Parameters
Name
Description
options
array

Configuration options.

↳ entity
string

The entity to fetch.

Returns
Type
Description
array

add

Parameters
Name
Description
entity
string

The entity to add access controls to.

role
string

The permissions to add for the specified entity. May be one of 'OWNER', 'READER', or 'WRITER'.

options
array

[optional] Configuration Options.

Returns
Type
Description
array

update

Parameters
Name
Description
entity
string

The entity to update access controls for.

role
string

The permissions to update for the specified entity. May be one of 'OWNER', 'READER', or 'WRITER'.

options
array

[optional] Configuration Options.

Returns
Type
Description
array

Constants

ROLE_READER

  Value: 'READER' 
 

ROLE_WRITER

  Value: 'WRITER' 
 

ROLE_OWNER

  Value: 'OWNER' 
 
Design a Mobile Site
View Site in Mobile | Classic
Share by: