Operations on the FileShare resource

The FileShare resource provides a management interface for the Azure file share, which lets you control the file share name, enabled protocol, allocated size ("quota"), and so on. The FileShare resource is a child of the FileService resource, and a storage account can contain an infinite number of file shares, subject to the resource limits of the storage account.

You can interact with FileShare resources in two ways:

  • (Recommended) The storage resource provider (Microsoft.Storage), which provides a control plane API to manage through Azure Resource Manager.
  • (Legacy) The FileREST API, which provides additional HTTPS endpoints to manage FileShares.

Unless you have a specific reason, you should use the control plane API (the storage resource provider) for all management activities. APIs to manage FileShares are exposed through the data plane for legacy reasons. Data plane APIs that perform management actions are fully supported and acceptable for use in the following circumstances:

  • You have a legacy application or service that's already using these APIs.
  • You have very high scale requirements. The control API that's provided by the storage resource provider has much lower scale guarantees than the FileREST API.

New parameters and actions on the FileService may not be added to the data plane REST SDKs, even if they're exposed in FileREST. Use the control plane SDKs to access parameters and actions.

To learn more about the Azure Files API surface area, see Azure Files REST API.

Management APIs

Action Control plane API (Microsoft.Storage) Data plane API (FileREST) Available on SMB file shares Available on NFS file shares
Create FileShare File Shares - Create Create Share Yes Yes
Delete FileShare File Shares - Delete Delete Share Yes Yes
Get FileShare File Shares - Get Yes Yes
Lease FileShare File Shares - Lease Lease Share Yes Yes
List FileShares File Shares - List List Shares Yes Yes
Restore FileShare File Shares - Restore Restore Share Yes No
Update FileShare File Shares - Update - Set Share Properties
- Set Share Metadata
Yes Yes
Snapshot FileShare -- Snapshot Share Yes No
Get FileShare stored access policies -- Get Share ACL Yes No
Set FileShare stored access policies -- Set Share ACL Yes No

Data APIs

Action API Available on SMB file shares Available on NFS file shares
Create access control list permission Create Permission Yes No
Get access control list permission Get Permission Yes No

See also