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
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
cacheSizeGB | integer | The size of this Cache, in GB. |
directoryServicesSettings | object | Specifies Directory Services settings of the cache. |
encryptionSettings | object | Specifies encryption settings of the cache. |
health | object | Health of the cache. |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
mountAddresses | array | Array of IPv4 addresses that can be used by clients mounting this cache. |
networkSettings | object | Specifies network settings of the cache. |
primingJobs | array | Specifies the priming jobs defined in the cache. |
provisioningState | string | ARM 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) |
securitySettings | object | Specifies security settings of the cache. |
sku | object | SKU for the cache. |
spaceAllocation | array | Specifies the space allocation percentage for each storage target in the cache. |
subnet | string | Subnet used for the cache. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradeSettings | object | Upgrade settings of the cache. |
upgradeStatus | object | Upgrade status of the cache. |
zones | array | Availability zones for resources. This field should only contain a single element in the array. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
cacheSizeGB | integer | The size of this Cache, in GB. |
directoryServicesSettings | object | Specifies Directory Services settings of the cache. |
encryptionSettings | object | Specifies encryption settings of the cache. |
health | object | Health of the cache. |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
mountAddresses | array | Array of IPv4 addresses that can be used by clients mounting this cache. |
networkSettings | object | Specifies network settings of the cache. |
primingJobs | array | Specifies the priming jobs defined in the cache. |
provisioningState | string | ARM 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) |
securitySettings | object | Specifies security settings of the cache. |
sku | object | SKU for the cache. |
spaceAllocation | array | Specifies the space allocation percentage for each storage target in the cache. |
subnet | string | Subnet used for the cache. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradeSettings | object | Upgrade settings of the cache. |
upgradeStatus | object | Upgrade status of the cache. |
zones | array | Availability zones for resources. This field should only contain a single element in the array. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
cacheSizeGB | integer | The size of this Cache, in GB. |
directoryServicesSettings | object | Specifies Directory Services settings of the cache. |
encryptionSettings | object | Specifies encryption settings of the cache. |
health | object | Health of the cache. |
identity | object | The identity of the cache, if configured. |
location | string | Region name string. |
mountAddresses | array | Array of IPv4 addresses that can be used by clients mounting this cache. |
networkSettings | object | Specifies network settings of the cache. |
primingJobs | array | Specifies the priming jobs defined in the cache. |
provisioningState | string | ARM 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) |
securitySettings | object | Specifies security settings of the cache. |
sku | object | SKU for the cache. |
spaceAllocation | array | Specifies the space allocation percentage for each storage target in the cache. |
subnet | string | Subnet used for the cache. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
upgradeSettings | object | Upgrade settings of the cache. |
upgradeStatus | object | Upgrade status of the cache. |
zones | array | Availability zones for resources. This field should only contain a single element in the array. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, cache_name, subscription_id | Returns a cache. | |
list_by_resource_group | select | resource_group_name, subscription_id | Returns all caches the user has access to under a resource group. | |
list | select | subscription_id | Returns all caches the user has access to under a subscription. | |
create_or_update | insert | resource_group_name, cache_name, subscription_id | Create or update a cache. | |
update | update | resource_group_name, cache_name, subscription_id | Update a cache instance. | |
create_or_update | replace | resource_group_name, cache_name, subscription_id | Create or update a cache. | |
delete | delete | resource_group_name, cache_name, subscription_id | Schedules a cache for deletion. | |
debug_info | exec | resource_group_name, cache_name, subscription_id | Tells a cache to write generate debug info for support to process. | |
flush | exec | resource_group_name, cache_name, subscription_id | 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 | resource_group_name, cache_name, subscription_id | Tells a Stopped state cache to transition to Active state. | |
stop | exec | resource_group_name, cache_name, subscription_id | Tells an Active cache to transition to Stopped state. | |
start_priming_job | exec | resource_group_name, cache_name, subscription_id, primingJobName, primingManifestUrl | Create a priming job. This operation is only allowed when the cache is healthy. | |
stop_priming_job | exec | resource_group_name, cache_name, subscription_id, primingJobId | Schedule a priming job for deletion. | |
pause_priming_job | exec | resource_group_name, cache_name, subscription_id, primingJobId | Schedule a priming job to be paused. | |
resume_priming_job | exec | resource_group_name, cache_name, subscription_id, primingJobId | Resumes a paused priming job. | |
upgrade_firmware | exec | resource_group_name, cache_name, subscription_id | Upgrade a cache's firmware if a new version is available. Otherwise, this operation has no effect. | |
space_allocation | exec | resource_group_name, cache_name, subscription_id | 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 |
|---|---|---|
cache_name | 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. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_resource_group
- list
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
;
Returns all caches the user has access to under a resource group.
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 subscription_id = '{{ subscription_id }}' -- required
;
Returns all caches the user has access to under a subscription.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: caches
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the caches resource.
- name: cache_name
value: "{{ cache_name }}"
description: Required parameter for the caches resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the caches resource.
- name: properties
description: |
Properties of the cache.
value:
cacheSizeGB: {{ cacheSizeGB }}
health:
state: "{{ state }}"
statusDescription: "{{ statusDescription }}"
conditions:
- timestamp: "{{ timestamp }}"
message: "{{ message }}"
mountAddresses:
- "{{ mountAddresses }}"
provisioningState: "{{ provisioningState }}"
subnet: "{{ subnet }}"
upgradeStatus:
currentFirmwareVersion: "{{ currentFirmwareVersion }}"
firmwareUpdateStatus: "{{ firmwareUpdateStatus }}"
firmwareUpdateDeadline: "{{ firmwareUpdateDeadline }}"
lastFirmwareUpdate: "{{ lastFirmwareUpdate }}"
pendingFirmwareVersion: "{{ pendingFirmwareVersion }}"
upgradeSettings:
upgradeScheduleEnabled: {{ upgradeScheduleEnabled }}
scheduledTime: "{{ scheduledTime }}"
networkSettings:
mtu: {{ mtu }}
utilityAddresses:
- "{{ utilityAddresses }}"
dnsServers:
- "{{ dnsServers }}"
dnsSearchDomain: "{{ dnsSearchDomain }}"
ntpServer: "{{ ntpServer }}"
encryptionSettings:
keyEncryptionKey:
keyUrl: "{{ keyUrl }}"
sourceVault:
id: "{{ id }}"
rotationToLatestKeyVersionEnabled: {{ rotationToLatestKeyVersionEnabled }}
securitySettings:
accessPolicies:
- name: "{{ name }}"
accessRules: "{{ accessRules }}"
directoryServicesSettings:
activeDirectory:
primaryDnsIpAddress: "{{ primaryDnsIpAddress }}"
secondaryDnsIpAddress: "{{ secondaryDnsIpAddress }}"
domainName: "{{ domainName }}"
domainNetBiosName: "{{ domainNetBiosName }}"
cacheNetBiosName: "{{ cacheNetBiosName }}"
domainJoined: "{{ domainJoined }}"
credentials:
username: "{{ username }}"
password: "{{ password }}"
usernameDownload:
extendedGroups: {{ extendedGroups }}
usernameSource: "{{ usernameSource }}"
groupFileURI: "{{ groupFileURI }}"
userFileURI: "{{ userFileURI }}"
ldapServer: "{{ ldapServer }}"
ldapBaseDN: "{{ ldapBaseDN }}"
encryptLdapConnection: {{ encryptLdapConnection }}
requireValidCertificate: {{ requireValidCertificate }}
autoDownloadCertificate: {{ autoDownloadCertificate }}
caCertificateURI: "{{ caCertificateURI }}"
usernameDownloaded: "{{ usernameDownloaded }}"
credentials:
bindDn: "{{ bindDn }}"
bindPassword: "{{ bindPassword }}"
zones:
- "{{ zones }}"
primingJobs:
- primingJobName: "{{ primingJobName }}"
primingManifestUrl: "{{ primingManifestUrl }}"
primingJobId: "{{ primingJobId }}"
primingJobState: "{{ primingJobState }}"
primingJobStatus: "{{ primingJobStatus }}"
primingJobDetails: "{{ primingJobDetails }}"
primingJobPercentComplete: {{ primingJobPercentComplete }}
spaceAllocation:
- name: "{{ name }}"
allocationPercentage: {{ allocationPercentage }}
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
Region name string.
- name: identity
description: |
The identity of the cache, if configured.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: sku
description: |
SKU for the cache.
value:
name: "{{ name }}"
UPDATE examples
- update
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
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
- delete
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
- 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
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --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
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Tells a Stopped state cache to transition to Active state.
EXEC azure.storage_cache.caches.start
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Tells an Active cache to transition to Stopped state.
EXEC azure.storage_cache.caches.stop
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Create a priming job. This operation is only allowed when the cache is healthy.
EXEC azure.storage_cache.caches.start_priming_job
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"primingJobName": "{{ primingJobName }}",
"primingManifestUrl": "{{ primingManifestUrl }}"
}'
;
Schedule a priming job for deletion.
EXEC azure.storage_cache.caches.stop_priming_job
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"primingJobId": "{{ primingJobId }}"
}'
;
Schedule a priming job to be paused.
EXEC azure.storage_cache.caches.pause_priming_job
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"primingJobId": "{{ primingJobId }}"
}'
;
Resumes a paused priming job.
EXEC azure.storage_cache.caches.resume_priming_job
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --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
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Update cache space allocation.
EXEC azure.storage_cache.caches.space_allocation
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"name": "{{ name }}",
"allocationPercentage": {{ allocationPercentage }}
}'
;