Method: projects.locations.buckets.patch

Updates a bucket. This method replaces the following fields in the existing bucket with values from the new bucket: retentionPeriod

If the retention period is decreased and the bucket is locked, FAILED_PRECONDITION will be returned.

If the bucket has a LifecycleState of DELETE_REQUESTED, FAILED_PRECONDITION will be returned.

A buckets region may not be modified after it is created. This method is in Beta.

HTTP request


The URL uses gRPC Transcoding syntax.

Path parameters



Required. The full resource name of the bucket to update.


Example: "projects/my-project-id/locations/my-location/buckets/my-bucket-id". Also requires permission "resourcemanager.projects.updateLiens" to set the locked property

Authorization requires the following IAM permission on the specified resource name:

  • logging.buckets.update

Query parameters


string (FieldMask format)

Required. Field mask that specifies the fields in bucket that need an update. A bucket field will be overwritten if, and only if, it is in the update mask. name and output only fields cannot be updated.

For a detailed FieldMask definition, see

Example: updateMask=retentionDays.


Request body

The request body contains an instance of LogBucket.

Response body

If successful, the response body contains an instance of LogBucket.

Authorization Scopes

Requires one of the following OAuth scopes:


For more information, see the Authentication Overview.

Try it!