Compartilhar via


TenantResource.GetGenericResourceAsync Método

Definição

Obtém um recurso por ID.

  • Caminho da Solicitação/{resourceId}
  • Operação IdResources_GetById
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.GenericResource>> GetGenericResourceAsync (Azure.Core.ResourceIdentifier resourceId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetGenericResourceAsync : Azure.Core.ResourceIdentifier * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.GenericResource>>
override this.GetGenericResourceAsync : Azure.Core.ResourceIdentifier * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Resources.GenericResource>>
Public Overridable Function GetGenericResourceAsync (resourceId As ResourceIdentifier, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of GenericResource))

Parâmetros

resourceId
ResourceIdentifier

A ID totalmente qualificada do recurso, incluindo o nome e o tipo de recurso. Use o formato , /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}.

cancellationToken
CancellationToken

O token de cancelamento a ser usado.

Retornos

Exceções

resourceId é nulo.

Aplica-se a