指定されたパラメーターを使用して新しいストレージ アカウントを非同期的に作成します。 アカウントが既に作成されており、後続の作成要求が異なるプロパティで発行された場合、アカウントのプロパティは更新されます。 アカウントが既に作成されており、後続の作成または更新要求がまったく同じプロパティセットで発行された場合、要求は成功します。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}?api-version=2026-09-01
URI パラメーター
| Name |
/ |
必須 |
型 |
説明 |
|
accountName
|
path |
True
|
string
minLength: 3 maxLength: 24 pattern: ^[a-z0-9]+$
|
指定したリソース グループ内のストレージ アカウントの名前。 ストレージ アカウント名の長さは 3 ~ 24 文字で、数字と小文字のみを使用する必要があります。
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
リソース グループの名前。 名前は大文字と小文字を区別しません。
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ターゲット サブスクリプションの ID。 値は UUID である必要があります。
|
|
api-version
|
query |
True
|
string
minLength: 1
|
この操作に使用する API バージョン。
|
要求本文
| Name |
必須 |
型 |
説明 |
|
kind
|
True
|
Kind
|
Required. ストレージ アカウントの種類を示します。
|
|
location
|
True
|
string
|
Required. リソースの場所を取得または設定します。 これは、サポートされ、登録されている Azure Geo リージョンの 1 つになります (例: 米国西部、米国東部、東南アジアなど)。 リソースの geo リージョンは一度作成した後は変更できませんが、更新時に同じ geo リージョンが指定されている場合、要求は成功します。
|
|
sku
|
True
|
Sku
|
Required. SKU 名を取得または設定します。
|
|
extendedLocation
|
|
ExtendedLocation
|
Optional. リソースの拡張場所を設定します。 設定されていない場合、ストレージ アカウントは Azure メイン リージョンに作成されます。 それ以外の場合は、指定した拡張場所に作成されます
|
|
identity
|
|
Identity
|
リソースの ID。
|
|
placement
|
|
Placement
|
Optional. ストレージ アカウントのゾーン配置の詳細を取得または設定します。
|
|
properties.accessTier
|
|
AccessTier
|
種類が BlobStorage であるストレージ アカウントに必要です。 アクセス層は課金に使用されます。 "Premium" アクセス層は Premium ブロック BLOB ストレージ アカウントの種類の既定値であり、Premium ブロック BLOB ストレージ アカウントの種類に対しては変更できません。
|
|
properties.allowBlobPublicAccess
|
|
boolean
|
ストレージ アカウント内のすべての BLOB またはコンテナーへのパブリック アクセスを許可または禁止します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantDelegationSas
|
|
boolean
|
AAD間のテナントユーザー委任SAS(共有アクセス署名)を許可または拒否します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantReplication
|
|
boolean
|
AAD テナント 間のオブジェクト レプリケーションを許可または禁止します。 オブジェクト レプリケーション ポリシーに異なる AAD テナントのストレージ アカウントが含まれる場合にのみ、新規または既存のアカウントに対してこのプロパティを true に設定します。 既定では、新しいアカウントがベスト セキュリティ プラクティスに従う場合、既定の解釈は false です。
|
|
properties.allowSharedKeyAccess
|
|
boolean
|
ストレージ アカウントが、共有キーを介してアカウント アクセス キーを使用して承認される要求を許可するかどうかを示します。 false の場合、Shared Access Signature を含むすべての要求が Azure Active Directory (Azure AD) で承認されている必要があります。 既定値は null で、true と同じです。
|
|
properties.allowSharedKeyAccessForServices
|
|
StorageAccountSharedKeyAccessProperties
|
サービスレベルで共有キーアクセスプロパティを示します
|
|
properties.allowedCopyScope
|
|
AllowedCopyScope
|
AAD テナント内またはプライベート リンクを使用して、同じ VNet へのストレージ アカウントとの間のコピーを制限します。
|
|
properties.azureFilesIdentityBasedAuthentication
|
|
AzureFilesIdentityBasedAuthentication
|
Azure Files の ID ベースの認証設定を提供します。
|
|
properties.customDomain
|
|
CustomDomain
|
ストレージ アカウントに割り当てられたユーザー ドメイン。 名前は CNAME ソースです。 現時点では、ストレージ アカウントごとに 1 つのカスタム ドメインのみがサポートされています。 既存のカスタム ドメインをクリアするには、カスタム ドメイン名プロパティに空の文字列を使用します。
|
|
properties.dataCollaborationPolicyProperties
|
|
StorageDataCollaborationPolicyProperties
|
ストレージアカウントのデータコラボレーションポリシー。
|
|
properties.defaultToOAuthAuthentication
|
|
boolean
|
既定の認証が OAuth かどうかを示すブール値フラグ。 このプロパティの既定の解釈は false です。
|
|
properties.dnsEndpointType
|
|
DnsEndpointType
|
エンドポイントの種類を指定できます。 これを AzureDNSZone に設定すると、1 つのサブスクリプションに多数のアカウントが作成されます。これにより、Azure DNS ゾーンにアカウントが作成され、エンドポイント URL に英数字の DNS ゾーン識別子が設定されます。
|
|
properties.dualStackEndpointPreference
|
|
DualStackEndpointPreference
|
ユーザーが選択したインターネットプロトコルに関する情報を保持します。
|
|
properties.enableExtendedGroups
|
|
boolean
|
true に設定されている場合は、ローカル ユーザー機能を使用してグループの拡張サポートを有効にします
|
|
properties.encryption
|
|
Encryption
|
ストレージ アカウントのサーバー側暗号化に使用する暗号化設定。
|
|
properties.geoPriorityReplicationStatus
|
|
GeoPriorityReplicationStatus
|
アカウントに対して Geo Priority Replication が有効になっているかどうかを示すステータス。
|
|
properties.immutableStorageWithVersioning
|
|
ImmutableStorageAccount
|
プロパティは不変であり、アカウント作成時にのみ true に設定できます。 true に設定すると、アカウント内のすべての新しいコンテナーに対してオブジェクト レベルの不変性が既定で有効になります。
|
|
properties.isHnsEnabled
|
|
boolean
|
アカウント HierarchyNamespace が true に設定されている場合に有効になります。
|
|
properties.isLocalUserEnabled
|
|
boolean
|
ローカル ユーザー機能を有効にします (true に設定されている場合)
|
|
properties.isNfsV3Enabled
|
|
boolean
|
TRUE に設定されている場合、NFS 3.0 プロトコルのサポートが有効になります。
|
|
properties.isSftpEnabled
|
|
boolean
|
セキュリティで保護されたファイル転送プロトコルを有効にします (true に設定されている場合)
|
|
properties.keyPolicy
|
|
KeyPolicy
|
ストレージ アカウントに割り当てられた KeyPolicy。
|
|
properties.largeFileSharesState
|
|
LargeFileSharesState
|
[有効] に設定されている場合は、大きなファイル共有を許可します。 一度有効にした後は無効にできません。
|
|
properties.minimumTlsVersion
|
|
MinimumTlsVersion
|
ストレージへの要求で許可される最小 TLS バージョンを設定します。 このプロパティの既定の解釈は TLS 1.0 です。 最低TLSバージョン1.3はサポートされていません。
|
|
properties.networkAcls
|
|
NetworkRuleSet
|
ネットワーク ルール セット
|
|
properties.publicNetworkAccess
|
|
PublicNetworkAccess
|
ストレージ アカウントへのパブリック ネットワーク アクセスを評価するために、ネットワーク セキュリティ境界構成を許可、禁止、または許可します。 値は省略可能ですが、渡される場合は'Enabled'、'Disabled'、または 'SecuredByPerimeter' である必要があります。
|
|
properties.routingPreference
|
|
RoutingPreference
|
ユーザーがデータ転送を選択したネットワーク ルーティングの選択に関する情報を保持します
|
|
properties.sasPolicy
|
|
SasPolicy
|
ストレージ アカウントに割り当てられた SasPolicy。
|
|
properties.supportsHttpsTrafficOnly
|
|
boolean
|
true に設定されている場合にのみ、ストレージ サービスへの https トラフィックを許可します。 API バージョン 2019-04-01 以降、既定値は true です。
|
|
properties.turboTier
|
|
TurboTier
|
ストレージアカウントのTurbo Tierを設定します。
|
|
tags
|
|
object
|
リソースを記述するキー値ペアの一覧を取得または設定します。 これらのタグは、(リソース グループ間で) このリソースを表示およびグループ化するために使用できます。 リソースには最大 15 個のタグを指定できます。 各タグには、長さが 128 文字以下のキーと、長さが 256 文字以下の値が必要です。
|
|
zones
|
|
string[]
|
Optional. ストレージ アカウントのピン留めされた論理可用性ゾーンを取得または設定します。
|
応答
| Name |
型 |
説明 |
|
200 OK
|
StorageAccount
|
リソース 'StorageAccount' の更新操作が成功しました
|
|
202 Accepted
|
|
リソース操作が受け入れられます。
ヘッダー
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
予期しないエラー応答。
|
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
| Name |
説明 |
|
user_impersonation
|
あなたのユーザー アカウントになりすます
|
例
NfsV3AccountCreate
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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.
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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
要求のサンプル
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
応答のサンプル
{
"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"
}
定義
AccessTier
列挙
ストレージアカウント内のブロックブロブのデフォルトのアクセス層です。 種類が BlobStorage であるストレージ アカウントに必要です。 詳細については、「https://learn.microsoft.com/azure/storage/blobs/access-tiers-overview」を参照してください。
| 値 |
説明 |
|
Hot
|
|
|
Cool
|
|
|
Premium
|
|
|
Cold
|
|
|
Smart
|
|
AccountImmutabilityPolicyProperties
Object
これにより、アカウント レベルの不変ポリシー プロパティが定義されます。
| Name |
型 |
説明 |
|
allowProtectedAppendWrites
|
boolean
|
このプロパティは、無効でロック解除された時間ベースのアイテム保持ポリシーに対してのみ変更できます。 有効にすると、不変性の保護とコンプライアンスを維持しながら、新しいブロックを追加 BLOB に書き込むことができます。 新しいブロックのみを追加でき、既存のブロックは変更または削除できません。
|
|
immutabilityPeriodSinceCreationInDays
|
integer
(int32)
minimum: 1 maximum: 146000
|
ポリシーの作成以降のコンテナー内の BLOB の不変期間 (日数)。
|
|
state
|
AccountImmutabilityPolicyState
|
ImmutabilityPolicy 状態は、ポリシーのモードを定義します。 無効な状態はポリシーを無効にし、ロック解除状態では不変保持時間の増減が可能になり、allowProtectedAppendWrites プロパティを切り替えることができます。ロック状態では不変保持時間の増加のみが許可されます。 ポリシーは、無効またはロック解除状態でのみ作成でき、2 つの状態を切り替えることができます。 ロック解除状態のポリシーのみが、元に戻すことができないロック状態に移行できます。
|
AccountImmutabilityPolicyState
列挙
ImmutabilityPolicy 状態は、ポリシーのモードを定義します。 無効な状態はポリシーを無効にし、ロック解除状態では不変保持時間の増減が可能になり、allowProtectedAppendWrites プロパティを切り替えることができます。ロック状態では不変保持時間の増加のみが許可されます。 ポリシーは、無効またはロック解除状態でのみ作成でき、2 つの状態を切り替えることができます。 ロック解除状態のポリシーのみが、元に戻すことができないロック状態に移行できます。
| 値 |
説明 |
|
Unlocked
|
|
|
Locked
|
|
|
Disabled
|
|
AccountStatus
列挙
ストレージ アカウントのプライマリの場所が使用可能か使用不可かを示す状態を取得します。
| 値 |
説明 |
|
available
|
|
|
unavailable
|
|
AccountType
列挙
Azure Storage の Active Directory アカウントの種類を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは省略可能です。 指定する場合は、samAccountName も指定する必要があります。 directoryServiceOptions AADDS (Entra DS 認証) または AADKERB (Entra 認証) の場合、このプロパティは省略できます。
ActiveDirectoryProperties
Object
Active Directory (AD) の設定プロパティ。
| Name |
型 |
説明 |
|
accountType
|
AccountType
|
Azure Storage の Active Directory アカウントの種類を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは省略可能です。 指定する場合は、samAccountName も指定する必要があります。 directoryServiceOptions AADDS (Entra DS 認証) または AADKERB (Entra 認証) の場合、このプロパティは省略できます。
|
|
azureStorageSid
|
string
|
Azure Storage のセキュリティ識別子 (SID) を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは必須です。 それ以外の場合は、省略できます。
|
|
domainGuid
|
string
|
ドメイン GUID を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは必須です。 directoryServiceOptions が AADDS (Entra DS 認証) に設定されている場合、このプロパティは省略できます。 directoryServiceOptions が AADKERB (Entra 認証) に設定されている場合、このプロパティはオプションです。これは、Windows ファイル エクスプローラーによるディレクトリ レベルおよびファイル レベルのアクセス許可の構成をサポートするために必要ですが、認証には必要ありません。
|
|
domainName
|
string
|
AD DNS サーバーが権限を持つプライマリ ドメインを指定します。 このプロパティは、directoryServiceOptions が AD (AD DS 認証) に設定されている場合に必要です。 directoryServiceOptions が AADDS (Entra DS 認証) に設定されている場合、このプロパティの指定は省略可能です。省略すると自動的に推論されます。 directoryServiceOptions が AADKERB (Entra 認証) に設定されている場合、このプロパティはオプションです。これは、Windows ファイル エクスプローラーによるディレクトリ レベルおよびファイル レベルのアクセス許可の構成をサポートするために必要ですが、認証には必要ありません。
|
|
domainSid
|
string
|
AD ドメインのセキュリティ識別子 (SID) を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは必須です。 それ以外の場合は、省略できます。
|
|
forestName
|
string
|
取得する Active Directory フォレストを指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは必須です。 それ以外の場合は、省略できます。
|
|
netBiosDomainName
|
string
|
NetBIOS ドメイン名を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは必須です。 それ以外の場合は、省略できます。
|
|
samAccountName
|
string
|
Azure Storage の Active Directory SAMAccountName を指定します。 directoryServiceOptions が AD (AD DS 認証) に設定されている場合、このプロパティは省略可能です。 指定する場合は、accountType も指定する必要があります。 directoryServiceOptions AADDS (Entra DS 認証) または AADKERB (Entra 認証) の場合、このプロパティは省略できます。
|
AllowedCopyScope
列挙
AAD テナント内またはプライベート リンクを使用して、同じ VNet へのストレージ アカウントとの間のコピーを制限します。
AzureFilesIdentityBasedAuthentication
Object
Azure Files ID ベースの認証の設定。
| Name |
型 |
説明 |
|
activeDirectoryProperties
|
ActiveDirectoryProperties
|
ディレクトリサービスに関する追加情報。 directoryServiceOptions が AD (AD DS 認証) の場合は必須です。 directoryServiceOptions AADDS (Entra DS 認証) と AADKERB (Entra 認証) のオプション。
|
|
defaultSharePermission
|
DefaultSharePermission
|
RBAC ロールが割り当てられない場合、Kerberos 認証を使用するユーザーの既定の共有アクセス許可。
|
|
directoryServiceOptions
|
DirectoryServiceOptions
|
使用されるディレクトリ サービスを示します。 この列挙型は将来拡張される可能性があることに注意してください。
|
|
smbOAuthSettings
|
SmbOAuthSettings
|
OAuth over SMB を使用したマネージド ID アクセスに必要です。
|
BlobRestoreParameters
Object
BLOB 復元パラメーター
| Name |
型 |
説明 |
|
blobRanges
|
BlobRestoreRange[]
|
復元する BLOB 範囲。
|
|
timeToRestore
|
string
(date-time)
|
BLOB を指定した時刻に復元します。
|
BlobRestoreProgressStatus
列挙
BLOB の復元の進行状況の状態。 指定できる値は次のとおりです。- InProgress: BLOB の復元が進行中であることを示します。 - 完了: BLOB の復元が正常に完了したことを示します。 - 失敗: BLOB の復元が失敗したことを示します。
| 値 |
説明 |
|
InProgress
|
|
|
Complete
|
|
|
Failed
|
|
BlobRestoreRange
Object
BLOB 範囲
| Name |
型 |
説明 |
|
endRange
|
string
|
BLOB の終了範囲。 これは排他的です。 空はアカウント終了を意味します。
|
|
startRange
|
string
|
BLOB の開始範囲。 これは包含値です。 空はアカウント開始を意味します。
|
BlobRestoreStatus
Object
BLOB 復元の状態。
| Name |
型 |
説明 |
|
failureReason
|
string
|
BLOB の復元が失敗した場合のエラーの理由。
|
|
parameters
|
BlobRestoreParameters
|
BLOB 復元要求パラメーター。
|
|
restoreId
|
string
|
BLOB 復元要求を追跡するための ID。
|
|
status
|
BlobRestoreProgressStatus
|
BLOB の復元の進行状況の状態。 指定できる値は次のとおりです。- InProgress: BLOB の復元が進行中であることを示します。 - 完了: BLOB の復元が正常に完了したことを示します。 - 失敗: BLOB の復元が失敗したことを示します。
|
Bypass
列挙
ログ/メトリック/AzureServices にトラフィックをバイパスするかどうかを指定します。 使用可能な値は、ログ記録の任意の組み合わせです。メトリック|AzureServices ("ログ記録、メトリック" など)、または None を使用して、これらのトラフィックをバイパスしません。
| 値 |
説明 |
|
None
|
|
|
Logging
|
|
|
Metrics
|
|
|
AzureServices
|
|
createdByType
列挙
リソースを作成した ID の種類。
| 値 |
説明 |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
CustomDomain
Object
このストレージ アカウントに割り当てられているカスタム ドメイン。 これは、Update を使用して設定できます。
| Name |
型 |
説明 |
|
name
|
string
|
ストレージ アカウントに割り当てられたカスタム ドメイン名を取得または設定します。 名前は CNAME ソースです。
|
|
useSubDomainName
|
boolean
|
間接 CName 検証が有効かどうかを示します。 既定値は false です。 これは、更新時にのみ設定する必要があります。
|
DefaultAction
列挙
他のルールが一致しない場合の許可または拒否の既定のアクションを指定します。
DefaultSharePermission
列挙
RBAC ロールが割り当てられない場合、Kerberos 認証を使用するユーザーの既定の共有アクセス許可。
| 値 |
説明 |
|
None
|
|
|
StorageFileDataSmbShareReader
|
|
|
StorageFileDataSmbShareContributor
|
|
|
StorageFileDataSmbShareElevatedContributor
|
|
DirectoryServiceOptions
列挙
使用されるディレクトリ サービスを示します。 この列挙型は将来拡張される可能性があることに注意してください。
| 値 |
説明 |
|
None
|
|
|
AADDS
|
|
|
AD
|
|
|
AADKERB
|
|
DnsEndpointType
列挙
エンドポイントの種類を指定できます。 これを AzureDNSZone に設定すると、1 つのサブスクリプションに多数のアカウントが作成されます。これにより、Azure DNS ゾーンにアカウントが作成され、エンドポイント URL に英数字の DNS ゾーン識別子が設定されます。
| 値 |
説明 |
|
Standard
|
|
|
AzureDnsZone
|
|
DualStackEndpointPreference
Object
デュアルスタックエンドポイント設定は、IPv6 エンドポイントを公開するかどうかを定義します。
| Name |
型 |
説明 |
|
publishIpv6Endpoint
|
boolean
|
IPv6 ストレージエンドポイントを公開するかどうかを示すブールフラグ。
|
Encryption
Object
ストレージ アカウントの暗号化設定。
| Name |
型 |
規定値 |
説明 |
|
identity
|
EncryptionIdentity
|
|
保存時のサービス側暗号化で使用する ID。
|
|
keySource
|
KeySource
|
Microsoft.Storage
|
暗号化 keySource (プロバイダー)。 使用可能な値 (大文字と小文字を区別): Microsoft.Storage、Microsoft.Keyvault
|
|
keyvaultproperties
|
KeyVaultProperties
|
|
キー コンテナーによって提供されるプロパティ。
|
|
requireInfrastructureEncryption
|
boolean
|
|
サービスが保存データのプラットフォーム マネージド キーを使用して暗号化のセカンダリ レイヤーを適用するかどうかを示すブール値。
|
|
services
|
EncryptionServices
|
|
暗号化をサポートするサービスの一覧。
|
EncryptionIdentity
Object
ストレージ アカウントの暗号化 ID。
| Name |
型 |
説明 |
|
federatedIdentityClientId
|
string
|
ストレージ アカウントでのクロステナントカスタマー マネージド キー サーバー側暗号化のユーザー割り当て ID と組み合わせて使用するマルチテナント アプリケーションの ClientId。
|
|
userAssignedIdentity
|
string
|
ストレージ アカウントのサーバー側暗号化に関連付けられる UserAssigned ID のリソース識別子。
|
EncryptionService
Object
サーバー側の暗号化を使用できるようにするサービス。
| Name |
型 |
説明 |
|
enabled
|
boolean
|
サービスが格納時にデータを暗号化するかどうかを示すブール値。 保存時の暗号化は現在既定で有効になっており、無効にすることはできません。
|
|
keyType
|
KeyType
|
暗号化サービスに使用する暗号化キーの種類。 "Account" キーの種類は、アカウント スコープの暗号化キーが使用されることを意味します。 "サービス" キーの種類は、既定のサービス キーが使用されることを意味します。
|
|
lastEnabledTime
|
string
(date-time)
|
ユーザーが最後に暗号化を有効にした日付/時刻の大まかな見積もりを取得します。 現在、データは保存時に暗号化され、無効にすることはできません。
|
EncryptionServices
Object
暗号化をサポートするサービスの一覧。
Endpoints
Object
パブリック BLOB、キュー、テーブル、Web、または dfs オブジェクトの取得を実行するために使用される URI。
ErrorResponse
Object
ストレージ リソース プロバイダーからのエラー応答。
| Name |
型 |
説明 |
|
error
|
ErrorResponseBody
|
Azure Storage Resource Provider error response body.
|
ErrorResponseBody
Object
エラー応答本文コントラクト。
| Name |
型 |
説明 |
|
code
|
string
|
エラーの識別子。 コードは不変であり、プログラムで使用することを目的としています。
|
|
message
|
string
|
ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。
|
ExpirationAction
列挙
SAS 有効期限アクションは、sasPolicy.sasExpirationPeriod に違反したときに実行されるアクションを定義します。 "ログ" アクションは監査目的で使用でき、"ブロック" アクションを使用して、SAS ポリシーの有効期限に準拠していない SAS トークンの使用をブロックおよび拒否できます。
ExtendedLocation
Object
拡張された場所の複合型。
ExtendedLocationTypes
列挙
extendedLocation の型。
GeoPriorityReplicationStatus
Object
ストレージ アカウントの geo 優先度レプリケーションの有効化状態。
| Name |
型 |
説明 |
|
isBlobEnabled
|
boolean
|
ストレージ アカウントに対して BLOB Geo 優先度レプリケーションが有効になっているかどうかを示します。
|
GeoReplicationStats
Object
ストレージ アカウントの BLOB、テーブル、キュー、およびファイル サービスのレプリケーションに関連する統計。 これは、ストレージ アカウントに対して geo 冗長レプリケーションが有効になっている場合にのみ使用できます。
| Name |
型 |
説明 |
|
canFailover
|
boolean
|
アカウントのフェールオーバーがアカウントでサポートされているかどうかを示すブール値フラグ。
|
|
canPlannedFailover
|
boolean
|
アカウントの計画的なアカウント フェールオーバーがサポートされているかどうかを示すブール値フラグ。
|
|
lastSyncTime
|
string
(date-time)
|
この UTC 日付/時刻値より前のすべてのプライマリ書き込みが、読み取り操作で使用できる状態であることが保証されます。 この時点に続くプライマリ書き込みでは、読み取りで使用できる場合と使用できない場合があります。 LastSyncTime の値が使用できない場合は、要素が既定値になる場合があります。これは、セカンダリがオフラインの場合、またはブートストラップ中の場合に発生する可能性があります。
|
|
postFailoverRedundancy
|
PostFailoverRedundancy
|
アカウントのフェイルオーバーが実行された後のアカウントの冗長性タイプ。
|
|
postPlannedFailoverRedundancy
|
PostPlannedFailoverRedundancy
|
計画されたアカウントフェイルオーバーが実行された後のアカウントの冗長性タイプ。
|
|
status
|
GeoReplicationStatus
|
セカンダリ・ロケーションのステータス。 指定できる値は次のとおりです。- ライブ: セカンダリ・ロケーションがアクティブで動作していることを示します。 - ブートストラップ: プライマリ・ロケーションからセカンダリ・ロケーションへの初期同期が進行中であることを示します。これは通常、レプリケーションが最初に有効になったときに発生します。 - 使用不可: セカンダリ・ロケーションが一時的に使用できないことを示します。
|
GeoReplicationStatus
列挙
セカンダリ・ロケーションのステータス。 指定できる値は次のとおりです。- ライブ: セカンダリ・ロケーションがアクティブで動作していることを示します。 - ブートストラップ: プライマリ・ロケーションからセカンダリ・ロケーションへの初期同期が進行中であることを示します。これは通常、レプリケーションが最初に有効になったときに発生します。 - 使用不可: セカンダリ・ロケーションが一時的に使用できないことを示します。
| 値 |
説明 |
|
Live
|
|
|
Bootstrap
|
|
|
Unavailable
|
|
Identity
Object
リソースの ID。
| Name |
型 |
説明 |
|
principalId
|
string
|
リソース ID のプリンシパル ID。
|
|
tenantId
|
string
|
リソースのテナント ID。
|
|
type
|
IdentityType
|
ID の種類。
|
|
userAssignedIdentities
|
<string,
UserAssignedIdentity>
|
このストレージ アカウントで使用されるユーザー割り当て ID のセットを記述するキー値ペアの一覧を取得または設定します。 キーは、ID の ARM リソース識別子です。 ここで許可されるユーザー割り当て ID は 1 つだけです。
|
IdentityType
列挙
ID の種類。
| 値 |
説明 |
|
None
|
|
|
SystemAssigned
|
|
|
UserAssigned
|
|
|
SystemAssigned,UserAssigned
|
|
ImmutableStorageAccount
Object
このプロパティは、アカウント レベルの不変性を有効にして定義します。 この機能を有効にすると、BLOB のバージョン管理が自動的に有効になります。
| Name |
型 |
説明 |
|
enabled
|
boolean
|
アカウント レベルの不変性を有効にするブール型フラグ。 このようなアカウントのすべてのコンテナーでは、オブジェクト レベルの不変性が既定で有効になっています。
|
|
immutabilityPolicy
|
AccountImmutabilityPolicyProperties
|
オブジェクト レベルで明示的な不変ポリシーを持たないオブジェクトに継承および適用される、既定のアカウント レベルの不変ポリシーを指定します。 オブジェクト レベルの不変ポリシーは、アカウント レベルの不変ポリシーよりも優先順位が高い、コンテナー レベルの不変ポリシーよりも優先順位が高くなります。
|
IPRule
Object
CIDR 形式の特定の IP または IP 範囲を持つ IP 規則。
| Name |
型 |
説明 |
|
action
|
enum:
Allow
|
IP ACL 規則のアクション。
|
|
value
|
string
|
CIDR 形式で IP または IP 範囲を指定します。
|
KeyCreationTime
Object
ストレージ アカウント キーの作成時刻。
| Name |
型 |
説明 |
|
key1
|
string
(date-time)
|
|
|
key2
|
string
(date-time)
|
|
KeyPolicy
Object
ストレージ アカウントに割り当てられた KeyPolicy。
| Name |
型 |
説明 |
|
keyExpirationPeriodInDays
|
integer
(int32)
|
キーの有効期限 (日数)。
|
KeySource
列挙
暗号化 keySource (プロバイダー)。 使用可能な値 (大文字と小文字を区別): Microsoft.Storage、Microsoft.Keyvault
| 値 |
説明 |
|
Microsoft.Storage
|
|
|
Microsoft.Keyvault
|
|
KeyType
列挙
暗号化サービスに使用する暗号化キーの種類。 "Account" キーの種類は、アカウント スコープの暗号化キーが使用されることを意味します。 "サービス" キーの種類は、既定のサービス キーが使用されることを意味します。
KeyVaultProperties
Object
キー コンテナーのプロパティ。
| Name |
型 |
説明 |
|
currentVersionedKeyExpirationTimestamp
|
string
(date-time)
|
これは、暗号化に使用されるカスタマー マネージド キーの現在のバージョンの有効期限を表す読み取り専用プロパティです。
|
|
currentVersionedKeyIdentifier
|
string
|
使用中の現在のバージョン管理された Key Vault キーのオブジェクト識別子。
|
|
keyname
|
string
|
KeyVault キーの名前。
|
|
keyvaulturi
|
string
|
KeyVault の URI。
|
|
keyversion
|
string
|
KeyVault キーのバージョン。
|
|
lastKeyRotationTimestamp
|
string
(date-time)
|
Key Vault キーの最後のローテーションのタイムスタンプ。
|
Kind
列挙
ストレージ アカウントの種類を示します。
| 値 |
説明 |
|
Storage
|
|
|
StorageV2
|
|
|
BlobStorage
|
|
|
FileStorage
|
|
|
BlockBlobStorage
|
|
LargeFileSharesState
列挙
[有効] に設定されている場合は、大きなファイル共有を許可します。 一度有効にした後は無効にできません。
MinimumTlsVersion
列挙
ストレージへの要求で許可される最小 TLS バージョンを設定します。 このプロパティの既定の解釈は TLS 1.0 です。 最低TLSバージョン1.3はサポートされていません。
| 値 |
説明 |
|
TLS1_0
|
|
|
TLS1_1
|
|
|
TLS1_2
|
|
|
TLS1_3
|
|
NetworkRuleSet
Object
ネットワーク ルール セット
| Name |
型 |
規定値 |
説明 |
|
bypass
|
Bypass
|
AzureServices
|
ログ/メトリック/AzureServices にトラフィックをバイパスするかどうかを指定します。 使用可能な値は、ログ記録の任意の組み合わせです。メトリック|AzureServices ("ログ記録、メトリック" など)、または None を使用して、これらのトラフィックをバイパスしません。
|
|
defaultAction
|
DefaultAction
|
Allow
|
他のルールが一致しない場合の許可または拒否の既定のアクションを指定します。
|
|
ipRules
|
IPRule[]
|
|
IP ACL 規則を設定します
|
|
ipv6Rules
|
IPRule[]
|
|
IPv6 ACL ルールを設定します。
|
|
resourceAccessRules
|
ResourceAccessRule[]
|
|
リソース アクセス規則を設定します
|
|
virtualNetworkRules
|
VirtualNetworkRule[]
|
|
仮想ネットワーク規則を設定します。
|
Placement
Object
ゾーン配置の詳細の複合型。
PolicyViolationAction
列挙
ユーザーがSAS(共有アクセス署名)ポリシーの要件を委譲した場合に実行されるアクション。
| 値 |
説明 |
|
None
|
ポリシー要件に違反しても何の措置も取られません。
|
|
Log
|
ポリシー違反は監査目的で記録されます。
|
|
Block
|
ポリシー要件に違反すると、申請はブロックされ、却下されます。
|
PostFailoverRedundancy
列挙
アカウントのフェイルオーバーが実行された後のアカウントの冗長性タイプ。
| 値 |
説明 |
|
Standard_LRS
|
|
|
Standard_ZRS
|
|
PostPlannedFailoverRedundancy
列挙
計画されたアカウントフェイルオーバーが実行された後のアカウントの冗長性タイプ。
| 値 |
説明 |
|
Standard_GRS
|
|
|
Standard_GZRS
|
|
|
Standard_RAGRS
|
|
|
Standard_RAGZRS
|
|
PrivateEndpoint
Object
プライベート エンドポイント リソース。
| Name |
型 |
説明 |
|
id
|
string
|
プライベート エンドポイントの ARM 識別子
|
PrivateEndpointConnection
Object
プライベート エンドポイント接続リソース。
| Name |
型 |
説明 |
|
id
|
string
(arm-id)
|
リソースの完全修飾リソース ID。 例: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
name
|
string
|
リソースの名前
|
|
properties.privateEndpoint
|
PrivateEndpoint
|
プライベート エンドポイントのリソース。
|
|
properties.privateLinkServiceConnectionState
|
PrivateLinkServiceConnectionState
|
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
|
|
properties.provisioningState
|
PrivateEndpointConnectionProvisioningState
|
プライベート エンドポイント接続リソースのプロビジョニング状態。
|
|
systemData
|
systemData
|
createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
|
type
|
string
|
リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
PrivateEndpointConnectionProvisioningState
列挙
現在のプロビジョニング状態。
| 値 |
説明 |
|
Succeeded
|
|
|
Creating
|
|
|
Deleting
|
|
|
Failed
|
|
PrivateEndpointServiceConnectionStatus
列挙
プライベート エンドポイント接続の状態。
| 値 |
説明 |
|
Pending
|
|
|
Approved
|
|
|
Rejected
|
|
PrivateLinkServiceConnectionState
Object
サービス コンシューマーとプロバイダー間の接続の状態に関する情報のコレクション。
ProvisioningState
列挙
操作が呼び出されたときのストレージ アカウントの状態を取得します。
| 値 |
説明 |
|
Creating
|
|
|
ResolvingDNS
|
|
|
Succeeded
|
|
PublicNetworkAccess
列挙
ストレージ アカウントへのパブリック ネットワーク アクセスを評価するために、ネットワーク セキュリティ境界構成を許可、禁止、または許可します。 値は省略可能ですが、渡される場合は'Enabled'、'Disabled'、または 'SecuredByPerimeter' である必要があります。
| 値 |
説明 |
|
Enabled
|
|
|
Disabled
|
|
|
SecuredByPerimeter
|
|
ResourceAccessRule
Object
リソース アクセス規則。
| Name |
型 |
説明 |
|
resourceId
|
string
|
リソース ID
|
|
tenantId
|
string
|
テナント ID
|
RoutingChoice
列挙
ルーティングの選択は、ユーザーが選択するネットワーク ルーティングの種類を定義します。
| 値 |
説明 |
|
MicrosoftRouting
|
|
|
InternetRouting
|
|
RoutingPreference
Object
ルーティング優先設定では、ユーザー データの配信に使用する Microsoft またはインターネット ルーティングのネットワークの種類を定義します。既定のオプションは microsoft ルーティングです
| Name |
型 |
説明 |
|
publishInternetEndpoints
|
boolean
|
インターネット ルーティング ストレージ エンドポイントを発行するかどうかを示すブール型フラグ
|
|
publishMicrosoftEndpoints
|
boolean
|
Microsoft ルーティング ストレージ エンドポイントを発行するかどうかを示すブール型フラグ
|
|
routingChoice
|
RoutingChoice
|
ルーティングの選択は、ユーザーが選択するネットワーク ルーティングの種類を定義します。
|
SasPolicy
Object
ストレージ アカウントに割り当てられた SasPolicy。
| Name |
型 |
規定値 |
説明 |
|
expirationAction
|
ExpirationAction
|
Log
|
SAS 有効期限アクションは、sasPolicy.sasExpirationPeriod に違反したときに実行されるアクションを定義します。 "ログ" アクションは監査目的で使用でき、"ブロック" アクションを使用して、SAS ポリシーの有効期限に準拠していない SAS トークンの使用をブロックおよび拒否できます。
|
|
requireUserBoundUserDelegationSas
|
boolean
|
|
ユーザー委任SAS(共有アクセス署名)トークンが特定のユーザーにバインドされる必要があるかどうかを示します。 このプロパティの既定の解釈は false です。
|
|
requireUserBoundUserDelegationSasAction
|
PolicyViolationAction
|
|
requireUserBoundUserDelegationSasによって求められるユーザー委任SAS(共有アクセス署名)トークンがユーザーにバインドされていない場合に実行されるアクション。
|
|
sasExpirationPeriod
|
string
|
|
SAS の有効期限 (DD.HH:MM:SS)。
|
ServiceSharedKeyAccessProperties
Object
個々のストレージサービスに対する共有キーアクセス設定を定義します。
| Name |
型 |
説明 |
|
enabled
|
boolean
|
サービスで共有鍵アクセスが有効かどうかを示します。
|
Sku
Object
ストレージ アカウントの SKU。
| Name |
型 |
説明 |
|
name
|
SkuName
|
SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 以前のバージョンでは、SKU 名は accountType と呼ばれることに注意してください。
|
|
tier
|
SkuTier
|
SKU 階層。 これは SKU 名に基づいています。
|
SkuConversionStatus
列挙
このプロパティは、現在の SKU 変換状態を示します。
| 値 |
説明 |
|
InProgress
|
|
|
Succeeded
|
|
|
Failed
|
|
SkuName
列挙
SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 以前のバージョンでは、SKU 名は accountType と呼ばれることに注意してください。
| 値 |
説明 |
|
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
列挙
SKU 階層。 これは SKU 名に基づいています。
SmbOAuthSettings
Object
OAuth を使用した SMB 経由のマネージド ID アクセスのプロパティの設定
| Name |
型 |
説明 |
|
isSmbOAuthEnabled
|
boolean
|
マネージド ID が OAuth を使用して SMB 共有にアクセスできるかどうかを指定します。 このプロパティの既定の解釈は false です。
|
State
列挙
仮想ネットワーク 規則の状態を取得します。
| 値 |
説明 |
|
Provisioning
|
|
|
Deprovisioning
|
|
|
Succeeded
|
|
|
Failed
|
|
|
NetworkSourceDeleted
|
|
StorageAccount
Object
ストレージ アカウント。
| Name |
型 |
説明 |
|
extendedLocation
|
ExtendedLocation
|
リソースの extendedLocation。
|
|
id
|
string
(arm-id)
|
リソースの完全修飾リソース ID。 例: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
identity
|
Identity
|
リソースの ID。
|
|
kind
|
Kind
|
Kind を取得します。
|
|
location
|
string
|
リソースが存在する地理的な場所
|
|
name
|
string
|
リソースの名前
|
|
placement
|
Placement
|
Optional. ストレージ アカウントのゾーン配置の詳細を取得または設定します。
|
|
properties.accessTier
|
AccessTier
|
種類が BlobStorage であるストレージ アカウントに必要です。 アクセス層は課金に使用されます。 "Premium" アクセス層は Premium ブロック BLOB ストレージ アカウントの種類の既定値であり、Premium ブロック BLOB ストレージ アカウントの種類に対しては変更できません。
|
|
properties.accountMigrationInProgress
|
boolean
|
顧客が開始したアカウントの移行が進行中の場合、値は true になり、それ以外の場合は null になります。
|
|
properties.allowBlobPublicAccess
|
boolean
|
ストレージ アカウント内のすべての BLOB またはコンテナーへのパブリック アクセスを許可または禁止します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantDelegationSas
|
boolean
|
AAD間のテナントユーザー委任SAS(共有アクセス署名)を許可または拒否します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantReplication
|
boolean
|
AAD テナント 間のオブジェクト レプリケーションを許可または禁止します。 オブジェクト レプリケーション ポリシーに異なる AAD テナントのストレージ アカウントが含まれる場合にのみ、新規または既存のアカウントに対してこのプロパティを true に設定します。 既定では、新しいアカウントがベスト セキュリティ プラクティスに従う場合、既定の解釈は false です。
|
|
properties.allowSharedKeyAccess
|
boolean
|
ストレージ アカウントが、共有キーを介してアカウント アクセス キーを使用して承認される要求を許可するかどうかを示します。 false の場合、Shared Access Signature を含むすべての要求が Azure Active Directory (Azure AD) で承認されている必要があります。 既定値は null で、true と同じです。
|
|
properties.allowSharedKeyAccessForServices
|
StorageAccountSharedKeyAccessProperties
|
サービスレベルで共有キーアクセスプロパティを示します
|
|
properties.allowedCopyScope
|
AllowedCopyScope
|
AAD テナント内またはプライベート リンクを使用して、同じ VNet へのストレージ アカウントとの間のコピーを制限します。
|
|
properties.azureFilesIdentityBasedAuthentication
|
AzureFilesIdentityBasedAuthentication
|
Azure Files の ID ベースの認証設定を提供します。
|
|
properties.blobRestoreStatus
|
BlobRestoreStatus
|
BLOB の復元状態
|
|
properties.creationTime
|
string
(date-time)
|
ストレージ アカウントの作成日時を UTC で取得します。
|
|
properties.customDomain
|
CustomDomain
|
ユーザーがこのストレージ アカウントに割り当てたカスタム ドメインを取得します。
|
|
properties.dataCollaborationPolicyProperties
|
StorageDataCollaborationPolicyProperties
|
ストレージアカウントのデータコラボレーションポリシー。
|
|
properties.defaultToOAuthAuthentication
|
boolean
|
既定の認証が OAuth かどうかを示すブール値フラグ。 このプロパティの既定の解釈は false です。
|
|
properties.dnsEndpointType
|
DnsEndpointType
|
エンドポイントの種類を指定できます。 これを AzureDNSZone に設定すると、1 つのサブスクリプションに多数のアカウントが作成されます。これにより、Azure DNS ゾーンにアカウントが作成され、エンドポイント URL に英数字の DNS ゾーン識別子が設定されます。
|
|
properties.dualStackEndpointPreference
|
DualStackEndpointPreference
|
ユーザーが選択したインターネットプロトコルに関する情報を保持します。
|
|
properties.enableExtendedGroups
|
boolean
|
true に設定されている場合は、ローカル ユーザー機能を使用してグループの拡張サポートを有効にします
|
|
properties.encryption
|
Encryption
|
ストレージ アカウントのサーバー側暗号化に使用する暗号化設定。
|
|
properties.failoverInProgress
|
boolean
|
フェールオーバーが進行中の場合、値は true になり、それ以外の場合は null になります。
|
|
properties.geoPriorityReplicationStatus
|
GeoPriorityReplicationStatus
|
アカウントに対して Geo Priority Replication が有効になっているかどうかを示すステータス。
|
|
properties.geoReplicationStats
|
GeoReplicationStats
|
geo レプリケーションの統計
|
|
properties.immutableStorageWithVersioning
|
ImmutableStorageAccount
|
プロパティは不変であり、アカウント作成時にのみ true に設定できます。 true に設定すると、アカウント内のすべてのコンテナーのオブジェクト レベルの不変性が既定で有効になります。
|
|
properties.isHnsEnabled
|
boolean
|
アカウント HierarchyNamespace が true に設定されている場合に有効になります。
|
|
properties.isLocalUserEnabled
|
boolean
|
ローカル ユーザー機能を有効にします (true に設定されている場合)
|
|
properties.isNfsV3Enabled
|
boolean
|
TRUE に設定されている場合、NFS 3.0 プロトコルのサポートが有効になります。
|
|
properties.isSftpEnabled
|
boolean
|
セキュリティで保護されたファイル転送プロトコルを有効にします (true に設定されている場合)
|
|
properties.isSkuConversionBlocked
|
boolean
|
このプロパティは、移行が進行中の場合に true または false に設定されます。 既定値は null です。
|
|
properties.keyCreationTime
|
KeyCreationTime
|
ストレージ アカウント キーの作成時刻。
|
|
properties.keyPolicy
|
KeyPolicy
|
ストレージ アカウントに割り当てられた KeyPolicy。
|
|
properties.largeFileSharesState
|
LargeFileSharesState
|
[有効] に設定されている場合は、大きなファイル共有を許可します。 一度有効にした後は無効にできません。
|
|
properties.lastGeoFailoverTime
|
string
(date-time)
|
セカンダリ ロケーションへのフェールオーバーの最新のインスタンスのタイムスタンプを取得します。 最新のタイムスタンプのみが保持されます。 フェールオーバー インスタンスがない場合、この要素は返されません。 accountType がStandard_GRSまたはStandard_RAGRSの場合にのみ使用できます。
|
|
properties.minimumTlsVersion
|
MinimumTlsVersion
|
ストレージへの要求で許可される最小 TLS バージョンを設定します。 このプロパティの既定の解釈は TLS 1.0 です。 最低TLSバージョン1.3はサポートされていません。
|
|
properties.networkAcls
|
NetworkRuleSet
|
ネットワーク ルール セット
|
|
properties.primaryEndpoints
|
Endpoints
|
パブリック BLOB、キュー、またはテーブル オブジェクトの取得を実行するために使用される URL を取得します。 Standard_ZRSアカウントとPremium_LRS アカウントは BLOB エンドポイントのみを返します。
|
|
properties.primaryLocation
|
string
|
ストレージ アカウントのプライマリ データ センターの場所を取得します。
|
|
properties.privateEndpointConnections
|
PrivateEndpointConnection[]
|
指定したストレージ アカウントに関連付けられているプライベート エンドポイント接続の一覧
|
|
properties.provisioningState
|
ProvisioningState
|
操作が呼び出されたときのストレージ アカウントの状態を取得します。
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
ストレージ アカウントへのパブリック ネットワーク アクセスを評価するために、ネットワーク セキュリティ境界構成を許可、禁止、または許可します。
|
|
properties.routingPreference
|
RoutingPreference
|
ユーザーがデータ転送を選択したネットワーク ルーティングの選択に関する情報を保持します
|
|
properties.sasPolicy
|
SasPolicy
|
ストレージ アカウントに割り当てられた SasPolicy。
|
|
properties.secondaryEndpoints
|
Endpoints
|
ストレージ アカウントのセカンダリの場所からパブリック BLOB、キュー、またはテーブル オブジェクトの取得を実行するために使用される URL を取得します。 SKU 名がStandard_RAGRSされている場合にのみ使用できます。
|
|
properties.secondaryLocation
|
string
|
ストレージ アカウントの geo レプリケートされたセカンダリの場所を取得します。 accountType がStandard_GRSまたはStandard_RAGRSの場合にのみ使用できます。
|
|
properties.statusOfPrimary
|
AccountStatus
|
ストレージ アカウントのプライマリの場所が使用可能か使用不可かを示す状態を取得します。
|
|
properties.statusOfSecondary
|
AccountStatus
|
ストレージ アカウントのセカンダリの場所が使用可能か使用不可かを示す状態を取得します。 SKU 名がStandard_GRSまたはStandard_RAGRSされている場合にのみ使用できます。
|
|
properties.storageAccountSkuConversionStatus
|
StorageAccountSkuConversionStatus
|
このプロパティは readOnly であり、非同期ストレージ アカウント SKU 変換操作中にサーバーによって設定されます。
|
|
properties.supportsHttpsTrafficOnly
|
boolean
|
true に設定されている場合にのみ、ストレージ サービスへの https トラフィックを許可します。
|
|
properties.turboTier
|
TurboTier
|
ストレージアカウントのTurbo Tierを設定します。
|
|
sku
|
Sku
|
SKU を取得します。
|
|
systemData
|
systemData
|
createdBy および modifiedBy 情報を含む Azure Resource Manager メタデータ。
|
|
tags
|
object
|
リソース タグ。
|
|
type
|
string
|
リソースの種類。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"
|
|
zones
|
string[]
|
可用性ゾーン。
|
StorageAccountCreateParameters
Object
ストレージ アカウントの作成時に使用されるパラメーター。
| Name |
型 |
説明 |
|
extendedLocation
|
ExtendedLocation
|
Optional. リソースの拡張場所を設定します。 設定されていない場合、ストレージ アカウントは Azure メイン リージョンに作成されます。 それ以外の場合は、指定した拡張場所に作成されます
|
|
identity
|
Identity
|
リソースの ID。
|
|
kind
|
Kind
|
Required. ストレージ アカウントの種類を示します。
|
|
location
|
string
|
Required. リソースの場所を取得または設定します。 これは、サポートされ、登録されている Azure Geo リージョンの 1 つになります (例: 米国西部、米国東部、東南アジアなど)。 リソースの geo リージョンは一度作成した後は変更できませんが、更新時に同じ geo リージョンが指定されている場合、要求は成功します。
|
|
placement
|
Placement
|
Optional. ストレージ アカウントのゾーン配置の詳細を取得または設定します。
|
|
properties.accessTier
|
AccessTier
|
種類が BlobStorage であるストレージ アカウントに必要です。 アクセス層は課金に使用されます。 "Premium" アクセス層は Premium ブロック BLOB ストレージ アカウントの種類の既定値であり、Premium ブロック BLOB ストレージ アカウントの種類に対しては変更できません。
|
|
properties.allowBlobPublicAccess
|
boolean
|
ストレージ アカウント内のすべての BLOB またはコンテナーへのパブリック アクセスを許可または禁止します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantDelegationSas
|
boolean
|
AAD間のテナントユーザー委任SAS(共有アクセス署名)を許可または拒否します。 このプロパティの既定の解釈は false です。
|
|
properties.allowCrossTenantReplication
|
boolean
|
AAD テナント 間のオブジェクト レプリケーションを許可または禁止します。 オブジェクト レプリケーション ポリシーに異なる AAD テナントのストレージ アカウントが含まれる場合にのみ、新規または既存のアカウントに対してこのプロパティを true に設定します。 既定では、新しいアカウントがベスト セキュリティ プラクティスに従う場合、既定の解釈は false です。
|
|
properties.allowSharedKeyAccess
|
boolean
|
ストレージ アカウントが、共有キーを介してアカウント アクセス キーを使用して承認される要求を許可するかどうかを示します。 false の場合、Shared Access Signature を含むすべての要求が Azure Active Directory (Azure AD) で承認されている必要があります。 既定値は null で、true と同じです。
|
|
properties.allowSharedKeyAccessForServices
|
StorageAccountSharedKeyAccessProperties
|
サービスレベルで共有キーアクセスプロパティを示します
|
|
properties.allowedCopyScope
|
AllowedCopyScope
|
AAD テナント内またはプライベート リンクを使用して、同じ VNet へのストレージ アカウントとの間のコピーを制限します。
|
|
properties.azureFilesIdentityBasedAuthentication
|
AzureFilesIdentityBasedAuthentication
|
Azure Files の ID ベースの認証設定を提供します。
|
|
properties.customDomain
|
CustomDomain
|
ストレージ アカウントに割り当てられたユーザー ドメイン。 名前は CNAME ソースです。 現時点では、ストレージ アカウントごとに 1 つのカスタム ドメインのみがサポートされています。 既存のカスタム ドメインをクリアするには、カスタム ドメイン名プロパティに空の文字列を使用します。
|
|
properties.dataCollaborationPolicyProperties
|
StorageDataCollaborationPolicyProperties
|
ストレージアカウントのデータコラボレーションポリシー。
|
|
properties.defaultToOAuthAuthentication
|
boolean
|
既定の認証が OAuth かどうかを示すブール値フラグ。 このプロパティの既定の解釈は false です。
|
|
properties.dnsEndpointType
|
DnsEndpointType
|
エンドポイントの種類を指定できます。 これを AzureDNSZone に設定すると、1 つのサブスクリプションに多数のアカウントが作成されます。これにより、Azure DNS ゾーンにアカウントが作成され、エンドポイント URL に英数字の DNS ゾーン識別子が設定されます。
|
|
properties.dualStackEndpointPreference
|
DualStackEndpointPreference
|
ユーザーが選択したインターネットプロトコルに関する情報を保持します。
|
|
properties.enableExtendedGroups
|
boolean
|
true に設定されている場合は、ローカル ユーザー機能を使用してグループの拡張サポートを有効にします
|
|
properties.encryption
|
Encryption
|
ストレージ アカウントのサーバー側暗号化に使用する暗号化設定。
|
|
properties.geoPriorityReplicationStatus
|
GeoPriorityReplicationStatus
|
アカウントに対して Geo Priority Replication が有効になっているかどうかを示すステータス。
|
|
properties.immutableStorageWithVersioning
|
ImmutableStorageAccount
|
プロパティは不変であり、アカウント作成時にのみ true に設定できます。 true に設定すると、アカウント内のすべての新しいコンテナーに対してオブジェクト レベルの不変性が既定で有効になります。
|
|
properties.isHnsEnabled
|
boolean
|
アカウント HierarchyNamespace が true に設定されている場合に有効になります。
|
|
properties.isLocalUserEnabled
|
boolean
|
ローカル ユーザー機能を有効にします (true に設定されている場合)
|
|
properties.isNfsV3Enabled
|
boolean
|
TRUE に設定されている場合、NFS 3.0 プロトコルのサポートが有効になります。
|
|
properties.isSftpEnabled
|
boolean
|
セキュリティで保護されたファイル転送プロトコルを有効にします (true に設定されている場合)
|
|
properties.keyPolicy
|
KeyPolicy
|
ストレージ アカウントに割り当てられた KeyPolicy。
|
|
properties.largeFileSharesState
|
LargeFileSharesState
|
[有効] に設定されている場合は、大きなファイル共有を許可します。 一度有効にした後は無効にできません。
|
|
properties.minimumTlsVersion
|
MinimumTlsVersion
|
ストレージへの要求で許可される最小 TLS バージョンを設定します。 このプロパティの既定の解釈は TLS 1.0 です。 最低TLSバージョン1.3はサポートされていません。
|
|
properties.networkAcls
|
NetworkRuleSet
|
ネットワーク ルール セット
|
|
properties.publicNetworkAccess
|
PublicNetworkAccess
|
ストレージ アカウントへのパブリック ネットワーク アクセスを評価するために、ネットワーク セキュリティ境界構成を許可、禁止、または許可します。 値は省略可能ですが、渡される場合は'Enabled'、'Disabled'、または 'SecuredByPerimeter' である必要があります。
|
|
properties.routingPreference
|
RoutingPreference
|
ユーザーがデータ転送を選択したネットワーク ルーティングの選択に関する情報を保持します
|
|
properties.sasPolicy
|
SasPolicy
|
ストレージ アカウントに割り当てられた SasPolicy。
|
|
properties.supportsHttpsTrafficOnly
|
boolean
|
true に設定されている場合にのみ、ストレージ サービスへの https トラフィックを許可します。 API バージョン 2019-04-01 以降、既定値は true です。
|
|
properties.turboTier
|
TurboTier
|
ストレージアカウントのTurbo Tierを設定します。
|
|
sku
|
Sku
|
Required. SKU 名を取得または設定します。
|
|
tags
|
object
|
リソースを記述するキー値ペアの一覧を取得または設定します。 これらのタグは、(リソース グループ間で) このリソースを表示およびグループ化するために使用できます。 リソースには最大 15 個のタグを指定できます。 各タグには、長さが 128 文字以下のキーと、長さが 256 文字以下の値が必要です。
|
|
zones
|
string[]
|
Optional. ストレージ アカウントのピン留めされた論理可用性ゾーンを取得または設定します。
|
StorageAccountInternetEndpoints
Object
インターネット ルーティング エンドポイントを介してパブリック BLOB、ファイル、Web、または dfs オブジェクトの取得を実行するために使用される URI。
| Name |
型 |
説明 |
|
blob
|
string
|
BLOB エンドポイントを取得します。
|
|
dfs
|
string
|
dfs エンドポイントを取得します。
|
|
file
|
string
|
ファイル エンドポイントを取得します。
|
|
web
|
string
|
Web エンドポイントを取得します。
|
StorageAccountIpv6Endpoints
Object
IPv6 エンドポイントを介してパブリック BLOB、キュー、テーブル、Web、または dfs オブジェクトの取得を実行するために使用される URI。
| Name |
型 |
説明 |
|
blob
|
string
|
BLOB エンドポイントを取得します。
|
|
dfs
|
string
|
dfs エンドポイントを取得します。
|
|
file
|
string
|
ファイル エンドポイントを取得します。
|
|
internetEndpoints
|
StorageAccountInternetEndpoints
|
インターネット ルーティング ストレージ エンドポイントを取得します。
|
|
microsoftEndpoints
|
StorageAccountMicrosoftEndpoints
|
Microsoft ルーティング ストレージ エンドポイントを取得します。
|
|
queue
|
string
|
キュー エンドポイントを取得します。
|
|
table
|
string
|
テーブル エンドポイントを取得します。
|
|
web
|
string
|
Web エンドポイントを取得します。
|
StorageAccountMicrosoftEndpoints
Object
Microsoft ルーティング エンドポイントを介してパブリック BLOB、キュー、テーブル、Web、または dfs オブジェクトの取得を実行するために使用される URI。
| Name |
型 |
説明 |
|
blob
|
string
|
BLOB エンドポイントを取得します。
|
|
dfs
|
string
|
dfs エンドポイントを取得します。
|
|
file
|
string
|
ファイル エンドポイントを取得します。
|
|
queue
|
string
|
キュー エンドポイントを取得します。
|
|
table
|
string
|
テーブル エンドポイントを取得します。
|
|
web
|
string
|
Web エンドポイントを取得します。
|
StorageAccountSharedKeyAccessProperties
Object
ストレージアカウントの共有キーアクセスプロパティを定義します。
StorageAccountSkuConversionStatus
Object
これにより、非同期 SKU 変換の SKU 変換状態オブジェクトが定義されます。
| Name |
型 |
説明 |
|
endTime
|
string
|
このプロパティは、SKU 変換の終了時刻を表します。
|
|
skuConversionStatus
|
SkuConversionStatus
|
このプロパティは、現在の SKU 変換状態を示します。
|
|
startTime
|
string
|
このプロパティは、SKU 変換の開始時刻を表します。
|
|
targetSkuName
|
SkuName
|
このプロパティは、アカウント SKU が非同期的に変換されるターゲット SKU 名を表します。
|
StorageDataCollaborationPolicyProperties
Object
ストレージアカウントのデータコラボレーションポリシーを定義します。
| Name |
型 |
説明 |
|
allowBlobAccessPoints
|
boolean
|
Blobアクセスポイントの設定がストレージアカウント上で作成または管理が許可されているかどうかを示します。
|
|
allowCrossTenantDataSharing
|
boolean
|
ストレージアカウントでエントラ間テナント間データ共有が許可されているかどうかを示します。
|
|
allowStorageConnectors
|
boolean
|
ストレージアカウント上でストレージコネクタを作成または管理できるかどうかを示します。
|
|
allowStorageDataShares
|
boolean
|
ストレージアカウント上でデータ共有を作成または管理できるかどうかを示します。
|
systemData
Object
リソースの作成と最後の変更に関連するメタデータ。
| Name |
型 |
説明 |
|
createdAt
|
string
(date-time)
|
リソース作成のタイムスタンプ (UTC)。
|
|
createdBy
|
string
|
リソースを作成した ID。
|
|
createdByType
|
createdByType
|
リソースを作成した ID の種類。
|
|
lastModifiedAt
|
string
(date-time)
|
リソースの最終変更のタイムスタンプ (UTC)
|
|
lastModifiedBy
|
string
|
リソースを最後に変更した ID。
|
|
lastModifiedByType
|
createdByType
|
リソースを最後に変更した ID の種類。
|
TurboTier
Object
ストレージアカウントのためにTurbo Tierを設定しています。
| Name |
型 |
説明 |
|
status
|
TurboTierStatus
|
ターボティアが有効か無効かを示します。
|
|
targetPercent
|
integer
(int32)
minimum: 10 maximum: 100
|
配置に使われるターゲットフィルの割合。 有効範囲は10から100です。 ステータスがEnabledでこのプロパティが省略されている場合、デフォルト値は20です。
|
TurboTierStatus
列挙
ターボティアが有効か無効かを示します。
| 値 |
説明 |
|
Enabled
|
ターボティアは有効になっています。
|
|
Disabled
|
ターボティアは無効化されています。
|
UserAssignedIdentity
Object
リソースの UserAssignedIdentity。
| Name |
型 |
説明 |
|
clientId
|
string
|
ID のクライアント ID。
|
|
principalId
|
string
|
ID のプリンシパル ID。
|
VirtualNetworkRule
Object
仮想ネットワーク規則。
| Name |
型 |
説明 |
|
action
|
enum:
Allow
|
仮想ネットワーク ルールのアクション。
|
|
id
|
string
|
サブネットのリソース ID (例: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName})。
|
|
state
|
State
|
仮想ネットワーク 規則の状態を取得します。
|
ZonePlacementPolicy
列挙
ストレージ アカウントの可用性ゾーンのピン留めポリシー。