From 52de540d44f6db0af6975371d20042ee7097489c Mon Sep 17 00:00:00 2001 From: George Fu Date: Fri, 18 Aug 2023 15:17:18 +0000 Subject: [PATCH] feat(rekognitionstreaming): add oval fit timeout configuration option --- .../StartFaceLivenessSessionCommand.ts | 3 + .../src/models/models_0.ts | 2 + .../src/protocols/Aws_restJson1.ts | 2 + .../aws-models/rekognitionstreaming.json | 201 ++++++++++-------- 4 files changed, 123 insertions(+), 85 deletions(-) diff --git a/clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts b/clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts index 32319eb45d829..c43534325c5c6 100644 --- a/clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts +++ b/clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts @@ -57,6 +57,8 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness *

The maximum video size for Face Liveness is 10 MB. Face Liveness throws a * ValidationException if the video does not match the necessary formatting and * size parameters.

+ *

StartFaceLivenessSession supports the websockets and the AWS SDK + * for JavaScript.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -144,6 +146,7 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness * // OvalIouHeightThreshold: Number("float"), * // FaceIouWidthThreshold: Number("float"), * // FaceIouHeightThreshold: Number("float"), + * // OvalFitTimeout: Number("int"), * // }, * // ColorSequences: [ // ColorSequences // required * // { // ColorSequence diff --git a/clients/client-rekognitionstreaming/src/models/models_0.ts b/clients/client-rekognitionstreaming/src/models/models_0.ts index 1b3e22366aee2..438d355a8b657 100644 --- a/clients/client-rekognitionstreaming/src/models/models_0.ts +++ b/clients/client-rekognitionstreaming/src/models/models_0.ts @@ -128,6 +128,8 @@ export interface ChallengeConfig { *

Threshold for height during face IOU (Intersection over Union) match.

*/ FaceIouHeightThreshold?: number; + + OvalFitTimeout?: number; } /** diff --git a/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts b/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts index 4e91c3ad110ae..1044bfd64b103 100644 --- a/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts +++ b/clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts @@ -4,6 +4,7 @@ import { _json, collectBody, decorateServiceException as __decorateServiceException, + expectInt32 as __expectInt32, expectString as __expectString, expectUnion as __expectUnion, limitedParseFloat32 as __limitedParseFloat32, @@ -540,6 +541,7 @@ const de_ChallengeConfig = (output: any, context: __SerdeContext): ChallengeConf FaceDistanceThresholdMin: __limitedParseFloat32, FaceIouHeightThreshold: __limitedParseFloat32, FaceIouWidthThreshold: __limitedParseFloat32, + OvalFitTimeout: __expectInt32, OvalHeightWidthRatio: __limitedParseFloat32, OvalIouHeightThreshold: __limitedParseFloat32, OvalIouThreshold: __limitedParseFloat32, diff --git a/codegen/sdk-codegen/aws-models/rekognitionstreaming.json b/codegen/sdk-codegen/aws-models/rekognitionstreaming.json index 97c497b48a95f..1231d991c859f 100644 --- a/codegen/sdk-codegen/aws-models/rekognitionstreaming.json +++ b/codegen/sdk-codegen/aws-models/rekognitionstreaming.json @@ -152,6 +152,9 @@ "traits": { "smithy.api#documentation": "

Threshold for height during face IOU (Intersection over Union) match.

" } + }, + "OvalFitTimeout": { + "target": "com.amazonaws.rekognitionstreaming#TimeoutInMs" } }, "traits": { @@ -970,55 +973,55 @@ "smithy.rules#endpointTests": { "testCases": [ { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition-fips.us-gov-east-1.api.aws" + "url": "https://streaming-rekognition-fips.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition-fips.us-gov-east-1.amazonaws.com" + "url": "https://streaming-rekognition-fips.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": true + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition.us-gov-east-1.api.aws" + "url": "https://streaming-rekognition.us-east-1.api.aws" } }, "params": { - "UseDualStack": true, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition.us-gov-east-1.amazonaws.com" + "url": "https://streaming-rekognition.us-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-gov-east-1", - "UseFIPS": false + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1029,9 +1032,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1042,9 +1045,9 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1055,9 +1058,9 @@ } }, "params": { - "UseDualStack": true, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1068,109 +1071,109 @@ } }, "params": { - "UseDualStack": false, "Region": "cn-north-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + "endpoint": { + "url": "https://streaming-rekognition-fips.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition-fips.us-iso-east-1.c2s.ic.gov" + "url": "https://streaming-rekognition-fips.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": true + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" + "endpoint": { + "url": "https://streaming-rekognition.us-gov-east-1.api.aws" + } }, "params": { - "UseDualStack": true, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition.us-iso-east-1.c2s.ic.gov" + "url": "https://streaming-rekognition.us-gov-east-1.amazonaws.com" } }, "params": { - "UseDualStack": false, - "Region": "us-iso-east-1", - "UseFIPS": false + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://streaming-rekognition-fips.us-east-1.api.aws" - } + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition-fips.us-east-1.amazonaws.com" + "url": "https://streaming-rekognition-fips.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": true + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", "expect": { - "endpoint": { - "url": "https://streaming-rekognition.us-east-1.api.aws" - } + "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true } }, { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", "expect": { "endpoint": { - "url": "https://streaming-rekognition.us-east-1.amazonaws.com" + "url": "https://streaming-rekognition.us-iso-east-1.c2s.ic.gov" } }, "params": { - "UseDualStack": false, - "Region": "us-east-1", - "UseFIPS": false + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1179,9 +1182,9 @@ "error": "FIPS and DualStack are enabled, but this partition does not support one or both" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1192,9 +1195,9 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1203,9 +1206,9 @@ "error": "DualStack is enabled but this partition does not support DualStack" }, "params": { - "UseDualStack": true, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1216,22 +1219,35 @@ } }, "params": { - "UseDualStack": false, "Region": "us-isob-east-1", - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { - "documentation": "For custom endpoint with fips disabled and dualstack disabled", + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", "expect": { "endpoint": { "url": "https://example.com" } }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1241,9 +1257,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "UseDualStack": false, "Region": "us-east-1", "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1253,11 +1269,17 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "UseDualStack": true, "Region": "us-east-1", "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } } ], "version": "1.0" @@ -1388,7 +1410,7 @@ } ], "traits": { - "smithy.api#documentation": "

Starts a Face Liveness video stream and liveness detection process for a given\n session.

\n

Requires sessionId, ChallengeVersions, VideoWidth,\n VideoHeight and a RequestEventStream as input. The event stream\n contains information about different events for the session, including the challenge\n information used for verification.

\n

The maximum video size for Face Liveness is 10 MB. Face Liveness throws a\n ValidationException if the video does not match the necessary formatting and\n size parameters.

", + "smithy.api#documentation": "

Starts a Face Liveness video stream and liveness detection process for a given\n session.

\n

Requires sessionId, ChallengeVersions, VideoWidth,\n VideoHeight and a RequestEventStream as input. The event stream\n contains information about different events for the session, including the challenge\n information used for verification.

\n

The maximum video size for Face Liveness is 10 MB. Face Liveness throws a\n ValidationException if the video does not match the necessary formatting and\n size parameters.

\n

StartFaceLivenessSession supports the websockets and the AWS SDK \n for JavaScript.

", "smithy.api#http": { "method": "POST", "uri": "/start-face-liveness-session", @@ -1523,6 +1545,15 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.rekognitionstreaming#TimeoutInMs": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0, + "max": 10000 + } + } + }, "com.amazonaws.rekognitionstreaming#UUID": { "type": "string", "traits": {