Pobiera właściwości określonego udziału.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2025-06-01
Z opcjonalnymi parametrami:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2025-06-01&$expand={$expand}
Parametry URI
| Nazwa |
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.
|
|
$expand
|
query |
|
string
|
Opcjonalnie, służy do rozwijania właściwości we właściwościach udziału. Prawidłowe wartości to: stats. Powinien być przekazywany jako ciąg z ogranicznikiem ','.
|
| Nazwa |
Wymagane |
Typ |
Opis |
|
x-ms-snapshot
|
|
string
|
Opcjonalnie, służy do pobierania właściwości migawki.
|
Odpowiedzi
| Nazwa |
Typ |
Opis |
|
200 OK
|
FileShare
|
Operacja platformy Azure została zakończona 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
URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresów
| Nazwa |
Opis |
|
user_impersonation
|
personifikacja konta użytkownika
|
Przykłady
GetSharePaidBursting
Przykładowa prośba
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634?api-version=2025-06-01
/**
* Samples for FileShares Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_PaidBursting.
* json
*/
/**
* Sample code: GetSharePaidBursting.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getSharePaidBursting(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().getWithResponse("res9871", "sto6217",
"share1634", null, null, com.azure.core.util.Context.NONE);
}
}
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_get_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.get(
resource_group_name="res9871",
account_name="sto6217",
share_name="share1634",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_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/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4e9df3afd38a1cfa00a5d49419dce51bd014601f/specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_PaidBursting.json
func ExampleFileSharesClient_Get_getSharePaidBursting() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: nil,
XMSSnapshot: 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.FileShare = armstorage.FileShare{
// Name: to.Ptr("share1634"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"),
// Etag: to.Ptr("\"0x8D592D74CC20EBA\""),
// FileShareProperties: &armstorage.FileShareProperties{
// FileSharePaidBursting: &armstorage.FileSharePropertiesFileSharePaidBursting{
// PaidBurstingEnabled: to.Ptr(true),
// PaidBurstingMaxBandwidthMibps: to.Ptr[int32](10340),
// PaidBurstingMaxIops: to.Ptr[int32](102400),
// },
// LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14.000Z"); return t}()),
// ShareQuota: to.Ptr[int32](1024),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_PaidBursting.json
*/
async function getSharePaidBursting() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.get(resourceGroupName, accountName, shareName);
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
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Storage.Models;
using Azure.ResourceManager.Storage;
// Generated from example definition: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_PaidBursting.json
// this example is just showing the usage of "FileShares_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this FileServiceResource created on azure
// for more information of creating FileServiceResource, please refer to the document of FileServiceResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "res9871";
string accountName = "sto6217";
ResourceIdentifier fileServiceResourceId = FileServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
FileServiceResource fileService = client.GetFileServiceResource(fileServiceResourceId);
// get the collection of this FileShareResource
FileShareCollection collection = fileService.GetFileShares();
// invoke the operation
string shareName = "share1634";
NullableResponse<FileShareResource> response = await collection.GetIfExistsAsync(shareName);
FileShareResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
FileShareData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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": "share1634",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D592D74CC20EBA\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634",
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxBandwidthMibps": 10340,
"paidBurstingMaxIops": 102400
},
"lastModifiedTime": "2019-05-26T05:06:14Z",
"shareQuota": 1024
}
}
GetShareProvisionedV2
Przykładowa prośba
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634?api-version=2025-06-01
/**
* Samples for FileShares Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_ProvisionedV2.
* json
*/
/**
* Sample code: GetShareProvisionedV2.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getShareProvisionedV2(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().getWithResponse("res9871", "sto6217",
"share1634", null, null, com.azure.core.util.Context.NONE);
}
}
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_get_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.get(
resource_group_name="res9871",
account_name="sto6217",
share_name="share1634",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_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/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4e9df3afd38a1cfa00a5d49419dce51bd014601f/specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_ProvisionedV2.json
func ExampleFileSharesClient_Get_getShareProvisionedV2() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: nil,
XMSSnapshot: 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.FileShare = armstorage.FileShare{
// Name: to.Ptr("share1634"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"),
// Etag: to.Ptr("\"0x8D592D74CC20EBA\""),
// FileShareProperties: &armstorage.FileShareProperties{
// IncludedBurstIops: to.Ptr[int32](15000),
// LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2024-10-25T01:50:50.000Z"); return t}()),
// MaxBurstCreditsForIops: to.Ptr[int64](36000000),
// NextAllowedProvisionedBandwidthDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2024-10-25T01:48:09.000Z"); return t}()),
// NextAllowedProvisionedIopsDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2024-10-25T01:48:09.000Z"); return t}()),
// NextAllowedQuotaDowngradeTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC1123, "2024-10-26T01:50:50.000Z"); 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");
require("dotenv/config");
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_ProvisionedV2.json
*/
async function getShareProvisionedV2() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.get(resourceGroupName, accountName, shareName);
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
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Storage.Models;
using Azure.ResourceManager.Storage;
// Generated from example definition: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_ProvisionedV2.json
// this example is just showing the usage of "FileShares_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this FileServiceResource created on azure
// for more information of creating FileServiceResource, please refer to the document of FileServiceResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "res9871";
string accountName = "sto6217";
ResourceIdentifier fileServiceResourceId = FileServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
FileServiceResource fileService = client.GetFileServiceResource(fileServiceResourceId);
// get the collection of this FileShareResource
FileShareCollection collection = fileService.GetFileShares();
// invoke the operation
string shareName = "share1634";
NullableResponse<FileShareResource> response = await collection.GetIfExistsAsync(shareName);
FileShareResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
FileShareData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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": "share1634",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D592D74CC20EBA\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634",
"properties": {
"includedBurstIops": 15000,
"lastModifiedTime": "2024-10-25T01:50:50.0000000Z",
"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
}
}
GetShares
Przykładowa prośba
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634?api-version=2025-06-01
/**
* Samples for FileShares Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet.json
*/
/**
* Sample code: GetShares.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getShares(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().getWithResponse("res9871", "sto6217",
"share1634", null, null, com.azure.core.util.Context.NONE);
}
}
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_get.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.get(
resource_group_name="res9871",
account_name="sto6217",
share_name="share1634",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet.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/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4e9df3afd38a1cfa00a5d49419dce51bd014601f/specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet.json
func ExampleFileSharesClient_Get_getShares() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: nil,
XMSSnapshot: 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.FileShare = armstorage.FileShare{
// Name: to.Ptr("share1634"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"),
// Etag: to.Ptr("\"0x8D592D74CC20EBA\""),
// FileShareProperties: &armstorage.FileShareProperties{
// LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14.000Z"); return t}()),
// ShareQuota: to.Ptr[int32](1024),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet.json
*/
async function getShares() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.get(resourceGroupName, accountName, shareName);
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
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Storage.Models;
using Azure.ResourceManager.Storage;
// Generated from example definition: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet.json
// this example is just showing the usage of "FileShares_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this FileServiceResource created on azure
// for more information of creating FileServiceResource, please refer to the document of FileServiceResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "res9871";
string accountName = "sto6217";
ResourceIdentifier fileServiceResourceId = FileServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
FileServiceResource fileService = client.GetFileServiceResource(fileServiceResourceId);
// get the collection of this FileShareResource
FileShareCollection collection = fileService.GetFileShares();
// invoke the operation
string shareName = "share1634";
NullableResponse<FileShareResource> response = await collection.GetIfExistsAsync(shareName);
FileShareResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
FileShareData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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": "share1634",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D592D74CC20EBA\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634",
"properties": {
"lastModifiedTime": "2019-05-26T05:06:14Z",
"shareQuota": 1024
}
}
GetShareStats
Przykładowa prośba
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634?api-version=2025-06-01&$expand=stats
/**
* Samples for FileShares Get.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_Stats.json
*/
/**
* Sample code: GetShareStats.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void getShareStats(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().getWithResponse("res9871", "sto6217",
"share1634", "stats", null, com.azure.core.util.Context.NONE);
}
}
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_get_stats.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.get(
resource_group_name="res9871",
account_name="sto6217",
share_name="share1634",
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_Stats.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/v3"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/4e9df3afd38a1cfa00a5d49419dce51bd014601f/specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_Stats.json
func ExampleFileSharesClient_Get_getShareStats() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewFileSharesClient().Get(ctx, "res9871", "sto6217", "share1634", &armstorage.FileSharesClientGetOptions{Expand: to.Ptr("stats"),
XMSSnapshot: 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.FileShare = armstorage.FileShare{
// Name: to.Ptr("share1634"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634"),
// Etag: to.Ptr("\"0x8D592D74CC20EBA\""),
// FileShareProperties: &armstorage.FileShareProperties{
// LastModifiedTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2019-05-26T05:06:14.000Z"); return t}()),
// ShareQuota: to.Ptr[int32](1024),
// ShareUsageBytes: to.Ptr[int64](652945),
// },
// }
}
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");
require("dotenv/config");
/**
* This sample demonstrates how to Gets properties of a specified share.
*
* @summary Gets properties of a specified share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_Stats.json
*/
async function getShareStats() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res9871";
const accountName = "sto6217";
const shareName = "share1634";
const expand = "stats";
const options = { expand };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.get(resourceGroupName, accountName, shareName, options);
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
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Storage.Models;
using Azure.ResourceManager.Storage;
// Generated from example definition: specification/storage/resource-manager/Microsoft.Storage/stable/2025-06-01/examples/FileSharesGet_Stats.json
// this example is just showing the usage of "FileShares_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this FileServiceResource created on azure
// for more information of creating FileServiceResource, please refer to the document of FileServiceResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "res9871";
string accountName = "sto6217";
ResourceIdentifier fileServiceResourceId = FileServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
FileServiceResource fileService = client.GetFileServiceResource(fileServiceResourceId);
// get the collection of this FileShareResource
FileShareCollection collection = fileService.GetFileShares();
// invoke the operation
string shareName = "share1634";
string expand = "stats";
NullableResponse<FileShareResource> response = await collection.GetIfExistsAsync(shareName, expand: expand);
FileShareResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
FileShareData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
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": "share1634",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"etag": "\"0x8D592D74CC20EBA\"",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634",
"properties": {
"lastModifiedTime": "2019-05-26T05:06:14Z",
"shareQuota": 1024,
"shareUsageBytes": 652945
}
}
Definicje
| Nazwa |
Opis |
|
AccessPolicy
|
|
|
CloudError
|
Odpowiedź na błąd z usługi Storage.
|
|
CloudErrorBody
|
Odpowiedź na błąd z usługi Storage.
|
|
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
|
|
AccessPolicy
Sprzeciwiać się
| Nazwa |
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
Sprzeciwiać się
Odpowiedź na błąd z usługi Storage.
| Nazwa |
Typ |
Opis |
|
error
|
CloudErrorBody
|
Odpowiedź na błąd z usługi Storage.
|
CloudErrorBody
Sprzeciwiać się
Odpowiedź na błąd z usługi Storage.
| Nazwa |
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.
|
EnabledProtocols
Wyliczenie
Protokół uwierzytelniania używany dla udziału plików. Można określić tylko podczas tworzenia udziału.
FileShare
Sprzeciwiać się
Właściwości udziału plików, w tym identyfikator, nazwa zasobu, typ zasobu, Etag.
| Nazwa |
Typ |
Opis |
|
etag
|
string
|
Zasób Etag.
|
|
id
|
string
|
W pełni kwalifikowany identyfikator zasobu dla zasobu. Przykład - /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 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 udziału, jeśli 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ę burst 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 jest udzielana na czas nieskończony, czy na czas określony, tylko wtedy, gdy udział jest dzierżawiony.
|
|
properties.leaseState
|
LeaseState
|
Stan dzierżawy udziału.
|
|
properties.leaseStatus
|
LeaseStatus
|
Status wynajmu udziału.
|
|
properties.maxBurstCreditsForIops
|
integer
(int64)
|
Obliczona maksymalna liczba kredytów serii dla akcji. 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 czas obniżenia aprowizowanej 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 czas obniżenia poziomu 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 czas obniżenia rozmiaru aprowizowanego 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 obejmować wszystkich ostatnio utworzonych plików lub ostatnio zmienionych rozmiarów.
|
|
properties.signedIdentifiers
|
SignedIdentifier[]
|
Lista przechowywanych zasad dostępu określonych w udziale.
|
|
properties.snapshotTime
|
string
(date-time)
|
Czas tworzenia migawki udziału zwróconej w odpowiedzi na listę udziałów z parametrem expand "migawki".
|
|
properties.version
|
string
|
Wersja udziału.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
FileSharePropertiesFileSharePaidBursting
Sprzeciwiać się
Właściwości płatnego rozerwania udziału plików.
| Nazwa |
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
Sprzeciwiać się
| Nazwa |
Typ |
Opis |
|
accessPolicy
|
AccessPolicy
|
Zasady dostępu
|
|
id
|
string
|
Unikatowy identyfikator przechowywanych zasad dostępu.
|