file_shares
Creates, updates, deletes, gets or lists a file_shares
resource.
Overview
Name | file_shares |
Type | Resource |
Id | azure.storage.file_shares |
Fields
- vw_file_shares
- file_shares
Name | Datatype | Description |
---|---|---|
access_tier | text | field from the properties object |
access_tier_change_time | text | field from the properties object |
access_tier_status | text | field from the properties object |
accountName | text | field from the properties object |
deleted | text | field from the properties object |
deleted_time | text | field from the properties object |
enabled_protocols | text | field from the properties object |
etag | text | Resource Etag. |
last_modified_time | text | field from the properties object |
lease_duration | text | field from the properties object |
lease_state | text | field from the properties object |
lease_status | text | field from the properties object |
metadata | text | field from the properties object |
remaining_retention_days | text | field from the properties object |
resourceGroupName | text | field from the properties object |
root_squash | text | field from the properties object |
shareName | text | field from the properties object |
share_quota | text | field from the properties object |
share_usage_bytes | text | field from the properties object |
signed_identifiers | text | field from the properties object |
snapshot_time | text | field from the properties object |
subscriptionId | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
etag | string | Resource Etag. |
properties | object | The properties of the file share. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | accountName, resourceGroupName, shareName, subscriptionId | Gets properties of a specified share. |
list | SELECT | accountName, resourceGroupName, subscriptionId | Lists all shares. |
create | INSERT | accountName, resourceGroupName, shareName, subscriptionId | Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. |
delete | DELETE | accountName, resourceGroupName, shareName, subscriptionId | Deletes specified share under its account. |
update | UPDATE | accountName, resourceGroupName, shareName, subscriptionId | Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. |
lease | EXEC | accountName, resourceGroupName, shareName, subscriptionId, data__action | The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. |
restore | EXEC | accountName, resourceGroupName, shareName, subscriptionId, data__deletedShareName, data__deletedShareVersion | Restore a file share within a valid retention days if share soft delete is enabled |
SELECT
examples
Lists all shares.
- vw_file_shares
- file_shares
SELECT
access_tier,
access_tier_change_time,
access_tier_status,
accountName,
deleted,
deleted_time,
enabled_protocols,
etag,
last_modified_time,
lease_duration,
lease_state,
lease_status,
metadata,
remaining_retention_days,
resourceGroupName,
root_squash,
shareName,
share_quota,
share_usage_bytes,
signed_identifiers,
snapshot_time,
subscriptionId,
version
FROM azure.storage.vw_file_shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
etag,
properties
FROM azure.storage.file_shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new file_shares
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.storage.file_shares (
accountName,
resourceGroupName,
shareName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ shareName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: lastModifiedTime
value: string
- name: metadata
value: object
- name: shareQuota
value: integer
- name: enabledProtocols
value: string
- name: rootSquash
value: string
- name: version
value: string
- name: deleted
value: boolean
- name: deletedTime
value: string
- name: remainingRetentionDays
value: integer
- name: accessTier
value: string
- name: accessTierChangeTime
value: string
- name: accessTierStatus
value: string
- name: shareUsageBytes
value: integer
- name: leaseStatus
value: string
- name: leaseState
value: string
- name: leaseDuration
value: string
- name: signedIdentifiers
value:
- - name: id
value: string
- name: accessPolicy
value:
- name: startTime
value: string
- name: expiryTime
value: string
- name: permission
value: string
- name: snapshotTime
value: string
- name: etag
value: string
UPDATE
example
Updates a file_shares
resource.
/*+ update */
UPDATE azure.storage.file_shares
SET
properties = '{{ properties }}'
WHERE
accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND shareName = '{{ shareName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified file_shares
resource.
/*+ delete */
DELETE FROM azure.storage.file_shares
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND shareName = '{{ shareName }}'
AND subscriptionId = '{{ subscriptionId }}';