storage_targets
Creates, updates, deletes, gets or lists a storage_targets
resource.
Overview
Name | storage_targets |
Type | Resource |
Id | azure.storage_cache.storage_targets |
Fields
- vw_storage_targets
- storage_targets
Name | Datatype | Description |
---|---|---|
id | text | Resource ID of the Storage Target. |
name | text | Schema for the name of resources served by this provider. Note that objects will contain an odata @id annotation as appropriate. This will contain the complete resource id of the object. These names are case-preserving, but not case sensitive. |
allocation_percentage | text | field from the properties object |
blob_nfs | text | field from the properties object |
cacheName | text | field from the properties object |
clfs | text | field from the properties object |
junctions | text | field from the properties object |
location | text | Region name string. |
nfs3 | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
state | text | field from the properties object |
storageTargetName | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
target_type | text | field from the properties object |
type | text | Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget |
unknown | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Resource ID of the Storage Target. |
name | string | Schema for the name of resources served by this provider. Note that objects will contain an odata @id annotation as appropriate. This will contain the complete resource id of the object. These names are case-preserving, but not case sensitive. |
location | string | Region name string. |
properties | object | Properties of the Storage Target. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | Type of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | cacheName, resourceGroupName, storageTargetName, subscriptionId | Returns a Storage Target from a cache. |
list_by_cache | SELECT | cacheName, resourceGroupName, subscriptionId | Returns a list of Storage Targets for the specified cache. |
create_or_update | INSERT | cacheName, resourceGroupName, storageTargetName, subscriptionId | Create or update a Storage Target. This operation is allowed at any time, but if the cache is down or unhealthy, the actual creation/modification of the Storage Target may be delayed until the cache is healthy again. |
delete | DELETE | cacheName, resourceGroupName, storageTargetName, subscriptionId | Removes a Storage Target from a cache. This operation is allowed at any time, but if the cache is down or unhealthy, the actual removal of the Storage Target may be delayed until the cache is healthy again. Note that if the cache has data to flush to the Storage Target, the data will be flushed before the Storage Target will be deleted. |
dns_refresh | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Tells a storage target to refresh its DNS information. |
flush | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Tells the cache to write all dirty data to the Storage Target's backend storage. Client requests to this storage target's namespace will return errors until the flush operation completes. |
invalidate | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Invalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the next request. |
restore_defaults | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Tells a storage target to restore its settings to their default values. |
resume | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Resumes client access to a previously suspended storage target. |
suspend | EXEC | cacheName, resourceGroupName, storageTargetName, subscriptionId | Suspends client access to a storage target. |
SELECT
examples
Returns a list of Storage Targets for the specified cache.
- vw_storage_targets
- storage_targets
SELECT
id,
name,
allocation_percentage,
blob_nfs,
cacheName,
clfs,
junctions,
location,
nfs3,
provisioning_state,
resourceGroupName,
state,
storageTargetName,
subscriptionId,
system_data,
target_type,
type,
unknown
FROM azure.storage_cache.vw_storage_targets
WHERE cacheName = '{{ cacheName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.storage_cache.storage_targets
WHERE cacheName = '{{ cacheName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new storage_targets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage_cache.storage_targets (
cacheName,
resourceGroupName,
storageTargetName,
subscriptionId,
properties
)
SELECT
'{{ cacheName }}',
'{{ resourceGroupName }}',
'{{ storageTargetName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: name
value: []
- name: id
value: string
- name: type
value: string
- name: location
value: string
- name: systemData
value:
- name: createdBy
value: string
- name: createdByType
value: string
- name: createdAt
value: string
- name: lastModifiedBy
value: string
- name: lastModifiedByType
value: string
- name: lastModifiedAt
value: string
- name: properties
value:
- name: junctions
value:
- - name: namespacePath
value: string
- name: targetPath
value: string
- name: nfsExport
value: string
- name: nfsAccessPolicy
value: string
- name: targetType
value: string
- name: provisioningState
value: string
- name: state
value: string
- name: nfs3
value:
- name: target
value: string
- name: usageModel
value: string
- name: verificationTimer
value: integer
- name: writeBackTimer
value: integer
- name: clfs
value:
- name: target
value: []
- name: unknown
value:
- name: attributes
value: []
- name: blobNfs
value:
- name: usageModel
value: string
- name: verificationTimer
value: integer
- name: writeBackTimer
value: integer
- name: allocationPercentage
value: integer
DELETE
example
Deletes the specified storage_targets
resource.
/*+ delete */
DELETE FROM azure.storage_cache.storage_targets
WHERE cacheName = '{{ cacheName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND storageTargetName = '{{ storageTargetName }}'
AND subscriptionId = '{{ subscriptionId }}';