Crea una nuova condivisione con l'account specificato, come descritto dal corpo della richiesta. La risorsa di condivisione include metadati e proprietà per tale condivisione. Non include un elenco dei file contenuti nella condivisione.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2024-01-01
Con parametri facoltativi:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?$expand={$expand}&api-version=2024-01-01
Parametri dell'URI
Nome |
In |
Necessario |
Tipo |
Descrizione |
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-z0-9]+$
|
Nome dell'account di archiviazione all'interno del gruppo di risorse specificato. I nomi degli account di archiviazione devono avere una lunghezza compresa tra 3 e 24 caratteri e usare solo numeri e lettere minuscole.
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90 pattern: ^[-\w\._\(\)]+$
|
Nome del gruppo di risorse all'interno della sottoscrizione dell'utente. Il nome è insensibile alle maiuscole e minuscole.
|
shareName
|
path |
True
|
string
minLength: 3 maxLength: 63
|
Nome della condivisione file all'interno dell'account di archiviazione specificato. I nomi delle condivisioni file devono avere una lunghezza compresa tra 3 e 63 caratteri e usare numeri, lettere minuscole e solo trattini (-). Ogni trattino (-) deve essere immediatamente preceduto e seguito da una lettera o un numero.
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
ID della sottoscrizione di destinazione.
|
api-version
|
query |
True
|
string
minLength: 1
|
Versione dell'API da usare per questa operazione.
|
$expand
|
query |
|
string
|
Facoltativo, usato per espandere le proprietà all'interno delle proprietà della condivisione. I valori validi sono: snapshot. Deve essere passato come stringa con delimitatore ','
|
Corpo della richiesta
Nome |
Tipo |
Descrizione |
properties.accessTier
|
ShareAccessTier
|
Livello di accesso per una condivisione specifica. L'account GpV2 può scegliere tra TransactionOptimized (impostazione predefinita), Hot e Cool. L'account FileStorage può scegliere Premium.
|
properties.enabledProtocols
|
EnabledProtocols
|
Protocollo di autenticazione utilizzato per la condivisione file. Può essere specificato solo durante la creazione di una condivisione.
|
properties.fileSharePaidBursting
|
FileSharePaidBursting
|
Proprietà di bursting a pagamento della condivisione file.
|
properties.metadata
|
object
|
Coppia nome-valore da associare alla condivisione come metadati.
|
properties.provisionedBandwidthMibps
|
integer
(int32)
|
Larghezza di banda di cui è stato effettuato il provisioning, in mebibyte al secondo. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2. Fare riferimento alla risposta dell'API GetFileServiceUsage per il valore minimo e massimo consentito per la larghezza di banda di cui è stato effettuato il provisioning.
|
properties.provisionedIops
|
integer
(int32)
|
Operazioni di I/O al secondo di cui è stato effettuato il provisioning della condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2. Fare riferimento alla risposta dell'API GetFileServiceUsage per il valore minimo e massimo consentito per le operazioni di I/O al secondo di cui è stato effettuato il provisioning.
|
properties.rootSquash
|
RootSquashType
|
La proprietà è solo per la condivisione NFS. Il valore predefinito è NoRootSquash.
|
properties.shareQuota
|
integer
(int32)
|
Dimensioni di cui è stato effettuato il provisioning della condivisione, in gibibyte. Deve essere maggiore di 0 e minore o uguale a 5 TB (5120). Per le condivisioni file di grandi dimensioni, la dimensione massima è 102400. Per le condivisioni file create in File Con provisioning v2 tipo di account, vedere la risposta api GetFileServiceUsage per le dimensioni di archiviazione con provisioning minimo e massimo consentito.
|
properties.signedIdentifiers
|
SignedIdentifier[]
|
Elenco dei criteri di accesso archiviati specificati nella condivisione.
|
Risposte
Nome |
Tipo |
Descrizione |
200 OK
|
FileShare
|
OK - La condivisione è già stata creata.
|
201 Created
|
FileShare
|
Creazione: operazione di creazione condivisione completata.
|
Other Status Codes
|
CloudError
|
Risposta di errore che descrive il motivo per cui l'operazione non è riuscita.
|
Sicurezza
azure_auth
Flusso OAuth2 di Azure Active Directory
Tipo:
oauth2
Flow:
implicit
URL di autorizzazione:
https://login.microsoftonline.com/common/oauth2/authorize
Ambiti
Nome |
Descrizione |
user_impersonation
|
rappresentare l'account utente
|
Esempio
Create NFS Shares
Esempio di richiesta
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01
{
"properties": {
"enabledProtocols": "NFS"
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import com.azure.resourcemanager.storage.models.EnabledProtocols;
/**
* Samples for FileShares Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json
*/
/**
* Sample code: Create NFS Shares.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void createNFSShares(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().createWithResponse("res346", "sto666",
"share1235", new FileShareInner().withEnabledProtocols(EnabledProtocols.NFS), 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
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86c6306649b02e542117adb46c61e8019dbd78e9/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json
func ExampleFileSharesClient_Create_createNfsShares() {
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().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
EnabledProtocols: to.Ptr(armstorage.EnabledProtocolsNFS),
},
}, &armstorage.FileSharesClientCreateOptions{Expand: 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("share1235"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"),
// FileShareProperties: &armstorage.FileShareProperties{
// EnabledProtocols: to.Ptr(armstorage.EnabledProtocolsNFS),
// },
// }
}
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 Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
*
* @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.json
*/
async function createNfsShares() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346";
const accountName = "sto666";
const shareName = "share1235";
const fileShare = { enabledProtocols: "NFS" };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.create(
resourceGroupName,
accountName,
shareName,
fileShare,
);
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/2024-01-01/examples/FileSharesPut_NFS.json
// this example is just showing the usage of "FileShares_Create" 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 = "res346";
string accountName = "sto666";
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 = "share1235";
FileShareData data = new FileShareData
{
EnabledProtocol = FileShareEnabledProtocol.Nfs,
};
ArmOperation<FileShareResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, shareName, data);
FileShareResource result = lro.Value;
// 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
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_put_nfs.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.create(
resource_group_name="res346",
account_name="sto666",
share_name="share1235",
file_share={"properties": {"enabledProtocols": "NFS"}},
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_NFS.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
Risposta di esempio
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"enabledProtocols": "NFS"
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"enabledProtocols": "NFS"
}
}
PutShares
Esempio di richiesta
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2024-01-01
{}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
/**
* Samples for FileShares Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json
*/
/**
* Sample code: PutShares.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void putShares(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().createWithResponse("res3376", "sto328",
"share6185", new FileShareInner(), 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
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86c6306649b02e542117adb46c61e8019dbd78e9/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json
func ExampleFileSharesClient_Create_putShares() {
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().Create(ctx, "res3376", "sto328", "share6185", armstorage.FileShare{}, &armstorage.FileSharesClientCreateOptions{Expand: 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("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"),
// }
}
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 Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
*
* @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut.json
*/
async function putShares() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res3376";
const accountName = "sto328";
const shareName = "share6185";
const fileShare = {};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.create(
resourceGroupName,
accountName,
shareName,
fileShare,
);
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/2024-01-01/examples/FileSharesPut.json
// this example is just showing the usage of "FileShares_Create" 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 = "res3376";
string accountName = "sto328";
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 = "share6185";
FileShareData data = new FileShareData();
ArmOperation<FileShareResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, shareName, data);
FileShareResource result = lro.Value;
// 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
Risposta di esempio
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
"name": "share6185",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}
PutShares with Access Tier
Esempio di richiesta
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01
{
"properties": {
"accessTier": "Hot"
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import com.azure.resourcemanager.storage.models.ShareAccessTier;
/**
* Samples for FileShares Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json
*/
/**
* Sample code: PutShares with Access Tier.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void putSharesWithAccessTier(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().createWithResponse("res346", "sto666",
"share1235", new FileShareInner().withAccessTier(ShareAccessTier.HOT), 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
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86c6306649b02e542117adb46c61e8019dbd78e9/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json
func ExampleFileSharesClient_Create_putSharesWithAccessTier() {
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().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
AccessTier: to.Ptr(armstorage.ShareAccessTierHot),
},
}, &armstorage.FileSharesClientCreateOptions{Expand: 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("share1235"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"),
// FileShareProperties: &armstorage.FileShareProperties{
// AccessTier: to.Ptr(armstorage.ShareAccessTierHot),
// },
// }
}
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 Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
*
* @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.json
*/
async function putSharesWithAccessTier() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346";
const accountName = "sto666";
const shareName = "share1235";
const fileShare = { accessTier: "Hot" };
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.create(
resourceGroupName,
accountName,
shareName,
fileShare,
);
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/2024-01-01/examples/FileSharesPut_AccessTier.json
// this example is just showing the usage of "FileShares_Create" 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 = "res346";
string accountName = "sto666";
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 = "share1235";
FileShareData data = new FileShareData
{
AccessTier = FileShareAccessTier.Hot,
};
ArmOperation<FileShareResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, shareName, data);
FileShareResource result = lro.Value;
// 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
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_put_access_tier.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.create(
resource_group_name="res346",
account_name="sto666",
share_name="share1235",
file_share={"properties": {"accessTier": "Hot"}},
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_AccessTier.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
Risposta di esempio
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"accessTier": "Hot"
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"accessTier": "Hot"
}
}
PutShares with Paid Bursting
Esempio di richiesta
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01
{
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxIops": 102400,
"paidBurstingMaxBandwidthMibps": 10340
}
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
import com.azure.resourcemanager.storage.models.FileSharePropertiesFileSharePaidBursting;
/**
* Samples for FileShares Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_PaidBursting.
* json
*/
/**
* Sample code: PutShares with Paid Bursting.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void putSharesWithPaidBursting(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().createWithResponse("res346", "sto666",
"share1235",
new FileShareInner()
.withFileSharePaidBursting(new FileSharePropertiesFileSharePaidBursting().withPaidBurstingEnabled(true)
.withPaidBurstingMaxIops(102400).withPaidBurstingMaxBandwidthMibps(10340)),
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
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86c6306649b02e542117adb46c61e8019dbd78e9/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_PaidBursting.json
func ExampleFileSharesClient_Create_putSharesWithPaidBursting() {
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().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
FileSharePaidBursting: &armstorage.FileSharePropertiesFileSharePaidBursting{
PaidBurstingEnabled: to.Ptr(true),
PaidBurstingMaxBandwidthMibps: to.Ptr[int32](10340),
PaidBurstingMaxIops: to.Ptr[int32](102400),
},
},
}, &armstorage.FileSharesClientCreateOptions{Expand: 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("share1235"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"),
// 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");
require("dotenv/config");
/**
* This sample demonstrates how to Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
*
* @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_PaidBursting.json
*/
async function putSharesWithPaidBursting() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346";
const accountName = "sto666";
const shareName = "share1235";
const fileShare = {
fileSharePaidBursting: {
paidBurstingEnabled: true,
paidBurstingMaxBandwidthMibps: 10340,
paidBurstingMaxIops: 102400,
},
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.create(
resourceGroupName,
accountName,
shareName,
fileShare,
);
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/2024-01-01/examples/FileSharesPut_PaidBursting.json
// this example is just showing the usage of "FileShares_Create" 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 = "res346";
string accountName = "sto666";
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 = "share1235";
FileShareData data = new FileShareData
{
FileSharePaidBursting = new FileSharePropertiesFileSharePaidBursting
{
PaidBurstingEnabled = true,
PaidBurstingMaxIops = 102400,
PaidBurstingMaxBandwidthMibps = 10340,
},
};
ArmOperation<FileShareResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, shareName, data);
FileShareResource result = lro.Value;
// 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
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_put_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.create(
resource_group_name="res346",
account_name="sto666",
share_name="share1235",
file_share={
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": True,
"paidBurstingMaxBandwidthMibps": 10340,
"paidBurstingMaxIops": 102400,
}
}
},
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_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
Risposta di esempio
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxIops": 102400,
"paidBurstingMaxBandwidthMibps": 10340
}
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"fileSharePaidBursting": {
"paidBurstingEnabled": true,
"paidBurstingMaxIops": 102400,
"paidBurstingMaxBandwidthMibps": 10340
}
}
}
PutSharesProvisionedV2
Esempio di richiesta
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01
{
"properties": {
"shareQuota": 100,
"provisionedIops": 5000,
"provisionedBandwidthMibps": 200
}
}
import com.azure.resourcemanager.storage.fluent.models.FileShareInner;
/**
* Samples for FileShares Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_ProvisionedV2.
* json
*/
/**
* Sample code: PutSharesProvisionedV2.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void putSharesProvisionedV2(com.azure.resourcemanager.AzureResourceManager azure) {
azure.storageAccounts().manager().serviceClient().getFileShares().createWithResponse("res346", "sto666",
"share1235",
new FileShareInner().withShareQuota(100).withProvisionedIops(5000).withProvisionedBandwidthMibps(200), 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
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"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/86c6306649b02e542117adb46c61e8019dbd78e9/specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_ProvisionedV2.json
func ExampleFileSharesClient_Create_putSharesProvisionedV2() {
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().Create(ctx, "res346", "sto666", "share1235", armstorage.FileShare{
FileShareProperties: &armstorage.FileShareProperties{
ProvisionedBandwidthMibps: to.Ptr[int32](200),
ProvisionedIops: to.Ptr[int32](5000),
ShareQuota: to.Ptr[int32](100),
},
}, &armstorage.FileSharesClientCreateOptions{Expand: 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("share1235"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts/fileServices/shares"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235"),
// FileShareProperties: &armstorage.FileShareProperties{
// IncludedBurstIops: to.Ptr[int32](15000),
// MaxBurstCreditsForIops: to.Ptr[int64](36000000),
// 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 Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
*
* @summary Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
* x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_ProvisionedV2.json
*/
async function putSharesProvisionedV2() {
const subscriptionId = process.env["STORAGE_SUBSCRIPTION_ID"] || "{subscription-id}";
const resourceGroupName = process.env["STORAGE_RESOURCE_GROUP"] || "res346";
const accountName = "sto666";
const shareName = "share1235";
const fileShare = {
provisionedBandwidthMibps: 200,
provisionedIops: 5000,
shareQuota: 100,
};
const credential = new DefaultAzureCredential();
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.fileShares.create(
resourceGroupName,
accountName,
shareName,
fileShare,
);
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/2024-01-01/examples/FileSharesPut_ProvisionedV2.json
// this example is just showing the usage of "FileShares_Create" 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 = "res346";
string accountName = "sto666";
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 = "share1235";
FileShareData data = new FileShareData
{
ShareQuota = 100,
ProvisionedIops = 5000,
ProvisionedBandwidthMibps = 200,
};
ArmOperation<FileShareResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, shareName, data);
FileShareResource result = lro.Value;
// 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
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_put_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.create(
resource_group_name="res346",
account_name="sto666",
share_name="share1235",
file_share={"properties": {"provisionedBandwidthMibps": 200, "provisionedIops": 5000, "shareQuota": 100}},
)
print(response)
# x-ms-original-file: specification/storage/resource-manager/Microsoft.Storage/stable/2024-01-01/examples/FileSharesPut_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
Risposta di esempio
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"shareQuota": 100,
"provisionedIops": 5000,
"provisionedBandwidthMibps": 200,
"includedBurstIops": 15000,
"maxBurstCreditsForIops": 36000000
}
}
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
"name": "share1235",
"type": "Microsoft.Storage/storageAccounts/fileServices/shares",
"properties": {
"shareQuota": 100,
"provisionedIops": 5000,
"provisionedBandwidthMibps": 200,
"includedBurstIops": 15000,
"maxBurstCreditsForIops": 36000000
}
}
Definizioni
Nome |
Descrizione |
AccessPolicy
|
|
CloudError
|
Risposta di errore dal servizio di archiviazione.
|
CloudErrorBody
|
Risposta di errore dal servizio di archiviazione.
|
EnabledProtocols
|
Protocollo di autenticazione utilizzato per la condivisione file. Può essere specificato solo durante la creazione di una condivisione.
|
FileShare
|
Proprietà della condivisione file, tra cui ID, nome risorsa, tipo di risorsa, Etag.
|
FileSharePaidBursting
|
Proprietà di bursting a pagamento della condivisione file.
|
LeaseDuration
|
Specifica se il lease di una condivisione è di durata infinita o fissa, solo quando la condivisione è in lease.
|
LeaseState
|
Stato di lease della condivisione.
|
LeaseStatus
|
Stato del lease della condivisione.
|
RootSquashType
|
La proprietà è solo per la condivisione NFS. Il valore predefinito è NoRootSquash.
|
ShareAccessTier
|
Livello di accesso per una condivisione specifica. L'account GpV2 può scegliere tra TransactionOptimized (impostazione predefinita), Hot e Cool. L'account FileStorage può scegliere Premium.
|
SignedIdentifier
|
|
AccessPolicy
Object
Nome |
Tipo |
Descrizione |
expiryTime
|
string
(date-time)
|
Scadenza dei criteri di accesso
|
permission
|
string
|
Elenco di autorizzazioni abbreviate.
|
startTime
|
string
(date-time)
|
Ora di inizio dei criteri di accesso
|
CloudError
Object
Risposta di errore dal servizio di archiviazione.
Nome |
Tipo |
Descrizione |
error
|
CloudErrorBody
|
Risposta di errore dal servizio di archiviazione.
|
CloudErrorBody
Object
Risposta di errore dal servizio di archiviazione.
Nome |
Tipo |
Descrizione |
code
|
string
|
Identificatore dell'errore. I codici sono invarianti e devono essere utilizzati a livello di codice.
|
details
|
CloudErrorBody[]
|
Elenco di dettagli aggiuntivi sull'errore.
|
message
|
string
|
Messaggio che descrive l'errore, destinato a essere adatto per la visualizzazione in un'interfaccia utente.
|
target
|
string
|
Destinazione dell'errore specifico. Ad esempio, il nome della proprietà in errore.
|
EnabledProtocols
Enumerazione
Protocollo di autenticazione utilizzato per la condivisione file. Può essere specificato solo durante la creazione di una condivisione.
Valore |
Descrizione |
SMB
|
|
NFS
|
|
FileShare
Object
Proprietà della condivisione file, tra cui ID, nome risorsa, tipo di risorsa, Etag.
Nome |
Tipo |
Descrizione |
etag
|
string
|
Etag risorsa.
|
id
|
string
|
ID risorsa completo per la risorsa. Ad esempio - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
name
|
string
|
Nome della risorsa
|
properties.accessTier
|
ShareAccessTier
|
Livello di accesso per una condivisione specifica. L'account GpV2 può scegliere tra TransactionOptimized (impostazione predefinita), Hot e Cool. L'account FileStorage può scegliere Premium.
|
properties.accessTierChangeTime
|
string
(date-time)
|
Indica l'ora dell'ultima modifica per il livello di accesso alla condivisione.
|
properties.accessTierStatus
|
string
|
Indica se è presente una transizione in sospeso per il livello di accesso.
|
properties.deleted
|
boolean
|
Indica se la condivisione è stata eliminata.
|
properties.deletedTime
|
string
(date-time)
|
Ora eliminata se la condivisione è stata eliminata.
|
properties.enabledProtocols
|
EnabledProtocols
|
Protocollo di autenticazione utilizzato per la condivisione file. Può essere specificato solo durante la creazione di una condivisione.
|
properties.fileSharePaidBursting
|
FileSharePaidBursting
|
Proprietà di bursting a pagamento della condivisione file.
|
properties.includedBurstIops
|
integer
(int32)
|
Operazioni di I/O al secondo del burst calcolato della condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2.
|
properties.lastModifiedTime
|
string
(date-time)
|
Restituisce la data e l'ora dell'ultima modifica della condivisione.
|
properties.leaseDuration
|
LeaseDuration
|
Specifica se il lease di una condivisione è di durata infinita o fissa, solo quando la condivisione è in lease.
|
properties.leaseState
|
LeaseState
|
Stato di lease della condivisione.
|
properties.leaseStatus
|
LeaseStatus
|
Stato del lease della condivisione.
|
properties.maxBurstCreditsForIops
|
integer
(int64)
|
Crediti burst massimi calcolati per la condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2.
|
properties.metadata
|
object
|
Coppia nome-valore da associare alla condivisione come metadati.
|
properties.nextAllowedProvisionedBandwidthDowngradeTime
|
string
(date-time-rfc1123)
|
Restituisce il successivo tempo di downgrade della larghezza di banda con provisioning consentito per la condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2.
|
properties.nextAllowedProvisionedIopsDowngradeTime
|
string
(date-time-rfc1123)
|
Restituisce il successivo tempo di downgrade delle operazioni di I/O al secondo consentito per la condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2.
|
properties.nextAllowedQuotaDowngradeTime
|
string
(date-time-rfc1123)
|
Restituisce il successivo tempo di downgrade delle dimensioni di archiviazione con provisioning consentito per la condivisione. Questa proprietà è solo per le condivisioni file create in File con provisioning di unità SSD e file con provisioning v2 tipo di account
|
properties.provisionedBandwidthMibps
|
integer
(int32)
|
Larghezza di banda di cui è stato effettuato il provisioning, in mebibyte al secondo. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2. Fare riferimento alla risposta dell'API GetFileServiceUsage per il valore minimo e massimo consentito per la larghezza di banda di cui è stato effettuato il provisioning.
|
properties.provisionedIops
|
integer
(int32)
|
Operazioni di I/O al secondo di cui è stato effettuato il provisioning della condivisione. Questa proprietà è solo per le condivisioni file create in Tipo di account File con provisioning v2. Fare riferimento alla risposta dell'API GetFileServiceUsage per il valore minimo e massimo consentito per le operazioni di I/O al secondo di cui è stato effettuato il provisioning.
|
properties.remainingRetentionDays
|
integer
|
Giorni di conservazione rimanenti per la condivisione eliminata temporanea.
|
properties.rootSquash
|
RootSquashType
|
La proprietà è solo per la condivisione NFS. Il valore predefinito è NoRootSquash.
|
properties.shareQuota
|
integer
(int32)
|
Dimensioni di cui è stato effettuato il provisioning della condivisione, in gibibyte. Deve essere maggiore di 0 e minore o uguale a 5 TB (5120). Per le condivisioni file di grandi dimensioni, la dimensione massima è 102400. Per le condivisioni file create in File Con provisioning v2 tipo di account, vedere la risposta api GetFileServiceUsage per le dimensioni di archiviazione con provisioning minimo e massimo consentito.
|
properties.shareUsageBytes
|
integer
(int64)
|
Dimensioni approssimative dei dati archiviati nella condivisione. Si noti che questo valore potrebbe non includere tutti i file di recente creati o ridimensionati di recente.
|
properties.signedIdentifiers
|
SignedIdentifier[]
|
Elenco dei criteri di accesso archiviati specificati nella condivisione.
|
properties.snapshotTime
|
string
(date-time)
|
Tempo di creazione dello snapshot di condivisione restituito nella risposta delle condivisioni di elenco con estensione "snapshot".
|
properties.version
|
string
|
Versione della condivisione.
|
type
|
string
|
Tipo di risorsa. Ad esempio, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"
|
FileSharePaidBursting
Object
Proprietà di bursting a pagamento della condivisione file.
Nome |
Tipo |
Descrizione |
paidBurstingEnabled
|
boolean
|
Indica se il bursting a pagamento è abilitato per la condivisione. Questa proprietà è solo per le condivisioni file create in File con provisioning v1 tipo di account SSD.
|
paidBurstingMaxBandwidthMibps
|
integer
(int32)
|
Larghezza di banda massima di bursting a pagamento per la condivisione, in mebibyte al secondo. Questa proprietà è solo per le condivisioni file create in File con provisioning v1 tipo di account SSD. Il valore massimo consentito è 10340, ovvero la larghezza di banda massima consentita per una condivisione.
|
paidBurstingMaxIops
|
integer
(int32)
|
Numero massimo di operazioni di I/O al secondo a pagamento per la condivisione. Questa proprietà è solo per le condivisioni file create in File con provisioning v1 tipo di account SSD. Il valore massimo consentito è 102400, ovvero il numero massimo di operazioni di I/O al secondo consentite per una condivisione.
|
LeaseDuration
Enumerazione
Specifica se il lease di una condivisione è di durata infinita o fissa, solo quando la condivisione è in lease.
Valore |
Descrizione |
Infinite
|
|
Fixed
|
|
LeaseState
Enumerazione
Stato di lease della condivisione.
Valore |
Descrizione |
Available
|
|
Leased
|
|
Expired
|
|
Breaking
|
|
Broken
|
|
LeaseStatus
Enumerazione
Stato del lease della condivisione.
Valore |
Descrizione |
Locked
|
|
Unlocked
|
|
RootSquashType
Enumerazione
La proprietà è solo per la condivisione NFS. Il valore predefinito è NoRootSquash.
Valore |
Descrizione |
NoRootSquash
|
|
RootSquash
|
|
AllSquash
|
|
ShareAccessTier
Enumerazione
Livello di accesso per una condivisione specifica. L'account GpV2 può scegliere tra TransactionOptimized (impostazione predefinita), Hot e Cool. L'account FileStorage può scegliere Premium.
Valore |
Descrizione |
TransactionOptimized
|
|
Hot
|
|
Cool
|
|
Premium
|
|
SignedIdentifier
Object
Nome |
Tipo |
Descrizione |
accessPolicy
|
AccessPolicy
|
Criteri di accesso
|
id
|
string
|
Identificatore univoco dei criteri di accesso archiviati.
|