Get Share Properties

The Get Share Properties request returns properties for the specified share or share snapshot.

Although this API is fully supported, it's a legacy management API. For this reason, we recommend that you use File Shares - Get, which is provided by the storage resource provider (Microsoft.Storage), instead.

To learn more about programmatically interacting with FileShare resources using the storage resource provider, see Operations on FileShares.

Protocol availability

Enabled file share protocol Available
SMB Yes
NFS Yes

Request

The Get Share Properties request may be constructed as follows. We recommend that you use HTTPS.

Method Request URI HTTP version
GET/HEAD https://myaccount.file.core.windows.net/myshare?restype=share HTTP/1.1
GET/HEAD https://myaccount.file.core.windows.net/myshare?restype=share&sharesnapshot=<DateTime> HTTP/1.1

Replace the path components shown in the request URI with your own, as follows:

Path component Description
myaccount The name of your storage account.
myshare The name of your file share.

For information about path naming restrictions, see Name and reference shares, directories, files, and metadata.

URI parameters

The following additional parameters can be specified in the request URI:

Parameter Description
sharesnapshot Optional. Version 2017-04-17 and later. The sharesnapshot parameter is an opaque date/time value that, when present, specifies the share snapshot to query to retrieve the properties.
timeout Optional. The timeout parameter is expressed in seconds. For more information, see Set time-outs for Azure Files operations.

Request headers

The required and optional headers are described in the following table:

Request header Description
Authorization Required. Specifies the authorization scheme, account name, and signature. For more information, see Authorize requests to Azure Storage.
Date or x-ms-date Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authorize requests to Azure Storage.
x-ms-version Required for all authorized requests. Specifies the version of the operation to use for this request. For more information, see Versioning for the Azure Storage services.
x-ms-client-request-id Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the logs when logging is configured. We highly recommend that you use this header to correlate client-side activities with requests that the server receives. For more information, see Monitor Azure Files.
x-ms-lease-id:<ID> Optional. Version 2020-02-10 and later. If the header is specified, the operation is performed only if the file share's lease is currently active and the lease ID that's specified in the request matches the lease ID of the file share. If there's no match, the operation fails with status code 412 (Precondition Failed).

Request body

None.

Response

The response includes an HTTP status code and a set of response headers.

Status code

A successful operation returns status code 200 (OK).

For more information about status codes, see Status and error codes.

Response headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response header Description
Last-Modified Returns the date and time when the share was last modified. The date format follows RFC 1123. For more information, see Representation of Date-Time Values in Headers. Any operation that modifies the share or its properties updates the last modified time. Operations on files don't affect the last modified time of the share.
x-ms-meta-name:value A set of name-value pairs that contain the user-defined metadata of the share.
ETag Contains a value that you can use to perform operations conditionally. The value is enclosed in quotation marks.
x-ms-request-id Uniquely identifies the request that was made and can be used to troubleshoot the request. For more information, see Troubleshoot API operations.
x-ms-version The Azure Files version that was used to execute the request.
Date A UTC date/time value that's generated by the service, which indicates the time when the response was initiated.
x-ms-share-quota Version 2015-02-21 and later. Returns the current share quota in gibibytes (GiB).
x-ms-share-provisioned-iops Version 2019-07-07 and later. Returned only for premium file shares (file shares within the FileStorage storage account type). Returns the number of input/output operations per second (IOPS), as provisioned for the premium share.
x-ms-share-provisioned-ingress-mbps Version 2019-07-07 and later. Returned only for premium file shares (file shares within the FileStorage storage account type). Returns the ingress in mebibytes per second (MiB/s), as provisioned for the premium share.
x-ms-share-provisioned-egress-mbps Version 2019-07-07 and later. Returned only for premium file shares (file shares within the FileStorage storage account type). Returns the egress in MiB/s, as provisioned for the premium share.
x-ms-share-provisioned-bandwidth-mibps Version 2021-02-12 and later. Returned only for premium file shares (file shares within the FileStorage storage account type). Returns the combined (ingress + egress) bandwidth in MiB/s, as provisioned for the premium share.
x-ms-share-next-allowed-quota-downgrade-time Version 2019-07-07 and later. Returned only for premium file shares (file shares within the FileStorage storage account type). A date/time value that specifies when the quota for the premium file share is permitted to be reduced. The date format follows RFC 1123.
x-ms-access-tier Version 2019-12-12 and later. Returns the current access tier of the share. In general purpose version 2 (GPv2) storage accounts, TransationOptimized is the default tier of the share. In FileStorage storage account types, Premium is the default tier of the share.
x-ms-access-tier-change-time Version 2019-12-12 and later. Returns the date and time when the access tier on the share was last modified.
x-ms-access-tier-transition-state Version 2019-12-12 and later. If the share is undergoing tier transition, this header indicates the tier that it's transitioning from.
x-ms-lease-duration:<fixed,infinite> Version 2020-02-10 and later. Specifies whether the lease on a share is of infinite or fixed duration.
x-ms-lease-state: <available;leased;expired;breaking;broken> Version 2020-02-10 and later. When a share is leased, this header specifies the lease state of the share.
x-ms-lease-status: <locked;unlocked> Version 2020-02-10 and later. When a share is leased, this header specifies the lease status of the share.
x-ms-enabled-protocols: <SMB;NFS> Returns the current share-enabled protocols for version 2019-07-07 and later.

- SMB: The share can be accessed by SMBv3.0, SMBv2.1, and REST.
- NFS: The share can be accessed by NFSv4.1.
x-ms-root-squash: <NoRootSquash;RootSquash;AllSquash> Returns the current share root squashing behavior for version 2019-07-07 and later. NFS only.

- NoRootSquash: Root squashing is off.
- RootSquash: Requests from UID/GID 0 are mapped to the anonymous UID/GID.
- AllSquash: All UIDs and GIDs are mapped to the anonymous user.
x-ms-client-request-id Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the x-ms-client-request-id header if it's present in the request and the value contains no more than 1,024 visible ASCII characters. If the x-ms-client-request-id header isn't present in the request, it won't be present in the response.

Response body

None.

Sample response

Response Status:  
HTTP/1.1 200 OK  
  
Response Headers:  
Transfer-Encoding: chunked  
x-ms-meta-name: some_metadata  
Date: <date>  
ETag: "0x8CB171DBEAD6A6B"  
Last-Modified: <date>  
x-ms-share-quota: 1024
x-ms-access-tier: Premium
x-ms-version: 2020-02-10  
x-ms-enabled-protocols: NFS
x-ms-root-squash: RootSquash
Server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0  

Authorization

Only the account owner may call this operation.

Remarks

None.

See also

Operations on Azure file shares