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:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
cacheSizeGBintegerThe size of this Cache, in GB.
directoryServicesSettingsobjectSpecifies Directory Services settings of the cache.
encryptionSettingsobjectSpecifies encryption settings of the cache.
healthobjectHealth of the cache.
identityobjectThe identity of the cache, if configured.
locationstringRegion name string.
mountAddressesarrayArray of IPv4 addresses that can be used by clients mounting this cache.
networkSettingsobjectSpecifies network settings of the cache.
primingJobsarraySpecifies the priming jobs defined in the cache.
provisioningStatestringARM provisioning state, see https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property _. Known values are: "Succeeded", "Failed", "Canceled", "Creating", "Deleting", and "Updating". (Succeeded, Failed, Canceled, Creating, Deleting, Updating)
securitySettingsobjectSpecifies security settings of the cache.
skuobjectSKU for the cache.
spaceAllocationarraySpecifies the space allocation percentage for each storage target in the cache.
subnetstringSubnet used for the cache.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
upgradeSettingsobjectUpgrade settings of the cache.
upgradeStatusobjectUpgrade status of the cache.
zonesarrayAvailability zones for resources. This field should only contain a single element in the array.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, cache_name, subscription_idReturns a cache.
list_by_resource_groupselectresource_group_name, subscription_idReturns all caches the user has access to under a resource group.
listselectsubscription_idReturns all caches the user has access to under a subscription.
create_or_updateinsertresource_group_name, cache_name, subscription_idCreate or update a cache.
updateupdateresource_group_name, cache_name, subscription_idUpdate a cache instance.
create_or_updatereplaceresource_group_name, cache_name, subscription_idCreate or update a cache.
deletedeleteresource_group_name, cache_name, subscription_idSchedules a cache for deletion.
debug_infoexecresource_group_name, cache_name, subscription_idTells a cache to write generate debug info for support to process.
flushexecresource_group_name, cache_name, subscription_idTells 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.
startexecresource_group_name, cache_name, subscription_idTells a Stopped state cache to transition to Active state.
stopexecresource_group_name, cache_name, subscription_idTells an Active cache to transition to Stopped state.
start_priming_jobexecresource_group_name, cache_name, subscription_id, primingJobName, primingManifestUrlCreate a priming job. This operation is only allowed when the cache is healthy.
stop_priming_jobexecresource_group_name, cache_name, subscription_id, primingJobIdSchedule a priming job for deletion.
pause_priming_jobexecresource_group_name, cache_name, subscription_id, primingJobIdSchedule a priming job to be paused.
resume_priming_jobexecresource_group_name, cache_name, subscription_id, primingJobIdResumes a paused priming job.
upgrade_firmwareexecresource_group_name, cache_name, subscription_idUpgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect.
space_allocationexecresource_group_name, cache_name, subscription_idUpdate 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
cache_namestringName of cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Returns a cache.

SELECT
id,
name,
cacheSizeGB,
directoryServicesSettings,
encryptionSettings,
health,
identity,
location,
mountAddresses,
networkSettings,
primingJobs,
provisioningState,
securitySettings,
sku,
spaceAllocation,
subnet,
systemData,
tags,
type,
upgradeSettings,
upgradeStatus,
zones
FROM azure.storage_cache.caches
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cache_name = '{{ cache_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or update a cache.

INSERT INTO azure.storage_cache.caches (
properties,
tags,
location,
identity,
sku,
resource_group_name,
cache_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ identity }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ cache_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Update a cache instance.

UPDATE azure.storage_cache.caches
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
identity = '{{ identity }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

REPLACE examples

Create or update a cache.

REPLACE azure.storage_cache.caches
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
identity = '{{ identity }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND subscription_id = '{{ subscription_id }}' --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 resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Tells a cache to write generate debug info for support to process.

EXEC azure.storage_cache.caches.debug_info 
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;