你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

StorageAccount 构造函数

定义

重载

StorageAccount()

初始化 StorageAccount 类的新实例。

StorageAccount(String, String, String, String, IDictionary<String, String>, Sku, String, Identity, ExtendedLocation, Nullable<ProvisioningState>, Endpoints, String, Nullable<AccountStatus>, Nullable<DateTime>, String, Nullable<AccountStatus>, Nullable<DateTime>, CustomDomain, SasPolicy, KeyPolicy, KeyCreationTime, Endpoints, Encryption, Nullable<AccessTier>, AzureFilesIdentityBasedAuthentication, Nullable<Boolean>, NetworkRuleSet, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, GeoReplicationStats, Nullable<Boolean>, String, IList<PrivateEndpointConnection>, RoutingPreference, BlobRestoreStatus, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, String, ImmutableStorageAccount, String, StorageAccountSkuConversionStatus, String)

初始化 StorageAccount 类的新实例。

StorageAccount()

初始化 StorageAccount 类的新实例。

public StorageAccount ();
Public Sub New ()

适用于

StorageAccount(String, String, String, String, IDictionary<String, String>, Sku, String, Identity, ExtendedLocation, Nullable<ProvisioningState>, Endpoints, String, Nullable<AccountStatus>, Nullable<DateTime>, String, Nullable<AccountStatus>, Nullable<DateTime>, CustomDomain, SasPolicy, KeyPolicy, KeyCreationTime, Endpoints, Encryption, Nullable<AccessTier>, AzureFilesIdentityBasedAuthentication, Nullable<Boolean>, NetworkRuleSet, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, GeoReplicationStats, Nullable<Boolean>, String, IList<PrivateEndpointConnection>, RoutingPreference, BlobRestoreStatus, Nullable<Boolean>, String, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, Nullable<Boolean>, String, ImmutableStorageAccount, String, StorageAccountSkuConversionStatus, String)

初始化 StorageAccount 类的新实例。

