anywhere_caches
Creates, updates, deletes, gets or lists a anywhere_caches
resource.
Overview
Name | anywhere_caches |
Type | Resource |
Id | google.storage.anywhere_caches |
Fields
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 | 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. |
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 | The TTL of all cache entries in whole seconds. e.g., "7200s". |
updateTime | string | 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | anywhereCacheId, bucket | Returns the metadata of an Anywhere Cache instance. |
list | SELECT | bucket | Returns a list of Anywhere Cache instances of the bucket matching the criteria. |
insert | INSERT | bucket | Creates an Anywhere Cache instance. |
update | UPDATE | anywhereCacheId, bucket | Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance. |
disable | EXEC | anywhereCacheId, bucket | Disables an Anywhere Cache instance. |
pause | EXEC | anywhereCacheId, bucket | Pauses an Anywhere Cache instance. |
resume | EXEC | anywhereCacheId, bucket | Resumes 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.storage.anywhere_caches (
bucket,
bucket,
anywhereCacheId,
zone,
state,
ttl,
admissionPolicy,
pendingUpdate
)
SELECT
'{{ bucket }}',
'{{ bucket }}',
'{{ anywhereCacheId }}',
'{{ zone }}',
'{{ state }}',
'{{ ttl }}',
'{{ admissionPolicy }}',
{{ pendingUpdate }}
;
- name: your_resource_model_name
props:
- name: kind
value: string
- name: id
value: string
- name: selfLink
value: string
- name: bucket
value: string
- name: anywhereCacheId
value: string
- name: zone
value: string
- name: state
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: ttl
value: string
- name: admissionPolicy
value: string
- name: pendingUpdate
value: boolean
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 }}';