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

FileServiceResource.GetFileShareAsync 方法

定义

获取指定共享的属性。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}
  • 操作IdFileShares_Get
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.FileShareResource>> GetFileShareAsync (string shareName, string expand = default, string xMsSnapshot = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFileShareAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.FileShareResource>>
override this.GetFileShareAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Storage.FileShareResource>>
Public Overridable Function GetFileShareAsync (shareName As String, Optional expand As String = Nothing, Optional xMsSnapshot As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FileShareResource))

参数

shareName
String

指定存储帐户中文件共享的名称。 文件共享名称的长度必须介于 3 到 63 个字符之间,并且只能使用数字、小写字母和短划线 () 。 每个短划线(-)字符的前后必须紧跟字母或数字。

expand
String

可选,用于扩展共享属性中的属性。 有效值为:stats。应作为带分隔符“,”的字符串传递。

xMsSnapshot
String

可选,用于检索快照的属性。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

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

shareName 为 null。

适用于