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

WebSiteResource.GetWebSiteSlotAsync(String, CancellationToken) 方法

定义

获取 Web、移动或 API 应用的详细信息的说明。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}
  • 操作IdWebApps_GetSlot
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.WebSiteSlotResource>> GetWebSiteSlotAsync (string slot, System.Threading.CancellationToken cancellationToken = default);
abstract member GetWebSiteSlotAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.WebSiteSlotResource>>
override this.GetWebSiteSlotAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.WebSiteSlotResource>>
Public Overridable Function GetWebSiteSlotAsync (slot As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of WebSiteSlotResource))

参数

slot
String

部署槽的名称。 默认情况下,此 API 返回生产槽。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

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

slot 为 null。

适用于