AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the AssociateFaces operation.
Associates one or more faces with an existing UserID. Takes an array of FaceIds
.
Each FaceId
that are present in the FaceIds
list is associated with
the provided UserID. The maximum number of total FaceIds
per UserID is 100.
The UserMatchThreshold
parameter specifies the minimum user match confidence
required for the face to be associated with a UserID that has at least one FaceID
already associated. This ensures that the FaceIds
are associated with the right
UserID. The value ranges from 0-100 and default value is 75.
If successful, an array of AssociatedFace
objects containing the associated
FaceIds
is returned. If a given face is already associated with the given UserID
,
it will be ignored and will not be returned in the response. If a given face is already
associated to a different UserID
, isn't found in the collection, doesn’t meet
the UserMatchThreshold
, or there are already 100 faces associated with the
UserID
, it will be returned as part of an array of UnsuccessfulFaceAssociations.
The UserStatus
reflects the status of an operation which updates a UserID representation
with a list of given faces. The UserStatus
can be:
ACTIVE - All associations or disassociations of FaceID(s) for a UserID are complete.
CREATED - A UserID has been created, but has no FaceID(s) associated with it.
UPDATING - A UserID is being updated and there are current associations or disassociations of FaceID(s) taking place.
Namespace: Amazon.Rekognition.Model
Assembly: AWSSDK.Rekognition.dll
Version: 3.x.y.z
public class AssociateFacesRequest : AmazonRekognitionRequest IAmazonWebServiceRequest
The AssociateFacesRequest type exposes the following members
Name | Description | |
---|---|---|
AssociateFacesRequest() |
Name | Type | Description | |
---|---|---|---|
ClientRequestToken | System.String |
Gets and sets the property ClientRequestToken.
Idempotent token used to identify the request to |
|
CollectionId | System.String |
Gets and sets the property CollectionId. The ID of an existing collection containing the UserID. |
|
FaceIds | System.Collections.Generic.List<System.String> |
Gets and sets the property FaceIds. An array of FaceIDs to associate with the UserID. |
|
UserId | System.String |
Gets and sets the property UserId. The ID for the existing UserID. |
|
UserMatchThreshold | System.Single |
Gets and sets the property UserMatchThreshold. An optional value specifying the minimum confidence in the UserID match to return. The default value is 75. |
This operation associates one or more faces with an existing UserID.
var client = new AmazonRekognitionClient(); var response = client.AssociateFaces(new AssociateFacesRequest { ClientRequestToken = "550e8400-e29b-41d4-a716-446655440002", CollectionId = "MyCollection", FaceIds = new List<string> { "f5817d37-94f6-4335-bfee-6cf79a3d806e", "851cb847-dccc-4fea-9309-9f4805967855", "35ebbb41-7f67-4263-908d-dd0ecba05ab9" }, UserId = "DemoUser", UserMatchThreshold = 70 }); List<AssociatedFace> associatedFaces = response.AssociatedFaces; List<UnsuccessfulFaceAssociation> unsuccessfulFaceAssociations = response.UnsuccessfulFaceAssociations; string userStatus = response.UserStatus;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5