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

ResourceManagerRestRestClient.GetResource<TType> Method

Definition

Get a single resource.

public System.Threading.Tasks.Task<TType> GetResource<TType> (string resourceId, string apiVersion, System.Threading.CancellationToken cancellationToken, string odataQuery = default);
member this.GetResource : string * string * System.Threading.CancellationToken * string -> System.Threading.Tasks.Task<'ype>
Public Function GetResource(Of TType) (resourceId As String, apiVersion As String, cancellationToken As CancellationToken, Optional odataQuery As String = Nothing) As Task(Of TType)

Type Parameters

TType

Parameters

resourceId
String

The resource Id.

apiVersion
String

The API version to use.

cancellationToken
CancellationToken

The CancellationToken used to cancel the request.

odataQuery
String

The OData query.

Returns

Task<TType>

Applies to