Skip to main content

file_shares

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

Overview

Namefile_shares
TypeResource
Idazure.storage.file_shares

Fields

NameDatatypeDescription
access_tiertextfield from the properties object
access_tier_change_timetextfield from the properties object
access_tier_statustextfield from the properties object
accountNametextfield from the properties object
deletedtextfield from the properties object
deleted_timetextfield from the properties object
enabled_protocolstextfield from the properties object
etagtextResource Etag.
last_modified_timetextfield from the properties object
lease_durationtextfield from the properties object
lease_statetextfield from the properties object
lease_statustextfield from the properties object
metadatatextfield from the properties object
remaining_retention_daystextfield from the properties object
resourceGroupNametextfield from the properties object
root_squashtextfield from the properties object
shareNametextfield from the properties object
share_quotatextfield from the properties object
share_usage_bytestextfield from the properties object
signed_identifierstextfield from the properties object
snapshot_timetextfield from the properties object
subscriptionIdtextfield from the properties object
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, shareName, subscriptionIdGets properties of a specified share.
listSELECTaccountName, resourceGroupName, subscriptionIdLists all shares.
createINSERTaccountName, resourceGroupName, shareName, subscriptionIdCreates 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.
deleteDELETEaccountName, resourceGroupName, shareName, subscriptionIdDeletes specified share under its account.
updateUPDATEaccountName, resourceGroupName, shareName, subscriptionIdUpdates 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.
leaseEXECaccountName, resourceGroupName, shareName, subscriptionId, data__actionThe 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.
restoreEXECaccountName, resourceGroupName, shareName, subscriptionId, data__deletedShareName, data__deletedShareVersionRestore a file share within a valid retention days if share soft delete is enabled

SELECT examples

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

INSERT example

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

/*+ create */
INSERT INTO azure.storage.file_shares (
accountName,
resourceGroupName,
shareName,
subscriptionId,
properties
)
SELECT
'{{ accountName }}',
'{{ resourceGroupName }}',
'{{ shareName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

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