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 \ StorageMethods
__construct
| Parameters | |
|---|---|
| Name | Description | 
| connection | Connection\ConnectionInterfaceRepresents a connection to Cloud Storage. This object is created by StorageClient, and should not be instantiated outside of this client. | 
| type | stringThe type of access control this instance applies to. | 
| identity | arrayRepresents which bucket, file, or generation this instance applies to. | 
delete
See also:
| Parameters | |
|---|---|
| Name | Description | 
| entity | stringThe entity to delete. | 
| options | array[optional] Configuration Options. | 
| Returns | |
|---|---|
| Type | Description | 
| void | |
get
See also:
| Parameters | |
|---|---|
| Name | Description | 
| options | arrayConfiguration options. | 
| ↳ entity | stringThe entity to fetch. | 
| Returns | |
|---|---|
| Type | Description | 
| array | |
add
See also:
| Parameters | |
|---|---|
| Name | Description | 
| entity | stringThe entity to add access controls to. | 
| role | stringThe 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
See also:
| Parameters | |
|---|---|
| Name | Description | 
| entity | stringThe entity to update access controls for. | 
| role | stringThe 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'