Skip to main content

anywhere_caches

Creates, updates, deletes, gets or lists a anywhere_caches resource.

Overview

Nameanywhere_caches
TypeResource
Idgoogle.storage.anywhere_caches

Fields

NameDatatypeDescription
idstringThe ID of the resource, including the project number, bucket name and anywhere cache ID.
admissionPolicystringThe cache-level entry admission policy.
anywhereCacheIdstringThe ID of the Anywhere cache instance.
bucketstringThe name of the bucket containing this cache instance.
createTimestringThe creation time of the cache instance in RFC 3339 format.
kindstringThe kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.
pendingUpdatebooleanTrue if the cache instance has an active Update long-running operation.
selfLinkstringThe link to this cache instance.
statestringThe current state of the cache instance.
ttlstringThe TTL of all cache entries in whole seconds. e.g., "7200s".
updateTimestringThe modification time of the cache instance metadata in RFC 3339 format.
zonestringThe zone in which the cache instance is running. For example, us-central1-a.

Methods

NameAccessible byRequired ParamsDescription
getSELECTanywhereCacheId, bucketReturns the metadata of an Anywhere Cache instance.
listSELECTbucketReturns a list of Anywhere Cache instances of the bucket matching the criteria.
insertINSERTbucketCreates an Anywhere Cache instance.
updateUPDATEanywhereCacheId, bucketUpdates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
disableEXECanywhereCacheId, bucketDisables an Anywhere Cache instance.
pauseEXECanywhereCacheId, bucketPauses an Anywhere Cache instance.
resumeEXECanywhereCacheId, bucketResumes a paused or disabled Anywhere Cache instance.

SELECT examples

Returns a list of Anywhere Cache instances of the bucket matching the criteria.

SELECT
id,
admissionPolicy,
anywhereCacheId,
bucket,
createTime,
kind,
pendingUpdate,
selfLink,
state,
ttl,
updateTime,
zone
FROM google.storage.anywhere_caches
WHERE bucket = '{{ bucket }}';

INSERT example

Use the following StackQL query and manifest file to create a new anywhere_caches resource.

/*+ create */
INSERT INTO google.storage.anywhere_caches (
bucket,
bucket,
anywhereCacheId,
zone,
state,
ttl,
admissionPolicy,
pendingUpdate
)
SELECT
'{{ bucket }}',
'{{ bucket }}',
'{{ anywhereCacheId }}',
'{{ zone }}',
'{{ state }}',
'{{ ttl }}',
'{{ admissionPolicy }}',
{{ pendingUpdate }}
;

UPDATE example

Updates a anywhere_caches resource.

/*+ update */
UPDATE google.storage.anywhere_caches
SET
bucket = '{{ bucket }}',
anywhereCacheId = '{{ anywhereCacheId }}',
zone = '{{ zone }}',
state = '{{ state }}',
ttl = '{{ ttl }}',
admissionPolicy = '{{ admissionPolicy }}',
pendingUpdate = true|false
WHERE
anywhereCacheId = '{{ anywhereCacheId }}'
AND bucket = '{{ bucket }}';