public StorageAccount (string location, string id = default, string name = default, string type = default, System.Collections.Generic.IDictionary<string,string> tags = default, Microsoft.Azure.Management.Storage.Models.Sku sku = default, string kind = default, Microsoft.Azure.Management.Storage.Models.Identity identity = default, Microsoft.Azure.Management.Storage.Models.ExtendedLocation extendedLocation = default, Microsoft.Azure.Management.Storage.Models.ProvisioningState? provisioningState = default, Microsoft.Azure.Management.Storage.Models.Endpoints primaryEndpoints = default, string primaryLocation = default, Microsoft.Azure.Management.Storage.Models.AccountStatus? statusOfPrimary = default, DateTime? lastGeoFailoverTime = default, string secondaryLocation = default, Microsoft.Azure.Management.Storage.Models.AccountStatus? statusOfSecondary = default, DateTime? creationTime = default, Microsoft.Azure.Management.Storage.Models.CustomDomain customDomain = default, Microsoft.Azure.Management.Storage.Models.SasPolicy sasPolicy = default, Microsoft.Azure.Management.Storage.Models.KeyPolicy keyPolicy = default, Microsoft.Azure.Management.Storage.Models.KeyCreationTime keyCreationTime = default, Microsoft.Azure.Management.Storage.Models.Endpoints secondaryEndpoints = default, Microsoft.Azure.Management.Storage.Models.Encryption encryption = default, Microsoft.Azure.Management.Storage.Models.AccessTier? accessTier = default, Microsoft.Azure.Management.Storage.Models.AzureFilesIdentityBasedAuthentication azureFilesIdentityBasedAuthentication = default, bool? enableHttpsTrafficOnly = default, Microsoft.Azure.Management.Storage.Models.NetworkRuleSet networkRuleSet = default, bool? isSftpEnabled = default, bool? isLocalUserEnabled = default, bool? isHnsEnabled = default, Microsoft.Azure.Management.Storage.Models.GeoReplicationStats geoReplicationStats = default, bool? failoverInProgress = default, string largeFileSharesState = default, System.Collections.Generic.IList<Microsoft.Azure.Management.Storage.Models.PrivateEndpointConnection> privateEndpointConnections = default, Microsoft.Azure.Management.Storage.Models.RoutingPreference routingPreference = default, Microsoft.Azure.Management.Storage.Models.BlobRestoreStatus blobRestoreStatus = default, bool? allowBlobPublicAccess = default, string minimumTlsVersion = default, bool? allowSharedKeyAccess = default, bool? enableNfsV3 = default, bool? allowCrossTenantReplication = default, bool? defaultToOAuthAuthentication = default, string publicNetworkAccess = default, Microsoft.Azure.Management.Storage.Models.ImmutableStorageAccount immutableStorageWithVersioning = default, string allowedCopyScope = default, Microsoft.Azure.Management.Storage.Models.StorageAccountSkuConversionStatus storageAccountSkuConversionStatus = default, string dnsEndpointType = default);
new Microsoft.Azure.Management.Storage.Models.StorageAccount : string * string * string * string * System.Collections.Generic.IDictionary<string, string> * Microsoft.Azure.Management.Storage.Models.Sku * string * Microsoft.Azure.Management.Storage.Models.Identity * Microsoft.Azure.Management.Storage.Models.ExtendedLocation * Nullable<Microsoft.Azure.Management.Storage.Models.ProvisioningState> * Microsoft.Azure.Management.Storage.Models.Endpoints * string * Nullable<Microsoft.Azure.Management.Storage.Models.AccountStatus> * Nullable<DateTime> * string * Nullable<Microsoft.Azure.Management.Storage.Models.AccountStatus> * Nullable<DateTime> * Microsoft.Azure.Management.Storage.Models.CustomDomain * Microsoft.Azure.Management.Storage.Models.SasPolicy * Microsoft.Azure.Management.Storage.Models.KeyPolicy * Microsoft.Azure.Management.Storage.Models.KeyCreationTime * Microsoft.Azure.Management.Storage.Models.Endpoints * Microsoft.Azure.Management.Storage.Models.Encryption * Nullable<Microsoft.Azure.Management.Storage.Models.AccessTier> * Microsoft.Azure.Management.Storage.Models.AzureFilesIdentityBasedAuthentication * Nullable<bool> * Microsoft.Azure.Management.Storage.Models.NetworkRuleSet * Nullable<bool> * Nullable<bool> * Nullable<bool> * Microsoft.Azure.Management.Storage.Models.GeoReplicationStats * Nullable<bool> * string * System.Collections.Generic.IList<Microsoft.Azure.Management.Storage.Models.PrivateEndpointConnection> * Microsoft.Azure.Management.Storage.Models.RoutingPreference * Microsoft.Azure.Management.Storage.Models.BlobRestoreStatus * Nullable<bool> * string * Nullable<bool> * Nullable<bool> * Nullable<bool> * Nullable<bool> * string * Microsoft.Azure.Management.Storage.Models.ImmutableStorageAccount * string * Microsoft.Azure.Management.Storage.Models.StorageAccountSkuConversionStatus * string -> Microsoft.Azure.Management.Storage.Models.StorageAccount
Public Sub New (location As String, Optional id As String = Nothing, Optional name As String = Nothing, Optional type As String = Nothing, Optional tags As IDictionary(Of String, String) = Nothing, Optional sku As Sku = Nothing, Optional kind As String = Nothing, Optional identity As Identity = Nothing, Optional extendedLocation As ExtendedLocation = Nothing, Optional provisioningState As Nullable(Of ProvisioningState) = Nothing, Optional primaryEndpoints As Endpoints = Nothing, Optional primaryLocation As String = Nothing, Optional statusOfPrimary As Nullable(Of AccountStatus) = Nothing, Optional lastGeoFailoverTime As Nullable(Of DateTime) = Nothing, Optional secondaryLocation As String = Nothing, Optional statusOfSecondary As Nullable(Of AccountStatus) = Nothing, Optional creationTime As Nullable(Of DateTime) = Nothing, Optional customDomain As CustomDomain = Nothing, Optional sasPolicy As SasPolicy = Nothing, Optional keyPolicy As KeyPolicy = Nothing, Optional keyCreationTime As KeyCreationTime = Nothing, Optional secondaryEndpoints As Endpoints = Nothing, Optional encryption As Encryption = Nothing, Optional accessTier As Nullable(Of AccessTier) = Nothing, Optional azureFilesIdentityBasedAuthentication As AzureFilesIdentityBasedAuthentication = Nothing, Optional enableHttpsTrafficOnly As Nullable(Of Boolean) = Nothing, Optional networkRuleSet As NetworkRuleSet = Nothing, Optional isSftpEnabled As Nullable(Of Boolean) = Nothing, Optional isLocalUserEnabled As Nullable(Of Boolean) = Nothing, Optional isHnsEnabled As Nullable(Of Boolean) = Nothing, Optional geoReplicationStats As GeoReplicationStats = Nothing, Optional failoverInProgress As Nullable(Of Boolean) = Nothing, Optional largeFileSharesState As String = Nothing, Optional privateEndpointConnections As IList(Of PrivateEndpointConnection) = Nothing, Optional routingPreference As RoutingPreference = Nothing, Optional blobRestoreStatus As BlobRestoreStatus = Nothing, Optional allowBlobPublicAccess As Nullable(Of Boolean) = Nothing, Optional minimumTlsVersion As String = Nothing, Optional allowSharedKeyAccess As Nullable(Of Boolean) = Nothing, Optional enableNfsV3 As Nullable(Of Boolean) = Nothing, Optional allowCrossTenantReplication As Nullable(Of Boolean) = Nothing, Optional defaultToOAuthAuthentication As Nullable(Of Boolean) = Nothing, Optional publicNetworkAccess As String = Nothing, Optional immutableStorageWithVersioning As ImmutableStorageAccount = Nothing, Optional allowedCopyScope As String = Nothing, Optional storageAccountSkuConversionStatus As StorageAccountSkuConversionStatus = Nothing, Optional dnsEndpointType As String = Nothing)

