LargePersonGroupClient.GetLargePersonGroupsAsync 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
GetLargePersonGroupsAsync(String, Nullable<Int32>, Nullable<Boolean>, RequestContext) |
[Protocol Method] List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel.
|
GetLargePersonGroupsAsync(String, Nullable<Int32>, Nullable<Boolean>, CancellationToken) |
List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel. |
GetLargePersonGroupsAsync(String, Nullable<Int32>, Nullable<Boolean>, RequestContext)
- Source:
- LargePersonGroupClient.cs
[Protocol Method] List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
- Please try the simpler GetLargePersonGroupsAsync(String, Nullable<Int32>, Nullable<Boolean>, CancellationToken) convenience overload with strongly typed models first.
public virtual System.Threading.Tasks.Task<Azure.Response> GetLargePersonGroupsAsync (string start, int? top, bool? returnRecognitionModel, Azure.RequestContext context);
abstract member GetLargePersonGroupsAsync : string * Nullable<int> * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetLargePersonGroupsAsync : string * Nullable<int> * Nullable<bool> * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetLargePersonGroupsAsync (start As String, top As Nullable(Of Integer), returnRecognitionModel As Nullable(Of Boolean), context As RequestContext) As Task(Of Response)
Parameters
- start
- String
List resources greater than the "start". It contains no more than 64 characters. Default is empty.
Return 'recognitionModel' or not. The default value is false.
- 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 GetLargePersonGroupsAsync and parse the result.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null);
Response response = await client.GetLargePersonGroupsAsync("00000000-0000-0000-0000-000000000000", 20, true, null);
JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result[0].GetProperty("name").ToString());
Console.WriteLine(result[0].GetProperty("largePersonGroupId").ToString());
Applies to
GetLargePersonGroupsAsync(String, Nullable<Int32>, Nullable<Boolean>, CancellationToken)
- Source:
- LargePersonGroupClient.cs
List all existing Large Person Groups' largePersonGroupId, name, userData and recognitionModel.
public virtual System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroup>>> GetLargePersonGroupsAsync (string start = default, int? top = default, bool? returnRecognitionModel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetLargePersonGroupsAsync : string * Nullable<int> * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroup>>>
override this.GetLargePersonGroupsAsync : string * Nullable<int> * Nullable<bool> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<System.Collections.Generic.IReadOnlyList<Azure.AI.Vision.Face.LargePersonGroup>>>
Public Overridable Function GetLargePersonGroupsAsync (Optional start As String = Nothing, Optional top As Nullable(Of Integer) = Nothing, Optional returnRecognitionModel As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of IReadOnlyList(Of LargePersonGroup)))
Parameters
- start
- String
List resources greater than the "start". It contains no more than 64 characters. Default is empty.
Return 'recognitionModel' or not. The default value is false.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Examples
This sample shows how to call GetLargePersonGroupsAsync.
Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient(null);
Response<IReadOnlyList<LargePersonGroup>> response = await client.GetLargePersonGroupsAsync();
Remarks
Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-groups for more details.
Applies to
Azure SDK for .NET