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=2026-04-01
URI Parameters
| Name |
In |
Required |
Type |
Description |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 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.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
The name of the resource group. The name is case insensitive.
|
|
shareName
|
path |
True
|
string
minLength: 3 maxLength: 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.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
The ID of the target subscription. The value must be an UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
The API version to use for this operation.
|
Request Body
| Name |
Type |
Description |
|
properties.accessTier
|
ShareAccessTier
|
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
|
|
properties.enabledProtocols
|
EnabledProtocols
|
The authentication protocol that is used for the file share. Can only be specified when creating a share.
|
|
properties.fileSharePaidBursting
|
FileSharePropertiesFileSharePaidBursting
|
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
|
RootSquashType
|
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
|
SignedIdentifier[]
|
List of stored access policies specified on the share.
|
Responses
| Name |
Type |
Description |
|
200 OK
|
FileShare
|
Azure operation completed successfully.
|
|
Other Status Codes
|
CloudError
|
An unexpected error response.
|
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
UpdateShareAcls
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2026-04-01
{
"properties": {
"signedIdentifiers": [
{
"accessPolicy": {
"expiryTime": "2021-05-01T08:49:37.0000000Z",
"permission": "rwd",
"startTime": "2021-04-01T08:49:37.0000000Z"
},
"id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
}
]
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import com.azure.resourcemanager.storage.models.AccessPolicy;
import com.azure.resourcemanager.storage.models.SignedIdentifier;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for FileShares Update.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/FileShareAclsPatch.json
*/
/**
* Sample code: UpdateShareAcls.
*
* @param manager Entry point to StorageManager.
*/
public static void updateShareAcls(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getFileShares().updateWithResponse("res3376", "sto328", "share6185",
new FileShareInner().withSignedIdentifiers(Arrays.asList(new SignedIdentifier()
.withId("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI")
.withAccessPolicy(new AccessPolicy().withStartTime(OffsetDateTime.parse("2021-04-01T08:49:37.0000000Z"))
.withExpiryTime(OffsetDateTime.parse("2021-05-01T08:49:37.0000000Z")).withPermission("rwd")))),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python file_share_acls_patch.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.file_shares.update(
resource_group_name="res3376",
account_name="sto328",
share_name="share6185",
file_share={
"properties": {
"signedIdentifiers": [
{
"accessPolicy": {
"expiryTime": "2021-05-01T08:49:37.0000000Z",
"permission": "rwd",
"startTime": "2021-04-01T08:49:37.0000000Z",
},
"id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
}
]
}
},
)
print(response)
# x-ms-original-file: 2026-04-01/FileShareAclsPatch.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-04-01/FileShareAclsPatch.json
func ExampleFileSharesClient_Update_updateShareAcls() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
SignedIdentifiers: []*armstorage.SignedIdentifier{
{
AccessPolicy: &armstorage.AccessPolicy{
ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t }()),
Permission: to.Ptr("rwd"),
StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t }()),
},
ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"),
},
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.FileSharesClientUpdateResponse{
// FileShare: armstorage.FileShare{
// Name: to.Ptr("share6185"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"),
// FileShareProperties: &armstorage.FileShareProperties{
// SignedIdentifiers: []*armstorage.SignedIdentifier{
// {
// AccessPolicy: &armstorage.AccessPolicy{
// ExpiryTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-05-01T08:49:37.0000000Z"); return t}()),
// Permission: to.Ptr("rwd"),
// StartTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2021-04-01T08:49:37.0000000Z"); return t}()),
// },
// ID: to.Ptr("MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"),
// },
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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.
*
* @summary 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.
* x-ms-original-file: 2026-04-01/FileShareAclsPatch.json
*/
async function updateShareAcls() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.update("res3376", "sto328", "share6185", {
signedIdentifiers: [
{
accessPolicy: {
expiryTime: new Date("2021-05-01T08:49:37.0000000Z"),
permission: "rwd",
startTime: new Date("2021-04-01T08:49:37.0000000Z"),
},
id: "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI",
},
],
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"properties": {
"signedIdentifiers": [
{
"accessPolicy": {
"expiryTime": "2021-05-01T08:49:37.0000000Z",
"permission": "rwd",
"startTime": "2021-04-01T08:49:37.0000000Z"
},
"id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
}
]
}
}
UpdateSharePaidBursting
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2026-04-01
{
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxBandwidthMibps": 10340,
"paidBurstingMaxIops": 102400
}
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import com.azure.resourcemanager.storage.models.FileSharePropertiesFileSharePaidBursting;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for FileShares Update.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/FileSharesPatch_PaidBursting.json
*/
/**
* Sample code: UpdateSharePaidBursting.
*
* @param manager Entry point to StorageManager.
*/
public static void updateSharePaidBursting(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getFileShares().updateWithResponse("res3376", "sto328", "share6185",
new FileShareInner()
.withFileSharePaidBursting(new FileSharePropertiesFileSharePaidBursting().withPaidBurstingEnabled(true)
.withPaidBurstingMaxIops(102400).withPaidBurstingMaxBandwidthMibps(10340)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python file_shares_patch_paid_bursting.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.file_shares.update(
resource_group_name="res3376",
account_name="sto328",
share_name="share6185",
file_share={
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": True,
"paidBurstingMaxBandwidthMibps": 10340,
"paidBurstingMaxIops": 102400,
}
}
},
)
print(response)
# x-ms-original-file: 2026-04-01/FileSharesPatch_PaidBursting.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-04-01/FileSharesPatch_PaidBursting.json
func ExampleFileSharesClient_Update_updateSharePaidBursting() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
FileSharePaidBursting: &armstorage.FileSharePropertiesFileSharePaidBursting{
PaidBurstingEnabled: to.Ptr(true),
PaidBurstingMaxBandwidthMibps: to.Ptr[int32](10340),
PaidBurstingMaxIops: to.Ptr[int32](102400),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.FileSharesClientUpdateResponse{
// FileShare: armstorage.FileShare{
// Name: to.Ptr("share6185"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"),
// FileShareProperties: &armstorage.FileShareProperties{
// FileSharePaidBursting: &armstorage.FileSharePropertiesFileSharePaidBursting{
// PaidBurstingEnabled: to.Ptr(true),
// PaidBurstingMaxBandwidthMibps: to.Ptr[int32](10340),
// PaidBurstingMaxIops: to.Ptr[int32](102400),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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.
*
* @summary 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.
* x-ms-original-file: 2026-04-01/FileSharesPatch_PaidBursting.json
*/
async function updateSharePaidBursting() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.update("res3376", "sto328", "share6185", {
fileSharePaidBursting: {
paidBurstingEnabled: true,
paidBurstingMaxBandwidthMibps: 10340,
paidBurstingMaxIops: 102400,
},
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxBandwidthMibps": 10340,
"paidBurstingMaxIops": 102400
}
}
}
UpdateShareProvisionedV2
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2026-04-01
{
"properties": {
"provisionedBandwidthMibps": 200,
"provisionedIops": 5000,
"shareQuota": 100
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for FileShares Update.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/FileSharesPatch_ProvisionedV2.json
*/
/**
* Sample code: UpdateShareProvisionedV2.
*
* @param manager Entry point to StorageManager.
*/
public static void updateShareProvisionedV2(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getFileShares().updateWithResponse("res3376", "sto328", "share6185",
new FileShareInner().withShareQuota(100).withProvisionedIops(5000).withProvisionedBandwidthMibps(200),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python file_shares_patch_provisioned_v2.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.file_shares.update(
resource_group_name="res3376",
account_name="sto328",
share_name="share6185",
file_share={"properties": {"provisionedBandwidthMibps": 200, "provisionedIops": 5000, "shareQuota": 100}},
)
print(response)
# x-ms-original-file: 2026-04-01/FileSharesPatch_ProvisionedV2.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-04-01/FileSharesPatch_ProvisionedV2.json
func ExampleFileSharesClient_Update_updateShareProvisionedV2() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
ProvisionedBandwidthMibps: to.Ptr[int32](200),
ProvisionedIops: to.Ptr[int32](5000),
ShareQuota: to.Ptr[int32](100),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.FileSharesClientUpdateResponse{
// FileShare: armstorage.FileShare{
// Name: to.Ptr("share6185"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"),
// FileShareProperties: &armstorage.FileShareProperties{
// IncludedBurstIops: to.Ptr[int32](15000),
// MaxBurstCreditsForIops: to.Ptr[int64](36000000),
// NextAllowedProvisionedBandwidthDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "Fri, 25 Oct 2024 01:48:09 GMT"); return t}()),
// NextAllowedProvisionedIopsDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "Fri, 25 Oct 2024 01:48:09 GMT"); return t}()),
// NextAllowedQuotaDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "Sat, 26 Oct 2024 01:50:50 GMT"); return t}()),
// ProvisionedBandwidthMibps: to.Ptr[int32](200),
// ProvisionedIops: to.Ptr[int32](5000),
// ShareQuota: to.Ptr[int32](100),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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.
*
* @summary 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.
* x-ms-original-file: 2026-04-01/FileSharesPatch_ProvisionedV2.json
*/
async function updateShareProvisionedV2() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.update("res3376", "sto328", "share6185", {
provisionedBandwidthMibps: 200,
provisionedIops: 5000,
shareQuota: 100,
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"properties": {
"includedBurstIops": 15000,
"maxBurstCreditsForIops": 36000000,
"nextAllowedProvisionedBandwidthDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT",
"nextAllowedProvisionedIopsDowngradeTime": "Fri, 25 Oct 2024 01:48:09 GMT",
"nextAllowedQuotaDowngradeTime": "Sat, 26 Oct 2024 01:50:50 GMT",
"provisionedBandwidthMibps": 200,
"provisionedIops": 5000,
"shareQuota": 100
}
}
UpdateShares
Sample request
PATCH https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2026-04-01
{
"properties": {
"metadata": {
"type": "image"
}
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for FileShares Update.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/FileSharesPatch.json
*/
/**
* Sample code: UpdateShares.
*
* @param manager Entry point to StorageManager.
*/
public static void updateShares(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getFileShares().updateWithResponse("res3376", "sto328", "share6185",
new FileShareInner().withMetadata(mapOf("type", "image")), com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python file_shares_patch.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = StorageManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.file_shares.update(
resource_group_name="res3376",
account_name="sto328",
share_name="share6185",
file_share={"properties": {"metadata": {"type": "image"}}},
)
print(response)
# x-ms-original-file: 2026-04-01/FileSharesPatch.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-04-01/FileSharesPatch.json
func ExampleFileSharesClient_Update_updateShares() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Update(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
Metadata: map[string]*string{
"type": to.Ptr("image"),
},
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.FileSharesClientUpdateResponse{
// FileShare: armstorage.FileShare{
// Name: to.Ptr("share6185"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185"),
// FileShareProperties: &armstorage.FileShareProperties{
// Metadata: map[string]*string{
// "type": to.Ptr("image"),
// },
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to 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.
*
* @summary 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.
* x-ms-original-file: 2026-04-01/FileSharesPatch.json
*/
async function updateShares() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.update("res3376", "sto328", "share6185", {
metadata: { type: "image" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample response
{
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"properties": {
"metadata": {
"type": "image"
}
}
}
Definitions
| Name |
Description |
|
AccessPolicy
|
|
|
CloudError
|
An error response from the Storage service.
|
|
CloudErrorBody
|
An error response from the Storage service.
|
|
createdByType
|
The type of identity that created the resource.
|
|
EnabledProtocols
|
The authentication protocol that is used for the file share. Can only be specified when creating a share.
|
|
FileShare
|
Properties of the file share, including Id, resource name, resource type, Etag.
|
|
FileSharePropertiesFileSharePaidBursting
|
File Share Paid Bursting properties.
|
|
LeaseDuration
|
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
|
|
LeaseState
|
Lease state of the container.
|
|
LeaseStatus
|
The lease status of the container.
|
|
RootSquashType
|
The property is for NFS share only. The default is NoRootSquash.
|
|
ShareAccessTier
|
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
|
|
SignedIdentifier
|
|
|
systemData
|
Metadata pertaining to creation and last modification of the resource.
|
AccessPolicy
Object
| 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
Object
An error response from the Storage service.
| Name |
Type |
Description |
|
error
|
CloudErrorBody
|
An error response from the Storage service.
|
CloudErrorBody
Object
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
|
CloudErrorBody[]
|
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.
|
createdByType
Enumeration
The type of identity that created the resource.
| Value |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
EnabledProtocols
Enumeration
The authentication protocol that is used for the file share. Can only be specified when creating a share.
| Value |
Description |
|
SMB
|
|
|
NFS
|
|
FileShare
Object
Properties of the file share, including Id, resource name, resource type, Etag.
| Name |
Type |
Description |
|
etag
|
string
|
Resource Etag.
|
|
id
|
string
(arm-id)
|
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
The name of the resource
|
|
properties.accessTier
|
ShareAccessTier
|
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
|
EnabledProtocols
|
The authentication protocol that is used for the file share. Can only be specified when creating a share.
|
|
properties.fileSharePaidBursting
|
FileSharePropertiesFileSharePaidBursting
|
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
|
LeaseDuration
|
Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.
|
|
properties.leaseState
|
LeaseState
|
Lease state of the share.
|
|
properties.leaseStatus
|
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-rfc7231)
|
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-rfc7231)
|
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-rfc7231)
|
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
(int32)
|
Remaining retention days for share that was soft deleted.
|
|
properties.rootSquash
|
RootSquashType
|
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
|
SignedIdentifier[]
|
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.
|
|
systemData
|
systemData
|
Azure Resource Manager metadata containing createdBy and modifiedBy information.
|
|
type
|
string
|
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
|
FileSharePropertiesFileSharePaidBursting
Object
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
Enumeration
Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.
| Value |
Description |
|
Infinite
|
|
|
Fixed
|
|
LeaseState
Enumeration
Lease state of the container.
| Value |
Description |
|
Available
|
|
|
Leased
|
|
|
Expired
|
|
|
Breaking
|
|
|
Broken
|
|
LeaseStatus
Enumeration
The lease status of the container.
| Value |
Description |
|
Locked
|
|
|
Unlocked
|
|
RootSquashType
Enumeration
The property is for NFS share only. The default is NoRootSquash.
| Value |
Description |
|
NoRootSquash
|
|
|
RootSquash
|
|
|
AllSquash
|
|
ShareAccessTier
Enumeration
Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.
| Value |
Description |
|
TransactionOptimized
|
|
|
Hot
|
|
|
Cool
|
|
|
Premium
|
|
SignedIdentifier
Object
| Name |
Type |
Description |
|
accessPolicy
|
AccessPolicy
|
Access policy
|
|
id
|
string
|
An unique identifier of the stored access policy.
|
systemData
Object
Metadata pertaining to creation and last modification of the resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
The timestamp of resource creation (UTC).
|
|
createdBy
|
string
|
The identity that created the resource.
|
|
createdByType
|
createdByType
|
The type of identity that created the resource.
|
|
lastModifiedAt
|
string
(date-time)
|
The timestamp of resource last modification (UTC)
|
|
lastModifiedBy
|
string
|
The identity that last modified the resource.
|
|
lastModifiedByType
|
createdByType
|
The type of identity that last modified the resource.
|