Azure Files Reference

Azure Files provides fully managed cloud file shares that are accessible via the industry-standard Server Message Block (SMB) protocol and the Network File System (NFS) protocol. You can mount Azure file shares concurrently from all your cloud or on-premises deployments. Azure Files offers a scalable, secure, and reliable file storage solution for various applications and workloads.

Key Concepts

Common Scenarios

API Operations

File Share Operations

Create File Share

PUT //files/?restype=share

Creates a new file share in the specified storage account.

Parameters

NameTypeDescription
restypeStringRequired. Specifies that the operation is to create a file share. Value must be share.
compStringOptional. Specifies the component of the resource to operate on. Value must be metadata to update share metadata.

Success Response

CodeDescription
201 CreatedFile share created successfully.

Get File Share Properties

GET //files/?restype=share

Retrieves properties for the specified file share.

Parameters

NameTypeDescription
restypeStringRequired. Specifies that the operation is to get file share properties. Value must be share.
sharesnapshotStringOptional. Specifies a snapshot of the file share to get properties for.

Success Response

CodeDescription
200 OKFile share properties retrieved successfully.

Delete File Share

DELETE //files/?restype=share

Deletes the specified file share.

Parameters

NameTypeDescription
restypeStringRequired. Specifies that the operation is to delete a file share. Value must be share.
sharesnapshotStringOptional. Specifies a snapshot of the file share to delete.

Success Response

CodeDescription
202 AcceptedFile share deleted successfully.

File Operations

Create File

PUT //files///?comp=file

Creates a new file or replaces an existing file.

Parameters

NameTypeDescription
compStringRequired. Specifies the component of the resource to operate on. Value must be file.
content-lengthIntegerRequired. The size of the file in bytes.
The file content is provided in the request body.

Get File

GET //files///

Retrieves the properties and content of a file.

Success Response

CodeDescription
200 OKFile retrieved successfully. Content is in the response body.

Delete File

DELETE //files///

Deletes the specified file.

Parameters

NameTypeDescription
compStringOptional. Specifies the component of the resource to operate on. Value can be snapshot to delete a file snapshot.

Success Response

CodeDescription
200 OKFile deleted successfully.