AnywhereCaches: create

Creates a cache instance in a specified bucket.

Required permissions

The authenticated user must have the storage.anywhereCaches.create IAM permission on the bucket to use this method.

Request

HTTP request

POST https://storage.googleapis.com/storage/v1/b/bucket/anywhereCaches

In addition to standard query parameters, the following query parameters apply to this method.

To see an example of how to include query parameters in a request, see the JSON API Overview page.

Parameters

Parameter nameValueDescription
Path parameters
bucketstringName of a bucket.

Request body

In the request body, supply an AnywhereCache resource with the following properties:

Property nameValueDescriptionNotes
Required Properties
zonestringThe zone that the cache instance will run in.
Optional Properties
ttlstringThe time to live (TTL) of data in the cache, in seconds. If not specified, it defaults to 86400s (24 hours).writable
admissionPolicystringThe cache's admission policy. Values can be admit-on-first-miss or admit-on-second-miss. If not specified, defaults to admit-on-first-miss.writable

Response

If successful, this method returns a google.longrunning.Operation in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.