Set Share Properties
Set Share Properties operation sets properties for the specified Azure file share. Although this operation is fully supported, it's a legacy management operation. We recommend that you use the File Shares - Update operation provided by the storage resource provider (Microsoft.Storage) instead. To learn more about programmatically interacting with
FileShare resources by using the storage resource provider, see Operations on FileShare resources.
|Enabled file share protocol||Available|
You can construct the
Set Share Properties request as follows. We recommend HTTPS. Replace myaccount with the name of your storage account.
|Method||Request URI||HTTP version|
Replace the path components shown in the request URI with your own, as follows:
||The name of your storage account.|
||The name of your file share.|
For details on path naming restrictions, see Naming and referencing shares, directories, files, and metadata.
You can specify the following additional parameters in the request URI:
||Optional. Expressed in seconds. For more information, see Set timeouts for Azure Files operations.|
The following table describes required and optional request headers:
||Required. Specifies the authorization scheme, account name, and signature. For more information, see Authorize requests to Azure Storage.|
||Required. Specifies the Coordinated Universal Time (UTC) for the request. For more information, see Authorize requests to Azure Storage.|
||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.|
||Optional. Supported in version 2015-02-21 and later. Specifies the maximum size of the share, in gibibytes (GiB).|
||Optional. Supported in version 2019-12-12 and later. Specifies the access tier of the share. Valid values are
||Optional. Supported in version 2020-02-10 and later. Specifies the root squashing behavior on the share when NFS is enabled. If it's not specified, the default is
||Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the Storage Analytics 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 Blob Storage.|
||Required if the destination file share has an active lease. Available for version 2020-02-10 and later. If the request doesn't include the lease ID or it isn't valid, the operation fails with status code 412 (Precondition Failed).
If this header is specified and the destination file share doesn't currently have an active lease, the operation fails with status code 412 (Precondition Failed).
PUT https://myaccount.file.core.windows.net/myshare?restype=share&comp=properties Request Headers: x-ms-version: 2020-02-10 x-ms-date: <date> Authorization: SharedKey myaccount: Z5043vY9MesKNh0PNtksNc9nbXSSqGHueE00Jdjid0Q= x-ms-share-quota: 55 x-ms-root-squash: RootSquash
The response includes an HTTP status code and a set of response headers.
A successful operation returns status code 200 (OK).
For information about status codes, see Status and error codes.
The response for this operation includes the following headers. The response might also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
||Returns the date and time that 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.|
||Contains a value that represents the version of the share, as a quoted string.|
||Uniquely identifies the request that was made. You can also use it to troubleshoot the request. For more information, see Troubleshoot API operations.|
||Indicates the version of Azure Files that's used to execute the request.|
||A UTC date/time value that indicates the time at which the service sent the response.|
||Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the
Only the account owner can call this operation.
For more information on setting the share quota, see Create Share.
If you set share quota to be smaller than the size of the data on the share, the operation will succeed. However, you won't be able to add more data to the share until the amount of the data on the share is reduced below the quota. You can reduce the amount of data by either deleting or compressing files.
Set Share Properties is not supported for a share snapshot. An attempt to perform this operation on a share snapshot will fail with status code 400 (InvalidQueryParameterValue).