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

StorageAccountCollection.Exists 方法

定义

检查 Azure 中是否存在资源。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}
  • 操作IdStorageAccounts_GetProperties
public virtual Azure.Response<bool> Exists (string accountName, Azure.ResourceManager.Storage.Models.StorageAccountExpand? expand = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Exists : string * Nullable<Azure.ResourceManager.Storage.Models.StorageAccountExpand> * System.Threading.CancellationToken -> Azure.Response<bool>
override this.Exists : string * Nullable<Azure.ResourceManager.Storage.Models.StorageAccountExpand> * System.Threading.CancellationToken -> Azure.Response<bool>
Public Overridable Function Exists (accountName As String, Optional expand As Nullable(Of StorageAccountExpand) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of Boolean)

参数

accountName
String

指定资源组中的存储帐户的名称。 存储帐户名称长度必须为 3 到 24 个字符,并且只能使用数字和小写字母。

expand
Nullable<StorageAccountExpand>

可用于扩展帐户属性中的属性。 默认情况下,提取属性时不包括数据。 目前,我们仅支持 geoReplicationStats 和 blobRestoreStatus。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

accountName 是一个空字符串,预期为非空。

accountName 为 null。

适用于