anywhere_caches
Creates, updates, deletes, gets or lists an anywhere_caches
resource.
Overview
Name | anywhere_caches |
Type | Resource |
Id | google.storage.anywhere_caches |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
admissionPolicy | string | The cache-level entry admission policy. |
anywhereCacheId | string | The ID of the Anywhere cache instance. |
bucket | string | The name of the bucket containing this cache instance. |
createTime | string (date-time) | The creation time of the cache instance in RFC 3339 format. |
kind | string | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. (default: storage#anywhereCache) |
pendingUpdate | boolean | True if the cache instance has an active Update long-running operation. |
selfLink | string | The link to this cache instance. |
state | string | The current state of the cache instance. |
ttl | string (google-duration) | The TTL of all cache entries in whole seconds. e.g., "7200s". |
updateTime | string (date-time) | The modification time of the cache instance metadata in RFC 3339 format. |
zone | string | The zone in which the cache instance is running. For example, us-central1-a. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string | The ID of the resource, including the project number, bucket name and anywhere cache ID. |
admissionPolicy | string | The cache-level entry admission policy. |
anywhereCacheId | string | The ID of the Anywhere cache instance. |
bucket | string | The name of the bucket containing this cache instance. |
createTime | string (date-time) | The creation time of the cache instance in RFC 3339 format. |
kind | string | The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache. (default: storage#anywhereCache) |
pendingUpdate | boolean | True if the cache instance has an active Update long-running operation. |
selfLink | string | The link to this cache instance. |
state | string | The current state of the cache instance. |
ttl | string (google-duration) | The TTL of all cache entries in whole seconds. e.g., "7200s". |
updateTime | string (date-time) | The modification time of the cache instance metadata in RFC 3339 format. |
zone | string | The zone in which the cache instance is running. For example, us-central1-a. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | bucket , anywhereCacheId | Returns the metadata of an Anywhere Cache instance. | |
list | select | bucket | pageSize , pageToken | Returns a list of Anywhere Cache instances of the bucket matching the criteria. |
insert | insert | bucket | Creates an Anywhere Cache instance. | |
update | update | bucket , anywhereCacheId | Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance. | |
pause | exec | bucket , anywhereCacheId | Pauses an Anywhere Cache instance. | |
resume | exec | bucket , anywhereCacheId | Resumes a paused or disabled Anywhere Cache instance. | |
disable | exec | bucket , anywhereCacheId | Disables an 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.
Name | Datatype | Description |
---|---|---|
anywhereCacheId | string | |
bucket | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- get
- list
Returns the metadata of an Anywhere Cache instance.
SELECT
id,
admissionPolicy,
anywhereCacheId,
bucket,
createTime,
kind,
pendingUpdate,
selfLink,
state,
ttl,
updateTime,
zone
FROM google.storage.anywhere_caches
WHERE bucket = '{{ bucket }}' -- required
AND anywhereCacheId = '{{ anywhereCacheId }}' -- required;
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 }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- insert
- Manifest
Creates an Anywhere Cache instance.
INSERT INTO google.storage.anywhere_caches (
data__kind,
data__id,
data__selfLink,
data__bucket,
data__anywhereCacheId,
data__zone,
data__state,
data__createTime,
data__updateTime,
data__ttl,
data__admissionPolicy,
data__pendingUpdate,
bucket
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ selfLink }}',
'{{ bucket }}',
'{{ anywhereCacheId }}',
'{{ zone }}',
'{{ state }}',
'{{ createTime }}',
'{{ updateTime }}',
'{{ ttl }}',
'{{ admissionPolicy }}',
{{ pendingUpdate }},
'{{ bucket }}'
RETURNING
name,
done,
error,
kind,
metadata,
response,
selfLink
;
# Description fields are for documentation purposes
- name: anywhere_caches
props:
- name: bucket
value: string
description: Required parameter for the anywhere_caches resource.
- name: kind
value: string
description: >
The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.
default: storage#anywhereCache
- name: id
value: string
description: >
The ID of the resource, including the project number, bucket name and anywhere cache ID.
- name: selfLink
value: string
description: >
The link to this cache instance.
- name: bucket
value: string
description: >
The name of the bucket containing this cache instance.
- name: anywhereCacheId
value: string
description: >
The ID of the Anywhere cache instance.
- name: zone
value: string
description: >
The zone in which the cache instance is running. For example, us-central1-a.
- name: state
value: string
description: >
The current state of the cache instance.
- name: createTime
value: string
description: >
The creation time of the cache instance in RFC 3339 format.
- name: updateTime
value: string
description: >
The modification time of the cache instance metadata in RFC 3339 format.
- name: ttl
value: string
description: >
The TTL of all cache entries in whole seconds. e.g., "7200s".
- name: admissionPolicy
value: string
description: >
The cache-level entry admission policy.
- name: pendingUpdate
value: boolean
description: >
True if the cache instance has an active Update long-running operation.
UPDATE
examples
- update
Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.
UPDATE google.storage.anywhere_caches
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__selfLink = '{{ selfLink }}',
data__bucket = '{{ bucket }}',
data__anywhereCacheId = '{{ anywhereCacheId }}',
data__zone = '{{ zone }}',
data__state = '{{ state }}',
data__createTime = '{{ createTime }}',
data__updateTime = '{{ updateTime }}',
data__ttl = '{{ ttl }}',
data__admissionPolicy = '{{ admissionPolicy }}',
data__pendingUpdate = {{ pendingUpdate }}
WHERE
bucket = '{{ bucket }}' --required
AND anywhereCacheId = '{{ anywhereCacheId }}' --required
RETURNING
name,
done,
error,
kind,
metadata,
response,
selfLink;
Lifecycle Methods
- pause
- resume
- disable
Pauses an Anywhere Cache instance.
EXEC google.storage.anywhere_caches.pause
@bucket='{{ bucket }}' --required,
@anywhereCacheId='{{ anywhereCacheId }}' --required;
Resumes a paused or disabled Anywhere Cache instance.
EXEC google.storage.anywhere_caches.resume
@bucket='{{ bucket }}' --required,
@anywhereCacheId='{{ anywhereCacheId }}' --required;
Disables an Anywhere Cache instance.
EXEC google.storage.anywhere_caches.disable
@bucket='{{ bucket }}' --required,
@anywhereCacheId='{{ anywhereCacheId }}' --required;