Condividi tramite


DocumentIntelligenceAdministrationClient.GetResourceDetailsAsync Method

Definition

Overloads

GetResourceDetailsAsync(RequestContext)

[Protocol Method] Return information about the current resource.

GetResourceDetailsAsync(CancellationToken)

Return information about the current resource.

GetResourceDetailsAsync(RequestContext)

Source:
DocumentIntelligenceAdministrationClient.cs

[Protocol Method] Return information about the current resource.

public virtual System.Threading.Tasks.Task<Azure.Response> GetResourceDetailsAsync (Azure.RequestContext context);
abstract member GetResourceDetailsAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetResourceDetailsAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetResourceDetailsAsync (context As RequestContext) As Task(Of Response)

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetResourceDetailsAsync and parse the result.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential);

Response response = await client.GetResourceDetailsAsync(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("count").ToString());
Console.WriteLine(result.GetProperty("customDocumentModels").GetProperty("limit").ToString());

Applies to

GetResourceDetailsAsync(CancellationToken)

Source:
DocumentIntelligenceAdministrationClient.cs

Return information about the current resource.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.DocumentIntelligence.DocumentIntelligenceResourceDetails>> GetResourceDetailsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetResourceDetailsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.DocumentIntelligence.DocumentIntelligenceResourceDetails>>
override this.GetResourceDetailsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.DocumentIntelligence.DocumentIntelligenceResourceDetails>>
Public Overridable Function GetResourceDetailsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of DocumentIntelligenceResourceDetails))

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetResourceDetailsAsync.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
DocumentIntelligenceAdministrationClient client = new DocumentIntelligenceAdministrationClient(endpoint, credential);

Response<DocumentIntelligenceResourceDetails> response = await client.GetResourceDetailsAsync();

Applies to