Storage/src/Bucket.php
public function update(array $options = [])
    {
        if (isset($options['lifecycle']) && $options['lifecycle'] instanceof Lifecycle) {
            $options['lifecycle'] = $options['lifecycle']->toArray();
        }

        return $this->info = $this->connection->patchBucket($options + $this->identity);
    }
public function update(array $options = [])
    {
        if (isset($options['lifecycle']) && $options['lifecycle'] instanceof Lifecycle) {
            $options['lifecycle'] = $options['lifecycle']->toArray();
        }

        return $this->info = $this->connection->patchBucket($options + $this->identity);
    }
public function update ( array $ options = [ ] ) { if ( isset ( $ options [ 'lifecycle' ] ) && $ options [ 'lifecycle' ] instanceof Lifecycle ) { $ options [ 'lifecycle' ] = $ options [ 'lifecycle' ] -> toArray ( ) ; } return $ this -> info = $ this -> connection -> patchBucket ( $ options + $ this -> identity ) ; }
Update the bucket. Upon receiving a result the local bucket's data will
be updated.

Example:
```
// Enable logging on an existing bucket.
$bucket->update([
'logging' => [
'logBucket' => 'myBucket',
'logObjectPrefix' => 'prefix'
]
]);
```

@see https://cloud.google.com/storage/docs/json_api/v1/buckets/patch Buckets patch API documentation.
@see https://cloud.google.com/storage/docs/key-terms#bucket-labels Bucket Labels

@codingStandardsIgnoreStart
@param array $options [optional] {
Configuration options.

@type string $ifMetagenerationMatch Makes the return of the bucket
metadata conditional on whether the bucket's current
metageneration matches the given value.
@type string $ifMetagenerationNotMatch Makes the return of the bucket
metadata conditional on whether the bucket's current
metageneration does not match the given value.
@type string $predefinedAcl Predefined ACL to apply to the bucket.
Acceptable values include, `"authenticatedRead"`,
`"bucketOwnerFullControl"`, `"bucketOwnerRead"`, `"private"`,
`"projectPrivate"`, and `"publicRead"`.
@type string $predefinedDefaultObjectAcl Apply a predefined set of
default object access controls to this bucket. Acceptable
values include, `"authenticatedRead"`,
`"bucketOwnerFullControl"`, `"bucketOwnerRead"`, `"private"`,
`"projectPrivate"`, and `"publicRead"`.
@type string $projection Determines which properties to return. May
be either `"full"` or `"noAcl"`.
@type string $fields Selector which will cause the response to only
return the specified fields.
@type array $acl Access controls on the bucket.
@type array $cors The bucket's Cross-Origin Resource Sharing (CORS)
configuration.
@type array $defaultObjectAcl Default access controls to apply to new
objects when no ACL is provided.
@type array|Lifecycle $lifecycle The bucket's lifecycle configuration.
@type array $logging The bucket's logging configuration, which
defines the destination bucket and optional name prefix for the
current bucket's logs.
@type string $storageClass The bucket's storage class. This defines
how objects in the bucket are stored and determines the SLA and
the cost of storage. Acceptable values include
`"MULTI_REGIONAL"`, `"REGIONAL"`, `"NEARLINE"`, `"COLDLINE"`,
`"STANDARD"` and `"DURABLE_REDUCED_AVAILABILITY"`.
@type array $versioning The bucket's versioning configuration.
@type array $website The bucket's website configuration.
@type array $billing The bucket's billing configuration.
@type bool $billing.requesterPays When `true`, requests to this bucket
and objects within it must provide a project ID to which the
request will be billed.
@type array $labels The Bucket labels. Labels are represented as an
array of keys and values. To remove an existing label, set its
value to `null`.
@type array $encryption Encryption configuration used by default for
newly inserted objects.
@type string $encryption.defaultKmsKeyName A Cloud KMS Key used to
encrypt objects uploaded into this bucket. Should be in the
format
`projects/my-project/locations/kr-location/keyRings/my-kr/cryptoKeys/my-key`.
Please note the KMS key ring must use the same location as the
bucket.
@type bool $defaultEventBasedHold When `true`, newly created objects
in this bucket will be retained indefinitely until an event
occurs, signified by the hold's release.
@type array $retentionPolicy Defines the retention policy for a
bucket. In order to lock a retention policy, please see
{@see Google\Cloud\Storage\Bucket::lockRetentionPolicy()}.
@type int $retentionPolicy.retentionPeriod Specifies the duration
that objects need to be retained, in seconds. Retention
duration must be greater than zero and less than 100 years.
@type array $iamConfiguration The bucket's IAM configuration.
@type bool $iamConfiguration.bucketPolicyOnly.enabled If set and
true, access checks only use bucket-level IAM policies or
above. When enabled, requests attempting to view or manipulate
ACLs will fail with error code 400. **NOTE**: Before using
Bucket Policy Only, please review the
[feature documentation](https://cloud.google.com/storage/docs/bucket-policy-only),
as well as
[Should You Use Bucket Policy Only](https://cloud.google.com/storage/docs/bucket-policy-only#should-you-use)
}
@codingStandardsIgnoreEnd
@return array
Update the bucket . Upon receiving a result the local bucket s data will be updated .