参数

location
String

资源所在的地理位置

id
String

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name
String

资源的名称

type
String

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

tags
IDictionary<String,String>

资源标记。

sku
Sku

获取 SKU。

kind
String

获取 Kind。 可能的值包括:“Storage”、“StorageV2”、“BlobStorage”、“FileStorage”、“BlockBlobStorage”

identity
Identity

资源的标识。

extendedLocation
ExtendedLocation

资源的 extendedLocation。

provisioningState
Nullable<ProvisioningState>

获取调用操作时存储帐户的状态。 可能的值包括:“Create”、“ResolvingDNS”、“Succeeded”

primaryEndpoints
Endpoints

获取用于对公共 Blob、队列或表对象执行检索的 URL。 请注意,Standard_ZRS和Premium_LRS帐户仅返回 Blob 终结点。

primaryLocation
String

获取存储帐户的主数据中心的位置。

statusOfPrimary
Nullable<AccountStatus>

获取指示存储帐户的主要位置是可用还是不可用的状态。 可能的值包括:“available”、“unavailable”

lastGeoFailoverTime
Nullable<DateTime>

获取故障转移到辅助位置的最新实例的时间戳。 仅保留最新的时间戳。 如果从未有故障转移实例,则不会返回此元素。 仅当 accountType 是Standard_GRS或Standard_RAGRS时才可用。

secondaryLocation
String

获取存储帐户异地复制的辅助数据库的位置。 仅当 accountType 是Standard_GRS或Standard_RAGRS时才可用。

statusOfSecondary
Nullable<AccountStatus>

获取指示存储帐户的辅助位置是可用还是不可用的状态。 仅当 SKU 名称Standard_GRS或Standard_RAGRS时才可用。 可能的值包括:“available”、“unavailable”

creationTime
Nullable<DateTime>

获取存储帐户的创建日期和时间(UTC)。

customDomain
CustomDomain

获取用户分配给此存储帐户的自定义域。

sasPolicy
SasPolicy

分配给存储帐户的 SasPolicy。

keyPolicy
KeyPolicy

分配给存储帐户的 KeyPolicy。

keyCreationTime
KeyCreationTime

存储帐户密钥创建时间。

