Aktualizuje właściwości udziału zgodnie z treścią żądania. Właściwości, które nie zostały wymienione w żądaniu, nie zostaną zmienione. Aktualizacja kończy się niepowodzeniem, jeśli określony udział jeszcze nie istnieje.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2026-09-01
Parametry identyfikatora URI
| Nazwisko |
W |
Wymagane |
Typ |
Opis |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-z0-9]+$
|
Nazwa konta magazynu w określonej grupie zasobów. Nazwy kont magazynu muszą mieć długość od 3 do 24 znaków i mogą zawierać wyłącznie cyfry oraz małe litery.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
|
shareName
|
path |
True
|
string
minLength: 3 maxLength: 63
|
Nazwa udziału plików w ramach określonego konta magazynu. Nazwy udziałów plików muszą mieć długość od 3 do 63 znaków i zawierać tylko cyfry, małe litery i myślnik (-). Każdy znak kreski (-) musi być bezpośrednio poprzedzony literą lub cyfrą i po niej następuje.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
| Nazwisko |
Typ |
Opis |
|
properties.accessTier
|
ShareAccessTier
|
Warstwa dostępu dla określonego udziału. Konto GpV2 można wybrać między TransactionOptimized (wartość domyślna), Gorąca i Chłodna. Konto FileStorage może wybrać pozycję Premium.
|
|
properties.enabledProtocols
|
EnabledProtocols
|
Protokół uwierzytelniania używany dla udziału plików. Można określić tylko podczas tworzenia udziału.
|
|
properties.fileSharePaidBursting
|
FileSharePropertiesFileSharePaidBursting
|
Właściwości płatnego rozerwania udziału plików.
|
|
properties.metadata
|
object
|
Para name-value do skojarzenia z udziałem jako metadanymi.
|
|
properties.provisionedBandwidthMibps
|
integer
(int32)
|
Aprowizowana przepustowość udziału w mebibajtach na sekundę. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2. Aby uzyskać minimalną i maksymalną dozwoloną wartość dla aprowizowanej przepustowości, zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage.
|
|
properties.provisionedIops
|
integer
(int32)
|
Aprowizowana liczba operacji we/wy na sekundę udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2. Zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage, aby uzyskać minimalną i maksymalną dozwoloną wartość dla aprowizowanej liczby operacji we/wy na sekundę.
|
|
properties.rootSquash
|
RootSquashType
|
Właściwość dotyczy tylko udziału NFS. Wartość domyślna to NoRootSquash.
|
|
properties.shareQuota
|
integer
(int32)
|
Aprowizowany rozmiar udziału w gibibajtach. Musi być większa niż 0 i mniejsza lub równa 5 TB (5120). W przypadku dużych udziałów plików maksymalny rozmiar to 102400. W przypadku udziałów plików utworzonych w obszarze Typ konta aprowizowanego w wersji 2 zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage dla minimalnego i maksymalnego dozwolonego rozmiaru aprowizowanego magazynu.
|
|
properties.signedIdentifiers
|
SignedIdentifier[]
|
Lista przechowywanych zasad dostępu określonych w udziale.
|
Odpowiedzi
| Nazwisko |
Typ |
Opis |
|
200 OK
|
FileShare
|
Operacja Azure zakończyła się pomyślnie.
|
|
Other Status Codes
|
CloudError
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 w usłudze Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwisko |
Opis |
|
user_impersonation
|
podszywaj się pod konto użytkownika
|
Przykłady
UpdateShareAcls
Przykładowe żądanie
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-09-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-09-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-09-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-09-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(time.Date(2021, time.May, 1, 8, 49, 37, 0, time.UTC)),
Permission: to.Ptr("rwd"),
StartTime: to.Ptr(time.Date(2021, time.April, 1, 8, 49, 37, 0, time.UTC)),
},
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(time.Date(2021, time.May, 1, 8, 49, 37, 0, time.UTC)),
// Permission: to.Ptr("rwd"),
// StartTime: to.Ptr(time.Date(2021, time.April, 1, 8, 49, 37, 0, time.UTC)),
// },
// 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-09-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
Przykładowa odpowiedź
{
"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
Przykładowe żądanie
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-09-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-09-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-09-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-09-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-09-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
Przykładowa odpowiedź
{
"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
Przykładowe żądanie
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-09-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-09-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-09-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-09-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(time.Date(2024, time.October, 25, 1, 48, 9, 0, time.UTC)),
// NextAllowedProvisionedIopsDowngradeTime: to.Ptr(time.Date(2024, time.October, 25, 1, 48, 9, 0, time.UTC)),
// NextAllowedQuotaDowngradeTime: to.Ptr(time.Date(2024, time.October, 26, 1, 50, 50, 0, time.UTC)),
// 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-09-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
Przykładowa odpowiedź
{
"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
Przykładowe żądanie
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-09-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-09-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-09-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-09-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-09-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
Przykładowa odpowiedź
{
"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"
}
}
}
Definicje
| Nazwisko |
Opis |
|
AccessPolicy
|
|
|
CloudError
|
Odpowiedź na błąd z usługi Storage.
|
|
CloudErrorBody
|
Odpowiedź na błąd z usługi Storage.
|
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
EnabledProtocols
|
Protokół uwierzytelniania używany dla udziału plików. Można określić tylko podczas tworzenia udziału.
|
|
FileShare
|
Właściwości udziału plików, w tym identyfikator, nazwa zasobu, typ zasobu, Etag.
|
|
FileSharePropertiesFileSharePaidBursting
|
Właściwości płatnego rozerwania udziału plików.
|
|
LeaseDuration
|
Określa, czy dzierżawa kontenera jest dzierżawiona na czas nieskończony, czy na stałe, tylko wtedy, gdy kontener jest dzierżawiony.
|
|
LeaseState
|
Stan dzierżawy kontenera.
|
|
LeaseStatus
|
Stan dzierżawy kontenera.
|
|
RootSquashType
|
Właściwość dotyczy tylko udziału NFS. Wartość domyślna to NoRootSquash.
|
|
ShareAccessTier
|
Warstwa dostępu dla określonego udziału. Konto GpV2 można wybrać między TransactionOptimized (wartość domyślna), Gorąca i Chłodna. Konto FileStorage może wybrać pozycję Premium.
|
|
SignedIdentifier
|
|
|
systemData
|
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
|
AccessPolicy
Objekt
| Nazwisko |
Typ |
Opis |
|
expiryTime
|
string
(date-time)
|
Czas wygaśnięcia zasad dostępu
|
|
permission
|
string
|
Lista skróconych uprawnień.
|
|
startTime
|
string
(date-time)
|
Godzina rozpoczęcia zasad dostępu
|
CloudError
Objekt
Odpowiedź na błąd z usługi Storage.
| Nazwisko |
Typ |
Opis |
|
error
|
CloudErrorBody
|
Odpowiedź na błąd z usługi Storage.
|
CloudErrorBody
Objekt
Odpowiedź na błąd z usługi Storage.
| Nazwisko |
Typ |
Opis |
|
code
|
string
|
Identyfikator błędu. Kody są niezmienne i mają być używane programowo.
|
|
details
|
CloudErrorBody[]
|
Lista dodatkowych szczegółów dotyczących błędu.
|
|
message
|
string
|
Komunikat opisujący błąd, który ma być odpowiedni do wyświetlania w interfejsie użytkownika.
|
|
target
|
string
|
Element docelowy określonego błędu. Na przykład nazwa właściwości w błędzie.
|
createdByType
Wyliczenie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
EnabledProtocols
Wyliczenie
Protokół uwierzytelniania używany dla udziału plików. Można określić tylko podczas tworzenia udziału.
FileShare
Objekt
Właściwości udziału plików, w tym identyfikator, nazwa zasobu, typ zasobu, Etag.
| Nazwisko |
Typ |
Opis |
|
etag
|
string
|
Zasób Etag.
|
|
id
|
string
(arm-id)
|
W pełni określony identyfikator zasobu dla tego zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Nazwa zasobu
|
|
properties.accessTier
|
ShareAccessTier
|
Warstwa dostępu dla określonego udziału. Konto GpV2 można wybrać między TransactionOptimized (wartość domyślna), Gorąca i Chłodna. Konto FileStorage może wybrać pozycję Premium.
|
|
properties.accessTierChangeTime
|
string
(date-time)
|
Wskazuje czas ostatniej modyfikacji dla warstwy dostępu udziału.
|
|
properties.accessTierStatus
|
string
|
Wskazuje, czy istnieje oczekujące przejście dla warstwy dostępu.
|
|
properties.deleted
|
boolean
|
Wskazuje, czy udział został usunięty.
|
|
properties.deletedTime
|
string
(date-time)
|
Czas usunięcia, jeśli udział został usunięty.
|
|
properties.enabledProtocols
|
EnabledProtocols
|
Protokół uwierzytelniania używany dla udziału plików. Można określić tylko podczas tworzenia udziału.
|
|
properties.fileSharePaidBursting
|
FileSharePropertiesFileSharePaidBursting
|
Właściwości płatnego rozerwania udziału plików.
|
|
properties.includedBurstIops
|
integer
(int32)
|
Obliczona liczba operacji we/wy na sekundę udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2.
|
|
properties.lastModifiedTime
|
string
(date-time)
|
Zwraca datę i godzinę ostatniej modyfikacji udziału.
|
|
properties.leaseDuration
|
LeaseDuration
|
Określa, czy dzierżawa udziału ma nieskończony lub stały czas trwania, tylko wtedy, gdy udział jest dzierżawiony.
|
|
properties.leaseState
|
LeaseState
|
Stan dzierżawy udziału.
|
|
properties.leaseStatus
|
LeaseStatus
|
Stan dzierżawy udziału.
|
|
properties.maxBurstCreditsForIops
|
integer
(int64)
|
Obliczone maksymalne środki na wzrost dla udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2.
|
|
properties.metadata
|
object
|
Para name-value do skojarzenia z udziałem jako metadanymi.
|
|
properties.nextAllowedProvisionedBandwidthDowngradeTime
|
string
(date-time-rfc7231)
|
Zwraca następny dozwolony dozwolony czas obniżenia przepustowości dla udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2.
|
|
properties.nextAllowedProvisionedIopsDowngradeTime
|
string
(date-time-rfc7231)
|
Zwraca następny dozwolony dozwolony czas obniżenia liczby operacji we/wy na sekundę dla udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2.
|
|
properties.nextAllowedQuotaDowngradeTime
|
string
(date-time-rfc7231)
|
Zwraca następny dozwolony dozwolony czas obniżenia rozmiaru magazynu dla udziału. Ta właściwość jest dostępna tylko dla udziałów plików utworzonych w obszarze typu konta Files Provisioned v1 SSD i Files Provisioned v2
|
|
properties.provisionedBandwidthMibps
|
integer
(int32)
|
Aprowizowana przepustowość udziału w mebibajtach na sekundę. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2. Aby uzyskać minimalną i maksymalną dozwoloną wartość dla aprowizowanej przepustowości, zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage.
|
|
properties.provisionedIops
|
integer
(int32)
|
Aprowizowana liczba operacji we/wy na sekundę udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki Aprowizowany typ konta w wersji 2. Zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage, aby uzyskać minimalną i maksymalną dozwoloną wartość dla aprowizowanej liczby operacji we/wy na sekundę.
|
|
properties.remainingRetentionDays
|
integer
(int32)
|
Pozostałe dni przechowywania dla udziału, który został usunięty nietrwale.
|
|
properties.rootSquash
|
RootSquashType
|
Właściwość dotyczy tylko udziału NFS. Wartość domyślna to NoRootSquash.
|
|
properties.shareQuota
|
integer
(int32)
|
Aprowizowany rozmiar udziału w gibibajtach. Musi być większa niż 0 i mniejsza lub równa 5 TB (5120). W przypadku dużych udziałów plików maksymalny rozmiar to 102400. W przypadku udziałów plików utworzonych w obszarze Typ konta aprowizowanego w wersji 2 zapoznaj się z odpowiedzią interfejsu API GetFileServiceUsage dla minimalnego i maksymalnego dozwolonego rozmiaru aprowizowanego magazynu.
|
|
properties.shareUsageBytes
|
integer
(int64)
|
Przybliżony rozmiar danych przechowywanych w udziale. Należy pamiętać, że ta wartość może nie zawierać wszystkich ostatnio utworzonych lub ostatnio zmienionych plików.
|
|
properties.signedIdentifiers
|
SignedIdentifier[]
|
Lista przechowywanych zasad dostępu określonych w udziale.
|
|
properties.snapshotTime
|
string
(date-time)
|
Czas utworzenia migawki udziału zwrócony w odpowiedzi udziałów listy z rozszerzeniem param "snapshots".
|
|
properties.version
|
string
|
Wersja udziału.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
FileSharePropertiesFileSharePaidBursting
Objekt
Właściwości płatnego rozerwania udziału plików.
| Nazwisko |
Typ |
Opis |
|
paidBurstingEnabled
|
boolean
|
Wskazuje, czy płatne skalowanie jest włączone dla udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki aprowizowanego typu konta SSD w wersji 1.
|
|
paidBurstingMaxBandwidthMibps
|
integer
(int32)
|
Maksymalna płatna przepustowość dla udziału w mebibajtach na sekundę. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki aprowizowanego typu konta SSD w wersji 1. Maksymalna dozwolona wartość to 10340, która jest maksymalną dozwoloną przepustowością dla udziału.
|
|
paidBurstingMaxIops
|
integer
(int32)
|
Maksymalna płatna liczba operacji we/wy na sekundę dla udziału. Ta właściwość dotyczy tylko udziałów plików utworzonych w obszarze Pliki aprowizowanego typu konta SSD w wersji 1. Maksymalna dozwolona wartość to 102400, czyli maksymalna dozwolona liczba operacji we/wy na sekundę dla udziału.
|
LeaseDuration
Wyliczenie
Określa, czy dzierżawa kontenera jest dzierżawiona na czas nieskończony, czy na stałe, tylko wtedy, gdy kontener jest dzierżawiony.
| Wartość |
Opis |
|
Infinite
|
|
|
Fixed
|
|
LeaseState
Wyliczenie
Stan dzierżawy kontenera.
| Wartość |
Opis |
|
Available
|
|
|
Leased
|
|
|
Expired
|
|
|
Breaking
|
|
|
Broken
|
|
LeaseStatus
Wyliczenie
Stan dzierżawy kontenera.
| Wartość |
Opis |
|
Locked
|
|
|
Unlocked
|
|
RootSquashType
Wyliczenie
Właściwość dotyczy tylko udziału NFS. Wartość domyślna to NoRootSquash.
| Wartość |
Opis |
|
NoRootSquash
|
|
|
RootSquash
|
|
|
AllSquash
|
|
ShareAccessTier
Wyliczenie
Warstwa dostępu dla określonego udziału. Konto GpV2 można wybrać między TransactionOptimized (wartość domyślna), Gorąca i Chłodna. Konto FileStorage może wybrać pozycję Premium.
| Wartość |
Opis |
|
TransactionOptimized
|
|
|
Hot
|
|
|
Cool
|
|
|
Premium
|
|
SignedIdentifier
Objekt
| Nazwisko |
Typ |
Opis |
|
accessPolicy
|
AccessPolicy
|
Zasady dostępu
|
|
id
|
string
|
Unikatowy identyfikator przechowywanych zasad dostępu.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwisko |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|