Condividi tramite


LargePersonGroupClient.GetPerson Method

Definition

Overloads

GetPerson(Guid, RequestContext)

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details.

GetPerson(Guid, CancellationToken)

Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details.

GetPerson(Guid, RequestContext)

Source:
LargePersonGroupClient.cs

[Protocol Method] Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details.

public virtual Azure.Response GetPerson (Guid personId, Azure.RequestContext context);
abstract member GetPerson : Guid * Azure.RequestContext -> Azure.Response
override this.GetPerson : Guid * Azure.RequestContext -> Azure.Response
Public Overridable Function GetPerson (personId As Guid, context As RequestContext) As Response

Parameters

personId
Guid

ID of the person.

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 GetPerson and parse the result.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"), null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("personId").ToString());
Console.WriteLine(result.GetProperty("name").ToString());

Applies to

GetPerson(Guid, CancellationToken)

Source:
LargePersonGroupClient.cs
public virtual Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson> GetPerson (Guid personId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPerson : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson>
override this.GetPerson : Guid * System.Threading.CancellationToken -> Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson>
Public Overridable Function GetPerson (personId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Response(Of LargePersonGroupPerson)

Parameters

personId
Guid

ID of the person.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetPerson.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response<LargePersonGroupPerson> response = client.GetPerson(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"));

Applies to