Skip to main content

anywhere_caches

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

Overview​

Nameanywhere_caches
TypeResource
Idgoogle.storage.anywhere_caches

Fields​

The following fields are returned by SELECT queries:

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.
createTimestring (date-time)The creation time of the cache instance in RFC 3339 format.
ingestOnWritebooleanSpecifies whether objects are ingested into the cache upon write.
kindstringThe kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. (default: 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.
ttlstring (google-duration)The TTL of all cache entries in whole seconds. e.g., "7200s".
updateTimestring (date-time)The 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​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbucket, anywhereCacheIdReturns the metadata of an Anywhere Cache instance.
listselectbucketpageSize, pageTokenReturns a list of Anywhere Cache instances of the bucket matching the criteria.
insertinsertbucketCreates an Anywhere Cache instance.
updateupdatebucket, anywhereCacheIdUpdates the config of an Anywhere Cache instance.
disableexecbucket, anywhereCacheIdDisables an Anywhere Cache instance.
pauseexecbucket, anywhereCacheIdPauses an Anywhere Cache instance.
resumeexecbucket, anywhereCacheIdResumes a paused or disabled Anywhere Cache instance.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
anywhereCacheIdstring
bucketstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Returns the metadata of an Anywhere Cache instance.

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

INSERT examples​

Creates an Anywhere Cache instance.

INSERT INTO google.storage.anywhere_caches (
data__admissionPolicy,
data__anywhereCacheId,
data__bucket,
data__createTime,
data__id,
data__ingestOnWrite,
data__kind,
data__pendingUpdate,
data__selfLink,
data__state,
data__ttl,
data__updateTime,
data__zone,
bucket
)
SELECT
'{{ admissionPolicy }}',
'{{ anywhereCacheId }}',
'{{ bucket }}',
'{{ createTime }}',
'{{ id }}',
{{ ingestOnWrite }},
'{{ kind }}',
{{ pendingUpdate }},
'{{ selfLink }}',
'{{ state }}',
'{{ ttl }}',
'{{ updateTime }}',
'{{ zone }}',
'{{ bucket }}'
RETURNING
name,
done,
error,
kind,
metadata,
response,
selfLink
;

UPDATE examples​

Updates the config of an Anywhere Cache instance.

UPDATE google.storage.anywhere_caches
SET
data__admissionPolicy = '{{ admissionPolicy }}',
data__anywhereCacheId = '{{ anywhereCacheId }}',
data__bucket = '{{ bucket }}',
data__createTime = '{{ createTime }}',
data__id = '{{ id }}',
data__ingestOnWrite = {{ ingestOnWrite }},
data__kind = '{{ kind }}',
data__pendingUpdate = {{ pendingUpdate }},
data__selfLink = '{{ selfLink }}',
data__state = '{{ state }}',
data__ttl = '{{ ttl }}',
data__updateTime = '{{ updateTime }}',
data__zone = '{{ zone }}'
WHERE
bucket = '{{ bucket }}' --required
AND anywhereCacheId = '{{ anywhereCacheId }}' --required
RETURNING
name,
done,
error,
kind,
metadata,
response,
selfLink;

Lifecycle Methods​

Disables an Anywhere Cache instance.

EXEC google.storage.anywhere_caches.disable
@bucket='{{ bucket }}' --required,
@anywhereCacheId='{{ anywhereCacheId }}' --required
;