Asynchronicznie tworzy nowe konto magazynu z określonymi parametrami. Jeśli konto zostało już utworzone, a kolejne żądanie utworzenia zostanie wystawione z różnymi właściwościami, właściwości konta zostaną zaktualizowane. Jeśli konto zostało już utworzone, a kolejne żądanie utworzenia lub aktualizacji zostanie wystawione z dokładnie tym samym zestawem właściwości, żądanie zakończy się pomyślnie.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}?api-version=2026-09-01
Parametry identyfikatora URI
| Nazwisko |
W |
Wymagane |
Typ |
Opis |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-z0-9]+$
|
Nazwa konta magazynu w określonej grupie zasobów. Nazwy kont magazynu muszą mieć długość od 3 do 24 znaków i mogą zawierać wyłącznie cyfry oraz małe litery.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Nazwa grupy zasobów. Nazwa jest niewrażliwa na wielkość liter.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
Identyfikator subskrypcji docelowej. Wartość musi być identyfikatorem UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Wersja interfejsu API do użycia dla tej operacji.
|
Treść żądania
| Nazwisko |
Wymagane |
Typ |
Opis |
|
kind
|
True
|
Kind
|
Required. Wskazuje typ konta magazynu.
|
|
location
|
True
|
string
|
Required. Pobiera lub ustawia lokalizację zasobu. Będzie to jeden z obsługiwanych i zarejestrowanych regionów geograficznych platformy Azure (np. Zachodnie stany USA, Wschodnie stany USA, Azja Południowo-Wschodnia itp.). Nie można zmienić regionu geograficznego zasobu po jego utworzeniu, ale jeśli zostanie określony identyczny region geograficzny podczas aktualizacji, żądanie zakończy się pomyślnie.
|
|
sku
|
True
|
Sku
|
Required. Pobiera lub ustawia nazwę SKU.
|
|
extendedLocation
|
|
ExtendedLocation
|
Optional. Ustaw rozszerzoną lokalizację zasobu. Jeśli nie zostanie ustawiona, konto magazynu zostanie utworzone w głównym regionie świadczenia usługi Azure. W przeciwnym razie zostanie utworzony w określonej lokalizacji rozszerzonej
|
|
identity
|
|
Identity
|
Tożsamość zasobu.
|
|
placement
|
|
Placement
|
Optional. Pobiera lub ustawia szczegóły umieszczania strefowego dla konta magazynu.
|
|
properties.accessTier
|
|
AccessTier
|
Wymagane dla kont magazynu, gdzie rodzaj = BlobStorage. Warstwa dostępu jest używana do rozliczeń. Warstwa dostępu "Premium" jest wartością domyślną dla typu konta magazynu blokowych obiektów blob w warstwie Premium i nie można jej zmienić dla typu konta magazynu blokowych obiektów blob w warstwie Premium.
|
|
properties.allowBlobPublicAccess
|
|
boolean
|
Zezwalaj lub nie zezwalaj na publiczny dostęp do wszystkich obiektów blob lub kontenerów na koncie magazynu. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantDelegationSas
|
|
boolean
|
Zezwalaj lub zakazuj delegacji użytkowników użytkowników między AAD (SAS (sygnatura współdzielonego dostępu). Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantReplication
|
|
boolean
|
Zezwalaj na replikację obiektów dzierżawy usługi AAD lub nie zezwalaj na nie. Ustaw tę właściwość na wartość true dla nowych lub istniejących kont tylko wtedy, gdy zasady replikacji obiektów będą obejmować konta magazynu w różnych dzierżawach usługi AAD. Domyślna interpretacja jest fałszywa dla nowych kont, aby domyślnie przestrzegać najlepszych rozwiązań w zakresie zabezpieczeń.
|
|
properties.allowSharedKeyAccess
|
|
boolean
|
Wskazuje, czy konto magazynu zezwala na autoryzację żądań przy użyciu klucza dostępu do konta za pośrednictwem klucza współużytkowanego. Jeśli wartość false, wszystkie żądania, w tym sygnatury dostępu współdzielonego, muszą być autoryzowane za pomocą usługi Azure Active Directory (Azure AD). Wartość domyślna to null, która jest równoważna wartości true.
|
|
properties.allowSharedKeyAccessForServices
|
|
StorageAccountSharedKeyAccessProperties
|
Wskazywanie właściwości dostępu do klucza współdzielonego na poziomie usług
|
|
properties.allowedCopyScope
|
|
AllowedCopyScope
|
Ogranicz kopiowanie do i z kont magazynu w dzierżawie usługi AAD lub za pomocą linków prywatnych do tej samej sieci wirtualnej.
|
|
properties.azureFilesIdentityBasedAuthentication
|
|
AzureFilesIdentityBasedAuthentication
|
Udostępnia ustawienia uwierzytelniania opartego na tożsamościach dla usługi Azure Files.
|
|
properties.customDomain
|
|
CustomDomain
|
Domena użytkownika przypisana do konta magazynu. Nazwa to źródło CNAME. Obecnie na konto magazynu jest obsługiwana tylko jedna domena niestandardowa. Aby wyczyścić istniejącą domenę niestandardową, użyj pustego ciągu dla właściwości niestandardowej nazwy domeny.
|
|
properties.dataCollaborationPolicyProperties
|
|
StorageDataCollaborationPolicyProperties
|
Polityka Data Collaboration dla konta magazynowego.
|
|
properties.defaultToOAuthAuthentication
|
|
boolean
|
Flaga logiczna wskazująca, czy domyślne uwierzytelnianie to OAuth, czy nie. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.dnsEndpointType
|
|
DnsEndpointType
|
Umożliwia określenie typu punktu końcowego. Ustaw tę wartość na wartość AzureDNSZone, aby utworzyć dużą liczbę kont w jednej subskrypcji, która tworzy konta w strefie DNS platformy Azure, a adres URL punktu końcowego będzie miał alfanumeryczny identyfikator strefy DNS.
|
|
properties.dualStackEndpointPreference
|
|
DualStackEndpointPreference
|
Przechowuje informacje o protokole internetowym wybranym przez użytkownika.
|
|
properties.enableExtendedGroups
|
|
boolean
|
Włącza rozszerzoną obsługę grup z funkcją użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.encryption
|
|
Encryption
|
Ustawienia szyfrowania do użycia na potrzeby szyfrowania po stronie serwera dla konta magazynu.
|
|
properties.geoPriorityReplicationStatus
|
|
GeoPriorityReplicationStatus
|
Stan wskazujący, czy dla konta jest włączona replikacja z priorytetem geograficznym.
|
|
properties.immutableStorageWithVersioning
|
|
ImmutableStorageAccount
|
Właściwość jest niezmienna i może być ustawiona tylko na wartość true w czasie tworzenia konta. Po ustawieniu wartości true włącza niezmienność na poziomie obiektu dla wszystkich nowych kontenerów na koncie domyślnie.
|
|
properties.isHnsEnabled
|
|
boolean
|
Ustawienie HierarchicalNamespace konta jest włączone, jeśli ustawiono wartość true.
|
|
properties.isLocalUserEnabled
|
|
boolean
|
Włącza funkcję użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.isNfsV3Enabled
|
|
boolean
|
Obsługa protokołu NFS 3.0 jest włączona, jeśli ustawiono wartość true.
|
|
properties.isSftpEnabled
|
|
boolean
|
Włącza protokół bezpiecznego transferu plików, jeśli jest ustawiony na wartość true
|
|
properties.keyPolicy
|
|
KeyPolicy
|
KeyPolicy przypisana do konta magazynu.
|
|
properties.largeFileSharesState
|
|
LargeFileSharesState
|
Zezwalaj na duże udziały plików, jeśli zestawy mają wartość Włączone. Nie można go wyłączyć po jej włączeniu.
|
|
properties.minimumTlsVersion
|
|
MinimumTlsVersion
|
Ustaw minimalną wersję protokołu TLS, która ma być dozwolona dla żądań do magazynu. Domyślna interpretacja to TLS 1.0 dla tej właściwości. Wersja Minimum TLS 1.3 nie jest obsługiwana.
|
|
properties.networkAcls
|
|
NetworkRuleSet
|
Zestaw reguł sieci
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccess
|
Zezwalaj, nie zezwalaj na konfigurację obwodu zabezpieczeń sieci lub zezwalaj na ocenę dostępu sieci publicznej do konta magazynu. Wartość jest opcjonalna, ale jeśli została przekazana, musi mieć wartość "Włączone", "Wyłączone" lub "SecuredByPerimeter".
|
|
properties.routingPreference
|
|
RoutingPreference
|
Utrzymuje informacje o wybranym routingu sieciowym wybranym przez użytkownika na potrzeby transferu danych
|
|
properties.sasPolicy
|
|
SasPolicy
|
Sygnatura dostępu współdzielonego przypisana do konta magazynu.
|
|
properties.supportsHttpsTrafficOnly
|
|
boolean
|
Zezwala na ruch https tylko do usługi magazynu, jeśli ustawiono wartość true. Wartość domyślna jest prawdziwa od wersji interfejsu API 2019-04-01.
|
|
properties.turboTier
|
|
TurboTier
|
Konfiguruje Turbo Tier dla konta magazynowego.
|
|
tags
|
|
object
|
Pobiera lub ustawia listę par klucz-wartość, które opisują zasób. Te tagi mogą służyć do wyświetlania i grupowania tego zasobu (między grupami zasobów). Dla zasobu można podać maksymalnie 15 tagów. Każdy tag musi mieć klucz o długości nie większej niż 128 znaków i wartości o długości nie większej niż 256 znaków.
|
|
zones
|
|
string[]
|
Optional. Pobiera lub ustawia przypiętą strefę dostępności logicznej dla konta magazynu.
|
Odpowiedzi
| Nazwisko |
Typ |
Opis |
|
200 OK
|
StorageAccount
|
Operacja aktualizacji zasobu "StorageAccount" zakończyła się pomyślnie
|
|
202 Accepted
|
|
Zaakceptowano operację zasobu.
Nagłówki
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Nieoczekiwana odpowiedź na błąd.
|
Zabezpieczenia
azure_auth
Przepływ OAuth2 w usłudze Azure Active Directory.
Typ:
oauth2
Flow:
implicit
Adres URL autoryzacji:
https://login.microsoftonline.com/common/oauth2/authorize
Zakresy
| Nazwisko |
Opis |
|
user_impersonation
|
podszywaj się pod konto użytkownika
|
Przykłady
NfsV3AccountCreate
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"kind": "BlockBlobStorage",
"location": "eastus",
"properties": {
"enableExtendedGroups": true,
"isHnsEnabled": true,
"isNfsV3Enabled": true,
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"
}
]
},
"supportsHttpsTrafficOnly": false
},
"sku": {
"name": "Premium_LRS"
}
}
import com.azure.resourcemanager.storage.models.Bypass;
import com.azure.resourcemanager.storage.models.DefaultAction;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.NetworkRuleSet;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.VirtualNetworkRule;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/NfsV3AccountCreate.json
*/
/**
* Sample code: NfsV3AccountCreate.
*
* @param manager Entry point to StorageManager.
*/
public static void nfsV3AccountCreate(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res9101", "sto4445", new StorageAccountCreateParameters()
.withSku(new Sku().withName(SkuName.PREMIUM_LRS)).withKind(Kind.BLOCK_BLOB_STORAGE).withLocation("eastus")
.withNetworkRuleSet(new NetworkRuleSet().withBypass(Bypass.AZURE_SERVICES)
.withVirtualNetworkRules(Arrays.asList(new VirtualNetworkRule().withVirtualNetworkResourceId(
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12")))
.withIpRules(Arrays.asList()).withDefaultAction(DefaultAction.ALLOW))
.withEnableHttpsTrafficOnly(false).withEnableExtendedGroups(true).withIsHnsEnabled(true)
.withEnableNfsV3(true), com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python nfs_v3_account_create.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"kind": "BlockBlobStorage",
"location": "eastus",
"properties": {
"enableExtendedGroups": True,
"isHnsEnabled": True,
"isNfsV3Enabled": True,
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"
}
],
},
"supportsHttpsTrafficOnly": False,
},
"sku": {"name": "Premium_LRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/NfsV3AccountCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/NfsV3AccountCreate.json
func ExampleAccountsClient_BeginCreate_nfsV3AccountCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindBlockBlobStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
EnableExtendedGroups: to.Ptr(true),
IsHnsEnabled: to.Ptr(true),
EnableNfsV3: to.Ptr(true),
NetworkRuleSet: &armstorage.NetworkRuleSet{
Bypass: to.Ptr(armstorage.BypassAzureServices),
DefaultAction: to.Ptr(armstorage.DefaultActionAllow),
IPRules: []*armstorage.IPRule{},
VirtualNetworkRules: []*armstorage.VirtualNetworkRule{
{
VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"),
},
},
},
EnableHTTPSTrafficOnly: to.Ptr(false),
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNamePremiumLRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindBlockBlobStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// EnableExtendedGroups: to.Ptr(true),
// IsHnsEnabled: to.Ptr(true),
// EnableNfsV3: to.Ptr(true),
// NetworkRuleSet: &armstorage.NetworkRuleSet{
// Bypass: to.Ptr(armstorage.BypassAzureServices),
// DefaultAction: to.Ptr(armstorage.DefaultActionAllow),
// IPRules: []*armstorage.IPRule{
// },
// VirtualNetworkRules: []*armstorage.VirtualNetworkRule{
// {
// VirtualNetworkResourceID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"),
// },
// },
// },
// EnableHTTPSTrafficOnly: to.Ptr(false),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNamePremiumLRS),
// Tier: to.Ptr(armstorage.SKUTierPremium),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/NfsV3AccountCreate.json
*/
async function nfsV3AccountCreate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
kind: "BlockBlobStorage",
location: "eastus",
enableExtendedGroups: true,
isHnsEnabled: true,
enableNfsV3: true,
networkRuleSet: {
bypass: "AzureServices",
defaultAction: "Allow",
ipRules: [],
virtualNetworkRules: [
{
virtualNetworkResourceId:
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12",
},
],
},
enableHttpsTrafficOnly: false,
sku: { name: "Premium_LRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "BlockBlobStorage",
"location": "eastus",
"properties": {
"enableExtendedGroups": true,
"isHnsEnabled": true,
"isNfsV3Enabled": true,
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12"
}
]
},
"supportsHttpsTrafficOnly": false
},
"sku": {
"name": "Premium_LRS",
"tier": "Premium"
}
}
StorageAccountCreate
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/a3f7c2b9-4e1d-4c8a-9d6f-8b2a5e41c7f3/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59",
"requireUserBoundUserDelegationSas": true,
"requireUserBoundUserDelegationSasAction": "Block"
},
"geoPriorityReplicationStatus": {
"isBlobEnabled": true
},
"allowSharedKeyAccessForServices": {
"blob": {
"enabled": true
},
"file": {
"enabled": false
},
"queue": {
"enabled": true
},
"table": {
"enabled": false
}
},
"allowCrossTenantDelegationSas": false
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.GeoPriorityReplicationStatus;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.PolicyViolationAction;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.ServiceSharedKeyAccessProperties;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.StorageAccountSharedKeyAccessProperties;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreate.json
*/
/**
* Sample code: StorageAccountCreate.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreate(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod("1.15:59:59").withExpirationAction(ExpirationAction.LOG)
.withRequireUserBoundUserDelegationSas(true).withRequireUserBoundUserDelegationSasAction(
PolicyViolationAction.BLOCK))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false)
.withGeoPriorityReplicationStatus(new GeoPriorityReplicationStatus().withIsBlobEnabled(true))
.withAllowSharedKeyAccessForServices(new StorageAccountSharedKeyAccessProperties()
.withBlob(new ServiceSharedKeyAccessProperties().withEnabled(true))
.withFile(new ServiceSharedKeyAccessProperties().withEnabled(false))
.withTable(new ServiceSharedKeyAccessProperties().withEnabled(false))
.withQueue(new ServiceSharedKeyAccessProperties().withEnabled(true)))
.withAllowCrossTenantDelegationSas(false),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowCrossTenantDelegationSas": False,
"allowSharedKeyAccess": True,
"allowSharedKeyAccessForServices": {
"blob": {"enabled": True},
"file": {"enabled": False},
"queue": {"enabled": True},
"table": {"enabled": False},
},
"defaultToOAuthAuthentication": False,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"geoPriorityReplicationStatus": {"isBlobEnabled": True},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {
"expirationAction": "Log",
"requireUserBoundUserDelegationSas": True,
"requireUserBoundUserDelegationSasAction": "Block",
"sasExpirationPeriod": "1.15:59:59",
},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreate.json
func ExampleAccountsClient_BeginCreate_storageAccountCreate() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("a3f7c2b9-4e1d-4c8a-9d6f-8b2a5e41c7f3", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
RequireUserBoundUserDelegationSas: to.Ptr(true),
RequireUserBoundUserDelegationSasAction: to.Ptr(armstorage.PolicyViolationActionBlock),
},
GeoPriorityReplicationStatus: &armstorage.GeoPriorityReplicationStatus{
IsBlobEnabled: to.Ptr(true),
},
AllowSharedKeyAccessForServices: &armstorage.AccountSharedKeyAccessProperties{
Blob: &armstorage.ServiceSharedKeyAccessProperties{
Enabled: to.Ptr(true),
},
File: &armstorage.ServiceSharedKeyAccessProperties{
Enabled: to.Ptr(false),
},
Queue: &armstorage.ServiceSharedKeyAccessProperties{
Enabled: to.Ptr(true),
},
Table: &armstorage.ServiceSharedKeyAccessProperties{
Enabled: to.Ptr(false),
},
},
AllowCrossTenantDelegationSas: to.Ptr(false),
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// RequireUserBoundUserDelegationSas: to.Ptr(true),
// RequireUserBoundUserDelegationSasAction: to.Ptr(armstorage.PolicyViolationActionBlock),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// GeoPriorityReplicationStatus: &armstorage.GeoPriorityReplicationStatus{
// IsBlobEnabled: to.Ptr(true),
// },
// AllowSharedKeyAccessForServices: &armstorage.AccountSharedKeyAccessProperties{
// Blob: &armstorage.ServiceSharedKeyAccessProperties{
// Enabled: to.Ptr(true),
// },
// File: &armstorage.ServiceSharedKeyAccessProperties{
// Enabled: to.Ptr(false),
// },
// Queue: &armstorage.ServiceSharedKeyAccessProperties{
// Enabled: to.Ptr(true),
// },
// Table: &armstorage.ServiceSharedKeyAccessProperties{
// Enabled: to.Ptr(false),
// },
// },
// AllowCrossTenantDelegationSas: to.Ptr(false),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreate.json
*/
async function storageAccountCreate() {
const credential = new DefaultAzureCredential();
const subscriptionId = "a3f7c2b9-4e1d-4c8a-9d6f-8b2a5e41c7f3";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: {
expirationAction: "Log",
sasExpirationPeriod: "1.15:59:59",
requireUserBoundUserDelegationSas: true,
requireUserBoundUserDelegationSasAction: "Block",
},
geoPriorityReplicationStatus: { isBlobEnabled: true },
allowSharedKeyAccessForServices: {
blob: { enabled: true },
file: { enabled: false },
queue: { enabled: true },
table: { enabled: false },
},
allowCrossTenantDelegationSas: false,
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59",
"requireUserBoundUserDelegationSas": true,
"requireUserBoundUserDelegationSasAction": "Block"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true,
"geoPriorityReplicationStatus": {
"isBlobEnabled": true
},
"allowSharedKeyAccessForServices": {
"blob": {
"enabled": true
},
"file": {
"enabled": false
},
"queue": {
"enabled": true
},
"table": {
"enabled": false
}
},
"allowCrossTenantDelegationSas": false
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreate_placement
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"placement": {
"zonePlacementPolicy": "Any"
},
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.Placement;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.ZonePlacementPolicy;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreate_placement.json
*/
/**
* Sample code: StorageAccountCreate_placement.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreatePlacement(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withPlacement(new Placement().withZonePlacementPolicy(ZonePlacementPolicy.ANY))
.withTags(
mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_placement.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"placement": {"zonePlacementPolicy": "Any"},
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"defaultToOAuthAuthentication": False,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreate_placement.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreate_placement.json
func ExampleAccountsClient_BeginCreate_storageAccountCreatePlacement() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Placement: &armstorage.Placement{
ZonePlacementPolicy: to.Ptr(armstorage.ZonePlacementPolicyAny),
},
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Placement: &armstorage.Placement{
// ZonePlacementPolicy: to.Ptr(armstorage.ZonePlacementPolicyAny),
// },
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreate_placement.json
*/
async function storageAccountCreatePlacement() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
placement: { zonePlacementPolicy: "Any" },
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"placement": {
"zonePlacementPolicy": "Any"
},
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"zones": [
"1"
]
}
StorageAccountCreate_zones
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"zones": [
"1"
]
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreate_zones.json
*/
/**
* Sample code: StorageAccountCreate_zones.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreateZones(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withZones(Arrays.asList("1"))
.withTags(
mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_zones.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"defaultToOAuthAuthentication": False,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
"zones": ["1"],
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreate_zones.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreate_zones.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateZones() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
Zones: []*string{
to.Ptr("1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreate_zones.json
*/
async function storageAccountCreateZones() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
zones: ["1"],
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
},
"zones": [
"1"
]
}
StorageAccountCreateAllowedCopyScopeToAAD
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"allowedCopyScope": "AAD",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.AllowedCopyScope;
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToAAD.json
*/
/**
* Sample code: StorageAccountCreateAllowedCopyScopeToAAD.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateAllowedCopyScopeToAAD(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withAllowedCopyScope(
AllowedCopyScope.AAD)
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_allowed_copy_scope_to_aad.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"allowedCopyScope": "AAD",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToAAD.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateAllowedCopyScopeToAAD.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToAad() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopeAAD),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToAAD.json
*/
async function storageAccountCreateAllowedCopyScopeToAAD() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
allowedCopyScope: "AAD",
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"allowedCopyScope": "AAD",
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateAllowedCopyScopeToPrivateLink
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"allowedCopyScope": "PrivateLink",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.AllowedCopyScope;
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json
*/
/**
* Sample code: StorageAccountCreateAllowedCopyScopeToPrivateLink.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateAllowedCopyScopeToPrivateLink(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withAllowedCopyScope(
AllowedCopyScope.PRIVATE_LINK)
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_allowed_copy_scope_to_private_link.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"allowedCopyScope": "PrivateLink",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateAllowedCopyScopeToPrivateLink() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// AllowedCopyScope: to.Ptr(armstorage.AllowedCopyScopePrivateLink),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateAllowedCopyScopeToPrivateLink.json
*/
async function storageAccountCreateAllowedCopyScopeToPrivateLink() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
allowedCopyScope: "PrivateLink",
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"allowedCopyScope": "PrivateLink",
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateDisallowPublicNetworkAccess
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"publicNetworkAccess": "Disabled",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.PublicNetworkAccess;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateDisallowPublicNetworkAccess.json
*/
/**
* Sample code: StorageAccountCreateDisallowPublicNetworkAccess.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateDisallowPublicNetworkAccess(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withPublicNetworkAccess(
PublicNetworkAccess.DISABLED)
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_disallow_public_network_access.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"publicNetworkAccess": "Disabled",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateDisallowPublicNetworkAccess.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateDisallowPublicNetworkAccess.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateDisallowPublicNetworkAccess() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessDisabled),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateDisallowPublicNetworkAccess.json
*/
async function storageAccountCreateDisallowPublicNetworkAccess() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
publicNetworkAccess: "Disabled",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"publicNetworkAccess": "Disabled",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateDnsEndpointTypeToAzureDnsZone
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"dnsEndpointType": "AzureDnsZone",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.DnsEndpointType;
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json
*/
/**
* Sample code: StorageAccountCreateDnsEndpointTypeToAzureDnsZone.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateDnsEndpointTypeToAzureDnsZone(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(
mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false)
.withDnsEndpointType(DnsEndpointType.AZURE_DNS_ZONE),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_dns_endpoint_type_to_azure_dns_zone.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"defaultToOAuthAuthentication": False,
"dnsEndpointType": "AzureDnsZone",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToAzureDnsZone() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeAzureDNSZone),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.z24.blob.storage.azure.net/"),
// Dfs: to.Ptr("https://sto4445.z24.dfs.storage.azure.net/"),
// File: to.Ptr("https://sto4445.z24.file.storage.azure.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.z24.blob.storage.azure.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.z24.dfs.storage.azure.net/"),
// File: to.Ptr("https://sto4445-internetrouting.z24.file.storage.azure.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.z24.web.storage.azure.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.z24.blob.storage.azure.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.z24.file.storage.azure.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.z24.queue.storage.azure.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.z24.table.storage.azure.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.z24.web.storage.azure.net/"),
// },
// Queue: to.Ptr("https://sto4445.z24.queue.storage.azure.net/"),
// Table: to.Ptr("https://sto4445.z24.table.storage.azure.net/"),
// Web: to.Ptr("https://sto4445.z24.web.storage.azure.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json
*/
async function storageAccountCreateDnsEndpointTypeToAzureDnsZone() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
dnsEndpointType: "AzureDnsZone",
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"dnsEndpointType": "AzureDnsZone",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.z24.blob.storage.azure.net/",
"dfs": "https://sto4445.z24.dfs.storage.azure.net/",
"file": "https://sto4445.z24.file.storage.azure.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.z24.blob.storage.azure.net/",
"dfs": "https://sto4445-internetrouting.z24.dfs.storage.azure.net/",
"file": "https://sto4445-internetrouting.z24.file.storage.azure.net/",
"web": "https://sto4445-internetrouting.z24.web.storage.azure.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.z24.blob.storage.azure.net/",
"dfs": "https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/",
"file": "https://sto4445-microsoftrouting.z24.file.storage.azure.net/",
"queue": "https://sto4445-microsoftrouting.z24.queue.storage.azure.net/",
"table": "https://sto4445-microsoftrouting.z24.table.storage.azure.net/",
"web": "https://sto4445-microsoftrouting.z24.web.storage.azure.net/"
},
"queue": "https://sto4445.z24.queue.storage.azure.net/",
"table": "https://sto4445.z24.table.storage.azure.net/",
"web": "https://sto4445.z24.web.storage.azure.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateDnsEndpointTypeToStandard
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"dnsEndpointType": "Standard",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.DnsEndpointType;
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToStandard.json
*/
/**
* Sample code: StorageAccountCreateDnsEndpointTypeToStandard.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateDnsEndpointTypeToStandard(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(
mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false)
.withDnsEndpointType(DnsEndpointType.STANDARD),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_dns_endpoint_type_to_standard.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"defaultToOAuthAuthentication": False,
"dnsEndpointType": "Standard",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToStandard.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateDnsEndpointTypeToStandard.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateDnsEndpointTypeToStandard() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// DNSEndpointType: to.Ptr(armstorage.DNSEndpointTypeStandard),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateDnsEndpointTypeToStandard.json
*/
async function storageAccountCreateDnsEndpointTypeToStandard() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
dnsEndpointType: "Standard",
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"dnsEndpointType": "Standard",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateEnablePublicNetworkAccess
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"publicNetworkAccess": "Enabled",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.PublicNetworkAccess;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateEnablePublicNetworkAccess.json
*/
/**
* Sample code: StorageAccountCreateEnablePublicNetworkAccess.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateEnablePublicNetworkAccess(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withPublicNetworkAccess(
PublicNetworkAccess.ENABLED)
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_enable_public_network_access.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"isHnsEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"publicNetworkAccess": "Enabled",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateEnablePublicNetworkAccess.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateEnablePublicNetworkAccess.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateEnablePublicNetworkAccess() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// PublicNetworkAccess: to.Ptr(armstorage.PublicNetworkAccessEnabled),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateEnablePublicNetworkAccess.json
*/
async function storageAccountCreateEnablePublicNetworkAccess() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
publicNetworkAccess: "Enabled",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"publicNetworkAccess": "Enabled",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreatePremiumBlockBlobStorage
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"kind": "BlockBlobStorage",
"location": "eastus",
"properties": {
"allowSharedKeyAccess": true,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"minimumTlsVersion": "TLS1_2"
},
"sku": {
"name": "Premium_LRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreatePremiumBlockBlobStorage.json
*/
/**
* Sample code: StorageAccountCreatePremiumBlockBlobStorage.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreatePremiumBlockBlobStorage(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.PREMIUM_LRS))
.withKind(Kind.BLOCK_BLOB_STORAGE).withLocation("eastus")
.withTags(mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withMinimumTlsVersion(MinimumTlsVersion.TLS1_2).withAllowSharedKeyAccess(true),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_premium_block_blob_storage.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"kind": "BlockBlobStorage",
"location": "eastus",
"properties": {
"allowSharedKeyAccess": True,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"minimumTlsVersion": "TLS1_2",
},
"sku": {"name": "Premium_LRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreatePremiumBlockBlobStorage.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreatePremiumBlockBlobStorage.json
func ExampleAccountsClient_BeginCreate_storageAccountCreatePremiumBlockBlobStorage() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindBlockBlobStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AllowSharedKeyAccess: to.Ptr(true),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNamePremiumLRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AccessTier: to.Ptr(armstorage.AccessTierPremium),
// AllowBlobPublicAccess: to.Ptr(false),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNamePremiumLRS),
// Tier: to.Ptr(armstorage.SKUTierPremium),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreatePremiumBlockBlobStorage.json
*/
async function storageAccountCreatePremiumBlockBlobStorage() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
kind: "BlockBlobStorage",
location: "eastus",
allowSharedKeyAccess: true,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
minimumTlsVersion: "TLS1_2",
sku: { name: "Premium_LRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"accessTier": "Premium",
"allowBlobPublicAccess": false,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Premium_LRS",
"tier": "Premium"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateUserAssignedEncryptionIdentityWithCMK
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}
}
},
"kind": "Storage",
"location": "eastus",
"properties": {
"encryption": {
"identity": {
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": ""
},
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
}
},
"sku": {
"name": "Standard_LRS"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionIdentity;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.Identity;
import com.azure.resourcemanager.storage.models.IdentityType;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.KeyVaultProperties;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json
*/
/**
* Sample code: StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreateUserAssignedEncryptionIdentityWithCMK(
com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res9101", "sto4445", new StorageAccountCreateParameters()
.withSku(new Sku().withName(SkuName.STANDARD_LRS)).withKind(Kind.STORAGE).withLocation("eastus")
.withIdentity(new Identity().withType(IdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf(
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}",
new UserAssignedIdentity())))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_KEYVAULT)
.withKeyVaultProperties(new KeyVaultProperties().withKeyName("fakeTokenPlaceholder")
.withKeyVersion("fakeTokenPlaceholder").withKeyVaultUri("fakeTokenPlaceholder"))
.withEncryptionIdentity(new EncryptionIdentity().withEncryptionUserAssignedIdentity(
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"))),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_user_assigned_encryption_identity_with_cmk.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}
},
},
"kind": "Storage",
"location": "eastus",
"properties": {
"encryption": {
"identity": {
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": "",
},
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
}
},
"sku": {"name": "Standard_LRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedEncryptionIdentityWithCmk() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Identity: &armstorage.Identity{
Type: to.Ptr(armstorage.IdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {},
},
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
Encryption: &armstorage.Encryption{
EncryptionIdentity: &armstorage.EncryptionIdentity{
EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"),
},
KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault),
KeyVaultProperties: &armstorage.KeyVaultProperties{
KeyName: to.Ptr("wrappingKey"),
KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"),
KeyVersion: to.Ptr(""),
},
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardLRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Identity: &armstorage.Identity{
// Type: to.Ptr(armstorage.IdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{
// "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{
// ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"),
// PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"),
// },
// },
// },
// Kind: to.Ptr(armstorage.KindStorageV2),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AccessTier: to.Ptr(armstorage.AccessTierHot),
// CreationTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 83909300, time.UTC)),
// Encryption: &armstorage.Encryption{
// EncryptionIdentity: &armstorage.EncryptionIdentity{
// EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"),
// },
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault),
// KeyVaultProperties: &armstorage.KeyVaultProperties{
// CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"),
// KeyName: to.Ptr("wrappingKey"),
// KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"),
// KeyVersion: to.Ptr(""),
// LastKeyRotationTimestamp: to.Ptr(time.Date(2019, time.December, 13, 20, 36, 23, 702329000, time.UTC)),
// },
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 173958700, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 173958700, time.UTC)),
// },
// },
// },
// NetworkRuleSet: &armstorage.NetworkRuleSet{
// Bypass: to.Ptr(armstorage.BypassAzureServices),
// DefaultAction: to.Ptr(armstorage.DefaultActionAllow),
// IPRules: []*armstorage.IPRule{
// },
// VirtualNetworkRules: []*armstorage.VirtualNetworkRule{
// },
// },
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus"),
// PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardLRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedEncryptionIdentityWithCMK.json
*/
async function storageAccountCreateUserAssignedEncryptionIdentityWithCMK() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}":
{},
},
},
kind: "Storage",
location: "eastus",
encryption: {
encryptionIdentity: {
encryptionUserAssignedIdentity:
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}",
},
keySource: "Microsoft.Keyvault",
keyVaultProperties: {
keyName: "wrappingKey",
keyVaultUri: "https://myvault8569.vault.azure.net",
keyVersion: "",
},
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
sku: { name: "Standard_LRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {
"clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5",
"principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7"
}
}
},
"kind": "StorageV2",
"location": "eastus",
"properties": {
"accessTier": "Hot",
"creationTime": "2020-12-15T00:43:14.0839093Z",
"encryption": {
"identity": {
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad",
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": "",
"lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z"
},
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2020-12-15T00:43:14.1739587Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2020-12-15T00:43:14.1739587Z"
}
}
},
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": []
},
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus",
"privateEndpointConnections": [],
"provisioningState": "Succeeded",
"statusOfPrimary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"tags": {}
}
StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res131918/providers/Microsoft.Storage/storageAccounts/sto131918?api-version=2026-09-01
{
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}
}
},
"kind": "Storage",
"location": "eastus",
"properties": {
"encryption": {
"identity": {
"federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540",
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": ""
},
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
}
},
"sku": {
"name": "Standard_LRS"
}
}
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionIdentity;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.Identity;
import com.azure.resourcemanager.storage.models.IdentityType;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.KeyVaultProperties;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json
*/
/**
* Sample code: StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId(
com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res131918", "sto131918",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_LRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withIdentity(new Identity().withType(IdentityType.USER_ASSIGNED).withUserAssignedIdentities(mapOf(
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}",
new UserAssignedIdentity())))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_KEYVAULT)
.withKeyVaultProperties(new KeyVaultProperties().withKeyName("fakeTokenPlaceholder")
.withKeyVersion("fakeTokenPlaceholder").withKeyVaultUri("fakeTokenPlaceholder"))
.withEncryptionIdentity(new EncryptionIdentity().withEncryptionUserAssignedIdentity(
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}")
.withEncryptionFederatedIdentityClientId("f83c6b1b-4d34-47e4-bb34-9d83df58b540"))),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_user_assigned_identity_with_federated_identity_client_id.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.storage_accounts.begin_create(
resource_group_name="res131918",
account_name="sto131918",
parameters={
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {}
},
},
"kind": "Storage",
"location": "eastus",
"properties": {
"encryption": {
"identity": {
"federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540",
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}",
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": "",
},
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
}
},
"sku": {"name": "Standard_LRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res131918", "sto131918", armstorage.AccountCreateParameters{
Identity: &armstorage.Identity{
Type: to.Ptr(armstorage.IdentityTypeUserAssigned),
UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {},
},
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
Encryption: &armstorage.Encryption{
EncryptionIdentity: &armstorage.EncryptionIdentity{
EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"),
EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"),
},
KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault),
KeyVaultProperties: &armstorage.KeyVaultProperties{
KeyName: to.Ptr("wrappingKey"),
KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"),
KeyVersion: to.Ptr(""),
},
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardLRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Identity: &armstorage.Identity{
// Type: to.Ptr(armstorage.IdentityTypeUserAssigned),
// UserAssignedIdentities: map[string]*armstorage.UserAssignedIdentity{
// "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": &armstorage.UserAssignedIdentity{
// ClientID: to.Ptr("fbaa6278-1ecc-415c-819f-6e2058d3acb5"),
// PrincipalID: to.Ptr("8d823284-1060-42a5-9ec4-ed3d831e24d7"),
// },
// },
// },
// Kind: to.Ptr(armstorage.KindStorageV2),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AccessTier: to.Ptr(armstorage.AccessTierHot),
// CreationTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 83909300, time.UTC)),
// Encryption: &armstorage.Encryption{
// EncryptionIdentity: &armstorage.EncryptionIdentity{
// EncryptionFederatedIdentityClientID: to.Ptr("f83c6b1b-4d34-47e4-bb34-9d83df58b540"),
// EncryptionUserAssignedIdentity: to.Ptr("/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"),
// },
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftKeyvault),
// KeyVaultProperties: &armstorage.KeyVaultProperties{
// CurrentVersionedKeyIdentifier: to.Ptr("https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad"),
// KeyName: to.Ptr("wrappingKey"),
// KeyVaultURI: to.Ptr("https://myvault8569.vault.azure.net"),
// KeyVersion: to.Ptr(""),
// LastKeyRotationTimestamp: to.Ptr(time.Date(2019, time.December, 13, 20, 36, 23, 702329000, time.UTC)),
// },
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 173958700, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2020, time.December, 15, 0, 43, 14, 173958700, time.UTC)),
// },
// },
// },
// NetworkRuleSet: &armstorage.NetworkRuleSet{
// Bypass: to.Ptr(armstorage.BypassAzureServices),
// DefaultAction: to.Ptr(armstorage.DefaultActionAllow),
// IPRules: []*armstorage.IPRule{
// },
// VirtualNetworkRules: []*armstorage.VirtualNetworkRule{
// },
// },
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus"),
// PrivateEndpointConnections: []*armstorage.PrivateEndpointConnection{
// },
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardLRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json
*/
async function storageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res131918", "sto131918", {
identity: {
type: "UserAssigned",
userAssignedIdentities: {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}":
{},
},
},
kind: "Storage",
location: "eastus",
encryption: {
encryptionIdentity: {
encryptionFederatedIdentityClientId: "f83c6b1b-4d34-47e4-bb34-9d83df58b540",
encryptionUserAssignedIdentity:
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}",
},
keySource: "Microsoft.Keyvault",
keyVaultProperties: {
keyName: "wrappingKey",
keyVaultUri: "https://myvault8569.vault.azure.net",
keyVersion: "",
},
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
sku: { name: "Standard_LRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {
"clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5",
"principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7"
}
}
},
"kind": "StorageV2",
"location": "eastus",
"properties": {
"accessTier": "Hot",
"creationTime": "2020-12-15T00:43:14.0839093Z",
"encryption": {
"identity": {
"federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540",
"userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}"
},
"keySource": "Microsoft.Keyvault",
"keyvaultproperties": {
"currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad",
"keyname": "wrappingKey",
"keyvaulturi": "https://myvault8569.vault.azure.net",
"keyversion": "",
"lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z"
},
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2020-12-15T00:43:14.1739587Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2020-12-15T00:43:14.1739587Z"
}
}
},
"networkAcls": {
"bypass": "AzureServices",
"defaultAction": "Allow",
"ipRules": [],
"virtualNetworkRules": []
},
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus",
"privateEndpointConnections": [],
"provisioningState": "Succeeded",
"statusOfPrimary": "available",
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"tags": {}
}
StorageAccountCreateWithDataCollaborationPolicy
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"kind": "Storage",
"location": "eastus",
"properties": {
"dataCollaborationPolicyProperties": {
"allowStorageConnectors": true,
"allowStorageDataShares": true,
"allowCrossTenantDataSharing": false
}
},
"sku": {
"name": "Standard_GRS"
}
}
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.StorageDataCollaborationPolicyProperties;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithDataCollaborationPolicy.json
*/
/**
* Sample code: StorageAccountCreateWithDataCollaborationPolicy.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateWithDataCollaborationPolicy(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus").withDataCollaborationPolicyProperties(
new StorageDataCollaborationPolicyProperties().withAllowStorageConnectors(true)
.withAllowStorageDataShares(true).withAllowCrossTenantDataSharing(false)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_with_data_collaboration_policy.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"kind": "Storage",
"location": "eastus",
"properties": {
"dataCollaborationPolicyProperties": {
"allowCrossTenantDataSharing": False,
"allowStorageConnectors": True,
"allowStorageDataShares": True,
}
},
"sku": {"name": "Standard_GRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateWithDataCollaborationPolicy.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateWithDataCollaborationPolicy.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateWithDataCollaborationPolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
DataCollaborationPolicyProperties: &armstorage.DataCollaborationPolicyProperties{
AllowStorageConnectors: to.Ptr(true),
AllowStorageDataShares: to.Ptr(true),
AllowCrossTenantDataSharing: to.Ptr(false),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// DataCollaborationPolicyProperties: &armstorage.DataCollaborationPolicyProperties{
// AllowStorageConnectors: to.Ptr(true),
// AllowStorageDataShares: to.Ptr(true),
// AllowCrossTenantDataSharing: to.Ptr(false),
// },
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithDataCollaborationPolicy.json
*/
async function storageAccountCreateWithDataCollaborationPolicy() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
kind: "Storage",
location: "eastus",
dataCollaborationPolicyProperties: {
allowStorageConnectors: true,
allowStorageDataShares: true,
allowCrossTenantDataSharing: false,
},
sku: { name: "Standard_GRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"creationTime": "2017-05-24T13:25:33.4863236Z",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"dataCollaborationPolicyProperties": {
"allowStorageConnectors": true,
"allowStorageDataShares": true,
"allowCrossTenantDataSharing": false
}
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
}
}
StorageAccountCreateWithImmutabilityPolicy
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"immutableStorageWithVersioning": {
"enabled": true,
"immutabilityPolicy": {
"allowProtectedAppendWrites": true,
"immutabilityPeriodSinceCreationInDays": 15,
"state": "Unlocked"
}
}
},
"sku": {
"name": "Standard_GRS"
}
}
import com.azure.resourcemanager.storage.models.AccountImmutabilityPolicyProperties;
import com.azure.resourcemanager.storage.models.AccountImmutabilityPolicyState;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.ImmutableStorageAccount;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithImmutabilityPolicy.json
*/
/**
* Sample code: StorageAccountCreateWithImmutabilityPolicy.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateWithImmutabilityPolicy(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withImmutableStorageWithVersioning(new ImmutableStorageAccount().withEnabled(true)
.withImmutabilityPolicy(new AccountImmutabilityPolicyProperties()
.withImmutabilityPeriodSinceCreationInDays(15)
.withState(AccountImmutabilityPolicyState.UNLOCKED).withAllowProtectedAppendWrites(true))),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_with_immutability_policy.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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"immutableStorageWithVersioning": {
"enabled": True,
"immutabilityPolicy": {
"allowProtectedAppendWrites": True,
"immutabilityPeriodSinceCreationInDays": 15,
"state": "Unlocked",
},
}
},
"sku": {"name": "Standard_GRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateWithImmutabilityPolicy.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateWithImmutabilityPolicy.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateWithImmutabilityPolicy() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{
Enabled: to.Ptr(true),
ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{
AllowProtectedAppendWrites: to.Ptr(true),
ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15),
State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked),
},
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// ImmutableStorageWithVersioning: &armstorage.ImmutableStorageAccount{
// Enabled: to.Ptr(true),
// ImmutabilityPolicy: &armstorage.AccountImmutabilityPolicyProperties{
// AllowProtectedAppendWrites: to.Ptr(true),
// ImmutabilityPeriodSinceCreationInDays: to.Ptr[int32](15),
// State: to.Ptr(armstorage.AccountImmutabilityPolicyStateUnlocked),
// },
// },
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithImmutabilityPolicy.json
*/
async function storageAccountCreateWithImmutabilityPolicy() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
immutableStorageWithVersioning: {
enabled: true,
immutabilityPolicy: {
allowProtectedAppendWrites: true,
immutabilityPeriodSinceCreationInDays: 15,
state: "Unlocked",
},
},
sku: { name: "Standard_GRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"creationTime": "2017-05-24T13:25:33.4863236Z",
"immutableStorageWithVersioning": {
"enabled": true,
"immutabilityPolicy": {
"allowProtectedAppendWrites": true,
"immutabilityPeriodSinceCreationInDays": 15,
"state": "Unlocked"
}
},
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded"
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
}
}
StorageAccountCreateWithSmartAccessTier
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445?api-version=2026-09-01
{
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"kind": "Storage",
"location": "eastus",
"properties": {
"accessTier": "Smart",
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"defaultToOAuthAuthentication": false,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account"
},
"file": {
"enabled": true,
"keyType": "Account"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"geoPriorityReplicationStatus": {
"isBlobEnabled": true
}
},
"sku": {
"name": "Standard_GRS"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
import com.azure.resourcemanager.storage.models.AccessTier;
import com.azure.resourcemanager.storage.models.Encryption;
import com.azure.resourcemanager.storage.models.EncryptionService;
import com.azure.resourcemanager.storage.models.EncryptionServices;
import com.azure.resourcemanager.storage.models.ExpirationAction;
import com.azure.resourcemanager.storage.models.ExtendedLocation;
import com.azure.resourcemanager.storage.models.ExtendedLocationTypes;
import com.azure.resourcemanager.storage.models.GeoPriorityReplicationStatus;
import com.azure.resourcemanager.storage.models.KeyPolicy;
import com.azure.resourcemanager.storage.models.KeySource;
import com.azure.resourcemanager.storage.models.KeyType;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.MinimumTlsVersion;
import com.azure.resourcemanager.storage.models.RoutingChoice;
import com.azure.resourcemanager.storage.models.RoutingPreference;
import com.azure.resourcemanager.storage.models.SasPolicy;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithSmartAccessTier.json
*/
/**
* Sample code: StorageAccountCreateWithSmartAccessTier.
*
* @param manager Entry point to StorageManager.
*/
public static void
storageAccountCreateWithSmartAccessTier(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts()
.create("res9101", "sto4445",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_GRS))
.withKind(Kind.STORAGE).withLocation("eastus")
.withExtendedLocation(
new ExtendedLocation().withName("losangeles001").withType(ExtendedLocationTypes.EDGE_ZONE))
.withTags(
mapOf("key1", "fakeTokenPlaceholder", "key2", "fakeTokenPlaceholder"))
.withSasPolicy(
new SasPolicy().withSasExpirationPeriod(
"1.15:59:59").withExpirationAction(
ExpirationAction.LOG))
.withKeyPolicy(new KeyPolicy().withKeyExpirationPeriodInDays(20))
.withEncryption(new Encryption()
.withServices(new EncryptionServices()
.withBlob(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT))
.withFile(new EncryptionService().withEnabled(true).withKeyType(KeyType.ACCOUNT)))
.withKeySource(KeySource.MICROSOFT_STORAGE).withRequireInfrastructureEncryption(false))
.withAccessTier(AccessTier.SMART).withIsSftpEnabled(true).withIsHnsEnabled(true)
.withRoutingPreference(new RoutingPreference().withRoutingChoice(RoutingChoice.MICROSOFT_ROUTING)
.withPublishMicrosoftEndpoints(true).withPublishInternetEndpoints(true))
.withAllowBlobPublicAccess(false).withMinimumTlsVersion(MinimumTlsVersion.TLS1_2)
.withAllowSharedKeyAccess(true).withDefaultToOAuthAuthentication(false)
.withGeoPriorityReplicationStatus(new GeoPriorityReplicationStatus().withIsBlobEnabled(true)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_with_smart_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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="sto4445",
parameters={
"extendedLocation": {"name": "losangeles001", "type": "EdgeZone"},
"kind": "Storage",
"location": "eastus",
"properties": {
"accessTier": "Smart",
"allowBlobPublicAccess": False,
"allowSharedKeyAccess": True,
"defaultToOAuthAuthentication": False,
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": False,
"services": {
"blob": {"enabled": True, "keyType": "Account"},
"file": {"enabled": True, "keyType": "Account"},
},
},
"geoPriorityReplicationStatus": {"isBlobEnabled": True},
"isHnsEnabled": True,
"isSftpEnabled": True,
"keyPolicy": {"keyExpirationPeriodInDays": 20},
"minimumTlsVersion": "TLS1_2",
"routingPreference": {
"publishInternetEndpoints": True,
"publishMicrosoftEndpoints": True,
"routingChoice": "MicrosoftRouting",
},
"sasPolicy": {"expirationAction": "Log", "sasExpirationPeriod": "1.15:59:59"},
},
"sku": {"name": "Standard_GRS"},
"tags": {"key1": "value1", "key2": "value2"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateWithSmartAccessTier.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateWithSmartAccessTier.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateWithSmartAccessTier() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "sto4445", armstorage.AccountCreateParameters{
ExtendedLocation: &armstorage.ExtendedLocation{
Name: to.Ptr("losangeles001"),
Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
},
Kind: to.Ptr(armstorage.KindStorage),
Location: to.Ptr("eastus"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AccessTier: to.Ptr(armstorage.AccessTierSmart),
AllowBlobPublicAccess: to.Ptr(false),
AllowSharedKeyAccess: to.Ptr(true),
DefaultToOAuthAuthentication: to.Ptr(false),
Encryption: &armstorage.Encryption{
KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
RequireInfrastructureEncryption: to.Ptr(false),
Services: &armstorage.EncryptionServices{
Blob: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
File: &armstorage.EncryptionService{
Enabled: to.Ptr(true),
KeyType: to.Ptr(armstorage.KeyTypeAccount),
},
},
},
IsHnsEnabled: to.Ptr(true),
IsSftpEnabled: to.Ptr(true),
KeyPolicy: &armstorage.KeyPolicy{
KeyExpirationPeriodInDays: to.Ptr[int32](20),
},
MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
RoutingPreference: &armstorage.RoutingPreference{
PublishInternetEndpoints: to.Ptr(true),
PublishMicrosoftEndpoints: to.Ptr(true),
RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
},
SasPolicy: &armstorage.SasPolicy{
ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
SasExpirationPeriod: to.Ptr("1.15:59:59"),
},
GeoPriorityReplicationStatus: &armstorage.GeoPriorityReplicationStatus{
IsBlobEnabled: to.Ptr(true),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardGRS),
},
Tags: map[string]*string{
"key1": to.Ptr("value1"),
"key2": to.Ptr("value2"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// Name: to.Ptr("sto4445"),
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// ExtendedLocation: &armstorage.ExtendedLocation{
// Name: to.Ptr("losangeles001"),
// Type: to.Ptr(armstorage.ExtendedLocationTypesEdgeZone),
// },
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445"),
// Kind: to.Ptr(armstorage.KindStorage),
// Location: to.Ptr("eastus"),
// Properties: &armstorage.AccountProperties{
// AllowBlobPublicAccess: to.Ptr(false),
// AllowSharedKeyAccess: to.Ptr(true),
// CreationTime: to.Ptr(time.Date(2017, time.May, 24, 13, 25, 33, 486323600, time.UTC)),
// Encryption: &armstorage.Encryption{
// KeySource: to.Ptr(armstorage.KeySourceMicrosoftStorage),
// RequireInfrastructureEncryption: to.Ptr(false),
// Services: &armstorage.EncryptionServices{
// Blob: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// File: &armstorage.EncryptionService{
// Enabled: to.Ptr(true),
// KeyType: to.Ptr(armstorage.KeyTypeAccount),
// LastEnabledTime: to.Ptr(time.Date(2019, time.December, 11, 20, 49, 31, 703614000, time.UTC)),
// },
// },
// },
// IsHnsEnabled: to.Ptr(true),
// IsSftpEnabled: to.Ptr(true),
// KeyCreationTime: &armstorage.KeyCreationTime{
// Key1: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// Key2: to.Ptr(time.Date(2021, time.March, 18, 4, 42, 22, 432283600, time.UTC)),
// },
// KeyPolicy: &armstorage.KeyPolicy{
// KeyExpirationPeriodInDays: to.Ptr[int32](20),
// },
// MinimumTLSVersion: to.Ptr(armstorage.MinimumTLSVersionTLS12),
// PrimaryEndpoints: &armstorage.Endpoints{
// Blob: to.Ptr("https://sto4445.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445.file.core.windows.net/"),
// InternetEndpoints: &armstorage.AccountInternetEndpoints{
// Blob: to.Ptr("https://sto4445-internetrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-internetrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-internetrouting.file.core.windows.net/"),
// Web: to.Ptr("https://sto4445-internetrouting.web.core.windows.net/"),
// },
// MicrosoftEndpoints: &armstorage.AccountMicrosoftEndpoints{
// Blob: to.Ptr("https://sto4445-microsoftrouting.blob.core.windows.net/"),
// Dfs: to.Ptr("https://sto4445-microsoftrouting.dfs.core.windows.net/"),
// File: to.Ptr("https://sto4445-microsoftrouting.file.core.windows.net/"),
// Queue: to.Ptr("https://sto4445-microsoftrouting.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445-microsoftrouting.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445-microsoftrouting.web.core.windows.net/"),
// },
// Queue: to.Ptr("https://sto4445.queue.core.windows.net/"),
// Table: to.Ptr("https://sto4445.table.core.windows.net/"),
// Web: to.Ptr("https://sto4445.web.core.windows.net/"),
// },
// PrimaryLocation: to.Ptr("eastus2euap"),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// RoutingPreference: &armstorage.RoutingPreference{
// PublishInternetEndpoints: to.Ptr(true),
// PublishMicrosoftEndpoints: to.Ptr(true),
// RoutingChoice: to.Ptr(armstorage.RoutingChoiceMicrosoftRouting),
// },
// SasPolicy: &armstorage.SasPolicy{
// ExpirationAction: to.Ptr(armstorage.ExpirationActionLog),
// SasExpirationPeriod: to.Ptr("1.15:59:59"),
// },
// SecondaryLocation: to.Ptr("centraluseuap"),
// StatusOfPrimary: to.Ptr(armstorage.AccountStatusAvailable),
// StatusOfSecondary: to.Ptr(armstorage.AccountStatusAvailable),
// EnableHTTPSTrafficOnly: to.Ptr(true),
// GeoPriorityReplicationStatus: &armstorage.GeoPriorityReplicationStatus{
// IsBlobEnabled: to.Ptr(true),
// },
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardGRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Tags: map[string]*string{
// "key1": to.Ptr("value1"),
// "key2": to.Ptr("value2"),
// },
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithSmartAccessTier.json
*/
async function storageAccountCreateWithSmartAccessTier() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "sto4445", {
extendedLocation: { name: "losangeles001", type: "EdgeZone" },
kind: "Storage",
location: "eastus",
accessTier: "Smart",
allowBlobPublicAccess: false,
allowSharedKeyAccess: true,
defaultToOAuthAuthentication: false,
encryption: {
keySource: "Microsoft.Storage",
requireInfrastructureEncryption: false,
services: {
blob: { enabled: true, keyType: "Account" },
file: { enabled: true, keyType: "Account" },
},
},
isHnsEnabled: true,
isSftpEnabled: true,
keyPolicy: { keyExpirationPeriodInDays: 20 },
minimumTlsVersion: "TLS1_2",
routingPreference: {
publishInternetEndpoints: true,
publishMicrosoftEndpoints: true,
routingChoice: "MicrosoftRouting",
},
sasPolicy: { expirationAction: "Log", sasExpirationPeriod: "1.15:59:59" },
geoPriorityReplicationStatus: { isBlobEnabled: true },
sku: { name: "Standard_GRS" },
tags: { key1: "value1", key2: "value2" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"name": "sto4445",
"type": "Microsoft.Storage/storageAccounts",
"extendedLocation": {
"name": "losangeles001",
"type": "EdgeZone"
},
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445",
"kind": "Storage",
"location": "eastus",
"properties": {
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"creationTime": "2017-05-24T13:25:33.4863236Z",
"encryption": {
"keySource": "Microsoft.Storage",
"requireInfrastructureEncryption": false,
"services": {
"blob": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
},
"file": {
"enabled": true,
"keyType": "Account",
"lastEnabledTime": "2019-12-11T20:49:31.7036140Z"
}
}
},
"isHnsEnabled": true,
"isSftpEnabled": true,
"keyCreationTime": {
"key1": "2021-03-18T04:42:22.4322836Z",
"key2": "2021-03-18T04:42:22.4322836Z"
},
"keyPolicy": {
"keyExpirationPeriodInDays": 20
},
"minimumTlsVersion": "TLS1_2",
"primaryEndpoints": {
"blob": "https://sto4445.blob.core.windows.net/",
"dfs": "https://sto4445.dfs.core.windows.net/",
"file": "https://sto4445.file.core.windows.net/",
"internetEndpoints": {
"blob": "https://sto4445-internetrouting.blob.core.windows.net/",
"dfs": "https://sto4445-internetrouting.dfs.core.windows.net/",
"file": "https://sto4445-internetrouting.file.core.windows.net/",
"web": "https://sto4445-internetrouting.web.core.windows.net/"
},
"microsoftEndpoints": {
"blob": "https://sto4445-microsoftrouting.blob.core.windows.net/",
"dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/",
"file": "https://sto4445-microsoftrouting.file.core.windows.net/",
"queue": "https://sto4445-microsoftrouting.queue.core.windows.net/",
"table": "https://sto4445-microsoftrouting.table.core.windows.net/",
"web": "https://sto4445-microsoftrouting.web.core.windows.net/"
},
"queue": "https://sto4445.queue.core.windows.net/",
"table": "https://sto4445.table.core.windows.net/",
"web": "https://sto4445.web.core.windows.net/"
},
"primaryLocation": "eastus2euap",
"provisioningState": "Succeeded",
"routingPreference": {
"publishInternetEndpoints": true,
"publishMicrosoftEndpoints": true,
"routingChoice": "MicrosoftRouting"
},
"sasPolicy": {
"expirationAction": "Log",
"sasExpirationPeriod": "1.15:59:59"
},
"secondaryLocation": "centraluseuap",
"statusOfPrimary": "available",
"statusOfSecondary": "available",
"supportsHttpsTrafficOnly": true,
"geoPriorityReplicationStatus": {
"isBlobEnabled": true
}
},
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"tags": {
"key1": "value1",
"key2": "value2"
}
}
StorageAccountCreateWithTurboTier
Przykładowe żądanie
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/staturbocontoso01?api-version=2026-09-01
{
"kind": "StorageV2",
"location": "eastus2",
"properties": {
"accessTier": "Hot",
"turboTier": {
"status": "Enabled",
"targetPercent": 10
}
},
"sku": {
"name": "Standard_LRS"
}
}
import com.azure.resourcemanager.storage.models.AccessTier;
import com.azure.resourcemanager.storage.models.Kind;
import com.azure.resourcemanager.storage.models.Sku;
import com.azure.resourcemanager.storage.models.SkuName;
import com.azure.resourcemanager.storage.models.StorageAccountCreateParameters;
import com.azure.resourcemanager.storage.models.TurboTier;
import com.azure.resourcemanager.storage.models.TurboTierStatus;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for StorageAccounts Create.
*/
public final class Main {
/*
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithTurboTier.json
*/
/**
* Sample code: StorageAccountCreateWithTurboTier.
*
* @param manager Entry point to StorageManager.
*/
public static void storageAccountCreateWithTurboTier(com.azure.resourcemanager.storage.StorageManager manager) {
manager.serviceClient().getStorageAccounts().create("res9101", "staturbocontoso01",
new StorageAccountCreateParameters().withSku(new Sku().withName(SkuName.STANDARD_LRS))
.withKind(Kind.STORAGE_V2).withLocation("eastus2").withAccessTier(AccessTier.HOT)
.withTurboTier(new TurboTier().withStatus(TurboTierStatus.ENABLED).withTargetPercent(10)),
com.azure.core.util.Context.NONE);
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.storage import StorageManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storage
# USAGE
python storage_account_create_with_turbo_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.storage_accounts.begin_create(
resource_group_name="res9101",
account_name="staturbocontoso01",
parameters={
"kind": "StorageV2",
"location": "eastus2",
"properties": {"accessTier": "Hot", "turboTier": {"status": "Enabled", "targetPercent": 10}},
"sku": {"name": "Standard_LRS"},
},
).result()
print(response)
# x-ms-original-file: 2026-09-01/StorageAccountCreateWithTurboTier.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armstorage_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage/v4"
)
// Generated from example definition: 2026-09-01/StorageAccountCreateWithTurboTier.json
func ExampleAccountsClient_BeginCreate_storageAccountCreateWithTurboTier() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armstorage.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewAccountsClient().BeginCreate(ctx, "res9101", "staturbocontoso01", armstorage.AccountCreateParameters{
Kind: to.Ptr(armstorage.KindStorageV2),
Location: to.Ptr("eastus2"),
Properties: &armstorage.AccountPropertiesCreateParameters{
AccessTier: to.Ptr(armstorage.AccessTierHot),
TurboTier: &armstorage.TurboTier{
Status: to.Ptr(armstorage.TurboTierStatusEnabled),
TargetPercent: to.Ptr[int32](10),
},
},
SKU: &armstorage.SKU{
Name: to.Ptr(armstorage.SKUNameStandardLRS),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to poll the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armstorage.AccountsClientCreateResponse{
// Account: armstorage.Account{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/staturbocontoso01"),
// Kind: to.Ptr(armstorage.KindStorageV2),
// Location: to.Ptr("eastus2"),
// Name: to.Ptr("staturbocontoso01"),
// Properties: &armstorage.AccountProperties{
// AccessTier: to.Ptr(armstorage.AccessTierHot),
// ProvisioningState: to.Ptr(armstorage.ProvisioningStateSucceeded),
// TurboTier: &armstorage.TurboTier{
// Status: to.Ptr(armstorage.TurboTierStatusEnabled),
// TargetPercent: to.Ptr[int32](10),
// },
// },
// SKU: &armstorage.SKU{
// Name: to.Ptr(armstorage.SKUNameStandardLRS),
// Tier: to.Ptr(armstorage.SKUTierStandard),
// },
// Type: to.Ptr("Microsoft.Storage/storageAccounts"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { StorageManagementClient } = require("@azure/arm-storage");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
*
* @summary asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.
* x-ms-original-file: 2026-09-01/StorageAccountCreateWithTurboTier.json
*/
async function storageAccountCreateWithTurboTier() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new StorageManagementClient(credential, subscriptionId);
const result = await client.storageAccounts.create("res9101", "staturbocontoso01", {
kind: "StorageV2",
location: "eastus2",
accessTier: "Hot",
turboTier: { status: "Enabled", targetPercent: 10 },
sku: { name: "Standard_LRS" },
});
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Przykładowa odpowiedź
{
"id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/staturbocontoso01",
"kind": "StorageV2",
"location": "eastus2",
"name": "staturbocontoso01",
"properties": {
"accessTier": "Hot",
"provisioningState": "Succeeded",
"turboTier": {
"status": "Enabled",
"targetPercent": 10
}
},
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"type": "Microsoft.Storage/storageAccounts"
}
Definicje
| Nazwisko |
Opis |
|
AccessTier
|
Domyślny poziom dostępu dla bloków w kontach pamięci. Wymagane dla kont magazynu, gdzie rodzaj = BlobStorage. Zobacz więcej szczegółów w temacie: https://learn.microsoft.com/azure/storage/blobs/access-tiers-overview.
|
|
AccountImmutabilityPolicyProperties
|
Definiuje właściwości zasad niezmienności na poziomie konta.
|
|
AccountImmutabilityPolicyState
|
Stan ImmutabilityPolicy definiuje tryb zasad. Wyłączony stan wyłącza zasady, Stan odblokowany umożliwia zwiększenie i zmniejszenie czasu przechowywania niezmienności, a także umożliwia przełączenie właściwości allowProtectedAppendWrites, stan Zablokowany zezwala tylko na zwiększenie czasu przechowywania niezmienności. Zasady można utworzyć tylko w stanie Wyłączone lub Odblokowane i można je przełączać między dwoma stanami. Tylko zasady w stanie Odblokowane mogą przejść do stanu Zablokowane, którego nie można przywrócić.
|
|
AccountStatus
|
Pobiera stan wskazujący, czy lokalizacja podstawowa konta magazynu jest dostępna, czy niedostępna.
|
|
AccountType
|
Określa typ konta usługi Active Directory dla usługi Azure Storage. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest opcjonalna. Jeśli zostanie podany, należy również podać samAccountName. W przypadku directoryServiceOptions AADDS (uwierzytelnianie Entra DS) lub AADKERB (uwierzytelnianie Entra) tę właściwość można pominąć.
|
|
ActiveDirectoryProperties
|
Właściwości ustawień usługi Active Directory (AD).
|
|
AllowedCopyScope
|
Ogranicz kopiowanie do i z kont magazynu w dzierżawie usługi AAD lub za pomocą linków prywatnych do tej samej sieci wirtualnej.
|
|
AzureFilesIdentityBasedAuthentication
|
Ustawienia uwierzytelniania opartego na tożsamości usługi Azure Files.
|
|
BlobRestoreParameters
|
Parametry przywracania obiektów blob
|
|
BlobRestoreProgressStatus
|
Stan postępu przywracania obiektu blob. Możliwe wartości to: - InProgress: wskazuje, że przywracanie obiektu blob jest w toku. - Ukończono: wskazuje, że przywracanie obiektu blob zostało ukończone pomyślnie. - Niepowodzenie: wskazuje, że przywracanie obiektu blob nie powiodło się.
|
|
BlobRestoreRange
|
Zakres obiektów blob
|
|
BlobRestoreStatus
|
Stan przywracania obiektów blob.
|
|
Bypass
|
Określa, czy ruch jest pomijany dla rejestrowania/metryk/usługi AzureServices. Możliwe wartości to dowolna kombinacja rejestrowania|Metryki|AzureServices (na przykład "Rejestrowanie, metryki") lub Brak w celu obejścia żadnego z tych ruchów.
|
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
CustomDomain
|
Domena niestandardowa przypisana do tego konta magazynu. Można to ustawić za pomocą aktualizacji.
|
|
DefaultAction
|
Określa domyślną akcję zezwalania lub odmowy, gdy żadna inna reguła nie jest zgodna.
|
|
DefaultSharePermission
|
Domyślne uprawnienia udziału dla użytkowników korzystających z uwierzytelniania Kerberos, jeśli rola RBAC nie jest przypisana.
|
|
DirectoryServiceOptions
|
Wskazuje użytą usługę katalogową. Należy pamiętać, że wyliczenie może zostać rozszerzone w przyszłości.
|
|
DnsEndpointType
|
Umożliwia określenie typu punktu końcowego. Ustaw tę wartość na wartość AzureDNSZone, aby utworzyć dużą liczbę kont w jednej subskrypcji, która tworzy konta w strefie DNS platformy Azure, a adres URL punktu końcowego będzie miał alfanumeryczny identyfikator strefy DNS.
|
|
DualStackEndpointPreference
|
Preferencja punktu końcowego z podwójnym stosem określa, czy punkty końcowe IPv6 mają być publikowane.
|
|
Encryption
|
Ustawienia szyfrowania na koncie magazynu.
|
|
EncryptionIdentity
|
Tożsamość szyfrowania dla konta magazynu.
|
|
EncryptionService
|
Usługa, która umożliwia korzystanie z szyfrowania po stronie serwera.
|
|
EncryptionServices
|
Lista usług obsługujących szyfrowanie.
|
|
Endpoints
|
Identyfikatory URI używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub dfs.
|
|
ErrorResponse
|
Odpowiedź dostawcy zasobów magazynu na błąd.
|
|
ErrorResponseBody
|
Kontrakt treści odpowiedzi na błąd.
|
|
ExpirationAction
|
Akcja wygaśnięcia sygnatury dostępu współdzielonego definiuje akcję, która ma być wykonywana, gdy naruszono element sasPolicy.sasExpirationPeriod. Akcja "Dziennik" może służyć do celów inspekcji, a akcja "Blokuj" może służyć do blokowania i odmowy użycia tokenów SAS, które nie są zgodne z okresem wygaśnięcia zasad sygnatury dostępu współdzielonego.
|
|
ExtendedLocation
|
Typ złożony lokalizacji rozszerzonej.
|
|
ExtendedLocationTypes
|
Typ extendedLocation.
|
|
GeoPriorityReplicationStatus
|
Stan włączenia replikacji priorytetu geograficznego dla konta magazynu.
|
|
GeoReplicationStats
|
Statystyki związane z replikacją dla usług Blob, Table, Queue i File konta magazynu. Jest ona dostępna tylko wtedy, gdy dla konta magazynu jest włączona replikacja geograficznie nadmiarowa.
|
|
GeoReplicationStatus
|
Stan lokalizacji dodatkowej. Możliwe wartości to: - Na żywo: wskazuje, że lokalizacja pomocnicza jest aktywna i działa. - Bootstrap: wskazuje, że trwa początkowa synchronizacja z lokalizacji podstawowej do lokalizacji dodatkowej. Dzieje się tak zwykle, gdy replikacja jest włączana po raz pierwszy. - Niedostępna: wskazuje, że dodatkowa lokalizacja jest tymczasowo niedostępna.
|
|
Identity
|
Tożsamość zasobu.
|
|
IdentityType
|
Typ tożsamości.
|
|
ImmutableStorageAccount
|
Ta właściwość umożliwia i definiuje niezmienność na poziomie konta. Włączenie funkcji automatycznego włączania przechowywania wersji obiektów blob.
|
|
IPRule
|
Reguła adresu IP z określonym adresem IP lub zakresem adresów IP w formacie CIDR.
|
|
KeyCreationTime
|
Czas tworzenia kluczy konta magazynu.
|
|
KeyPolicy
|
KeyPolicy przypisana do konta magazynu.
|
|
KeySource
|
Klucz szyfrowaniaŹródło (dostawca). Możliwe wartości (bez uwzględniania wielkości liter): Microsoft.Storage, Microsoft.Keyvault
|
|
KeyType
|
Typ klucza szyfrowania, który ma być używany dla usługi szyfrowania. Typ klucza "Konto" oznacza, że zostanie użyty klucz szyfrowania o zakresie konta. Typ klucza "Usługa" oznacza, że jest używany domyślny klucz usługi.
|
|
KeyVaultProperties
|
Właściwości magazynu kluczy.
|
|
Kind
|
Wskazuje typ konta magazynu.
|
|
LargeFileSharesState
|
Zezwalaj na duże udziały plików, jeśli zestawy mają wartość Włączone. Nie można go wyłączyć po jej włączeniu.
|
|
MinimumTlsVersion
|
Ustaw minimalną wersję protokołu TLS, która ma być dozwolona dla żądań do magazynu. Domyślna interpretacja to TLS 1.0 dla tej właściwości. Wersja Minimum TLS 1.3 nie jest obsługiwana.
|
|
NetworkRuleSet
|
Zestaw reguł sieci
|
|
Placement
|
Złożony typ szczegółów rozmieszczenia strefowego.
|
|
PolicyViolationAction
|
Działanie wykonane w przypadku naruszenia wymogu polityki delegacji użytkownika SAS (podpis współdzielonego dostępu).
|
|
PostFailoverRedundancy
|
Typ nadmiarowości konta po przełączeniu konta w tryb failover.
|
|
PostPlannedFailoverRedundancy
|
Typ nadmiarowości konta po wykonaniu planowanego przejścia w tryb failover konta.
|
|
PrivateEndpoint
|
Zasób prywatnego punktu końcowego.
|
|
PrivateEndpointConnection
|
Zasób połączenia prywatnego punktu końcowego.
|
|
PrivateEndpointConnectionProvisioningState
|
Bieżący stan aprowizacji.
|
|
PrivateEndpointServiceConnectionStatus
|
Stan połączenia prywatnego punktu końcowego.
|
|
PrivateLinkServiceConnectionState
|
Zbiór informacji o stanie połączenia między użytkownikiem usługi a dostawcą.
|
|
ProvisioningState
|
Pobiera stan konta magazynu w momencie wywołania operacji.
|
|
PublicNetworkAccess
|
Zezwalaj, nie zezwalaj na konfigurację obwodu zabezpieczeń sieci lub zezwalaj na ocenę dostępu sieci publicznej do konta magazynu. Wartość jest opcjonalna, ale jeśli została przekazana, musi mieć wartość "Włączone", "Wyłączone" lub "SecuredByPerimeter".
|
|
ResourceAccessRule
|
Reguła dostępu do zasobów.
|
|
RoutingChoice
|
Wybór routingu definiuje rodzaj routingu sieciowego wybranego przez użytkownika.
|
|
RoutingPreference
|
Preferencja routingu definiuje typ sieci, microsoft lub routing internetowy, który ma być używany do dostarczania danych użytkownika, domyślną opcją jest routing firmy Microsoft
|
|
SasPolicy
|
Sygnatura dostępu współdzielonego przypisana do konta magazynu.
|
|
ServiceSharedKeyAccessProperties
|
Definiuje ustawienia dostępu do klucza współdzielonego dla pojedynczej usługi przechowywania danych.
|
|
Sku
|
Jednostka SKU konta magazynu.
|
|
SkuConversionStatus
|
Ta właściwość wskazuje bieżący stan konwersji jednostki SKU.
|
|
SkuName
|
Nazwa jednostki SKU. Wymagane do utworzenia konta; opcjonalnie do aktualizacji. Należy pamiętać, że w starszych wersjach nazwa jednostki SKU nosiła nazwę accountType.
|
|
SkuTier
|
Poziom SKU. Jest to oparte na nazwie jednostki SKU.
|
|
SmbOAuthSettings
|
Ustawianie właściwości dostępu do tożsamości zarządzanej za pośrednictwem protokołu SMB przy użyciu protokołu OAuth
|
|
State
|
Pobiera stan reguły sieci wirtualnej.
|
|
StorageAccount
|
konto magazynowe
|
|
StorageAccountCreateParameters
|
Parametry używane podczas tworzenia konta magazynu.
|
|
StorageAccountInternetEndpoints
|
Identyfikatory URI używane do pobierania publicznego obiektu blob, pliku, sieci Web lub dfs za pośrednictwem punktu końcowego routingu internetowego.
|
|
StorageAccountIpv6Endpoints
|
Identyfikatory URI, które są używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub obiektu dfs za pośrednictwem punktu końcowego IPv6.
|
|
StorageAccountMicrosoftEndpoints
|
Identyfikatory URI używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub dfs za pośrednictwem punktu końcowego routingu firmy Microsoft.
|
|
StorageAccountSharedKeyAccessProperties
|
Definiuje właściwości dostępu do wspólnego klucza dla konta pamięci masowej.
|
|
StorageAccountSkuConversionStatus
|
Definiuje obiekt stanu konwersji jednostki SKU dla konwersji jednostki SKU asynchronicznej.
|
|
StorageDataCollaborationPolicyProperties
|
Definiuje Politykę Współpracy Danych dla konta magazynowego.
|
|
systemData
|
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
|
|
TurboTier
|
Konfiguruje Turbo Tier dla konta magazynowego.
|
|
TurboTierStatus
|
Wskazuje, czy Turbo Tier jest włączony czy wyłączony.
|
|
UserAssignedIdentity
|
UserAssignedIdentity dla zasobu.
|
|
VirtualNetworkRule
|
Reguła sieci wirtualnej.
|
|
ZonePlacementPolicy
|
Zasady przypinania strefy dostępności dla konta magazynu.
|
AccessTier
Wyliczenie
Domyślny poziom dostępu dla bloków w kontach pamięci. Wymagane dla kont magazynu, gdzie rodzaj = BlobStorage. Zobacz więcej szczegółów w temacie: https://learn.microsoft.com/azure/storage/blobs/access-tiers-overview.
| Wartość |
Opis |
|
Hot
|
|
|
Cool
|
|
|
Premium
|
|
|
Cold
|
|
|
Smart
|
|
AccountImmutabilityPolicyProperties
Objekt
Definiuje właściwości zasad niezmienności na poziomie konta.
| Nazwisko |
Typ |
Opis |
|
allowProtectedAppendWrites
|
boolean
|
Tę właściwość można zmienić tylko dla wyłączonych i odblokowanych zasad przechowywania na podstawie czasu. Po włączeniu nowych bloków można zapisywać w uzupełnialnych obiektach blob przy zachowaniu niezmienności i zgodności. Można dodawać tylko nowe bloki i nie można modyfikować ani usuwać żadnych istniejących bloków.
|
|
immutabilityPeriodSinceCreationInDays
|
integer
(int32)
minimum: 1 maximum: 146000
|
Okres niezmienności obiektów blob w kontenerze od momentu utworzenia zasad w dniach.
|
|
state
|
AccountImmutabilityPolicyState
|
Stan ImmutabilityPolicy definiuje tryb zasad. Wyłączony stan wyłącza zasady, Stan odblokowany umożliwia zwiększenie i zmniejszenie czasu przechowywania niezmienności, a także umożliwia przełączenie właściwości allowProtectedAppendWrites, stan Zablokowany zezwala tylko na zwiększenie czasu przechowywania niezmienności. Zasady można utworzyć tylko w stanie Wyłączone lub Odblokowane i można je przełączać między dwoma stanami. Tylko zasady w stanie Odblokowane mogą przejść do stanu Zablokowane, którego nie można przywrócić.
|
AccountImmutabilityPolicyState
Wyliczenie
Stan ImmutabilityPolicy definiuje tryb zasad. Wyłączony stan wyłącza zasady, Stan odblokowany umożliwia zwiększenie i zmniejszenie czasu przechowywania niezmienności, a także umożliwia przełączenie właściwości allowProtectedAppendWrites, stan Zablokowany zezwala tylko na zwiększenie czasu przechowywania niezmienności. Zasady można utworzyć tylko w stanie Wyłączone lub Odblokowane i można je przełączać między dwoma stanami. Tylko zasady w stanie Odblokowane mogą przejść do stanu Zablokowane, którego nie można przywrócić.
| Wartość |
Opis |
|
Unlocked
|
|
|
Locked
|
|
|
Disabled
|
|
AccountStatus
Wyliczenie
Pobiera stan wskazujący, czy lokalizacja podstawowa konta magazynu jest dostępna, czy niedostępna.
| Wartość |
Opis |
|
available
|
|
|
unavailable
|
|
AccountType
Wyliczenie
Określa typ konta usługi Active Directory dla usługi Azure Storage. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest opcjonalna. Jeśli zostanie podany, należy również podać samAccountName. W przypadku directoryServiceOptions AADDS (uwierzytelnianie Entra DS) lub AADKERB (uwierzytelnianie Entra) tę właściwość można pominąć.
| Wartość |
Opis |
|
User
|
|
|
Computer
|
|
ActiveDirectoryProperties
Objekt
Właściwości ustawień usługi Active Directory (AD).
| Nazwisko |
Typ |
Opis |
|
accountType
|
AccountType
|
Określa typ konta usługi Active Directory dla usługi Azure Storage. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest opcjonalna. Jeśli zostanie podany, należy również podać samAccountName. W przypadku directoryServiceOptions AADDS (uwierzytelnianie Entra DS) lub AADKERB (uwierzytelnianie Entra) tę właściwość można pominąć.
|
|
azureStorageSid
|
string
|
Określa identyfikator zabezpieczeń (SID) dla usługi Azure Storage. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest wymagana. W przeciwnym razie można go pominąć.
|
|
domainGuid
|
string
|
Określa identyfikator GUID domeny. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest wymagana. Jeśli parametr directoryServiceOptions jest ustawiony na wartość AADDS (uwierzytelnianie Entra DS), tę właściwość można pominąć. Jeśli parametr directoryServiceOptions jest ustawiony na wartość AADKERB (uwierzytelnianie Entra), ta właściwość jest opcjonalna; jest potrzebny do obsługi konfiguracji uprawnień na poziomie katalogu i pliku za pomocą Eksploratora plików systemu Windows, ale nie jest wymagany do uwierzytelniania.
|
|
domainName
|
string
|
Określa domenę podstawową, dla którego serwer DNS usługi AD jest autorytatywny. Ta właściwość jest wymagana, jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS). Jeśli directoryServiceOptions jest ustawiona na AADDS (uwierzytelnianie Entra DS), podanie tej właściwości jest opcjonalne, ponieważ zostanie wywnioskowana automatycznie, jeśli zostanie pominięta. Jeśli parametr directoryServiceOptions jest ustawiony na wartość AADKERB (uwierzytelnianie Entra), ta właściwość jest opcjonalna; jest potrzebny do obsługi konfiguracji uprawnień na poziomie katalogu i pliku za pomocą Eksploratora plików systemu Windows, ale nie jest wymagany do uwierzytelniania.
|
|
domainSid
|
string
|
Określa identyfikator zabezpieczeń (SID) domeny usługi AD. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest wymagana. W przeciwnym razie można go pominąć.
|
|
forestName
|
string
|
Określa las usługi Active Directory do pobrania. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest wymagana. W przeciwnym razie można go pominąć.
|
|
netBiosDomainName
|
string
|
Określa nazwę domeny NetBIOS. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest wymagana. W przeciwnym razie można go pominąć.
|
|
samAccountName
|
string
|
Określa nazwę SAMAccountName usługi Active Directory dla usługi Azure Storage. Jeśli parametr DirectoryServiceOptions jest ustawiony na wartość AD (uwierzytelnianie usług AD DS), ta właściwość jest opcjonalna. Jeśli zostanie podany, należy również podać accountType . W przypadku directoryServiceOptions AADDS (uwierzytelnianie Entra DS) lub AADKERB (uwierzytelnianie Entra) tę właściwość można pominąć.
|
AllowedCopyScope
Wyliczenie
Ogranicz kopiowanie do i z kont magazynu w dzierżawie usługi AAD lub za pomocą linków prywatnych do tej samej sieci wirtualnej.
| Wartość |
Opis |
|
PrivateLink
|
|
|
AAD
|
|
|
All
|
|
AzureFilesIdentityBasedAuthentication
Objekt
Ustawienia uwierzytelniania opartego na tożsamości usługi Azure Files.
| Nazwisko |
Typ |
Opis |
|
activeDirectoryProperties
|
ActiveDirectoryProperties
|
Dodatkowe informacje o usłudze katalogowej. Wymagane, jeśli parametr DirectoryServiceOptions ma wartość AD (uwierzytelnianie usług AD DS). Opcjonalnie dla directoryServiceOptions: AADDS (uwierzytelnianie Entra DS) i AADKERB (uwierzytelnianie Entra).
|
|
defaultSharePermission
|
DefaultSharePermission
|
Domyślne uprawnienia udziału dla użytkowników korzystających z uwierzytelniania Kerberos, jeśli rola RBAC nie jest przypisana.
|
|
directoryServiceOptions
|
DirectoryServiceOptions
|
Wskazuje użytą usługę katalogową. Należy pamiętać, że wyliczenie może zostać rozszerzone w przyszłości.
|
|
smbOAuthSettings
|
SmbOAuthSettings
|
Wymagane w przypadku dostępu do tożsamości zarządzanych przy użyciu protokołu OAuth za pośrednictwem protokołu SMB.
|
BlobRestoreParameters
Objekt
Parametry przywracania obiektów blob
| Nazwisko |
Typ |
Opis |
|
blobRanges
|
BlobRestoreRange[]
|
Zakresy obiektów blob do przywrócenia.
|
|
timeToRestore
|
string
(date-time)
|
Przywróć obiekt blob do określonego czasu.
|
BlobRestoreProgressStatus
Wyliczenie
Stan postępu przywracania obiektu blob. Możliwe wartości to: - InProgress: wskazuje, że przywracanie obiektu blob jest w toku. - Ukończono: wskazuje, że przywracanie obiektu blob zostało ukończone pomyślnie. - Niepowodzenie: wskazuje, że przywracanie obiektu blob nie powiodło się.
| Wartość |
Opis |
|
InProgress
|
|
|
Complete
|
|
|
Failed
|
|
BlobRestoreRange
Objekt
Zakres obiektów blob
| Nazwisko |
Typ |
Opis |
|
endRange
|
string
|
Zakres końcowy obiektu blob. To jest ekskluzywne. Puste oznacza koniec konta.
|
|
startRange
|
string
|
Zakres początkowy obiektu blob. Jest to inkluzywne. Puste oznacza początek konta.
|
BlobRestoreStatus
Objekt
Stan przywracania obiektów blob.
| Nazwisko |
Typ |
Opis |
|
failureReason
|
string
|
Przyczyna niepowodzenia, gdy przywracanie obiektu blob nie powiodło się.
|
|
parameters
|
BlobRestoreParameters
|
Parametry żądania przywracania obiektów blob.
|
|
restoreId
|
string
|
Identyfikator śledzenia żądania przywracania obiektów blob.
|
|
status
|
BlobRestoreProgressStatus
|
Stan postępu przywracania obiektu blob. Możliwe wartości to: - InProgress: wskazuje, że przywracanie obiektu blob jest w toku. - Ukończono: wskazuje, że przywracanie obiektu blob zostało ukończone pomyślnie. - Niepowodzenie: wskazuje, że przywracanie obiektu blob nie powiodło się.
|
Bypass
Wyliczenie
Określa, czy ruch jest pomijany dla rejestrowania/metryk/usługi AzureServices. Możliwe wartości to dowolna kombinacja rejestrowania|Metryki|AzureServices (na przykład "Rejestrowanie, metryki") lub Brak w celu obejścia żadnego z tych ruchów.
| Wartość |
Opis |
|
None
|
|
|
Logging
|
|
|
Metrics
|
|
|
AzureServices
|
|
createdByType
Wyliczenie
Typ tożsamości, która utworzyła zasób.
| Wartość |
Opis |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
CustomDomain
Objekt
Domena niestandardowa przypisana do tego konta magazynu. Można to ustawić za pomocą aktualizacji.
| Nazwisko |
Typ |
Opis |
|
name
|
string
|
Pobiera lub ustawia niestandardową nazwę domeny przypisaną do konta magazynu. Nazwa to źródło CNAME.
|
|
useSubDomainName
|
boolean
|
Wskazuje, czy jest włączona weryfikacja pośredniego rekordu CName. Wartość domyślna to false. Należy to ustawić tylko w przypadku aktualizacji.
|
DefaultAction
Wyliczenie
Określa domyślną akcję zezwalania lub odmowy, gdy żadna inna reguła nie jest zgodna.
DefaultSharePermission
Wyliczenie
Domyślne uprawnienia udziału dla użytkowników korzystających z uwierzytelniania Kerberos, jeśli rola RBAC nie jest przypisana.
| Wartość |
Opis |
|
None
|
|
|
StorageFileDataSmbShareReader
|
|
|
StorageFileDataSmbShareContributor
|
|
|
StorageFileDataSmbShareElevatedContributor
|
|
DirectoryServiceOptions
Wyliczenie
Wskazuje użytą usługę katalogową. Należy pamiętać, że wyliczenie może zostać rozszerzone w przyszłości.
| Wartość |
Opis |
|
None
|
|
|
AADDS
|
|
|
AD
|
|
|
AADKERB
|
|
DnsEndpointType
Wyliczenie
Umożliwia określenie typu punktu końcowego. Ustaw tę wartość na wartość AzureDNSZone, aby utworzyć dużą liczbę kont w jednej subskrypcji, która tworzy konta w strefie DNS platformy Azure, a adres URL punktu końcowego będzie miał alfanumeryczny identyfikator strefy DNS.
| Wartość |
Opis |
|
Standard
|
|
|
AzureDnsZone
|
|
DualStackEndpointPreference
Objekt
Preferencja punktu końcowego z podwójnym stosem określa, czy punkty końcowe IPv6 mają być publikowane.
| Nazwisko |
Typ |
Opis |
|
publishIpv6Endpoint
|
boolean
|
Flaga logiczna wskazująca, czy mają zostać opublikowane punkty końcowe magazynu IPv6.
|
Encryption
Objekt
Ustawienia szyfrowania na koncie magazynu.
| Nazwisko |
Typ |
Domyślna wartość |
Opis |
|
identity
|
EncryptionIdentity
|
|
Tożsamość, która ma być używana z szyfrowaniem po stronie usługi magazynowanych.
|
|
keySource
|
KeySource
|
Microsoft.Storage
|
Klucz szyfrowaniaŹródło (dostawca). Możliwe wartości (bez uwzględniania wielkości liter): Microsoft.Storage, Microsoft.Keyvault
|
|
keyvaultproperties
|
KeyVaultProperties
|
|
Właściwości udostępniane przez magazyn kluczy.
|
|
requireInfrastructureEncryption
|
boolean
|
|
Wartość logiczna wskazująca, czy usługa stosuje dodatkową warstwę szyfrowania z kluczami zarządzanymi platformy dla danych magazynowanych.
|
|
services
|
EncryptionServices
|
|
Lista usług, które obsługują szyfrowanie.
|
EncryptionIdentity
Objekt
Tożsamość szyfrowania dla konta magazynu.
| Nazwisko |
Typ |
Opis |
|
federatedIdentityClientId
|
string
|
ClientId aplikacji wielodostępnej, która ma być używana w połączeniu z tożsamością przypisaną przez użytkownika na potrzeby szyfrowania po stronie serwera kluczy zarządzanych przez klienta między dzierżawami na koncie magazynu.
|
|
userAssignedIdentity
|
string
|
Identyfikator zasobu tożsamości UserAssigned, który ma być skojarzony z szyfrowaniem po stronie serwera na koncie magazynu.
|
EncryptionService
Objekt
Usługa, która umożliwia korzystanie z szyfrowania po stronie serwera.
| Nazwisko |
Typ |
Opis |
|
enabled
|
boolean
|
Wartość logiczna wskazująca, czy usługa szyfruje dane podczas ich przechowywania. Szyfrowanie magazynowane jest domyślnie włączone i nie można go wyłączyć.
|
|
keyType
|
KeyType
|
Typ klucza szyfrowania, który ma być używany dla usługi szyfrowania. Typ klucza "Konto" oznacza, że zostanie użyty klucz szyfrowania o zakresie konta. Typ klucza "Usługa" oznacza, że jest używany domyślny klucz usługi.
|
|
lastEnabledTime
|
string
(date-time)
|
Pobiera przybliżone oszacowanie daty/godziny ostatniego włączenia szyfrowania przez użytkownika. Dane są domyślnie szyfrowane w spoczynku i nie można ich wyłączyć.
|
EncryptionServices
Objekt
Lista usług obsługujących szyfrowanie.
Endpoints
Objekt
Identyfikatory URI używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub dfs.
| Nazwisko |
Typ |
Opis |
|
blob
|
string
|
Pobiera punkt końcowy obiektu blob.
|
|
dfs
|
string
|
Pobiera punkt końcowy systemu plików dfs.
|
|
file
|
string
|
Pobiera punkt końcowy pliku.
|
|
internetEndpoints
|
StorageAccountInternetEndpoints
|
Pobiera punkty końcowe magazynu routingu internetowego
|
|
ipv6Endpoints
|
StorageAccountIpv6Endpoints
|
Pobiera punkty końcowe magazynu IPv6.
|
|
microsoftEndpoints
|
StorageAccountMicrosoftEndpoints
|
Pobiera punkty końcowe magazynu routingu firmy Microsoft.
|
|
queue
|
string
|
Pobiera punkt końcowy kolejki.
|
|
table
|
string
|
Pobiera punkt końcowy tabeli.
|
|
web
|
string
|
Pobiera internetowy punkt końcowy.
|
ErrorResponse
Objekt
Odpowiedź dostawcy zasobów magazynu na błąd.
| Nazwisko |
Typ |
Opis |
|
error
|
ErrorResponseBody
|
Azure Storage Resource Provider Error response body.
|
ErrorResponseBody
Objekt
Kontrakt treści odpowiedzi na błąd.
| Nazwisko |
Typ |
Opis |
|
code
|
string
|
Identyfikator błędu. Kody są niezmienne i mają być używane programowo.
|
|
message
|
string
|
Komunikat opisujący błąd, który ma być odpowiedni do wyświetlania w interfejsie użytkownika.
|
ExpirationAction
Wyliczenie
Akcja wygaśnięcia sygnatury dostępu współdzielonego definiuje akcję, która ma być wykonywana, gdy naruszono element sasPolicy.sasExpirationPeriod. Akcja "Dziennik" może służyć do celów inspekcji, a akcja "Blokuj" może służyć do blokowania i odmowy użycia tokenów SAS, które nie są zgodne z okresem wygaśnięcia zasad sygnatury dostępu współdzielonego.
ExtendedLocation
Objekt
Typ złożony lokalizacji rozszerzonej.
| Nazwisko |
Typ |
Opis |
|
name
|
string
|
Nazwa lokalizacji rozszerzonej.
|
|
type
|
ExtendedLocationTypes
|
Typ lokalizacji rozszerzonej.
|
ExtendedLocationTypes
Wyliczenie
Typ extendedLocation.
GeoPriorityReplicationStatus
Objekt
Stan włączenia replikacji priorytetu geograficznego dla konta magazynu.
| Nazwisko |
Typ |
Opis |
|
isBlobEnabled
|
boolean
|
Wskazuje, czy replikacja priorytetu geograficznego obiektu blob jest włączona dla konta magazynu.
|
GeoReplicationStats
Objekt
Statystyki związane z replikacją dla usług Blob, Table, Queue i File konta magazynu. Jest ona dostępna tylko wtedy, gdy dla konta magazynu jest włączona replikacja geograficznie nadmiarowa.
| Nazwisko |
Typ |
Opis |
|
canFailover
|
boolean
|
Flaga logiczna wskazująca, czy tryb failover konta jest obsługiwany dla konta.
|
|
canPlannedFailover
|
boolean
|
Flaga logiczna wskazująca, czy planowane przejście konta w tryb failover jest obsługiwane dla konta.
|
|
lastSyncTime
|
string
(date-time)
|
Wszystkie podstawowe zapisy poprzedzające tę wartość daty/godziny UTC mają gwarancję dostępności dla operacji odczytu. Podstawowe zapisy następujące po tym punkcie w czasie mogą być dostępne dla operacji odczytu lub mogą nie być dostępne. Element może być wartością domyślną, jeśli wartość LastSyncTime jest niedostępna, może się to zdarzyć, jeśli pomocnicza jest w trybie offline lub jesteśmy w uruchamianiu.
|
|
postFailoverRedundancy
|
PostFailoverRedundancy
|
Typ nadmiarowości konta po przełączeniu konta w tryb failover.
|
|
postPlannedFailoverRedundancy
|
PostPlannedFailoverRedundancy
|
Typ nadmiarowości konta po wykonaniu planowanego przejścia w tryb failover konta.
|
|
status
|
GeoReplicationStatus
|
Stan lokalizacji dodatkowej. Możliwe wartości to: - Na żywo: wskazuje, że lokalizacja pomocnicza jest aktywna i działa. - Bootstrap: wskazuje, że trwa początkowa synchronizacja z lokalizacji podstawowej do lokalizacji dodatkowej. Dzieje się tak zwykle, gdy replikacja jest włączana po raz pierwszy. - Niedostępna: wskazuje, że dodatkowa lokalizacja jest tymczasowo niedostępna.
|
GeoReplicationStatus
Wyliczenie
Stan lokalizacji dodatkowej. Możliwe wartości to: - Na żywo: wskazuje, że lokalizacja pomocnicza jest aktywna i działa. - Bootstrap: wskazuje, że trwa początkowa synchronizacja z lokalizacji podstawowej do lokalizacji dodatkowej. Dzieje się tak zwykle, gdy replikacja jest włączana po raz pierwszy. - Niedostępna: wskazuje, że dodatkowa lokalizacja jest tymczasowo niedostępna.
| Wartość |
Opis |
|
Live
|
|
|
Bootstrap
|
|
|
Unavailable
|
|
Identity
Objekt
Tożsamość zasobu.
| Nazwisko |
Typ |
Opis |
|
principalId
|
string
|
Identyfikator podmiotu zabezpieczeń tożsamości zasobu.
|
|
tenantId
|
string
|
Identyfikator dzierżawy zasobu.
|
|
type
|
IdentityType
|
Typ tożsamości.
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
Pobiera lub ustawia listę par klucz-wartość, które opisują zestaw tożsamości przypisanych przez użytkownika, które będą używane z tym kontem magazynu. Kluczem jest identyfikator zasobu usługi ARM tożsamości. W tym miejscu dozwolona jest tylko 1 tożsamość przypisana przez użytkownika.
|
IdentityType
Wyliczenie
Typ tożsamości.
| Wartość |
Opis |
|
None
|
|
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned,UserAssigned
|
|
ImmutableStorageAccount
Objekt
Ta właściwość umożliwia i definiuje niezmienność na poziomie konta. Włączenie funkcji automatycznego włączania przechowywania wersji obiektów blob.
| Nazwisko |
Typ |
Opis |
|
enabled
|
boolean
|
Flaga logiczna, która umożliwia niezmienność na poziomie konta. Wszystkie kontenery w ramach takiego konta mają domyślnie włączoną niezmienność na poziomie obiektu.
|
|
immutabilityPolicy
|
AccountImmutabilityPolicyProperties
|
Określa domyślne zasady niezmienności na poziomie konta, które są dziedziczone i stosowane do obiektów, które nie mają jawnych zasad niezmienności na poziomie obiektu. Zasady niezmienności na poziomie obiektu mają wyższy priorytet niż zasady niezmienności na poziomie kontenera, które mają wyższy priorytet niż zasady niezmienności na poziomie konta.
|
IPRule
Objekt
Reguła adresu IP z określonym adresem IP lub zakresem adresów IP w formacie CIDR.
| Nazwisko |
Typ |
Opis |
|
action
|
enum:
Allow
|
Akcja reguły listy ACL adresów IP.
|
|
value
|
string
|
Określa adres IP lub zakres adresów IP w formacie CIDR.
|
KeyCreationTime
Objekt
Czas tworzenia kluczy konta magazynu.
| Nazwisko |
Typ |
Opis |
|
key1
|
string
(date-time)
|
|
|
key2
|
string
(date-time)
|
|
KeyPolicy
Objekt
KeyPolicy przypisana do konta magazynu.
| Nazwisko |
Typ |
Opis |
|
keyExpirationPeriodInDays
|
integer
(int32)
|
Okres wygaśnięcia klucza w dniach.
|
KeySource
Wyliczenie
Klucz szyfrowaniaŹródło (dostawca). Możliwe wartości (bez uwzględniania wielkości liter): Microsoft.Storage, Microsoft.Keyvault
| Wartość |
Opis |
|
Microsoft.Storage
|
|
|
Microsoft.Keyvault
|
|
KeyType
Wyliczenie
Typ klucza szyfrowania, który ma być używany dla usługi szyfrowania. Typ klucza "Konto" oznacza, że zostanie użyty klucz szyfrowania o zakresie konta. Typ klucza "Usługa" oznacza, że jest używany domyślny klucz usługi.
| Wartość |
Opis |
|
Service
|
|
|
Account
|
|
KeyVaultProperties
Objekt
Właściwości magazynu kluczy.
| Nazwisko |
Typ |
Opis |
|
currentVersionedKeyExpirationTimestamp
|
string
(date-time)
|
Jest to właściwość tylko do odczytu, która reprezentuje czas wygaśnięcia bieżącej wersji klucza zarządzanego przez klienta używanego do szyfrowania.
|
|
currentVersionedKeyIdentifier
|
string
|
Identyfikator obiektu bieżącego używanego klucza usługi Key Vault w wersji.
|
|
keyname
|
string
|
Nazwa klucza usługi KeyVault.
|
|
keyvaulturi
|
string
|
Identyfikator URI usługi KeyVault.
|
|
keyversion
|
string
|
Wersja klucza usługi KeyVault.
|
|
lastKeyRotationTimestamp
|
string
(date-time)
|
Sygnatura czasowa ostatniej rotacji klucza usługi Key Vault.
|
Kind
Wyliczenie
Wskazuje typ konta magazynu.
| Wartość |
Opis |
|
Storage
|
|
|
StorageV2
|
|
|
BlobStorage
|
|
|
FileStorage
|
|
|
BlockBlobStorage
|
|
LargeFileSharesState
Wyliczenie
Zezwalaj na duże udziały plików, jeśli zestawy mają wartość Włączone. Nie można go wyłączyć po jej włączeniu.
| Wartość |
Opis |
|
Disabled
|
|
|
Enabled
|
|
MinimumTlsVersion
Wyliczenie
Ustaw minimalną wersję protokołu TLS, która ma być dozwolona dla żądań do magazynu. Domyślna interpretacja to TLS 1.0 dla tej właściwości. Wersja Minimum TLS 1.3 nie jest obsługiwana.
| Wartość |
Opis |
|
TLS1_0
|
|
|
TLS1_1
|
|
|
TLS1_2
|
|
|
TLS1_3
|
|
NetworkRuleSet
Objekt
Zestaw reguł sieci
| Nazwisko |
Typ |
Domyślna wartość |
Opis |
|
bypass
|
Bypass
|
AzureServices
|
Określa, czy ruch jest pomijany dla rejestrowania/metryk/usługi AzureServices. Możliwe wartości to dowolna kombinacja rejestrowania|Metryki|AzureServices (na przykład "Rejestrowanie, metryki") lub Brak w celu obejścia żadnego z tych ruchów.
|
|
defaultAction
|
DefaultAction
|
Allow
|
Określa domyślną akcję zezwalania lub odmowy, gdy żadna inna reguła nie jest zgodna.
|
|
ipRules
|
IPRule[]
|
|
Ustawia reguły listy ACL adresów IP
|
|
ipv6Rules
|
IPRule[]
|
|
Ustawia reguły listy ACL protokołu IPv6.
|
|
resourceAccessRules
|
ResourceAccessRule[]
|
|
Ustawia reguły dostępu do zasobów
|
|
virtualNetworkRules
|
VirtualNetworkRule[]
|
|
Ustawia reguły sieci wirtualnej
|
Placement
Objekt
Złożony typ szczegółów rozmieszczenia strefowego.
| Nazwisko |
Typ |
Opis |
|
zonePlacementPolicy
|
ZonePlacementPolicy
|
Zasady przypinania strefy dostępności dla konta magazynu.
|
PolicyViolationAction
Wyliczenie
Działanie wykonane w przypadku naruszenia wymogu polityki delegacji użytkownika SAS (podpis współdzielonego dostępu).
| Wartość |
Opis |
|
None
|
Nie podejmuje się żadnych działań, gdy wymóg polisy zostanie naruszony.
|
|
Log
|
Naruszenie polityki jest rejestrowane do celów audytowych.
|
|
Block
|
Wniosek jest blokowany i odrzucany, gdy naruszono wymóg polityki.
|
PostFailoverRedundancy
Wyliczenie
Typ nadmiarowości konta po przełączeniu konta w tryb failover.
| Wartość |
Opis |
|
Standard_LRS
|
|
|
Standard_ZRS
|
|
PostPlannedFailoverRedundancy
Wyliczenie
Typ nadmiarowości konta po wykonaniu planowanego przejścia w tryb failover konta.
| Wartość |
Opis |
|
Standard_GRS
|
|
|
Standard_GZRS
|
|
|
Standard_RAGRS
|
|
|
Standard_RAGZRS
|
|
PrivateEndpoint
Objekt
Zasób prywatnego punktu końcowego.
| Nazwisko |
Typ |
Opis |
|
id
|
string
|
Identyfikator usługi ARM dla prywatnego punktu końcowego
|
PrivateEndpointConnection
Objekt
Zasób połączenia prywatnego punktu końcowego.
| Nazwisko |
Typ |
Opis |
|
id
|
string
(arm-id)
|
W pełni określony identyfikator zasobu dla tego zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
Nazwa zasobu
|
|
properties.privateEndpoint
|
PrivateEndpoint
|
Zasób prywatnego punktu końcowego.
|
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
Zbiór informacji o stanie połączenia między użytkownikiem usługi a dostawcą.
|
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
Stan aprowizacji zasobu połączenia prywatnego punktu końcowego.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProvisioningState
Wyliczenie
Bieżący stan aprowizacji.
| Wartość |
Opis |
|
Succeeded
|
|
|
Creating
|
|
|
Deleting
|
|
|
Failed
|
|
PrivateEndpointServiceConnectionStatus
Wyliczenie
Stan połączenia prywatnego punktu końcowego.
| Wartość |
Opis |
|
Pending
|
|
|
Approved
|
|
|
Rejected
|
|
PrivateLinkServiceConnectionState
Objekt
Zbiór informacji o stanie połączenia między użytkownikiem usługi a dostawcą.
| Nazwisko |
Typ |
Opis |
|
actionRequired
|
string
|
Komunikat wskazujący, czy zmiany u dostawcy usług wymagają aktualizacji odbiorcy.
|
|
description
|
string
|
Przyczyna zatwierdzenia/odrzucenia połączenia.
|
|
status
|
PrivateEndpointServiceConnectionStatus
|
Wskazuje, czy połączenie zostało zatwierdzone/odrzucone/usunięte przez właściciela usługi.
|
ProvisioningState
Wyliczenie
Pobiera stan konta magazynu w momencie wywołania operacji.
| Wartość |
Opis |
|
Creating
|
|
|
ResolvingDNS
|
|
|
Succeeded
|
|
PublicNetworkAccess
Wyliczenie
Zezwalaj, nie zezwalaj na konfigurację obwodu zabezpieczeń sieci lub zezwalaj na ocenę dostępu sieci publicznej do konta magazynu. Wartość jest opcjonalna, ale jeśli została przekazana, musi mieć wartość "Włączone", "Wyłączone" lub "SecuredByPerimeter".
| Wartość |
Opis |
|
Enabled
|
|
|
Disabled
|
|
|
SecuredByPerimeter
|
|
ResourceAccessRule
Objekt
Reguła dostępu do zasobów.
| Nazwisko |
Typ |
Opis |
|
resourceId
|
string
|
Identyfikator zasobu
|
|
tenantId
|
string
|
Identyfikator najemcy
|
RoutingChoice
Wyliczenie
Wybór routingu definiuje rodzaj routingu sieciowego wybranego przez użytkownika.
| Wartość |
Opis |
|
MicrosoftRouting
|
|
|
InternetRouting
|
|
RoutingPreference
Objekt
Preferencja routingu definiuje typ sieci, microsoft lub routing internetowy, który ma być używany do dostarczania danych użytkownika, domyślną opcją jest routing firmy Microsoft
| Nazwisko |
Typ |
Opis |
|
publishInternetEndpoints
|
boolean
|
Flaga logiczna wskazująca, czy punkty końcowe magazynu routingu internetowego mają być publikowane
|
|
publishMicrosoftEndpoints
|
boolean
|
Flaga logiczna wskazująca, czy punkty końcowe magazynu routingu firmy Microsoft mają być publikowane
|
|
routingChoice
|
RoutingChoice
|
Wybór routingu definiuje rodzaj routingu sieciowego wybranego przez użytkownika.
|
SasPolicy
Objekt
Sygnatura dostępu współdzielonego przypisana do konta magazynu.
| Nazwisko |
Typ |
Domyślna wartość |
Opis |
|
expirationAction
|
ExpirationAction
|
Log
|
Akcja wygaśnięcia sygnatury dostępu współdzielonego definiuje akcję, która ma być wykonywana, gdy naruszono element sasPolicy.sasExpirationPeriod. Akcja "Dziennik" może służyć do celów inspekcji, a akcja "Blokuj" może służyć do blokowania i odmowy użycia tokenów SAS, które nie są zgodne z okresem wygaśnięcia zasad sygnatury dostępu współdzielonego.
|
|
requireUserBoundUserDelegationSas
|
boolean
|
|
Wskazuje, czy tokeny delegacji SAS (wspólny podpis dostępu) muszą być powiązane z konkretnym użytkownikiem. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
requireUserBoundUserDelegationSasAction
|
PolicyViolationAction
|
|
Akcja wykonana, gdy token delegacji użytkownika SAS (podpis współdzielonego dostępu) nie jest powiązany z użytkownikiem, jak wymaga tego requireUserBoundUserDelegationSas.
|
|
sasExpirationPeriod
|
string
|
|
Okres wygaśnięcia sygnatury dostępu współdzielonego DD.HH:MM:SS.
|
ServiceSharedKeyAccessProperties
Objekt
Definiuje ustawienia dostępu do klucza współdzielonego dla pojedynczej usługi przechowywania danych.
| Nazwisko |
Typ |
Opis |
|
enabled
|
boolean
|
Wskazuje, czy dostęp do wspólnego klucza jest włączony dla usługi.
|
Sku
Objekt
Jednostka SKU konta magazynu.
| Nazwisko |
Typ |
Opis |
|
name
|
SkuName
|
Nazwa jednostki SKU. Wymagane do utworzenia konta; opcjonalnie do aktualizacji. Należy pamiętać, że w starszych wersjach nazwa jednostki SKU nosiła nazwę accountType.
|
|
tier
|
SkuTier
|
Poziom SKU. Jest to oparte na nazwie jednostki SKU.
|
SkuConversionStatus
Wyliczenie
Ta właściwość wskazuje bieżący stan konwersji jednostki SKU.
| Wartość |
Opis |
|
InProgress
|
|
|
Succeeded
|
|
|
Failed
|
|
SkuName
Wyliczenie
Nazwa jednostki SKU. Wymagane do utworzenia konta; opcjonalnie do aktualizacji. Należy pamiętać, że w starszych wersjach nazwa jednostki SKU nosiła nazwę accountType.
| Wartość |
Opis |
|
Standard_LRS
|
|
|
Standard_GRS
|
|
|
Standard_RAGRS
|
|
|
Standard_ZRS
|
|
|
Premium_LRS
|
|
|
Premium_ZRS
|
|
|
Standard_GZRS
|
|
|
Standard_RAGZRS
|
|
|
StandardV2_LRS
|
|
|
StandardV2_GRS
|
|
|
StandardV2_ZRS
|
|
|
StandardV2_GZRS
|
|
|
PremiumV2_LRS
|
|
|
PremiumV2_ZRS
|
|
SkuTier
Wyliczenie
Poziom SKU. Jest to oparte na nazwie jednostki SKU.
| Wartość |
Opis |
|
Standard
|
|
|
Premium
|
|
SmbOAuthSettings
Objekt
Ustawianie właściwości dostępu do tożsamości zarządzanej za pośrednictwem protokołu SMB przy użyciu protokołu OAuth
| Nazwisko |
Typ |
Opis |
|
isSmbOAuthEnabled
|
boolean
|
Określa, czy tożsamości zarządzane mogą uzyskiwać dostęp do udziałów SMB przy użyciu protokołu OAuth. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
State
Wyliczenie
Pobiera stan reguły sieci wirtualnej.
| Wartość |
Opis |
|
Provisioning
|
|
|
Deprovisioning
|
|
|
Succeeded
|
|
|
Failed
|
|
|
NetworkSourceDeleted
|
|
StorageAccount
Objekt
konto magazynowe
| Nazwisko |
Typ |
Opis |
|
extendedLocation
|
ExtendedLocation
|
ExtendedLocation zasobu.
|
|
id
|
string
(arm-id)
|
W pełni określony identyfikator zasobu dla tego zasobu. Np. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
Identity
|
Tożsamość zasobu.
|
|
kind
|
Kind
|
Pobiera rodzaj.
|
|
location
|
string
|
Lokalizacja geograficzna, w której znajduje się zasób
|
|
name
|
string
|
Nazwa zasobu
|
|
placement
|
Placement
|
Optional. Pobiera lub ustawia szczegóły umieszczania strefowego dla konta magazynu.
|
|
properties.accessTier
|
AccessTier
|
Wymagane dla kont magazynu, gdzie rodzaj = BlobStorage. Warstwa dostępu jest używana do rozliczeń. Warstwa dostępu "Premium" jest wartością domyślną dla typu konta magazynu blokowych obiektów blob w warstwie Premium i nie można jej zmienić dla typu konta magazynu blokowych obiektów blob w warstwie Premium.
|
|
properties.accountMigrationInProgress
|
boolean
|
Jeśli migracja konta zainicjowana przez klienta jest w toku, wartość będzie mieć wartość true, a wartość będzie mieć wartość null.
|
|
properties.allowBlobPublicAccess
|
boolean
|
Zezwalaj lub nie zezwalaj na publiczny dostęp do wszystkich obiektów blob lub kontenerów na koncie magazynu. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantDelegationSas
|
boolean
|
Zezwalaj lub zakazuj delegacji użytkowników użytkowników między AAD (SAS (sygnatura współdzielonego dostępu). Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantReplication
|
boolean
|
Zezwalaj na replikację obiektów dzierżawy usługi AAD lub nie zezwalaj na nie. Ustaw tę właściwość na wartość true dla nowych lub istniejących kont tylko wtedy, gdy zasady replikacji obiektów będą obejmować konta magazynu w różnych dzierżawach usługi AAD. Domyślna interpretacja jest fałszywa dla nowych kont, aby domyślnie przestrzegać najlepszych rozwiązań w zakresie zabezpieczeń.
|
|
properties.allowSharedKeyAccess
|
boolean
|
Wskazuje, czy konto magazynu zezwala na autoryzację żądań przy użyciu klucza dostępu do konta za pośrednictwem klucza współużytkowanego. Jeśli wartość false, wszystkie żądania, w tym sygnatury dostępu współdzielonego, muszą być autoryzowane za pomocą usługi Azure Active Directory (Azure AD). Wartość domyślna to null, która jest równoważna wartości true.
|
|
properties.allowSharedKeyAccessForServices
|
StorageAccountSharedKeyAccessProperties
|
Wskazywanie właściwości dostępu do klucza współdzielonego na poziomie usług
|
|
properties.allowedCopyScope
|
AllowedCopyScope
|
Ogranicz kopiowanie do i z kont magazynu w dzierżawie usługi AAD lub za pomocą linków prywatnych do tej samej sieci wirtualnej.
|
|
properties.azureFilesIdentityBasedAuthentication
|
AzureFilesIdentityBasedAuthentication
|
Udostępnia ustawienia uwierzytelniania opartego na tożsamościach dla usługi Azure Files.
|
|
properties.blobRestoreStatus
|
BlobRestoreStatus
|
Stan przywracania obiektu blob
|
|
properties.creationTime
|
string
(date-time)
|
Pobiera datę i godzinę utworzenia konta magazynu w formacie UTC.
|
|
properties.customDomain
|
CustomDomain
|
Pobiera domenę niestandardową przypisaną do tego konta magazynu.
|
|
properties.dataCollaborationPolicyProperties
|
StorageDataCollaborationPolicyProperties
|
Polityka Data Collaboration dla konta magazynowego.
|
|
properties.defaultToOAuthAuthentication
|
boolean
|
Flaga logiczna wskazująca, czy domyślne uwierzytelnianie to OAuth, czy nie. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.dnsEndpointType
|
DnsEndpointType
|
Umożliwia określenie typu punktu końcowego. Ustaw tę wartość na wartość AzureDNSZone, aby utworzyć dużą liczbę kont w jednej subskrypcji, która tworzy konta w strefie DNS platformy Azure, a adres URL punktu końcowego będzie miał alfanumeryczny identyfikator strefy DNS.
|
|
properties.dualStackEndpointPreference
|
DualStackEndpointPreference
|
Przechowuje informacje o protokole internetowym wybranym przez użytkownika.
|
|
properties.enableExtendedGroups
|
boolean
|
Włącza rozszerzoną obsługę grup z funkcją użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.encryption
|
Encryption
|
Ustawienia szyfrowania do użycia na potrzeby szyfrowania po stronie serwera dla konta magazynu.
|
|
properties.failoverInProgress
|
boolean
|
Jeśli tryb failover jest w toku, wartość będzie mieć wartość true, w przeciwnym razie będzie mieć wartość null.
|
|
properties.geoPriorityReplicationStatus
|
GeoPriorityReplicationStatus
|
Stan wskazujący, czy dla konta jest włączona replikacja z priorytetem geograficznym.
|
|
properties.geoReplicationStats
|
GeoReplicationStats
|
Statystyki replikacji geograficznej
|
|
properties.immutableStorageWithVersioning
|
ImmutableStorageAccount
|
Właściwość jest niezmienna i może być ustawiona tylko na wartość true w czasie tworzenia konta. Po ustawieniu wartości true włącza niezmienność na poziomie obiektu dla wszystkich kontenerów na koncie domyślnie.
|
|
properties.isHnsEnabled
|
boolean
|
Ustawienie HierarchicalNamespace konta jest włączone, jeśli ustawiono wartość true.
|
|
properties.isLocalUserEnabled
|
boolean
|
Włącza funkcję użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.isNfsV3Enabled
|
boolean
|
Obsługa protokołu NFS 3.0 jest włączona, jeśli ustawiono wartość true.
|
|
properties.isSftpEnabled
|
boolean
|
Włącza protokół bezpiecznego transferu plików, jeśli jest ustawiony na wartość true
|
|
properties.isSkuConversionBlocked
|
boolean
|
Ta właściwość zostanie ustawiona na wartość true lub false w przypadku trwającej migracji. Wartość domyślna to null.
|
|
properties.keyCreationTime
|
KeyCreationTime
|
Czas tworzenia kluczy konta magazynu.
|
|
properties.keyPolicy
|
KeyPolicy
|
KeyPolicy przypisana do konta magazynu.
|
|
properties.largeFileSharesState
|
LargeFileSharesState
|
Zezwalaj na duże udziały plików, jeśli zestawy mają wartość Włączone. Nie można go wyłączyć po jej włączeniu.
|
|
properties.lastGeoFailoverTime
|
string
(date-time)
|
Pobiera sygnaturę czasową ostatniego wystąpienia przejścia w tryb failover do lokalizacji pomocniczej. Zachowano tylko najnowszy znacznik czasu. Ten element nie jest zwracany, jeśli nigdy nie było wystąpienia trybu failover. Dostępne tylko wtedy, gdy parametr accountType jest Standard_GRS lub Standard_RAGRS.
|
|
properties.minimumTlsVersion
|
MinimumTlsVersion
|
Ustaw minimalną wersję protokołu TLS, która ma być dozwolona dla żądań do magazynu. Domyślna interpretacja to TLS 1.0 dla tej właściwości. Wersja Minimum TLS 1.3 nie jest obsługiwana.
|
|
properties.networkAcls
|
NetworkRuleSet
|
Zestaw reguł sieci
|
|
properties.primaryEndpoints
|
Endpoints
|
Pobiera adresy URL używane do pobierania publicznego obiektu blob, kolejki lub tabeli. Należy pamiętać, że konta Standard_ZRS i Premium_LRS zwracają tylko punkt końcowy obiektu blob.
|
|
properties.primaryLocation
|
string
|
Pobiera lokalizację podstawowego centrum danych dla konta magazynu.
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
Lista połączenia prywatnego punktu końcowego skojarzonego z określonym kontem magazynu
|
|
properties.provisioningState
|
ProvisioningState
|
Pobiera stan konta magazynu w momencie wywołania operacji.
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
Zezwalaj, nie zezwalaj na konfigurację obwodu zabezpieczeń sieci lub zezwalaj na ocenę dostępu sieci publicznej do konta magazynu.
|
|
properties.routingPreference
|
RoutingPreference
|
Utrzymuje informacje o wybranym routingu sieciowym wybranym przez użytkownika na potrzeby transferu danych
|
|
properties.sasPolicy
|
SasPolicy
|
Sygnatura dostępu współdzielonego przypisana do konta magazynu.
|
|
properties.secondaryEndpoints
|
Endpoints
|
Pobiera adresy URL używane do pobierania publicznego obiektu blob, kolejki lub tabeli z lokalizacji pomocniczej konta magazynu. Dostępne tylko wtedy, gdy nazwa jednostki SKU jest Standard_RAGRS.
|
|
properties.secondaryLocation
|
string
|
Pobiera lokalizację pomocniczej replikowanej geograficznie dla konta magazynu. Dostępne tylko wtedy, gdy parametr accountType jest Standard_GRS lub Standard_RAGRS.
|
|
properties.statusOfPrimary
|
AccountStatus
|
Pobiera stan wskazujący, czy lokalizacja podstawowa konta magazynu jest dostępna, czy niedostępna.
|
|
properties.statusOfSecondary
|
AccountStatus
|
Pobiera stan wskazujący, czy lokalizacja pomocnicza konta magazynu jest dostępna, czy niedostępna. Dostępne tylko wtedy, gdy nazwa jednostki SKU jest Standard_GRS lub Standard_RAGRS.
|
|
properties.storageAccountSkuConversionStatus
|
StorageAccountSkuConversionStatus
|
Ta właściwość jest odczytywana w trybie readOnly i jest ustawiana przez serwer podczas asynchronicznych operacji konwersji jednostki SKU konta magazynu.
|
|
properties.supportsHttpsTrafficOnly
|
boolean
|
Zezwala na ruch https tylko do usługi magazynu, jeśli ustawiono wartość true.
|
|
properties.turboTier
|
TurboTier
|
Konfiguruje Turbo Tier dla konta magazynowego.
|
|
sku
|
Sku
|
Pobiera jednostkę SKU.
|
|
systemData
|
systemData
|
Metadane usługi Azure Resource Manager zawierające informacje „createdBy” i „modifiedBy”.
|
|
tags
|
object
|
Tagi zasobów.
|
|
type
|
string
|
Typ zasobu. Np. "Microsoft.Compute/virtualMachines" lub "Microsoft.Storage/storageAccounts"
|
|
zones
|
string[]
|
Strefy dostępności.
|
StorageAccountCreateParameters
Objekt
Parametry używane podczas tworzenia konta magazynu.
| Nazwisko |
Typ |
Opis |
|
extendedLocation
|
ExtendedLocation
|
Optional. Ustaw rozszerzoną lokalizację zasobu. Jeśli nie zostanie ustawiona, konto magazynu zostanie utworzone w głównym regionie świadczenia usługi Azure. W przeciwnym razie zostanie utworzony w określonej lokalizacji rozszerzonej
|
|
identity
|
Identity
|
Tożsamość zasobu.
|
|
kind
|
Kind
|
Required. Wskazuje typ konta magazynu.
|
|
location
|
string
|
Required. Pobiera lub ustawia lokalizację zasobu. Będzie to jeden z obsługiwanych i zarejestrowanych regionów geograficznych platformy Azure (np. Zachodnie stany USA, Wschodnie stany USA, Azja Południowo-Wschodnia itp.). Nie można zmienić regionu geograficznego zasobu po jego utworzeniu, ale jeśli zostanie określony identyczny region geograficzny podczas aktualizacji, żądanie zakończy się pomyślnie.
|
|
placement
|
Placement
|
Optional. Pobiera lub ustawia szczegóły umieszczania strefowego dla konta magazynu.
|
|
properties.accessTier
|
AccessTier
|
Wymagane dla kont magazynu, gdzie rodzaj = BlobStorage. Warstwa dostępu jest używana do rozliczeń. Warstwa dostępu "Premium" jest wartością domyślną dla typu konta magazynu blokowych obiektów blob w warstwie Premium i nie można jej zmienić dla typu konta magazynu blokowych obiektów blob w warstwie Premium.
|
|
properties.allowBlobPublicAccess
|
boolean
|
Zezwalaj lub nie zezwalaj na publiczny dostęp do wszystkich obiektów blob lub kontenerów na koncie magazynu. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantDelegationSas
|
boolean
|
Zezwalaj lub zakazuj delegacji użytkowników użytkowników między AAD (SAS (sygnatura współdzielonego dostępu). Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.allowCrossTenantReplication
|
boolean
|
Zezwalaj na replikację obiektów dzierżawy usługi AAD lub nie zezwalaj na nie. Ustaw tę właściwość na wartość true dla nowych lub istniejących kont tylko wtedy, gdy zasady replikacji obiektów będą obejmować konta magazynu w różnych dzierżawach usługi AAD. Domyślna interpretacja jest fałszywa dla nowych kont, aby domyślnie przestrzegać najlepszych rozwiązań w zakresie zabezpieczeń.
|
|
properties.allowSharedKeyAccess
|
boolean
|
Wskazuje, czy konto magazynu zezwala na autoryzację żądań przy użyciu klucza dostępu do konta za pośrednictwem klucza współużytkowanego. Jeśli wartość false, wszystkie żądania, w tym sygnatury dostępu współdzielonego, muszą być autoryzowane za pomocą usługi Azure Active Directory (Azure AD). Wartość domyślna to null, która jest równoważna wartości true.
|
|
properties.allowSharedKeyAccessForServices
|
StorageAccountSharedKeyAccessProperties
|
Wskazywanie właściwości dostępu do klucza współdzielonego na poziomie usług
|
|
properties.allowedCopyScope
|
AllowedCopyScope
|
Ogranicz kopiowanie do i z kont magazynu w dzierżawie usługi AAD lub za pomocą linków prywatnych do tej samej sieci wirtualnej.
|
|
properties.azureFilesIdentityBasedAuthentication
|
AzureFilesIdentityBasedAuthentication
|
Udostępnia ustawienia uwierzytelniania opartego na tożsamościach dla usługi Azure Files.
|
|
properties.customDomain
|
CustomDomain
|
Domena użytkownika przypisana do konta magazynu. Nazwa to źródło CNAME. Obecnie na konto magazynu jest obsługiwana tylko jedna domena niestandardowa. Aby wyczyścić istniejącą domenę niestandardową, użyj pustego ciągu dla właściwości niestandardowej nazwy domeny.
|
|
properties.dataCollaborationPolicyProperties
|
StorageDataCollaborationPolicyProperties
|
Polityka Data Collaboration dla konta magazynowego.
|
|
properties.defaultToOAuthAuthentication
|
boolean
|
Flaga logiczna wskazująca, czy domyślne uwierzytelnianie to OAuth, czy nie. Domyślna interpretacja jest fałszywa dla tej właściwości.
|
|
properties.dnsEndpointType
|
DnsEndpointType
|
Umożliwia określenie typu punktu końcowego. Ustaw tę wartość na wartość AzureDNSZone, aby utworzyć dużą liczbę kont w jednej subskrypcji, która tworzy konta w strefie DNS platformy Azure, a adres URL punktu końcowego będzie miał alfanumeryczny identyfikator strefy DNS.
|
|
properties.dualStackEndpointPreference
|
DualStackEndpointPreference
|
Przechowuje informacje o protokole internetowym wybranym przez użytkownika.
|
|
properties.enableExtendedGroups
|
boolean
|
Włącza rozszerzoną obsługę grup z funkcją użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.encryption
|
Encryption
|
Ustawienia szyfrowania do użycia na potrzeby szyfrowania po stronie serwera dla konta magazynu.
|
|
properties.geoPriorityReplicationStatus
|
GeoPriorityReplicationStatus
|
Stan wskazujący, czy dla konta jest włączona replikacja z priorytetem geograficznym.
|
|
properties.immutableStorageWithVersioning
|
ImmutableStorageAccount
|
Właściwość jest niezmienna i może być ustawiona tylko na wartość true w czasie tworzenia konta. Po ustawieniu wartości true włącza niezmienność na poziomie obiektu dla wszystkich nowych kontenerów na koncie domyślnie.
|
|
properties.isHnsEnabled
|
boolean
|
Ustawienie HierarchicalNamespace konta jest włączone, jeśli ustawiono wartość true.
|
|
properties.isLocalUserEnabled
|
boolean
|
Włącza funkcję użytkowników lokalnych, jeśli ustawiono wartość true
|
|
properties.isNfsV3Enabled
|
boolean
|
Obsługa protokołu NFS 3.0 jest włączona, jeśli ustawiono wartość true.
|
|
properties.isSftpEnabled
|
boolean
|
Włącza protokół bezpiecznego transferu plików, jeśli jest ustawiony na wartość true
|
|
properties.keyPolicy
|
KeyPolicy
|
KeyPolicy przypisana do konta magazynu.
|
|
properties.largeFileSharesState
|
LargeFileSharesState
|
Zezwalaj na duże udziały plików, jeśli zestawy mają wartość Włączone. Nie można go wyłączyć po jej włączeniu.
|
|
properties.minimumTlsVersion
|
MinimumTlsVersion
|
Ustaw minimalną wersję protokołu TLS, która ma być dozwolona dla żądań do magazynu. Domyślna interpretacja to TLS 1.0 dla tej właściwości. Wersja Minimum TLS 1.3 nie jest obsługiwana.
|
|
properties.networkAcls
|
NetworkRuleSet
|
Zestaw reguł sieci
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
Zezwalaj, nie zezwalaj na konfigurację obwodu zabezpieczeń sieci lub zezwalaj na ocenę dostępu sieci publicznej do konta magazynu. Wartość jest opcjonalna, ale jeśli została przekazana, musi mieć wartość "Włączone", "Wyłączone" lub "SecuredByPerimeter".
|
|
properties.routingPreference
|
RoutingPreference
|
Utrzymuje informacje o wybranym routingu sieciowym wybranym przez użytkownika na potrzeby transferu danych
|
|
properties.sasPolicy
|
SasPolicy
|
Sygnatura dostępu współdzielonego przypisana do konta magazynu.
|
|
properties.supportsHttpsTrafficOnly
|
boolean
|
Zezwala na ruch https tylko do usługi magazynu, jeśli ustawiono wartość true. Wartość domyślna jest prawdziwa od wersji interfejsu API 2019-04-01.
|
|
properties.turboTier
|
TurboTier
|
Konfiguruje Turbo Tier dla konta magazynowego.
|
|
sku
|
Sku
|
Required. Pobiera lub ustawia nazwę SKU.
|
|
tags
|
object
|
Pobiera lub ustawia listę par klucz-wartość, które opisują zasób. Te tagi mogą służyć do wyświetlania i grupowania tego zasobu (między grupami zasobów). Dla zasobu można podać maksymalnie 15 tagów. Każdy tag musi mieć klucz o długości nie większej niż 128 znaków i wartości o długości nie większej niż 256 znaków.
|
|
zones
|
string[]
|
Optional. Pobiera lub ustawia przypiętą strefę dostępności logicznej dla konta magazynu.
|
StorageAccountInternetEndpoints
Objekt
Identyfikatory URI używane do pobierania publicznego obiektu blob, pliku, sieci Web lub dfs za pośrednictwem punktu końcowego routingu internetowego.
| Nazwisko |
Typ |
Opis |
|
blob
|
string
|
Pobiera punkt końcowy obiektu blob.
|
|
dfs
|
string
|
Pobiera punkt końcowy systemu plików dfs.
|
|
file
|
string
|
Pobiera punkt końcowy pliku.
|
|
web
|
string
|
Pobiera internetowy punkt końcowy.
|
StorageAccountIpv6Endpoints
Objekt
Identyfikatory URI, które są używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub obiektu dfs za pośrednictwem punktu końcowego IPv6.
| Nazwisko |
Typ |
Opis |
|
blob
|
string
|
Pobiera punkt końcowy obiektu blob.
|
|
dfs
|
string
|
Pobiera punkt końcowy systemu plików dfs.
|
|
file
|
string
|
Pobiera punkt końcowy pliku.
|
|
internetEndpoints
|
StorageAccountInternetEndpoints
|
Pobiera punkty końcowe magazynu routingu internetowego
|
|
microsoftEndpoints
|
StorageAccountMicrosoftEndpoints
|
Pobiera punkty końcowe magazynu routingu firmy Microsoft.
|
|
queue
|
string
|
Pobiera punkt końcowy kolejki.
|
|
table
|
string
|
Pobiera punkt końcowy tabeli.
|
|
web
|
string
|
Pobiera internetowy punkt końcowy.
|
StorageAccountMicrosoftEndpoints
Objekt
Identyfikatory URI używane do pobierania publicznego obiektu blob, kolejki, tabeli, sieci Web lub dfs za pośrednictwem punktu końcowego routingu firmy Microsoft.
| Nazwisko |
Typ |
Opis |
|
blob
|
string
|
Pobiera punkt końcowy obiektu blob.
|
|
dfs
|
string
|
Pobiera punkt końcowy systemu plików dfs.
|
|
file
|
string
|
Pobiera punkt końcowy pliku.
|
|
queue
|
string
|
Pobiera punkt końcowy kolejki.
|
|
table
|
string
|
Pobiera punkt końcowy tabeli.
|
|
web
|
string
|
Pobiera internetowy punkt końcowy.
|
StorageAccountSharedKeyAccessProperties
Objekt
Definiuje właściwości dostępu do wspólnego klucza dla konta pamięci masowej.
StorageAccountSkuConversionStatus
Objekt
Definiuje obiekt stanu konwersji jednostki SKU dla konwersji jednostki SKU asynchronicznej.
| Nazwisko |
Typ |
Opis |
|
endTime
|
string
|
Ta właściwość reprezentuje czas zakończenia konwersji jednostki SKU.
|
|
skuConversionStatus
|
SkuConversionStatus
|
Ta właściwość wskazuje bieżący stan konwersji jednostki SKU.
|
|
startTime
|
string
|
Ta właściwość reprezentuje czas rozpoczęcia konwersji jednostki SKU.
|
|
targetSkuName
|
SkuName
|
Ta właściwość reprezentuje docelową nazwę jednostki SKU, do której jednostka SKU konta jest konwertowana asynchronicznie.
|
StorageDataCollaborationPolicyProperties
Objekt
Definiuje Politykę Współpracy Danych dla konta magazynowego.
| Nazwisko |
Typ |
Opis |
|
allowBlobAccessPoints
|
boolean
|
Wskazuje, czy konfiguracje punktów dostępu Blob mogą być tworzone lub zarządzane na koncie pamięci masowej.
|
|
allowCrossTenantDataSharing
|
boolean
|
Wskazuje, czy udostępnianie danych między tenantami jest dozwolone na koncie pamięci.
|
|
allowStorageConnectors
|
boolean
|
Wskazuje, czy konektory pamięci masowej mogą być tworzone lub zarządzane na koncie pamięci.
|
|
allowStorageDataShares
|
boolean
|
Wskazuje, czy udostępnione dane mogą być tworzone lub zarządzane na koncie pamięci.
|
systemData
Objekt
Metadane dotyczące tworzenia i ostatniej modyfikacji zasobu.
| Nazwisko |
Typ |
Opis |
|
createdAt
|
string
(date-time)
|
Sygnatura czasowa tworzenia zasobu (UTC).
|
|
createdBy
|
string
|
Tożsamość, która utworzyła zasób.
|
|
createdByType
|
createdByType
|
Typ tożsamości, która utworzyła zasób.
|
|
lastModifiedAt
|
string
(date-time)
|
Znacznik czasu ostatniej modyfikacji zasobu (UTC)
|
|
lastModifiedBy
|
string
|
Tożsamość, która ostatnio zmodyfikowała zasób.
|
|
lastModifiedByType
|
createdByType
|
Typ tożsamości, która ostatnio zmodyfikowała zasób.
|
TurboTier
Objekt
Konfiguruje Turbo Tier dla konta magazynowego.
| Nazwisko |
Typ |
Opis |
|
status
|
TurboTierStatus
|
Wskazuje, czy Turbo Tier jest włączony czy wyłączony.
|
|
targetPercent
|
integer
(int32)
minimum: 10 maximum: 100
|
Procentowy wynik napełnienia celów używany do umieszczania. Ważny zakres to 10 do 100. Gdy status jest włączony, a ta właściwość jest pomijana, domyślna wartość wynosi 20.
|
TurboTierStatus
Wyliczenie
Wskazuje, czy Turbo Tier jest włączony czy wyłączony.
| Wartość |
Opis |
|
Enabled
|
Turbo Tier jest włączony.
|
|
Disabled
|
Turbo Tier jest wyłączony.
|
UserAssignedIdentity
Objekt
UserAssignedIdentity dla zasobu.
| Nazwisko |
Typ |
Opis |
|
clientId
|
string
|
Identyfikator klienta tożsamości.
|
|
principalId
|
string
|
Identyfikator podmiotu zabezpieczeń tożsamości.
|
VirtualNetworkRule
Objekt
Reguła sieci wirtualnej.
| Nazwisko |
Typ |
Opis |
|
action
|
enum:
Allow
|
Akcja reguły sieci wirtualnej.
|
|
id
|
string
|
Identyfikator zasobu podsieci, na przykład: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
|
|
state
|
State
|
Pobiera stan reguły sieci wirtualnej.
|
ZonePlacementPolicy
Wyliczenie
Zasady przypinania strefy dostępności dla konta magazynu.