AnywhereCaches: update Stay organized with collections Save and categorize content based on your preferences.
Updates acache instancein a specified bucket. Only caches in aRUNNING state can be updated.
Required permissions
The authenticated user must have thestorage.anywhereCaches.update IAM permission on the bucket to use this method.
Request
HTTP request
PATCH https://storage.googleapis.com/storage/v1/b/bucket/anywhereCaches/anywhereCacheID
In addition tostandard query parameters, the following parameters apply to this method.
Parameters
| Parameter name | Value | Description |
|---|---|---|
| Path parameters | ||
bucket | string | Name of a bucket. |
anywhereCacheID | string | A value that, along with the bucket's name, uniquely identifies the cache. |
To see an example of how to include parameters in a request, see theJSON API Overview page.
Request body
In the request body, supply anAnywhereCache resource with the following properties:
| Property name | Value | Description | Notes |
|---|---|---|---|
| Required Properties | |||
ttl | string | The time to live (TTL) of data in the cache, in seconds. Values can be expressed in seconds. For example:70000s for 70,000 seconds. If not specified, defaults to86400s, which equates to 1 day. | writable |
admissionPolicy | string | The cache's admission policy. Values can beadmit-on-first-miss oradmit-on-second-miss. If not specified, it defaults toadmit-on-first-miss. | writable |
Response
If successful, this method returns agoogle.longrunning.Operation in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.