Skip to main content

storage_targets

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

Overview

Namestorage_targets
TypeResource
Idazure.storage_cache.storage_targets

Fields

NameDatatypeDescription
idtextResource ID of the Storage Target.
nametextSchema 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_percentagetextfield from the properties object
blob_nfstextfield from the properties object
cacheNametextfield from the properties object
clfstextfield from the properties object
junctionstextfield from the properties object
locationtextRegion name string.
nfs3textfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
statetextfield from the properties object
storageTargetNametextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
target_typetextfield from the properties object
typetextType of the Storage Target; Microsoft.StorageCache/Cache/StorageTarget
unknowntextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTcacheName, resourceGroupName, storageTargetName, subscriptionIdReturns a Storage Target from a cache.
list_by_cacheSELECTcacheName, resourceGroupName, subscriptionIdReturns a list of Storage Targets for the specified cache.
create_or_updateINSERTcacheName, resourceGroupName, storageTargetName, subscriptionIdCreate 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.
deleteDELETEcacheName, resourceGroupName, storageTargetName, subscriptionIdRemoves 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_refreshEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdTells a storage target to refresh its DNS information.
flushEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdTells 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.
invalidateEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdInvalidate all cached data for a storage target. Cached files are discarded and fetched from the back end on the next request.
restore_defaultsEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdTells a storage target to restore its settings to their default values.
resumeEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdResumes client access to a previously suspended storage target.
suspendEXECcacheName, resourceGroupName, storageTargetName, subscriptionIdSuspends client access to a storage target.

SELECT examples

Returns a list of Storage Targets for the specified cache.

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new storage_targets resource.

/*+ create */
INSERT INTO azure.storage_cache.storage_targets (
cacheName,
resourceGroupName,
storageTargetName,
subscriptionId,
properties
)
SELECT
'{{ cacheName }}',
'{{ resourceGroupName }}',
'{{ storageTargetName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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 }}';