Skip to main content

rapid_caches

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

Overview​

Namerapid_caches
TypeResource
Idgoogle.storage.rapid_caches

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the resource, including the project number, bucket name and rapid cache ID.
admissionPolicystringThe cache-level entry admission policy.
bucketstringThe name of the bucket containing this cache instance.
cacheTypestringThe type of Rapid Cache this represents. Valid values include: "rapid-cache" and "rapid-cache-ultra".
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 Rapid Cache, this is always storage#rapidCache. (default: storage#rapidCache)
pendingUpdatebooleanTrue if the cache instance has an active Update long-running operation.
rapidCacheIdstringThe ID of the Rapid cache instance.
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, rapidCacheIdReturns the metadata of a Rapid Cache instance.
listselectbucketpageSize, pageTokenReturns a list of Rapid Cache instances of the bucket.
insertinsertbucketCreates a Rapid Cache instance.
updateupdatebucket, rapidCacheIdUpdates the configuration of a Rapid Cache instance.
disableexecbucket, rapidCacheIdDisables a Rapid 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
bucketstring
rapidCacheIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples​

Returns the metadata of a Rapid Cache instance.

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

INSERT examples​

Creates a Rapid Cache instance.

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

UPDATE examples​

Updates the configuration of a Rapid Cache instance.

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

Lifecycle Methods​

Disables a Rapid Cache instance.

EXEC google.storage.rapid_caches.disable
@bucket='{{ bucket }}' --required,
@rapidCacheId='{{ rapidCacheId }}' --required
;