Skip to main content

caches

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

Overview

Namecaches
TypeResource
Idazure.storage_cache.caches

Fields

The following fields are returned by SELECT queries:

Returns the cache object corresponding to cache name.

NameDatatypeDescription
idstringResource ID of the cache.
namestringName of cache. (pattern: ^[-0-9a-zA-Z_]{1,80}$)
identityobjectThe identity of the cache, if configured.
locationstringRegion name string.
propertiesobjectProperties of the cache.
skuobjectSKU for the cache.
systemDataobjectThe system meta data relating to this resource.
tagsobjectResource tags.
typestringType of the cache; Microsoft.StorageCache/Cache

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, cacheName, subscriptionIdReturns a cache.
list_by_resource_groupselectresourceGroupName, subscriptionIdReturns all caches the user has access to under a resource group.
listselectsubscriptionIdReturns all caches the user has access to under a subscription.
create_or_updateinsertresourceGroupName, subscriptionId, cacheNameCreate or update a cache.
updateupdateresourceGroupName, subscriptionId, cacheNameUpdate a cache instance.
deletedeleteresourceGroupName, cacheName, subscriptionIdSchedules a cache for deletion.
debug_infoexecresourceGroupName, subscriptionId, cacheNameTells a cache to write generate debug info for support to process.
flushexecresourceGroupName, subscriptionId, cacheNameTells 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.
startexecresourceGroupName, subscriptionId, cacheNameTells a Stopped state cache to transition to Active state.
stopexecresourceGroupName, subscriptionId, cacheNameTells an Active cache to transition to Stopped state.
start_priming_jobexecresourceGroupName, subscriptionId, cacheName, primingJobName, primingManifestUrlCreate a priming job. This operation is only allowed when the cache is healthy.
stop_priming_jobexecresourceGroupName, cacheName, subscriptionId, primingJobIdSchedule a priming job for deletion.
pause_priming_jobexecresourceGroupName, cacheName, subscriptionId, primingJobIdSchedule a priming job to be paused.
resume_priming_jobexecresourceGroupName, cacheName, subscriptionId, primingJobIdResumes a paused priming job.
upgrade_firmwareexecresourceGroupName, subscriptionId, cacheNameUpgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect.
space_allocationexecresourceGroupName, subscriptionId, cacheNameUpdate 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.

NameDatatypeDescription
cacheNamestringName of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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
;