File Shares - Update
Updates 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.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2024-01-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 24 pattern: ^[a-z0-9]+$ |
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. |
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
The name of the resource group within the user's subscription. The name is case insensitive. |
share
|
path | True |
string minLength: 3maxLength: 63 |
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number. |
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Type | Description |
---|---|---|
properties.accessTier |
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. |
|
properties.enabledProtocols |
The authentication protocol that is used for the file share. Can only be specified when creating a share. |
|
properties.fileSharePaidBursting |
File Share Paid Bursting properties. |
|
properties.metadata |
object |
A name-value pair to associate with the share as metadata. |
properties.provisionedBandwidthMibps |
integer (int32) |
The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. |
properties.provisionedIops |
integer (int32) |
The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. |
properties.rootSquash |
The property is for NFS share only. The default is NoRootSquash. |
|
properties.shareQuota |
integer (int32) |
The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. |
properties.signedIdentifiers |
List of stored access policies specified on the share. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK -- Update Share operation completed successfully. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Update |
Update |
Update |
Update |
UpdateShareAcls
Sample request
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2024-01-01
{
"properties": {
"signedIdentifiers": [
{
"id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
"accessPolicy": {
"startTime": "2021-04-01T08:49:37.0000000Z",
"expiryTime": "2021-05-01T08:49:37.0000000Z",
"permission": "rwd"
}
}
]
}
}
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"signedIdentifiers": [
{
"id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
"accessPolicy": {
"startTime": "2021-04-01T08:49:37.0000000Z",
"expiryTime": "2021-05-01T08:49:37.0000000Z",
"permission": "rwd"
}
}
]
}
}
UpdateSharePaidBursting
Sample request
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2024-01-01
{
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxIops": 102400,
"paidBurstingMaxBandwidthMibps": 10340
}
}
}
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxIops": 102400,
"paidBurstingMaxBandwidthMibps": 10340
}
}
}
UpdateShareProvisionedV2
Sample request
PATCH https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2024-01-01
{
"properties": {
"shareQuota": 100,
"provisionedIops": 5000,
"provisionedBandwidthMibps": 200
}
}
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"shareQuota": 100,
"provisionedIops": 5000,
"provisionedBandwidthMibps": 200,
"includedBurstIops": 15000,
"maxBurstCreditsForIops": 36000000,
"nextAllowedQuotaDowngradeTime": "Sat, 26 Oct 2024 01:50:50 GMT",
"nextAllowedProvisionedIopsDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT",
"nextAllowedProvisionedBandwidthDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT"
}
}
UpdateShares
Sample request
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"metadata": {
"type": "image"
}
}
}
Definitions
Name | Description |
---|---|
Access |
|
Cloud |
An error response from the Storage service. |
Cloud |
An error response from the Storage service. |
Enabled |
The authentication protocol that is used for the file share. Can only be specified when creating a share. |
File |
Properties of the file share, including Id, resource name, resource type, Etag. |
File |
File Share Paid Bursting properties. |
Lease |
Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. |
Lease |
Lease state of the share. |
Lease |
The lease status of the share. |
Root |
The property is for NFS share only. The default is NoRootSquash. |
Share |
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. |
Signed |
AccessPolicy
Name | Type | Description |
---|---|---|
expiryTime |
string (date-time) |
Expiry time of the access policy |
permission |
string |
List of abbreviated permissions. |
startTime |
string (date-time) |
Start time of the access policy |
CloudError
An error response from the Storage service.
Name | Type | Description |
---|---|---|
error |
An error response from the Storage service. |
CloudErrorBody
An error response from the Storage service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
details |
A list of additional details about the error. |
|
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
target |
string |
The target of the particular error. For example, the name of the property in error. |
EnabledProtocols
The authentication protocol that is used for the file share. Can only be specified when creating a share.
Value | Description |
---|---|
NFS | |
SMB |
FileShare
Properties of the file share, including Id, resource name, resource type, Etag.
Name | Type | Description |
---|---|---|
etag |
string |
Resource Etag. |
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties.accessTier |
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium. |
|
properties.accessTierChangeTime |
string (date-time) |
Indicates the last modification time for share access tier. |
properties.accessTierStatus |
string |
Indicates if there is a pending transition for access tier. |
properties.deleted |
boolean |
Indicates whether the share was deleted. |
properties.deletedTime |
string (date-time) |
The deleted time if the share was deleted. |
properties.enabledProtocols |
The authentication protocol that is used for the file share. Can only be specified when creating a share. |
|
properties.fileSharePaidBursting |
File Share Paid Bursting properties. |
|
properties.includedBurstIops |
integer (int32) |
The calculated burst IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. |
properties.lastModifiedTime |
string (date-time) |
Returns the date and time the share was last modified. |
properties.leaseDuration |
Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased. |
|
properties.leaseState |
Lease state of the share. |
|
properties.leaseStatus |
The lease status of the share. |
|
properties.maxBurstCreditsForIops |
integer (int64) |
The calculated maximum burst credits for the share. This property is only for file shares created under Files Provisioned v2 account type. |
properties.metadata |
object |
A name-value pair to associate with the share as metadata. |
properties.nextAllowedProvisionedBandwidthDowngradeTime |
string (date-time-rfc1123) |
Returns the next allowed provisioned bandwidth downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. |
properties.nextAllowedProvisionedIopsDowngradeTime |
string (date-time-rfc1123) |
Returns the next allowed provisioned IOPS downgrade time for the share. This property is only for file shares created under Files Provisioned v2 account type. |
properties.nextAllowedQuotaDowngradeTime |
string (date-time-rfc1123) |
Returns the next allowed provisioned storage size downgrade time for the share. This property is only for file shares created under Files Provisioned v1 SSD and Files Provisioned v2 account type |
properties.provisionedBandwidthMibps |
integer (int32) |
The provisioned bandwidth of the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned bandwidth. |
properties.provisionedIops |
integer (int32) |
The provisioned IOPS of the share. This property is only for file shares created under Files Provisioned v2 account type. Please refer to the GetFileServiceUsage API response for the minimum and maximum allowed value for provisioned IOPS. |
properties.remainingRetentionDays |
integer |
Remaining retention days for share that was soft deleted. |
properties.rootSquash |
The property is for NFS share only. The default is NoRootSquash. |
|
properties.shareQuota |
integer (int32) |
The provisioned size of the share, in gibibytes. Must be greater than 0, and less than or equal to 5TB (5120). For Large File Shares, the maximum size is 102400. For file shares created under Files Provisioned v2 account type, please refer to the GetFileServiceUsage API response for the minimum and maximum allowed provisioned storage size. |
properties.shareUsageBytes |
integer (int64) |
The approximate size of the data stored on the share. Note that this value may not include all recently created or recently resized files. |
properties.signedIdentifiers |
List of stored access policies specified on the share. |
|
properties.snapshotTime |
string (date-time) |
Creation time of share snapshot returned in the response of list shares with expand param "snapshots". |
properties.version |
string |
The version of the share. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
FileSharePaidBursting
File Share Paid Bursting properties.
Name | Type | Description |
---|---|---|
paidBurstingEnabled |
boolean |
Indicates whether paid bursting is enabled for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. |
paidBurstingMaxBandwidthMibps |
integer (int32) |
The maximum paid bursting bandwidth for the share, in mebibytes per second. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 10340 which is the maximum allowed bandwidth for a share. |
paidBurstingMaxIops |
integer (int32) |
The maximum paid bursting IOPS for the share. This property is only for file shares created under Files Provisioned v1 SSD account type. The maximum allowed value is 102400 which is the maximum allowed IOPS for a share. |
LeaseDuration
Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.
Value | Description |
---|---|
Fixed | |
Infinite |
LeaseState
Lease state of the share.
Value | Description |
---|---|
Available | |
Breaking | |
Broken | |
Expired | |
Leased |
LeaseStatus
The lease status of the share.
Value | Description |
---|---|
Locked | |
Unlocked |
RootSquashType
The property is for NFS share only. The default is NoRootSquash.
Value | Description |
---|---|
AllSquash | |
NoRootSquash | |
RootSquash |
ShareAccessTier
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
Value | Description |
---|---|
Cool | |
Hot | |
Premium | |
TransactionOptimized |
SignedIdentifier
Name | Type | Description |
---|---|---|
accessPolicy |
Access policy |
|
id |
string |
An unique identifier of the stored access policy. |