# Cloud Storage Client - Class Acl (2.3.0)

2.3.0 (latest) 2.2.0 2.1.0 2.0.0 1.51.0 1.50.0 1.49.2 1.48.7 1.47.0 1.46.0 1.45.0 1.44.0 1.43.1 1.42.1 1.41.4 1.37.0 1.36.1 1.35.0 1.34.0 1.33.4 1.32.0 1.31.2 1.30.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](https://cloud.google.com/storage/docs/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

See also:

- [BucketAccessControls delete
  API documentation.](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/delete)
- [DefaultObjectAccessControls delete API documentation.](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/delete)
- [ObjectAccessControls delete
  API documentation.](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/delete)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `entity` | `string` The entity to delete. |
| `options` | `array` \[optional\] Configuration Options. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### get

See also:

- [BucketAccessControls get API
  documentation.](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/get)
- [DefaultObjectAccessControls get API documentation.](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/get)
- [ObjectAccessControls get API
  documentation.](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/get)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `options` | `array` Configuration options. |
| `↳ entity` | `string` The entity to fetch. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `array` |   |

### add

See also:

- [BucketAccessControls insert
  API documentation.](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/insert)
- [DefaultObjectAccessControls insert API documentation.](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/insert)
- [ObjectAccessControls insert
  API documentation.](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/insert)

| **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

See also:

- [BucketAccessControls patch API
  documentation.](https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls/patch)
- [DefaultObjectAccessControls patch API documentation.](https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/patch)
- [ObjectAccessControls patch
  API documentation.](https://cloud.google.com/storage/docs/json_api/v1/objectAccessControls/patch)

| **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'