Skip to content

feat(client-rekognitionstreaming): adds support for defining an ordered preference list of different Rekognition Face Liveness challenge types when calling CreateFaceLivenessSession #7118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
* <p>The maximum video size for Face Liveness is 10 MB. Face Liveness throws a
* <code>ValidationException</code> if the video does not match the necessary formatting and
* size parameters. </p>
* <p>StartFaceLivenessSession supports the websockets and <a href="https://aws.amazon.com/sdk-for-javascript/">the AWS SDK
* for JavaScript</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -106,6 +104,30 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
* CurrentColorStartTimestamp: Number("long"), // required
* },
* },
* FaceMovementChallenge: { // FaceMovementClientChallenge
* ChallengeId: "STRING_VALUE", // required
* VideoStartTimestamp: Number("long"),
* VideoEndTimestamp: Number("long"),
* InitialFace: {
* BoundingBox: {
* Width: Number("float"), // required
* Height: Number("float"), // required
* Left: Number("float"), // required
* Top: Number("float"), // required
* },
* InitialFaceDetectedTimestamp: Number("long"), // required
* },
* TargetFace: {
* BoundingBox: {
* Width: Number("float"), // required
* Height: Number("float"), // required
* Left: Number("float"), // required
* Top: Number("float"), // required
* },
* FaceDetectedInTargetPositionStartTimestamp: Number("long"), // required
* FaceDetectedInTargetPositionEndTimestamp: Number("long"), // required
* },
* },
* },
* },
* },
Expand Down Expand Up @@ -151,12 +173,37 @@ export interface StartFaceLivenessSessionCommandOutput extends StartFaceLiveness
* // },
* // ],
* // },
* // FaceMovementChallenge: { // FaceMovementServerChallenge
* // OvalParameters: {
* // Width: Number("float"), // required
* // Height: Number("float"), // required
* // CenterX: Number("float"), // required
* // CenterY: Number("float"), // required
* // },
* // ChallengeConfig: {
* // BlazeFaceDetectionThreshold: Number("float"),
* // FaceDistanceThresholdMin: Number("float"),
* // FaceDistanceThreshold: Number("float"),
* // FaceDistanceThresholdMax: Number("float"),
* // OvalIouThreshold: Number("float"),
* // OvalHeightWidthRatio: Number("float"),
* // OvalIouWidthThreshold: Number("float"),
* // OvalIouHeightThreshold: Number("float"),
* // FaceIouWidthThreshold: Number("float"),
* // FaceIouHeightThreshold: Number("float"),
* // OvalFitTimeout: Number("int"),
* // },
* // },
* // },
* // },
* // },
* // DisconnectionEvent: { // DisconnectionEvent
* // TimestampMillis: Number("long"), // required
* // },
* // ChallengeEvent: { // ChallengeEvent
* // Version: "STRING_VALUE", // required
* // Type: "FaceMovementAndLightChallenge" || "FaceMovementChallenge", // required
* // },
* // ValidationException: { // ValidationException
* // Message: "STRING_VALUE",
* // Code: "STRING_VALUE",
Expand Down
44 changes: 23 additions & 21 deletions clients/client-rekognitionstreaming/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/rekognitionstreaming.json */

const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
const s="required",
t="fn",
u="argv",
v="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h={[s]:false,"type":"String"},
i={[s]:true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
p=[k],
q=[l],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f}],type:f},{rules:[{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
export const ruleSet: RuleSetObject = _data;
Loading
Loading