secondaryEndpoints
Endpoints

获取用于从存储帐户的辅助位置检索公共 Blob、队列或表对象的 URL。 仅当 SKU 名称为Standard_RAGRS时才可用。

encryption
Encryption

要用于存储帐户的服务器端加密的加密设置。

accessTier
Nullable<AccessTier>

对于类型 = BlobStorage 的存储帐户是必需的。 访问层用于计费。 “高级”访问层是高级块 blob 存储帐户类型的默认值,不能更改高级块 Blob 存储帐户类型的默认值。 可能的值包括:“Hot”、“Cool”、“Premium”

azureFilesIdentityBasedAuthentication
AzureFilesIdentityBasedAuthentication

为Azure 文件存储提供基于标识的身份验证设置。

enableHttpsTrafficOnly
Nullable<Boolean>

仅当设置为 true 时,才允许将 https 流量发送到存储服务。

networkRuleSet
NetworkRuleSet

网络规则集

isSftpEnabled
Nullable<Boolean>

启用安全文件传输协议(如果设置为 true)

isLocalUserEnabled
Nullable<Boolean>

启用本地用户功能(如果设置为 true)

isHnsEnabled
Nullable<Boolean>

如果设置为 true,则启用 Account HierarchicalNamespace。

geoReplicationStats
GeoReplicationStats

异地复制统计信息

failoverInProgress
Nullable<Boolean>

如果正在进行故障转移,则该值将为 true,否则将为 null。

largeFileSharesState
String

如果设置为 Enabled,则允许大型文件共享。 启用后,无法禁用它。 可能的值包括:“Disabled”、“Enabled”

privateEndpointConnections
IList<PrivateEndpointConnection>

与指定存储帐户关联的专用终结点连接列表

routingPreference
RoutingPreference

维护用户选择用于数据传输的网络路由的相关信息

blobRestoreStatus
BlobRestoreStatus

Blob 还原状态

allowBlobPublicAccess
Nullable<Boolean>

允许或禁止对存储帐户中所有 Blob 或容器的公共访问。 此属性的默认解释为 true。

minimumTlsVersion
String

设置对存储的请求所允许的最低 TLS 版本。 此属性的默认解释为 TLS 1.0。 可能的值包括:“TLS1_0”、“TLS1_1”、“TLS1_2”

allowSharedKeyAccess
Nullable<Boolean>

指示存储帐户是否允许通过共享密钥通过帐户访问密钥授权请求。 如果为 false,则必须使用 Azure Active Directory (Azure AD) 授权所有请求(包括共享访问签名)。 默认值为 null,等效于 true。

enableNfsV3
Nullable<Boolean>

如果设置为 true,则启用 NFS 3.0 协议支持。

allowCrossTenantReplication
Nullable<Boolean>

允许或禁止跨 AAD 租户对象复制。 此属性的默认解释为 true。

defaultToOAuthAuthentication
Nullable<Boolean>

一个布尔标志,指示默认身份验证是否为 OAuth。 此属性的默认解释为 false。

publicNetworkAccess
String

允许或禁止公用网络访问存储帐户。 值是可选的,但如果传入,则必须为“Enabled”或“Disabled”。 可能的值包括:“Enabled”、“Disabled”

immutableStorageWithVersioning
ImmutableStorageAccount

属性是不可变的,只能在创建帐户时设置为 true。 如果设置为 true,则默认为帐户中的所有容器启用对象级别不可变性。

allowedCopyScope
String

限制向/从 AAD 租户中的存储帐户复制,或者使用指向同一 VNet 的专用链接进行复制。 可能的值包括:“PrivateLink”、“AAD”

storageAccountSkuConversionStatus
StorageAccountSkuConversionStatus

此属性为 readOnly,在异步存储帐户 SKU 转换操作期间由服务器设置。

dnsEndpointType
String

允许指定终结点的类型。 将此设置为 AzureDNSZone 以在单个订阅中创建大量帐户,这会在 Azure DNS 区域中创建帐户,并且终结点 URL 将具有字母数字 DNS 区域标识符。 可能的值包括:“Standard”、“AzureDnsZone”

适用于