Skip to content

Commit a99b352

Browse files
author
awstools
committed
feat(client-rekognition): Adds support for defining an ordered preference list of different Rekognition Face Liveness challenge types when calling CreateFaceLivenessSession.
1 parent d7e8fb4 commit a99b352

File tree

11 files changed

+342
-114
lines changed

11 files changed

+342
-114
lines changed

clients/client-rekognition/src/commands/AssociateFacesCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ export interface AssociateFacesCommandOutput extends AssociateFacesResponse, __M
3030
/**
3131
* <p>Associates one or more faces with an existing UserID. Takes an array of
3232
* <code>FaceIds</code>. Each <code>FaceId</code> that are present in the <code>FaceIds</code>
33-
* list is associated with the provided UserID. The maximum number of total <code>FaceIds</code>
34-
* per UserID is 100. </p>
33+
* list is associated with the provided UserID. The number of FaceIds that can be used as input
34+
* in a single request is limited to 100.</p>
35+
* <p>Note that the total number of faces that can be associated with a single
36+
* <code>UserID</code> is also limited to 100. Once a <code>UserID</code> has 100 faces
37+
* associated with it, no additional faces can be added. If more API calls are made after the
38+
* limit is reached, a <code>ServiceQuotaExceededException</code> will result.</p>
3539
* <p>The <code>UserMatchThreshold</code> parameter specifies the minimum user match confidence
3640
* required for the face to be associated with a UserID that has at least one <code>FaceID</code>
3741
* already associated. This ensures that the <code>FaceIds</code> are associated with the right

clients/client-rekognition/src/commands/CreateFaceLivenessSessionCommand.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ export interface CreateFaceLivenessSessionCommandOutput extends CreateFaceLivene
5252
* S3KeyPrefix: "STRING_VALUE",
5353
* },
5454
* AuditImagesLimit: Number("int"),
55+
* ChallengePreferences: [ // ChallengePreferences
56+
* { // ChallengePreference
57+
* Type: "FaceMovementAndLightChallenge" || "FaceMovementChallenge", // required
58+
* Versions: { // Versions
59+
* Minimum: "STRING_VALUE",
60+
* Maximum: "STRING_VALUE",
61+
* },
62+
* },
63+
* ],
5564
* },
5665
* ClientRequestToken: "STRING_VALUE",
5766
* };

clients/client-rekognition/src/commands/DetectCustomLabelsCommand.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ export interface DetectCustomLabelsCommandOutput extends DetectCustomLabelsRespo
3838
* an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing
3939
* image bytes is not supported. The image must be either a PNG or JPEG formatted file. </p>
4040
* <p> For each object that the model version detects on an image, the API returns a
41-
* (<code>CustomLabel</code>) object in an array (<code>CustomLabels</code>). Each
42-
* <code>CustomLabel</code> object provides the label name (<code>Name</code>), the level
43-
* of confidence that the image contains the object (<code>Confidence</code>), and object
44-
* location information, if it exists, for the label on the image (<code>Geometry</code>).
45-
* Note that for the <code>DetectCustomLabelsLabels</code> operation, <code>Polygons</code>
46-
* are not returned in the <code>Geometry</code> section of the response.</p>
41+
* (<code>CustomLabel</code>) object in an array (<code>CustomLabels</code>).
42+
* Each <code>CustomLabel</code> object provides the label name (<code>Name</code>), the level
43+
* of confidence that the image contains the object (<code>Confidence</code>), and
44+
* object location information, if it exists, for the label on the image (<code>Geometry</code>). </p>
4745
* <p>To filter labels that are returned, specify a value for <code>MinConfidence</code>.
4846
* <code>DetectCustomLabelsLabels</code> only returns labels with a confidence that's higher than
4947
* the specified value.

clients/client-rekognition/src/commands/GetFaceLivenessSessionResultsCommand.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export interface GetFaceLivenessSessionResultsCommandOutput
9191
* // },
9292
* // },
9393
* // ],
94+
* // Challenge: { // Challenge
95+
* // Type: "FaceMovementAndLightChallenge" || "FaceMovementChallenge", // required
96+
* // Version: "STRING_VALUE", // required
97+
* // },
9498
* // };
9599
*
96100
* ```

clients/client-rekognition/src/commands/GetPersonTrackingCommand.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ export interface GetPersonTrackingCommandInput extends GetPersonTrackingRequest
2828
export interface GetPersonTrackingCommandOutput extends GetPersonTrackingResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Gets the path tracking results of a Amazon Rekognition Video analysis started by <a>StartPersonTracking</a>.</p>
31+
* <note>
32+
* <p>
33+
* <i>End of support notice:</i> On October 31, 2025, AWS will discontinue
34+
* support for Amazon Rekognition People Pathing. After October 31, 2025, you will no
35+
* longer be able to use the Rekognition People Pathing capability. For more information,
36+
* visit this <a href="https://aws.amazon.com/blogs/machine-learning/transitioning-from-amazon-rekognition-people-pathing-exploring-other-alternatives/">blog post</a>.</p>
37+
* </note>
38+
* <p>Gets the path tracking results of a Amazon Rekognition Video analysis started by <a>StartPersonTracking</a>.</p>
3239
* <p>The person path tracking operation is started by a call to <code>StartPersonTracking</code>
3340
* which returns a job identifier (<code>JobId</code>). When the operation finishes, Amazon Rekognition Video publishes a completion status to
3441
* the Amazon Simple Notification Service topic registered in the initial call to <code>StartPersonTracking</code>.</p>

clients/client-rekognition/src/commands/ListUsersCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { ListUsersRequest, ListUsersResponse } from "../models/models_0";
8+
import { ListUsersRequest, ListUsersResponse } from "../models/models_1";
99
import { de_ListUsersCommand, se_ListUsersCommand } from "../protocols/Aws_json1_1";
1010
import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient";
1111

clients/client-rekognition/src/commands/StartPersonTrackingCommand.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@ export interface StartPersonTrackingCommandInput extends StartPersonTrackingRequ
2828
export interface StartPersonTrackingCommandOutput extends StartPersonTrackingResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Starts the asynchronous tracking of a person's path in a stored video.</p>
31+
* <note>
32+
* <p>
33+
* <i>End of support notice:</i> On October 31, 2025, AWS will discontinue
34+
* support for Amazon Rekognition People Pathing. After October 31, 2025, you will no
35+
* longer be able to use the Rekognition People Pathing capability. For more information,
36+
* visit this <a href="https://aws.amazon.com/blogs/machine-learning/transitioning-from-amazon-rekognition-people-pathing-exploring-other-alternatives/">blog post</a>.</p>
37+
* </note>
38+
* <p>Starts the asynchronous tracking of a person's path in a stored video.</p>
3239
* <p>Amazon Rekognition Video can track the path of people in a video stored in an Amazon S3 bucket. Use <a>Video</a> to specify the bucket name
3340
* and the filename of the video. <code>StartPersonTracking</code>
3441
* returns a job identifier (<code>JobId</code>) which you use to get the results of the operation.

clients/client-rekognition/src/models/models_0.ts

Lines changed: 85 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -844,11 +844,11 @@ export const EmotionName = {
844844
export type EmotionName = (typeof EmotionName)[keyof typeof EmotionName];
845845

846846
/**
847-
* <p>The emotions that appear to be expressed on the face, and the confidence level in the
848-
* determination. The API is only making a determination of the physical appearance of a person's
849-
* face. It is not a determination of the person’s internal emotional state and should not be
850-
* used in such a way. For example, a person pretending to have a sad face might not be sad
851-
* emotionally.</p>
847+
* <p>The API returns a prediction of an emotion based on a person's facial expressions, along with
848+
* the confidence level for the predicted emotion. It is not a determination of the person’s internal emotional
849+
* state and should not be used in such a way. For example, a person pretending to have a sad face might not
850+
* be sad emotionally. The API is not intended to be used, and you may not use it, in a manner that violates
851+
* the EU Artificial Intelligence Act or any other applicable law.</p>
852852
* @public
853853
*/
854854
export interface Emotion {
@@ -1555,6 +1555,74 @@ export const CelebrityRecognitionSortBy = {
15551555
*/
15561556
export type CelebrityRecognitionSortBy = (typeof CelebrityRecognitionSortBy)[keyof typeof CelebrityRecognitionSortBy];
15571557

1558+
/**
1559+
* @public
1560+
* @enum
1561+
*/
1562+
export const ChallengeType = {
1563+
FACE_MOVEMENT_AND_LIGHT_CHALLENGE: "FaceMovementAndLightChallenge",
1564+
FACE_MOVEMENT_CHALLENGE: "FaceMovementChallenge",
1565+
} as const;
1566+
1567+
/**
1568+
* @public
1569+
*/
1570+
export type ChallengeType = (typeof ChallengeType)[keyof typeof ChallengeType];
1571+
1572+
/**
1573+
* <p>Describes the type and version of the challenge being used for the Face Liveness session.</p>
1574+
* @public
1575+
*/
1576+
export interface Challenge {
1577+
/**
1578+
* <p>The type of the challenge being used for the Face Liveness session.</p>
1579+
* @public
1580+
*/
1581+
Type: ChallengeType | undefined;
1582+
1583+
/**
1584+
* <p>The version of the challenge being used for the Face Liveness session.</p>
1585+
* @public
1586+
*/
1587+
Version: string | undefined;
1588+
}
1589+
1590+
/**
1591+
* <p>Object specifying the acceptable range of challenge versions.</p>
1592+
* @public
1593+
*/
1594+
export interface Versions {
1595+
/**
1596+
* <p>The desired minimum version for the challenge.</p>
1597+
* @public
1598+
*/
1599+
Minimum?: string | undefined;
1600+
1601+
/**
1602+
* <p>The desired maximum version for the challenge.</p>
1603+
* @public
1604+
*/
1605+
Maximum?: string | undefined;
1606+
}
1607+
1608+
/**
1609+
* <p>An ordered list of preferred challenge type and versions.</p>
1610+
* @public
1611+
*/
1612+
export interface ChallengePreference {
1613+
/**
1614+
* <p>The types of challenges that have been selected for the Face Liveness session.</p>
1615+
* @public
1616+
*/
1617+
Type: ChallengeType | undefined;
1618+
1619+
/**
1620+
* <p>The version of the challenges that have been selected for the Face Liveness session.</p>
1621+
* @public
1622+
*/
1623+
Versions?: Versions | undefined;
1624+
}
1625+
15581626
/**
15591627
* <p>Type that describes the face Amazon Rekognition chose to compare with the faces in the target.
15601628
* This contains a bounding box for the selected face and confidence level that the bounding box
@@ -2436,6 +2504,12 @@ export interface CreateFaceLivenessSessionRequestSettings {
24362504
* @public
24372505
*/
24382506
AuditImagesLimit?: number | undefined;
2507+
2508+
/**
2509+
* <p>Indicates preferred challenge types and versions for the Face Liveness session to be created.</p>
2510+
* @public
2511+
*/
2512+
ChallengePreferences?: ChallengePreference[] | undefined;
24392513
}
24402514

24412515
/**
@@ -6191,6 +6265,12 @@ export interface GetFaceLivenessSessionResultsResponse {
61916265
* @public
61926266
*/
61936267
AuditImages?: AuditImage[] | undefined;
6268+
6269+
/**
6270+
* <p>Contains information regarding the challenge type used for the Face Liveness check.</p>
6271+
* @public
6272+
*/
6273+
Challenge?: Challenge | undefined;
61946274
}
61956275

