LargeFaceListClient.Create Method

Definition

Overloads

Create(RequestContent, RequestContext)

[Protocol Method] Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel.

Create(String, String, Nullable<FaceRecognitionModel>, CancellationToken)

Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel.

Create(RequestContent, RequestContext)

Source:
LargeFaceListClient.cs

[Protocol Method] Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel.

public virtual Azure.Response Create (Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member Create : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.Create : Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function Create (content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

content
RequestContent

The content to send as the body of the request.

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

content is null.

Service returned a non-success status code.

Examples

This sample shows how to call Create.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");

using RequestContent content = RequestContent.Create(new
{
    name = "your_large_face_list_name",
    userData = "your_user_data",
    recognitionModel = "recognition_01",
});
Response response = client.Create(content);

Console.WriteLine(response.Status);

Applies to

Create(String, String, Nullable<FaceRecognitionModel>, CancellationToken)

Source:
LargeFaceListClient.cs

Create an empty Large Face List with user-specified largeFaceListId, name, an optional userData and recognitionModel.

public virtual Azure.Response Create (string name, string userData = default, Azure.AI.Vision.Face.FaceRecognitionModel? recognitionModel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member Create : string * string * Nullable<Azure.AI.Vision.Face.FaceRecognitionModel> * System.Threading.CancellationToken -> Azure.Response
override this.Create : string * string * Nullable<Azure.AI.Vision.Face.FaceRecognitionModel> * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function Create (name As String, Optional userData As String = Nothing, Optional recognitionModel As Nullable(Of FaceRecognitionModel) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

name
String

User defined name, maximum length is 128.

userData
String

Optional user defined data. Length should not exceed 16K.

recognitionModel
Nullable<FaceRecognitionModel>

The 'recognitionModel' associated with this face list. Supported 'recognitionModel' values include 'recognition_01', 'recognition_02, 'recognition_03', and 'recognition_04'. The default value is 'recognition_01'. 'recognition_04' is recommended since its accuracy is improved on faces wearing masks compared with 'recognition_03', and its overall accuracy is improved compared with 'recognition_01' and 'recognition_02'.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

name is null.

Examples

This sample shows how to call Create.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargeFaceListClient client = new FaceAdministrationClient(endpoint, credential).GetLargeFaceListClient("your_large_face_list_id");

Response response = client.Create("your_large_face_list_name");

Remarks

Please refer to https://learn.microsoft.com/rest/api/face/face-list-operations/create-large-face-list for more details.

Applies to