caches
Creates, updates, deletes, gets or lists a caches
resource.
Overview
Name | caches |
Type | Resource |
Id | azure.storage_cache.caches |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Returns the cache object corresponding to cache name.
Name | Datatype | Description |
---|---|---|
id | string | Resource ID of the cache. |
name | string | Name of cache. (pattern: ^[-0-9a-zA-Z_]{1,80}$ ) |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
properties | object | Properties of the cache. |
sku | object | SKU for the cache. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Type of the cache; Microsoft.StorageCache/Cache |
A list of cache objects. Note that entity references might replace complete cache objects, as described in http://docs.oasis-open.org/odata/odata-json-format/v4.01/cs01/odata-json-format-v4.01-cs01.html#sec_EntityReference
Name | Datatype | Description |
---|---|---|
id | string | Resource ID of the cache. |
name | string | Name of cache. (pattern: ^[-0-9a-zA-Z_]{1,80}$ ) |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
properties | object | Properties of the cache. |
sku | object | SKU for the cache. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Type of the cache; Microsoft.StorageCache/Cache |
A list of cache objects. Note that entity references might replace complete cache objects, as described in http://docs.oasis-open.org/odata/odata-json-format/v4.01/cs01/odata-json-format-v4.01-cs01.html#sec_EntityReference
Name | Datatype | Description |
---|---|---|
id | string | Resource ID of the cache. |
name | string | Name of cache. (pattern: ^[-0-9a-zA-Z_]{1,80}$ ) |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
properties | object | Properties of the cache. |
sku | object | SKU for the cache. |
systemData | object | The system meta data relating to this resource. |
tags | object | Resource tags. |
type | string | Type of the cache; Microsoft.StorageCache/Cache |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , cacheName , subscriptionId | Returns a cache. | |
list_by_resource_group | select | resourceGroupName , subscriptionId | Returns all caches the user has access to under a resource group. | |
list | select | subscriptionId | Returns all caches the user has access to under a subscription. | |
create_or_update | insert | resourceGroupName , subscriptionId , cacheName | Create or update a cache. | |
update | update | resourceGroupName , subscriptionId , cacheName | Update a cache instance. | |
delete | delete | resourceGroupName , cacheName , subscriptionId | Schedules a cache for deletion. | |
debug_info | exec | resourceGroupName , subscriptionId , cacheName | Tells a cache to write generate debug info for support to process. | |
flush | exec | resourceGroupName , subscriptionId , cacheName | Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete. | |
start | exec | resourceGroupName , subscriptionId , cacheName | Tells a Stopped state cache to transition to Active state. | |
stop | exec | resourceGroupName , subscriptionId , cacheName | Tells an Active cache to transition to Stopped state. | |
start_priming_job | exec | resourceGroupName , subscriptionId , cacheName , primingJobName , primingManifestUrl | Create a priming job. This operation is only allowed when the cache is healthy. | |
stop_priming_job | exec | resourceGroupName , cacheName , subscriptionId , primingJobId | Schedule a priming job for deletion. | |
pause_priming_job | exec | resourceGroupName , cacheName , subscriptionId , primingJobId | Schedule a priming job to be paused. | |
resume_priming_job | exec | resourceGroupName , cacheName , subscriptionId , primingJobId | Resumes a paused priming job. | |
upgrade_firmware | exec | resourceGroupName , subscriptionId , cacheName | Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. | |
space_allocation | exec | resourceGroupName , subscriptionId , cacheName | Update cache space allocation. |
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 |
---|---|---|
cacheName | string | Name of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string (uuid) | The ID of the target subscription. The value must be an UUID. |
SELECT
examples
- get
- list_by_resource_group
- list
Returns a cache.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.storage_cache.caches
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND cacheName = '{{ cacheName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Returns all caches the user has access to under a resource group.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.storage_cache.caches
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Returns all caches the user has access to under a subscription.
SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.storage_cache.caches
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update a cache.
INSERT INTO azure.storage_cache.caches (
data__tags,
data__location,
data__identity,
data__properties,
data__sku,
resourceGroupName,
subscriptionId,
cacheName
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ identity }}',
'{{ properties }}',
'{{ sku }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ cacheName }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: caches
props:
- name: resourceGroupName
value: string
description: Required parameter for the caches resource.
- name: subscriptionId
value: string (uuid)
description: Required parameter for the caches resource.
- name: cacheName
value: string
description: Required parameter for the caches resource.
- name: tags
value: object
description: |
Resource tags.
- name: location
value: string
description: |
Region name string.
- name: identity
value: object
description: |
The identity of the cache, if configured.
- name: properties
value: object
description: |
Properties of the cache.
- name: sku
value: object
description: |
SKU for the cache.
UPDATE
examples
- update
Update a cache instance.
UPDATE azure.storage_cache.caches
SET
data__tags = '{{ tags }}',
data__location = '{{ location }}',
data__identity = '{{ identity }}',
data__properties = '{{ properties }}',
data__sku = '{{ sku }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND cacheName = '{{ cacheName }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;
DELETE
examples
- delete
Schedules a cache for deletion.
DELETE FROM azure.storage_cache.caches
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND cacheName = '{{ cacheName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- debug_info
- flush
- start
- stop
- start_priming_job
- stop_priming_job
- pause_priming_job
- resume_priming_job
- upgrade_firmware
- space_allocation
Tells a cache to write generate debug info for support to process.
EXEC azure.storage_cache.caches.debug_info
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;
Tells a cache to write all dirty data to the Storage Target(s). During the flush, clients will see errors returned until the flush is complete.
EXEC azure.storage_cache.caches.flush
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;
Tells a Stopped state cache to transition to Active state.
EXEC azure.storage_cache.caches.start
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;
Tells an Active cache to transition to Stopped state.
EXEC azure.storage_cache.caches.stop
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;
Create a priming job. This operation is only allowed when the cache is healthy.
EXEC azure.storage_cache.caches.start_priming_job
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
@@json=
'{
"primingJobName": "{{ primingJobName }}",
"primingManifestUrl": "{{ primingManifestUrl }}"
}'
;
Schedule a priming job for deletion.
EXEC azure.storage_cache.caches.stop_priming_job
@resourceGroupName='{{ resourceGroupName }}' --required,
@cacheName='{{ cacheName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"primingJobId": "{{ primingJobId }}"
}'
;
Schedule a priming job to be paused.
EXEC azure.storage_cache.caches.pause_priming_job
@resourceGroupName='{{ resourceGroupName }}' --required,
@cacheName='{{ cacheName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"primingJobId": "{{ primingJobId }}"
}'
;
Resumes a paused priming job.
EXEC azure.storage_cache.caches.resume_priming_job
@resourceGroupName='{{ resourceGroupName }}' --required,
@cacheName='{{ cacheName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"primingJobId": "{{ primingJobId }}"
}'
;
Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect.
EXEC azure.storage_cache.caches.upgrade_firmware
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;
Update cache space allocation.
EXEC azure.storage_cache.caches.space_allocation
@resourceGroupName='{{ resourceGroupName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@cacheName='{{ cacheName }}' --required
;