LargePersonGroupClient.GetPersonAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetPersonAsync(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.
|
GetPersonAsync(Guid, CancellationToken) |
Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details. |
GetPersonAsync(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.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetPersonAsync(Guid, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetPersonAsync (Guid personId, Azure.RequestContext context);
abstract member GetPersonAsync : Guid * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetPersonAsync : Guid * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetPersonAsync (personId As Guid, context As RequestContext) As Task(Of 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 GetPersonAsync 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 = await client.GetPersonAsync(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
GetPersonAsync(Guid, CancellationToken)
- Source:
- LargePersonGroupClient.cs
Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-person for more details.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson>> GetPersonAsync (Guid personId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPersonAsync : Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson>>
override this.GetPersonAsync : Guid * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.LargePersonGroupPerson>>
Public Overridable Function GetPersonAsync (personId As Guid, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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 GetPersonAsync.
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 = await client.GetPersonAsync(Guid.Parse("25985303-c537-4467-b41d-bdb45cd95ca1"));
Applies to
Azure SDK for .NET