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

ResourcesOperationsExtensions.GetByIdAsync 方法

定义

按 ID 获取资源。

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.GenericResourceInner> GetByIdAsync (this Microsoft.Azure.Management.ResourceManager.Fluent.IResourcesOperations operations, string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken = default);
static member GetByIdAsync : Microsoft.Azure.Management.ResourceManager.Fluent.IResourcesOperations * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.ResourceManager.Fluent.Models.GenericResourceInner>
<Extension()>
Public Function GetByIdAsync (operations As IResourcesOperations, resourceId As String, apiVersion As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of GenericResourceInner)

参数

operations
IResourcesOperations

此扩展方法的操作组。

resourceId
String

资源的完全限定 ID,包括资源名称和资源类型。 使用 /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}

apiVersion
String

要用于操作的 API 版本。

cancellationToken
CancellationToken

取消标记。

返回

适用于