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
The following fields are returned by SELECT queries:
- get
- list_by_cache
| 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. |
allocationPercentage | integer | The percentage of cache space allocated for this storage target. |
blobNfs | object | Properties when targetType is blobNfs. |
clfs | object | Properties when targetType is clfs. |
junctions | array | List of cache namespace junctions to target for namespace associations. |
location | string | Region name string. |
nfs3 | object | Properties when targetType is nfs3. |
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) |
state | string | Storage target operational state. Known values are: "Ready", "Busy", "Suspended", and "Flushing". (Ready, Busy, Suspended, Flushing) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetType | string | Type of the Storage Target. Required. Known values are: "nfs3", "clfs", "unknown", and "blobNfs". (nfs3, clfs, unknown, blobNfs) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
unknown | object | Properties when targetType is unknown. |
| 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. |
allocationPercentage | integer | The percentage of cache space allocated for this storage target. |
blobNfs | object | Properties when targetType is blobNfs. |
clfs | object | Properties when targetType is clfs. |
junctions | array | List of cache namespace junctions to target for namespace associations. |
location | string | Region name string. |
nfs3 | object | Properties when targetType is nfs3. |
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) |
state | string | Storage target operational state. Known values are: "Ready", "Busy", "Suspended", and "Flushing". (Ready, Busy, Suspended, Flushing) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetType | string | Type of the Storage Target. Required. Known values are: "nfs3", "clfs", "unknown", and "blobNfs". (nfs3, clfs, unknown, blobNfs) |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
unknown | object | Properties when targetType is unknown. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, cache_name, storage_target_name, subscription_id | Returns a Storage Target from a cache. | |
list_by_cache | select | resource_group_name, cache_name, subscription_id | Returns a list of Storage Targets for the specified cache. | |
create_or_update | insert | resource_group_name, cache_name, storage_target_name, subscription_id | 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. | |
create_or_update | replace | resource_group_name, cache_name, storage_target_name, subscription_id | 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 | resource_group_name, cache_name, storage_target_name, subscription_id | force | 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 | resource_group_name, cache_name, storage_target_name, subscription_id | Tells a storage target to refresh its DNS information. | |
restore_defaults | exec | resource_group_name, cache_name, storage_target_name, subscription_id | Tells a storage target to restore its settings to their default values. |
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. |
storage_target_name | string | Name of Storage Target. Required. |
subscription_id | string | |
force | string | Boolean value requesting the force delete operation for a storage target. Force delete discards unwritten-data in the cache instead of flushing it to back-end storage. Default value is None. |
SELECT examples
- get
- list_by_cache
Returns a Storage Target from a cache.
SELECT
id,
name,
allocationPercentage,
blobNfs,
clfs,
junctions,
location,
nfs3,
provisioningState,
state,
systemData,
targetType,
type,
unknown
FROM azure.storage_cache.storage_targets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cache_name = '{{ cache_name }}' -- required
AND storage_target_name = '{{ storage_target_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Returns a list of Storage Targets for the specified cache.
SELECT
id,
name,
allocationPercentage,
blobNfs,
clfs,
junctions,
location,
nfs3,
provisioningState,
state,
systemData,
targetType,
type,
unknown
FROM azure.storage_cache.storage_targets
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
- Manifest
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.
INSERT INTO azure.storage_cache.storage_targets (
properties,
resource_group_name,
cache_name,
storage_target_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cache_name }}',
'{{ storage_target_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: storage_targets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the storage_targets resource.
- name: cache_name
value: "{{ cache_name }}"
description: Required parameter for the storage_targets resource.
- name: storage_target_name
value: "{{ storage_target_name }}"
description: Required parameter for the storage_targets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the storage_targets resource.
- name: properties
description: |
StorageTarget properties.
value:
junctions:
- namespacePath: "{{ namespacePath }}"
targetPath: "{{ targetPath }}"
nfsExport: "{{ nfsExport }}"
nfsAccessPolicy: "{{ nfsAccessPolicy }}"
targetType: "{{ targetType }}"
provisioningState: "{{ provisioningState }}"
state: "{{ state }}"
nfs3:
target: "{{ target }}"
usageModel: "{{ usageModel }}"
verificationTimer: {{ verificationTimer }}
writeBackTimer: {{ writeBackTimer }}
clfs:
target: "{{ target }}"
unknown:
attributes: "{{ attributes }}"
blobNfs:
target: "{{ target }}"
usageModel: "{{ usageModel }}"
verificationTimer: {{ verificationTimer }}
writeBackTimer: {{ writeBackTimer }}
allocationPercentage: {{ allocationPercentage }}
REPLACE examples
- create_or_update
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.
REPLACE azure.storage_cache.storage_targets
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND storage_target_name = '{{ storage_target_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;
DELETE examples
- delete
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.
DELETE FROM azure.storage_cache.storage_targets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cache_name = '{{ cache_name }}' --required
AND storage_target_name = '{{ storage_target_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND force = '{{ force }}'
;
Lifecycle Methods
- dns_refresh
- restore_defaults
Tells a storage target to refresh its DNS information.
EXEC azure.storage_cache.storage_targets.dns_refresh
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@storage_target_name='{{ storage_target_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Tells a storage target to restore its settings to their default values.
EXEC azure.storage_cache.storage_targets.restore_defaults
@resource_group_name='{{ resource_group_name }}' --required,
@cache_name='{{ cache_name }}' --required,
@storage_target_name='{{ storage_target_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;