61966276
/**
@@ -8162,97 +8242,6 @@ export interface ListTagsForResourceResponse {
81628242
Tags?: Record<string, string> | undefined;
81638243
}
81648244

8165-
/**
8166-
* @public
8167-
*/
8168-
export interface ListUsersRequest {
8169-
/**
8170-
* <p>The ID of an existing collection.</p>
8171-
* @public
8172-
*/
8173-
CollectionId: string | undefined;
8174-
8175-
/**
8176-
* <p>Maximum number of UsersID to return. </p>
8177-
* @public
8178-
*/
8179-
MaxResults?: number | undefined;
8180-
8181-
/**
8182-
* <p>Pagingation token to receive the next set of UsersID.</p>
8183-
* @public
8184-
*/
8185-
NextToken?: string | undefined;
8186-
}
8187-
8188-
/**
8189-
* <p>Metadata of the user stored in a collection.</p>
8190-
* @public
8191-
*/
8192-
export interface User {
8193-
/**
8194-
* <p> A provided ID for the User. Unique within the collection.</p>
8195-
* @public
8196-
*/
8197-
UserId?: string | undefined;
8198-
8199-
/**
8200-
* <p> Communicates if the UserID has been updated with latest set of faces to be associated
8201-
* with the UserID. </p>
8202-
* @public
8203-
*/
8204-
UserStatus?: UserStatus | undefined;
8205-
}
8206-
8207-
/**
8208-
* @public
8209-
*/
8210-
export interface ListUsersResponse {
8211-
/**
8212-
* <p>List of UsersID associated with the specified collection.</p>
8213-
* @public
8214-
*/
8215-
Users?: User[] | undefined;
8216-
8217-
/**
8218-
* <p>A pagination token to be used with the subsequent request if the response is
8219-
* truncated.</p>
8220-
* @public
8221-
*/
8222-
NextToken?: string | undefined;
8223-
}
8224-
8225-
/**
8226-
* <p>The format of the project policy document that you supplied to
8227-
* <code>PutProjectPolicy</code> is incorrect. </p>
8228-
* @public
8229-
*/
8230-
export class MalformedPolicyDocumentException extends __BaseException {
8231-
readonly name: "MalformedPolicyDocumentException" = "MalformedPolicyDocumentException";
8232-
readonly $fault: "client" = "client";
8233-
Message?: string | undefined;
8234-
Code?: string | undefined;
8235-
/**
8236-
* <p>A universally unique identifier (UUID) for the request.</p>
8237-
* @public
8238-
*/
8239-
Logref?: string | undefined;
8240-
/**
8241-
* @internal
8242-
*/
8243-
constructor(opts: __ExceptionOptionType<MalformedPolicyDocumentException, __BaseException>) {
8244-
super({
8245-
name: "MalformedPolicyDocumentException",
8246-
$fault: "client",
8247-
...opts,
8248-
});
8249-
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
8250-
this.Message = opts.Message;
8251-
this.Code = opts.Code;
8252-
this.Logref = opts.Logref;
8253-
}
8254-
}
8255-
82568245
/**
82578246
* @internal
82588247
*/

0 commit comments

Comments
 (0)