diff --git a/clients/client-rekognition/README.md b/clients/client-rekognition/README.md index d1713edbca41..4bf015ccf21e 100644 --- a/clients/client-rekognition/README.md +++ b/clients/client-rekognition/README.md @@ -16,6 +16,11 @@ parameters, and common errors.

Amazon Rekognition Custom Labels @@ -346,16 +381,16 @@ using your favorite package manager: The AWS SDK is modulized by clients and commands. To send a request, you only need to import the `RekognitionClient` and -the commands you need, for example `CompareFacesCommand`: +the commands you need, for example `AssociateFacesCommand`: ```js // ES5 example -const { RekognitionClient, CompareFacesCommand } = require("@aws-sdk/client-rekognition"); +const { RekognitionClient, AssociateFacesCommand } = require("@aws-sdk/client-rekognition"); ``` ```ts // ES6+ example -import { RekognitionClient, CompareFacesCommand } from "@aws-sdk/client-rekognition"; +import { RekognitionClient, AssociateFacesCommand } from "@aws-sdk/client-rekognition"; ``` ### Usage @@ -374,7 +409,7 @@ const client = new RekognitionClient({ region: "REGION" }); const params = { /** input parameters */ }; -const command = new CompareFacesCommand(params); +const command = new AssociateFacesCommand(params); ``` #### Async/await @@ -453,7 +488,7 @@ const client = new AWS.Rekognition({ region: "REGION" }); // async/await. try { - const data = await client.compareFaces(params); + const data = await client.associateFaces(params); // process data. } catch (error) { // error handling. @@ -461,7 +496,7 @@ try { // Promises. client - .compareFaces(params) + .associateFaces(params) .then((data) => { // process data. }) @@ -470,7 +505,7 @@ client }); // callbacks. -client.compareFaces(params, (err, data) => { +client.associateFaces(params, (err, data) => { // process err and data. }); ``` @@ -526,6 +561,14 @@ see LICENSE for more information. ## Client Commands (Operations List) +

+ +AssociateFaces + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/associatefacescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/associatefacescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/associatefacescommandoutput.html) + +
CompareFaces @@ -589,6 +632,14 @@ CreateStreamProcessor [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/createstreamprocessorcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createstreamprocessorcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createstreamprocessorcommandoutput.html) +
+
+ +CreateUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/createusercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createusercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createusercommandoutput.html) +
@@ -645,6 +696,14 @@ DeleteStreamProcessor [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/deletestreamprocessorcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/deletestreamprocessorcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/deletestreamprocessorcommandoutput.html) +
+
+ +DeleteUser + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/deleteusercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/deleteusercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/deleteusercommandoutput.html) +
@@ -733,6 +792,14 @@ DetectText [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/detecttextcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/detecttextcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/detecttextcommandoutput.html) +
+
+ +DisassociateFaces + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/disassociatefacescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/disassociatefacescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/disassociatefacescommandoutput.html) +
@@ -885,6 +952,14 @@ ListTagsForResource [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/listtagsforresourcecommandoutput.html) +
+
+ +ListUsers + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/listuserscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/listuserscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/listuserscommandoutput.html) +
@@ -917,6 +992,22 @@ SearchFacesByImage [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/searchfacesbyimagecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchfacesbyimagecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchfacesbyimagecommandoutput.html) +
+
+ +SearchUsers + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/searchuserscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchuserscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchuserscommandoutput.html) + +
+
+ +SearchUsersByImage + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/searchusersbyimagecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchusersbyimagecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/searchusersbyimagecommandoutput.html) +
diff --git a/clients/client-rekognition/package.json b/clients/client-rekognition/package.json index e404684e04ff..d656f4d48b1d 100644 --- a/clients/client-rekognition/package.json +++ b/clients/client-rekognition/package.json @@ -55,12 +55,14 @@ "@aws-sdk/util-waiter": "*", "@smithy/protocol-http": "^1.0.1", "@smithy/types": "^1.0.0", - "tslib": "^2.5.0" + "tslib": "^2.5.0", + "uuid": "^8.3.2" }, "devDependencies": { "@aws-sdk/service-client-documentation-generator": "*", "@tsconfig/node14": "1.0.3", "@types/node": "^14.14.31", + "@types/uuid": "^8.3.0", "concurrently": "7.0.0", "downlevel-dts": "0.10.1", "rimraf": "3.0.2", diff --git a/clients/client-rekognition/src/Rekognition.ts b/clients/client-rekognition/src/Rekognition.ts index aba880552e00..cd65f0dc1367 100644 --- a/clients/client-rekognition/src/Rekognition.ts +++ b/clients/client-rekognition/src/Rekognition.ts @@ -2,6 +2,11 @@ import { createAggregatedClient } from "@aws-sdk/smithy-client"; import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; +import { + AssociateFacesCommand, + AssociateFacesCommandInput, + AssociateFacesCommandOutput, +} from "./commands/AssociateFacesCommand"; import { CompareFacesCommand, CompareFacesCommandInput, @@ -42,6 +47,7 @@ import { CreateStreamProcessorCommandInput, CreateStreamProcessorCommandOutput, } from "./commands/CreateStreamProcessorCommand"; +import { CreateUserCommand, CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand"; import { DeleteCollectionCommand, DeleteCollectionCommandInput, @@ -73,6 +79,7 @@ import { DeleteStreamProcessorCommandInput, DeleteStreamProcessorCommandOutput, } from "./commands/DeleteStreamProcessorCommand"; +import { DeleteUserCommand, DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand"; import { DescribeCollectionCommand, DescribeCollectionCommandInput, @@ -120,6 +127,11 @@ import { DetectProtectiveEquipmentCommandOutput, } from "./commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommand, DetectTextCommandInput, DetectTextCommandOutput } from "./commands/DetectTextCommand"; +import { + DisassociateFacesCommand, + DisassociateFacesCommandInput, + DisassociateFacesCommandOutput, +} from "./commands/DisassociateFacesCommand"; import { DistributeDatasetEntriesCommand, DistributeDatasetEntriesCommandInput, @@ -207,6 +219,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { ListUsersCommand, ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand"; import { PutProjectPolicyCommand, PutProjectPolicyCommandInput, @@ -223,6 +236,12 @@ import { SearchFacesByImageCommandOutput, } from "./commands/SearchFacesByImageCommand"; import { SearchFacesCommand, SearchFacesCommandInput, SearchFacesCommandOutput } from "./commands/SearchFacesCommand"; +import { + SearchUsersByImageCommand, + SearchUsersByImageCommandInput, + SearchUsersByImageCommandOutput, +} from "./commands/SearchUsersByImageCommand"; +import { SearchUsersCommand, SearchUsersCommandInput, SearchUsersCommandOutput } from "./commands/SearchUsersCommand"; import { StartCelebrityRecognitionCommand, StartCelebrityRecognitionCommandInput, @@ -302,6 +321,7 @@ import { import { RekognitionClient, RekognitionClientConfig } from "./RekognitionClient"; const commands = { + AssociateFacesCommand, CompareFacesCommand, CopyProjectVersionCommand, CreateCollectionCommand, @@ -310,6 +330,7 @@ const commands = { CreateProjectCommand, CreateProjectVersionCommand, CreateStreamProcessorCommand, + CreateUserCommand, DeleteCollectionCommand, DeleteDatasetCommand, DeleteFacesCommand, @@ -317,6 +338,7 @@ const commands = { DeleteProjectPolicyCommand, DeleteProjectVersionCommand, DeleteStreamProcessorCommand, + DeleteUserCommand, DescribeCollectionCommand, DescribeDatasetCommand, DescribeProjectsCommand, @@ -328,6 +350,7 @@ const commands = { DetectModerationLabelsCommand, DetectProtectiveEquipmentCommand, DetectTextCommand, + DisassociateFacesCommand, DistributeDatasetEntriesCommand, GetCelebrityInfoCommand, GetCelebrityRecognitionCommand, @@ -347,10 +370,13 @@ const commands = { ListProjectPoliciesCommand, ListStreamProcessorsCommand, ListTagsForResourceCommand, + ListUsersCommand, PutProjectPolicyCommand, RecognizeCelebritiesCommand, SearchFacesCommand, SearchFacesByImageCommand, + SearchUsersCommand, + SearchUsersByImageCommand, StartCelebrityRecognitionCommand, StartContentModerationCommand, StartFaceDetectionCommand, @@ -370,6 +396,20 @@ const commands = { }; export interface Rekognition { + /** + * @see {@link AssociateFacesCommand} + */ + associateFaces( + args: AssociateFacesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + associateFaces(args: AssociateFacesCommandInput, cb: (err: any, data?: AssociateFacesCommandOutput) => void): void; + associateFaces( + args: AssociateFacesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateFacesCommandOutput) => void + ): void; + /** * @see {@link CompareFacesCommand} */ @@ -488,6 +528,17 @@ export interface Rekognition { cb: (err: any, data?: CreateStreamProcessorCommandOutput) => void ): void; + /** + * @see {@link CreateUserCommand} + */ + createUser(args: CreateUserCommandInput, options?: __HttpHandlerOptions): Promise; + createUser(args: CreateUserCommandInput, cb: (err: any, data?: CreateUserCommandOutput) => void): void; + createUser( + args: CreateUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateUserCommandOutput) => void + ): void; + /** * @see {@link DeleteCollectionCommand} */ @@ -589,6 +640,17 @@ export interface Rekognition { cb: (err: any, data?: DeleteStreamProcessorCommandOutput) => void ): void; + /** + * @see {@link DeleteUserCommand} + */ + deleteUser(args: DeleteUserCommandInput, options?: __HttpHandlerOptions): Promise; + deleteUser(args: DeleteUserCommandInput, cb: (err: any, data?: DeleteUserCommandOutput) => void): void; + deleteUser( + args: DeleteUserCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteUserCommandOutput) => void + ): void; + /** * @see {@link DescribeCollectionCommand} */ @@ -755,6 +817,23 @@ export interface Rekognition { cb: (err: any, data?: DetectTextCommandOutput) => void ): void; + /** + * @see {@link DisassociateFacesCommand} + */ + disassociateFaces( + args: DisassociateFacesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + disassociateFaces( + args: DisassociateFacesCommandInput, + cb: (err: any, data?: DisassociateFacesCommandOutput) => void + ): void; + disassociateFaces( + args: DisassociateFacesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateFacesCommandOutput) => void + ): void; + /** * @see {@link DistributeDatasetEntriesCommand} */ @@ -1057,6 +1136,17 @@ export interface Rekognition { cb: (err: any, data?: ListTagsForResourceCommandOutput) => void ): void; + /** + * @see {@link ListUsersCommand} + */ + listUsers(args: ListUsersCommandInput, options?: __HttpHandlerOptions): Promise; + listUsers(args: ListUsersCommandInput, cb: (err: any, data?: ListUsersCommandOutput) => void): void; + listUsers( + args: ListUsersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListUsersCommandOutput) => void + ): void; + /** * @see {@link PutProjectPolicyCommand} */ @@ -1119,6 +1209,34 @@ export interface Rekognition { cb: (err: any, data?: SearchFacesByImageCommandOutput) => void ): void; + /** + * @see {@link SearchUsersCommand} + */ + searchUsers(args: SearchUsersCommandInput, options?: __HttpHandlerOptions): Promise; + searchUsers(args: SearchUsersCommandInput, cb: (err: any, data?: SearchUsersCommandOutput) => void): void; + searchUsers( + args: SearchUsersCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchUsersCommandOutput) => void + ): void; + + /** + * @see {@link SearchUsersByImageCommand} + */ + searchUsersByImage( + args: SearchUsersByImageCommandInput, + options?: __HttpHandlerOptions + ): Promise; + searchUsersByImage( + args: SearchUsersByImageCommandInput, + cb: (err: any, data?: SearchUsersByImageCommandOutput) => void + ): void; + searchUsersByImage( + args: SearchUsersByImageCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchUsersByImageCommandOutput) => void + ): void; + /** * @see {@link StartCelebrityRecognitionCommand} */ @@ -1389,6 +1507,11 @@ export interface Rekognition { * *

* Amazon Rekognition Custom Labels diff --git a/clients/client-rekognition/src/RekognitionClient.ts b/clients/client-rekognition/src/RekognitionClient.ts index 51b121ce368d..dc627e1e5f0a 100644 --- a/clients/client-rekognition/src/RekognitionClient.ts +++ b/clients/client-rekognition/src/RekognitionClient.ts @@ -51,6 +51,7 @@ import { StreamCollector as __StreamCollector, } from "@smithy/types"; +import { AssociateFacesCommandInput, AssociateFacesCommandOutput } from "./commands/AssociateFacesCommand"; import { CompareFacesCommandInput, CompareFacesCommandOutput } from "./commands/CompareFacesCommand"; import { CopyProjectVersionCommandInput, CopyProjectVersionCommandOutput } from "./commands/CopyProjectVersionCommand"; import { CreateCollectionCommandInput, CreateCollectionCommandOutput } from "./commands/CreateCollectionCommand"; @@ -68,6 +69,7 @@ import { CreateStreamProcessorCommandInput, CreateStreamProcessorCommandOutput, } from "./commands/CreateStreamProcessorCommand"; +import { CreateUserCommandInput, CreateUserCommandOutput } from "./commands/CreateUserCommand"; import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput } from "./commands/DeleteCollectionCommand"; import { DeleteDatasetCommandInput, DeleteDatasetCommandOutput } from "./commands/DeleteDatasetCommand"; import { DeleteFacesCommandInput, DeleteFacesCommandOutput } from "./commands/DeleteFacesCommand"; @@ -84,6 +86,7 @@ import { DeleteStreamProcessorCommandInput, DeleteStreamProcessorCommandOutput, } from "./commands/DeleteStreamProcessorCommand"; +import { DeleteUserCommandInput, DeleteUserCommandOutput } from "./commands/DeleteUserCommand"; import { DescribeCollectionCommandInput, DescribeCollectionCommandOutput } from "./commands/DescribeCollectionCommand"; import { DescribeDatasetCommandInput, DescribeDatasetCommandOutput } from "./commands/DescribeDatasetCommand"; import { DescribeProjectsCommandInput, DescribeProjectsCommandOutput } from "./commands/DescribeProjectsCommand"; @@ -107,6 +110,7 @@ import { DetectProtectiveEquipmentCommandOutput, } from "./commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommandInput, DetectTextCommandOutput } from "./commands/DetectTextCommand"; +import { DisassociateFacesCommandInput, DisassociateFacesCommandOutput } from "./commands/DisassociateFacesCommand"; import { DistributeDatasetEntriesCommandInput, DistributeDatasetEntriesCommandOutput, @@ -150,6 +154,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { ListUsersCommandInput, ListUsersCommandOutput } from "./commands/ListUsersCommand"; import { PutProjectPolicyCommandInput, PutProjectPolicyCommandOutput } from "./commands/PutProjectPolicyCommand"; import { RecognizeCelebritiesCommandInput, @@ -157,6 +162,8 @@ import { } from "./commands/RecognizeCelebritiesCommand"; import { SearchFacesByImageCommandInput, SearchFacesByImageCommandOutput } from "./commands/SearchFacesByImageCommand"; import { SearchFacesCommandInput, SearchFacesCommandOutput } from "./commands/SearchFacesCommand"; +import { SearchUsersByImageCommandInput, SearchUsersByImageCommandOutput } from "./commands/SearchUsersByImageCommand"; +import { SearchUsersCommandInput, SearchUsersCommandOutput } from "./commands/SearchUsersCommand"; import { StartCelebrityRecognitionCommandInput, StartCelebrityRecognitionCommandOutput, @@ -217,6 +224,7 @@ export { __Client }; * @public */ export type ServiceInputTypes = + | AssociateFacesCommandInput | CompareFacesCommandInput | CopyProjectVersionCommandInput | CreateCollectionCommandInput @@ -225,6 +233,7 @@ export type ServiceInputTypes = | CreateProjectCommandInput | CreateProjectVersionCommandInput | CreateStreamProcessorCommandInput + | CreateUserCommandInput | DeleteCollectionCommandInput | DeleteDatasetCommandInput | DeleteFacesCommandInput @@ -232,6 +241,7 @@ export type ServiceInputTypes = | DeleteProjectPolicyCommandInput | DeleteProjectVersionCommandInput | DeleteStreamProcessorCommandInput + | DeleteUserCommandInput | DescribeCollectionCommandInput | DescribeDatasetCommandInput | DescribeProjectVersionsCommandInput @@ -243,6 +253,7 @@ export type ServiceInputTypes = | DetectModerationLabelsCommandInput | DetectProtectiveEquipmentCommandInput | DetectTextCommandInput + | DisassociateFacesCommandInput | DistributeDatasetEntriesCommandInput | GetCelebrityInfoCommandInput | GetCelebrityRecognitionCommandInput @@ -262,10 +273,13 @@ export type ServiceInputTypes = | ListProjectPoliciesCommandInput | ListStreamProcessorsCommandInput | ListTagsForResourceCommandInput + | ListUsersCommandInput | PutProjectPolicyCommandInput | RecognizeCelebritiesCommandInput | SearchFacesByImageCommandInput | SearchFacesCommandInput + | SearchUsersByImageCommandInput + | SearchUsersCommandInput | StartCelebrityRecognitionCommandInput | StartContentModerationCommandInput | StartFaceDetectionCommandInput @@ -287,6 +301,7 @@ export type ServiceInputTypes = * @public */ export type ServiceOutputTypes = + | AssociateFacesCommandOutput | CompareFacesCommandOutput | CopyProjectVersionCommandOutput | CreateCollectionCommandOutput @@ -295,6 +310,7 @@ export type ServiceOutputTypes = | CreateProjectCommandOutput | CreateProjectVersionCommandOutput | CreateStreamProcessorCommandOutput + | CreateUserCommandOutput | DeleteCollectionCommandOutput | DeleteDatasetCommandOutput | DeleteFacesCommandOutput @@ -302,6 +318,7 @@ export type ServiceOutputTypes = | DeleteProjectPolicyCommandOutput | DeleteProjectVersionCommandOutput | DeleteStreamProcessorCommandOutput + | DeleteUserCommandOutput | DescribeCollectionCommandOutput | DescribeDatasetCommandOutput | DescribeProjectVersionsCommandOutput @@ -313,6 +330,7 @@ export type ServiceOutputTypes = | DetectModerationLabelsCommandOutput | DetectProtectiveEquipmentCommandOutput | DetectTextCommandOutput + | DisassociateFacesCommandOutput | DistributeDatasetEntriesCommandOutput | GetCelebrityInfoCommandOutput | GetCelebrityRecognitionCommandOutput @@ -332,10 +350,13 @@ export type ServiceOutputTypes = | ListProjectPoliciesCommandOutput | ListStreamProcessorsCommandOutput | ListTagsForResourceCommandOutput + | ListUsersCommandOutput | PutProjectPolicyCommandOutput | RecognizeCelebritiesCommandOutput | SearchFacesByImageCommandOutput | SearchFacesCommandOutput + | SearchUsersByImageCommandOutput + | SearchUsersCommandOutput | StartCelebrityRecognitionCommandOutput | StartContentModerationCommandOutput | StartFaceDetectionCommandOutput @@ -527,6 +548,11 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv *

*

* Amazon Rekognition Custom Labels diff --git a/clients/client-rekognition/src/commands/AssociateFacesCommand.ts b/clients/client-rekognition/src/commands/AssociateFacesCommand.ts new file mode 100644 index 000000000000..870288f892c6 --- /dev/null +++ b/clients/client-rekognition/src/commands/AssociateFacesCommand.ts @@ -0,0 +1,227 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { AssociateFacesRequest, AssociateFacesResponse } from "../models/models_0"; +import { de_AssociateFacesCommand, se_AssociateFacesCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link AssociateFacesCommand}. + */ +export interface AssociateFacesCommandInput extends AssociateFacesRequest {} +/** + * @public + * + * The output of {@link AssociateFacesCommand}. + */ +export interface AssociateFacesCommandOutput extends AssociateFacesResponse, __MetadataBearer {} + +/** + * @public + *

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.

    + *
  • + *
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, AssociateFacesCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, AssociateFacesCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // AssociateFacesRequest + * CollectionId: "STRING_VALUE", // required + * UserId: "STRING_VALUE", // required + * FaceIds: [ // UserFaceIdList // required + * "STRING_VALUE", + * ], + * UserMatchThreshold: Number("float"), + * ClientRequestToken: "STRING_VALUE", + * }; + * const command = new AssociateFacesCommand(input); + * const response = await client.send(command); + * // { // AssociateFacesResponse + * // AssociatedFaces: [ // AssociatedFacesList + * // { // AssociatedFace + * // FaceId: "STRING_VALUE", + * // }, + * // ], + * // UnsuccessfulFaceAssociations: [ // UnsuccessfulFaceAssociationList + * // { // UnsuccessfulFaceAssociation + * // FaceId: "STRING_VALUE", + * // UserId: "STRING_VALUE", + * // Confidence: Number("float"), + * // Reasons: [ // UnsuccessfulFaceAssociationReasons + * // "FACE_NOT_FOUND" || "ASSOCIATED_TO_A_DIFFERENT_USER" || "LOW_MATCH_CONFIDENCE", + * // ], + * // }, + * // ], + * // UserStatus: "ACTIVE" || "UPDATING" || "CREATING" || "CREATED", + * // }; + * + * ``` + * + * @param AssociateFacesCommandInput - {@link AssociateFacesCommandInput} + * @returns {@link AssociateFacesCommandOutput} + * @see {@link AssociateFacesCommandInput} for command's `input` shape. + * @see {@link AssociateFacesCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link ConflictException} (client fault) + *

+ * A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + *

+ * + * @throws {@link IdempotentParameterMismatchException} (client fault) + *

A ClientRequestToken input parameter was reused with an operation, but at least one of the other input + * parameters is different from the previous call to the operation.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

+ *

The size of the collection exceeds the allowed limit. For more information, + * see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class AssociateFacesCommand extends $Command< + AssociateFacesCommandInput, + AssociateFacesCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: AssociateFacesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, AssociateFacesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "AssociateFacesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: AssociateFacesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_AssociateFacesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_AssociateFacesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/CreateUserCommand.ts b/clients/client-rekognition/src/commands/CreateUserCommand.ts new file mode 100644 index 000000000000..24fa635463b9 --- /dev/null +++ b/clients/client-rekognition/src/commands/CreateUserCommand.ts @@ -0,0 +1,181 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { CreateUserRequest, CreateUserResponse } from "../models/models_0"; +import { de_CreateUserCommand, se_CreateUserCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link CreateUserCommand}. + */ +export interface CreateUserCommandInput extends CreateUserRequest {} +/** + * @public + * + * The output of {@link CreateUserCommand}. + */ +export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataBearer {} + +/** + * @public + *

Creates a new User within a collection specified by CollectionId. Takes + * UserId as a parameter, which is a user provided ID which should be unique + * within the collection. The provided UserId will alias the system generated + * UUID to make the UserId more user friendly.

+ *

Uses a ClientToken, an idempotency token that ensures a call to + * CreateUser completes only once. If the value is not supplied, the AWS SDK + * generates an idempotency token for the requests. This prevents retries after a network + * error results from making multiple CreateUser calls.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, CreateUserCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, CreateUserCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // CreateUserRequest + * CollectionId: "STRING_VALUE", // required + * UserId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * }; + * const command = new CreateUserCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param CreateUserCommandInput - {@link CreateUserCommandInput} + * @returns {@link CreateUserCommandOutput} + * @see {@link CreateUserCommandInput} for command's `input` shape. + * @see {@link CreateUserCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link ConflictException} (client fault) + *

+ * A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + *

+ * + * @throws {@link IdempotentParameterMismatchException} (client fault) + *

A ClientRequestToken input parameter was reused with an operation, but at least one of the other input + * parameters is different from the previous call to the operation.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

+ *

The size of the collection exceeds the allowed limit. For more information, + * see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class CreateUserCommand extends $Command< + CreateUserCommandInput, + CreateUserCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateUserCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, CreateUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "CreateUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: CreateUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_CreateUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_CreateUserCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/DeleteFacesCommand.ts b/clients/client-rekognition/src/commands/DeleteFacesCommand.ts index 8d5860110f9c..a0297aeda7c9 100644 --- a/clients/client-rekognition/src/commands/DeleteFacesCommand.ts +++ b/clients/client-rekognition/src/commands/DeleteFacesCommand.ts @@ -58,6 +58,15 @@ export interface DeleteFacesCommandOutput extends DeleteFacesResponse, __Metadat * // DeletedFaces: [ // FaceIdList * // "STRING_VALUE", * // ], + * // UnsuccessfulFaceDeletions: [ // UnsuccessfulFaceDeletionsList + * // { // UnsuccessfulFaceDeletion + * // FaceId: "STRING_VALUE", + * // UserId: "STRING_VALUE", + * // Reasons: [ // UnsuccessfulFaceDeletionReasons + * // "ASSOCIATED_TO_AN_EXISTING_USER" || "FACE_NOT_FOUND", + * // ], + * // }, + * // ], * // }; * * ``` diff --git a/clients/client-rekognition/src/commands/DeleteUserCommand.ts b/clients/client-rekognition/src/commands/DeleteUserCommand.ts new file mode 100644 index 000000000000..8b0eaa60d77f --- /dev/null +++ b/clients/client-rekognition/src/commands/DeleteUserCommand.ts @@ -0,0 +1,173 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { DeleteUserRequest, DeleteUserResponse } from "../models/models_0"; +import { de_DeleteUserCommand, se_DeleteUserCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DeleteUserCommand}. + */ +export interface DeleteUserCommandInput extends DeleteUserRequest {} +/** + * @public + * + * The output of {@link DeleteUserCommand}. + */ +export interface DeleteUserCommandOutput extends DeleteUserResponse, __MetadataBearer {} + +/** + * @public + *

Deletes the specified UserID within the collection. Faces that are associated with the + * UserID are disassociated from the UserID before deleting the specified UserID. If the + * specified Collection or UserID is already deleted or not found, a + * ResourceNotFoundException will be thrown. If the action is successful with a + * 200 response, an empty HTTP body is returned.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, DeleteUserCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, DeleteUserCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // DeleteUserRequest + * CollectionId: "STRING_VALUE", // required + * UserId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * }; + * const command = new DeleteUserCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteUserCommandInput - {@link DeleteUserCommandInput} + * @returns {@link DeleteUserCommandOutput} + * @see {@link DeleteUserCommandInput} for command's `input` shape. + * @see {@link DeleteUserCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link ConflictException} (client fault) + *

+ * A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + *

+ * + * @throws {@link IdempotentParameterMismatchException} (client fault) + *

A ClientRequestToken input parameter was reused with an operation, but at least one of the other input + * parameters is different from the previous call to the operation.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class DeleteUserCommand extends $Command< + DeleteUserCommandInput, + DeleteUserCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteUserCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, DeleteUserCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "DeleteUserCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DeleteUserCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DeleteUserCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DeleteUserCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/DescribeCollectionCommand.ts b/clients/client-rekognition/src/commands/DescribeCollectionCommand.ts index 1d219b0b237f..bb68e7bbb690 100644 --- a/clients/client-rekognition/src/commands/DescribeCollectionCommand.ts +++ b/clients/client-rekognition/src/commands/DescribeCollectionCommand.ts @@ -57,6 +57,7 @@ export interface DescribeCollectionCommandOutput extends DescribeCollectionRespo * // FaceModelVersion: "STRING_VALUE", * // CollectionARN: "STRING_VALUE", * // CreationTimestamp: new Date("TIMESTAMP"), + * // UserCount: Number("long"), * // }; * * ``` diff --git a/clients/client-rekognition/src/commands/DisassociateFacesCommand.ts b/clients/client-rekognition/src/commands/DisassociateFacesCommand.ts new file mode 100644 index 000000000000..d3b6b5ce4860 --- /dev/null +++ b/clients/client-rekognition/src/commands/DisassociateFacesCommand.ts @@ -0,0 +1,197 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { DisassociateFacesRequest, DisassociateFacesResponse } from "../models/models_0"; +import { de_DisassociateFacesCommand, se_DisassociateFacesCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link DisassociateFacesCommand}. + */ +export interface DisassociateFacesCommandInput extends DisassociateFacesRequest {} +/** + * @public + * + * The output of {@link DisassociateFacesCommand}. + */ +export interface DisassociateFacesCommandOutput extends DisassociateFacesResponse, __MetadataBearer {} + +/** + * @public + *

Removes the association between a Face supplied in an array of + * FaceIds and the User. If the User is not present already, then a + * ResourceNotFound exception is thrown. If successful, an array of faces that are + * disassociated from the User is returned. If a given face is already disassociated from the + * given UserID, it will be ignored and not be returned in the response. If a given face is + * already associated with a different User or not found in the collection it will be returned as + * part of UnsuccessfulDisassociations. You can remove 1 - 100 face IDs from a user + * at one time.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, DisassociateFacesCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, DisassociateFacesCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // DisassociateFacesRequest + * CollectionId: "STRING_VALUE", // required + * UserId: "STRING_VALUE", // required + * ClientRequestToken: "STRING_VALUE", + * FaceIds: [ // UserFaceIdList // required + * "STRING_VALUE", + * ], + * }; + * const command = new DisassociateFacesCommand(input); + * const response = await client.send(command); + * // { // DisassociateFacesResponse + * // DisassociatedFaces: [ // DisassociatedFacesList + * // { // DisassociatedFace + * // FaceId: "STRING_VALUE", + * // }, + * // ], + * // UnsuccessfulFaceDisassociations: [ // UnsuccessfulFaceDisassociationList + * // { // UnsuccessfulFaceDisassociation + * // FaceId: "STRING_VALUE", + * // UserId: "STRING_VALUE", + * // Reasons: [ // UnsuccessfulFaceDisassociationReasons + * // "FACE_NOT_FOUND" || "ASSOCIATED_TO_A_DIFFERENT_USER", + * // ], + * // }, + * // ], + * // UserStatus: "ACTIVE" || "UPDATING" || "CREATING" || "CREATED", + * // }; + * + * ``` + * + * @param DisassociateFacesCommandInput - {@link DisassociateFacesCommandInput} + * @returns {@link DisassociateFacesCommandOutput} + * @see {@link DisassociateFacesCommandInput} for command's `input` shape. + * @see {@link DisassociateFacesCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link ConflictException} (client fault) + *

+ * A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + *

+ * + * @throws {@link IdempotentParameterMismatchException} (client fault) + *

A ClientRequestToken input parameter was reused with an operation, but at least one of the other input + * parameters is different from the previous call to the operation.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class DisassociateFacesCommand extends $Command< + DisassociateFacesCommandInput, + DisassociateFacesCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DisassociateFacesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, DisassociateFacesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "DisassociateFacesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: DisassociateFacesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_DisassociateFacesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_DisassociateFacesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/GetFaceSearchCommand.ts b/clients/client-rekognition/src/commands/GetFaceSearchCommand.ts index d1abc38f71a8..5248bddcd313 100644 --- a/clients/client-rekognition/src/commands/GetFaceSearchCommand.ts +++ b/clients/client-rekognition/src/commands/GetFaceSearchCommand.ts @@ -190,6 +190,7 @@ export interface GetFaceSearchCommandOutput extends GetFaceSearchResponse, __Met * // ExternalImageId: "STRING_VALUE", * // Confidence: Number("float"), * // IndexFacesModelVersion: "STRING_VALUE", + * // UserId: "STRING_VALUE", * // }, * // }, * // ], diff --git a/clients/client-rekognition/src/commands/IndexFacesCommand.ts b/clients/client-rekognition/src/commands/IndexFacesCommand.ts index a7caaff8028b..6c9ab7de9854 100644 --- a/clients/client-rekognition/src/commands/IndexFacesCommand.ts +++ b/clients/client-rekognition/src/commands/IndexFacesCommand.ts @@ -169,6 +169,7 @@ export interface IndexFacesCommandOutput extends IndexFacesResponse, __MetadataB * // ExternalImageId: "STRING_VALUE", * // Confidence: Number("float"), * // IndexFacesModelVersion: "STRING_VALUE", + * // UserId: "STRING_VALUE", * // }, * // FaceDetail: { // FaceDetail * // BoundingBox: { diff --git a/clients/client-rekognition/src/commands/ListFacesCommand.ts b/clients/client-rekognition/src/commands/ListFacesCommand.ts index fc1499b90b26..08efd7962b9a 100644 --- a/clients/client-rekognition/src/commands/ListFacesCommand.ts +++ b/clients/client-rekognition/src/commands/ListFacesCommand.ts @@ -52,6 +52,10 @@ export interface ListFacesCommandOutput extends ListFacesResponse, __MetadataBea * CollectionId: "STRING_VALUE", // required * NextToken: "STRING_VALUE", * MaxResults: Number("int"), + * UserId: "STRING_VALUE", + * FaceIds: [ // FaceIdList + * "STRING_VALUE", + * ], * }; * const command = new ListFacesCommand(input); * const response = await client.send(command); @@ -69,6 +73,7 @@ export interface ListFacesCommandOutput extends ListFacesResponse, __MetadataBea * // ExternalImageId: "STRING_VALUE", * // Confidence: Number("float"), * // IndexFacesModelVersion: "STRING_VALUE", + * // UserId: "STRING_VALUE", * // }, * // ], * // NextToken: "STRING_VALUE", diff --git a/clients/client-rekognition/src/commands/ListUsersCommand.ts b/clients/client-rekognition/src/commands/ListUsersCommand.ts new file mode 100644 index 000000000000..45dd7e6400b3 --- /dev/null +++ b/clients/client-rekognition/src/commands/ListUsersCommand.ts @@ -0,0 +1,175 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { ListUsersRequest, ListUsersResponse } from "../models/models_0"; +import { de_ListUsersCommand, se_ListUsersCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link ListUsersCommand}. + */ +export interface ListUsersCommandInput extends ListUsersRequest {} +/** + * @public + * + * The output of {@link ListUsersCommand}. + */ +export interface ListUsersCommandOutput extends ListUsersResponse, __MetadataBearer {} + +/** + * @public + *

Returns metadata of the User such as UserID in the specified collection. + * Anonymous User (to reserve faces without any identity) is not returned as part of this + * request. The results are sorted by system generated primary key ID. If the response is + * truncated, NextToken is returned in the response that can be used in the + * subsequent request to retrieve the next set of identities.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, ListUsersCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, ListUsersCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // ListUsersRequest + * CollectionId: "STRING_VALUE", // required + * MaxResults: Number("int"), + * NextToken: "STRING_VALUE", + * }; + * const command = new ListUsersCommand(input); + * const response = await client.send(command); + * // { // ListUsersResponse + * // Users: [ // UserList + * // { // User + * // UserId: "STRING_VALUE", + * // UserStatus: "ACTIVE" || "UPDATING" || "CREATING" || "CREATED", + * // }, + * // ], + * // NextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListUsersCommandInput - {@link ListUsersCommandInput} + * @returns {@link ListUsersCommandOutput} + * @see {@link ListUsersCommandInput} for command's `input` shape. + * @see {@link ListUsersCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidPaginationTokenException} (client fault) + *

Pagination token in the request is not valid.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class ListUsersCommand extends $Command< + ListUsersCommandInput, + ListUsersCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListUsersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, ListUsersCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "ListUsersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: ListUsersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_ListUsersCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_ListUsersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/SearchFacesByImageCommand.ts b/clients/client-rekognition/src/commands/SearchFacesByImageCommand.ts index fa15706f4c10..4e2961c1aaed 100644 --- a/clients/client-rekognition/src/commands/SearchFacesByImageCommand.ts +++ b/clients/client-rekognition/src/commands/SearchFacesByImageCommand.ts @@ -118,6 +118,7 @@ export interface SearchFacesByImageCommandOutput extends SearchFacesByImageRespo * // ExternalImageId: "STRING_VALUE", * // Confidence: Number("float"), * // IndexFacesModelVersion: "STRING_VALUE", + * // UserId: "STRING_VALUE", * // }, * // }, * // ], diff --git a/clients/client-rekognition/src/commands/SearchFacesCommand.ts b/clients/client-rekognition/src/commands/SearchFacesCommand.ts index 8a5fad8f34c7..78619ad2d245 100644 --- a/clients/client-rekognition/src/commands/SearchFacesCommand.ts +++ b/clients/client-rekognition/src/commands/SearchFacesCommand.ts @@ -83,6 +83,7 @@ export interface SearchFacesCommandOutput extends SearchFacesResponse, __Metadat * // ExternalImageId: "STRING_VALUE", * // Confidence: Number("float"), * // IndexFacesModelVersion: "STRING_VALUE", + * // UserId: "STRING_VALUE", * // }, * // }, * // ], diff --git a/clients/client-rekognition/src/commands/SearchUsersByImageCommand.ts b/clients/client-rekognition/src/commands/SearchUsersByImageCommand.ts new file mode 100644 index 000000000000..6aeb46c0700d --- /dev/null +++ b/clients/client-rekognition/src/commands/SearchUsersByImageCommand.ts @@ -0,0 +1,363 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { SearchUsersByImageRequest, SearchUsersByImageResponse } from "../models/models_0"; +import { de_SearchUsersByImageCommand, se_SearchUsersByImageCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchUsersByImageCommand}. + */ +export interface SearchUsersByImageCommandInput extends SearchUsersByImageRequest {} +/** + * @public + * + * The output of {@link SearchUsersByImageCommand}. + */ +export interface SearchUsersByImageCommandOutput extends SearchUsersByImageResponse, __MetadataBearer {} + +/** + * @public + *

Searches for UserIDs using a supplied image. It first detects the largest face in the + * image, and then searches a specified collection for matching UserIDs.

+ *

The operation returns an array of UserIDs that match the face in the supplied image, + * ordered by similarity score with the highest similarity first. It also returns a bounding box + * for the face found in the input image.

+ *

Information about faces detected in the supplied image, but not used for the search, is + * returned in an array of UnsearchedFace objects. If no valid face is detected + * in the image, the response will contain an empty UserMatches list and no + * SearchedFace object.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, SearchUsersByImageCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, SearchUsersByImageCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // SearchUsersByImageRequest + * CollectionId: "STRING_VALUE", // required + * Image: { // Image + * Bytes: "BLOB_VALUE", + * S3Object: { // S3Object + * Bucket: "STRING_VALUE", + * Name: "STRING_VALUE", + * Version: "STRING_VALUE", + * }, + * }, + * UserMatchThreshold: Number("float"), + * MaxUsers: Number("int"), + * QualityFilter: "NONE" || "AUTO" || "LOW" || "MEDIUM" || "HIGH", + * }; + * const command = new SearchUsersByImageCommand(input); + * const response = await client.send(command); + * // { // SearchUsersByImageResponse + * // UserMatches: [ // UserMatchList + * // { // UserMatch + * // Similarity: Number("float"), + * // User: { // MatchedUser + * // UserId: "STRING_VALUE", + * // UserStatus: "ACTIVE" || "UPDATING" || "CREATING" || "CREATED", + * // }, + * // }, + * // ], + * // FaceModelVersion: "STRING_VALUE", + * // SearchedFace: { // SearchedFaceDetails + * // FaceDetail: { // FaceDetail + * // BoundingBox: { // BoundingBox + * // Width: Number("float"), + * // Height: Number("float"), + * // Left: Number("float"), + * // Top: Number("float"), + * // }, + * // AgeRange: { // AgeRange + * // Low: Number("int"), + * // High: Number("int"), + * // }, + * // Smile: { // Smile + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Eyeglasses: { // Eyeglasses + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Sunglasses: { // Sunglasses + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Gender: { // Gender + * // Value: "Male" || "Female", + * // Confidence: Number("float"), + * // }, + * // Beard: { // Beard + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Mustache: { // Mustache + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // EyesOpen: { // EyeOpen + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // MouthOpen: { // MouthOpen + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Emotions: [ // Emotions + * // { // Emotion + * // Type: "HAPPY" || "SAD" || "ANGRY" || "CONFUSED" || "DISGUSTED" || "SURPRISED" || "CALM" || "UNKNOWN" || "FEAR", + * // Confidence: Number("float"), + * // }, + * // ], + * // Landmarks: [ // Landmarks + * // { // Landmark + * // Type: "eyeLeft" || "eyeRight" || "nose" || "mouthLeft" || "mouthRight" || "leftEyeBrowLeft" || "leftEyeBrowRight" || "leftEyeBrowUp" || "rightEyeBrowLeft" || "rightEyeBrowRight" || "rightEyeBrowUp" || "leftEyeLeft" || "leftEyeRight" || "leftEyeUp" || "leftEyeDown" || "rightEyeLeft" || "rightEyeRight" || "rightEyeUp" || "rightEyeDown" || "noseLeft" || "noseRight" || "mouthUp" || "mouthDown" || "leftPupil" || "rightPupil" || "upperJawlineLeft" || "midJawlineLeft" || "chinBottom" || "midJawlineRight" || "upperJawlineRight", + * // X: Number("float"), + * // Y: Number("float"), + * // }, + * // ], + * // Pose: { // Pose + * // Roll: Number("float"), + * // Yaw: Number("float"), + * // Pitch: Number("float"), + * // }, + * // Quality: { // ImageQuality + * // Brightness: Number("float"), + * // Sharpness: Number("float"), + * // }, + * // Confidence: Number("float"), + * // FaceOccluded: { // FaceOccluded + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // EyeDirection: { // EyeDirection + * // Yaw: Number("float"), + * // Pitch: Number("float"), + * // Confidence: Number("float"), + * // }, + * // }, + * // }, + * // UnsearchedFaces: [ // UnsearchedFacesList + * // { // UnsearchedFace + * // FaceDetails: { + * // BoundingBox: { + * // Width: Number("float"), + * // Height: Number("float"), + * // Left: Number("float"), + * // Top: Number("float"), + * // }, + * // AgeRange: { + * // Low: Number("int"), + * // High: Number("int"), + * // }, + * // Smile: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Eyeglasses: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Sunglasses: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Gender: { + * // Value: "Male" || "Female", + * // Confidence: Number("float"), + * // }, + * // Beard: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Mustache: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // EyesOpen: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // MouthOpen: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // Emotions: [ + * // { + * // Type: "HAPPY" || "SAD" || "ANGRY" || "CONFUSED" || "DISGUSTED" || "SURPRISED" || "CALM" || "UNKNOWN" || "FEAR", + * // Confidence: Number("float"), + * // }, + * // ], + * // Landmarks: [ + * // { + * // Type: "eyeLeft" || "eyeRight" || "nose" || "mouthLeft" || "mouthRight" || "leftEyeBrowLeft" || "leftEyeBrowRight" || "leftEyeBrowUp" || "rightEyeBrowLeft" || "rightEyeBrowRight" || "rightEyeBrowUp" || "leftEyeLeft" || "leftEyeRight" || "leftEyeUp" || "leftEyeDown" || "rightEyeLeft" || "rightEyeRight" || "rightEyeUp" || "rightEyeDown" || "noseLeft" || "noseRight" || "mouthUp" || "mouthDown" || "leftPupil" || "rightPupil" || "upperJawlineLeft" || "midJawlineLeft" || "chinBottom" || "midJawlineRight" || "upperJawlineRight", + * // X: Number("float"), + * // Y: Number("float"), + * // }, + * // ], + * // Pose: { + * // Roll: Number("float"), + * // Yaw: Number("float"), + * // Pitch: Number("float"), + * // }, + * // Quality: { + * // Brightness: Number("float"), + * // Sharpness: Number("float"), + * // }, + * // Confidence: Number("float"), + * // FaceOccluded: { + * // Value: true || false, + * // Confidence: Number("float"), + * // }, + * // EyeDirection: { + * // Yaw: Number("float"), + * // Pitch: Number("float"), + * // Confidence: Number("float"), + * // }, + * // }, + * // Reasons: [ // UnsearchedFaceReasons + * // "FACE_NOT_LARGEST" || "EXCEEDS_MAX_FACES" || "EXTREME_POSE" || "LOW_BRIGHTNESS" || "LOW_SHARPNESS" || "LOW_CONFIDENCE" || "SMALL_BOUNDING_BOX" || "LOW_FACE_QUALITY", + * // ], + * // }, + * // ], + * // }; + * + * ``` + * + * @param SearchUsersByImageCommandInput - {@link SearchUsersByImageCommandInput} + * @returns {@link SearchUsersByImageCommandOutput} + * @see {@link SearchUsersByImageCommandInput} for command's `input` shape. + * @see {@link SearchUsersByImageCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link ImageTooLargeException} (client fault) + *

The input image size exceeds the allowed limit. If you are calling + * DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more + * information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + *

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidImageFormatException} (client fault) + *

The provided image format is not supported.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link InvalidS3ObjectException} (client fault) + *

Amazon Rekognition is unable to access the S3 object specified in the request.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class SearchUsersByImageCommand extends $Command< + SearchUsersByImageCommandInput, + SearchUsersByImageCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchUsersByImageCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, SearchUsersByImageCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "SearchUsersByImageCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchUsersByImageCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchUsersByImageCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchUsersByImageCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/SearchUsersCommand.ts b/clients/client-rekognition/src/commands/SearchUsersCommand.ts new file mode 100644 index 000000000000..d6e27f865ec9 --- /dev/null +++ b/clients/client-rekognition/src/commands/SearchUsersCommand.ts @@ -0,0 +1,184 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, +} from "@aws-sdk/types"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { SerdeContext as __SerdeContext } from "@smithy/types"; + +import { SearchUsersRequest, SearchUsersResponse } from "../models/models_0"; +import { de_SearchUsersCommand, se_SearchUsersCommand } from "../protocols/Aws_json1_1"; +import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; + +/** + * @public + */ +export { __MetadataBearer, $Command }; +/** + * @public + * + * The input for {@link SearchUsersCommand}. + */ +export interface SearchUsersCommandInput extends SearchUsersRequest {} +/** + * @public + * + * The output of {@link SearchUsersCommand}. + */ +export interface SearchUsersCommandOutput extends SearchUsersResponse, __MetadataBearer {} + +/** + * @public + *

Searches for UserIDs within a collection based on a FaceId or + * UserId. This API can be used to find the closest UserID (with a highest + * similarity) to associate a face. The request must be provided with either FaceId + * or UserId. The operation returns an array of UserID that match the + * FaceId or UserId, ordered by similarity score with the highest + * similarity first.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RekognitionClient, SearchUsersCommand } from "@aws-sdk/client-rekognition"; // ES Modules import + * // const { RekognitionClient, SearchUsersCommand } = require("@aws-sdk/client-rekognition"); // CommonJS import + * const client = new RekognitionClient(config); + * const input = { // SearchUsersRequest + * CollectionId: "STRING_VALUE", // required + * UserId: "STRING_VALUE", + * FaceId: "STRING_VALUE", + * UserMatchThreshold: Number("float"), + * MaxUsers: Number("int"), + * }; + * const command = new SearchUsersCommand(input); + * const response = await client.send(command); + * // { // SearchUsersResponse + * // UserMatches: [ // UserMatchList + * // { // UserMatch + * // Similarity: Number("float"), + * // User: { // MatchedUser + * // UserId: "STRING_VALUE", + * // UserStatus: "ACTIVE" || "UPDATING" || "CREATING" || "CREATED", + * // }, + * // }, + * // ], + * // FaceModelVersion: "STRING_VALUE", + * // SearchedFace: { // SearchedFace + * // FaceId: "STRING_VALUE", + * // }, + * // SearchedUser: { // SearchedUser + * // UserId: "STRING_VALUE", + * // }, + * // }; + * + * ``` + * + * @param SearchUsersCommandInput - {@link SearchUsersCommandInput} + * @returns {@link SearchUsersCommandOutput} + * @see {@link SearchUsersCommandInput} for command's `input` shape. + * @see {@link SearchUsersCommandOutput} for command's `response` shape. + * @see {@link RekognitionClientResolvedConfig | config} for RekognitionClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You are not authorized to perform the action.

+ * + * @throws {@link InternalServerError} (server fault) + *

Amazon Rekognition experienced a service issue. Try your call again.

+ * + * @throws {@link InvalidParameterException} (client fault) + *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

+ * + * @throws {@link ProvisionedThroughputExceededException} (client fault) + *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The resource specified in the request cannot be found.

+ * + * @throws {@link ThrottlingException} (server fault) + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ * + * @throws {@link RekognitionServiceException} + *

Base exception class for all service exceptions from Rekognition service.

+ * + */ +export class SearchUsersCommand extends $Command< + SearchUsersCommandInput, + SearchUsersCommandOutput, + RekognitionClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchUsersCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RekognitionClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, SearchUsersCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RekognitionClient"; + const commandName = "SearchUsersCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchUsersCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchUsersCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchUsersCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rekognition/src/commands/StartCelebrityRecognitionCommand.ts b/clients/client-rekognition/src/commands/StartCelebrityRecognitionCommand.ts index 83cd627ac305..6eadbe2f3c3b 100644 --- a/clients/client-rekognition/src/commands/StartCelebrityRecognitionCommand.ts +++ b/clients/client-rekognition/src/commands/StartCelebrityRecognitionCommand.ts @@ -13,7 +13,8 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartCelebrityRecognitionRequest, StartCelebrityRecognitionResponse } from "../models/models_0"; +import { StartCelebrityRecognitionRequest } from "../models/models_0"; +import { StartCelebrityRecognitionResponse } from "../models/models_1"; import { de_StartCelebrityRecognitionCommand, se_StartCelebrityRecognitionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartContentModerationCommand.ts b/clients/client-rekognition/src/commands/StartContentModerationCommand.ts index 0a65d8662b41..fceaa09f336e 100644 --- a/clients/client-rekognition/src/commands/StartContentModerationCommand.ts +++ b/clients/client-rekognition/src/commands/StartContentModerationCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartContentModerationRequest, StartContentModerationResponse } from "../models/models_0"; +import { StartContentModerationRequest, StartContentModerationResponse } from "../models/models_1"; import { de_StartContentModerationCommand, se_StartContentModerationCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartFaceDetectionCommand.ts b/clients/client-rekognition/src/commands/StartFaceDetectionCommand.ts index cd1bd24b8e4c..25a8c00207d7 100644 --- a/clients/client-rekognition/src/commands/StartFaceDetectionCommand.ts +++ b/clients/client-rekognition/src/commands/StartFaceDetectionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartFaceDetectionRequest, StartFaceDetectionResponse } from "../models/models_0"; +import { StartFaceDetectionRequest, StartFaceDetectionResponse } from "../models/models_1"; import { de_StartFaceDetectionCommand, se_StartFaceDetectionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartFaceSearchCommand.ts b/clients/client-rekognition/src/commands/StartFaceSearchCommand.ts index d6442097de55..d25f4b7706bc 100644 --- a/clients/client-rekognition/src/commands/StartFaceSearchCommand.ts +++ b/clients/client-rekognition/src/commands/StartFaceSearchCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartFaceSearchRequest, StartFaceSearchResponse } from "../models/models_0"; +import { StartFaceSearchRequest, StartFaceSearchResponse } from "../models/models_1"; import { de_StartFaceSearchCommand, se_StartFaceSearchCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartLabelDetectionCommand.ts b/clients/client-rekognition/src/commands/StartLabelDetectionCommand.ts index c53574f93ab5..f75be7b4aa07 100644 --- a/clients/client-rekognition/src/commands/StartLabelDetectionCommand.ts +++ b/clients/client-rekognition/src/commands/StartLabelDetectionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartLabelDetectionRequest, StartLabelDetectionResponse } from "../models/models_0"; +import { StartLabelDetectionRequest, StartLabelDetectionResponse } from "../models/models_1"; import { de_StartLabelDetectionCommand, se_StartLabelDetectionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartPersonTrackingCommand.ts b/clients/client-rekognition/src/commands/StartPersonTrackingCommand.ts index feef4307373b..cb800250cd72 100644 --- a/clients/client-rekognition/src/commands/StartPersonTrackingCommand.ts +++ b/clients/client-rekognition/src/commands/StartPersonTrackingCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartPersonTrackingRequest, StartPersonTrackingResponse } from "../models/models_0"; +import { StartPersonTrackingRequest, StartPersonTrackingResponse } from "../models/models_1"; import { de_StartPersonTrackingCommand, se_StartPersonTrackingCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartProjectVersionCommand.ts b/clients/client-rekognition/src/commands/StartProjectVersionCommand.ts index 09ce3f8bb3d7..f60b71faa38b 100644 --- a/clients/client-rekognition/src/commands/StartProjectVersionCommand.ts +++ b/clients/client-rekognition/src/commands/StartProjectVersionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartProjectVersionRequest, StartProjectVersionResponse } from "../models/models_0"; +import { StartProjectVersionRequest, StartProjectVersionResponse } from "../models/models_1"; import { de_StartProjectVersionCommand, se_StartProjectVersionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartSegmentDetectionCommand.ts b/clients/client-rekognition/src/commands/StartSegmentDetectionCommand.ts index 7e6b23de7381..06710ad6f11c 100644 --- a/clients/client-rekognition/src/commands/StartSegmentDetectionCommand.ts +++ b/clients/client-rekognition/src/commands/StartSegmentDetectionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartSegmentDetectionRequest, StartSegmentDetectionResponse } from "../models/models_0"; +import { StartSegmentDetectionRequest, StartSegmentDetectionResponse } from "../models/models_1"; import { de_StartSegmentDetectionCommand, se_StartSegmentDetectionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartStreamProcessorCommand.ts b/clients/client-rekognition/src/commands/StartStreamProcessorCommand.ts index 55e6e7f4c409..59ecd8820c38 100644 --- a/clients/client-rekognition/src/commands/StartStreamProcessorCommand.ts +++ b/clients/client-rekognition/src/commands/StartStreamProcessorCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartStreamProcessorRequest, StartStreamProcessorResponse } from "../models/models_0"; +import { StartStreamProcessorRequest, StartStreamProcessorResponse } from "../models/models_1"; import { de_StartStreamProcessorCommand, se_StartStreamProcessorCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StartTextDetectionCommand.ts b/clients/client-rekognition/src/commands/StartTextDetectionCommand.ts index 5e259bf41ea3..1243d7d83846 100644 --- a/clients/client-rekognition/src/commands/StartTextDetectionCommand.ts +++ b/clients/client-rekognition/src/commands/StartTextDetectionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StartTextDetectionRequest, StartTextDetectionResponse } from "../models/models_0"; +import { StartTextDetectionRequest, StartTextDetectionResponse } from "../models/models_1"; import { de_StartTextDetectionCommand, se_StartTextDetectionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StopProjectVersionCommand.ts b/clients/client-rekognition/src/commands/StopProjectVersionCommand.ts index 6cc80cb8e606..b8e1cf83f933 100644 --- a/clients/client-rekognition/src/commands/StopProjectVersionCommand.ts +++ b/clients/client-rekognition/src/commands/StopProjectVersionCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StopProjectVersionRequest, StopProjectVersionResponse } from "../models/models_0"; +import { StopProjectVersionRequest, StopProjectVersionResponse } from "../models/models_1"; import { de_StopProjectVersionCommand, se_StopProjectVersionCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/StopStreamProcessorCommand.ts b/clients/client-rekognition/src/commands/StopStreamProcessorCommand.ts index 7618dfd95b9f..1f7f5b5ba4d2 100644 --- a/clients/client-rekognition/src/commands/StopStreamProcessorCommand.ts +++ b/clients/client-rekognition/src/commands/StopStreamProcessorCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { StopStreamProcessorRequest, StopStreamProcessorResponse } from "../models/models_0"; +import { StopStreamProcessorRequest, StopStreamProcessorResponse } from "../models/models_1"; import { de_StopStreamProcessorCommand, se_StopStreamProcessorCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/TagResourceCommand.ts b/clients/client-rekognition/src/commands/TagResourceCommand.ts index eb9731746745..246450db3cdf 100644 --- a/clients/client-rekognition/src/commands/TagResourceCommand.ts +++ b/clients/client-rekognition/src/commands/TagResourceCommand.ts @@ -13,7 +13,7 @@ import { import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { SerdeContext as __SerdeContext } from "@smithy/types"; -import { TagResourceRequest, TagResourceResponse } from "../models/models_0"; +import { TagResourceRequest, TagResourceResponse } from "../models/models_1"; import { de_TagResourceCommand, se_TagResourceCommand } from "../protocols/Aws_json1_1"; import { RekognitionClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RekognitionClient"; diff --git a/clients/client-rekognition/src/commands/index.ts b/clients/client-rekognition/src/commands/index.ts index 5673997ed06f..2e0e817da3af 100644 --- a/clients/client-rekognition/src/commands/index.ts +++ b/clients/client-rekognition/src/commands/index.ts @@ -1,4 +1,5 @@ // smithy-typescript generated code +export * from "./AssociateFacesCommand"; export * from "./CompareFacesCommand"; export * from "./CopyProjectVersionCommand"; export * from "./CreateCollectionCommand"; @@ -7,6 +8,7 @@ export * from "./CreateFaceLivenessSessionCommand"; export * from "./CreateProjectCommand"; export * from "./CreateProjectVersionCommand"; export * from "./CreateStreamProcessorCommand"; +export * from "./CreateUserCommand"; export * from "./DeleteCollectionCommand"; export * from "./DeleteDatasetCommand"; export * from "./DeleteFacesCommand"; @@ -14,6 +16,7 @@ export * from "./DeleteProjectCommand"; export * from "./DeleteProjectPolicyCommand"; export * from "./DeleteProjectVersionCommand"; export * from "./DeleteStreamProcessorCommand"; +export * from "./DeleteUserCommand"; export * from "./DescribeCollectionCommand"; export * from "./DescribeDatasetCommand"; export * from "./DescribeProjectVersionsCommand"; @@ -25,6 +28,7 @@ export * from "./DetectLabelsCommand"; export * from "./DetectModerationLabelsCommand"; export * from "./DetectProtectiveEquipmentCommand"; export * from "./DetectTextCommand"; +export * from "./DisassociateFacesCommand"; export * from "./DistributeDatasetEntriesCommand"; export * from "./GetCelebrityInfoCommand"; export * from "./GetCelebrityRecognitionCommand"; @@ -44,10 +48,13 @@ export * from "./ListFacesCommand"; export * from "./ListProjectPoliciesCommand"; export * from "./ListStreamProcessorsCommand"; export * from "./ListTagsForResourceCommand"; +export * from "./ListUsersCommand"; export * from "./PutProjectPolicyCommand"; export * from "./RecognizeCelebritiesCommand"; export * from "./SearchFacesByImageCommand"; export * from "./SearchFacesCommand"; +export * from "./SearchUsersByImageCommand"; +export * from "./SearchUsersCommand"; export * from "./StartCelebrityRecognitionCommand"; export * from "./StartContentModerationCommand"; export * from "./StartFaceDetectionCommand"; diff --git a/clients/client-rekognition/src/index.ts b/clients/client-rekognition/src/index.ts index 5d5de32109e0..4fc3f1d693f1 100644 --- a/clients/client-rekognition/src/index.ts +++ b/clients/client-rekognition/src/index.ts @@ -11,6 +11,11 @@ * *

* Amazon Rekognition Custom Labels diff --git a/clients/client-rekognition/src/models/models_0.ts b/clients/client-rekognition/src/models/models_0.ts index e59d05c5ce81..721d14cd71dc 100644 --- a/clients/client-rekognition/src/models/models_0.ts +++ b/clients/client-rekognition/src/models/models_0.ts @@ -114,617 +114,517 @@ export interface Asset { /** * @public - * @enum - */ -export const Attribute = { - AGE_RANGE: "AGE_RANGE", - ALL: "ALL", - BEARD: "BEARD", - DEFAULT: "DEFAULT", - EMOTIONS: "EMOTIONS", - EYEGLASSES: "EYEGLASSES", - EYES_OPEN: "EYES_OPEN", - EYE_DIRECTION: "EYE_DIRECTION", - FACE_OCCLUDED: "FACE_OCCLUDED", - GENDER: "GENDER", - MOUTH_OPEN: "MOUTH_OPEN", - MUSTACHE: "MUSTACHE", - SMILE: "SMILE", - SUNGLASSES: "SUNGLASSES", -} as const; - -/** - * @public - */ -export type Attribute = (typeof Attribute)[keyof typeof Attribute]; - -/** - * @public - *

Metadata information about an audio stream. An array of AudioMetadata objects - * for the audio streams found in a stored video is returned by GetSegmentDetection.

+ *

Provides face metadata for the faces that are associated to a specific UserID.

*/ -export interface AudioMetadata { - /** - *

The audio codec used to encode or decode the audio stream.

- */ - Codec?: string; - - /** - *

The duration of the audio stream in milliseconds.

- */ - DurationMillis?: number; - - /** - *

The sample rate for the audio stream.

- */ - SampleRate?: number; - +export interface AssociatedFace { /** - *

The number of audio channels in the segment.

+ *

Unique identifier assigned to the face.

*/ - NumberOfChannels?: number; + FaceId?: string; } /** * @public - *

Identifies the bounding box around the label, face, text, object of interest, or - * personal protective equipment. The left (x-coordinate) and top - * (y-coordinate) are coordinates representing the top and left sides of the bounding box. Note - * that the upper-left corner of the image is the origin (0,0).

- *

The top and left values returned are ratios of the overall - * image size. For example, if the input image is 700x200 pixels, and the top-left coordinate of - * the bounding box is 350x50 pixels, the API returns a left value of 0.5 (350/700) - * and a top value of 0.25 (50/200).

- *

The width and height values represent the dimensions of the - * bounding box as a ratio of the overall image dimension. For example, if the input image is - * 700x200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1.

- * - *

The bounding box coordinates can have negative values. For example, if Amazon Rekognition is - * able to detect a face that is at the image edge and is only partially visible, the service - * can return coordinates that are outside the image bounds and, depending on the image edge, - * you might get negative values or values greater than 1 for the left or - * top values.

- *
*/ -export interface BoundingBox { - /** - *

Width of the bounding box as a ratio of the overall image width.

- */ - Width?: number; - - /** - *

Height of the bounding box as a ratio of the overall image height.

- */ - Height?: number; - +export interface AssociateFacesRequest { /** - *

Left coordinate of the bounding box as a ratio of overall image width.

+ *

The ID of an existing collection containing the UserID.

*/ - Left?: number; + CollectionId: string | undefined; /** - *

Top coordinate of the bounding box as a ratio of overall image height.

+ *

The ID for the existing UserID.

*/ - Top?: number; -} + UserId: string | undefined; -/** - * @public - *

An image that is picked from the Face Liveness video and returned for audit trail purposes, returned as Base64-encoded bytes.

- */ -export interface AuditImage { /** - *

The Base64-encoded bytes representing an image selected from the Face Liveness video and returned for audit purposes.

+ *

An array of FaceIDs to associate with the UserID.

*/ - Bytes?: Uint8Array; + FaceIds: string[] | undefined; /** - *

Provides the S3 bucket name and object name.

- *

The region for the S3 bucket containing the S3 object must match the region you use for - * Amazon Rekognition operations.

- *

For Amazon Rekognition to process an S3 object, the user must have permission to - * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the - * Amazon Rekognition Developer Guide.

+ *

An optional value specifying the minimum confidence in the UserID match to return. The + * default value is 75.

*/ - S3Object?: S3Object; + UserMatchThreshold?: number; /** - *

Identifies the bounding box around the label, face, text, object of interest, or - * personal protective equipment. The left (x-coordinate) and top - * (y-coordinate) are coordinates representing the top and left sides of the bounding box. Note - * that the upper-left corner of the image is the origin (0,0).

- *

The top and left values returned are ratios of the overall - * image size. For example, if the input image is 700x200 pixels, and the top-left coordinate of - * the bounding box is 350x50 pixels, the API returns a left value of 0.5 (350/700) - * and a top value of 0.25 (50/200).

- *

The width and height values represent the dimensions of the - * bounding box as a ratio of the overall image dimension. For example, if the input image is - * 700x200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1.

- * - *

The bounding box coordinates can have negative values. For example, if Amazon Rekognition is - * able to detect a face that is at the image edge and is only partially visible, the service - * can return coordinates that are outside the image bounds and, depending on the image edge, - * you might get negative values or values greater than 1 for the left or - * top values.

- *
+ *

Idempotent token used to identify the request to AssociateFaces. If you use + * the same token with multiple AssociateFaces requests, the same response is returned. + * Use ClientRequestToken to prevent the same request from being processed more than + * once.

*/ - BoundingBox?: BoundingBox; + ClientRequestToken?: string; } /** * @public - *

Indicates whether or not the face has a beard, and the confidence level in the - * determination.

+ * @enum */ -export interface Beard { - /** - *

Boolean value that indicates whether the face has beard or not.

- */ - Value?: boolean; +export const UnsuccessfulFaceAssociationReason = { + ASSOCIATED_TO_A_DIFFERENT_USER: "ASSOCIATED_TO_A_DIFFERENT_USER", + FACE_NOT_FOUND: "FACE_NOT_FOUND", + LOW_MATCH_CONFIDENCE: "LOW_MATCH_CONFIDENCE", +} as const; - /** - *

Level of confidence in the determination.

- */ - Confidence?: number; -} +/** + * @public + */ +export type UnsuccessfulFaceAssociationReason = + (typeof UnsuccessfulFaceAssociationReason)[keyof typeof UnsuccessfulFaceAssociationReason]; /** * @public - *

- * A filter that allows you to control the black frame detection by specifying the black levels - * and pixel coverage of black pixels in a frame. As videos can come from multiple sources, formats, - * and time periods, they may contain different standards and varying noise levels for black frames that need to be accounted for. - * For more information, see StartSegmentDetection. - *

+ *

Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully associated.

*/ -export interface BlackFrame { +export interface UnsuccessfulFaceAssociation { /** - *

- * A threshold used to determine the maximum luminance value for a pixel to be considered black. In a full color range video, - * luminance values range from 0-255. A pixel value of 0 is pure black, and the most strict filter. The maximum black pixel - * value is computed as follows: max_black_pixel_value = minimum_luminance + MaxPixelThreshold *luminance_range. - *

- *

For example, for a full range video with BlackPixelThreshold = 0.1, max_black_pixel_value is 0 + 0.1 * (255-0) = 25.5.

- *

The default value of MaxPixelThreshold is 0.2, which maps to a max_black_pixel_value of 51 for a full range video. - * You can lower this threshold to be more strict on black levels.

+ *

A unique identifier assigned to the face.

*/ - MaxPixelThreshold?: number; + FaceId?: string; /** - *

- * The minimum percentage of pixels in a frame that need to have a luminance below the max_black_pixel_value for a frame to be considered - * a black frame. Luminance is calculated using the BT.709 matrix. - *

- *

The default value is 99, which means at least 99% of all pixels in the frame are black pixels as per the MaxPixelThreshold - * set. You can reduce this value to allow more noise on the black frame.

+ *

A provided ID for the UserID. Unique within the collection.

*/ - MinCoveragePercentage?: number; -} - -/** - * @public - * @enum - */ -export const BodyPart = { - FACE: "FACE", - HEAD: "HEAD", - LEFT_HAND: "LEFT_HAND", - RIGHT_HAND: "RIGHT_HAND", -} as const; - -/** - * @public - */ -export type BodyPart = (typeof BodyPart)[keyof typeof BodyPart]; + UserId?: string; -/** - * @public - *

Information about an item of Personal Protective Equipment covering a corresponding body part. For more - * information, see DetectProtectiveEquipment.

- */ -export interface CoversBodyPart { /** - *

The confidence that Amazon Rekognition has in the value of Value.

+ *

Match confidence with the UserID, provides information regarding if a face association was + * unsuccessful because it didn't meet UserMatchThreshold.

*/ Confidence?: number; /** - *

True if the PPE covers the corresponding body part, otherwise false.

+ *

The reason why the association was unsuccessful.

*/ - Value?: boolean; + Reasons?: (UnsuccessfulFaceAssociationReason | string)[]; } /** * @public * @enum */ -export const ProtectiveEquipmentType = { - FACE_COVER: "FACE_COVER", - HAND_COVER: "HAND_COVER", - HEAD_COVER: "HEAD_COVER", +export const UserStatus = { + ACTIVE: "ACTIVE", + CREATED: "CREATED", + CREATING: "CREATING", + UPDATING: "UPDATING", } as const; /** * @public */ -export type ProtectiveEquipmentType = (typeof ProtectiveEquipmentType)[keyof typeof ProtectiveEquipmentType]; +export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]; /** * @public - *

Information about an item of Personal Protective Equipment (PPE) detected by - * DetectProtectiveEquipment. For more - * information, see DetectProtectiveEquipment.

*/ -export interface EquipmentDetection { - /** - *

A bounding box surrounding the item of detected PPE.

- */ - BoundingBox?: BoundingBox; - +export interface AssociateFacesResponse { /** - *

The confidence that Amazon Rekognition has that the bounding box (BoundingBox) contains an item of PPE.

+ *

An array of AssociatedFace objects containing FaceIDs that are successfully associated + * with the UserID is returned. Returned if the AssociateFaces action is successful.

*/ - Confidence?: number; + AssociatedFaces?: AssociatedFace[]; /** - *

The type of detected PPE.

+ *

An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully + * associated along with the reasons. Returned if the AssociateFaces action is successful.

*/ - Type?: ProtectiveEquipmentType | string; + UnsuccessfulFaceAssociations?: UnsuccessfulFaceAssociation[]; /** - *

Information about the body part covered by the detected PPE.

+ *

The status of an update made to a UserID. Reflects if the UserID has been updated for + * every requested change.

*/ - CoversBodyPart?: CoversBodyPart; + UserStatus?: UserStatus | string; } /** * @public - *

Information about a body part detected by DetectProtectiveEquipment that contains PPE. - * An array of ProtectiveEquipmentBodyPart objects is returned for each person detected by - * DetectProtectiveEquipment.

+ *

+ * A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** + *

*/ -export interface ProtectiveEquipmentBodyPart { - /** - *

The detected body part.

- */ - Name?: BodyPart | string; - +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

The confidence that Amazon Rekognition has in the detection accuracy of the detected body part. - *

+ *

A universally unique identifier (UUID) for the request.

*/ - Confidence?: number; - + Logref?: string; /** - *

An array of Personal Protective Equipment items detected around a body part.

+ * @internal */ - EquipmentDetections?: EquipmentDetection[]; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - * @enum - */ -export const EmotionName = { - ANGRY: "ANGRY", - CALM: "CALM", - CONFUSED: "CONFUSED", - DISGUSTED: "DISGUSTED", - FEAR: "FEAR", - HAPPY: "HAPPY", - SAD: "SAD", - SURPRISED: "SURPRISED", - UNKNOWN: "UNKNOWN", -} as const; - -/** - * @public + *

A ClientRequestToken input parameter was reused with an operation, but at least one of the other input + * parameters is different from the previous call to the operation.

*/ -export type EmotionName = (typeof EmotionName)[keyof typeof EmotionName]; - -/** - * @public - *

The emotions that appear to be expressed on the face, and the confidence level in the - * determination. The API is only making a determination of the physical appearance of a person's - * face. It is not a determination of the person’s internal emotional state and should not be - * used in such a way. For example, a person pretending to have a sad face might not be sad - * emotionally.

- */ -export interface Emotion { +export class IdempotentParameterMismatchException extends __BaseException { + readonly name: "IdempotentParameterMismatchException" = "IdempotentParameterMismatchException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Type of emotion detected.

+ *

A universally unique identifier (UUID) for the request.

*/ - Type?: EmotionName | string; - + Logref?: string; /** - *

Level of confidence in the determination.

+ * @internal */ - Confidence?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "IdempotentParameterMismatchException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - * @enum - */ -export const LandmarkType = { - chinBottom: "chinBottom", - eyeLeft: "eyeLeft", - eyeRight: "eyeRight", - leftEyeBrowLeft: "leftEyeBrowLeft", - leftEyeBrowRight: "leftEyeBrowRight", - leftEyeBrowUp: "leftEyeBrowUp", - leftEyeDown: "leftEyeDown", - leftEyeLeft: "leftEyeLeft", - leftEyeRight: "leftEyeRight", - leftEyeUp: "leftEyeUp", - leftPupil: "leftPupil", - midJawlineLeft: "midJawlineLeft", - midJawlineRight: "midJawlineRight", - mouthDown: "mouthDown", - mouthLeft: "mouthLeft", - mouthRight: "mouthRight", - mouthUp: "mouthUp", - nose: "nose", - noseLeft: "noseLeft", - noseRight: "noseRight", - rightEyeBrowLeft: "rightEyeBrowLeft", - rightEyeBrowRight: "rightEyeBrowRight", - rightEyeBrowUp: "rightEyeBrowUp", - rightEyeDown: "rightEyeDown", - rightEyeLeft: "rightEyeLeft", - rightEyeRight: "rightEyeRight", - rightEyeUp: "rightEyeUp", - rightPupil: "rightPupil", - upperJawlineLeft: "upperJawlineLeft", - upperJawlineRight: "upperJawlineRight", -} as const; - -/** - * @public - */ -export type LandmarkType = (typeof LandmarkType)[keyof typeof LandmarkType]; - -/** - * @public - *

Indicates the location of the landmark on the face.

+ *

Amazon Rekognition experienced a service issue. Try your call again.

*/ -export interface Landmark { - /** - *

Type of landmark.

- */ - Type?: LandmarkType | string; - +export class InternalServerError extends __BaseException { + readonly name: "InternalServerError" = "InternalServerError"; + readonly $fault: "server" = "server"; + Message?: string; + Code?: string; /** - *

The x-coordinate of the landmark expressed as a ratio of the width of the image. The - * x-coordinate is measured from the left-side of the image. For example, if the image is 700 - * pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5. - *

+ *

A universally unique identifier (UUID) for the request.

*/ - X?: number; - + Logref?: string; /** - *

The y-coordinate of the landmark expressed as a ratio of the height of the image. The - * y-coordinate is measured from the top of the image. For example, if the image height is 200 - * pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.

+ * @internal */ - Y?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "InternalServerError", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerError.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

Indicates the pose of the face as determined by its pitch, roll, and yaw.

+ *

Input parameter violated a constraint. Validate your parameter before calling the API + * operation again.

*/ -export interface Pose { - /** - *

Value representing the face rotation on the roll axis.

- */ - Roll?: number; - +export class InvalidParameterException extends __BaseException { + readonly name: "InvalidParameterException" = "InvalidParameterException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Value representing the face rotation on the yaw axis.

+ *

A universally unique identifier (UUID) for the request.

*/ - Yaw?: number; - + Logref?: string; /** - *

Value representing the face rotation on the pitch axis.

+ * @internal */ - Pitch?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidParameterException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidParameterException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

Identifies face image brightness and sharpness.

+ *

The number of requests exceeded your throughput limit. If you want to increase this + * limit, contact Amazon Rekognition.

*/ -export interface ImageQuality { +export class ProvisionedThroughputExceededException extends __BaseException { + readonly name: "ProvisionedThroughputExceededException" = "ProvisionedThroughputExceededException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Value representing brightness of the face. The service returns a value between 0 and - * 100 (inclusive). A higher value indicates a brighter face image.

+ *

A universally unique identifier (UUID) for the request.

*/ - Brightness?: number; - + Logref?: string; /** - *

Value representing sharpness of the face. The service returns a value between 0 and 100 - * (inclusive). A higher value indicates a sharper face image.

+ * @internal */ - Sharpness?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ProvisionedThroughputExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ProvisionedThroughputExceededException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

Indicates whether or not the face is smiling, and the confidence level in the - * determination.

+ *

The resource specified in the request cannot be found.

*/ -export interface Smile { +export class ResourceNotFoundException extends __BaseException { + readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Boolean value that indicates whether the face is smiling or not.

+ *

A universally unique identifier (UUID) for the request.

*/ - Value?: boolean; - + Logref?: string; /** - *

Level of confidence in the determination.

+ * @internal */ - Confidence?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

Provides face metadata for target image faces that are analyzed by - * CompareFaces and RecognizeCelebrities.

+ *

+ *

The size of the collection exceeds the allowed limit. For more information, + * see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide.

*/ -export interface ComparedFace { +export class ServiceQuotaExceededException extends __BaseException { + readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Bounding box of the face.

+ *

A universally unique identifier (UUID) for the request.

*/ - BoundingBox?: BoundingBox; - + Logref?: string; /** - *

Level of confidence that what the bounding box contains is a face.

+ * @internal */ - Confidence?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ServiceQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} +/** + * @public + *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

+ */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "server" = "server"; + Message?: string; + Code?: string; /** - *

An array of facial landmarks.

+ *

A universally unique identifier (UUID) for the request.

*/ - Landmarks?: Landmark[]; - + Logref?: string; /** - *

Indicates the pose of the face as determined by its pitch, roll, and yaw.

+ * @internal */ - Pose?: Pose; - - /** - *

Identifies face image brightness and sharpness.

- */ - Quality?: ImageQuality; - - /** - *

The emotions that appear to be expressed on the face, and the confidence level in the - * determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", - * "Surprised", "Calm", "Unknown", and "Fear".

- */ - Emotions?: Emotion[]; - - /** - *

Indicates whether or not the face is smiling, and the confidence level in the - * determination.

- */ - Smile?: Smile; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public * @enum */ -export const KnownGenderType = { - Female: "Female", - Male: "Male", - Nonbinary: "Nonbinary", - Unlisted: "Unlisted", +export const Attribute = { + AGE_RANGE: "AGE_RANGE", + ALL: "ALL", + BEARD: "BEARD", + DEFAULT: "DEFAULT", + EMOTIONS: "EMOTIONS", + EYEGLASSES: "EYEGLASSES", + EYES_OPEN: "EYES_OPEN", + EYE_DIRECTION: "EYE_DIRECTION", + FACE_OCCLUDED: "FACE_OCCLUDED", + GENDER: "GENDER", + MOUTH_OPEN: "MOUTH_OPEN", + MUSTACHE: "MUSTACHE", + SMILE: "SMILE", + SUNGLASSES: "SUNGLASSES", } as const; /** * @public */ -export type KnownGenderType = (typeof KnownGenderType)[keyof typeof KnownGenderType]; - -/** - * @public - *

The known gender identity for the celebrity that matches the provided ID. The known - * gender identity can be Male, Female, Nonbinary, or Unlisted.

- */ -export interface KnownGender { - /** - *

A string value of the KnownGender info about the Celebrity.

- */ - Type?: KnownGenderType | string; -} +export type Attribute = (typeof Attribute)[keyof typeof Attribute]; /** * @public - *

Provides information about a celebrity recognized by the RecognizeCelebrities operation.

+ *

Metadata information about an audio stream. An array of AudioMetadata objects + * for the audio streams found in a stored video is returned by GetSegmentDetection.

*/ -export interface Celebrity { - /** - *

An array of URLs pointing to additional information about the celebrity. If there is no - * additional information about the celebrity, this list is empty.

- */ - Urls?: string[]; - - /** - *

The name of the celebrity.

- */ - Name?: string; - +export interface AudioMetadata { /** - *

A unique identifier for the celebrity.

+ *

The audio codec used to encode or decode the audio stream.

*/ - Id?: string; + Codec?: string; /** - *

Provides information about the celebrity's face, such as its location on the - * image.

+ *

The duration of the audio stream in milliseconds.

*/ - Face?: ComparedFace; + DurationMillis?: number; /** - *

The confidence, in percentage, that Amazon Rekognition has that the recognized face is the - * celebrity.

+ *

The sample rate for the audio stream.

*/ - MatchConfidence?: number; + SampleRate?: number; /** - *

The known gender identity for the celebrity that matches the provided ID. The known - * gender identity can be Male, Female, Nonbinary, or Unlisted.

+ *

The number of audio channels in the segment.

*/ - KnownGender?: KnownGender; + NumberOfChannels?: number; } /** * @public - *

Indicates the direction the eyes are gazing in (independent of the head pose) as determined by its pitch and yaw.

+ *

Identifies the bounding box around the label, face, text, object of interest, or + * personal protective equipment. The left (x-coordinate) and top + * (y-coordinate) are coordinates representing the top and left sides of the bounding box. Note + * that the upper-left corner of the image is the origin (0,0).

+ *

The top and left values returned are ratios of the overall + * image size. For example, if the input image is 700x200 pixels, and the top-left coordinate of + * the bounding box is 350x50 pixels, the API returns a left value of 0.5 (350/700) + * and a top value of 0.25 (50/200).

+ *

The width and height values represent the dimensions of the + * bounding box as a ratio of the overall image dimension. For example, if the input image is + * 700x200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1.

+ * + *

The bounding box coordinates can have negative values. For example, if Amazon Rekognition is + * able to detect a face that is at the image edge and is only partially visible, the service + * can return coordinates that are outside the image bounds and, depending on the image edge, + * you might get negative values or values greater than 1 for the left or + * top values.

+ *
*/ -export interface EyeDirection { +export interface BoundingBox { /** - *

Value representing eye direction on the yaw axis.

+ *

Width of the bounding box as a ratio of the overall image width.

*/ - Yaw?: number; + Width?: number; /** - *

Value representing eye direction on the pitch axis.

+ *

Height of the bounding box as a ratio of the overall image height.

*/ - Pitch?: number; + Height?: number; /** - *

The confidence that the service has in its predicted eye direction.

+ *

Left coordinate of the bounding box as a ratio of overall image width.

*/ - Confidence?: number; + Left?: number; + + /** + *

Top coordinate of the bounding box as a ratio of overall image height.

+ */ + Top?: number; } /** * @public - *

Indicates whether or not the face is wearing eye glasses, and the confidence level in - * the determination.

+ *

An image that is picked from the Face Liveness video and returned for audit trail purposes, returned as Base64-encoded bytes.

*/ -export interface Eyeglasses { +export interface AuditImage { /** - *

Boolean value that indicates whether the face is wearing eye glasses or not.

+ *

The Base64-encoded bytes representing an image selected from the Face Liveness video and returned for audit purposes.

*/ - Value?: boolean; + Bytes?: Uint8Array; /** - *

Level of confidence in the determination.

+ *

Provides the S3 bucket name and object name.

+ *

The region for the S3 bucket containing the S3 object must match the region you use for + * Amazon Rekognition operations.

+ *

For Amazon Rekognition to process an S3 object, the user must have permission to + * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the + * Amazon Rekognition Developer Guide.

*/ - Confidence?: number; + S3Object?: S3Object; + + /** + *

Identifies the bounding box around the label, face, text, object of interest, or + * personal protective equipment. The left (x-coordinate) and top + * (y-coordinate) are coordinates representing the top and left sides of the bounding box. Note + * that the upper-left corner of the image is the origin (0,0).

+ *

The top and left values returned are ratios of the overall + * image size. For example, if the input image is 700x200 pixels, and the top-left coordinate of + * the bounding box is 350x50 pixels, the API returns a left value of 0.5 (350/700) + * and a top value of 0.25 (50/200).

+ *

The width and height values represent the dimensions of the + * bounding box as a ratio of the overall image dimension. For example, if the input image is + * 700x200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1.

+ * + *

The bounding box coordinates can have negative values. For example, if Amazon Rekognition is + * able to detect a face that is at the image edge and is only partially visible, the service + * can return coordinates that are outside the image bounds and, depending on the image edge, + * you might get negative values or values greater than 1 for the left or + * top values.

+ *
+ */ + BoundingBox?: BoundingBox; } /** * @public - *

Indicates whether or not the eyes on the face are open, and the confidence level in the + *

Indicates whether or not the face has a beard, and the confidence level in the * determination.

*/ -export interface EyeOpen { +export interface Beard { /** - *

Boolean value that indicates whether the eyes on the face are open.

+ *

Boolean value that indicates whether the face has beard or not.

*/ Value?: boolean; @@ -737,117 +637,170 @@ export interface EyeOpen { /** * @public *

- * FaceOccluded should return "true" with a high confidence score if a detected - * face’s eyes, nose, and mouth are partially captured or if they are covered by masks, dark - * sunglasses, cell phones, hands, or other objects. FaceOccluded should return - * "false" with a high confidence score if common occurrences that do not impact face - * verification are detected, such as eye glasses, lightly tinted sunglasses, strands of hair, - * and others.

- *

You can use FaceOccluded to determine if an obstruction on a face negatively - * impacts using the image for face matching.

+ * A filter that allows you to control the black frame detection by specifying the black levels + * and pixel coverage of black pixels in a frame. As videos can come from multiple sources, formats, + * and time periods, they may contain different standards and varying noise levels for black frames that need to be accounted for. + * For more information, see StartSegmentDetection. + *

*/ -export interface FaceOccluded { +export interface BlackFrame { /** - *

True if a detected face’s eyes, nose, and mouth are partially captured or if they are - * covered by masks, dark sunglasses, cell phones, hands, or other objects. False if common - * occurrences that do not impact face verification are detected, such as eye glasses, lightly - * tinted sunglasses, strands of hair, and others.

+ *

+ * A threshold used to determine the maximum luminance value for a pixel to be considered black. In a full color range video, + * luminance values range from 0-255. A pixel value of 0 is pure black, and the most strict filter. The maximum black pixel + * value is computed as follows: max_black_pixel_value = minimum_luminance + MaxPixelThreshold *luminance_range. + *

+ *

For example, for a full range video with BlackPixelThreshold = 0.1, max_black_pixel_value is 0 + 0.1 * (255-0) = 25.5.

+ *

The default value of MaxPixelThreshold is 0.2, which maps to a max_black_pixel_value of 51 for a full range video. + * You can lower this threshold to be more strict on black levels.

*/ - Value?: boolean; + MaxPixelThreshold?: number; /** - *

The confidence that the service has detected the presence of a face occlusion.

+ *

+ * The minimum percentage of pixels in a frame that need to have a luminance below the max_black_pixel_value for a frame to be considered + * a black frame. Luminance is calculated using the BT.709 matrix. + *

+ *

The default value is 99, which means at least 99% of all pixels in the frame are black pixels as per the MaxPixelThreshold + * set. You can reduce this value to allow more noise on the black frame.

*/ - Confidence?: number; + MinCoveragePercentage?: number; } /** * @public * @enum */ -export const GenderType = { - Female: "Female", - Male: "Male", +export const BodyPart = { + FACE: "FACE", + HEAD: "HEAD", + LEFT_HAND: "LEFT_HAND", + RIGHT_HAND: "RIGHT_HAND", } as const; /** * @public */ -export type GenderType = (typeof GenderType)[keyof typeof GenderType]; +export type BodyPart = (typeof BodyPart)[keyof typeof BodyPart]; /** * @public - *

The predicted gender of a detected face. - * - *

- *

Amazon Rekognition makes gender binary (male/female) predictions based on the physical - * appearance of a face in a particular image. This kind of prediction is not designed to - * categorize a person’s gender identity, and you shouldn't use Amazon Rekognition to make such a - * determination. For example, a male actor wearing a long-haired wig and earrings for a role - * might be predicted as female.

- *

Using Amazon Rekognition to make gender binary predictions is best suited for use cases - * where aggregate gender distribution statistics need to be analyzed without identifying - * specific users. For example, the percentage of female users compared to male users on a social - * media platform.

- *

We don't recommend using gender binary predictions to make decisions that impact an - * individual's rights, privacy, or access to services.

+ *

Information about an item of Personal Protective Equipment covering a corresponding body part. For more + * information, see DetectProtectiveEquipment.

*/ -export interface Gender { +export interface CoversBodyPart { /** - *

The predicted gender of the face.

+ *

The confidence that Amazon Rekognition has in the value of Value.

*/ - Value?: GenderType | string; + Confidence?: number; /** - *

Level of confidence in the prediction.

+ *

True if the PPE covers the corresponding body part, otherwise false.

*/ - Confidence?: number; + Value?: boolean; } /** * @public - *

Indicates whether or not the mouth on the face is open, and the confidence level in the - * determination.

+ * @enum */ -export interface MouthOpen { +export const ProtectiveEquipmentType = { + FACE_COVER: "FACE_COVER", + HAND_COVER: "HAND_COVER", + HEAD_COVER: "HEAD_COVER", +} as const; + +/** + * @public + */ +export type ProtectiveEquipmentType = (typeof ProtectiveEquipmentType)[keyof typeof ProtectiveEquipmentType]; + +/** + * @public + *

Information about an item of Personal Protective Equipment (PPE) detected by + * DetectProtectiveEquipment. For more + * information, see DetectProtectiveEquipment.

+ */ +export interface EquipmentDetection { /** - *

Boolean value that indicates whether the mouth on the face is open or not.

+ *

A bounding box surrounding the item of detected PPE.

*/ - Value?: boolean; + BoundingBox?: BoundingBox; /** - *

Level of confidence in the determination.

+ *

The confidence that Amazon Rekognition has that the bounding box (BoundingBox) contains an item of PPE.

*/ Confidence?: number; + + /** + *

The type of detected PPE.

+ */ + Type?: ProtectiveEquipmentType | string; + + /** + *

Information about the body part covered by the detected PPE.

+ */ + CoversBodyPart?: CoversBodyPart; } /** * @public - *

Indicates whether or not the face has a mustache, and the confidence level in the - * determination.

+ *

Information about a body part detected by DetectProtectiveEquipment that contains PPE. + * An array of ProtectiveEquipmentBodyPart objects is returned for each person detected by + * DetectProtectiveEquipment.

*/ -export interface Mustache { +export interface ProtectiveEquipmentBodyPart { /** - *

Boolean value that indicates whether the face has mustache or not.

+ *

The detected body part.

*/ - Value?: boolean; + Name?: BodyPart | string; /** - *

Level of confidence in the determination.

+ *

The confidence that Amazon Rekognition has in the detection accuracy of the detected body part. + *

*/ Confidence?: number; + + /** + *

An array of Personal Protective Equipment items detected around a body part.

+ */ + EquipmentDetections?: EquipmentDetection[]; } /** * @public - *

Indicates whether or not the face is wearing sunglasses, and the confidence level in - * the determination.

+ * @enum */ -export interface Sunglasses { +export const EmotionName = { + ANGRY: "ANGRY", + CALM: "CALM", + CONFUSED: "CONFUSED", + DISGUSTED: "DISGUSTED", + FEAR: "FEAR", + HAPPY: "HAPPY", + SAD: "SAD", + SURPRISED: "SURPRISED", + UNKNOWN: "UNKNOWN", +} as const; + +/** + * @public + */ +export type EmotionName = (typeof EmotionName)[keyof typeof EmotionName]; + +/** + * @public + *

The emotions that appear to be expressed on the face, and the confidence level in the + * determination. The API is only making a determination of the physical appearance of a person's + * face. It is not a determination of the person’s internal emotional state and should not be + * used in such a way. For example, a person pretending to have a sad face might not be sad + * emotionally.

+ */ +export interface Emotion { /** - *

Boolean value that indicates whether the face is wearing sunglasses or not.

+ *

Type of emotion detected.

*/ - Value?: boolean; + Type?: EmotionName | string; /** *

Level of confidence in the determination.

@@ -857,147 +810,209 @@ export interface Sunglasses { /** * @public - *

Structure containing attributes of the face that the algorithm detected.

- *

A FaceDetail object contains either the default facial attributes or all - * facial attributes. The default attributes are BoundingBox, - * Confidence, Landmarks, Pose, and - * Quality.

- *

- * GetFaceDetection is the only Amazon Rekognition Video stored video operation that can - * return a FaceDetail object with all attributes. To specify which attributes to - * return, use the FaceAttributes input parameter for StartFaceDetection. The following Amazon Rekognition Video operations return only the default - * attributes. The corresponding Start operations don't have a FaceAttributes input - * parameter:

- *
    - *
  • - *

    GetCelebrityRecognition

    - *
  • - *
  • - *

    GetPersonTracking

    - *
  • - *
  • - *

    GetFaceSearch

    - *
  • - *
- *

The Amazon Rekognition Image DetectFaces and IndexFaces operations - * can return all facial attributes. To specify which attributes to return, use the - * Attributes input parameter for DetectFaces. For - * IndexFaces, use the DetectAttributes input parameter.

+ * @enum */ -export interface FaceDetail { - /** - *

Bounding box of the face. Default attribute.

- */ - BoundingBox?: BoundingBox; +export const LandmarkType = { + chinBottom: "chinBottom", + eyeLeft: "eyeLeft", + eyeRight: "eyeRight", + leftEyeBrowLeft: "leftEyeBrowLeft", + leftEyeBrowRight: "leftEyeBrowRight", + leftEyeBrowUp: "leftEyeBrowUp", + leftEyeDown: "leftEyeDown", + leftEyeLeft: "leftEyeLeft", + leftEyeRight: "leftEyeRight", + leftEyeUp: "leftEyeUp", + leftPupil: "leftPupil", + midJawlineLeft: "midJawlineLeft", + midJawlineRight: "midJawlineRight", + mouthDown: "mouthDown", + mouthLeft: "mouthLeft", + mouthRight: "mouthRight", + mouthUp: "mouthUp", + nose: "nose", + noseLeft: "noseLeft", + noseRight: "noseRight", + rightEyeBrowLeft: "rightEyeBrowLeft", + rightEyeBrowRight: "rightEyeBrowRight", + rightEyeBrowUp: "rightEyeBrowUp", + rightEyeDown: "rightEyeDown", + rightEyeLeft: "rightEyeLeft", + rightEyeRight: "rightEyeRight", + rightEyeUp: "rightEyeUp", + rightPupil: "rightPupil", + upperJawlineLeft: "upperJawlineLeft", + upperJawlineRight: "upperJawlineRight", +} as const; +/** + * @public + */ +export type LandmarkType = (typeof LandmarkType)[keyof typeof LandmarkType]; + +/** + * @public + *

Indicates the location of the landmark on the face.

+ */ +export interface Landmark { /** - *

The estimated age range, in years, for the face. Low represents the lowest estimated - * age and High represents the highest estimated age.

+ *

Type of landmark.

*/ - AgeRange?: AgeRange; + Type?: LandmarkType | string; /** - *

Indicates whether or not the face is smiling, and the confidence level in the - * determination.

+ *

The x-coordinate of the landmark expressed as a ratio of the width of the image. The + * x-coordinate is measured from the left-side of the image. For example, if the image is 700 + * pixels wide and the x-coordinate of the landmark is at 350 pixels, this value is 0.5. + *

*/ - Smile?: Smile; + X?: number; /** - *

Indicates whether or not the face is wearing eye glasses, and the confidence level in - * the determination.

+ *

The y-coordinate of the landmark expressed as a ratio of the height of the image. The + * y-coordinate is measured from the top of the image. For example, if the image height is 200 + * pixels and the y-coordinate of the landmark is at 50 pixels, this value is 0.25.

*/ - Eyeglasses?: Eyeglasses; + Y?: number; +} +/** + * @public + *

Indicates the pose of the face as determined by its pitch, roll, and yaw.

+ */ +export interface Pose { /** - *

Indicates whether or not the face is wearing sunglasses, and the confidence level in - * the determination.

+ *

Value representing the face rotation on the roll axis.

*/ - Sunglasses?: Sunglasses; + Roll?: number; /** - *

The predicted gender of a detected face.

+ *

Value representing the face rotation on the yaw axis.

*/ - Gender?: Gender; + Yaw?: number; /** - *

Indicates whether or not the face has a beard, and the confidence level in the - * determination.

+ *

Value representing the face rotation on the pitch axis.

*/ - Beard?: Beard; + Pitch?: number; +} +/** + * @public + *

Identifies face image brightness and sharpness.

+ */ +export interface ImageQuality { /** - *

Indicates whether or not the face has a mustache, and the confidence level in the - * determination.

+ *

Value representing brightness of the face. The service returns a value between 0 and + * 100 (inclusive). A higher value indicates a brighter face image.

*/ - Mustache?: Mustache; + Brightness?: number; /** - *

Indicates whether or not the eyes on the face are open, and the confidence level in the - * determination.

+ *

Value representing sharpness of the face. The service returns a value between 0 and 100 + * (inclusive). A higher value indicates a sharper face image.

*/ - EyesOpen?: EyeOpen; + Sharpness?: number; +} +/** + * @public + *

Indicates whether or not the face is smiling, and the confidence level in the + * determination.

+ */ +export interface Smile { /** - *

Indicates whether or not the mouth on the face is open, and the confidence level in the - * determination.

+ *

Boolean value that indicates whether the face is smiling or not.

*/ - MouthOpen?: MouthOpen; + Value?: boolean; /** - *

The emotions that appear to be expressed on the face, and the confidence level in the - * determination. The API is only making a determination of the physical appearance of a person's - * face. It is not a determination of the person’s internal emotional state and should not be - * used in such a way. For example, a person pretending to have a sad face might not be sad - * emotionally.

+ *

Level of confidence in the determination.

*/ - Emotions?: Emotion[]; + Confidence?: number; +} +/** + * @public + *

Provides face metadata for target image faces that are analyzed by + * CompareFaces and RecognizeCelebrities.

+ */ +export interface ComparedFace { /** - *

Indicates the location of landmarks on the face. Default attribute.

+ *

Bounding box of the face.

*/ - Landmarks?: Landmark[]; + BoundingBox?: BoundingBox; /** - *

Indicates the pose of the face as determined by its pitch, roll, and yaw. Default - * attribute.

+ *

Level of confidence that what the bounding box contains is a face.

*/ - Pose?: Pose; + Confidence?: number; /** - *

Identifies image brightness and sharpness. Default attribute.

+ *

An array of facial landmarks.

+ */ + Landmarks?: Landmark[]; + + /** + *

Indicates the pose of the face as determined by its pitch, roll, and yaw.

+ */ + Pose?: Pose; + + /** + *

Identifies face image brightness and sharpness.

*/ Quality?: ImageQuality; /** - *

Confidence level that the bounding box contains a face (and not a different object such - * as a tree). Default attribute.

+ *

The emotions that appear to be expressed on the face, and the confidence level in the + * determination. Valid values include "Happy", "Sad", "Angry", "Confused", "Disgusted", + * "Surprised", "Calm", "Unknown", and "Fear".

*/ - Confidence?: number; + Emotions?: Emotion[]; /** - *

- * FaceOccluded should return "true" with a high confidence score if a detected - * face’s eyes, nose, and mouth are partially captured or if they are covered by masks, dark - * sunglasses, cell phones, hands, or other objects. FaceOccluded should return - * "false" with a high confidence score if common occurrences that do not impact face - * verification are detected, such as eye glasses, lightly tinted sunglasses, strands of hair, - * and others.

+ *

Indicates whether or not the face is smiling, and the confidence level in the + * determination.

*/ - FaceOccluded?: FaceOccluded; + Smile?: Smile; +} + +/** + * @public + * @enum + */ +export const KnownGenderType = { + Female: "Female", + Male: "Male", + Nonbinary: "Nonbinary", + Unlisted: "Unlisted", +} as const; + +/** + * @public + */ +export type KnownGenderType = (typeof KnownGenderType)[keyof typeof KnownGenderType]; +/** + * @public + *

The known gender identity for the celebrity that matches the provided ID. The known + * gender identity can be Male, Female, Nonbinary, or Unlisted.

+ */ +export interface KnownGender { /** - *

Indicates the direction the eyes are gazing in, as defined by pitch and yaw.

+ *

A string value of the KnownGender info about the Celebrity.

*/ - EyeDirection?: EyeDirection; + Type?: KnownGenderType | string; } /** * @public - *

Information about a recognized celebrity.

+ *

Provides information about a celebrity recognized by the RecognizeCelebrities operation.

*/ -export interface CelebrityDetail { +export interface Celebrity { /** - *

An array of URLs pointing to additional celebrity information.

+ *

An array of URLs pointing to additional information about the celebrity. If there is no + * additional information about the celebrity, this list is empty.

*/ Urls?: string[]; @@ -1007,811 +1022,624 @@ export interface CelebrityDetail { Name?: string; /** - *

The unique identifier for the celebrity.

+ *

A unique identifier for the celebrity.

*/ Id?: string; /** - *

The confidence, in percentage, that Amazon Rekognition has that the recognized face is the celebrity.

- */ - Confidence?: number; - - /** - *

Bounding box around the body of a celebrity.

+ *

Provides information about the celebrity's face, such as its location on the + * image.

*/ - BoundingBox?: BoundingBox; + Face?: ComparedFace; /** - *

Face details for the recognized celebrity.

+ *

The confidence, in percentage, that Amazon Rekognition has that the recognized face is the + * celebrity.

*/ - Face?: FaceDetail; + MatchConfidence?: number; /** - *

Retrieves the known gender for the celebrity.

+ *

The known gender identity for the celebrity that matches the provided ID. The known + * gender identity can be Male, Female, Nonbinary, or Unlisted.

*/ KnownGender?: KnownGender; } /** * @public - *

Information about a detected celebrity and the time the celebrity was detected in a stored video. - * For more information, see GetCelebrityRecognition in the Amazon Rekognition Developer Guide.

+ *

Indicates the direction the eyes are gazing in (independent of the head pose) as determined by its pitch and yaw.

*/ -export interface CelebrityRecognition { - /** - *

The time, in milliseconds from the start of the video, that the celebrity was recognized. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the celebrity first appears.

- */ - Timestamp?: number; - +export interface EyeDirection { /** - *

Information about a recognized celebrity.

+ *

Value representing eye direction on the yaw axis.

*/ - Celebrity?: CelebrityDetail; -} - -/** - * @public - * @enum - */ -export const CelebrityRecognitionSortBy = { - ID: "ID", - TIMESTAMP: "TIMESTAMP", -} as const; - -/** - * @public - */ -export type CelebrityRecognitionSortBy = (typeof CelebrityRecognitionSortBy)[keyof typeof CelebrityRecognitionSortBy]; + Yaw?: number; -/** - * @public - *

Type that describes the face Amazon Rekognition chose to compare with the faces in the target. - * This contains a bounding box for the selected face and confidence level that the bounding box - * contains a face. Note that Amazon Rekognition selects the largest face in the source image for this - * comparison.

- */ -export interface ComparedSourceImageFace { /** - *

Bounding box of the face.

+ *

Value representing eye direction on the pitch axis.

*/ - BoundingBox?: BoundingBox; + Pitch?: number; /** - *

Confidence level that the selected bounding box contains a face.

+ *

The confidence that the service has in its predicted eye direction.

*/ Confidence?: number; } /** * @public - * @enum - */ -export const QualityFilter = { - AUTO: "AUTO", - HIGH: "HIGH", - LOW: "LOW", - MEDIUM: "MEDIUM", - NONE: "NONE", -} as const; - -/** - * @public - */ -export type QualityFilter = (typeof QualityFilter)[keyof typeof QualityFilter]; - -/** - * @public - *

Provides the input image either as bytes or an S3 object.

- *

You pass image bytes to an Amazon Rekognition API operation by using the Bytes - * property. For example, you would use the Bytes property to pass an image loaded - * from a local file system. Image bytes passed by using the Bytes property must be - * base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to - * call Amazon Rekognition API operations.

- *

For more information, see Analyzing an Image Loaded from a Local File System - * in the Amazon Rekognition Developer Guide.

- *

You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the - * S3Object property. Images stored in an S3 bucket do not need to be - * base64-encoded.

- *

The region for the S3 bucket containing the S3 object must match the region you use for - * Amazon Rekognition operations.

- *

If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the - * Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and - * then call the operation using the S3Object property.

- *

For Amazon Rekognition to process an S3 object, the user must have permission to - * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the - * Amazon Rekognition Developer Guide.

+ *

Indicates whether or not the face is wearing eye glasses, and the confidence level in + * the determination.

*/ -export interface Image { +export interface Eyeglasses { /** - *

Blob of image bytes up to 5 MBs. Note that the maximum image size you can pass to - * DetectCustomLabels is 4MB.

+ *

Boolean value that indicates whether the face is wearing eye glasses or not.

*/ - Bytes?: Uint8Array; + Value?: boolean; /** - *

Identifies an S3 object as the image source.

+ *

Level of confidence in the determination.

*/ - S3Object?: S3Object; + Confidence?: number; } /** * @public + *

Indicates whether or not the eyes on the face are open, and the confidence level in the + * determination.

*/ -export interface CompareFacesRequest { - /** - *

The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

- *

If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

- */ - SourceImage: Image | undefined; - - /** - *

The target image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

- *

If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

- */ - TargetImage: Image | undefined; - +export interface EyeOpen { /** - *

The minimum level of confidence in the face matches that a match must meet to be - * included in the FaceMatches array.

+ *

Boolean value that indicates whether the eyes on the face are open.

*/ - SimilarityThreshold?: number; + Value?: boolean; /** - *

A filter that specifies a quality bar for how much filtering is done to identify faces. - * Filtered faces aren't compared. If you specify AUTO, Amazon Rekognition chooses the - * quality bar. If you specify LOW, MEDIUM, or HIGH, - * filtering removes all faces that don’t meet the chosen quality bar. - * The quality bar is - * based on a variety of common use cases. Low-quality detections can occur for a number of - * reasons. Some examples are an object that's misidentified as a face, a face that's too blurry, - * or a face with a pose that's too extreme to use. If you specify NONE, no - * filtering is performed. The default value is NONE.

- *

To use quality filtering, the collection you are using must be associated with version 3 - * of the face model or higher.

+ *

Level of confidence in the determination.

*/ - QualityFilter?: QualityFilter | string; + Confidence?: number; } /** * @public - *

Provides information about a face in a target image that matches the source image face - * analyzed by CompareFaces. The Face property contains the bounding - * box of the face in the target image. The Similarity property is the confidence - * that the source image face matches the face in the bounding box.

+ *

+ * FaceOccluded should return "true" with a high confidence score if a detected + * face’s eyes, nose, and mouth are partially captured or if they are covered by masks, dark + * sunglasses, cell phones, hands, or other objects. FaceOccluded should return + * "false" with a high confidence score if common occurrences that do not impact face + * verification are detected, such as eye glasses, lightly tinted sunglasses, strands of hair, + * and others.

+ *

You can use FaceOccluded to determine if an obstruction on a face negatively + * impacts using the image for face matching.

*/ -export interface CompareFacesMatch { +export interface FaceOccluded { /** - *

Level of confidence that the faces match.

+ *

True if a detected face’s eyes, nose, and mouth are partially captured or if they are + * covered by masks, dark sunglasses, cell phones, hands, or other objects. False if common + * occurrences that do not impact face verification are detected, such as eye glasses, lightly + * tinted sunglasses, strands of hair, and others.

*/ - Similarity?: number; + Value?: boolean; /** - *

Provides face metadata (bounding box and confidence that the bounding box actually - * contains a face).

+ *

The confidence that the service has detected the presence of a face occlusion.

*/ - Face?: ComparedFace; + Confidence?: number; } /** * @public * @enum */ -export const OrientationCorrection = { - ROTATE_0: "ROTATE_0", - ROTATE_180: "ROTATE_180", - ROTATE_270: "ROTATE_270", - ROTATE_90: "ROTATE_90", +export const GenderType = { + Female: "Female", + Male: "Male", } as const; /** * @public */ -export type OrientationCorrection = (typeof OrientationCorrection)[keyof typeof OrientationCorrection]; +export type GenderType = (typeof GenderType)[keyof typeof GenderType]; /** * @public + *

The predicted gender of a detected face. + * + *

+ *

Amazon Rekognition makes gender binary (male/female) predictions based on the physical + * appearance of a face in a particular image. This kind of prediction is not designed to + * categorize a person’s gender identity, and you shouldn't use Amazon Rekognition to make such a + * determination. For example, a male actor wearing a long-haired wig and earrings for a role + * might be predicted as female.

+ *

Using Amazon Rekognition to make gender binary predictions is best suited for use cases + * where aggregate gender distribution statistics need to be analyzed without identifying + * specific users. For example, the percentage of female users compared to male users on a social + * media platform.

+ *

We don't recommend using gender binary predictions to make decisions that impact an + * individual's rights, privacy, or access to services.

*/ -export interface CompareFacesResponse { - /** - *

The face in the source image that was used for comparison.

- */ - SourceImageFace?: ComparedSourceImageFace; - +export interface Gender { /** - *

An array of faces in the target image that match the source image face. Each - * CompareFacesMatch object provides the bounding box, the confidence level that - * the bounding box contains a face, and the similarity score for the face in the bounding box - * and the face in the source image.

+ *

The predicted gender of the face.

*/ - FaceMatches?: CompareFacesMatch[]; + Value?: GenderType | string; /** - *

An array of faces in the target image that did not match the source image - * face.

+ *

Level of confidence in the prediction.

*/ - UnmatchedFaces?: ComparedFace[]; + Confidence?: number; +} +/** + * @public + *

Indicates whether or not the mouth on the face is open, and the confidence level in the + * determination.

+ */ +export interface MouthOpen { /** - *

The value of SourceImageOrientationCorrection is always null.

- *

If the input image is in .jpeg format, it might contain exchangeable image file format - * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation - * information to perform image correction. The bounding box coordinates are translated to - * represent object locations after the orientation information in the Exif metadata is used to - * correct the image orientation. Images in .png format don't contain Exif metadata.

- *

Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images - * without orientation information in the image Exif metadata. The bounding box coordinates - * aren't translated and represent the object locations before the image is rotated.

+ *

Boolean value that indicates whether the mouth on the face is open or not.

*/ - SourceImageOrientationCorrection?: OrientationCorrection | string; + Value?: boolean; /** - *

The value of TargetImageOrientationCorrection is always null.

- *

If the input image is in .jpeg format, it might contain exchangeable image file format - * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation - * information to perform image correction. The bounding box coordinates are translated to - * represent object locations after the orientation information in the Exif metadata is used to - * correct the image orientation. Images in .png format don't contain Exif metadata.

- *

Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images - * without orientation information in the image Exif metadata. The bounding box coordinates - * aren't translated and represent the object locations before the image is rotated.

+ *

Level of confidence in the determination.

*/ - TargetImageOrientationCorrection?: OrientationCorrection | string; + Confidence?: number; } /** * @public - *

The input image size exceeds the allowed limit. If you are calling - * DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more - * information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. - *

+ *

Indicates whether or not the face has a mustache, and the confidence level in the + * determination.

*/ -export class ImageTooLargeException extends __BaseException { - readonly name: "ImageTooLargeException" = "ImageTooLargeException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; +export interface Mustache { /** - *

A universally unique identifier (UUID) for the request.

+ *

Boolean value that indicates whether the face has mustache or not.

*/ - Logref?: string; + Value?: boolean; + /** - * @internal + *

Level of confidence in the determination.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ImageTooLargeException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ImageTooLargeException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + Confidence?: number; } /** * @public - *

Amazon Rekognition experienced a service issue. Try your call again.

+ *

Indicates whether or not the face is wearing sunglasses, and the confidence level in + * the determination.

*/ -export class InternalServerError extends __BaseException { - readonly name: "InternalServerError" = "InternalServerError"; - readonly $fault: "server" = "server"; - Message?: string; - Code?: string; +export interface Sunglasses { /** - *

A universally unique identifier (UUID) for the request.

+ *

Boolean value that indicates whether the face is wearing sunglasses or not.

*/ - Logref?: string; + Value?: boolean; + /** - * @internal + *

Level of confidence in the determination.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InternalServerError", - $fault: "server", - ...opts, - }); - Object.setPrototypeOf(this, InternalServerError.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + Confidence?: number; } /** * @public - *

The provided image format is not supported.

+ *

Structure containing attributes of the face that the algorithm detected.

+ *

A FaceDetail object contains either the default facial attributes or all + * facial attributes. The default attributes are BoundingBox, + * Confidence, Landmarks, Pose, and + * Quality.

+ *

+ * GetFaceDetection is the only Amazon Rekognition Video stored video operation that can + * return a FaceDetail object with all attributes. To specify which attributes to + * return, use the FaceAttributes input parameter for StartFaceDetection. The following Amazon Rekognition Video operations return only the default + * attributes. The corresponding Start operations don't have a FaceAttributes input + * parameter:

+ *
    + *
  • + *

    GetCelebrityRecognition

    + *
  • + *
  • + *

    GetPersonTracking

    + *
  • + *
  • + *

    GetFaceSearch

    + *
  • + *
+ *

The Amazon Rekognition Image DetectFaces and IndexFaces operations + * can return all facial attributes. To specify which attributes to return, use the + * Attributes input parameter for DetectFaces. For + * IndexFaces, use the DetectAttributes input parameter.

*/ -export class InvalidImageFormatException extends __BaseException { - readonly name: "InvalidImageFormatException" = "InvalidImageFormatException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; +export interface FaceDetail { /** - *

A universally unique identifier (UUID) for the request.

+ *

Bounding box of the face. Default attribute.

*/ - Logref?: string; + BoundingBox?: BoundingBox; + /** - * @internal + *

The estimated age range, in years, for the face. Low represents the lowest estimated + * age and High represents the highest estimated age.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidImageFormatException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidImageFormatException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + AgeRange?: AgeRange; -/** - * @public - *

Input parameter violated a constraint. Validate your parameter before calling the API - * operation again.

- */ -export class InvalidParameterException extends __BaseException { - readonly name: "InvalidParameterException" = "InvalidParameterException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; /** - *

A universally unique identifier (UUID) for the request.

+ *

Indicates whether or not the face is smiling, and the confidence level in the + * determination.

*/ - Logref?: string; + Smile?: Smile; + /** - * @internal + *

Indicates whether or not the face is wearing eye glasses, and the confidence level in + * the determination.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidParameterException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidParameterException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + Eyeglasses?: Eyeglasses; -/** - * @public - *

Amazon Rekognition is unable to access the S3 object specified in the request.

- */ -export class InvalidS3ObjectException extends __BaseException { - readonly name: "InvalidS3ObjectException" = "InvalidS3ObjectException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; /** - *

A universally unique identifier (UUID) for the request.

+ *

Indicates whether or not the face is wearing sunglasses, and the confidence level in + * the determination.

*/ - Logref?: string; + Sunglasses?: Sunglasses; + /** - * @internal + *

The predicted gender of a detected face.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidS3ObjectException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidS3ObjectException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + Gender?: Gender; + + /** + *

Indicates whether or not the face has a beard, and the confidence level in the + * determination.

+ */ + Beard?: Beard; + + /** + *

Indicates whether or not the face has a mustache, and the confidence level in the + * determination.

+ */ + Mustache?: Mustache; + + /** + *

Indicates whether or not the eyes on the face are open, and the confidence level in the + * determination.

+ */ + EyesOpen?: EyeOpen; -/** - * @public - *

The number of requests exceeded your throughput limit. If you want to increase this - * limit, contact Amazon Rekognition.

- */ -export class ProvisionedThroughputExceededException extends __BaseException { - readonly name: "ProvisionedThroughputExceededException" = "ProvisionedThroughputExceededException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; /** - *

A universally unique identifier (UUID) for the request.

+ *

Indicates whether or not the mouth on the face is open, and the confidence level in the + * determination.

*/ - Logref?: string; + MouthOpen?: MouthOpen; + /** - * @internal + *

The emotions that appear to be expressed on the face, and the confidence level in the + * determination. The API is only making a determination of the physical appearance of a person's + * face. It is not a determination of the person’s internal emotional state and should not be + * used in such a way. For example, a person pretending to have a sad face might not be sad + * emotionally.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ProvisionedThroughputExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ProvisionedThroughputExceededException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + Emotions?: Emotion[]; -/** - * @public - *

Amazon Rekognition is temporarily unable to process the request. Try your call again.

- */ -export class ThrottlingException extends __BaseException { - readonly name: "ThrottlingException" = "ThrottlingException"; - readonly $fault: "server" = "server"; - Message?: string; - Code?: string; /** - *

A universally unique identifier (UUID) for the request.

+ *

Indicates the location of landmarks on the face. Default attribute.

*/ - Logref?: string; + Landmarks?: Landmark[]; + /** - * @internal + *

Indicates the pose of the face as determined by its pitch, roll, and yaw. Default + * attribute.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ThrottlingException", - $fault: "server", - ...opts, - }); - Object.setPrototypeOf(this, ThrottlingException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + Pose?: Pose; -/** - * @public - *

- * Label detection settings to use on a streaming video. Defining the settings is required in the request parameter for CreateStreamProcessor. - * Including this setting in the CreateStreamProcessor request enables you to use the stream processor for label detection. - * You can then select what you want the stream processor to detect, such as people or pets. When the stream processor has started, one notification - * is sent for each object class specified. For example, if packages and pets are selected, one SNS notification is published the first time a package is detected - * and one SNS notification is published the first time a pet is detected, as well as an end-of-session summary. - *

- */ -export interface ConnectedHomeSettings { /** - *

- * Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: "PERSON", "PET", "PACKAGE", and "ALL". - *

+ *

Identifies image brightness and sharpness. Default attribute.

*/ - Labels: string[] | undefined; + Quality?: ImageQuality; /** - *

- * The minimum confidence required to label an object in the video. - *

+ *

Confidence level that the bounding box contains a face (and not a different object such + * as a tree). Default attribute.

*/ - MinConfidence?: number; -} + Confidence?: number; -/** - * @public - *

- * The label detection settings you want to use in your stream processor. This includes the labels you want the stream processor to detect and the minimum confidence level allowed to label objects. - *

- */ -export interface ConnectedHomeSettingsForUpdate { /** *

- * Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: "PERSON", "PET", "PACKAGE", and "ALL". - *

+ * FaceOccluded should return "true" with a high confidence score if a detected + * face’s eyes, nose, and mouth are partially captured or if they are covered by masks, dark + * sunglasses, cell phones, hands, or other objects. FaceOccluded should return + * "false" with a high confidence score if common occurrences that do not impact face + * verification are detected, such as eye glasses, lightly tinted sunglasses, strands of hair, + * and others.

*/ - Labels?: string[]; + FaceOccluded?: FaceOccluded; /** - *

- * The minimum confidence required to label an object in the video. - *

+ *

Indicates the direction the eyes are gazing in, as defined by pitch and yaw.

*/ - MinConfidence?: number; + EyeDirection?: EyeDirection; } /** * @public - * @enum - */ -export const ContentClassifier = { - FREE_OF_ADULT_CONTENT: "FreeOfAdultContent", - FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation", -} as const; - -/** - * @public + *

Information about a recognized celebrity.

*/ -export type ContentClassifier = (typeof ContentClassifier)[keyof typeof ContentClassifier]; +export interface CelebrityDetail { + /** + *

An array of URLs pointing to additional celebrity information.

+ */ + Urls?: string[]; -/** - * @public - * @enum - */ -export const ContentModerationAggregateBy = { - SEGMENTS: "SEGMENTS", - TIMESTAMPS: "TIMESTAMPS", -} as const; + /** + *

The name of the celebrity.

+ */ + Name?: string; -/** - * @public - */ -export type ContentModerationAggregateBy = - (typeof ContentModerationAggregateBy)[keyof typeof ContentModerationAggregateBy]; + /** + *

The unique identifier for the celebrity.

+ */ + Id?: string; -/** - * @public - *

Provides information about a single type of inappropriate, unwanted, or - * offensive content found in an image or video. Each type of moderated content has a label - * within a hierarchical taxonomy. For more information, see Content moderation in the Amazon Rekognition - * Developer Guide.

- */ -export interface ModerationLabel { /** - *

Specifies the confidence that Amazon Rekognition has that the label has been correctly - * identified.

- *

If you don't specify the MinConfidence parameter in the call to - * DetectModerationLabels, the operation returns labels with a confidence value - * greater than or equal to 50 percent.

+ *

The confidence, in percentage, that Amazon Rekognition has that the recognized face is the celebrity.

*/ Confidence?: number; /** - *

The label name for the type of unsafe content detected in the image.

+ *

Bounding box around the body of a celebrity.

*/ - Name?: string; + BoundingBox?: BoundingBox; /** - *

The name for the parent label. Labels at the top level of the hierarchy have the parent - * label "".

+ *

Face details for the recognized celebrity.

*/ - ParentName?: string; + Face?: FaceDetail; + + /** + *

Retrieves the known gender for the celebrity.

+ */ + KnownGender?: KnownGender; } /** * @public - *

Information about an inappropriate, unwanted, or offensive content label detection in a stored video.

+ *

Information about a detected celebrity and the time the celebrity was detected in a stored video. + * For more information, see GetCelebrityRecognition in the Amazon Rekognition Developer Guide.

*/ -export interface ContentModerationDetection { +export interface CelebrityRecognition { /** - *

Time, in milliseconds from the beginning of the video, that the content moderation label was detected. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the moderated content first appears.

+ *

The time, in milliseconds from the start of the video, that the celebrity was recognized. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the celebrity first appears.

*/ Timestamp?: number; /** - *

The content moderation label detected by in the stored video.

+ *

Information about a recognized celebrity.

*/ - ModerationLabel?: ModerationLabel; + Celebrity?: CelebrityDetail; +} - /** - *

The time in milliseconds defining the start of the timeline - * segment containing a continuously detected moderation label.

- */ - StartTimestampMillis?: number; +/** + * @public + * @enum + */ +export const CelebrityRecognitionSortBy = { + ID: "ID", + TIMESTAMP: "TIMESTAMP", +} as const; + +/** + * @public + */ +export type CelebrityRecognitionSortBy = (typeof CelebrityRecognitionSortBy)[keyof typeof CelebrityRecognitionSortBy]; +/** + * @public + *

Type that describes the face Amazon Rekognition chose to compare with the faces in the target. + * This contains a bounding box for the selected face and confidence level that the bounding box + * contains a face. Note that Amazon Rekognition selects the largest face in the source image for this + * comparison.

+ */ +export interface ComparedSourceImageFace { /** - *

The time in milliseconds defining the end of the - * timeline segment containing a continuously detected moderation label.

+ *

Bounding box of the face.

*/ - EndTimestampMillis?: number; + BoundingBox?: BoundingBox; /** - *

The time duration of a segment in milliseconds, - * I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.

+ *

Confidence level that the selected bounding box contains a face.

*/ - DurationMillis?: number; + Confidence?: number; } /** * @public * @enum */ -export const ContentModerationSortBy = { - NAME: "NAME", - TIMESTAMP: "TIMESTAMP", +export const QualityFilter = { + AUTO: "AUTO", + HIGH: "HIGH", + LOW: "LOW", + MEDIUM: "MEDIUM", + NONE: "NONE", } as const; /** * @public */ -export type ContentModerationSortBy = (typeof ContentModerationSortBy)[keyof typeof ContentModerationSortBy]; +export type QualityFilter = (typeof QualityFilter)[keyof typeof QualityFilter]; /** * @public - *

The S3 bucket and folder location where training output is placed.

+ *

Provides the input image either as bytes or an S3 object.

+ *

You pass image bytes to an Amazon Rekognition API operation by using the Bytes + * property. For example, you would use the Bytes property to pass an image loaded + * from a local file system. Image bytes passed by using the Bytes property must be + * base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to + * call Amazon Rekognition API operations.

+ *

For more information, see Analyzing an Image Loaded from a Local File System + * in the Amazon Rekognition Developer Guide.

+ *

You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the + * S3Object property. Images stored in an S3 bucket do not need to be + * base64-encoded.

+ *

The region for the S3 bucket containing the S3 object must match the region you use for + * Amazon Rekognition operations.

+ *

If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the + * Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and + * then call the operation using the S3Object property.

+ *

For Amazon Rekognition to process an S3 object, the user must have permission to + * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the + * Amazon Rekognition Developer Guide.

*/ -export interface OutputConfig { +export interface Image { /** - *

The S3 bucket where training output is placed.

+ *

Blob of image bytes up to 5 MBs. Note that the maximum image size you can pass to + * DetectCustomLabels is 4MB.

*/ - S3Bucket?: string; + Bytes?: Uint8Array; /** - *

The prefix applied to the training output files.

+ *

Identifies an S3 object as the image source.

*/ - S3KeyPrefix?: string; + S3Object?: S3Object; } /** * @public */ -export interface CopyProjectVersionRequest { - /** - *

The ARN of the source project in the trusting AWS account.

- */ - SourceProjectArn: string | undefined; - +export interface CompareFacesRequest { /** - *

The ARN of the model version in the source project that you want to copy to a destination project.

+ *

The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

+ *

If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

*/ - SourceProjectVersionArn: string | undefined; + SourceImage: Image | undefined; /** - *

The ARN of the project in the trusted AWS account that you want to copy the model version to.

+ *

The target image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

+ *

If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

*/ - DestinationProjectArn: string | undefined; + TargetImage: Image | undefined; /** - *

A name for the version of the model that's copied to the destination project.

+ *

The minimum level of confidence in the face matches that a match must meet to be + * included in the FaceMatches array.

*/ - VersionName: string | undefined; + SimilarityThreshold?: number; /** - *

The S3 bucket and folder location where the training output for the source model version is placed.

+ *

A filter that specifies a quality bar for how much filtering is done to identify faces. + * Filtered faces aren't compared. If you specify AUTO, Amazon Rekognition chooses the + * quality bar. If you specify LOW, MEDIUM, or HIGH, + * filtering removes all faces that don’t meet the chosen quality bar. + * The quality bar is + * based on a variety of common use cases. Low-quality detections can occur for a number of + * reasons. Some examples are an object that's misidentified as a face, a face that's too blurry, + * or a face with a pose that's too extreme to use. If you specify NONE, no + * filtering is performed. The default value is NONE.

+ *

To use quality filtering, the collection you are using must be associated with version 3 + * of the face model or higher.

*/ - OutputConfig: OutputConfig | undefined; + QualityFilter?: QualityFilter | string; +} +/** + * @public + *

Provides information about a face in a target image that matches the source image face + * analyzed by CompareFaces. The Face property contains the bounding + * box of the face in the target image. The Similarity property is the confidence + * that the source image face matches the face in the bounding box.

+ */ +export interface CompareFacesMatch { /** - *

The key-value tags to assign to the model version.

+ *

Level of confidence that the faces match.

*/ - Tags?: Record; + Similarity?: number; /** - *

The identifier for your AWS Key Management Service key (AWS KMS key). - * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, - * an alias for your KMS key, or an alias ARN. - * The key is used to encrypt training results - * and manifest files written to the output Amazon S3 bucket (OutputConfig).

- *

If you choose to use your own KMS key, you need the following permissions on the KMS key.

- *
    - *
  • - *

    kms:CreateGrant

    - *
  • - *
  • - *

    kms:DescribeKey

    - *
  • - *
  • - *

    kms:GenerateDataKey

    - *
  • - *
  • - *

    kms:Decrypt

    - *
  • - *
- *

If you don't specify a value for KmsKeyId, images copied into the service are encrypted - * using a key that AWS owns and manages.

+ *

Provides face metadata (bounding box and confidence that the bounding box actually + * contains a face).

*/ - KmsKeyId?: string; + Face?: ComparedFace; } /** * @public + * @enum */ -export interface CopyProjectVersionResponse { - /** - *

The ARN of the copied model version in the destination project.

- */ - ProjectVersionArn?: string; -} +export const OrientationCorrection = { + ROTATE_0: "ROTATE_0", + ROTATE_180: "ROTATE_180", + ROTATE_270: "ROTATE_270", + ROTATE_90: "ROTATE_90", +} as const; /** * @public - *

An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations - * (StartLabelDetection, for example) will raise a LimitExceededException exception (HTTP status code: 400) until - * the number of concurrently running jobs is below the Amazon Rekognition service limit.

*/ -export class LimitExceededException extends __BaseException { - readonly name: "LimitExceededException" = "LimitExceededException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; - /** - *

A universally unique identifier (UUID) for the request.

- */ - Logref?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, LimitExceededException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} +export type OrientationCorrection = (typeof OrientationCorrection)[keyof typeof OrientationCorrection]; /** * @public - *

The specified resource is already being used.

*/ -export class ResourceInUseException extends __BaseException { - readonly name: "ResourceInUseException" = "ResourceInUseException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; +export interface CompareFacesResponse { /** - *

A universally unique identifier (UUID) for the request.

+ *

The face in the source image that was used for comparison.

*/ - Logref?: string; + SourceImageFace?: ComparedSourceImageFace; + /** - * @internal + *

An array of faces in the target image that match the source image face. Each + * CompareFacesMatch object provides the bounding box, the confidence level that + * the bounding box contains a face, and the similarity score for the face in the bounding box + * and the face in the source image.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceInUseException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceInUseException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + FaceMatches?: CompareFacesMatch[]; -/** - * @public - *

The resource specified in the request cannot be found.

- */ -export class ResourceNotFoundException extends __BaseException { - readonly name: "ResourceNotFoundException" = "ResourceNotFoundException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; /** - *

A universally unique identifier (UUID) for the request.

+ *

An array of faces in the target image that did not match the source image + * face.

*/ - Logref?: string; + UnmatchedFaces?: ComparedFace[]; + /** - * @internal + *

The value of SourceImageOrientationCorrection is always null.

+ *

If the input image is in .jpeg format, it might contain exchangeable image file format + * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation + * information to perform image correction. The bounding box coordinates are translated to + * represent object locations after the orientation information in the Exif metadata is used to + * correct the image orientation. Images in .png format don't contain Exif metadata.

+ *

Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images + * without orientation information in the image Exif metadata. The bounding box coordinates + * aren't translated and represent the object locations before the image is rotated.

*/ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceNotFoundException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + SourceImageOrientationCorrection?: OrientationCorrection | string; + + /** + *

The value of TargetImageOrientationCorrection is always null.

+ *

If the input image is in .jpeg format, it might contain exchangeable image file format + * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation + * information to perform image correction. The bounding box coordinates are translated to + * represent object locations after the orientation information in the Exif metadata is used to + * correct the image orientation. Images in .png format don't contain Exif metadata.

+ *

Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images + * without orientation information in the image Exif metadata. The bounding box coordinates + * aren't translated and represent the object locations before the image is rotated.

+ */ + TargetImageOrientationCorrection?: OrientationCorrection | string; } /** * @public - *

- *

The size of the collection exceeds the allowed limit. For more information, - * see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide.

+ *

The input image size exceeds the allowed limit. If you are calling + * DetectProtectiveEquipment, the image size or resolution exceeds the allowed limit. For more + * information, see Guidelines and quotas in Amazon Rekognition in the Amazon Rekognition Developer Guide. + *

*/ -export class ServiceQuotaExceededException extends __BaseException { - readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException"; +export class ImageTooLargeException extends __BaseException { + readonly name: "ImageTooLargeException" = "ImageTooLargeException"; readonly $fault: "client" = "client"; Message?: string; Code?: string; @@ -1822,13 +1650,13 @@ export class ServiceQuotaExceededException extends __BaseException { /** * @internal */ - constructor(opts: __ExceptionOptionType) { + constructor(opts: __ExceptionOptionType) { super({ - name: "ServiceQuotaExceededException", + name: "ImageTooLargeException", $fault: "client", ...opts, }); - Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype); + Object.setPrototypeOf(this, ImageTooLargeException.prototype); this.Message = opts.Message; this.Code = opts.Code; this.Logref = opts.Logref; @@ -1837,47 +1665,39 @@ export class ServiceQuotaExceededException extends __BaseException { /** * @public - */ -export interface CreateCollectionRequest { - /** - *

ID for the collection that you are creating.

- */ - CollectionId: string | undefined; - - /** - *

A set of tags (key-value pairs) that you want to attach to the collection.

- */ - Tags?: Record; -} - -/** - * @public - */ -export interface CreateCollectionResponse { - /** - *

HTTP status code indicating the result of the operation.

- */ - StatusCode?: number; - + *

The provided image format is not supported.

+ */ +export class InvalidImageFormatException extends __BaseException { + readonly name: "InvalidImageFormatException" = "InvalidImageFormatException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

Amazon Resource Name (ARN) of the collection. You can use this to manage permissions on - * your resources.

+ *

A universally unique identifier (UUID) for the request.

*/ - CollectionArn?: string; - + Logref?: string; /** - *

Version number of the face detection model associated with the collection you are - * creating.

+ * @internal */ - FaceModelVersion?: string; + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidImageFormatException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidImageFormatException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

A resource with the specified ID already exists.

+ *

Amazon Rekognition is unable to access the S3 object specified in the request.

*/ -export class ResourceAlreadyExistsException extends __BaseException { - readonly name: "ResourceAlreadyExistsException" = "ResourceAlreadyExistsException"; +export class InvalidS3ObjectException extends __BaseException { + readonly name: "InvalidS3ObjectException" = "InvalidS3ObjectException"; readonly $fault: "client" = "client"; Message?: string; Code?: string; @@ -1888,13 +1708,13 @@ export class ResourceAlreadyExistsException extends __BaseException { /** * @internal */ - constructor(opts: __ExceptionOptionType) { + constructor(opts: __ExceptionOptionType) { super({ - name: "ResourceAlreadyExistsException", + name: "InvalidS3ObjectException", $fault: "client", ...opts, }); - Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype); + Object.setPrototypeOf(this, InvalidS3ObjectException.prototype); this.Message = opts.Message; this.Code = opts.Code; this.Logref = opts.Logref; @@ -1904,254 +1724,205 @@ export class ResourceAlreadyExistsException extends __BaseException { /** * @public *

- * The source that Amazon Rekognition Custom Labels uses to create a dataset. To - * use an Amazon Sagemaker format manifest file, specify the S3 bucket location in the GroundTruthManifest field. - * The S3 bucket must be in your AWS account. - * To create a copy of an existing dataset, specify the Amazon Resource Name (ARN) of - * an existing dataset in DatasetArn.

- *

You need to specify a value for DatasetArn or GroundTruthManifest, but not both. - * if you supply both values, or if you don't specify any values, an InvalidParameterException exception occurs. - *

- *

For more information, see CreateDataset.

+ * Label detection settings to use on a streaming video. Defining the settings is required in the request parameter for CreateStreamProcessor. + * Including this setting in the CreateStreamProcessor request enables you to use the stream processor for label detection. + * You can then select what you want the stream processor to detect, such as people or pets. When the stream processor has started, one notification + * is sent for each object class specified. For example, if packages and pets are selected, one SNS notification is published the first time a package is detected + * and one SNS notification is published the first time a pet is detected, as well as an end-of-session summary. + *

*/ -export interface DatasetSource { +export interface ConnectedHomeSettings { /** - *

The S3 bucket that contains an Amazon Sagemaker Ground Truth format manifest file. - *

+ *

+ * Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: "PERSON", "PET", "PACKAGE", and "ALL". + *

*/ - GroundTruthManifest?: GroundTruthManifest; + Labels: string[] | undefined; /** *

- * The ARN of an Amazon Rekognition Custom Labels dataset that you want to copy. - *

+ * The minimum confidence required to label an object in the video. + *

*/ - DatasetArn?: string; + MinConfidence?: number; } /** * @public - * @enum - */ -export const DatasetType = { - TEST: "TEST", - TRAIN: "TRAIN", -} as const; - -/** - * @public - */ -export type DatasetType = (typeof DatasetType)[keyof typeof DatasetType]; - -/** - * @public + *

+ * The label detection settings you want to use in your stream processor. This includes the labels you want the stream processor to detect and the minimum confidence level allowed to label objects. + *

*/ -export interface CreateDatasetRequest { - /** - *

- * The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location - * of an Amazon Sagemaker format manifest file. If you don't specify datasetSource, an empty dataset is created. - * To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries. - * - *

- */ - DatasetSource?: DatasetSource; - +export interface ConnectedHomeSettingsForUpdate { /** *

- * The type of the dataset. Specify train to create a training dataset. Specify test - * to create a test dataset. - *

+ * Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: "PERSON", "PET", "PACKAGE", and "ALL". + *

*/ - DatasetType: DatasetType | string | undefined; + Labels?: string[]; /** *

- * The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. - *

+ * The minimum confidence required to label an object in the video. + *

*/ - ProjectArn: string | undefined; + MinConfidence?: number; } /** * @public + * @enum */ -export interface CreateDatasetResponse { - /** - *

- * The ARN of the created Amazon Rekognition Custom Labels dataset. - *

- */ - DatasetArn?: string; -} +export const ContentClassifier = { + FREE_OF_ADULT_CONTENT: "FreeOfAdultContent", + FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION: "FreeOfPersonallyIdentifiableInformation", +} as const; /** * @public - *

Contains settings that specify the location of an Amazon S3 bucket used - * to store the output of a Face Liveness session. Note that the S3 bucket must be located - * in the caller's AWS account and in the same region as the Face Liveness end-point. Additionally, the Amazon S3 object keys are - * auto-generated by the Face Liveness system.

*/ -export interface LivenessOutputConfig { - /** - *

The path to an AWS Amazon S3 bucket used to store Face Liveness session results.

- */ - S3Bucket: string | undefined; +export type ContentClassifier = (typeof ContentClassifier)[keyof typeof ContentClassifier]; - /** - *

The prefix prepended to the output files for the Face Liveness session results.

- */ - S3KeyPrefix?: string; -} +/** + * @public + * @enum + */ +export const ContentModerationAggregateBy = { + SEGMENTS: "SEGMENTS", + TIMESTAMPS: "TIMESTAMPS", +} as const; /** * @public - *

A session settings object. It contains settings for the operation - * to be performed. It accepts arguments for OutputConfig and AuditImagesLimit.

*/ -export interface CreateFaceLivenessSessionRequestSettings { +export type ContentModerationAggregateBy = + (typeof ContentModerationAggregateBy)[keyof typeof ContentModerationAggregateBy]; + +/** + * @public + *

Provides information about a single type of inappropriate, unwanted, or + * offensive content found in an image or video. Each type of moderated content has a label + * within a hierarchical taxonomy. For more information, see Content moderation in the Amazon Rekognition + * Developer Guide.

+ */ +export interface ModerationLabel { /** - *

Can specify the location of an Amazon S3 bucket, where reference and audit images will be - * stored. Note that the Amazon S3 bucket must be located in the caller's AWS account and in the - * same region as the Face Liveness end-point. Additionally, the Amazon S3 object keys are - * auto-generated by the Face Liveness system. Requires that the caller has the - * s3:PutObject permission on the Amazon S3 bucket.

+ *

Specifies the confidence that Amazon Rekognition has that the label has been correctly + * identified.

+ *

If you don't specify the MinConfidence parameter in the call to + * DetectModerationLabels, the operation returns labels with a confidence value + * greater than or equal to 50 percent.

*/ - OutputConfig?: LivenessOutputConfig; + Confidence?: number; /** - *

Number of audit images to be returned back. Takes an integer between 0-4. Any integer less - * than 0 will return 0, any integer above 4 will return 4 images in the response. By default, it - * is set to 0. The limit is best effort and is based on the actual duration of the - * selfie-video.

+ *

The label name for the type of unsafe content detected in the image.

*/ - AuditImagesLimit?: number; + Name?: string; + + /** + *

The name for the parent label. Labels at the top level of the hierarchy have the parent + * label "".

+ */ + ParentName?: string; } /** * @public + *

Information about an inappropriate, unwanted, or offensive content label detection in a stored video.

*/ -export interface CreateFaceLivenessSessionRequest { +export interface ContentModerationDetection { /** - *

The identifier for your AWS Key Management Service key (AWS KMS key). - * Used to encrypt audit images and reference images.

+ *

Time, in milliseconds from the beginning of the video, that the content moderation label was detected. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the moderated content first appears.

*/ - KmsKeyId?: string; + Timestamp?: number; /** - *

A session settings object. It contains settings for the operation to be performed. For - * Face Liveness, it accepts OutputConfig and AuditImagesLimit.

+ *

The content moderation label detected by in the stored video.

*/ - Settings?: CreateFaceLivenessSessionRequestSettings; + ModerationLabel?: ModerationLabel; /** - *

Idempotent token is used to recognize the Face Liveness request. If the same token is used - * with multiple CreateFaceLivenessSession requests, the same session is returned. - * This token is employed to avoid unintentionally creating the same session multiple - * times.

+ *

The time in milliseconds defining the start of the timeline + * segment containing a continuously detected moderation label.

*/ - ClientRequestToken?: string; -} + StartTimestampMillis?: number; -/** - * @public - */ -export interface CreateFaceLivenessSessionResponse { /** - *

A unique 128-bit UUID identifying a Face Liveness session.

+ *

The time in milliseconds defining the end of the + * timeline segment containing a continuously detected moderation label.

*/ - SessionId: string | undefined; -} + EndTimestampMillis?: number; -/** - * @public - */ -export interface CreateProjectRequest { /** - *

The name of the project to create.

+ *

The time duration of a segment in milliseconds, + * I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.

*/ - ProjectName: string | undefined; + DurationMillis?: number; } /** * @public + * @enum */ -export interface CreateProjectResponse { - /** - *

The Amazon Resource Name (ARN) of the new project. You can use the ARN to - * configure IAM access to the project.

- */ - ProjectArn?: string; -} +export const ContentModerationSortBy = { + NAME: "NAME", + TIMESTAMP: "TIMESTAMP", +} as const; /** * @public - *

The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels uses the - * training dataset to create a test dataset with a temporary split of the training dataset.

*/ -export interface TestingData { - /** - *

The assets used for testing.

- */ - Assets?: Asset[]; - - /** - *

If specified, Amazon Rekognition Custom Labels temporarily splits the training dataset (80%) to create a test dataset (20%) for the training job. - * After training completes, the test dataset is not stored and the training dataset reverts to its previous size.

- */ - AutoCreate?: boolean; -} +export type ContentModerationSortBy = (typeof ContentModerationSortBy)[keyof typeof ContentModerationSortBy]; /** * @public - *

The dataset used for training.

+ *

The S3 bucket and folder location where training output is placed.

*/ -export interface TrainingData { +export interface OutputConfig { /** - *

A Sagemaker GroundTruth manifest file that contains the training images (assets).

+ *

The S3 bucket where training output is placed.

*/ - Assets?: Asset[]; + S3Bucket?: string; + + /** + *

The prefix applied to the training output files.

+ */ + S3KeyPrefix?: string; } /** * @public */ -export interface CreateProjectVersionRequest { +export interface CopyProjectVersionRequest { /** - *

The ARN of the Amazon Rekognition Custom Labels project that - * manages the model that you want to train.

+ *

The ARN of the source project in the trusting AWS account.

*/ - ProjectArn: string | undefined; + SourceProjectArn: string | undefined; /** - *

A name for the version of the model. This value must be unique.

+ *

The ARN of the model version in the source project that you want to copy to a destination project.

*/ - VersionName: string | undefined; + SourceProjectVersionArn: string | undefined; /** - *

The Amazon S3 bucket location to store the results of training. - * The S3 bucket can be in any AWS account as long as the caller has - * s3:PutObject permissions on the S3 bucket.

+ *

The ARN of the project in the trusted AWS account that you want to copy the model version to.

*/ - OutputConfig: OutputConfig | undefined; + DestinationProjectArn: string | undefined; /** - *

Specifies an external manifest that the services uses to train the model. - * If you specify TrainingData you must also specify TestingData. - * The project must not have any associated datasets. - *

+ *

A name for the version of the model that's copied to the destination project.

*/ - TrainingData?: TrainingData; + VersionName: string | undefined; /** - *

Specifies an external manifest that the service uses to test the model. - * If you specify TestingData you must also specify TrainingData. - * The project must not have any associated datasets.

+ *

The S3 bucket and folder location where the training output for the source model version is placed.

*/ - TestingData?: TestingData; + OutputConfig: OutputConfig | undefined; /** - *

A set of tags (key-value pairs) that you want to attach to the model.

+ *

The key-value tags to assign to the model version.

*/ Tags?: Record; @@ -2159,8 +1930,7 @@ export interface CreateProjectVersionRequest { *

The identifier for your AWS Key Management Service key (AWS KMS key). * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, * an alias for your KMS key, or an alias ARN. - * The key is used to encrypt training and test images copied into the service for model training. - * Your source images are unaffected. The key is also used to encrypt training results + * The key is used to encrypt training results * and manifest files written to the output Amazon S3 bucket (OutputConfig).

*

If you choose to use your own KMS key, you need the following permissions on the KMS key.

*
    @@ -2186,1895 +1956,1928 @@ export interface CreateProjectVersionRequest { /** * @public */ -export interface CreateProjectVersionResponse { +export interface CopyProjectVersionResponse { /** - *

    The ARN of the model version that was created. Use DescribeProjectVersion - * to get the current status of the training operation.

    + *

    The ARN of the copied model version in the destination project.

    */ ProjectVersionArn?: string; } /** * @public - *

    - * Allows you to opt in or opt out to share data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. - * Note that if you opt out at the account level this setting is ignored on individual streams. - * - *

    - */ -export interface StreamProcessorDataSharingPreference { - /** - *

    - * If this option is set to true, you choose to share data with Rekognition to improve model performance. - *

    - */ - OptIn: boolean | undefined; -} - -/** - * @public - *

    Kinesis video stream stream that provides the source streaming video for a Amazon Rekognition Video stream processor. For more information, see - * CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    - */ -export interface KinesisVideoStream { - /** - *

    ARN of the Kinesis video stream stream that streams the source video.

    - */ - Arn?: string; -} - -/** - * @public - *

    Information about the source streaming video.

    - */ -export interface StreamProcessorInput { - /** - *

    The Kinesis video stream input stream for the source streaming video.

    - */ - KinesisVideoStream?: KinesisVideoStream; -} - -/** - * @public - *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    - *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition - * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, - * one for a person at second 2 and one for a pet at second 4.

    - *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + *

    An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations + * (StartLabelDetection, for example) will raise a LimitExceededException exception (HTTP status code: 400) until + * the number of concurrently running jobs is below the Amazon Rekognition service limit.

    */ -export interface StreamProcessorNotificationChannel { +export class LimitExceededException extends __BaseException { + readonly name: "LimitExceededException" = "LimitExceededException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    - * The Amazon Resource Number (ARN) of the Amazon Amazon Simple Notification Service topic to which Amazon Rekognition posts the completion status. - *

    + *

    A universally unique identifier (UUID) for the request.

    */ - SNSTopicArn: string | undefined; -} - -/** - * @public - *

    The Kinesis data stream Amazon Rekognition to which the analysis results of a Amazon Rekognition stream processor are streamed. For more information, see - * CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    - */ -export interface KinesisDataStream { + Logref?: string; /** - *

    ARN of the output Amazon Kinesis Data Streams stream.

    + * @internal */ - Arn?: string; + constructor(opts: __ExceptionOptionType) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, LimitExceededException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

    - * The Amazon S3 bucket location to which Amazon Rekognition publishes the detailed inference results of a video analysis operation. - * These results include the name of the stream processor resource, the session ID of the stream processing session, - * and labeled timestamps and bounding boxes for detected labels. - *

    + *

    The specified resource is already being used.

    */ -export interface S3Destination { +export class ResourceInUseException extends __BaseException { + readonly name: "ResourceInUseException" = "ResourceInUseException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    - * The name of the Amazon S3 bucket you want to associate with the streaming video project. You must be the owner of the Amazon S3 bucket. - *

    + *

    A universally unique identifier (UUID) for the request.

    */ - Bucket?: string; - + Logref?: string; /** - *

    - * The prefix value of the location within the bucket that you want the information to be published to. - * For more information, see Using prefixes. - *

    + * @internal */ - KeyPrefix?: string; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceInUseException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceInUseException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

    Information about the Amazon Kinesis Data Streams stream to which a Amazon Rekognition Video stream processor streams the results of a video analysis. For more - * information, see CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    */ -export interface StreamProcessorOutput { +export interface CreateCollectionRequest { /** - *

    The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the analysis results.

    + *

    ID for the collection that you are creating.

    */ - KinesisDataStream?: KinesisDataStream; + CollectionId: string | undefined; /** - *

    - * The Amazon S3 bucket location to which Amazon Rekognition publishes the detailed inference results of a video analysis operation. - *

    + *

    A set of tags (key-value pairs) that you want to attach to the collection.

    */ - S3Destination?: S3Destination; + Tags?: Record; } /** * @public - *

    The X and Y coordinates of a point on an image or video frame. The X and Y values are - * ratios of the overall image size or video resolution. For example, if an input image is - * 700x200 and the values are X=0.5 and Y=0.25, then the point is at the (350,50) pixel - * coordinate on the image.

    - *

    An array of Point objects makes up a Polygon. A - * Polygon is returned by DetectText and by DetectCustomLabels - * Polygon represents a fine-grained polygon around a detected item. For more - * information, see Geometry in the Amazon Rekognition Developer Guide.

    */ -export interface Point { - /** - *

    The value of the X coordinate for a point on a Polygon.

    - */ - X?: number; - +export interface CreateCollectionResponse { /** - *

    The value of the Y coordinate for a point on a Polygon.

    + *

    HTTP status code indicating the result of the operation.

    */ - Y?: number; -} + StatusCode?: number; -/** - * @public - *

    Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a BoundingBox - * or Polygon to set a region of the screen.

    - *

    A word, face, or label is included in the region if it is more than half in that region. If there is more than - * one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region - * is kept in the results.

    - */ -export interface RegionOfInterest { /** - *

    The box representing a region of interest on screen.

    + *

    Amazon Resource Name (ARN) of the collection. You can use this to manage permissions on + * your resources.

    */ - BoundingBox?: BoundingBox; + CollectionArn?: string; /** - *

    - * Specifies a shape made up of up to 10 Point objects to define a region of interest. - *

    + *

    Version number of the face detection model associated with the collection you are + * creating.

    */ - Polygon?: Point[]; + FaceModelVersion?: string; } /** * @public - *

    Input face recognition parameters for an Amazon Rekognition stream processor. - * Includes the collection to use for face recognition and the face attributes to detect. - * Defining the settings is required in the request parameter for CreateStreamProcessor.

    + *

    A resource with the specified ID already exists.

    */ -export interface FaceSearchSettings { +export class ResourceAlreadyExistsException extends __BaseException { + readonly name: "ResourceAlreadyExistsException" = "ResourceAlreadyExistsException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    The ID of a collection that contains faces that you want to search for.

    + *

    A universally unique identifier (UUID) for the request.

    */ - CollectionId?: string; - + Logref?: string; /** - *

    Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80. - * 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.

    + * @internal */ - FaceMatchThreshold?: number; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceAlreadyExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceAlreadyExistsException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - *

    Input parameters used in a streaming video analyzed by a Amazon Rekognition stream processor. - * You can use FaceSearch to recognize faces in a streaming video, or you can use ConnectedHome to detect labels.

    + *

    + * The source that Amazon Rekognition Custom Labels uses to create a dataset. To + * use an Amazon Sagemaker format manifest file, specify the S3 bucket location in the GroundTruthManifest field. + * The S3 bucket must be in your AWS account. + * To create a copy of an existing dataset, specify the Amazon Resource Name (ARN) of + * an existing dataset in DatasetArn.

    + *

    You need to specify a value for DatasetArn or GroundTruthManifest, but not both. + * if you supply both values, or if you don't specify any values, an InvalidParameterException exception occurs. + *

    + *

    For more information, see CreateDataset.

    */ -export interface StreamProcessorSettings { +export interface DatasetSource { /** - *

    Face search settings to use on a streaming video.

    + *

    The S3 bucket that contains an Amazon Sagemaker Ground Truth format manifest file. + *

    */ - FaceSearch?: FaceSearchSettings; + GroundTruthManifest?: GroundTruthManifest; /** *

    - * Label detection settings to use on a streaming video. Defining the settings is required in the request parameter for CreateStreamProcessor. - * Including this setting in the CreateStreamProcessor request enables you to use the stream processor for label detection. - * You can then select what you want the stream processor to detect, such as people or pets. When the stream processor has started, one notification - * is sent for each object class specified. For example, if packages and pets are selected, one SNS notification is published the first time a package is detected - * and one SNS notification is published the first time a pet is detected, as well as an end-of-session summary. - *

    + * The ARN of an Amazon Rekognition Custom Labels dataset that you want to copy. + *

    */ - ConnectedHome?: ConnectedHomeSettings; + DatasetArn?: string; } /** * @public + * @enum */ -export interface CreateStreamProcessorRequest { - /** - *

    Kinesis video stream stream that provides the source streaming video. If you are using the AWS CLI, the parameter name is StreamProcessorInput. This is required for both face search and label detection stream processors.

    - */ - Input: StreamProcessorInput | undefined; - - /** - *

    Kinesis data stream stream or Amazon S3 bucket location to which Amazon Rekognition Video puts the analysis results. If you are using the AWS CLI, the parameter name is StreamProcessorOutput. - * This must be a S3Destination of an Amazon S3 bucket that you own for a label detection stream processor or a Kinesis data stream ARN for a face search stream processor.

    - */ - Output: StreamProcessorOutput | undefined; - - /** - *

    An identifier you assign to the stream processor. You can use Name to - * manage the stream processor. For example, you can get the current status of the stream processor by calling DescribeStreamProcessor. - * Name is idempotent. This is required for both face search and label detection stream processors. - *

    - */ - Name: string | undefined; - - /** - *

    Input parameters used in a streaming video analyzed by a stream processor. You can use FaceSearch to recognize faces in a streaming video, or you can use ConnectedHome to detect labels.

    - */ - Settings: StreamProcessorSettings | undefined; - - /** - *

    The Amazon Resource Number (ARN) of the IAM role that allows access to the stream processor. - * The IAM role provides Rekognition read permissions for a Kinesis stream. - * It also provides write permissions to an Amazon S3 bucket and Amazon Simple Notification Service topic for a label detection stream processor. This is required for both face search and label detection stream processors.

    - */ - RoleArn: string | undefined; +export const DatasetType = { + TEST: "TEST", + TRAIN: "TRAIN", +} as const; - /** - *

    A set of tags (key-value pairs) that you want to attach to the stream processor.

    - */ - Tags?: Record; +/** + * @public + */ +export type DatasetType = (typeof DatasetType)[keyof typeof DatasetType]; +/** + * @public + */ +export interface CreateDatasetRequest { /** - *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    - *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition - * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, - * one for a person at second 2 and one for a pet at second 4.

    - *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + *

    + * The source files for the dataset. You can specify the ARN of an existing dataset or specify the Amazon S3 bucket location + * of an Amazon Sagemaker format manifest file. If you don't specify datasetSource, an empty dataset is created. + * To add labeled images to the dataset, You can use the console or call UpdateDatasetEntries. + * + *

    */ - NotificationChannel?: StreamProcessorNotificationChannel; + DatasetSource?: DatasetSource; /** *

    - * The identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor. - * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. - * The key is used to encrypt results and data published to your Amazon S3 bucket, which includes image frames and hero images. Your source images are unaffected. - *

    - *

    - *

    + * The type of the dataset. Specify train to create a training dataset. Specify test + * to create a test dataset. + *

    */ - KmsKeyId?: string; + DatasetType: DatasetType | string | undefined; /** *

    - * Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest, and each region has either a polygon or a bounding box. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor. - *

    + * The ARN of the Amazon Rekognition Custom Labels project to which you want to asssign the dataset. + *

    */ - RegionsOfInterest?: RegionOfInterest[]; + ProjectArn: string | undefined; +} +/** + * @public + */ +export interface CreateDatasetResponse { /** *

    - * Shows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. - * Note that if you opt out at the account level this setting is ignored on individual streams. - *

    + * The ARN of the created Amazon Rekognition Custom Labels dataset. + *

    */ - DataSharingPreference?: StreamProcessorDataSharingPreference; + DatasetArn?: string; } /** * @public + *

    Contains settings that specify the location of an Amazon S3 bucket used + * to store the output of a Face Liveness session. Note that the S3 bucket must be located + * in the caller's AWS account and in the same region as the Face Liveness end-point. Additionally, the Amazon S3 object keys are + * auto-generated by the Face Liveness system.

    */ -export interface CreateStreamProcessorResponse { +export interface LivenessOutputConfig { /** - *

    Amazon Resource Number for the newly created stream processor.

    + *

    The path to an AWS Amazon S3 bucket used to store Face Liveness session results.

    */ - StreamProcessorArn?: string; + S3Bucket: string | undefined; + + /** + *

    The prefix prepended to the output files for the Face Liveness session results.

    + */ + S3KeyPrefix?: string; } /** * @public - *

    Information about where an object (DetectCustomLabels) or text (DetectText) is located on an image.

    + *

    A session settings object. It contains settings for the operation + * to be performed. It accepts arguments for OutputConfig and AuditImagesLimit.

    */ -export interface Geometry { +export interface CreateFaceLivenessSessionRequestSettings { /** - *

    An axis-aligned coarse representation of the detected item's location on the - * image.

    + *

    Can specify the location of an Amazon S3 bucket, where reference and audit images will be + * stored. Note that the Amazon S3 bucket must be located in the caller's AWS account and in the + * same region as the Face Liveness end-point. Additionally, the Amazon S3 object keys are + * auto-generated by the Face Liveness system. Requires that the caller has the + * s3:PutObject permission on the Amazon S3 bucket.

    */ - BoundingBox?: BoundingBox; + OutputConfig?: LivenessOutputConfig; /** - *

    Within the bounding box, a fine-grained polygon around the detected item.

    + *

    Number of audit images to be returned back. Takes an integer between 0-4. Any integer less + * than 0 will return 0, any integer above 4 will return 4 images in the response. By default, it + * is set to 0. The limit is best effort and is based on the actual duration of the + * selfie-video.

    */ - Polygon?: Point[]; + AuditImagesLimit?: number; } /** * @public - *

    A custom label detected in an image by a call to DetectCustomLabels.

    */ -export interface CustomLabel { +export interface CreateFaceLivenessSessionRequest { /** - *

    The name of the custom label.

    + *

    The identifier for your AWS Key Management Service key (AWS KMS key). + * Used to encrypt audit images and reference images.

    */ - Name?: string; + KmsKeyId?: string; /** - *

    The confidence that the model has in the detection of the custom label. The - * range is 0-100. A higher value indicates a higher confidence.

    + *

    A session settings object. It contains settings for the operation to be performed. For + * Face Liveness, it accepts OutputConfig and AuditImagesLimit.

    */ - Confidence?: number; + Settings?: CreateFaceLivenessSessionRequestSettings; /** - *

    The location of the detected object on the image that corresponds to the custom label. - * Includes an axis aligned coarse bounding box surrounding the object and a finer grain polygon - * for more accurate spatial information.

    + *

    Idempotent token is used to recognize the Face Liveness request. If the same token is used + * with multiple CreateFaceLivenessSession requests, the same session is returned. + * This token is employed to avoid unintentionally creating the same session multiple + * times.

    */ - Geometry?: Geometry; + ClientRequestToken?: string; } /** * @public - *

    - * Describes updates or additions to a dataset. A Single update or addition - * is an entry (JSON Line) that provides information about a single image. To update an existing entry, - * you match the source-ref field of the update entry with the source-ref filed of the entry that you want to update. - * If the source-ref field doesn't match an existing entry, the entry is added to dataset as a new entry.

    */ -export interface DatasetChanges { +export interface CreateFaceLivenessSessionResponse { /** - *

    A Base64-encoded binary data object - * containing one or JSON lines that either update the dataset or are additions to the dataset. You change a dataset by calling UpdateDatasetEntries. - * If you are using an AWS SDK to call UpdateDatasetEntries, you don't need to encode Changes as the SDK encodes the data for you. - * - *

    - *

    For example JSON lines, - * see Image-Level labels in manifest files and - * and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. - *

    + *

    A unique 128-bit UUID identifying a Face Liveness session.

    */ - GroundTruth: Uint8Array | undefined; + SessionId: string | undefined; } /** * @public - *

    - * Provides statistics about a dataset. For more information, see DescribeDataset. - * - *

    */ -export interface DatasetStats { - /** - *

    - * The total number of images in the dataset that have labels. - *

    - */ - LabeledEntries?: number; - - /** - *

    - * The total number of images in the dataset. - *

    - */ - TotalEntries?: number; - - /** - *

    - * The total number of labels declared in the dataset. - *

    - */ - TotalLabels?: number; - +export interface CreateProjectRequest { /** - *

    - * The total number of entries that contain at least one error. - *

    + *

    The name of the project to create.

    */ - ErrorEntries?: number; + ProjectName: string | undefined; } /** * @public - * @enum */ -export const DatasetStatus = { - CREATE_COMPLETE: "CREATE_COMPLETE", - CREATE_FAILED: "CREATE_FAILED", - CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", - DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", - UPDATE_COMPLETE: "UPDATE_COMPLETE", - UPDATE_FAILED: "UPDATE_FAILED", - UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", -} as const; +export interface CreateProjectResponse { + /** + *

    The Amazon Resource Name (ARN) of the new project. You can use the ARN to + * configure IAM access to the project.

    + */ + ProjectArn?: string; +} /** * @public + *

    The dataset used for testing. Optionally, if AutoCreate is set, Amazon Rekognition Custom Labels uses the + * training dataset to create a test dataset with a temporary split of the training dataset.

    */ -export type DatasetStatus = (typeof DatasetStatus)[keyof typeof DatasetStatus]; +export interface TestingData { + /** + *

    The assets used for testing.

    + */ + Assets?: Asset[]; + + /** + *

    If specified, Amazon Rekognition Custom Labels temporarily splits the training dataset (80%) to create a test dataset (20%) for the training job. + * After training completes, the test dataset is not stored and the training dataset reverts to its previous size.

    + */ + AutoCreate?: boolean; +} /** * @public - * @enum + *

    The dataset used for training.

    */ -export const DatasetStatusMessageCode = { - CLIENT_ERROR: "CLIENT_ERROR", - SERVICE_ERROR: "SERVICE_ERROR", - SUCCESS: "SUCCESS", -} as const; +export interface TrainingData { + /** + *

    A Sagemaker GroundTruth manifest file that contains the training images (assets).

    + */ + Assets?: Asset[]; +} /** * @public */ -export type DatasetStatusMessageCode = (typeof DatasetStatusMessageCode)[keyof typeof DatasetStatusMessageCode]; +export interface CreateProjectVersionRequest { + /** + *

    The ARN of the Amazon Rekognition Custom Labels project that + * manages the model that you want to train.

    + */ + ProjectArn: string | undefined; -/** - * @public - *

    - * A description for a dataset. For more information, see DescribeDataset.

    - *

    The status fields Status, StatusMessage, and StatusMessageCode - * reflect the last operation on the dataset. - *

    - */ -export interface DatasetDescription { /** - *

    - * The Unix timestamp for the time and date that the dataset was created. - *

    + *

    A name for the version of the model. This value must be unique.

    */ - CreationTimestamp?: Date; + VersionName: string | undefined; /** - *

    - * The Unix timestamp for the date and time that the dataset was last updated. - *

    + *

    The Amazon S3 bucket location to store the results of training. + * The S3 bucket can be in any AWS account as long as the caller has + * s3:PutObject permissions on the S3 bucket.

    */ - LastUpdatedTimestamp?: Date; + OutputConfig: OutputConfig | undefined; /** - *

    - * The status of the dataset. - *

    + *

    Specifies an external manifest that the services uses to train the model. + * If you specify TrainingData you must also specify TestingData. + * The project must not have any associated datasets. + *

    */ - Status?: DatasetStatus | string; + TrainingData?: TrainingData; /** - *

    - * The status message for the dataset. - *

    + *

    Specifies an external manifest that the service uses to test the model. + * If you specify TestingData you must also specify TrainingData. + * The project must not have any associated datasets.

    */ - StatusMessage?: string; + TestingData?: TestingData; /** - *

    - * The status message code for the dataset operation. If a service error occurs, try the - * API call again later. If a client error occurs, check the input parameters to the dataset - * API call that failed. - *

    + *

    A set of tags (key-value pairs) that you want to attach to the model.

    */ - StatusMessageCode?: DatasetStatusMessageCode | string; + Tags?: Record; /** - *

    - * The status message code for the dataset. - *

    + *

    The identifier for your AWS Key Management Service key (AWS KMS key). + * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, + * an alias for your KMS key, or an alias ARN. + * The key is used to encrypt training and test images copied into the service for model training. + * Your source images are unaffected. The key is also used to encrypt training results + * and manifest files written to the output Amazon S3 bucket (OutputConfig).

    + *

    If you choose to use your own KMS key, you need the following permissions on the KMS key.

    + *
      + *
    • + *

      kms:CreateGrant

      + *
    • + *
    • + *

      kms:DescribeKey

      + *
    • + *
    • + *

      kms:GenerateDataKey

      + *
    • + *
    • + *

      kms:Decrypt

      + *
    • + *
    + *

    If you don't specify a value for KmsKeyId, images copied into the service are encrypted + * using a key that AWS owns and manages.

    */ - DatasetStats?: DatasetStats; + KmsKeyId?: string; } /** * @public - *

    - * Statistics about a label used in a dataset. For more information, see DatasetLabelDescription. - *

    */ -export interface DatasetLabelStats { - /** - *

    - * The total number of images that use the label. - *

    - */ - EntryCount?: number; - +export interface CreateProjectVersionResponse { /** - *

    - * The total number of images that have the label assigned to a bounding box. - *

    + *

    The ARN of the model version that was created. Use DescribeProjectVersion + * to get the current status of the training operation.

    */ - BoundingBoxCount?: number; + ProjectVersionArn?: string; } /** * @public *

    - * Describes a dataset label. For more information, see ListDatasetLabels. - *

    + * Allows you to opt in or opt out to share data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. + * Note that if you opt out at the account level this setting is ignored on individual streams. + * + *

    */ -export interface DatasetLabelDescription { - /** - *

    - * The name of the label. - *

    - */ - LabelName?: string; - +export interface StreamProcessorDataSharingPreference { /** *

    - * Statistics about the label. - *

    + * If this option is set to true, you choose to share data with Rekognition to improve model performance. + *

    */ - LabelStats?: DatasetLabelStats; + OptIn: boolean | undefined; } /** * @public - *

    - * Summary information for an Amazon Rekognition Custom Labels dataset. For more information, see - * ProjectDescription. - *

    + *

    Kinesis video stream stream that provides the source streaming video for a Amazon Rekognition Video stream processor. For more information, see + * CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    */ -export interface DatasetMetadata { +export interface KinesisVideoStream { /** - *

    - * The Unix timestamp for the date and time that the dataset was created. - *

    + *

    ARN of the Kinesis video stream stream that streams the source video.

    */ - CreationTimestamp?: Date; + Arn?: string; +} +/** + * @public + *

    Information about the source streaming video.

    + */ +export interface StreamProcessorInput { /** - *

    - * The type of the dataset. - *

    + *

    The Kinesis video stream input stream for the source streaming video.

    */ - DatasetType?: DatasetType | string; + KinesisVideoStream?: KinesisVideoStream; +} +/** + * @public + *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    + *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition + * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, + * one for a person at second 2 and one for a pet at second 4.

    + *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + */ +export interface StreamProcessorNotificationChannel { /** *

    - * The Amazon Resource Name (ARN) for the dataset. - *

    + * The Amazon Resource Number (ARN) of the Amazon Amazon Simple Notification Service topic to which Amazon Rekognition posts the completion status. + *

    */ - DatasetArn?: string; + SNSTopicArn: string | undefined; +} +/** + * @public + *

    The Kinesis data stream Amazon Rekognition to which the analysis results of a Amazon Rekognition stream processor are streamed. For more information, see + * CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    + */ +export interface KinesisDataStream { /** - *

    - * The status for the dataset. - *

    + *

    ARN of the output Amazon Kinesis Data Streams stream.

    */ - Status?: DatasetStatus | string; + Arn?: string; +} +/** + * @public + *

    + * The Amazon S3 bucket location to which Amazon Rekognition publishes the detailed inference results of a video analysis operation. + * These results include the name of the stream processor resource, the session ID of the stream processing session, + * and labeled timestamps and bounding boxes for detected labels. + *

    + */ +export interface S3Destination { /** *

    - * The status message for the dataset. - *

    + * The name of the Amazon S3 bucket you want to associate with the streaming video project. You must be the owner of the Amazon S3 bucket. + *

    */ - StatusMessage?: string; + Bucket?: string; /** *

    - * The status message code for the dataset operation. If a service error occurs, try the - * API call again later. If a client error occurs, check the input parameters to the dataset - * API call that failed. - *

    + * The prefix value of the location within the bucket that you want the information to be published to. + * For more information, see Using prefixes. + *

    */ - StatusMessageCode?: DatasetStatusMessageCode | string; + KeyPrefix?: string; } /** * @public + *

    Information about the Amazon Kinesis Data Streams stream to which a Amazon Rekognition Video stream processor streams the results of a video analysis. For more + * information, see CreateStreamProcessor in the Amazon Rekognition Developer Guide.

    */ -export interface DeleteCollectionRequest { +export interface StreamProcessorOutput { /** - *

    ID of the collection to delete.

    + *

    The Amazon Kinesis Data Streams stream to which the Amazon Rekognition stream processor streams the analysis results.

    */ - CollectionId: string | undefined; -} + KinesisDataStream?: KinesisDataStream; -/** - * @public - */ -export interface DeleteCollectionResponse { /** - *

    HTTP status code that indicates the result of the operation.

    + *

    + * The Amazon S3 bucket location to which Amazon Rekognition publishes the detailed inference results of a video analysis operation. + *

    */ - StatusCode?: number; + S3Destination?: S3Destination; } /** * @public + *

    The X and Y coordinates of a point on an image or video frame. The X and Y values are + * ratios of the overall image size or video resolution. For example, if an input image is + * 700x200 and the values are X=0.5 and Y=0.25, then the point is at the (350,50) pixel + * coordinate on the image.

    + *

    An array of Point objects makes up a Polygon. A + * Polygon is returned by DetectText and by DetectCustomLabels + * Polygon represents a fine-grained polygon around a detected item. For more + * information, see Geometry in the Amazon Rekognition Developer Guide.

    */ -export interface DeleteDatasetRequest { +export interface Point { + /** + *

    The value of the X coordinate for a point on a Polygon.

    + */ + X?: number; + /** - *

    - * The ARN of the Amazon Rekognition Custom Labels dataset that you want to delete. - *

    + *

    The value of the Y coordinate for a point on a Polygon.

    */ - DatasetArn: string | undefined; + Y?: number; } /** * @public + *

    Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a BoundingBox + * or Polygon to set a region of the screen.

    + *

    A word, face, or label is included in the region if it is more than half in that region. If there is more than + * one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region + * is kept in the results.

    */ -export interface DeleteDatasetResponse {} - -/** - * @public - */ -export interface DeleteFacesRequest { +export interface RegionOfInterest { /** - *

    Collection from which to remove the specific faces.

    + *

    The box representing a region of interest on screen.

    */ - CollectionId: string | undefined; + BoundingBox?: BoundingBox; /** - *

    An array of face IDs to delete.

    + *

    + * Specifies a shape made up of up to 10 Point objects to define a region of interest. + *

    */ - FaceIds: string[] | undefined; + Polygon?: Point[]; } /** * @public + *

    Input face recognition parameters for an Amazon Rekognition stream processor. + * Includes the collection to use for face recognition and the face attributes to detect. + * Defining the settings is required in the request parameter for CreateStreamProcessor.

    */ -export interface DeleteFacesResponse { +export interface FaceSearchSettings { /** - *

    An array of strings (face IDs) of the faces that were deleted.

    + *

    The ID of a collection that contains faces that you want to search for.

    */ - DeletedFaces?: string[]; -} + CollectionId?: string; -/** - * @public - */ -export interface DeleteProjectRequest { /** - *

    The Amazon Resource Name (ARN) of the project that you want to delete.

    + *

    Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80. + * 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.

    */ - ProjectArn: string | undefined; + FaceMatchThreshold?: number; } /** * @public - * @enum - */ -export const ProjectStatus = { - CREATED: "CREATED", - CREATING: "CREATING", - DELETING: "DELETING", -} as const; - -/** - * @public + *

    Input parameters used in a streaming video analyzed by a Amazon Rekognition stream processor. + * You can use FaceSearch to recognize faces in a streaming video, or you can use ConnectedHome to detect labels.

    */ -export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus]; +export interface StreamProcessorSettings { + /** + *

    Face search settings to use on a streaming video.

    + */ + FaceSearch?: FaceSearchSettings; -/** - * @public - */ -export interface DeleteProjectResponse { /** - *

    The current status of the delete project operation.

    + *

    + * Label detection settings to use on a streaming video. Defining the settings is required in the request parameter for CreateStreamProcessor. + * Including this setting in the CreateStreamProcessor request enables you to use the stream processor for label detection. + * You can then select what you want the stream processor to detect, such as people or pets. When the stream processor has started, one notification + * is sent for each object class specified. For example, if packages and pets are selected, one SNS notification is published the first time a package is detected + * and one SNS notification is published the first time a pet is detected, as well as an end-of-session summary. + *

    */ - Status?: ProjectStatus | string; + ConnectedHome?: ConnectedHomeSettings; } /** * @public */ -export interface DeleteProjectPolicyRequest { +export interface CreateStreamProcessorRequest { /** - *

    The Amazon Resource Name (ARN) of the project that the project policy you want to delete is attached to.

    + *

    Kinesis video stream stream that provides the source streaming video. If you are using the AWS CLI, the parameter name is StreamProcessorInput. This is required for both face search and label detection stream processors.

    */ - ProjectArn: string | undefined; + Input: StreamProcessorInput | undefined; /** - *

    The name of the policy that you want to delete.

    + *

    Kinesis data stream stream or Amazon S3 bucket location to which Amazon Rekognition Video puts the analysis results. If you are using the AWS CLI, the parameter name is StreamProcessorOutput. + * This must be a S3Destination of an Amazon S3 bucket that you own for a label detection stream processor or a Kinesis data stream ARN for a face search stream processor.

    */ - PolicyName: string | undefined; + Output: StreamProcessorOutput | undefined; /** - *

    The ID of the project policy revision that you want to delete.

    + *

    An identifier you assign to the stream processor. You can use Name to + * manage the stream processor. For example, you can get the current status of the stream processor by calling DescribeStreamProcessor. + * Name is idempotent. This is required for both face search and label detection stream processors. + *

    */ - PolicyRevisionId?: string; -} - -/** - * @public - */ -export interface DeleteProjectPolicyResponse {} + Name: string | undefined; -/** - * @public - *

    The supplied revision id for the project policy is invalid.

    - */ -export class InvalidPolicyRevisionIdException extends __BaseException { - readonly name: "InvalidPolicyRevisionIdException" = "InvalidPolicyRevisionIdException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; /** - *

    A universally unique identifier (UUID) for the request.

    + *

    Input parameters used in a streaming video analyzed by a stream processor. You can use FaceSearch to recognize faces in a streaming video, or you can use ConnectedHome to detect labels.

    */ - Logref?: string; + Settings: StreamProcessorSettings | undefined; + /** - * @internal + *

    The Amazon Resource Number (ARN) of the IAM role that allows access to the stream processor. + * The IAM role provides Rekognition read permissions for a Kinesis stream. + * It also provides write permissions to an Amazon S3 bucket and Amazon Simple Notification Service topic for a label detection stream processor. This is required for both face search and label detection stream processors.

    */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidPolicyRevisionIdException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidPolicyRevisionIdException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} + RoleArn: string | undefined; -/** - * @public - */ -export interface DeleteProjectVersionRequest { /** - *

    The Amazon Resource Name (ARN) of the model version that you want to delete.

    + *

    A set of tags (key-value pairs) that you want to attach to the stream processor.

    */ - ProjectVersionArn: string | undefined; -} + Tags?: Record; -/** - * @public - * @enum - */ -export const ProjectVersionStatus = { - COPYING_COMPLETED: "COPYING_COMPLETED", - COPYING_FAILED: "COPYING_FAILED", - COPYING_IN_PROGRESS: "COPYING_IN_PROGRESS", - DELETING: "DELETING", - FAILED: "FAILED", - RUNNING: "RUNNING", - STARTING: "STARTING", - STOPPED: "STOPPED", - STOPPING: "STOPPING", - TRAINING_COMPLETED: "TRAINING_COMPLETED", - TRAINING_FAILED: "TRAINING_FAILED", - TRAINING_IN_PROGRESS: "TRAINING_IN_PROGRESS", -} as const; + /** + *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    + *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition + * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, + * one for a person at second 2 and one for a pet at second 4.

    + *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + */ + NotificationChannel?: StreamProcessorNotificationChannel; -/** - * @public - */ -export type ProjectVersionStatus = (typeof ProjectVersionStatus)[keyof typeof ProjectVersionStatus]; + /** + *

    + * The identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor. + * You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. + * The key is used to encrypt results and data published to your Amazon S3 bucket, which includes image frames and hero images. Your source images are unaffected. + *

    + *

    + *

    + */ + KmsKeyId?: string; -/** - * @public - */ -export interface DeleteProjectVersionResponse { /** - *

    The status of the deletion operation.

    + *

    + * Specifies locations in the frames where Amazon Rekognition checks for objects or people. You can specify up to 10 regions of interest, and each region has either a polygon or a bounding box. This is an optional parameter for label detection stream processors and should not be used to create a face search stream processor. + *

    */ - Status?: ProjectVersionStatus | string; -} + RegionsOfInterest?: RegionOfInterest[]; -/** - * @public - */ -export interface DeleteStreamProcessorRequest { /** - *

    The name of the stream processor you want to delete.

    + *

    + * Shows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. + * Note that if you opt out at the account level this setting is ignored on individual streams. + *

    */ - Name: string | undefined; + DataSharingPreference?: StreamProcessorDataSharingPreference; } /** * @public */ -export interface DeleteStreamProcessorResponse {} - -/** - * @public - */ -export interface DescribeCollectionRequest { +export interface CreateStreamProcessorResponse { /** - *

    The ID of the collection to describe.

    + *

    Amazon Resource Number for the newly created stream processor.

    */ - CollectionId: string | undefined; + StreamProcessorArn?: string; } /** * @public */ -export interface DescribeCollectionResponse { - /** - *

    The number of faces that are indexed into the collection. To index faces into a - * collection, use IndexFaces.

    - */ - FaceCount?: number; - +export interface CreateUserRequest { /** - *

    The version of the face model that's used by the collection for face detection.

    - *

    For more information, see Model versioning in the - * Amazon Rekognition Developer Guide.

    + *

    The ID of an existing collection to which the new UserID needs to be created.

    */ - FaceModelVersion?: string; + CollectionId: string | undefined; /** - *

    The Amazon Resource Name (ARN) of the collection.

    + *

    ID for the UserID to be created. This ID needs to be unique within the collection.

    */ - CollectionARN?: string; + UserId: string | undefined; /** - *

    The number of milliseconds since the Unix epoch time until the creation of the collection. - * The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.

    + *

    Idempotent token used to identify the request to CreateUser. If you use the + * same token with multiple CreateUser requests, the same response is returned. + * Use ClientRequestToken to prevent the same request from being processed more than + * once.

    */ - CreationTimestamp?: Date; + ClientRequestToken?: string; } /** * @public */ -export interface DescribeDatasetRequest { - /** - *

    - * The Amazon Resource Name (ARN) of the dataset that you want to describe. - *

    - */ - DatasetArn: string | undefined; -} +export interface CreateUserResponse {} /** * @public + *

    Information about where an object (DetectCustomLabels) or text (DetectText) is located on an image.

    */ -export interface DescribeDatasetResponse { +export interface Geometry { /** - *

    - * The description for the dataset. - *

    + *

    An axis-aligned coarse representation of the detected item's location on the + * image.

    */ - DatasetDescription?: DatasetDescription; + BoundingBox?: BoundingBox; + + /** + *

    Within the bounding box, a fine-grained polygon around the detected item.

    + */ + Polygon?: Point[]; } /** * @public + *

    A custom label detected in an image by a call to DetectCustomLabels.

    */ -export interface DescribeProjectsRequest { +export interface CustomLabel { /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination - * token to retrieve the next set of results.

    + *

    The name of the custom label.

    */ - NextToken?: string; + Name?: string; /** - *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. - * If you specify a value greater than 100, a ValidationException - * error occurs. The default value is 100.

    + *

    The confidence that the model has in the detection of the custom label. The + * range is 0-100. A higher value indicates a higher confidence.

    */ - MaxResults?: number; + Confidence?: number; /** - *

    A list of the projects that you want Amazon Rekognition Custom Labels to describe. If you don't specify a value, - * the response includes descriptions for all the projects in your AWS account.

    + *

    The location of the detected object on the image that corresponds to the custom label. + * Includes an axis aligned coarse bounding box surrounding the object and a finer grain polygon + * for more accurate spatial information.

    */ - ProjectNames?: string[]; + Geometry?: Geometry; } /** * @public - *

    A description of an Amazon Rekognition Custom Labels project. For more information, see DescribeProjects.

    + *

    + * Describes updates or additions to a dataset. A Single update or addition + * is an entry (JSON Line) that provides information about a single image. To update an existing entry, + * you match the source-ref field of the update entry with the source-ref filed of the entry that you want to update. + * If the source-ref field doesn't match an existing entry, the entry is added to dataset as a new entry.

    */ -export interface ProjectDescription { +export interface DatasetChanges { /** - *

    The Amazon Resource Name (ARN) of the project.

    + *

    A Base64-encoded binary data object + * containing one or JSON lines that either update the dataset or are additions to the dataset. You change a dataset by calling UpdateDatasetEntries. + * If you are using an AWS SDK to call UpdateDatasetEntries, you don't need to encode Changes as the SDK encodes the data for you. + * + *

    + *

    For example JSON lines, + * see Image-Level labels in manifest files and + * and Object localization in manifest files in the Amazon Rekognition Custom Labels Developer Guide. + *

    */ - ProjectArn?: string; + GroundTruth: Uint8Array | undefined; +} +/** + * @public + *

    + * Provides statistics about a dataset. For more information, see DescribeDataset. + * + *

    + */ +export interface DatasetStats { /** - *

    The Unix timestamp for the date and time that the project was created.

    + *

    + * The total number of images in the dataset that have labels. + *

    */ - CreationTimestamp?: Date; + LabeledEntries?: number; /** - *

    The current status of the project.

    + *

    + * The total number of images in the dataset. + *

    */ - Status?: ProjectStatus | string; + TotalEntries?: number; /** *

    - * Information about the training and test datasets in the project. + * The total number of labels declared in the dataset. + *

    + */ + TotalLabels?: number; + + /** + *

    + * The total number of entries that contain at least one error. *

    */ - Datasets?: DatasetMetadata[]; + ErrorEntries?: number; } /** * @public + * @enum */ -export interface DescribeProjectsResponse { - /** - *

    A list of project descriptions. The list is sorted by the date and time the projects are created.

    - */ - ProjectDescriptions?: ProjectDescription[]; +export const DatasetStatus = { + CREATE_COMPLETE: "CREATE_COMPLETE", + CREATE_FAILED: "CREATE_FAILED", + CREATE_IN_PROGRESS: "CREATE_IN_PROGRESS", + DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS", + UPDATE_COMPLETE: "UPDATE_COMPLETE", + UPDATE_FAILED: "UPDATE_FAILED", + UPDATE_IN_PROGRESS: "UPDATE_IN_PROGRESS", +} as const; - /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. - * You can use this pagination token to retrieve the next set of results.

    - */ - NextToken?: string; -} +/** + * @public + */ +export type DatasetStatus = (typeof DatasetStatus)[keyof typeof DatasetStatus]; /** * @public - *

    Pagination token in the request is not valid.

    + * @enum */ -export class InvalidPaginationTokenException extends __BaseException { - readonly name: "InvalidPaginationTokenException" = "InvalidPaginationTokenException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; - /** - *

    A universally unique identifier (UUID) for the request.

    - */ - Logref?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidPaginationTokenException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidPaginationTokenException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} +export const DatasetStatusMessageCode = { + CLIENT_ERROR: "CLIENT_ERROR", + SERVICE_ERROR: "SERVICE_ERROR", + SUCCESS: "SUCCESS", +} as const; /** * @public */ -export interface DescribeProjectVersionsRequest { - /** - *

    The Amazon Resource Name (ARN) of the project that contains the models you want to describe.

    - */ - ProjectArn: string | undefined; +export type DatasetStatusMessageCode = (typeof DatasetStatusMessageCode)[keyof typeof DatasetStatusMessageCode]; +/** + * @public + *

    + * A description for a dataset. For more information, see DescribeDataset.

    + *

    The status fields Status, StatusMessage, and StatusMessageCode + * reflect the last operation on the dataset. + *

    + */ +export interface DatasetDescription { /** - *

    A list of model version names that you want to describe. You can add up to 10 model version names - * to the list. If you don't specify a value, all model descriptions are returned. A version name is part of a - * model (ProjectVersion) ARN. For example, my-model.2020-01-21T09.10.15 is the version name in the following ARN. - * arn:aws:rekognition:us-east-1:123456789012:project/getting-started/version/my-model.2020-01-21T09.10.15/1234567890123.

    + *

    + * The Unix timestamp for the time and date that the dataset was created. + *

    */ - VersionNames?: string[]; + CreationTimestamp?: Date; /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. - * You can use this pagination token to retrieve the next set of results.

    + *

    + * The Unix timestamp for the date and time that the dataset was last updated. + *

    */ - NextToken?: string; + LastUpdatedTimestamp?: Date; /** - *

    The maximum number of results to return per paginated call. - * The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException - * error occurs. The default value is 100.

    + *

    + * The status of the dataset. + *

    */ - MaxResults?: number; -} + Status?: DatasetStatus | string; -/** - * @public - *

    The S3 bucket that contains the training summary. The training summary includes - * aggregated evaluation metrics for the entire testing dataset and metrics for each - * individual label.

    - *

    You get the training summary S3 bucket location by calling DescribeProjectVersions. - *

    - */ -export interface Summary { /** - *

    Provides the S3 bucket name and object name.

    - *

    The region for the S3 bucket containing the S3 object must match the region you use for - * Amazon Rekognition operations.

    - *

    For Amazon Rekognition to process an S3 object, the user must have permission to - * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the - * Amazon Rekognition Developer Guide.

    + *

    + * The status message for the dataset. + *

    */ - S3Object?: S3Object; -} + StatusMessage?: string; -/** - * @public - *

    The evaluation results for the training of a model.

    - */ -export interface EvaluationResult { /** - *

    The F1 score for the evaluation of all labels. The F1 score metric evaluates the overall precision - * and recall performance of the model as a single value. A higher value indicates better precision - * and recall performance. A lower score indicates that precision, recall, or both are performing poorly. - * - *

    + *

    + * The status message code for the dataset operation. If a service error occurs, try the + * API call again later. If a client error occurs, check the input parameters to the dataset + * API call that failed. + *

    */ - F1Score?: number; + StatusMessageCode?: DatasetStatusMessageCode | string; /** - *

    The S3 bucket that contains the training summary.

    + *

    + * The status message code for the dataset. + *

    */ - Summary?: Summary; + DatasetStats?: DatasetStats; } /** * @public - *

    Contains the Amazon S3 bucket location of the validation data for a model training job.

    - *

    The validation data includes error information for individual JSON Lines in the dataset. - * For more information, see Debugging a Failed Model Training in the - * Amazon Rekognition Custom Labels Developer Guide.

    - *

    You get the ValidationData object for the training dataset (TrainingDataResult) - * and the test dataset (TestingDataResult) by calling DescribeProjectVersions.

    - *

    The assets array contains a single Asset object. - * The GroundTruthManifest field of the Asset object contains the S3 bucket location of - * the validation data. + *

    + * Statistics about a label used in a dataset. For more information, see DatasetLabelDescription. *

    */ -export interface ValidationData { - /** - *

    The assets that comprise the validation data.

    - */ - Assets?: Asset[]; -} - -/** - * @public - *

    Sagemaker Groundtruth format manifest files for the input, output and validation datasets that are used and created during testing.

    - */ -export interface TestingDataResult { - /** - *

    The testing dataset that was supplied for training.

    - */ - Input?: TestingData; - +export interface DatasetLabelStats { /** - *

    The subset of the dataset that was actually tested. Some images (assets) might not be tested due to - * file formatting and other issues.

    + *

    + * The total number of images that use the label. + *

    */ - Output?: TestingData; + EntryCount?: number; /** - *

    The location of the data validation manifest. The data validation manifest is created for the test dataset during model training.

    + *

    + * The total number of images that have the label assigned to a bounding box. + *

    */ - Validation?: ValidationData; + BoundingBoxCount?: number; } /** * @public - *

    Sagemaker Groundtruth format manifest files for the input, output and validation datasets that are used and created during testing.

    + *

    + * Describes a dataset label. For more information, see ListDatasetLabels. + *

    */ -export interface TrainingDataResult { - /** - *

    The training assets that you supplied for training.

    - */ - Input?: TrainingData; - +export interface DatasetLabelDescription { /** - *

    The images (assets) that were actually trained by Amazon Rekognition Custom Labels.

    + *

    + * The name of the label. + *

    */ - Output?: TrainingData; + LabelName?: string; /** - *

    The location of the data validation manifest. The data validation manifest is created for the training dataset during model training.

    + *

    + * Statistics about the label. + *

    */ - Validation?: ValidationData; + LabelStats?: DatasetLabelStats; } /** * @public - *

    A description of a version of an Amazon Rekognition Custom Labels model.

    + *

    + * Summary information for an Amazon Rekognition Custom Labels dataset. For more information, see + * ProjectDescription. + *

    */ -export interface ProjectVersionDescription { +export interface DatasetMetadata { /** - *

    The Amazon Resource Name (ARN) of the model version.

    + *

    + * The Unix timestamp for the date and time that the dataset was created. + *

    */ - ProjectVersionArn?: string; + CreationTimestamp?: Date; /** - *

    The Unix datetime for the date and time that training started.

    + *

    + * The type of the dataset. + *

    */ - CreationTimestamp?: Date; + DatasetType?: DatasetType | string; /** - *

    The minimum number of inference units used by the model. For more information, - * see StartProjectVersion.

    + *

    + * The Amazon Resource Name (ARN) for the dataset. + *

    */ - MinInferenceUnits?: number; + DatasetArn?: string; /** - *

    The current status of the model version.

    + *

    + * The status for the dataset. + *

    */ - Status?: ProjectVersionStatus | string; + Status?: DatasetStatus | string; /** - *

    A descriptive message for an error or warning that occurred.

    + *

    + * The status message for the dataset. + *

    */ StatusMessage?: string; /** - *

    The duration, in seconds, that you were billed for a successful training of the model version. - * This value is only returned if the model version has been successfully trained.

    + *

    + * The status message code for the dataset operation. If a service error occurs, try the + * API call again later. If a client error occurs, check the input parameters to the dataset + * API call that failed. + *

    */ - BillableTrainingTimeInSeconds?: number; + StatusMessageCode?: DatasetStatusMessageCode | string; +} +/** + * @public + */ +export interface DeleteCollectionRequest { /** - *

    The Unix date and time that training of the model ended.

    + *

    ID of the collection to delete.

    */ - TrainingEndTimestamp?: Date; + CollectionId: string | undefined; +} +/** + * @public + */ +export interface DeleteCollectionResponse { /** - *

    The location where training results are saved.

    + *

    HTTP status code that indicates the result of the operation.

    */ - OutputConfig?: OutputConfig; + StatusCode?: number; +} +/** + * @public + */ +export interface DeleteDatasetRequest { /** - *

    Contains information about the training results.

    + *

    + * The ARN of the Amazon Rekognition Custom Labels dataset that you want to delete. + *

    */ - TrainingDataResult?: TrainingDataResult; + DatasetArn: string | undefined; +} - /** - *

    Contains information about the testing results.

    - */ - TestingDataResult?: TestingDataResult; +/** + * @public + */ +export interface DeleteDatasetResponse {} +/** + * @public + */ +export interface DeleteFacesRequest { /** - *

    The training results. EvaluationResult is only returned if training is successful.

    + *

    Collection from which to remove the specific faces.

    */ - EvaluationResult?: EvaluationResult; + CollectionId: string | undefined; /** - *

    The location of the summary manifest. The summary manifest provides aggregate data validation results for the training - * and test datasets.

    + *

    An array of face IDs to delete.

    */ - ManifestSummary?: GroundTruthManifest; + FaceIds: string[] | undefined; +} + +/** + * @public + * @enum + */ +export const UnsuccessfulFaceDeletionReason = { + ASSOCIATED_TO_AN_EXISTING_USER: "ASSOCIATED_TO_AN_EXISTING_USER", + FACE_NOT_FOUND: "FACE_NOT_FOUND", +} as const; + +/** + * @public + */ +export type UnsuccessfulFaceDeletionReason = + (typeof UnsuccessfulFaceDeletionReason)[keyof typeof UnsuccessfulFaceDeletionReason]; +/** + * @public + *

    Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully deleted.

    + */ +export interface UnsuccessfulFaceDeletion { /** - *

    The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training.

    + *

    A unique identifier assigned to the face.

    */ - KmsKeyId?: string; + FaceId?: string; /** - *

    The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. - * For more information, see StartProjectVersion.

    + *

    A provided ID for the UserID. Unique within the collection.

    */ - MaxInferenceUnits?: number; + UserId?: string; /** - *

    If the model version was copied from a different project, SourceProjectVersionArn contains the ARN of the source model version.

    + *

    The reason why the deletion was unsuccessful.

    */ - SourceProjectVersionArn?: string; + Reasons?: (UnsuccessfulFaceDeletionReason | string)[]; } /** * @public */ -export interface DescribeProjectVersionsResponse { +export interface DeleteFacesResponse { /** - *

    A list of model descriptions. The list is sorted by the creation date and time of - * the model versions, latest to earliest.

    + *

    An array of strings (face IDs) of the faces that were deleted.

    */ - ProjectVersionDescriptions?: ProjectVersionDescription[]; + DeletedFaces?: string[]; /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. - * You can use this pagination token to retrieve the next set of results.

    + *

    An array of any faces that weren't deleted.

    */ - NextToken?: string; + UnsuccessfulFaceDeletions?: UnsuccessfulFaceDeletion[]; } /** * @public */ -export interface DescribeStreamProcessorRequest { +export interface DeleteProjectRequest { /** - *

    Name of the stream processor for which you want information.

    + *

    The Amazon Resource Name (ARN) of the project that you want to delete.

    */ - Name: string | undefined; + ProjectArn: string | undefined; } /** * @public * @enum */ -export const StreamProcessorStatus = { - FAILED: "FAILED", - RUNNING: "RUNNING", - STARTING: "STARTING", - STOPPED: "STOPPED", - STOPPING: "STOPPING", - UPDATING: "UPDATING", +export const ProjectStatus = { + CREATED: "CREATED", + CREATING: "CREATING", + DELETING: "DELETING", } as const; /** * @public */ -export type StreamProcessorStatus = (typeof StreamProcessorStatus)[keyof typeof StreamProcessorStatus]; +export type ProjectStatus = (typeof ProjectStatus)[keyof typeof ProjectStatus]; /** * @public */ -export interface DescribeStreamProcessorResponse { +export interface DeleteProjectResponse { /** - *

    Name of the stream processor.

    + *

    The current status of the delete project operation.

    */ - Name?: string; + Status?: ProjectStatus | string; +} +/** + * @public + */ +export interface DeleteProjectPolicyRequest { /** - *

    ARN of the stream processor.

    + *

    The Amazon Resource Name (ARN) of the project that the project policy you want to delete is attached to.

    */ - StreamProcessorArn?: string; + ProjectArn: string | undefined; /** - *

    Current status of the stream processor.

    + *

    The name of the policy that you want to delete.

    */ - Status?: StreamProcessorStatus | string; + PolicyName: string | undefined; /** - *

    Detailed status message about the stream processor.

    + *

    The ID of the project policy revision that you want to delete.

    */ - StatusMessage?: string; + PolicyRevisionId?: string; +} + +/** + * @public + */ +export interface DeleteProjectPolicyResponse {} +/** + * @public + *

    The supplied revision id for the project policy is invalid.

    + */ +export class InvalidPolicyRevisionIdException extends __BaseException { + readonly name: "InvalidPolicyRevisionIdException" = "InvalidPolicyRevisionIdException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    Date and time the stream processor was created

    + *

    A universally unique identifier (UUID) for the request.

    */ - CreationTimestamp?: Date; + Logref?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidPolicyRevisionIdException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidPolicyRevisionIdException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} + +/** + * @public + */ +export interface DeleteProjectVersionRequest { + /** + *

    The Amazon Resource Name (ARN) of the model version that you want to delete.

    + */ + ProjectVersionArn: string | undefined; +} + +/** + * @public + * @enum + */ +export const ProjectVersionStatus = { + COPYING_COMPLETED: "COPYING_COMPLETED", + COPYING_FAILED: "COPYING_FAILED", + COPYING_IN_PROGRESS: "COPYING_IN_PROGRESS", + DELETING: "DELETING", + FAILED: "FAILED", + RUNNING: "RUNNING", + STARTING: "STARTING", + STOPPED: "STOPPED", + STOPPING: "STOPPING", + TRAINING_COMPLETED: "TRAINING_COMPLETED", + TRAINING_FAILED: "TRAINING_FAILED", + TRAINING_IN_PROGRESS: "TRAINING_IN_PROGRESS", +} as const; - /** - *

    The time, in Unix format, the stream processor was last updated. For example, when the stream - * processor moves from a running state to a failed state, or when the user starts or stops the stream processor.

    - */ - LastUpdateTimestamp?: Date; +/** + * @public + */ +export type ProjectVersionStatus = (typeof ProjectVersionStatus)[keyof typeof ProjectVersionStatus]; +/** + * @public + */ +export interface DeleteProjectVersionResponse { /** - *

    Kinesis video stream that provides the source streaming video.

    + *

    The status of the deletion operation.

    */ - Input?: StreamProcessorInput; + Status?: ProjectVersionStatus | string; +} +/** + * @public + */ +export interface DeleteStreamProcessorRequest { /** - *

    Kinesis data stream to which Amazon Rekognition Video puts the analysis results.

    + *

    The name of the stream processor you want to delete.

    */ - Output?: StreamProcessorOutput; + Name: string | undefined; +} - /** - *

    ARN of the IAM role that allows access to the stream processor.

    - */ - RoleArn?: string; +/** + * @public + */ +export interface DeleteStreamProcessorResponse {} +/** + * @public + */ +export interface DeleteUserRequest { /** - *

    Input parameters used in a streaming video analyzed by a stream processor. You can use FaceSearch to recognize faces - * in a streaming video, or you can use ConnectedHome to detect labels.

    + *

    The ID of an existing collection from which the UserID needs to be deleted.

    */ - Settings?: StreamProcessorSettings; + CollectionId: string | undefined; /** - *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    - *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition - * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, - * one for a person at second 2 and one for a pet at second 4.

    - *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + *

    ID for the UserID to be deleted.

    */ - NotificationChannel?: StreamProcessorNotificationChannel; + UserId: string | undefined; /** - *

    - * The identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors. - *

    + *

    Idempotent token used to identify the request to DeleteUser. If you use the + * same token with multiple DeleteUser requests, the same response is returned. + * Use ClientRequestToken to prevent the same request from being processed more than + * once.

    */ - KmsKeyId?: string; + ClientRequestToken?: string; +} - /** - *

    - * Specifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors. - *

    - */ - RegionsOfInterest?: RegionOfInterest[]; +/** + * @public + */ +export interface DeleteUserResponse {} +/** + * @public + */ +export interface DescribeCollectionRequest { /** - *

    - * Shows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. - * Note that if you opt out at the account level this setting is ignored on individual streams. - *

    + *

    The ID of the collection to describe.

    */ - DataSharingPreference?: StreamProcessorDataSharingPreference; + CollectionId: string | undefined; } /** * @public */ -export interface DetectCustomLabelsRequest { +export interface DescribeCollectionResponse { /** - *

    The ARN of the model version that you want to use.

    + *

    The number of faces that are indexed into the collection. To index faces into a + * collection, use IndexFaces.

    */ - ProjectVersionArn: string | undefined; + FaceCount?: number; /** - *

    Provides the input image either as bytes or an S3 object.

    - *

    You pass image bytes to an Amazon Rekognition API operation by using the Bytes - * property. For example, you would use the Bytes property to pass an image loaded - * from a local file system. Image bytes passed by using the Bytes property must be - * base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to - * call Amazon Rekognition API operations.

    - *

    For more information, see Analyzing an Image Loaded from a Local File System - * in the Amazon Rekognition Developer Guide.

    - *

    You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the - * S3Object property. Images stored in an S3 bucket do not need to be - * base64-encoded.

    - *

    The region for the S3 bucket containing the S3 object must match the region you use for - * Amazon Rekognition operations.

    - *

    If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the - * Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and - * then call the operation using the S3Object property.

    - *

    For Amazon Rekognition to process an S3 object, the user must have permission to - * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the - * Amazon Rekognition Developer Guide.

    + *

    The version of the face model that's used by the collection for face detection.

    + *

    For more information, see Model versioning in the + * Amazon Rekognition Developer Guide.

    */ - Image: Image | undefined; + FaceModelVersion?: string; /** - *

    Maximum number of results you want the service to return in the response. - * The service returns the specified number of highest confidence labels ranked from highest confidence - * to lowest.

    + *

    The Amazon Resource Name (ARN) of the collection.

    */ - MaxResults?: number; + CollectionARN?: string; /** - *

    Specifies the minimum confidence level for the labels to return. - * DetectCustomLabels doesn't return any labels with a confidence value that's lower than - * this specified value. If you specify a - * value of 0, DetectCustomLabels returns all labels, regardless of the assumed - * threshold applied to each label. - * If you don't specify a value for MinConfidence, DetectCustomLabels - * returns labels based on the assumed threshold of each label.

    + *

    The number of milliseconds since the Unix epoch time until the creation of the collection. + * The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.

    */ - MinConfidence?: number; -} + CreationTimestamp?: Date; -/** - * @public - */ -export interface DetectCustomLabelsResponse { /** - *

    An array of custom labels detected in the input image.

    + *

    The number of UserIDs assigned to the specified colleciton.

    */ - CustomLabels?: CustomLabel[]; + UserCount?: number; } /** * @public - *

    The requested resource isn't ready. For example, - * this exception occurs when you call DetectCustomLabels with a - * model version that isn't deployed.

    */ -export class ResourceNotReadyException extends __BaseException { - readonly name: "ResourceNotReadyException" = "ResourceNotReadyException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; - /** - *

    A universally unique identifier (UUID) for the request.

    - */ - Logref?: string; +export interface DescribeDatasetRequest { /** - * @internal + *

    + * The Amazon Resource Name (ARN) of the dataset that you want to describe. + *

    */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "ResourceNotReadyException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceNotReadyException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + DatasetArn: string | undefined; } /** * @public */ -export interface DetectFacesRequest { - /** - *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    - */ - Image: Image | undefined; - +export interface DescribeDatasetResponse { /** - *

    An array of facial attributes you want to be returned. A DEFAULT subset of - * facial attributes - BoundingBox, Confidence, Pose, - * Quality, and Landmarks - will always be returned. You can request - * for specific facial attributes (in addition to the default list) - by using ["DEFAULT", - * "FACE_OCCLUDED"] or just ["FACE_OCCLUDED"]. You can request for all - * facial attributes by using ["ALL"]. Requesting more attributes may increase - * response time.

    - *

    If you provide both, ["ALL", "DEFAULT"], the service uses a logical "AND" - * operator to determine which attributes to return (in this case, all attributes).

    + *

    + * The description for the dataset. + *

    */ - Attributes?: (Attribute | string)[]; + DatasetDescription?: DatasetDescription; } /** * @public */ -export interface DetectFacesResponse { +export interface DescribeProjectsRequest { /** - *

    Details of each face found in the image.

    + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

    */ - FaceDetails?: FaceDetail[]; + NextToken?: string; /** - *

    The value of OrientationCorrection is always null.

    - *

    If the input image is in .jpeg format, it might contain exchangeable image file format - * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation - * information to perform image correction. The bounding box coordinates are translated to - * represent object locations after the orientation information in the Exif metadata is used to - * correct the image orientation. Images in .png format don't contain Exif metadata.

    - *

    Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images - * without orientation information in the image Exif metadata. The bounding box coordinates - * aren't translated and represent the object locations before the image is rotated.

    + *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. + * If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

    */ - OrientationCorrection?: OrientationCorrection | string; + MaxResults?: number; + + /** + *

    A list of the projects that you want Amazon Rekognition Custom Labels to describe. If you don't specify a value, + * the response includes descriptions for all the projects in your AWS account.

    + */ + ProjectNames?: string[]; } /** * @public - *

    A set of parameters that allow you to filter out certain results from your returned results.

    + *

    A description of an Amazon Rekognition Custom Labels project. For more information, see DescribeProjects.

    */ -export interface DetectionFilter { +export interface ProjectDescription { /** - *

    Sets the confidence of word detection. Words with detection confidence below this will be - * excluded from the result. Values should be between 0 and 100. The default MinConfidence is - * 80.

    + *

    The Amazon Resource Name (ARN) of the project.

    */ - MinConfidence?: number; + ProjectArn?: string; /** - *

    Sets the minimum height of the word bounding box. Words with bounding box heights lesser than - * this value will be excluded from the result. Value is relative to the video frame height.

    + *

    The Unix timestamp for the date and time that the project was created.

    */ - MinBoundingBoxHeight?: number; + CreationTimestamp?: Date; /** - *

    Sets the minimum width of the word bounding box. Words with bounding boxes widths lesser than - * this value will be excluded from the result. Value is relative to the video frame width.

    + *

    The current status of the project.

    */ - MinBoundingBoxWidth?: number; + Status?: ProjectStatus | string; + + /** + *

    + * Information about the training and test datasets in the project. + *

    + */ + Datasets?: DatasetMetadata[]; } /** * @public - * @enum */ -export const DetectLabelsFeatureName = { - GENERAL_LABELS: "GENERAL_LABELS", - IMAGE_PROPERTIES: "IMAGE_PROPERTIES", -} as const; +export interface DescribeProjectsResponse { + /** + *

    A list of project descriptions. The list is sorted by the date and time the projects are created.

    + */ + ProjectDescriptions?: ProjectDescription[]; + + /** + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. + * You can use this pagination token to retrieve the next set of results.

    + */ + NextToken?: string; +} /** * @public + *

    Pagination token in the request is not valid.

    */ -export type DetectLabelsFeatureName = (typeof DetectLabelsFeatureName)[keyof typeof DetectLabelsFeatureName]; +export class InvalidPaginationTokenException extends __BaseException { + readonly name: "InvalidPaginationTokenException" = "InvalidPaginationTokenException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; + /** + *

    A universally unique identifier (UUID) for the request.

    + */ + Logref?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidPaginationTokenException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidPaginationTokenException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} /** * @public - *

    Contains filters for the object labels returned by DetectLabels. Filters can be inclusive, - * exclusive, or a combination of both and can be applied to individual labels or entire label categories. - * To see a list of label categories, see Detecting Labels.

    */ -export interface GeneralLabelsSettings { +export interface DescribeProjectVersionsRequest { /** - *

    The labels that should be included in the return from DetectLabels.

    + *

    The Amazon Resource Name (ARN) of the project that contains the models you want to describe.

    */ - LabelInclusionFilters?: string[]; + ProjectArn: string | undefined; /** - *

    The labels that should be excluded from the return from DetectLabels.

    + *

    A list of model version names that you want to describe. You can add up to 10 model version names + * to the list. If you don't specify a value, all model descriptions are returned. A version name is part of a + * model (ProjectVersion) ARN. For example, my-model.2020-01-21T09.10.15 is the version name in the following ARN. + * arn:aws:rekognition:us-east-1:123456789012:project/getting-started/version/my-model.2020-01-21T09.10.15/1234567890123.

    */ - LabelExclusionFilters?: string[]; + VersionNames?: string[]; /** - *

    The label categories that should be included in the return from DetectLabels.

    + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. + * You can use this pagination token to retrieve the next set of results.

    */ - LabelCategoryInclusionFilters?: string[]; + NextToken?: string; /** - *

    The label categories that should be excluded from the return from DetectLabels.

    + *

    The maximum number of results to return per paginated call. + * The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

    */ - LabelCategoryExclusionFilters?: string[]; + MaxResults?: number; } /** * @public - *

    Settings for the IMAGE_PROPERTIES feature type.

    + *

    The S3 bucket that contains the training summary. The training summary includes + * aggregated evaluation metrics for the entire testing dataset and metrics for each + * individual label.

    + *

    You get the training summary S3 bucket location by calling DescribeProjectVersions. + *

    */ -export interface DetectLabelsImagePropertiesSettings { +export interface Summary { /** - *

    The maximum number of dominant colors to return when detecting labels in an image. The default value is 10.

    + *

    Provides the S3 bucket name and object name.

    + *

    The region for the S3 bucket containing the S3 object must match the region you use for + * Amazon Rekognition operations.

    + *

    For Amazon Rekognition to process an S3 object, the user must have permission to + * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the + * Amazon Rekognition Developer Guide.

    */ - MaxDominantColors?: number; + S3Object?: S3Object; } /** * @public - *

    Settings for the DetectLabels request. Settings can include - * filters for both GENERAL_LABELS and IMAGE_PROPERTIES. GENERAL_LABELS filters can be inclusive - * or exclusive and applied to individual labels or label categories. IMAGE_PROPERTIES filters - * allow specification of a maximum number of dominant colors.

    + *

    The evaluation results for the training of a model.

    */ -export interface DetectLabelsSettings { +export interface EvaluationResult { /** - *

    Contains the specified filters for GENERAL_LABELS.

    + *

    The F1 score for the evaluation of all labels. The F1 score metric evaluates the overall precision + * and recall performance of the model as a single value. A higher value indicates better precision + * and recall performance. A lower score indicates that precision, recall, or both are performing poorly. + * + *

    */ - GeneralLabels?: GeneralLabelsSettings; + F1Score?: number; /** - *

    Contains the chosen number of maximum dominant colors in an image.

    + *

    The S3 bucket that contains the training summary.

    */ - ImageProperties?: DetectLabelsImagePropertiesSettings; + Summary?: Summary; } /** * @public + *

    Contains the Amazon S3 bucket location of the validation data for a model training job.

    + *

    The validation data includes error information for individual JSON Lines in the dataset. + * For more information, see Debugging a Failed Model Training in the + * Amazon Rekognition Custom Labels Developer Guide.

    + *

    You get the ValidationData object for the training dataset (TrainingDataResult) + * and the test dataset (TestingDataResult) by calling DescribeProjectVersions.

    + *

    The assets array contains a single Asset object. + * The GroundTruthManifest field of the Asset object contains the S3 bucket location of + * the validation data. + *

    */ -export interface DetectLabelsRequest { - /** - *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing image bytes is not supported. Images stored in an - * S3 Bucket do not need to be base64-encoded.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    - */ - Image: Image | undefined; - +export interface ValidationData { /** - *

    Maximum number of labels you want the service to return in the response. The service - * returns the specified number of highest confidence labels.

    + *

    The assets that comprise the validation data.

    */ - MaxLabels?: number; + Assets?: Asset[]; +} +/** + * @public + *

    Sagemaker Groundtruth format manifest files for the input, output and validation datasets that are used and created during testing.

    + */ +export interface TestingDataResult { /** - *

    Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't - * return any labels with confidence lower than this specified value.

    - *

    If MinConfidence is not specified, the operation returns labels with a - * confidence values greater than or equal to 55 percent.

    + *

    The testing dataset that was supplied for training.

    */ - MinConfidence?: number; + Input?: TestingData; /** - *

    A list of the types of analysis to perform. Specifying GENERAL_LABELS uses the label detection - * feature, while specifying IMAGE_PROPERTIES returns information regarding image color and quality. - * If no option is specified GENERAL_LABELS is used by default.

    + *

    The subset of the dataset that was actually tested. Some images (assets) might not be tested due to + * file formatting and other issues.

    */ - Features?: (DetectLabelsFeatureName | string)[]; + Output?: TestingData; /** - *

    A list of the filters to be applied to returned detected labels and image properties. Specified - * filters can be inclusive, exclusive, or a combination of both. Filters can be used for individual - * labels or label categories. The exact label names or label categories must be supplied. For - * a full list of labels and label categories, see Detecting labels.

    + *

    The location of the data validation manifest. The data validation manifest is created for the test dataset during model training.

    */ - Settings?: DetectLabelsSettings; + Validation?: ValidationData; } /** * @public - *

    A description of the dominant colors in an image.

    + *

    Sagemaker Groundtruth format manifest files for the input, output and validation datasets that are used and created during testing.

    */ -export interface DominantColor { +export interface TrainingDataResult { /** - *

    The Red RGB value for a dominant color.

    + *

    The training assets that you supplied for training.

    */ - Red?: number; + Input?: TrainingData; /** - *

    The Blue RGB value for a dominant color.

    + *

    The images (assets) that were actually trained by Amazon Rekognition Custom Labels.

    */ - Blue?: number; + Output?: TrainingData; /** - *

    The Green RGB value for a dominant color.

    + *

    The location of the data validation manifest. The data validation manifest is created for the training dataset during model training.

    */ - Green?: number; + Validation?: ValidationData; +} +/** + * @public + *

    A description of a version of an Amazon Rekognition Custom Labels model.

    + */ +export interface ProjectVersionDescription { /** - *

    The Hex code equivalent of the RGB values for a dominant color.

    + *

    The Amazon Resource Name (ARN) of the model version.

    */ - HexCode?: string; + ProjectVersionArn?: string; /** - *

    The CSS color name of a dominant color.

    + *

    The Unix datetime for the date and time that training started.

    */ - CSSColor?: string; + CreationTimestamp?: Date; /** - *

    One of 12 simplified color names applied to a dominant color.

    + *

    The minimum number of inference units used by the model. For more information, + * see StartProjectVersion.

    */ - SimplifiedColor?: string; + MinInferenceUnits?: number; /** - *

    The percentage of image pixels that have a given dominant color.

    + *

    The current status of the model version.

    */ - PixelPercent?: number; -} + Status?: ProjectVersionStatus | string; -/** - * @public - *

    The quality of an image provided for label detection, with regard to brightness, sharpness, and contrast.

    - */ -export interface DetectLabelsImageQuality { /** - *

    The brightness of an image provided for label detection.

    + *

    A descriptive message for an error or warning that occurred.

    */ - Brightness?: number; + StatusMessage?: string; /** - *

    The sharpness of an image provided for label detection.

    + *

    The duration, in seconds, that you were billed for a successful training of the model version. + * This value is only returned if the model version has been successfully trained.

    */ - Sharpness?: number; + BillableTrainingTimeInSeconds?: number; /** - *

    The contrast of an image provided for label detection.

    + *

    The Unix date and time that training of the model ended.

    */ - Contrast?: number; -} + TrainingEndTimestamp?: Date; -/** - * @public - *

    The background of the image with regard to image quality and dominant colors.

    - */ -export interface DetectLabelsImageBackground { /** - *

    The quality of the image background as defined by brightness and sharpness.

    + *

    The location where training results are saved.

    */ - Quality?: DetectLabelsImageQuality; + OutputConfig?: OutputConfig; /** - *

    The dominant colors found in the background of an image, defined with RGB values, - * CSS color name, simplified color name, and PixelPercentage (the percentage of - * image pixels that have a particular color).

    + *

    Contains information about the training results.

    */ - DominantColors?: DominantColor[]; -} + TrainingDataResult?: TrainingDataResult; -/** - * @public - *

    The foreground of the image with regard to image quality and dominant colors.

    - */ -export interface DetectLabelsImageForeground { /** - *

    The quality of the image foreground as defined by brightness and sharpness.

    + *

    Contains information about the testing results.

    */ - Quality?: DetectLabelsImageQuality; + TestingDataResult?: TestingDataResult; /** - *

    The dominant colors found in the foreground of an image, defined with RGB values, - * CSS color name, simplified color name, and PixelPercentage (the percentage of image - * pixels that have a particular color).

    + *

    The training results. EvaluationResult is only returned if training is successful.

    */ - DominantColors?: DominantColor[]; -} + EvaluationResult?: EvaluationResult; -/** - * @public - *

    Information about the quality and dominant colors of an input image. - * Quality and color information is returned for the entire image, foreground, and background.

    - */ -export interface DetectLabelsImageProperties { /** - *

    Information about the quality of the image foreground as defined by brightness, - * sharpness, and contrast. The higher the value the greater the brightness, - * sharpness, and contrast respectively.

    + *

    The location of the summary manifest. The summary manifest provides aggregate data validation results for the training + * and test datasets.

    */ - Quality?: DetectLabelsImageQuality; + ManifestSummary?: GroundTruthManifest; /** - *

    Information about the dominant colors found in an image, described with RGB values, - * CSS color name, simplified color name, and PixelPercentage (the percentage of image pixels - * that have a particular color).

    + *

    The identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training.

    */ - DominantColors?: DominantColor[]; + KmsKeyId?: string; /** - *

    Information about the properties of an image’s foreground, including the - * foreground’s quality and dominant colors, including the quality and dominant colors of the image.

    + *

    The maximum number of inference units Amazon Rekognition Custom Labels uses to auto-scale the model. + * For more information, see StartProjectVersion.

    */ - Foreground?: DetectLabelsImageForeground; + MaxInferenceUnits?: number; /** - *

    Information about the properties of an image’s background, including - * the background’s quality and dominant colors, including the quality - * and dominant colors of the image.

    + *

    If the model version was copied from a different project, SourceProjectVersionArn contains the ARN of the source model version.

    */ - Background?: DetectLabelsImageBackground; + SourceProjectVersionArn?: string; } /** * @public - *

    A potential alias of for a given label.

    */ -export interface LabelAlias { +export interface DescribeProjectVersionsResponse { /** - *

    The name of an alias for a given label.

    + *

    A list of model descriptions. The list is sorted by the creation date and time of + * the model versions, latest to earliest.

    */ - Name?: string; + ProjectVersionDescriptions?: ProjectVersionDescription[]; + + /** + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. + * You can use this pagination token to retrieve the next set of results.

    + */ + NextToken?: string; } /** * @public - *

    The category that applies to a given label.

    */ -export interface LabelCategory { +export interface DescribeStreamProcessorRequest { /** - *

    The name of a category that applies to a given label.

    + *

    Name of the stream processor for which you want information.

    */ - Name?: string; + Name: string | undefined; } /** * @public - *

    An instance of a label returned by Amazon Rekognition Image (DetectLabels) or by - * Amazon Rekognition Video (GetLabelDetection).

    + * @enum */ -export interface Instance { +export const StreamProcessorStatus = { + FAILED: "FAILED", + RUNNING: "RUNNING", + STARTING: "STARTING", + STOPPED: "STOPPED", + STOPPING: "STOPPING", + UPDATING: "UPDATING", +} as const; + +/** + * @public + */ +export type StreamProcessorStatus = (typeof StreamProcessorStatus)[keyof typeof StreamProcessorStatus]; + +/** + * @public + */ +export interface DescribeStreamProcessorResponse { /** - *

    The position of the label instance on the image.

    + *

    Name of the stream processor.

    */ - BoundingBox?: BoundingBox; + Name?: string; /** - *

    The confidence that Amazon Rekognition has in the accuracy of the bounding box.

    + *

    ARN of the stream processor.

    */ - Confidence?: number; + StreamProcessorArn?: string; /** - *

    The dominant colors found in an individual instance of a label.

    + *

    Current status of the stream processor.

    */ - DominantColors?: DominantColor[]; -} + Status?: StreamProcessorStatus | string; -/** - * @public - *

    A parent label for a label. A label can have 0, 1, or more parents.

    - */ -export interface Parent { /** - *

    The name of the parent label.

    + *

    Detailed status message about the stream processor.

    */ - Name?: string; -} + StatusMessage?: string; -/** - * @public - *

    Structure containing details about the detected label, including the name, detected instances, parent labels, and level of - * confidence.

    - *

    - *

    - */ -export interface Label { /** - *

    The name (label) of the object or scene.

    + *

    Date and time the stream processor was created

    */ - Name?: string; + CreationTimestamp?: Date; /** - *

    Level of confidence.

    + *

    The time, in Unix format, the stream processor was last updated. For example, when the stream + * processor moves from a running state to a failed state, or when the user starts or stops the stream processor.

    */ - Confidence?: number; + LastUpdateTimestamp?: Date; /** - *

    If Label represents an object, Instances contains the bounding boxes for each instance of the detected object. - * Bounding boxes are returned for common object labels such as people, cars, furniture, apparel or pets.

    + *

    Kinesis video stream that provides the source streaming video.

    */ - Instances?: Instance[]; + Input?: StreamProcessorInput; /** - *

    The parent labels for a label. The response includes all ancestor labels.

    + *

    Kinesis data stream to which Amazon Rekognition Video puts the analysis results.

    */ - Parents?: Parent[]; + Output?: StreamProcessorOutput; /** - *

    A list of potential aliases for a given label.

    + *

    ARN of the IAM role that allows access to the stream processor.

    */ - Aliases?: LabelAlias[]; + RoleArn?: string; /** - *

    A list of the categories associated with a given label.

    + *

    Input parameters used in a streaming video analyzed by a stream processor. You can use FaceSearch to recognize faces + * in a streaming video, or you can use ConnectedHome to detect labels.

    */ - Categories?: LabelCategory[]; + Settings?: StreamProcessorSettings; + + /** + *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.

    + *

    Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. For example, if Amazon Rekognition + * detects a person at second 2, a pet at second 4, and a person again at second 5, Amazon Rekognition sends 2 object class detected notifications, + * one for a person at second 2 and one for a pet at second 4.

    + *

    Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete.

    + */ + NotificationChannel?: StreamProcessorNotificationChannel; + + /** + *

    + * The identifier for your AWS Key Management Service key (AWS KMS key). This is an optional parameter for label detection stream processors. + *

    + */ + KmsKeyId?: string; + + /** + *

    + * Specifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors. + *

    + */ + RegionsOfInterest?: RegionOfInterest[]; + + /** + *

    + * Shows whether you are sharing data with Rekognition to improve model performance. You can choose this option at the account level or on a per-stream basis. + * Note that if you opt out at the account level this setting is ignored on individual streams. + *

    + */ + DataSharingPreference?: StreamProcessorDataSharingPreference; } /** * @public */ -export interface DetectLabelsResponse { +export interface DetectCustomLabelsRequest { /** - *

    An array of labels for the real-world objects detected.

    + *

    The ARN of the model version that you want to use.

    */ - Labels?: Label[]; + ProjectVersionArn: string | undefined; /** - *

    The value of OrientationCorrection is always null.

    - *

    If the input image is in .jpeg format, it might contain exchangeable image file format - * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation - * information to perform image correction. The bounding box coordinates are translated to - * represent object locations after the orientation information in the Exif metadata is used to - * correct the image orientation. Images in .png format don't contain Exif metadata.

    - *

    Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images - * without orientation information in the image Exif metadata. The bounding box coordinates - * aren't translated and represent the object locations before the image is rotated.

    + *

    Provides the input image either as bytes or an S3 object.

    + *

    You pass image bytes to an Amazon Rekognition API operation by using the Bytes + * property. For example, you would use the Bytes property to pass an image loaded + * from a local file system. Image bytes passed by using the Bytes property must be + * base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to + * call Amazon Rekognition API operations.

    + *

    For more information, see Analyzing an Image Loaded from a Local File System + * in the Amazon Rekognition Developer Guide.

    + *

    You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the + * S3Object property. Images stored in an S3 bucket do not need to be + * base64-encoded.

    + *

    The region for the S3 bucket containing the S3 object must match the region you use for + * Amazon Rekognition operations.

    + *

    If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the + * Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and + * then call the operation using the S3Object property.

    + *

    For Amazon Rekognition to process an S3 object, the user must have permission to + * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the + * Amazon Rekognition Developer Guide.

    */ - OrientationCorrection?: OrientationCorrection | string; + Image: Image | undefined; /** - *

    Version number of the label detection model that was used to detect labels.

    + *

    Maximum number of results you want the service to return in the response. + * The service returns the specified number of highest confidence labels ranked from highest confidence + * to lowest.

    */ - LabelModelVersion?: string; + MaxResults?: number; /** - *

    Information about the properties of the input image, such as brightness, sharpness, contrast, and dominant colors.

    + *

    Specifies the minimum confidence level for the labels to return. + * DetectCustomLabels doesn't return any labels with a confidence value that's lower than + * this specified value. If you specify a + * value of 0, DetectCustomLabels returns all labels, regardless of the assumed + * threshold applied to each label. + * If you don't specify a value for MinConfidence, DetectCustomLabels + * returns labels based on the assumed threshold of each label.

    */ - ImageProperties?: DetectLabelsImageProperties; + MinConfidence?: number; } /** * @public - *

    Allows you to set attributes of the image. Currently, you can declare an image as free of - * personally identifiable information.

    */ -export interface HumanLoopDataAttributes { +export interface DetectCustomLabelsResponse { /** - *

    Sets whether the input image is free of personally identifiable information.

    + *

    An array of custom labels detected in the input image.

    */ - ContentClassifiers?: (ContentClassifier | string)[]; + CustomLabels?: CustomLabel[]; } /** * @public - *

    Sets up the flow definition the image will be sent to if one of the conditions is met. You - * can also set certain attributes of the image before review.

    + *

    The requested resource isn't ready. For example, + * this exception occurs when you call DetectCustomLabels with a + * model version that isn't deployed.

    */ -export interface HumanLoopConfig { - /** - *

    The name of the human review used for this image. This should be kept unique within a - * region.

    - */ - HumanLoopName: string | undefined; - +export class ResourceNotReadyException extends __BaseException { + readonly name: "ResourceNotReadyException" = "ResourceNotReadyException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    The Amazon Resource Name (ARN) of the flow definition. You can create a flow definition by - * using the Amazon Sagemaker CreateFlowDefinition Operation.

    + *

    A universally unique identifier (UUID) for the request.

    */ - FlowDefinitionArn: string | undefined; - + Logref?: string; /** - *

    Sets attributes of the input data.

    + * @internal */ - DataAttributes?: HumanLoopDataAttributes; + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotReadyException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotReadyException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public */ -export interface DetectModerationLabelsRequest { +export interface DetectFacesRequest { /** *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    @@ -4082,1021 +3885,1153 @@ export interface DetectModerationLabelsRequest { * base64-encode image bytes passed using the Bytes field. For more information, see * Images in the Amazon Rekognition developer guide.

    */ - Image: Image | undefined; - - /** - *

    Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't - * return any labels with a confidence level lower than this specified value.

    - *

    If you don't specify MinConfidence, the operation returns labels with - * confidence values greater than or equal to 50 percent.

    - */ - MinConfidence?: number; + Image: Image | undefined; /** - *

    Sets up the configuration for human evaluation, including the FlowDefinition the image - * will be sent to.

    + *

    An array of facial attributes you want to be returned. A DEFAULT subset of + * facial attributes - BoundingBox, Confidence, Pose, + * Quality, and Landmarks - will always be returned. You can request + * for specific facial attributes (in addition to the default list) - by using ["DEFAULT", + * "FACE_OCCLUDED"] or just ["FACE_OCCLUDED"]. You can request for all + * facial attributes by using ["ALL"]. Requesting more attributes may increase + * response time.

    + *

    If you provide both, ["ALL", "DEFAULT"], the service uses a logical "AND" + * operator to determine which attributes to return (in this case, all attributes).

    */ - HumanLoopConfig?: HumanLoopConfig; + Attributes?: (Attribute | string)[]; } /** * @public - *

    Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the - * input did not trigger human review.

    */ -export interface HumanLoopActivationOutput { - /** - *

    The Amazon Resource Name (ARN) of the HumanLoop created.

    - */ - HumanLoopArn?: string; - +export interface DetectFacesResponse { /** - *

    Shows if and why human review was needed.

    + *

    Details of each face found in the image.

    */ - HumanLoopActivationReasons?: string[]; + FaceDetails?: FaceDetail[]; /** - *

    Shows the result of condition evaluations, including those conditions which activated a - * human review.

    + *

    The value of OrientationCorrection is always null.

    + *

    If the input image is in .jpeg format, it might contain exchangeable image file format + * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation + * information to perform image correction. The bounding box coordinates are translated to + * represent object locations after the orientation information in the Exif metadata is used to + * correct the image orientation. Images in .png format don't contain Exif metadata.

    + *

    Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images + * without orientation information in the image Exif metadata. The bounding box coordinates + * aren't translated and represent the object locations before the image is rotated.

    */ - HumanLoopActivationConditionsEvaluationResults?: __LazyJsonString | string; + OrientationCorrection?: OrientationCorrection | string; } /** * @public + *

    A set of parameters that allow you to filter out certain results from your returned results.

    */ -export interface DetectModerationLabelsResponse { +export interface DetectionFilter { /** - *

    Array of detected Moderation labels and the time, in milliseconds from the start of the - * video, they were detected.

    + *

    Sets the confidence of word detection. Words with detection confidence below this will be + * excluded from the result. Values should be between 0 and 100. The default MinConfidence is + * 80.

    */ - ModerationLabels?: ModerationLabel[]; + MinConfidence?: number; /** - *

    Version number of the moderation detection model that was used to detect unsafe - * content.

    + *

    Sets the minimum height of the word bounding box. Words with bounding box heights lesser than + * this value will be excluded from the result. Value is relative to the video frame height.

    */ - ModerationModelVersion?: string; + MinBoundingBoxHeight?: number; /** - *

    Shows the results of the human in the loop evaluation.

    + *

    Sets the minimum width of the word bounding box. Words with bounding boxes widths lesser than + * this value will be excluded from the result. Value is relative to the video frame width.

    */ - HumanLoopActivationOutput?: HumanLoopActivationOutput; + MinBoundingBoxWidth?: number; } /** * @public - *

    The number of in-progress human reviews you have has exceeded the number allowed.

    + * @enum */ -export class HumanLoopQuotaExceededException extends __BaseException { - readonly name: "HumanLoopQuotaExceededException" = "HumanLoopQuotaExceededException"; - readonly $fault: "client" = "client"; +export const DetectLabelsFeatureName = { + GENERAL_LABELS: "GENERAL_LABELS", + IMAGE_PROPERTIES: "IMAGE_PROPERTIES", +} as const; + +/** + * @public + */ +export type DetectLabelsFeatureName = (typeof DetectLabelsFeatureName)[keyof typeof DetectLabelsFeatureName]; + +/** + * @public + *

    Contains filters for the object labels returned by DetectLabels. Filters can be inclusive, + * exclusive, or a combination of both and can be applied to individual labels or entire label categories. + * To see a list of label categories, see Detecting Labels.

    + */ +export interface GeneralLabelsSettings { /** - *

    The resource type.

    + *

    The labels that should be included in the return from DetectLabels.

    */ - ResourceType?: string; + LabelInclusionFilters?: string[]; /** - *

    The quota code.

    + *

    The labels that should be excluded from the return from DetectLabels.

    */ - QuotaCode?: string; + LabelExclusionFilters?: string[]; /** - *

    The service code.

    + *

    The label categories that should be included in the return from DetectLabels.

    */ - ServiceCode?: string; + LabelCategoryInclusionFilters?: string[]; - Message?: string; - Code?: string; /** - *

    A universally unique identifier (UUID) for the request.

    + *

    The label categories that should be excluded from the return from DetectLabels.

    */ - Logref?: string; + LabelCategoryExclusionFilters?: string[]; +} + +/** + * @public + *

    Settings for the IMAGE_PROPERTIES feature type.

    + */ +export interface DetectLabelsImagePropertiesSettings { /** - * @internal + *

    The maximum number of dominant colors to return when detecting labels in an image. The default value is 10.

    */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "HumanLoopQuotaExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, HumanLoopQuotaExceededException.prototype); - this.ResourceType = opts.ResourceType; - this.QuotaCode = opts.QuotaCode; - this.ServiceCode = opts.ServiceCode; - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + MaxDominantColors?: number; } /** * @public - *

    Specifies summary attributes to return from a call to DetectProtectiveEquipment. - * You can specify which types of PPE to summarize. You can also specify a minimum confidence value for detections. - * Summary information is returned in the Summary (ProtectiveEquipmentSummary) field of the response from - * DetectProtectiveEquipment. - * The summary includes which persons in an image were detected wearing the requested types of person protective equipment (PPE), which persons - * were detected as not wearing PPE, and the persons in which a determination could not be made. For more information, - * see ProtectiveEquipmentSummary.

    + *

    Settings for the DetectLabels request. Settings can include + * filters for both GENERAL_LABELS and IMAGE_PROPERTIES. GENERAL_LABELS filters can be inclusive + * or exclusive and applied to individual labels or label categories. IMAGE_PROPERTIES filters + * allow specification of a maximum number of dominant colors.

    */ -export interface ProtectiveEquipmentSummarizationAttributes { +export interface DetectLabelsSettings { /** - *

    The minimum confidence level for which you want summary information. - * The confidence level applies to person detection, body part detection, equipment detection, and body part coverage. - * Amazon Rekognition doesn't return summary information with a confidence than this specified value. There isn't a - * default value.

    - *

    Specify a MinConfidence value that is between 50-100% as DetectProtectiveEquipment - * returns predictions only where the detection confidence is between 50% - 100%. - * If you specify a value that is less than 50%, the results are the same specifying a value of 50%.

    - *

    - *

    + *

    Contains the specified filters for GENERAL_LABELS.

    */ - MinConfidence: number | undefined; + GeneralLabels?: GeneralLabelsSettings; /** - *

    An array of personal protective equipment types for which you want summary information. - * If a person is detected wearing a required requipment type, the person's ID is added to the - * PersonsWithRequiredEquipment array field returned in ProtectiveEquipmentSummary - * by DetectProtectiveEquipment.

    + *

    Contains the chosen number of maximum dominant colors in an image.

    */ - RequiredEquipmentTypes: (ProtectiveEquipmentType | string)[] | undefined; + ImageProperties?: DetectLabelsImagePropertiesSettings; } /** * @public */ -export interface DetectProtectiveEquipmentRequest { +export interface DetectLabelsRequest { /** - *

    The image in which you want to detect PPE on detected persons. The image can be passed as image bytes or you can - * reference an image stored in an Amazon S3 bucket.

    + *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing image bytes is not supported. Images stored in an + * S3 Bucket do not need to be base64-encoded.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ Image: Image | undefined; /** - *

    An array of PPE types that you want to summarize.

    + *

    Maximum number of labels you want the service to return in the response. The service + * returns the specified number of highest confidence labels.

    */ - SummarizationAttributes?: ProtectiveEquipmentSummarizationAttributes; + MaxLabels?: number; + + /** + *

    Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't + * return any labels with confidence lower than this specified value.

    + *

    If MinConfidence is not specified, the operation returns labels with a + * confidence values greater than or equal to 55 percent.

    + */ + MinConfidence?: number; + + /** + *

    A list of the types of analysis to perform. Specifying GENERAL_LABELS uses the label detection + * feature, while specifying IMAGE_PROPERTIES returns information regarding image color and quality. + * If no option is specified GENERAL_LABELS is used by default.

    + */ + Features?: (DetectLabelsFeatureName | string)[]; + + /** + *

    A list of the filters to be applied to returned detected labels and image properties. Specified + * filters can be inclusive, exclusive, or a combination of both. Filters can be used for individual + * labels or label categories. The exact label names or label categories must be supplied. For + * a full list of labels and label categories, see Detecting labels.

    + */ + Settings?: DetectLabelsSettings; } /** * @public - *

    A person detected by a call to DetectProtectiveEquipment. The API returns - * all persons detected in the input - * image in an array of ProtectiveEquipmentPerson objects.

    + *

    A description of the dominant colors in an image.

    */ -export interface ProtectiveEquipmentPerson { +export interface DominantColor { /** - *

    An array of body parts detected on a person's body (including body parts without PPE).

    + *

    The Red RGB value for a dominant color.

    */ - BodyParts?: ProtectiveEquipmentBodyPart[]; + Red?: number; /** - *

    A bounding box around the detected person.

    + *

    The Blue RGB value for a dominant color.

    */ - BoundingBox?: BoundingBox; + Blue?: number; /** - *

    The confidence that Amazon Rekognition has that the bounding box contains a person.

    + *

    The Green RGB value for a dominant color.

    */ - Confidence?: number; + Green?: number; /** - *

    The identifier for the detected person. The identifier is only unique for a single call to - * DetectProtectiveEquipment.

    + *

    The Hex code equivalent of the RGB values for a dominant color.

    */ - Id?: number; -} + HexCode?: string; -/** - * @public - *

    Summary information for required items of personal protective equipment (PPE) detected on persons by a call - * to DetectProtectiveEquipment. You specify the required type of PPE in - * the SummarizationAttributes - * (ProtectiveEquipmentSummarizationAttributes) input parameter. - * The summary includes which persons were detected wearing the required personal protective equipment - * (PersonsWithRequiredEquipment), - * which persons were detected as not wearing the required PPE (PersonsWithoutRequiredEquipment), - * and the persons in which a determination - * could not be made (PersonsIndeterminate).

    - *

    To get a total for each category, use the size of the field array. For example, - * to find out how many people were detected as wearing the specified PPE, - * use the size of the PersonsWithRequiredEquipment array. - * If you want to find out more about a person, such as the - * location (BoundingBox) of the person on the image, use the person ID in each array element. - * Each person ID matches the ID field of a ProtectiveEquipmentPerson object returned - * in the Persons array by DetectProtectiveEquipment.

    - */ -export interface ProtectiveEquipmentSummary { /** - *

    An array of IDs for persons who are wearing detected personal protective equipment. - *

    + *

    The CSS color name of a dominant color.

    */ - PersonsWithRequiredEquipment?: number[]; + CSSColor?: string; /** - *

    An array of IDs for persons who are not wearing all of the types of PPE specified in the RequiredEquipmentTypes field of - * the detected personal protective equipment. - *

    + *

    One of 12 simplified color names applied to a dominant color.

    */ - PersonsWithoutRequiredEquipment?: number[]; + SimplifiedColor?: string; /** - *

    An array of IDs for persons where it was not possible to determine if they are wearing personal protective equipment. - *

    + *

    The percentage of image pixels that have a given dominant color.

    */ - PersonsIndeterminate?: number[]; + PixelPercent?: number; } /** * @public + *

    The quality of an image provided for label detection, with regard to brightness, sharpness, and contrast.

    */ -export interface DetectProtectiveEquipmentResponse { +export interface DetectLabelsImageQuality { /** - *

    The version number of the PPE detection model used to detect PPE in the image.

    + *

    The brightness of an image provided for label detection.

    */ - ProtectiveEquipmentModelVersion?: string; + Brightness?: number; /** - *

    An array of persons detected in the image (including persons not wearing PPE).

    + *

    The sharpness of an image provided for label detection.

    */ - Persons?: ProtectiveEquipmentPerson[]; + Sharpness?: number; /** - *

    Summary information for the types of PPE specified in the SummarizationAttributes input - * parameter.

    + *

    The contrast of an image provided for label detection.

    */ - Summary?: ProtectiveEquipmentSummary; + Contrast?: number; } /** * @public - *

    A set of optional parameters that you can use to set the criteria that the text must meet - * to be included in your response. WordFilter looks at a word’s height, width, and - * minimum confidence. RegionOfInterest lets you set a specific region of the image - * to look for text in.

    + *

    The background of the image with regard to image quality and dominant colors.

    */ -export interface DetectTextFilters { +export interface DetectLabelsImageBackground { /** - *

    A set of parameters that allow you to filter out certain results from your returned results.

    + *

    The quality of the image background as defined by brightness and sharpness.

    */ - WordFilter?: DetectionFilter; + Quality?: DetectLabelsImageQuality; /** - *

    A Filter focusing on a certain area of the image. Uses a BoundingBox object - * to set the region of the image.

    + *

    The dominant colors found in the background of an image, defined with RGB values, + * CSS color name, simplified color name, and PixelPercentage (the percentage of + * image pixels that have a particular color).

    */ - RegionsOfInterest?: RegionOfInterest[]; + DominantColors?: DominantColor[]; } /** * @public + *

    The foreground of the image with regard to image quality and dominant colors.

    */ -export interface DetectTextRequest { +export interface DetectLabelsImageForeground { /** - *

    The input image as base64-encoded bytes or an Amazon S3 object. If you use the AWS - * CLI to call Amazon Rekognition operations, you can't pass image bytes.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    + *

    The quality of the image foreground as defined by brightness and sharpness.

    */ - Image: Image | undefined; + Quality?: DetectLabelsImageQuality; /** - *

    Optional parameters that let you set the criteria that the text must meet to be included - * in your response.

    + *

    The dominant colors found in the foreground of an image, defined with RGB values, + * CSS color name, simplified color name, and PixelPercentage (the percentage of image + * pixels that have a particular color).

    */ - Filters?: DetectTextFilters; + DominantColors?: DominantColor[]; } /** * @public - * @enum - */ -export const TextTypes = { - LINE: "LINE", - WORD: "WORD", -} as const; - -/** - * @public - */ -export type TextTypes = (typeof TextTypes)[keyof typeof TextTypes]; - -/** - * @public - *

    Information about a word or line of text detected by DetectText.

    - *

    The DetectedText field contains the text that Amazon Rekognition detected in the - * image.

    - *

    Every word and line has an identifier (Id). Each word belongs to a line - * and has a parent identifier (ParentId) that identifies the line of text in which - * the word appears. The word Id is also an index for the word within a line of - * words.

    - *

    For more information, see Detecting text in the Amazon Rekognition Developer - * Guide.

    + *

    Information about the quality and dominant colors of an input image. + * Quality and color information is returned for the entire image, foreground, and background.

    */ -export interface TextDetection { +export interface DetectLabelsImageProperties { /** - *

    The word or line of text recognized by Amazon Rekognition.

    + *

    Information about the quality of the image foreground as defined by brightness, + * sharpness, and contrast. The higher the value the greater the brightness, + * sharpness, and contrast respectively.

    */ - DetectedText?: string; + Quality?: DetectLabelsImageQuality; /** - *

    The type of text that was detected.

    + *

    Information about the dominant colors found in an image, described with RGB values, + * CSS color name, simplified color name, and PixelPercentage (the percentage of image pixels + * that have a particular color).

    */ - Type?: TextTypes | string; + DominantColors?: DominantColor[]; /** - *

    The identifier for the detected text. The identifier is only unique for a single call - * to DetectText.

    + *

    Information about the properties of an image’s foreground, including the + * foreground’s quality and dominant colors, including the quality and dominant colors of the image.

    */ - Id?: number; + Foreground?: DetectLabelsImageForeground; /** - *

    The Parent identifier for the detected text identified by the value of ID. - * If the type of detected text is LINE, the value of ParentId is - * Null.

    + *

    Information about the properties of an image’s background, including + * the background’s quality and dominant colors, including the quality + * and dominant colors of the image.

    */ - ParentId?: number; + Background?: DetectLabelsImageBackground; +} +/** + * @public + *

    A potential alias of for a given label.

    + */ +export interface LabelAlias { /** - *

    The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy - * of the geometry points around the detected text.

    + *

    The name of an alias for a given label.

    */ - Confidence?: number; + Name?: string; +} +/** + * @public + *

    The category that applies to a given label.

    + */ +export interface LabelCategory { /** - *

    The location of the detected text on the image. Includes an axis aligned coarse - * bounding box surrounding the text and a finer grain polygon for more accurate spatial - * information.

    + *

    The name of a category that applies to a given label.

    */ - Geometry?: Geometry; + Name?: string; } /** * @public + *

    An instance of a label returned by Amazon Rekognition Image (DetectLabels) or by + * Amazon Rekognition Video (GetLabelDetection).

    */ -export interface DetectTextResponse { +export interface Instance { /** - *

    An array of text that was detected in the input image.

    + *

    The position of the label instance on the image.

    */ - TextDetections?: TextDetection[]; + BoundingBox?: BoundingBox; /** - *

    The model version used to detect text.

    + *

    The confidence that Amazon Rekognition has in the accuracy of the bounding box.

    */ - TextModelVersion?: string; -} + Confidence?: number; -/** - * @public - *

    - * A training dataset or a test dataset used in a dataset distribution operation. - * For more information, see DistributeDatasetEntries. - *

    - */ -export interface DistributeDataset { /** - *

    The Amazon Resource Name (ARN) of the dataset that you want to use. - *

    + *

    The dominant colors found in an individual instance of a label.

    */ - Arn: string | undefined; + DominantColors?: DominantColor[]; } /** * @public + *

    A parent label for a label. A label can have 0, 1, or more parents.

    */ -export interface DistributeDatasetEntriesRequest { +export interface Parent { /** - *

    The ARNS for the training dataset and test dataset that you want to use. The datasets must belong to - * the same project. The test dataset must be empty. - *

    + *

    The name of the parent label.

    */ - Datasets: DistributeDataset[] | undefined; + Name?: string; } /** * @public + *

    Structure containing details about the detected label, including the name, detected instances, parent labels, and level of + * confidence.

    + *

    + *

    */ -export interface DistributeDatasetEntriesResponse {} - -/** - * @public - *

    Describes the face properties such as the bounding box, face ID, image ID of the input - * image, and external image ID that you assigned.

    - */ -export interface Face { +export interface Label { /** - *

    Unique identifier that Amazon Rekognition assigns to the face.

    + *

    The name (label) of the object or scene.

    */ - FaceId?: string; + Name?: string; /** - *

    Bounding box of the face.

    + *

    Level of confidence.

    */ - BoundingBox?: BoundingBox; + Confidence?: number; /** - *

    Unique identifier that Amazon Rekognition assigns to the input image.

    + *

    If Label represents an object, Instances contains the bounding boxes for each instance of the detected object. + * Bounding boxes are returned for common object labels such as people, cars, furniture, apparel or pets.

    */ - ImageId?: string; + Instances?: Instance[]; /** - *

    Identifier that you assign to all the faces in the input image.

    + *

    The parent labels for a label. The response includes all ancestor labels.

    */ - ExternalImageId?: string; + Parents?: Parent[]; /** - *

    Confidence level that the bounding box contains a face (and not a different object such - * as a tree).

    + *

    A list of potential aliases for a given label.

    */ - Confidence?: number; + Aliases?: LabelAlias[]; /** - *

    The version of the face detect and storage model that was used when indexing the face - * vector.

    + *

    A list of the categories associated with a given label.

    */ - IndexFacesModelVersion?: string; + Categories?: LabelCategory[]; } /** * @public - * @enum */ -export const FaceAttributes = { - ALL: "ALL", - DEFAULT: "DEFAULT", -} as const; +export interface DetectLabelsResponse { + /** + *

    An array of labels for the real-world objects detected.

    + */ + Labels?: Label[]; + + /** + *

    The value of OrientationCorrection is always null.

    + *

    If the input image is in .jpeg format, it might contain exchangeable image file format + * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation + * information to perform image correction. The bounding box coordinates are translated to + * represent object locations after the orientation information in the Exif metadata is used to + * correct the image orientation. Images in .png format don't contain Exif metadata.

    + *

    Amazon Rekognition doesn’t perform image correction for images in .png format and .jpeg images + * without orientation information in the image Exif metadata. The bounding box coordinates + * aren't translated and represent the object locations before the image is rotated.

    + */ + OrientationCorrection?: OrientationCorrection | string; + + /** + *

    Version number of the label detection model that was used to detect labels.

    + */ + LabelModelVersion?: string; + + /** + *

    Information about the properties of the input image, such as brightness, sharpness, contrast, and dominant colors.

    + */ + ImageProperties?: DetectLabelsImageProperties; +} /** * @public + *

    Allows you to set attributes of the image. Currently, you can declare an image as free of + * personally identifiable information.

    */ -export type FaceAttributes = (typeof FaceAttributes)[keyof typeof FaceAttributes]; +export interface HumanLoopDataAttributes { + /** + *

    Sets whether the input image is free of personally identifiable information.

    + */ + ContentClassifiers?: (ContentClassifier | string)[]; +} /** * @public - *

    Information about a face detected in a video analysis request and the time the face was detected in the video.

    + *

    Sets up the flow definition the image will be sent to if one of the conditions is met. You + * can also set certain attributes of the image before review.

    */ -export interface FaceDetection { +export interface HumanLoopConfig { + /** + *

    The name of the human review used for this image. This should be kept unique within a + * region.

    + */ + HumanLoopName: string | undefined; + /** - *

    Time, in milliseconds from the start of the video, that the face was detected. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the face first appears.

    + *

    The Amazon Resource Name (ARN) of the flow definition. You can create a flow definition by + * using the Amazon Sagemaker CreateFlowDefinition Operation.

    */ - Timestamp?: number; + FlowDefinitionArn: string | undefined; /** - *

    The face properties for the detected face.

    + *

    Sets attributes of the input data.

    */ - Face?: FaceDetail; + DataAttributes?: HumanLoopDataAttributes; } /** * @public - *

    Provides face metadata. In addition, it also provides the confidence in the match of - * this face with the input face.

    */ -export interface FaceMatch { +export interface DetectModerationLabelsRequest { /** - *

    Confidence in the match of this face with the input face.

    + *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ - Similarity?: number; + Image: Image | undefined; /** - *

    Describes the face properties such as the bounding box, face ID, image ID of the source - * image, and external image ID that you assigned.

    + *

    Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't + * return any labels with a confidence level lower than this specified value.

    + *

    If you don't specify MinConfidence, the operation returns labels with + * confidence values greater than or equal to 50 percent.

    */ - Face?: Face; + MinConfidence?: number; + + /** + *

    Sets up the configuration for human evaluation, including the FlowDefinition the image + * will be sent to.

    + */ + HumanLoopConfig?: HumanLoopConfig; } /** * @public - *

    Object containing both the face metadata (stored in the backend database), and facial - * attributes that are detected but aren't stored in the database.

    + *

    Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the + * input did not trigger human review.

    */ -export interface FaceRecord { +export interface HumanLoopActivationOutput { /** - *

    Describes the face properties such as the bounding box, face ID, image ID of the input - * image, and external image ID that you assigned.

    + *

    The Amazon Resource Name (ARN) of the HumanLoop created.

    */ - Face?: Face; + HumanLoopArn?: string; /** - *

    Structure containing attributes of the face that the algorithm detected.

    + *

    Shows if and why human review was needed.

    */ - FaceDetail?: FaceDetail; -} - -/** - * @public - * @enum - */ -export const FaceSearchSortBy = { - INDEX: "INDEX", - TIMESTAMP: "TIMESTAMP", -} as const; - -/** - * @public - */ -export type FaceSearchSortBy = (typeof FaceSearchSortBy)[keyof typeof FaceSearchSortBy]; + HumanLoopActivationReasons?: string[]; -/** - * @public - */ -export interface GetCelebrityInfoRequest { /** - *

    The ID for the celebrity. You get the celebrity ID from a call to the RecognizeCelebrities operation, which recognizes celebrities in an image. - *

    + *

    Shows the result of condition evaluations, including those conditions which activated a + * human review.

    */ - Id: string | undefined; + HumanLoopActivationConditionsEvaluationResults?: __LazyJsonString | string; } /** * @public */ -export interface GetCelebrityInfoResponse { +export interface DetectModerationLabelsResponse { /** - *

    An array of URLs pointing to additional celebrity information.

    + *

    Array of detected Moderation labels and the time, in milliseconds from the start of the + * video, they were detected.

    */ - Urls?: string[]; + ModerationLabels?: ModerationLabel[]; /** - *

    The name of the celebrity.

    + *

    Version number of the moderation detection model that was used to detect unsafe + * content.

    */ - Name?: string; + ModerationModelVersion?: string; /** - *

    Retrieves the known gender for the celebrity.

    + *

    Shows the results of the human in the loop evaluation.

    */ - KnownGender?: KnownGender; + HumanLoopActivationOutput?: HumanLoopActivationOutput; } /** * @public + *

    The number of in-progress human reviews you have has exceeded the number allowed.

    */ -export interface GetCelebrityRecognitionRequest { +export class HumanLoopQuotaExceededException extends __BaseException { + readonly name: "HumanLoopQuotaExceededException" = "HumanLoopQuotaExceededException"; + readonly $fault: "client" = "client"; /** - *

    Job identifier for the required celebrity recognition analysis. You can get the job identifer from - * a call to StartCelebrityRecognition.

    + *

    The resource type.

    */ - JobId: string | undefined; + ResourceType?: string; /** - *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. - * If you specify a value greater than 1000, a maximum of 1000 results is returned. - * The default value is 1000.

    + *

    The quota code.

    */ - MaxResults?: number; + QuotaCode?: string; /** - *

    If the previous response was incomplete (because there is more recognized celebrities to retrieve), Amazon Rekognition Video returns a pagination - * token in the response. You can use this pagination token to retrieve the next set of celebrities.

    + *

    The service code.

    */ - NextToken?: string; + ServiceCode?: string; + Message?: string; + Code?: string; /** - *

    Sort to use for celebrities returned in Celebrities field. Specify ID to sort by the celebrity identifier, - * specify TIMESTAMP to sort by the time the celebrity was recognized.

    + *

    A universally unique identifier (UUID) for the request.

    */ - SortBy?: CelebrityRecognitionSortBy | string; + Logref?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "HumanLoopQuotaExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, HumanLoopQuotaExceededException.prototype); + this.ResourceType = opts.ResourceType; + this.QuotaCode = opts.QuotaCode; + this.ServiceCode = opts.ServiceCode; + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } } /** * @public - * @enum - */ -export const VideoJobStatus = { - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - SUCCEEDED: "SUCCEEDED", -} as const; - -/** - * @public + *

    Specifies summary attributes to return from a call to DetectProtectiveEquipment. + * You can specify which types of PPE to summarize. You can also specify a minimum confidence value for detections. + * Summary information is returned in the Summary (ProtectiveEquipmentSummary) field of the response from + * DetectProtectiveEquipment. + * The summary includes which persons in an image were detected wearing the requested types of person protective equipment (PPE), which persons + * were detected as not wearing PPE, and the persons in which a determination could not be made. For more information, + * see ProtectiveEquipmentSummary.

    */ -export type VideoJobStatus = (typeof VideoJobStatus)[keyof typeof VideoJobStatus]; +export interface ProtectiveEquipmentSummarizationAttributes { + /** + *

    The minimum confidence level for which you want summary information. + * The confidence level applies to person detection, body part detection, equipment detection, and body part coverage. + * Amazon Rekognition doesn't return summary information with a confidence than this specified value. There isn't a + * default value.

    + *

    Specify a MinConfidence value that is between 50-100% as DetectProtectiveEquipment + * returns predictions only where the detection confidence is between 50% - 100%. + * If you specify a value that is less than 50%, the results are the same specifying a value of 50%.

    + *

    + *

    + */ + MinConfidence: number | undefined; -/** - * @public - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    - */ -export interface Video { /** - *

    The Amazon S3 bucket name and file name for the video.

    + *

    An array of personal protective equipment types for which you want summary information. + * If a person is detected wearing a required requipment type, the person's ID is added to the + * PersonsWithRequiredEquipment array field returned in ProtectiveEquipmentSummary + * by DetectProtectiveEquipment.

    */ - S3Object?: S3Object; + RequiredEquipmentTypes: (ProtectiveEquipmentType | string)[] | undefined; } /** * @public - * @enum */ -export const VideoColorRange = { - FULL: "FULL", - LIMITED: "LIMITED", -} as const; +export interface DetectProtectiveEquipmentRequest { + /** + *

    The image in which you want to detect PPE on detected persons. The image can be passed as image bytes or you can + * reference an image stored in an Amazon S3 bucket.

    + */ + Image: Image | undefined; -/** - * @public - */ -export type VideoColorRange = (typeof VideoColorRange)[keyof typeof VideoColorRange]; + /** + *

    An array of PPE types that you want to summarize.

    + */ + SummarizationAttributes?: ProtectiveEquipmentSummarizationAttributes; +} /** * @public - *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in - * every page of paginated responses from a Amazon Rekognition video operation.

    + *

    A person detected by a call to DetectProtectiveEquipment. The API returns + * all persons detected in the input + * image in an array of ProtectiveEquipmentPerson objects.

    */ -export interface VideoMetadata { +export interface ProtectiveEquipmentPerson { /** - *

    Type of compression used in the analyzed video.

    + *

    An array of body parts detected on a person's body (including body parts without PPE).

    */ - Codec?: string; + BodyParts?: ProtectiveEquipmentBodyPart[]; /** - *

    Length of the video in milliseconds.

    + *

    A bounding box around the detected person.

    */ - DurationMillis?: number; + BoundingBox?: BoundingBox; /** - *

    Format of the analyzed video. Possible values are MP4, MOV and AVI.

    + *

    The confidence that Amazon Rekognition has that the bounding box contains a person.

    */ - Format?: string; + Confidence?: number; /** - *

    Number of frames per second in the video.

    + *

    The identifier for the detected person. The identifier is only unique for a single call to + * DetectProtectiveEquipment.

    */ - FrameRate?: number; + Id?: number; +} +/** + * @public + *

    Summary information for required items of personal protective equipment (PPE) detected on persons by a call + * to DetectProtectiveEquipment. You specify the required type of PPE in + * the SummarizationAttributes + * (ProtectiveEquipmentSummarizationAttributes) input parameter. + * The summary includes which persons were detected wearing the required personal protective equipment + * (PersonsWithRequiredEquipment), + * which persons were detected as not wearing the required PPE (PersonsWithoutRequiredEquipment), + * and the persons in which a determination + * could not be made (PersonsIndeterminate).

    + *

    To get a total for each category, use the size of the field array. For example, + * to find out how many people were detected as wearing the specified PPE, + * use the size of the PersonsWithRequiredEquipment array. + * If you want to find out more about a person, such as the + * location (BoundingBox) of the person on the image, use the person ID in each array element. + * Each person ID matches the ID field of a ProtectiveEquipmentPerson object returned + * in the Persons array by DetectProtectiveEquipment.

    + */ +export interface ProtectiveEquipmentSummary { /** - *

    Vertical pixel dimension of the video.

    + *

    An array of IDs for persons who are wearing detected personal protective equipment. + *

    */ - FrameHeight?: number; + PersonsWithRequiredEquipment?: number[]; /** - *

    Horizontal pixel dimension of the video.

    + *

    An array of IDs for persons who are not wearing all of the types of PPE specified in the RequiredEquipmentTypes field of + * the detected personal protective equipment. + *

    */ - FrameWidth?: number; + PersonsWithoutRequiredEquipment?: number[]; /** - *

    - * A description of the range of luminance values in a video, either LIMITED (16 to 235) or FULL (0 to 255). - *

    + *

    An array of IDs for persons where it was not possible to determine if they are wearing personal protective equipment. + *

    */ - ColorRange?: VideoColorRange | string; + PersonsIndeterminate?: number[]; } /** * @public */ -export interface GetCelebrityRecognitionResponse { - /** - *

    The current status of the celebrity recognition job.

    - */ - JobStatus?: VideoJobStatus | string; - +export interface DetectProtectiveEquipmentResponse { /** - *

    If the job fails, StatusMessage provides a descriptive error message.

    + *

    The version number of the PPE detection model used to detect PPE in the image.

    */ - StatusMessage?: string; + ProtectiveEquipmentModelVersion?: string; /** - *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in - * every page of paginated responses from a Amazon Rekognition Video operation.

    + *

    An array of persons detected in the image (including persons not wearing PPE).

    */ - VideoMetadata?: VideoMetadata; + Persons?: ProtectiveEquipmentPerson[]; /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request - * to retrieve the next set of celebrities.

    + *

    Summary information for the types of PPE specified in the SummarizationAttributes input + * parameter.

    */ - NextToken?: string; + Summary?: ProtectiveEquipmentSummary; +} +/** + * @public + *

    A set of optional parameters that you can use to set the criteria that the text must meet + * to be included in your response. WordFilter looks at a word’s height, width, and + * minimum confidence. RegionOfInterest lets you set a specific region of the image + * to look for text in.

    + */ +export interface DetectTextFilters { /** - *

    Array of celebrities recognized in the video.

    + *

    A set of parameters that allow you to filter out certain results from your returned results.

    */ - Celebrities?: CelebrityRecognition[]; + WordFilter?: DetectionFilter; /** - *

    Job identifier for the celebrity recognition operation for which you - * want to obtain results. The job identifer is returned by an initial call - * to StartCelebrityRecognition.

    + *

    A Filter focusing on a certain area of the image. Uses a BoundingBox object + * to set the region of the image.

    */ - JobId?: string; + RegionsOfInterest?: RegionOfInterest[]; +} +/** + * @public + */ +export interface DetectTextRequest { /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    The input image as base64-encoded bytes or an Amazon S3 object. If you use the AWS + * CLI to call Amazon Rekognition operations, you can't pass image bytes.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ - Video?: Video; + Image: Image | undefined; /** - *

    A job identifier specified in the call to StartCelebrityRecognition and - * returned in the job completion notification sent to your - * Amazon Simple Notification Service topic.

    + *

    Optional parameters that let you set the criteria that the text must meet to be included + * in your response.

    */ - JobTag?: string; + Filters?: DetectTextFilters; } /** * @public + * @enum */ -export interface GetContentModerationRequest { +export const TextTypes = { + LINE: "LINE", + WORD: "WORD", +} as const; + +/** + * @public + */ +export type TextTypes = (typeof TextTypes)[keyof typeof TextTypes]; + +/** + * @public + *

    Information about a word or line of text detected by DetectText.

    + *

    The DetectedText field contains the text that Amazon Rekognition detected in the + * image.

    + *

    Every word and line has an identifier (Id). Each word belongs to a line + * and has a parent identifier (ParentId) that identifies the line of text in which + * the word appears. The word Id is also an index for the word within a line of + * words.

    + *

    For more information, see Detecting text in the Amazon Rekognition Developer + * Guide.

    + */ +export interface TextDetection { /** - *

    The identifier for the inappropriate, unwanted, or offensive content moderation job. Use JobId to identify the job in - * a subsequent call to GetContentModeration.

    + *

    The word or line of text recognized by Amazon Rekognition.

    */ - JobId: string | undefined; + DetectedText?: string; /** - *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. - * If you specify a value greater than 1000, a maximum of 1000 results is returned. - * The default value is 1000.

    + *

    The type of text that was detected.

    */ - MaxResults?: number; + Type?: TextTypes | string; /** - *

    If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition - * returns a pagination token in the response. You can use this pagination token - * to retrieve the next set of content moderation labels.

    + *

    The identifier for the detected text. The identifier is only unique for a single call + * to DetectText.

    */ - NextToken?: string; + Id?: number; /** - *

    Sort to use for elements in the ModerationLabelDetections array. - * Use TIMESTAMP to sort array elements by the time labels are detected. - * Use NAME to alphabetically group elements for a label together. - * Within each label group, the array element are sorted by detection confidence. - * The default sort is by TIMESTAMP.

    + *

    The Parent identifier for the detected text identified by the value of ID. + * If the type of detected text is LINE, the value of ParentId is + * Null.

    */ - SortBy?: ContentModerationSortBy | string; + ParentId?: number; /** - *

    Defines how to aggregate results of the StartContentModeration request. - * Default aggregation option is TIMESTAMPS. - * SEGMENTS mode aggregates moderation labels over time.

    + *

    The confidence that Amazon Rekognition has in the accuracy of the detected text and the accuracy + * of the geometry points around the detected text.

    */ - AggregateBy?: ContentModerationAggregateBy | string; + Confidence?: number; + + /** + *

    The location of the detected text on the image. Includes an axis aligned coarse + * bounding box surrounding the text and a finer grain polygon for more accurate spatial + * information.

    + */ + Geometry?: Geometry; } /** * @public - *

    Contains metadata about a content moderation request, - * including the SortBy and AggregateBy options.

    */ -export interface GetContentModerationRequestMetadata { +export interface DetectTextResponse { /** - *

    The sorting method chosen for a GetContentModeration request.

    + *

    An array of text that was detected in the input image.

    */ - SortBy?: ContentModerationSortBy | string; + TextDetections?: TextDetection[]; /** - *

    The aggregation method chosen for a GetContentModeration request.

    + *

    The model version used to detect text.

    */ - AggregateBy?: ContentModerationAggregateBy | string; + TextModelVersion?: string; } /** * @public + *

    Provides face metadata for the faces that are disassociated from a specific UserID.

    */ -export interface GetContentModerationResponse { +export interface DisassociatedFace { /** - *

    The current status of the content moderation analysis job.

    + *

    Unique identifier assigned to the face.

    */ - JobStatus?: VideoJobStatus | string; + FaceId?: string; +} +/** + * @public + */ +export interface DisassociateFacesRequest { /** - *

    If the job fails, StatusMessage provides a descriptive error message.

    + *

    The ID of an existing collection containing the UserID.

    */ - StatusMessage?: string; + CollectionId: string | undefined; /** - *

    Information about a video that Amazon Rekognition analyzed. Videometadata - * is returned in every page of paginated responses from GetContentModeration.

    + *

    ID for the existing UserID.

    */ - VideoMetadata?: VideoMetadata; + UserId: string | undefined; /** - *

    The detected inappropriate, unwanted, or offensive content moderation labels and the time(s) they were detected.

    + *

    Idempotent token used to identify the request to DisassociateFaces. If you + * use the same token with multiple DisassociateFaces requests, the same response is + * returned. Use ClientRequestToken to prevent the same request from being processed more than + * once.

    */ - ModerationLabels?: ContentModerationDetection[]; + ClientRequestToken?: string; /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent - * request to retrieve the next set of content moderation labels.

    + *

    An array of face IDs to disassociate from the UserID.

    */ - NextToken?: string; + FaceIds: string[] | undefined; +} - /** - *

    Version number of the moderation detection model that was used to detect inappropriate, unwanted, or offensive content.

    - */ - ModerationModelVersion?: string; +/** + * @public + * @enum + */ +export const UnsuccessfulFaceDisassociationReason = { + ASSOCIATED_TO_A_DIFFERENT_USER: "ASSOCIATED_TO_A_DIFFERENT_USER", + FACE_NOT_FOUND: "FACE_NOT_FOUND", +} as const; - /** - *

    Job identifier for the content moderation operation for which you - * want to obtain results. The job identifer is returned by an initial call - * to StartContentModeration.

    - */ - JobId?: string; +/** + * @public + */ +export type UnsuccessfulFaceDisassociationReason = + (typeof UnsuccessfulFaceDisassociationReason)[keyof typeof UnsuccessfulFaceDisassociationReason]; +/** + * @public + *

    Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully disassociated.

    + */ +export interface UnsuccessfulFaceDisassociation { /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    A unique identifier assigned to the face.

    */ - Video?: Video; + FaceId?: string; /** - *

    A job identifier specified in the call to StartContentModeration and - * returned in the job completion notification sent to your - * Amazon Simple Notification Service topic.

    + *

    A provided ID for the UserID. Unique within the collection.

    */ - JobTag?: string; + UserId?: string; /** - *

    Information about the paramters used when getting a response. Includes - * information on aggregation and sorting methods.

    + *

    The reason why the deletion was unsuccessful.

    */ - GetRequestMetadata?: GetContentModerationRequestMetadata; + Reasons?: (UnsuccessfulFaceDisassociationReason | string)[]; } /** * @public */ -export interface GetFaceDetectionRequest { +export interface DisassociateFacesResponse { /** - *

    Unique identifier for the face detection job. The JobId is returned from StartFaceDetection.

    + *

    An array of DissociatedFace objects containing FaceIds that are successfully disassociated + * with the UserID is returned. Returned if the DisassociatedFaces action is successful.

    */ - JobId: string | undefined; + DisassociatedFaces?: DisassociatedFace[]; /** - *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. - * If you specify a value greater than 1000, a maximum of 1000 results is returned. - * The default value is 1000.

    + *

    An array of UnsuccessfulDisassociation objects containing FaceIds that are not + * successfully associated, along with the reasons for the failure to associate. Returned if the + * DisassociateFaces action is successful.

    */ - MaxResults?: number; + UnsuccessfulFaceDisassociations?: UnsuccessfulFaceDisassociation[]; /** - *

    If the previous response was incomplete (because there are more faces to retrieve), Amazon Rekognition Video returns a pagination - * token in the response. You can use this pagination token to retrieve the next set of faces.

    + *

    The status of an update made to a User. Reflects if the User has been updated for every requested change.

    */ - NextToken?: string; + UserStatus?: UserStatus | string; } /** * @public + *

    + * A training dataset or a test dataset used in a dataset distribution operation. + * For more information, see DistributeDatasetEntries. + *

    */ -export interface GetFaceDetectionResponse { +export interface DistributeDataset { /** - *

    The current status of the face detection job.

    + *

    The Amazon Resource Name (ARN) of the dataset that you want to use. + *

    */ - JobStatus?: VideoJobStatus | string; + Arn: string | undefined; +} +/** + * @public + */ +export interface DistributeDatasetEntriesRequest { /** - *

    If the job fails, StatusMessage provides a descriptive error message.

    + *

    The ARNS for the training dataset and test dataset that you want to use. The datasets must belong to + * the same project. The test dataset must be empty. + *

    */ - StatusMessage?: string; + Datasets: DistributeDataset[] | undefined; +} + +/** + * @public + */ +export interface DistributeDatasetEntriesResponse {} + +/** + * @public + *

    Describes the face properties such as the bounding box, face ID, image ID of the input + * image, and external image ID that you assigned.

    + */ +export interface Face { + /** + *

    Unique identifier that Amazon Rekognition assigns to the face.

    + */ + FaceId?: string; /** - *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in - * every page of paginated responses from a Amazon Rekognition video operation.

    + *

    Bounding box of the face.

    */ - VideoMetadata?: VideoMetadata; + BoundingBox?: BoundingBox; /** - *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the subsequent request to retrieve the next set of faces.

    + *

    Unique identifier that Amazon Rekognition assigns to the input image.

    */ - NextToken?: string; + ImageId?: string; /** - *

    An array of faces detected in the video. Each element contains a detected face's details and the time, - * in milliseconds from the start of the video, the face was detected.

    + *

    Identifier that you assign to all the faces in the input image.

    */ - Faces?: FaceDetection[]; + ExternalImageId?: string; /** - *

    Job identifier for the face detection operation for which you - * want to obtain results. The job identifer is returned by an initial call - * to StartFaceDetection.

    + *

    Confidence level that the bounding box contains a face (and not a different object such + * as a tree).

    */ - JobId?: string; + Confidence?: number; /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    The version of the face detect and storage model that was used when indexing the face + * vector.

    */ - Video?: Video; + IndexFacesModelVersion?: string; /** - *

    A job identifier specified in the call to StartFaceDetection and - * returned in the job completion notification sent to your - * Amazon Simple Notification Service topic.

    + *

    Unique identifier assigned to the user.

    */ - JobTag?: string; + UserId?: string; } /** * @public + * @enum */ -export interface GetFaceLivenessSessionResultsRequest { - /** - *

    A unique 128-bit UUID. This is used to uniquely identify the session and also acts as an - * idempotency token for all operations associated with the session.

    - */ - SessionId: string | undefined; -} +export const FaceAttributes = { + ALL: "ALL", + DEFAULT: "DEFAULT", +} as const; /** * @public - * @enum */ -export const LivenessSessionStatus = { - CREATED: "CREATED", - EXPIRED: "EXPIRED", - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - SUCCEEDED: "SUCCEEDED", -} as const; +export type FaceAttributes = (typeof FaceAttributes)[keyof typeof FaceAttributes]; /** * @public + *

    Information about a face detected in a video analysis request and the time the face was detected in the video.

    */ -export type LivenessSessionStatus = (typeof LivenessSessionStatus)[keyof typeof LivenessSessionStatus]; +export interface FaceDetection { + /** + *

    Time, in milliseconds from the start of the video, that the face was detected. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the face first appears.

    + */ + Timestamp?: number; + + /** + *

    The face properties for the detected face.

    + */ + Face?: FaceDetail; +} /** * @public + *

    Provides face metadata. In addition, it also provides the confidence in the match of + * this face with the input face.

    */ -export interface GetFaceLivenessSessionResultsResponse { +export interface FaceMatch { /** - *

    The sessionId for which this request was called.

    + *

    Confidence in the match of this face with the input face.

    */ - SessionId: string | undefined; + Similarity?: number; /** - *

    Represents a status corresponding to the state of the session. Possible statuses are: - * CREATED, IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED.

    + *

    Describes the face properties such as the bounding box, face ID, image ID of the source + * image, and external image ID that you assigned.

    */ - Status: LivenessSessionStatus | string | undefined; + Face?: Face; +} +/** + * @public + *

    Object containing both the face metadata (stored in the backend database), and facial + * attributes that are detected but aren't stored in the database.

    + */ +export interface FaceRecord { /** - *

    Probabalistic confidence score for if the person in the given video was live, represented as a - * float value between 0 to 100.

    + *

    Describes the face properties such as the bounding box, face ID, image ID of the input + * image, and external image ID that you assigned.

    */ - Confidence?: number; + Face?: Face; /** - *

    A high-quality image from the Face Liveness video that can be used for face comparison or - * search. It includes a bounding box of the face and the Base64-encoded bytes that return an - * image. If the CreateFaceLivenessSession request included an OutputConfig argument, the image - * will be uploaded to an S3Object specified in the output configuration. In case the reference - * image is not returned, it's recommended to retry the Liveness check.

    + *

    Structure containing attributes of the face that the algorithm detected.

    */ - ReferenceImage?: AuditImage; + FaceDetail?: FaceDetail; +} + +/** + * @public + * @enum + */ +export const FaceSearchSortBy = { + INDEX: "INDEX", + TIMESTAMP: "TIMESTAMP", +} as const; + +/** + * @public + */ +export type FaceSearchSortBy = (typeof FaceSearchSortBy)[keyof typeof FaceSearchSortBy]; +/** + * @public + */ +export interface GetCelebrityInfoRequest { /** - *

    A set of images from the Face Liveness video that can be used for audit purposes. It - * includes a bounding box of the face and the Base64-encoded bytes that return an image. If the - * CreateFaceLivenessSession request included an OutputConfig argument, the image will be - * uploaded to an S3Object specified in the output configuration.

    + *

    The ID for the celebrity. You get the celebrity ID from a call to the RecognizeCelebrities operation, which recognizes celebrities in an image. + *

    */ - AuditImages?: AuditImage[]; + Id: string | undefined; } /** * @public - *

    Occurs when a given sessionId is not found.

    */ -export class SessionNotFoundException extends __BaseException { - readonly name: "SessionNotFoundException" = "SessionNotFoundException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; +export interface GetCelebrityInfoResponse { /** - *

    A universally unique identifier (UUID) for the request.

    + *

    An array of URLs pointing to additional celebrity information.

    */ - Logref?: string; + Urls?: string[]; + /** - * @internal + *

    The name of the celebrity.

    */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "SessionNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, SessionNotFoundException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + Name?: string; + + /** + *

    Retrieves the known gender for the celebrity.

    + */ + KnownGender?: KnownGender; } /** * @public */ -export interface GetFaceSearchRequest { +export interface GetCelebrityRecognitionRequest { /** - *

    The job identifer for the search request. You get the job identifier from an initial call to StartFaceSearch.

    + *

    Job identifier for the required celebrity recognition analysis. You can get the job identifer from + * a call to StartCelebrityRecognition.

    */ JobId: string | undefined; @@ -5108,71 +5043,109 @@ export interface GetFaceSearchRequest { MaxResults?: number; /** - *

    If the previous response was incomplete (because there is more search results to retrieve), Amazon Rekognition Video returns a pagination - * token in the response. You can use this pagination token to retrieve the next set of search results.

    + *

    If the previous response was incomplete (because there is more recognized celebrities to retrieve), Amazon Rekognition Video returns a pagination + * token in the response. You can use this pagination token to retrieve the next set of celebrities.

    */ NextToken?: string; /** - *

    Sort to use for grouping faces in the response. Use TIMESTAMP to group faces by the time - * that they are recognized. Use INDEX to sort by recognized faces.

    + *

    Sort to use for celebrities returned in Celebrities field. Specify ID to sort by the celebrity identifier, + * specify TIMESTAMP to sort by the time the celebrity was recognized.

    */ - SortBy?: FaceSearchSortBy | string; + SortBy?: CelebrityRecognitionSortBy | string; } /** * @public - *

    Details about a person detected in a video analysis request.

    + * @enum */ -export interface PersonDetail { - /** - *

    Identifier for the person detected person within a video. Use to keep track of the person throughout the video. The identifier is not stored by Amazon Rekognition.

    - */ - Index?: number; +export const VideoJobStatus = { + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", + SUCCEEDED: "SUCCEEDED", +} as const; - /** - *

    Bounding box around the detected person.

    - */ - BoundingBox?: BoundingBox; +/** + * @public + */ +export type VideoJobStatus = (typeof VideoJobStatus)[keyof typeof VideoJobStatus]; +/** + * @public + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ +export interface Video { /** - *

    Face details for the detected person.

    + *

    The Amazon S3 bucket name and file name for the video.

    */ - Face?: FaceDetail; + S3Object?: S3Object; } /** * @public - *

    Information about a person whose face matches a face(s) in an Amazon Rekognition collection. - * Includes information about the faces in the Amazon Rekognition collection (FaceMatch), information about the person (PersonDetail), and the time stamp for - * when the person was detected in a video. An array of PersonMatch objects is - * returned by GetFaceSearch.

    + * @enum */ -export interface PersonMatch { +export const VideoColorRange = { + FULL: "FULL", + LIMITED: "LIMITED", +} as const; + +/** + * @public + */ +export type VideoColorRange = (typeof VideoColorRange)[keyof typeof VideoColorRange]; + +/** + * @public + *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in + * every page of paginated responses from a Amazon Rekognition video operation.

    + */ +export interface VideoMetadata { /** - *

    The time, in milliseconds from the beginning of the video, that the person was matched in - * the video.

    + *

    Type of compression used in the analyzed video.

    */ - Timestamp?: number; + Codec?: string; /** - *

    Information about the matched person.

    + *

    Length of the video in milliseconds.

    */ - Person?: PersonDetail; + DurationMillis?: number; /** - *

    Information about the faces in the input collection that match the face of a person in the - * video.

    + *

    Format of the analyzed video. Possible values are MP4, MOV and AVI.

    + */ + Format?: string; + + /** + *

    Number of frames per second in the video.

    + */ + FrameRate?: number; + + /** + *

    Vertical pixel dimension of the video.

    + */ + FrameHeight?: number; + + /** + *

    Horizontal pixel dimension of the video.

    + */ + FrameWidth?: number; + + /** + *

    + * A description of the range of luminance values in a video, either LIMITED (16 to 235) or FULL (0 to 255). + *

    */ - FaceMatches?: FaceMatch[]; + ColorRange?: VideoColorRange | string; } /** * @public */ -export interface GetFaceSearchResponse { +export interface GetCelebrityRecognitionResponse { /** - *

    The current status of the face search job.

    + *

    The current status of the celebrity recognition job.

    */ JobStatus?: VideoJobStatus | string; @@ -5182,31 +5155,26 @@ export interface GetFaceSearchResponse { StatusMessage?: string; /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of search results.

    + *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in + * every page of paginated responses from a Amazon Rekognition Video operation.

    */ - NextToken?: string; + VideoMetadata?: VideoMetadata; /** - *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in every page of paginated responses - * from a Amazon Rekognition Video operation.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request + * to retrieve the next set of celebrities.

    */ - VideoMetadata?: VideoMetadata; + NextToken?: string; /** - *

    An array of persons, PersonMatch, - * in the video whose face(s) match the face(s) in an Amazon Rekognition collection. It also includes time information - * for when persons are matched in the video. - * You specify the input collection in an initial call to StartFaceSearch. - * Each Persons element includes a time the person was matched, - * face match details (FaceMatches) for matching faces in the collection, - * and person information (Person) for the matched person.

    + *

    Array of celebrities recognized in the video.

    */ - Persons?: PersonMatch[]; + Celebrities?: CelebrityRecognition[]; /** - *

    Job identifier for the face search operation for which you + *

    Job identifier for the celebrity recognition operation for which you * want to obtain results. The job identifer is returned by an initial call - * to StartFaceSearch.

    + * to StartCelebrityRecognition.

    */ JobId?: string; @@ -5217,134 +5185,163 @@ export interface GetFaceSearchResponse { Video?: Video; /** - *

    A job identifier specified in the call to StartFaceSearch and + *

    A job identifier specified in the call to StartCelebrityRecognition and * returned in the job completion notification sent to your * Amazon Simple Notification Service topic.

    */ JobTag?: string; } -/** - * @public - * @enum - */ -export const LabelDetectionAggregateBy = { - SEGMENTS: "SEGMENTS", - TIMESTAMPS: "TIMESTAMPS", -} as const; - -/** - * @public - */ -export type LabelDetectionAggregateBy = (typeof LabelDetectionAggregateBy)[keyof typeof LabelDetectionAggregateBy]; - -/** - * @public - * @enum - */ -export const LabelDetectionSortBy = { - NAME: "NAME", - TIMESTAMP: "TIMESTAMP", -} as const; - -/** - * @public - */ -export type LabelDetectionSortBy = (typeof LabelDetectionSortBy)[keyof typeof LabelDetectionSortBy]; - /** * @public */ -export interface GetLabelDetectionRequest { +export interface GetContentModerationRequest { /** - *

    Job identifier for the label detection operation for which you want results returned. You get the job identifer from - * an initial call to StartlabelDetection.

    + *

    The identifier for the inappropriate, unwanted, or offensive content moderation job. Use JobId to identify the job in + * a subsequent call to GetContentModeration.

    */ JobId: string | undefined; /** *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. - * If you specify a value greater than 1000, a maximum of 1000 results is returned. - * The default value is 1000.

    + * If you specify a value greater than 1000, a maximum of 1000 results is returned. + * The default value is 1000.

    */ MaxResults?: number; /** - *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns a pagination - * token in the response. You can use this pagination token to retrieve the next set of labels.

    + *

    If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition + * returns a pagination token in the response. You can use this pagination token + * to retrieve the next set of content moderation labels.

    */ NextToken?: string; /** - *

    Sort to use for elements in the Labels array. - * Use TIMESTAMP to sort array elements by the time labels are detected. - * Use NAME to alphabetically group elements for a label together. - * Within each label group, the array element are sorted by detection confidence. - * The default sort is by TIMESTAMP.

    + *

    Sort to use for elements in the ModerationLabelDetections array. + * Use TIMESTAMP to sort array elements by the time labels are detected. + * Use NAME to alphabetically group elements for a label together. + * Within each label group, the array element are sorted by detection confidence. + * The default sort is by TIMESTAMP.

    */ - SortBy?: LabelDetectionSortBy | string; + SortBy?: ContentModerationSortBy | string; /** - *

    Defines how to aggregate the returned results. Results can be aggregated by timestamps or segments.

    + *

    Defines how to aggregate results of the StartContentModeration request. + * Default aggregation option is TIMESTAMPS. + * SEGMENTS mode aggregates moderation labels over time.

    */ - AggregateBy?: LabelDetectionAggregateBy | string; + AggregateBy?: ContentModerationAggregateBy | string; } /** * @public - *

    Contains metadata about a label detection request, + *

    Contains metadata about a content moderation request, * including the SortBy and AggregateBy options.

    */ -export interface GetLabelDetectionRequestMetadata { +export interface GetContentModerationRequestMetadata { /** - *

    The sorting method chosen for a GetLabelDetection request.

    + *

    The sorting method chosen for a GetContentModeration request.

    */ - SortBy?: LabelDetectionSortBy | string; + SortBy?: ContentModerationSortBy | string; /** - *

    The aggregation method chosen for a GetLabelDetection request.

    + *

    The aggregation method chosen for a GetContentModeration request.

    */ - AggregateBy?: LabelDetectionAggregateBy | string; + AggregateBy?: ContentModerationAggregateBy | string; } /** * @public - *

    Information about a label detected in a video analysis request and the time the label was detected in the video.

    */ -export interface LabelDetection { +export interface GetContentModerationResponse { /** - *

    Time, in milliseconds from the start of the video, that the label was detected. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the label first appears.

    + *

    The current status of the content moderation analysis job.

    */ - Timestamp?: number; + JobStatus?: VideoJobStatus | string; /** - *

    Details about the detected label.

    + *

    If the job fails, StatusMessage provides a descriptive error message.

    */ - Label?: Label; + StatusMessage?: string; /** - *

    The time in milliseconds defining the start of the timeline segment containing a continuously detected label.

    + *

    Information about a video that Amazon Rekognition analyzed. Videometadata + * is returned in every page of paginated responses from GetContentModeration.

    */ - StartTimestampMillis?: number; + VideoMetadata?: VideoMetadata; /** - *

    The time in milliseconds defining the end of the timeline segment containing a continuously detected label.

    + *

    The detected inappropriate, unwanted, or offensive content moderation labels and the time(s) they were detected.

    */ - EndTimestampMillis?: number; + ModerationLabels?: ContentModerationDetection[]; /** - *

    The time duration of a segment in milliseconds, I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent + * request to retrieve the next set of content moderation labels.

    */ - DurationMillis?: number; + NextToken?: string; + + /** + *

    Version number of the moderation detection model that was used to detect inappropriate, unwanted, or offensive content.

    + */ + ModerationModelVersion?: string; + + /** + *

    Job identifier for the content moderation operation for which you + * want to obtain results. The job identifer is returned by an initial call + * to StartContentModeration.

    + */ + JobId?: string; + + /** + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ + Video?: Video; + + /** + *

    A job identifier specified in the call to StartContentModeration and + * returned in the job completion notification sent to your + * Amazon Simple Notification Service topic.

    + */ + JobTag?: string; + + /** + *

    Information about the paramters used when getting a response. Includes + * information on aggregation and sorting methods.

    + */ + GetRequestMetadata?: GetContentModerationRequestMetadata; } /** * @public */ -export interface GetLabelDetectionResponse { +export interface GetFaceDetectionRequest { /** - *

    The current status of the label detection job.

    + *

    Unique identifier for the face detection job. The JobId is returned from StartFaceDetection.

    + */ + JobId: string | undefined; + + /** + *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. + * If you specify a value greater than 1000, a maximum of 1000 results is returned. + * The default value is 1000.

    + */ + MaxResults?: number; + + /** + *

    If the previous response was incomplete (because there are more faces to retrieve), Amazon Rekognition Video returns a pagination + * token in the response. You can use this pagination token to retrieve the next set of faces.

    + */ + NextToken?: string; +} + +/** + * @public + */ +export interface GetFaceDetectionResponse { + /** + *

    The current status of the face detection job.

    */ JobStatus?: VideoJobStatus | string; @@ -5360,70 +5357,139 @@ export interface GetLabelDetectionResponse { VideoMetadata?: VideoMetadata; /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request - * to retrieve the next set of labels.

    + *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the subsequent request to retrieve the next set of faces.

    */ NextToken?: string; /** - *

    An array of labels detected in the video. Each element contains the detected label and the time, - * in milliseconds from the start of the video, that the label was detected.

    + *

    An array of faces detected in the video. Each element contains a detected face's details and the time, + * in milliseconds from the start of the video, the face was detected.

    */ - Labels?: LabelDetection[]; + Faces?: FaceDetection[]; /** - *

    Version number of the label detection model that was used to detect labels.

    + *

    Job identifier for the face detection operation for which you + * want to obtain results. The job identifer is returned by an initial call + * to StartFaceDetection.

    */ - LabelModelVersion?: string; + JobId?: string; + + /** + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ + Video?: Video; + + /** + *

    A job identifier specified in the call to StartFaceDetection and + * returned in the job completion notification sent to your + * Amazon Simple Notification Service topic.

    + */ + JobTag?: string; +} + +/** + * @public + */ +export interface GetFaceLivenessSessionResultsRequest { + /** + *

    A unique 128-bit UUID. This is used to uniquely identify the session and also acts as an + * idempotency token for all operations associated with the session.

    + */ + SessionId: string | undefined; +} + +/** + * @public + * @enum + */ +export const LivenessSessionStatus = { + CREATED: "CREATED", + EXPIRED: "EXPIRED", + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", + SUCCEEDED: "SUCCEEDED", +} as const; + +/** + * @public + */ +export type LivenessSessionStatus = (typeof LivenessSessionStatus)[keyof typeof LivenessSessionStatus]; + +/** + * @public + */ +export interface GetFaceLivenessSessionResultsResponse { + /** + *

    The sessionId for which this request was called.

    + */ + SessionId: string | undefined; /** - *

    Job identifier for the label detection operation for which you - * want to obtain results. The job identifer is returned by an initial call - * to StartLabelDetection.

    + *

    Represents a status corresponding to the state of the session. Possible statuses are: + * CREATED, IN_PROGRESS, SUCCEEDED, FAILED, EXPIRED.

    */ - JobId?: string; + Status: LivenessSessionStatus | string | undefined; /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    Probabalistic confidence score for if the person in the given video was live, represented as a + * float value between 0 to 100.

    */ - Video?: Video; + Confidence?: number; /** - *

    A job identifier specified in the call to StartLabelDetection and - * returned in the job completion notification sent to your - * Amazon Simple Notification Service topic.

    + *

    A high-quality image from the Face Liveness video that can be used for face comparison or + * search. It includes a bounding box of the face and the Base64-encoded bytes that return an + * image. If the CreateFaceLivenessSession request included an OutputConfig argument, the image + * will be uploaded to an S3Object specified in the output configuration. In case the reference + * image is not returned, it's recommended to retry the Liveness check.

    */ - JobTag?: string; + ReferenceImage?: AuditImage; /** - *

    Information about the paramters used when getting a response. Includes - * information on aggregation and sorting methods.

    + *

    A set of images from the Face Liveness video that can be used for audit purposes. It + * includes a bounding box of the face and the Base64-encoded bytes that return an image. If the + * CreateFaceLivenessSession request included an OutputConfig argument, the image will be + * uploaded to an S3Object specified in the output configuration.

    */ - GetRequestMetadata?: GetLabelDetectionRequestMetadata; + AuditImages?: AuditImage[]; } /** * @public - * @enum - */ -export const PersonTrackingSortBy = { - INDEX: "INDEX", - TIMESTAMP: "TIMESTAMP", -} as const; - -/** - * @public + *

    Occurs when a given sessionId is not found.

    */ -export type PersonTrackingSortBy = (typeof PersonTrackingSortBy)[keyof typeof PersonTrackingSortBy]; +export class SessionNotFoundException extends __BaseException { + readonly name: "SessionNotFoundException" = "SessionNotFoundException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; + /** + *

    A universally unique identifier (UUID) for the request.

    + */ + Logref?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "SessionNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, SessionNotFoundException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} /** * @public */ -export interface GetPersonTrackingRequest { +export interface GetFaceSearchRequest { /** - *

    The identifier for a job that tracks persons in a video. You get the JobId from a call to StartPersonTracking. - *

    + *

    The job identifer for the search request. You get the job identifier from an initial call to StartFaceSearch.

    */ JobId: string | undefined; @@ -5435,46 +5501,71 @@ export interface GetPersonTrackingRequest { MaxResults?: number; /** - *

    If the previous response was incomplete (because there are more persons to retrieve), Amazon Rekognition Video returns a pagination - * token in the response. You can use this pagination token to retrieve the next set of persons.

    + *

    If the previous response was incomplete (because there is more search results to retrieve), Amazon Rekognition Video returns a pagination + * token in the response. You can use this pagination token to retrieve the next set of search results.

    */ NextToken?: string; /** - *

    Sort to use for elements in the Persons array. Use TIMESTAMP to sort array elements - * by the time persons are detected. Use INDEX to sort by the tracked persons. - * If you sort by INDEX, the array elements for each person are sorted by detection confidence. - * The default sort is by TIMESTAMP.

    + *

    Sort to use for grouping faces in the response. Use TIMESTAMP to group faces by the time + * that they are recognized. Use INDEX to sort by recognized faces.

    */ - SortBy?: PersonTrackingSortBy | string; + SortBy?: FaceSearchSortBy | string; } /** * @public - *

    Details and path tracking information for a single time a person's path is tracked in a video. - * Amazon Rekognition operations that track people's paths return an array of PersonDetection objects - * with elements for each time a person's path is tracked in a video.

    - *

    For more information, see GetPersonTracking in the Amazon Rekognition Developer Guide.

    + *

    Details about a person detected in a video analysis request.

    */ -export interface PersonDetection { +export interface PersonDetail { /** - *

    The time, in milliseconds from the start of the video, that the person's path was tracked. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the person's path first appears.

    + *

    Identifier for the person detected person within a video. Use to keep track of the person throughout the video. The identifier is not stored by Amazon Rekognition.

    + */ + Index?: number; + + /** + *

    Bounding box around the detected person.

    + */ + BoundingBox?: BoundingBox; + + /** + *

    Face details for the detected person.

    + */ + Face?: FaceDetail; +} + +/** + * @public + *

    Information about a person whose face matches a face(s) in an Amazon Rekognition collection. + * Includes information about the faces in the Amazon Rekognition collection (FaceMatch), information about the person (PersonDetail), and the time stamp for + * when the person was detected in a video. An array of PersonMatch objects is + * returned by GetFaceSearch.

    + */ +export interface PersonMatch { + /** + *

    The time, in milliseconds from the beginning of the video, that the person was matched in + * the video.

    */ Timestamp?: number; /** - *

    Details about a person whose path was tracked in a video.

    + *

    Information about the matched person.

    */ Person?: PersonDetail; + + /** + *

    Information about the faces in the input collection that match the face of a person in the + * video.

    + */ + FaceMatches?: FaceMatch[]; } /** * @public */ -export interface GetPersonTrackingResponse { +export interface GetFaceSearchResponse { /** - *

    The current status of the person tracking job.

    + *

    The current status of the face search job.

    */ JobStatus?: VideoJobStatus | string; @@ -5484,26 +5575,31 @@ export interface GetPersonTrackingResponse { StatusMessage?: string; /** - *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in - * every page of paginated responses from a Amazon Rekognition Video operation.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of search results.

    */ - VideoMetadata?: VideoMetadata; + NextToken?: string; /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of persons.

    + *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in every page of paginated responses + * from a Amazon Rekognition Video operation.

    */ - NextToken?: string; + VideoMetadata?: VideoMetadata; /** - *

    An array of the persons detected in the video and the time(s) their path was tracked throughout the video. - * An array element will exist for each time a person's path is tracked.

    + *

    An array of persons, PersonMatch, + * in the video whose face(s) match the face(s) in an Amazon Rekognition collection. It also includes time information + * for when persons are matched in the video. + * You specify the input collection in an initial call to StartFaceSearch. + * Each Persons element includes a time the person was matched, + * face match details (FaceMatches) for matching faces in the collection, + * and person information (Person) for the matched person.

    */ - Persons?: PersonDetection[]; + Persons?: PersonMatch[]; /** - *

    Job identifier for the person tracking operation for which you + *

    Job identifier for the face search operation for which you * want to obtain results. The job identifer is returned by an initial call - * to StartPersonTracking.

    + * to StartFaceSearch.

    */ JobId?: string; @@ -5514,206 +5610,134 @@ export interface GetPersonTrackingResponse { Video?: Video; /** - *

    A job identifier specified in the call to StartCelebrityRecognition and + *

    A job identifier specified in the call to StartFaceSearch and * returned in the job completion notification sent to your * Amazon Simple Notification Service topic.

    */ JobTag?: string; } -/** - * @public - */ -export interface GetSegmentDetectionRequest { - /** - *

    Job identifier for the text detection operation for which you want results returned. - * You get the job identifer from an initial call to StartSegmentDetection.

    - */ - JobId: string | undefined; - - /** - *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000.

    - */ - MaxResults?: number; - - /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent - * request to retrieve the next set of text.

    - */ - NextToken?: string; -} - -/** - * @public - *

    Information about a shot detection segment detected in a video. For more information, - * see SegmentDetection.

    - */ -export interface ShotSegment { - /** - *

    An Identifier for a shot detection segment detected in a video.

    - */ - Index?: number; - - /** - *

    The confidence that Amazon Rekognition Video has in the accuracy of the detected segment.

    - */ - Confidence?: number; -} - /** * @public * @enum */ -export const TechnicalCueType = { - BLACK_FRAMES: "BlackFrames", - COLOR_BARS: "ColorBars", - CONTENT: "Content", - END_CREDITS: "EndCredits", - OPENING_CREDITS: "OpeningCredits", - SLATE: "Slate", - STUDIO_LOGO: "StudioLogo", +export const LabelDetectionAggregateBy = { + SEGMENTS: "SEGMENTS", + TIMESTAMPS: "TIMESTAMPS", } as const; /** * @public */ -export type TechnicalCueType = (typeof TechnicalCueType)[keyof typeof TechnicalCueType]; - -/** - * @public - *

    Information about a technical cue segment. For more information, see SegmentDetection.

    - */ -export interface TechnicalCueSegment { - /** - *

    The type of the technical cue.

    - */ - Type?: TechnicalCueType | string; - - /** - *

    The confidence that Amazon Rekognition Video has in the accuracy of the detected segment.

    - */ - Confidence?: number; -} +export type LabelDetectionAggregateBy = (typeof LabelDetectionAggregateBy)[keyof typeof LabelDetectionAggregateBy]; /** * @public * @enum */ -export const SegmentType = { - SHOT: "SHOT", - TECHNICAL_CUE: "TECHNICAL_CUE", +export const LabelDetectionSortBy = { + NAME: "NAME", + TIMESTAMP: "TIMESTAMP", } as const; /** * @public */ -export type SegmentType = (typeof SegmentType)[keyof typeof SegmentType]; +export type LabelDetectionSortBy = (typeof LabelDetectionSortBy)[keyof typeof LabelDetectionSortBy]; /** * @public - *

    A technical cue or shot detection segment detected in a video. An array - * of SegmentDetection objects containing all segments detected in a stored video - * is returned by GetSegmentDetection. - *

    */ -export interface SegmentDetection { - /** - *

    The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

    - */ - Type?: SegmentType | string; - - /** - *

    The start time of the detected segment in milliseconds from the start of the video. This value - * is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of - * 100 millis.

    - */ - StartTimestampMillis?: number; - +export interface GetLabelDetectionRequest { /** - *

    The end time of the detected segment, in milliseconds, from the start of the video. - * This value is rounded down.

    + *

    Job identifier for the label detection operation for which you want results returned. You get the job identifer from + * an initial call to StartlabelDetection.

    */ - EndTimestampMillis?: number; + JobId: string | undefined; /** - *

    The duration of the detected segment in milliseconds.

    + *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. + * If you specify a value greater than 1000, a maximum of 1000 results is returned. + * The default value is 1000.

    */ - DurationMillis?: number; + MaxResults?: number; /** - *

    The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. - * StartTimecode is in HH:MM:SS:fr format - * (and ;fr for drop frame-rates).

    + *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns a pagination + * token in the response. You can use this pagination token to retrieve the next set of labels.

    */ - StartTimecodeSMPTE?: string; + NextToken?: string; /** - *

    The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. - * EndTimecode is in HH:MM:SS:fr format - * (and ;fr for drop frame-rates).

    + *

    Sort to use for elements in the Labels array. + * Use TIMESTAMP to sort array elements by the time labels are detected. + * Use NAME to alphabetically group elements for a label together. + * Within each label group, the array element are sorted by detection confidence. + * The default sort is by TIMESTAMP.

    */ - EndTimecodeSMPTE?: string; + SortBy?: LabelDetectionSortBy | string; /** - *

    The duration of the timecode for the detected segment in SMPTE format.

    + *

    Defines how to aggregate the returned results. Results can be aggregated by timestamps or segments.

    */ - DurationSMPTE?: string; + AggregateBy?: LabelDetectionAggregateBy | string; +} +/** + * @public + *

    Contains metadata about a label detection request, + * including the SortBy and AggregateBy options.

    + */ +export interface GetLabelDetectionRequestMetadata { /** - *

    If the segment is a technical cue, contains information about the technical cue.

    + *

    The sorting method chosen for a GetLabelDetection request.

    */ - TechnicalCueSegment?: TechnicalCueSegment; + SortBy?: LabelDetectionSortBy | string; /** - *

    If the segment is a shot detection, contains information about the shot detection.

    + *

    The aggregation method chosen for a GetLabelDetection request.

    */ - ShotSegment?: ShotSegment; + AggregateBy?: LabelDetectionAggregateBy | string; +} +/** + * @public + *

    Information about a label detected in a video analysis request and the time the label was detected in the video.

    + */ +export interface LabelDetection { /** - *

    - * The frame number of the start of a video segment, using a frame index that starts with 0. - *

    + *

    Time, in milliseconds from the start of the video, that the label was detected. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the label first appears.

    */ - StartFrameNumber?: number; + Timestamp?: number; /** - *

    - * The frame number at the end of a video segment, using a frame index that starts with 0. - *

    + *

    Details about the detected label.

    */ - EndFrameNumber?: number; + Label?: Label; /** - *

    - * The duration of a video segment, expressed in frames. - *

    + *

    The time in milliseconds defining the start of the timeline segment containing a continuously detected label.

    */ - DurationFrames?: number; -} + StartTimestampMillis?: number; -/** - * @public - *

    Information about the type of a segment requested in a call to StartSegmentDetection. - * An array of SegmentTypeInfo objects is returned by the response from GetSegmentDetection.

    - */ -export interface SegmentTypeInfo { /** - *

    The type of a segment (technical cue or shot detection).

    + *

    The time in milliseconds defining the end of the timeline segment containing a continuously detected label.

    */ - Type?: SegmentType | string; + EndTimestampMillis?: number; /** - *

    The version of the model used to detect segments.

    + *

    The time duration of a segment in milliseconds, I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.

    */ - ModelVersion?: string; + DurationMillis?: number; } /** * @public */ -export interface GetSegmentDetectionResponse { +export interface GetLabelDetectionResponse { /** - *

    Current status of the segment detection job.

    + *

    The current status of the label detection job.

    */ JobStatus?: VideoJobStatus | string; @@ -5723,48 +5747,32 @@ export interface GetSegmentDetectionResponse { StatusMessage?: string; /** - *

    Currently, Amazon Rekognition Video returns a single object in the - * VideoMetadata array. The object - * contains information about the video stream in the input file that Amazon Rekognition Video chose to analyze. - * The VideoMetadata object includes the video codec, video format and other information. - * Video metadata is returned in each page of information returned by GetSegmentDetection.

    - */ - VideoMetadata?: VideoMetadata[]; - - /** - *

    An array of - * objects. There can be multiple audio streams. - * Each AudioMetadata object contains metadata for a single audio stream. - * Audio information in an AudioMetadata objects includes - * the audio codec, the number of audio channels, the duration of the audio stream, - * and the sample rate. Audio metadata is returned in each page of information returned - * by GetSegmentDetection.

    + *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in + * every page of paginated responses from a Amazon Rekognition video operation.

    */ - AudioMetadata?: AudioMetadata[]; + VideoMetadata?: VideoMetadata; /** - *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns - * a pagination token in the response. You can use this pagination token to retrieve the next set of text.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request + * to retrieve the next set of labels.

    */ NextToken?: string; /** - *

    An array of segments detected in a video. The array is sorted by the segment types (TECHNICAL_CUE or SHOT) - * specified in the SegmentTypes input parameter of StartSegmentDetection. Within - * each segment type the array is sorted by timestamp values.

    + *

    An array of labels detected in the video. Each element contains the detected label and the time, + * in milliseconds from the start of the video, that the label was detected.

    */ - Segments?: SegmentDetection[]; + Labels?: LabelDetection[]; /** - *

    An array containing the segment types requested in the call to StartSegmentDetection. - *

    + *

    Version number of the label detection model that was used to detect labels.

    */ - SelectedSegmentTypes?: SegmentTypeInfo[]; + LabelModelVersion?: string; /** - *

    Job identifier for the segment detection operation for which you + *

    Job identifier for the label detection operation for which you * want to obtain results. The job identifer is returned by an initial call - * to StartSegmentDetection.

    + * to StartLabelDetection.

    */ JobId?: string; @@ -5775,59 +5783,91 @@ export interface GetSegmentDetectionResponse { Video?: Video; /** - *

    A job identifier specified in the call to StartSegmentDetection and + *

    A job identifier specified in the call to StartLabelDetection and * returned in the job completion notification sent to your * Amazon Simple Notification Service topic.

    */ JobTag?: string; + + /** + *

    Information about the paramters used when getting a response. Includes + * information on aggregation and sorting methods.

    + */ + GetRequestMetadata?: GetLabelDetectionRequestMetadata; } /** * @public + * @enum */ -export interface GetTextDetectionRequest { +export const PersonTrackingSortBy = { + INDEX: "INDEX", + TIMESTAMP: "TIMESTAMP", +} as const; + +/** + * @public + */ +export type PersonTrackingSortBy = (typeof PersonTrackingSortBy)[keyof typeof PersonTrackingSortBy]; + +/** + * @public + */ +export interface GetPersonTrackingRequest { /** - *

    Job identifier for the text detection operation for which you want results returned. - * You get the job identifer from an initial call to StartTextDetection.

    + *

    The identifier for a job that tracks persons in a video. You get the JobId from a call to StartPersonTracking. + *

    */ JobId: string | undefined; /** - *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000.

    + *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000. + * If you specify a value greater than 1000, a maximum of 1000 results is returned. + * The default value is 1000.

    */ MaxResults?: number; /** - *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns - * a pagination token in the response. You can use this pagination token to retrieve the next set of text.

    + *

    If the previous response was incomplete (because there are more persons to retrieve), Amazon Rekognition Video returns a pagination + * token in the response. You can use this pagination token to retrieve the next set of persons.

    */ NextToken?: string; + + /** + *

    Sort to use for elements in the Persons array. Use TIMESTAMP to sort array elements + * by the time persons are detected. Use INDEX to sort by the tracked persons. + * If you sort by INDEX, the array elements for each person are sorted by detection confidence. + * The default sort is by TIMESTAMP.

    + */ + SortBy?: PersonTrackingSortBy | string; } /** * @public - *

    Information about text detected in a video. Incudes the detected text, - * the time in milliseconds from the start of the video that the text was detected, and where it was detected on the screen.

    + *

    Details and path tracking information for a single time a person's path is tracked in a video. + * Amazon Rekognition operations that track people's paths return an array of PersonDetection objects + * with elements for each time a person's path is tracked in a video.

    + *

    For more information, see GetPersonTracking in the Amazon Rekognition Developer Guide.

    */ -export interface TextDetectionResult { +export interface PersonDetection { /** - *

    The time, in milliseconds from the start of the video, that the text was detected. - * Note that Timestamp is not guaranteed to be accurate to the individual frame where the text first appears.

    + *

    The time, in milliseconds from the start of the video, that the person's path was tracked. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the person's path first appears.

    */ Timestamp?: number; /** - *

    Details about text detected in a video.

    + *

    Details about a person whose path was tracked in a video.

    */ - TextDetection?: TextDetection; + Person?: PersonDetail; } /** * @public */ -export interface GetTextDetectionResponse { +export interface GetPersonTrackingResponse { /** - *

    Current status of the text detection job.

    + *

    The current status of the person tracking job.

    */ JobStatus?: VideoJobStatus | string; @@ -5837,32 +5877,26 @@ export interface GetTextDetectionResponse { StatusMessage?: string; /** - *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in - * every page of paginated responses from a Amazon Rekognition video operation.

    + *

    Information about a video that Amazon Rekognition Video analyzed. Videometadata is returned in + * every page of paginated responses from a Amazon Rekognition Video operation.

    */ VideoMetadata?: VideoMetadata; /** - *

    An array of text detected in the video. Each element contains the detected text, the time in milliseconds - * from the start of the video that the text was detected, and where it was detected on the screen.

    - */ - TextDetections?: TextDetectionResult[]; - - /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent - * request to retrieve the next set of text.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of persons.

    */ NextToken?: string; /** - *

    Version number of the text detection model that was used to detect text.

    + *

    An array of the persons detected in the video and the time(s) their path was tracked throughout the video. + * An array element will exist for each time a person's path is tracked.

    */ - TextModelVersion?: string; + Persons?: PersonDetection[]; /** - *

    Job identifier for the text detection operation for which you + *

    Job identifier for the person tracking operation for which you * want to obtain results. The job identifer is returned by an initial call - * to StartTextDetection.

    + * to StartPersonTracking.

    */ JobId?: string; @@ -5873,810 +5907,806 @@ export interface GetTextDetectionResponse { Video?: Video; /** - *

    A job identifier specified in the call to StartTextDetection and + *

    A job identifier specified in the call to StartCelebrityRecognition and * returned in the job completion notification sent to your * Amazon Simple Notification Service topic.

    */ JobTag?: string; } -/** - * @public - *

    A ClientRequestToken input parameter was reused with an operation, but at least one of the other input - * parameters is different from the previous call to the operation.

    - */ -export class IdempotentParameterMismatchException extends __BaseException { - readonly name: "IdempotentParameterMismatchException" = "IdempotentParameterMismatchException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; - /** - *

    A universally unique identifier (UUID) for the request.

    - */ - Logref?: string; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "IdempotentParameterMismatchException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IdempotentParameterMismatchException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } -} - -/** - * @public - */ -export interface IndexFacesRequest { - /** - *

    The ID of an existing collection to which you want to add the faces that are detected - * in the input images.

    - */ - CollectionId: string | undefined; - +/** + * @public + */ +export interface GetSegmentDetectionRequest { /** - *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes isn't supported.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    + *

    Job identifier for the text detection operation for which you want results returned. + * You get the job identifer from an initial call to StartSegmentDetection.

    */ - Image: Image | undefined; + JobId: string | undefined; /** - *

    The ID you want to assign to all the faces detected in the image.

    + *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000.

    */ - ExternalImageId?: string; + MaxResults?: number; /** - *

    An array of facial attributes you want to be returned. A DEFAULT subset of - * facial attributes - BoundingBox, Confidence, Pose, - * Quality, and Landmarks - will always be returned. You can request - * for specific facial attributes (in addition to the default list) - by using ["DEFAULT", - * "FACE_OCCLUDED"] or just ["FACE_OCCLUDED"]. You can request for all - * facial attributes by using ["ALL"]. Requesting more attributes may increase - * response time.

    - *

    If you provide both, ["ALL", "DEFAULT"], the service uses a logical AND - * operator to determine which attributes to return (in this case, all attributes).

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent + * request to retrieve the next set of text.

    */ - DetectionAttributes?: (Attribute | string)[]; + NextToken?: string; +} +/** + * @public + *

    Information about a shot detection segment detected in a video. For more information, + * see SegmentDetection.

    + */ +export interface ShotSegment { /** - *

    The maximum number of faces to index. The value of MaxFaces must be greater - * than or equal to 1. IndexFaces returns no more than 100 detected faces in an - * image, even if you specify a larger value for MaxFaces.

    - *

    If IndexFaces detects more faces than the value of MaxFaces, the - * faces with the lowest quality are filtered out first. If there are still more faces than the - * value of MaxFaces, the faces with the smallest bounding boxes are filtered out - * (up to the number that's needed to satisfy the value of MaxFaces). Information - * about the unindexed faces is available in the UnindexedFaces array.

    - *

    The faces that are returned by IndexFaces are sorted by the largest face - * bounding box size to the smallest size, in descending order.

    - *

    - * MaxFaces can be used with a collection associated with any version of the - * face model.

    + *

    An Identifier for a shot detection segment detected in a video.

    */ - MaxFaces?: number; + Index?: number; /** - *

    A filter that specifies a quality bar for how much filtering is done to identify faces. - * Filtered faces aren't indexed. If you specify AUTO, Amazon Rekognition chooses the quality - * bar. If you specify LOW, MEDIUM, or HIGH, filtering - * removes all faces that don’t meet the chosen quality bar. The default value is - * AUTO. - * The quality bar is based on a variety of common use cases. Low-quality detections can occur - * for a number of reasons. Some examples are an object that's misidentified as a face, a face - * that's too blurry, or a face with a pose that's too extreme to use. If you specify - * NONE, no filtering is performed.

    - *

    To use quality filtering, the collection you are using must be associated with version 3 - * of the face model or higher.

    + *

    The confidence that Amazon Rekognition Video has in the accuracy of the detected segment.

    */ - QualityFilter?: QualityFilter | string; + Confidence?: number; } /** * @public * @enum */ -export const Reason = { - EXCEEDS_MAX_FACES: "EXCEEDS_MAX_FACES", - EXTREME_POSE: "EXTREME_POSE", - LOW_BRIGHTNESS: "LOW_BRIGHTNESS", - LOW_CONFIDENCE: "LOW_CONFIDENCE", - LOW_FACE_QUALITY: "LOW_FACE_QUALITY", - LOW_SHARPNESS: "LOW_SHARPNESS", - SMALL_BOUNDING_BOX: "SMALL_BOUNDING_BOX", +export const TechnicalCueType = { + BLACK_FRAMES: "BlackFrames", + COLOR_BARS: "ColorBars", + CONTENT: "Content", + END_CREDITS: "EndCredits", + OPENING_CREDITS: "OpeningCredits", + SLATE: "Slate", + STUDIO_LOGO: "StudioLogo", } as const; /** * @public */ -export type Reason = (typeof Reason)[keyof typeof Reason]; +export type TechnicalCueType = (typeof TechnicalCueType)[keyof typeof TechnicalCueType]; /** * @public - *

    A face that IndexFaces detected, but didn't index. Use the - * Reasons response attribute to determine why a face wasn't indexed.

    + *

    Information about a technical cue segment. For more information, see SegmentDetection.

    */ -export interface UnindexedFace { +export interface TechnicalCueSegment { /** - *

    An array of reasons that specify why a face wasn't indexed.

    - *
      - *
    • - *

      EXTREME_POSE - The face is at a pose that can't be detected. For example, the head is - * turned too far away from the camera.

      - *
    • - *
    • - *

      EXCEEDS_MAX_FACES - The number of faces detected is already higher than that specified - * by the MaxFaces input parameter for IndexFaces.

      - *
    • - *
    • - *

      LOW_BRIGHTNESS - The image is too dark.

      - *
    • - *
    • - *

      LOW_SHARPNESS - The image is too blurry.

      - *
    • - *
    • - *

      LOW_CONFIDENCE - The face was detected with a low confidence.

      - *
    • - *
    • - *

      SMALL_BOUNDING_BOX - The bounding box around the face is too small.

      - *
    • - *
    + *

    The type of the technical cue.

    */ - Reasons?: (Reason | string)[]; + Type?: TechnicalCueType | string; /** - *

    The - * structure that contains attributes of a face that - * IndexFacesdetected, but didn't index.

    + *

    The confidence that Amazon Rekognition Video has in the accuracy of the detected segment.

    */ - FaceDetail?: FaceDetail; + Confidence?: number; } /** * @public + * @enum */ -export interface IndexFacesResponse { +export const SegmentType = { + SHOT: "SHOT", + TECHNICAL_CUE: "TECHNICAL_CUE", +} as const; + +/** + * @public + */ +export type SegmentType = (typeof SegmentType)[keyof typeof SegmentType]; + +/** + * @public + *

    A technical cue or shot detection segment detected in a video. An array + * of SegmentDetection objects containing all segments detected in a stored video + * is returned by GetSegmentDetection. + *

    + */ +export interface SegmentDetection { /** - *

    An array of faces detected and added to the collection. For more information, - * see Searching Faces in a Collection in the Amazon Rekognition Developer Guide.

    + *

    The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

    */ - FaceRecords?: FaceRecord[]; + Type?: SegmentType | string; /** - *

    If your collection is associated with a face detection model that's later than version - * 3.0, the value of OrientationCorrection is always null and no orientation - * information is returned.

    - *

    If your collection is associated with a face detection model that's version 3.0 or - * earlier, the following applies:

    - *
      - *
    • - *

      If the input image is in .jpeg format, it might contain exchangeable image file format - * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation - * information to perform image correction - the bounding box coordinates are translated to - * represent object locations after the orientation information in the Exif metadata is used - * to correct the image orientation. Images in .png format don't contain Exif metadata. The - * value of OrientationCorrection is null.

      - *
    • - *
    • - *

      If the image doesn't contain orientation information in its Exif metadata, Amazon Rekognition - * returns an estimated orientation (ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270). Amazon Rekognition - * doesn’t perform image correction for images. The bounding box coordinates aren't - * translated and represent the object locations before the image is rotated.

      - *
    • - *
    - *

    Bounding box information is returned in the FaceRecords array. You can get - * the version of the face detection model by calling DescribeCollection.

    + *

    The start time of the detected segment in milliseconds from the start of the video. This value + * is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of + * 100 millis.

    */ - OrientationCorrection?: OrientationCorrection | string; + StartTimestampMillis?: number; /** - *

    The version number of the face detection model that's associated with the input - * collection (CollectionId).

    + *

    The end time of the detected segment, in milliseconds, from the start of the video. + * This value is rounded down.

    */ - FaceModelVersion?: string; + EndTimestampMillis?: number; /** - *

    An array of faces that were detected in the image but weren't indexed. They weren't - * indexed because the quality filter identified them as low quality, or the - * MaxFaces request parameter filtered them out. To use the quality filter, you - * specify the QualityFilter request parameter.

    + *

    The duration of the detected segment in milliseconds.

    */ - UnindexedFaces?: UnindexedFace[]; -} + DurationMillis?: number; -/** - * @public - *

    Specifies the starting point in a Kinesis stream to start processing. You can use the - * producer timestamp or the fragment number. One of either producer timestamp or fragment - * number is required. If you use the producer timestamp, you must put the time in - * milliseconds. For more information about fragment numbers, see Fragment.

    - */ -export interface KinesisVideoStreamStartSelector { /** - *

    The timestamp from the producer corresponding to the fragment, in milliseconds, - * expressed in unix time format.

    + *

    The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. + * StartTimecode is in HH:MM:SS:fr format + * (and ;fr for drop frame-rates).

    */ - ProducerTimestamp?: number; + StartTimecodeSMPTE?: string; /** - *

    - * The unique identifier of the fragment. This value monotonically increases based on the ingestion order. - *

    + *

    The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. + * EndTimecode is in HH:MM:SS:fr format + * (and ;fr for drop frame-rates).

    */ - FragmentNumber?: string; -} + EndTimecodeSMPTE?: string; -/** - * @public - * @enum - */ -export const LabelDetectionFeatureName = { - GENERAL_LABELS: "GENERAL_LABELS", -} as const; + /** + *

    The duration of the timecode for the detected segment in SMPTE format.

    + */ + DurationSMPTE?: string; -/** - * @public - */ -export type LabelDetectionFeatureName = (typeof LabelDetectionFeatureName)[keyof typeof LabelDetectionFeatureName]; + /** + *

    If the segment is a technical cue, contains information about the technical cue.

    + */ + TechnicalCueSegment?: TechnicalCueSegment; + + /** + *

    If the segment is a shot detection, contains information about the shot detection.

    + */ + ShotSegment?: ShotSegment; + + /** + *

    + * The frame number of the start of a video segment, using a frame index that starts with 0. + *

    + */ + StartFrameNumber?: number; + + /** + *

    + * The frame number at the end of a video segment, using a frame index that starts with 0. + *

    + */ + EndFrameNumber?: number; -/** - * @public - *

    Contains the specified filters that should be applied to a list of returned GENERAL_LABELS.

    - */ -export interface LabelDetectionSettings { /** - *

    Contains filters for the object labels returned by DetectLabels. Filters can be inclusive, - * exclusive, or a combination of both and can be applied to individual labels or entire label categories. - * To see a list of label categories, see Detecting Labels.

    + *

    + * The duration of a video segment, expressed in frames. + *

    */ - GeneralLabels?: GeneralLabelsSettings; + DurationFrames?: number; } /** * @public + *

    Information about the type of a segment requested in a call to StartSegmentDetection. + * An array of SegmentTypeInfo objects is returned by the response from GetSegmentDetection.

    */ -export interface ListCollectionsRequest { +export interface SegmentTypeInfo { /** - *

    Pagination token from the previous response.

    + *

    The type of a segment (technical cue or shot detection).

    */ - NextToken?: string; + Type?: SegmentType | string; /** - *

    Maximum number of collection IDs to return.

    + *

    The version of the model used to detect segments.

    */ - MaxResults?: number; + ModelVersion?: string; } /** * @public */ -export interface ListCollectionsResponse { +export interface GetSegmentDetectionResponse { /** - *

    An array of collection IDs.

    + *

    Current status of the segment detection job.

    */ - CollectionIds?: string[]; + JobStatus?: VideoJobStatus | string; /** - *

    If the result is truncated, the response provides a NextToken that you can - * use in the subsequent request to fetch the next set of collection IDs.

    + *

    If the job fails, StatusMessage provides a descriptive error message.

    */ - NextToken?: string; + StatusMessage?: string; /** - *

    Version numbers of the face detection models associated with the collections in the - * array CollectionIds. For example, the value of FaceModelVersions[2] - * is the version number for the face detection model used by the collection in - * CollectionId[2].

    + *

    Currently, Amazon Rekognition Video returns a single object in the + * VideoMetadata array. The object + * contains information about the video stream in the input file that Amazon Rekognition Video chose to analyze. + * The VideoMetadata object includes the video codec, video format and other information. + * Video metadata is returned in each page of information returned by GetSegmentDetection.

    */ - FaceModelVersions?: string[]; -} + VideoMetadata?: VideoMetadata[]; -/** - * @public - */ -export interface ListDatasetEntriesRequest { /** - *

    - * The Amazon Resource Name (ARN) for the dataset that you want to use. - *

    + *

    An array of + * objects. There can be multiple audio streams. + * Each AudioMetadata object contains metadata for a single audio stream. + * Audio information in an AudioMetadata objects includes + * the audio codec, the number of audio channels, the duration of the audio stream, + * and the sample rate. Audio metadata is returned in each page of information returned + * by GetSegmentDetection.

    */ - DatasetArn: string | undefined; + AudioMetadata?: AudioMetadata[]; /** - *

    Specifies a label filter for the response. The response includes an entry only if one or more of the labels in ContainsLabels exist in the entry. - *

    + *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns + * a pagination token in the response. You can use this pagination token to retrieve the next set of text.

    */ - ContainsLabels?: string[]; + NextToken?: string; /** - *

    - * Specify true to get only the JSON Lines where the image is labeled. - * Specify false to get only the JSON Lines where the image isn't labeled. If you - * don't specify Labeled, ListDatasetEntries returns JSON Lines for labeled and unlabeled - * images. - *

    + *

    An array of segments detected in a video. The array is sorted by the segment types (TECHNICAL_CUE or SHOT) + * specified in the SegmentTypes input parameter of StartSegmentDetection. Within + * each segment type the array is sorted by timestamp values.

    */ - Labeled?: boolean; + Segments?: SegmentDetection[]; /** - *

    If specified, ListDatasetEntries only returns JSON Lines where the value of SourceRefContains is - * part of the source-ref field. The source-ref field contains the Amazon S3 location of the image. - * You can use SouceRefContains for tasks such as getting the JSON Line for a single image, or gettting JSON Lines for all images within a specific folder.

    + *

    An array containing the segment types requested in the call to StartSegmentDetection. + *

    */ - SourceRefContains?: string; + SelectedSegmentTypes?: SegmentTypeInfo[]; /** - *

    Specifies an error filter for the response. Specify True to only include entries that have errors. - *

    + *

    Job identifier for the segment detection operation for which you + * want to obtain results. The job identifer is returned by an initial call + * to StartSegmentDetection.

    */ - HasErrors?: boolean; + JobId?: string; /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination - * token to retrieve the next set of results.

    + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    */ - NextToken?: string; + Video?: Video; /** - *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. - * If you specify a value greater than 100, a ValidationException - * error occurs. The default value is 100.

    + *

    A job identifier specified in the call to StartSegmentDetection and + * returned in the job completion notification sent to your + * Amazon Simple Notification Service topic.

    */ - MaxResults?: number; + JobTag?: string; } /** * @public */ -export interface ListDatasetEntriesResponse { +export interface GetTextDetectionRequest { /** - *

    - * A list of entries (images) in the dataset. - *

    + *

    Job identifier for the text detection operation for which you want results returned. + * You get the job identifer from an initial call to StartTextDetection.

    */ - DatasetEntries?: string[]; + JobId: string | undefined; /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination - * token to retrieve the next set of results.

    + *

    Maximum number of results to return per paginated call. The largest value you can specify is 1000.

    + */ + MaxResults?: number; + + /** + *

    If the previous response was incomplete (because there are more labels to retrieve), Amazon Rekognition Video returns + * a pagination token in the response. You can use this pagination token to retrieve the next set of text.

    */ NextToken?: string; } /** * @public + *

    Information about text detected in a video. Incudes the detected text, + * the time in milliseconds from the start of the video that the text was detected, and where it was detected on the screen.

    */ -export interface ListDatasetLabelsRequest { - /** - *

    - * The Amazon Resource Name (ARN) of the dataset that you want to use. - *

    - */ - DatasetArn: string | undefined; - +export interface TextDetectionResult { /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination - * token to retrieve the next set of results.

    + *

    The time, in milliseconds from the start of the video, that the text was detected. + * Note that Timestamp is not guaranteed to be accurate to the individual frame where the text first appears.

    */ - NextToken?: string; + Timestamp?: number; /** - *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. - * If you specify a value greater than 100, a ValidationException - * error occurs. The default value is 100.

    + *

    Details about text detected in a video.

    */ - MaxResults?: number; + TextDetection?: TextDetection; } /** * @public */ -export interface ListDatasetLabelsResponse { +export interface GetTextDetectionResponse { /** - *

    - * A list of the labels in the dataset. - *

    + *

    Current status of the text detection job.

    */ - DatasetLabelDescriptions?: DatasetLabelDescription[]; + JobStatus?: VideoJobStatus | string; /** - *

    If the previous response was incomplete (because there is more - * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination - * token to retrieve the next set of results.

    + *

    If the job fails, StatusMessage provides a descriptive error message.

    + */ + StatusMessage?: string; + + /** + *

    Information about a video that Amazon Rekognition analyzed. Videometadata is returned in + * every page of paginated responses from a Amazon Rekognition video operation.

    + */ + VideoMetadata?: VideoMetadata; + + /** + *

    An array of text detected in the video. Each element contains the detected text, the time in milliseconds + * from the start of the video that the text was detected, and where it was detected on the screen.

    + */ + TextDetections?: TextDetectionResult[]; + + /** + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent + * request to retrieve the next set of text.

    */ NextToken?: string; + + /** + *

    Version number of the text detection model that was used to detect text.

    + */ + TextModelVersion?: string; + + /** + *

    Job identifier for the text detection operation for which you + * want to obtain results. The job identifer is returned by an initial call + * to StartTextDetection.

    + */ + JobId?: string; + + /** + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ + Video?: Video; + + /** + *

    A job identifier specified in the call to StartTextDetection and + * returned in the job completion notification sent to your + * Amazon Simple Notification Service topic.

    + */ + JobTag?: string; } /** * @public */ -export interface ListFacesRequest { +export interface IndexFacesRequest { /** - *

    ID of the collection from which to list the faces.

    + *

    The ID of an existing collection to which you want to add the faces that are detected + * in the input images.

    */ CollectionId: string | undefined; /** - *

    If the previous response was incomplete (because there is more data to retrieve), - * Amazon Rekognition returns a pagination token in the response. You can use this pagination token to - * retrieve the next set of faces.

    + *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes isn't supported.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ - NextToken?: string; + Image: Image | undefined; /** - *

    Maximum number of faces to return.

    + *

    The ID you want to assign to all the faces detected in the image.

    + */ + ExternalImageId?: string; + + /** + *

    An array of facial attributes you want to be returned. A DEFAULT subset of + * facial attributes - BoundingBox, Confidence, Pose, + * Quality, and Landmarks - will always be returned. You can request + * for specific facial attributes (in addition to the default list) - by using ["DEFAULT", + * "FACE_OCCLUDED"] or just ["FACE_OCCLUDED"]. You can request for all + * facial attributes by using ["ALL"]. Requesting more attributes may increase + * response time.

    + *

    If you provide both, ["ALL", "DEFAULT"], the service uses a logical AND + * operator to determine which attributes to return (in this case, all attributes).

    + */ + DetectionAttributes?: (Attribute | string)[]; + + /** + *

    The maximum number of faces to index. The value of MaxFaces must be greater + * than or equal to 1. IndexFaces returns no more than 100 detected faces in an + * image, even if you specify a larger value for MaxFaces.

    + *

    If IndexFaces detects more faces than the value of MaxFaces, the + * faces with the lowest quality are filtered out first. If there are still more faces than the + * value of MaxFaces, the faces with the smallest bounding boxes are filtered out + * (up to the number that's needed to satisfy the value of MaxFaces). Information + * about the unindexed faces is available in the UnindexedFaces array.

    + *

    The faces that are returned by IndexFaces are sorted by the largest face + * bounding box size to the smallest size, in descending order.

    + *

    + * MaxFaces can be used with a collection associated with any version of the + * face model.

    + */ + MaxFaces?: number; + + /** + *

    A filter that specifies a quality bar for how much filtering is done to identify faces. + * Filtered faces aren't indexed. If you specify AUTO, Amazon Rekognition chooses the quality + * bar. If you specify LOW, MEDIUM, or HIGH, filtering + * removes all faces that don’t meet the chosen quality bar. The default value is + * AUTO. + * The quality bar is based on a variety of common use cases. Low-quality detections can occur + * for a number of reasons. Some examples are an object that's misidentified as a face, a face + * that's too blurry, or a face with a pose that's too extreme to use. If you specify + * NONE, no filtering is performed.

    + *

    To use quality filtering, the collection you are using must be associated with version 3 + * of the face model or higher.

    */ - MaxResults?: number; + QualityFilter?: QualityFilter | string; } /** * @public + * @enum */ -export interface ListFacesResponse { - /** - *

    An array of Face objects.

    - */ - Faces?: Face[]; - - /** - *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the - * subsequent request to retrieve the next set of faces.

    - */ - NextToken?: string; - - /** - *

    Version number of the face detection model associated with the input collection - * (CollectionId).

    - */ - FaceModelVersion?: string; -} +export const Reason = { + EXCEEDS_MAX_FACES: "EXCEEDS_MAX_FACES", + EXTREME_POSE: "EXTREME_POSE", + LOW_BRIGHTNESS: "LOW_BRIGHTNESS", + LOW_CONFIDENCE: "LOW_CONFIDENCE", + LOW_FACE_QUALITY: "LOW_FACE_QUALITY", + LOW_SHARPNESS: "LOW_SHARPNESS", + SMALL_BOUNDING_BOX: "SMALL_BOUNDING_BOX", +} as const; /** * @public */ -export interface ListProjectPoliciesRequest { - /** - *

    The ARN of the project for which you want to list the project policies.

    - */ - ProjectArn: string | undefined; +export type Reason = (typeof Reason)[keyof typeof Reason]; +/** + * @public + *

    A face that IndexFaces detected, but didn't index. Use the + * Reasons response attribute to determine why a face wasn't indexed.

    + */ +export interface UnindexedFace { /** - *

    If the previous response was incomplete (because there is more results to retrieve), - * Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination token - * to retrieve the next set of results.

    + *

    An array of reasons that specify why a face wasn't indexed.

    + *
      + *
    • + *

      EXTREME_POSE - The face is at a pose that can't be detected. For example, the head is + * turned too far away from the camera.

      + *
    • + *
    • + *

      EXCEEDS_MAX_FACES - The number of faces detected is already higher than that specified + * by the MaxFaces input parameter for IndexFaces.

      + *
    • + *
    • + *

      LOW_BRIGHTNESS - The image is too dark.

      + *
    • + *
    • + *

      LOW_SHARPNESS - The image is too blurry.

      + *
    • + *
    • + *

      LOW_CONFIDENCE - The face was detected with a low confidence.

      + *
    • + *
    • + *

      SMALL_BOUNDING_BOX - The bounding box around the face is too small.

      + *
    • + *
    */ - NextToken?: string; + Reasons?: (Reason | string)[]; /** - *

    The maximum number of results to return per paginated call. The largest value you can - * specify is 5. If you specify a value greater than 5, a ValidationException error - * occurs. The default value is 5.

    + *

    The + * structure that contains attributes of a face that + * IndexFacesdetected, but didn't index.

    */ - MaxResults?: number; + FaceDetail?: FaceDetail; } /** * @public - *

    Describes a project policy in the response from ListProjectPolicies.

    - *

    */ -export interface ProjectPolicy { - /** - *

    The Amazon Resource Name (ARN) of the project to which the project policy is attached.

    - */ - ProjectArn?: string; - - /** - *

    The name of the project policy.

    - */ - PolicyName?: string; - +export interface IndexFacesResponse { /** - *

    The revision ID of the project policy.

    + *

    An array of faces detected and added to the collection. For more information, + * see Searching Faces in a Collection in the Amazon Rekognition Developer Guide.

    */ - PolicyRevisionId?: string; + FaceRecords?: FaceRecord[]; /** - *

    The JSON document for the project policy.

    + *

    If your collection is associated with a face detection model that's later than version + * 3.0, the value of OrientationCorrection is always null and no orientation + * information is returned.

    + *

    If your collection is associated with a face detection model that's version 3.0 or + * earlier, the following applies:

    + *
      + *
    • + *

      If the input image is in .jpeg format, it might contain exchangeable image file format + * (Exif) metadata that includes the image's orientation. Amazon Rekognition uses this orientation + * information to perform image correction - the bounding box coordinates are translated to + * represent object locations after the orientation information in the Exif metadata is used + * to correct the image orientation. Images in .png format don't contain Exif metadata. The + * value of OrientationCorrection is null.

      + *
    • + *
    • + *

      If the image doesn't contain orientation information in its Exif metadata, Amazon Rekognition + * returns an estimated orientation (ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270). Amazon Rekognition + * doesn’t perform image correction for images. The bounding box coordinates aren't + * translated and represent the object locations before the image is rotated.

      + *
    • + *
    + *

    Bounding box information is returned in the FaceRecords array. You can get + * the version of the face detection model by calling DescribeCollection.

    */ - PolicyDocument?: string; + OrientationCorrection?: OrientationCorrection | string; /** - *

    The Unix datetime for the creation of the project policy.

    + *

    The version number of the face detection model that's associated with the input + * collection (CollectionId).

    */ - CreationTimestamp?: Date; + FaceModelVersion?: string; /** - *

    The Unix datetime for when the project policy was last updated.

    + *

    An array of faces that were detected in the image but weren't indexed. They weren't + * indexed because the quality filter identified them as low quality, or the + * MaxFaces request parameter filtered them out. To use the quality filter, you + * specify the QualityFilter request parameter.

    */ - LastUpdatedTimestamp?: Date; + UnindexedFaces?: UnindexedFace[]; } /** * @public + *

    Specifies the starting point in a Kinesis stream to start processing. You can use the + * producer timestamp or the fragment number. One of either producer timestamp or fragment + * number is required. If you use the producer timestamp, you must put the time in + * milliseconds. For more information about fragment numbers, see Fragment.

    */ -export interface ListProjectPoliciesResponse { +export interface KinesisVideoStreamStartSelector { /** - *

    A list of project policies attached to the project.

    + *

    The timestamp from the producer corresponding to the fragment, in milliseconds, + * expressed in unix time format.

    */ - ProjectPolicies?: ProjectPolicy[]; + ProducerTimestamp?: number; /** - *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the - * subsequent request to retrieve the next set of project policies.

    + *

    + * The unique identifier of the fragment. This value monotonically increases based on the ingestion order. + *

    */ - NextToken?: string; + FragmentNumber?: string; } /** * @public + * @enum */ -export interface ListStreamProcessorsRequest { - /** - *

    If the previous response was incomplete (because there are more stream processors to retrieve), Amazon Rekognition Video - * returns a pagination token in the response. You can use this pagination token to retrieve the next set of stream processors.

    - */ - NextToken?: string; - - /** - *

    Maximum number of stream processors you want Amazon Rekognition Video to return in the response. The default is 1000.

    - */ - MaxResults?: number; -} +export const LabelDetectionFeatureName = { + GENERAL_LABELS: "GENERAL_LABELS", +} as const; /** * @public - *

    An object that recognizes faces or labels in a streaming video. An Amazon Rekognition stream processor is created by a call to CreateStreamProcessor. The request - * parameters for CreateStreamProcessor describe the Kinesis video stream source for the streaming video, face recognition parameters, and where to stream the analysis resullts. - * - *

    */ -export interface StreamProcessor { - /** - *

    Name of the Amazon Rekognition stream processor.

    - */ - Name?: string; +export type LabelDetectionFeatureName = (typeof LabelDetectionFeatureName)[keyof typeof LabelDetectionFeatureName]; +/** + * @public + *

    Contains the specified filters that should be applied to a list of returned GENERAL_LABELS.

    + */ +export interface LabelDetectionSettings { /** - *

    Current status of the Amazon Rekognition stream processor.

    + *

    Contains filters for the object labels returned by DetectLabels. Filters can be inclusive, + * exclusive, or a combination of both and can be applied to individual labels or entire label categories. + * To see a list of label categories, see Detecting Labels.

    */ - Status?: StreamProcessorStatus | string; + GeneralLabels?: GeneralLabelsSettings; } /** * @public */ -export interface ListStreamProcessorsResponse { +export interface ListCollectionsRequest { /** - *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent - * request to retrieve the next set of stream processors.

    + *

    Pagination token from the previous response.

    */ NextToken?: string; /** - *

    List of stream processors that you have created.

    + *

    Maximum number of collection IDs to return.

    */ - StreamProcessors?: StreamProcessor[]; + MaxResults?: number; } /** * @public */ -export interface ListTagsForResourceRequest { +export interface ListCollectionsResponse { /** - *

    Amazon Resource Name (ARN) of the model, collection, or stream processor that contains - * the tags that you want a list of.

    + *

    An array of collection IDs.

    */ - ResourceArn: string | undefined; -} + CollectionIds?: string[]; -/** - * @public - */ -export interface ListTagsForResourceResponse { /** - *

    A list of key-value tags assigned to the resource.

    + *

    If the result is truncated, the response provides a NextToken that you can + * use in the subsequent request to fetch the next set of collection IDs.

    */ - Tags?: Record; -} + NextToken?: string; -/** - * @public - *

    The format of the project policy document that you supplied to - * PutProjectPolicy is incorrect.

    - */ -export class MalformedPolicyDocumentException extends __BaseException { - readonly name: "MalformedPolicyDocumentException" = "MalformedPolicyDocumentException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; - /** - *

    A universally unique identifier (UUID) for the request.

    - */ - Logref?: string; /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + *

    Version numbers of the face detection models associated with the collections in the + * array CollectionIds. For example, the value of FaceModelVersions[2] + * is the version number for the face detection model used by the collection in + * CollectionId[2].

    + */ + FaceModelVersions?: string[]; } /** * @public - *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see - * Calling Amazon Rekognition Video operations. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic. - * For more information, see Giving access to multiple Amazon SNS topics.

    */ -export interface NotificationChannel { +export interface ListDatasetEntriesRequest { /** - *

    The Amazon SNS topic to which Amazon Rekognition posts the completion status.

    + *

    + * The Amazon Resource Name (ARN) for the dataset that you want to use. + *

    */ - SNSTopicArn: string | undefined; + DatasetArn: string | undefined; /** - *

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

    + *

    Specifies a label filter for the response. The response includes an entry only if one or more of the labels in ContainsLabels exist in the entry. + *

    */ - RoleArn: string | undefined; -} + ContainsLabels?: string[]; -/** - * @public - */ -export interface PutProjectPolicyRequest { /** - *

    The Amazon Resource Name (ARN) of the project that the project policy is attached to.

    + *

    + * Specify true to get only the JSON Lines where the image is labeled. + * Specify false to get only the JSON Lines where the image isn't labeled. If you + * don't specify Labeled, ListDatasetEntries returns JSON Lines for labeled and unlabeled + * images. + *

    */ - ProjectArn: string | undefined; + Labeled?: boolean; /** - *

    A name for the policy.

    + *

    If specified, ListDatasetEntries only returns JSON Lines where the value of SourceRefContains is + * part of the source-ref field. The source-ref field contains the Amazon S3 location of the image. + * You can use SouceRefContains for tasks such as getting the JSON Line for a single image, or gettting JSON Lines for all images within a specific folder.

    */ - PolicyName: string | undefined; + SourceRefContains?: string; /** - *

    The revision ID for the Project Policy. Each time you modify a policy, Amazon Rekognition Custom Labels - * generates and assigns a new PolicyRevisionId and then deletes the previous version of the - * policy.

    + *

    Specifies an error filter for the response. Specify True to only include entries that have errors. + *

    */ - PolicyRevisionId?: string; + HasErrors?: boolean; /** - *

    A resource policy to add to the model. The policy is a JSON structure that contains - * one or more statements that define the policy. - * The policy must follow the IAM syntax. For - * more information about the contents of a JSON policy document, see - * IAM JSON policy reference.

    + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

    */ - PolicyDocument: string | undefined; + NextToken?: string; + + /** + *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. + * If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

    + */ + MaxResults?: number; } /** * @public */ -export interface PutProjectPolicyResponse { +export interface ListDatasetEntriesResponse { /** - *

    The ID of the project policy.

    + *

    + * A list of entries (images) in the dataset. + *

    */ - PolicyRevisionId?: string; + DatasetEntries?: string[]; + + /** + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

    + */ + NextToken?: string; } /** * @public */ -export interface RecognizeCelebritiesRequest { +export interface ListDatasetLabelsRequest { /** - *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    + *

    + * The Amazon Resource Name (ARN) of the dataset that you want to use. + *

    */ - Image: Image | undefined; + DatasetArn: string | undefined; + + /** + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

    + */ + NextToken?: string; + + /** + *

    The maximum number of results to return per paginated call. The largest value you can specify is 100. + * If you specify a value greater than 100, a ValidationException + * error occurs. The default value is 100.

    + */ + MaxResults?: number; } /** * @public */ -export interface RecognizeCelebritiesResponse { - /** - *

    Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 - * celebrities in an image. Each celebrity object includes the following attributes: - * Face, Confidence, Emotions, Landmarks, - * Pose, Quality, Smile, Id, - * KnownGender, MatchConfidence, Name, - * Urls.

    - */ - CelebrityFaces?: Celebrity[]; - +export interface ListDatasetLabelsResponse { /** - *

    Details about each unrecognized face in the image.

    + *

    + * A list of the labels in the dataset. + *

    */ - UnrecognizedFaces?: ComparedFace[]; + DatasetLabelDescriptions?: DatasetLabelDescription[]; /** - * - *

    Support for estimating image orientation using the the OrientationCorrection field - * has ceased as of August 2021. Any returned values for this field included in an API response - * will always be NULL.

    - *
    - *

    The orientation of the input image (counterclockwise direction). If your application - * displays the image, you can use this value to correct the orientation. The bounding box - * coordinates returned in CelebrityFaces and UnrecognizedFaces - * represent face locations before the image orientation is corrected.

    - * - *

    If the input image is in .jpeg format, it might contain exchangeable image (Exif) - * metadata that includes the image's orientation. If so, and the Exif metadata for the input - * image populates the orientation field, the value of OrientationCorrection is - * null. The CelebrityFaces and UnrecognizedFaces bounding box - * coordinates represent face locations after Exif metadata is used to correct the image - * orientation. Images in .png format don't contain Exif metadata.

    - *
    + *

    If the previous response was incomplete (because there is more + * results to retrieve), Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination + * token to retrieve the next set of results.

    */ - OrientationCorrection?: OrientationCorrection | string; + NextToken?: string; } /** * @public */ -export interface SearchFacesRequest { +export interface ListFacesRequest { /** - *

    ID of the collection the face belongs to.

    + *

    ID of the collection from which to list the faces.

    */ CollectionId: string | undefined; /** - *

    ID of a face to find matches for in the collection.

    + *

    If the previous response was incomplete (because there is more data to retrieve), + * Amazon Rekognition returns a pagination token in the response. You can use this pagination token to + * retrieve the next set of faces.

    */ - FaceId: string | undefined; + NextToken?: string; /** - *

    Maximum number of faces to return. The operation returns the maximum number of faces - * with the highest confidence in the match.

    + *

    Maximum number of faces to return.

    */ - MaxFaces?: number; + MaxResults?: number; /** - *

    Optional value specifying the minimum confidence in the face match to return. For - * example, don't return any matches where confidence in matches is less than 70%. The default - * value is 80%.

    + *

    An array of user IDs to match when listing faces in a collection.

    */ - FaceMatchThreshold?: number; + UserId?: string; + + /** + *

    An array of face IDs to match when listing faces in a collection.

    + */ + FaceIds?: string[]; } /** * @public */ -export interface SearchFacesResponse { +export interface ListFacesResponse { /** - *

    ID of the face that was searched for matches in a collection.

    + *

    An array of Face objects.

    */ - SearchedFaceId?: string; + Faces?: Face[]; /** - *

    An array of faces that matched the input face, along with the confidence in the - * match.

    + *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the + * subsequent request to retrieve the next set of faces.

    */ - FaceMatches?: FaceMatch[]; + NextToken?: string; /** *

    Version number of the face detection model associated with the input collection @@ -6688,746 +6718,797 @@ export interface SearchFacesResponse { /** * @public */ -export interface SearchFacesByImageRequest { - /** - *

    ID of the collection to search.

    - */ - CollectionId: string | undefined; - - /** - *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to - * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    - *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to - * base64-encode image bytes passed using the Bytes field. For more information, see - * Images in the Amazon Rekognition developer guide.

    - */ - Image: Image | undefined; - +export interface ListProjectPoliciesRequest { /** - *

    Maximum number of faces to return. The operation returns the maximum number of faces - * with the highest confidence in the match.

    + *

    The ARN of the project for which you want to list the project policies.

    */ - MaxFaces?: number; + ProjectArn: string | undefined; /** - *

    (Optional) Specifies the minimum confidence in the face match to return. For example, - * don't return any matches where confidence in matches is less than 70%. The default value is - * 80%.

    + *

    If the previous response was incomplete (because there is more results to retrieve), + * Amazon Rekognition Custom Labels returns a pagination token in the response. You can use this pagination token + * to retrieve the next set of results.

    */ - FaceMatchThreshold?: number; + NextToken?: string; /** - *

    A filter that specifies a quality bar for how much filtering is done to identify faces. - * Filtered faces aren't searched for in the collection. If you specify AUTO, - * Amazon Rekognition chooses the quality bar. If you specify LOW, MEDIUM, or - * HIGH, filtering removes all faces that don’t meet the chosen quality bar. - * The quality bar is - * based on a variety of common use cases. Low-quality detections can occur for a number of - * reasons. Some examples are an object that's misidentified as a face, a face that's too blurry, - * or a face with a pose that's too extreme to use. If you specify NONE, no - * filtering is performed. The default value is NONE.

    - *

    To use quality filtering, the collection you are using must be associated with version 3 - * of the face model or higher.

    + *

    The maximum number of results to return per paginated call. The largest value you can + * specify is 5. If you specify a value greater than 5, a ValidationException error + * occurs. The default value is 5.

    */ - QualityFilter?: QualityFilter | string; + MaxResults?: number; } /** * @public + *

    Describes a project policy in the response from ListProjectPolicies.

    + *

    */ -export interface SearchFacesByImageResponse { - /** - *

    The bounding box around the face in the input image that Amazon Rekognition used for the - * search.

    - */ - SearchedFaceBoundingBox?: BoundingBox; - - /** - *

    The level of confidence that the searchedFaceBoundingBox, contains a - * face.

    - */ - SearchedFaceConfidence?: number; - +export interface ProjectPolicy { /** - *

    An array of faces that match the input face, along with the confidence in the - * match.

    + *

    The Amazon Resource Name (ARN) of the project to which the project policy is attached.

    */ - FaceMatches?: FaceMatch[]; + ProjectArn?: string; /** - *

    Version number of the face detection model associated with the input collection - * (CollectionId).

    + *

    The name of the project policy.

    */ - FaceModelVersion?: string; -} + PolicyName?: string; -/** - * @public - */ -export interface StartCelebrityRecognitionRequest { /** - *

    The video in which you want to recognize celebrities. The video must be stored - * in an Amazon S3 bucket.

    + *

    The revision ID of the project policy.

    */ - Video: Video | undefined; + PolicyRevisionId?: string; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartCelebrityRecognition requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    The JSON document for the project policy.

    */ - ClientRequestToken?: string; + PolicyDocument?: string; /** - *

    The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the - * celebrity recognition analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + *

    The Unix datetime for the creation of the project policy.

    */ - NotificationChannel?: NotificationChannel; + CreationTimestamp?: Date; /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    The Unix datetime for when the project policy was last updated.

    */ - JobTag?: string; + LastUpdatedTimestamp?: Date; } /** * @public */ -export interface StartCelebrityRecognitionResponse { +export interface ListProjectPoliciesResponse { /** - *

    The identifier for the celebrity recognition analysis job. Use JobId to identify the job in - * a subsequent call to GetCelebrityRecognition.

    + *

    A list of project policies attached to the project.

    */ - JobId?: string; + ProjectPolicies?: ProjectPolicy[]; + + /** + *

    If the response is truncated, Amazon Rekognition returns this token that you can use in the + * subsequent request to retrieve the next set of project policies.

    + */ + NextToken?: string; } /** * @public - *

    The file size or duration of the supplied media is too large. The maximum file size is 10GB. - * The maximum duration is 6 hours.

    */ -export class VideoTooLargeException extends __BaseException { - readonly name: "VideoTooLargeException" = "VideoTooLargeException"; - readonly $fault: "client" = "client"; - Message?: string; - Code?: string; +export interface ListStreamProcessorsRequest { /** - *

    A universally unique identifier (UUID) for the request.

    + *

    If the previous response was incomplete (because there are more stream processors to retrieve), Amazon Rekognition Video + * returns a pagination token in the response. You can use this pagination token to retrieve the next set of stream processors.

    */ - Logref?: string; + NextToken?: string; + /** - * @internal + *

    Maximum number of stream processors you want Amazon Rekognition Video to return in the response. The default is 1000.

    */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "VideoTooLargeException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, VideoTooLargeException.prototype); - this.Message = opts.Message; - this.Code = opts.Code; - this.Logref = opts.Logref; - } + MaxResults?: number; } /** * @public + *

    An object that recognizes faces or labels in a streaming video. An Amazon Rekognition stream processor is created by a call to CreateStreamProcessor. The request + * parameters for CreateStreamProcessor describe the Kinesis video stream source for the streaming video, face recognition parameters, and where to stream the analysis resullts. + * + *

    */ -export interface StartContentModerationRequest { +export interface StreamProcessor { /** - *

    The video in which you want to detect inappropriate, unwanted, or offensive content. The video must be stored - * in an Amazon S3 bucket.

    + *

    Name of the Amazon Rekognition stream processor.

    */ - Video: Video | undefined; + Name?: string; /** - *

    Specifies the minimum confidence that Amazon Rekognition must have in order to return a moderated content label. Confidence - * represents how certain Amazon Rekognition is that the moderated content is correctly identified. 0 is the lowest confidence. - * 100 is the highest confidence. Amazon Rekognition doesn't return any moderated content labels with a confidence level - * lower than this specified value. If you don't specify MinConfidence, GetContentModeration - * returns labels with confidence values greater than or equal to 50 percent.

    + *

    Current status of the Amazon Rekognition stream processor.

    */ - MinConfidence?: number; + Status?: StreamProcessorStatus | string; +} +/** + * @public + */ +export interface ListStreamProcessorsResponse { /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartContentModeration requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent + * request to retrieve the next set of stream processors.

    */ - ClientRequestToken?: string; + NextToken?: string; /** - *

    The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the - * content analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + *

    List of stream processors that you have created.

    */ - NotificationChannel?: NotificationChannel; + StreamProcessors?: StreamProcessor[]; +} +/** + * @public + */ +export interface ListTagsForResourceRequest { /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    Amazon Resource Name (ARN) of the model, collection, or stream processor that contains + * the tags that you want a list of.

    */ - JobTag?: string; + ResourceArn: string | undefined; } /** * @public */ -export interface StartContentModerationResponse { +export interface ListTagsForResourceResponse { /** - *

    The identifier for the content analysis job. Use JobId to identify the job in - * a subsequent call to GetContentModeration.

    + *

    A list of key-value tags assigned to the resource.

    */ - JobId?: string; + Tags?: Record; } /** * @public */ -export interface StartFaceDetectionRequest { +export interface ListUsersRequest { /** - *

    The video in which you want to detect faces. The video must be stored - * in an Amazon S3 bucket.

    + *

    The ID of an existing collection.

    */ - Video: Video | undefined; + CollectionId: string | undefined; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartFaceDetection requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    Maximum number of UsersID to return.

    */ - ClientRequestToken?: string; + MaxResults?: number; /** - *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the - * face detection operation. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + *

    Pagingation token to receive the next set of UsersID.

    */ - NotificationChannel?: NotificationChannel; + NextToken?: string; +} +/** + * @public + *

    Metadata of the user stored in a collection.

    + */ +export interface User { /** - *

    The face attributes you want returned.

    - *

    - * DEFAULT - The following subset of facial attributes are returned: BoundingBox, Confidence, Pose, Quality and Landmarks.

    - *

    - * ALL - All facial attributes are returned.

    + *

    A provided ID for the User. Unique within the collection.

    */ - FaceAttributes?: FaceAttributes | string; + UserId?: string; /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    Communicates if the UserID has been updated with latest set of faces to be associated + * with the UserID.

    */ - JobTag?: string; + UserStatus?: UserStatus | string; } /** * @public */ -export interface StartFaceDetectionResponse { +export interface ListUsersResponse { /** - *

    The identifier for the face detection job. Use JobId to identify the job in - * a subsequent call to GetFaceDetection.

    + *

    List of UsersID associated with the specified collection.

    */ - JobId?: string; + Users?: User[]; + + /** + *

    A pagination token to be used with the subsequent request if the response is truncated.

    + */ + NextToken?: string; } /** * @public + *

    The format of the project policy document that you supplied to + * PutProjectPolicy is incorrect.

    */ -export interface StartFaceSearchRequest { +export class MalformedPolicyDocumentException extends __BaseException { + readonly name: "MalformedPolicyDocumentException" = "MalformedPolicyDocumentException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; /** - *

    The video you want to search. The video must be stored in an Amazon S3 bucket.

    + *

    A universally unique identifier (UUID) for the request.

    */ - Video: Video | undefined; - + Logref?: string; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartFaceSearch requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + * @internal */ - ClientRequestToken?: string; + constructor(opts: __ExceptionOptionType) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} +/** + * @public + *

    Contains metadata for a UserID matched with a given face.

    + */ +export interface MatchedUser { /** - *

    The minimum confidence in the person match to return. For example, don't return any matches where confidence in matches is less than 70%. - * The default value is 80%.

    + *

    A provided ID for the UserID. Unique within the collection.

    */ - FaceMatchThreshold?: number; + UserId?: string; /** - *

    ID of the collection that contains the faces you want to search for.

    + *

    The status of the user matched to a provided FaceID.

    */ - CollectionId: string | undefined; + UserStatus?: UserStatus | string; +} +/** + * @public + *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see + * Calling Amazon Rekognition Video operations. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic. + * For more information, see Giving access to multiple Amazon SNS topics.

    + */ +export interface NotificationChannel { /** - *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the search. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + *

    The Amazon SNS topic to which Amazon Rekognition posts the completion status.

    */ - NotificationChannel?: NotificationChannel; + SNSTopicArn: string | undefined; /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.

    */ - JobTag?: string; + RoleArn: string | undefined; } /** * @public */ -export interface StartFaceSearchResponse { +export interface PutProjectPolicyRequest { /** - *

    The identifier for the search job. Use JobId to identify the job in a subsequent call to GetFaceSearch.

    + *

    The Amazon Resource Name (ARN) of the project that the project policy is attached to.

    */ - JobId?: string; -} + ProjectArn: string | undefined; -/** - * @public - */ -export interface StartLabelDetectionRequest { /** - *

    The video in which you want to detect labels. The video must be stored - * in an Amazon S3 bucket.

    + *

    A name for the policy.

    */ - Video: Video | undefined; + PolicyName: string | undefined; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartLabelDetection requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    The revision ID for the Project Policy. Each time you modify a policy, Amazon Rekognition Custom Labels + * generates and assigns a new PolicyRevisionId and then deletes the previous version of the + * policy.

    */ - ClientRequestToken?: string; + PolicyRevisionId?: string; /** - *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected label. Confidence - * represents how certain Amazon Rekognition is that a label is correctly identified.0 is the lowest confidence. - * 100 is the highest confidence. Amazon Rekognition Video doesn't return any labels with a confidence level - * lower than this specified value.

    - *

    If you don't specify MinConfidence, the operation returns labels and - * bounding boxes (if detected) with confidence values greater than or equal to 50 - * percent.

    + *

    A resource policy to add to the model. The policy is a JSON structure that contains + * one or more statements that define the policy. + * The policy must follow the IAM syntax. For + * more information about the contents of a JSON policy document, see + * IAM JSON policy reference.

    */ - MinConfidence?: number; + PolicyDocument: string | undefined; +} +/** + * @public + */ +export interface PutProjectPolicyResponse { /** - *

    The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label detection - * operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + *

    The ID of the project policy.

    */ - NotificationChannel?: NotificationChannel; + PolicyRevisionId?: string; +} +/** + * @public + */ +export interface RecognizeCelebritiesRequest { /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ - JobTag?: string; + Image: Image | undefined; +} +/** + * @public + */ +export interface RecognizeCelebritiesResponse { /** - *

    The features to return after video analysis. You can specify that GENERAL_LABELS are returned.

    + *

    Details about each celebrity found in the image. Amazon Rekognition can detect a maximum of 64 + * celebrities in an image. Each celebrity object includes the following attributes: + * Face, Confidence, Emotions, Landmarks, + * Pose, Quality, Smile, Id, + * KnownGender, MatchConfidence, Name, + * Urls.

    */ - Features?: (LabelDetectionFeatureName | string)[]; + CelebrityFaces?: Celebrity[]; /** - *

    The settings for a StartLabelDetection request.Contains the specified parameters for the label detection request of an asynchronous label analysis operation. - * Settings can include filters for GENERAL_LABELS.

    + *

    Details about each unrecognized face in the image.

    */ - Settings?: LabelDetectionSettings; -} + UnrecognizedFaces?: ComparedFace[]; -/** - * @public - */ -export interface StartLabelDetectionResponse { /** - *

    The identifier for the label detection job. Use JobId to identify the job in - * a subsequent call to GetLabelDetection.

    + * + *

    Support for estimating image orientation using the the OrientationCorrection field + * has ceased as of August 2021. Any returned values for this field included in an API response + * will always be NULL.

    + *
    + *

    The orientation of the input image (counterclockwise direction). If your application + * displays the image, you can use this value to correct the orientation. The bounding box + * coordinates returned in CelebrityFaces and UnrecognizedFaces + * represent face locations before the image orientation is corrected.

    + * + *

    If the input image is in .jpeg format, it might contain exchangeable image (Exif) + * metadata that includes the image's orientation. If so, and the Exif metadata for the input + * image populates the orientation field, the value of OrientationCorrection is + * null. The CelebrityFaces and UnrecognizedFaces bounding box + * coordinates represent face locations after Exif metadata is used to correct the image + * orientation. Images in .png format don't contain Exif metadata.

    + *
    */ - JobId?: string; + OrientationCorrection?: OrientationCorrection | string; } /** * @public */ -export interface StartPersonTrackingRequest { - /** - *

    The video in which you want to detect people. The video must be stored - * in an Amazon S3 bucket.

    - */ - Video: Video | undefined; - +export interface SearchFacesRequest { /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartPersonTracking requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    ID of the collection the face belongs to.

    */ - ClientRequestToken?: string; + CollectionId: string | undefined; /** - *

    The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the people detection - * operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + *

    ID of a face to find matches for in the collection.

    */ - NotificationChannel?: NotificationChannel; + FaceId: string | undefined; /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    Maximum number of faces to return. The operation returns the maximum number of faces + * with the highest confidence in the match.

    */ - JobTag?: string; -} + MaxFaces?: number; -/** - * @public - */ -export interface StartPersonTrackingResponse { /** - *

    The identifier for the person detection job. Use JobId to identify the job in - * a subsequent call to GetPersonTracking.

    + *

    Optional value specifying the minimum confidence in the face match to return. For + * example, don't return any matches where confidence in matches is less than 70%. The default + * value is 80%.

    */ - JobId?: string; + FaceMatchThreshold?: number; } /** * @public */ -export interface StartProjectVersionRequest { +export interface SearchFacesResponse { /** - *

    The Amazon Resource Name(ARN) of the model version that you want to start.

    + *

    ID of the face that was searched for matches in a collection.

    */ - ProjectVersionArn: string | undefined; + SearchedFaceId?: string; /** - *

    The minimum number of inference units to use. A single - * inference unit represents 1 hour of processing.

    - *

    For information about the number - * of transactions per second (TPS) that an inference unit can support, see - * Running a trained Amazon Rekognition Custom Labels model in the - * Amazon Rekognition Custom Labels Guide. - *

    - *

    Use a higher number to increase the TPS throughput of your model. You are charged for the number - * of inference units that you use. - *

    + *

    An array of faces that matched the input face, along with the confidence in the + * match.

    */ - MinInferenceUnits: number | undefined; + FaceMatches?: FaceMatch[]; /** - *

    The maximum number of inference units to use for auto-scaling the model. If you don't - * specify a value, Amazon Rekognition Custom Labels doesn't auto-scale the model.

    + *

    Version number of the face detection model associated with the input collection + * (CollectionId).

    */ - MaxInferenceUnits?: number; + FaceModelVersion?: string; } /** * @public */ -export interface StartProjectVersionResponse { +export interface SearchFacesByImageRequest { /** - *

    The current running status of the model.

    + *

    ID of the collection to search.

    */ - Status?: ProjectVersionStatus | string; -} + CollectionId: string | undefined; -/** - * @public - *

    Filters for the shot detection segments returned by GetSegmentDetection. - * For more information, see StartSegmentDetectionFilters.

    - */ -export interface StartShotDetectionFilter { /** - *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected segment. Confidence - * represents how certain Amazon Rekognition is that a segment is correctly identified. 0 is the lowest confidence. - * 100 is the highest confidence. Amazon Rekognition Video doesn't return any segments with a confidence level - * lower than this specified value.

    - *

    If you don't specify MinSegmentConfidence, the GetSegmentDetection returns - * segments with confidence values greater than or equal to 50 percent.

    + *

    The input image as base64-encoded bytes or an S3 object. If you use the AWS CLI to + * call Amazon Rekognition operations, passing base64-encoded image bytes is not supported.

    + *

    If you are using an AWS SDK to call Amazon Rekognition, you might not need to + * base64-encode image bytes passed using the Bytes field. For more information, see + * Images in the Amazon Rekognition developer guide.

    */ - MinSegmentConfidence?: number; -} + Image: Image | undefined; -/** - * @public - *

    Filters for the technical segments returned by GetSegmentDetection. For more information, - * see StartSegmentDetectionFilters.

    - */ -export interface StartTechnicalCueDetectionFilter { /** - *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected segment. Confidence - * represents how certain Amazon Rekognition is that a segment is correctly identified. 0 is the lowest confidence. - * 100 is the highest confidence. Amazon Rekognition Video doesn't return any segments with a confidence level - * lower than this specified value.

    - *

    If you don't specify MinSegmentConfidence, GetSegmentDetection returns - * segments with confidence values greater than or equal to 50 percent.

    + *

    Maximum number of faces to return. The operation returns the maximum number of faces + * with the highest confidence in the match.

    */ - MinSegmentConfidence?: number; + MaxFaces?: number; /** - *

    - * A filter that allows you to control the black frame detection by specifying the black levels and pixel coverage of black pixels in a frame. - * Videos can come from multiple sources, formats, and time periods, with different standards and varying noise levels for black frames that need to be accounted for. - *

    + *

    (Optional) Specifies the minimum confidence in the face match to return. For example, + * don't return any matches where confidence in matches is less than 70%. The default value is + * 80%.

    + */ + FaceMatchThreshold?: number; + + /** + *

    A filter that specifies a quality bar for how much filtering is done to identify faces. + * Filtered faces aren't searched for in the collection. If you specify AUTO, + * Amazon Rekognition chooses the quality bar. If you specify LOW, MEDIUM, or + * HIGH, filtering removes all faces that don’t meet the chosen quality bar. + * The quality bar is + * based on a variety of common use cases. Low-quality detections can occur for a number of + * reasons. Some examples are an object that's misidentified as a face, a face that's too blurry, + * or a face with a pose that's too extreme to use. If you specify NONE, no + * filtering is performed. The default value is NONE.

    + *

    To use quality filtering, the collection you are using must be associated with version 3 + * of the face model or higher.

    */ - BlackFrame?: BlackFrame; + QualityFilter?: QualityFilter | string; } /** * @public - *

    Filters applied to the technical cue or shot detection segments. - * For more information, see StartSegmentDetection. - *

    */ -export interface StartSegmentDetectionFilters { +export interface SearchFacesByImageResponse { /** - *

    Filters that are specific to technical cues.

    + *

    The bounding box around the face in the input image that Amazon Rekognition used for the + * search.

    */ - TechnicalCueFilter?: StartTechnicalCueDetectionFilter; + SearchedFaceBoundingBox?: BoundingBox; /** - *

    Filters that are specific to shot detections.

    + *

    The level of confidence that the searchedFaceBoundingBox, contains a + * face.

    */ - ShotFilter?: StartShotDetectionFilter; -} + SearchedFaceConfidence?: number; -/** - * @public - */ -export interface StartSegmentDetectionRequest { /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    An array of faces that match the input face, along with the confidence in the + * match.

    */ - Video: Video | undefined; + FaceMatches?: FaceMatch[]; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple - * StartSegmentDetection requests, the same JobId is returned. Use - * ClientRequestToken to prevent the same job from being accidently started more than once.

    + *

    Version number of the face detection model associated with the input collection + * (CollectionId).

    */ - ClientRequestToken?: string; + FaceModelVersion?: string; +} +/** + * @public + */ +export interface SearchUsersRequest { /** - *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the - * segment detection operation. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + *

    The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a + * FaceId is provided, UserId isn’t required to be present in the Collection.

    */ - NotificationChannel?: NotificationChannel; + CollectionId: string | undefined; /** - *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. - * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + *

    ID for the existing User.

    */ - JobTag?: string; + UserId?: string; /** - *

    Filters for technical cue or shot detection.

    + *

    ID for the existing face.

    */ - Filters?: StartSegmentDetectionFilters; + FaceId?: string; /** - *

    An array of segment types to detect in the video. Valid values are TECHNICAL_CUE and SHOT.

    + *

    Optional value that specifies the minimum confidence in the matched UserID to return. + * Default value of 80.

    */ - SegmentTypes: (SegmentType | string)[] | undefined; -} + UserMatchThreshold?: number; -/** - * @public - */ -export interface StartSegmentDetectionResponse { /** - *

    Unique identifier for the segment detection job. The JobId is returned from StartSegmentDetection. - *

    + *

    Maximum number of identities to return.

    */ - JobId?: string; + MaxUsers?: number; } /** * @public - *

    This is a required parameter for label detection stream processors and should not be used - * to start a face search stream processor.

    + *

    Provides face metadata such as FaceId, BoundingBox, Confidence of the input face used for search.

    */ -export interface StreamProcessingStartSelector { +export interface SearchedFace { /** - *

    - * Specifies the starting point in the stream to start processing. This can be done with a producer timestamp or a fragment number in a Kinesis stream. - *

    + *

    Unique identifier assigned to the face.

    */ - KVSStreamStartSelector?: KinesisVideoStreamStartSelector; + FaceId?: string; } /** * @public - *

    - * Specifies when to stop processing the stream. You can specify a maximum amount - * of time to process the video. - *

    + *

    Contains metadata about a User searched for within a collection.

    */ -export interface StreamProcessingStopSelector { +export interface SearchedUser { /** - *

    - * Specifies the maximum amount of time in seconds that you want the stream to be processed. The largest amount of time is 2 minutes. The default is 10 seconds. - *

    + *

    A provided ID for the UserID. Unique within the collection.

    */ - MaxDurationInSeconds?: number; + UserId?: string; } /** * @public + *

    Provides UserID metadata along with the confidence in the match of this UserID with the + * input face.

    */ -export interface StartStreamProcessorRequest { - /** - *

    The name of the stream processor to start processing.

    - */ - Name: string | undefined; - +export interface UserMatch { /** - *

    - * Specifies the starting point in the Kinesis stream to start processing. - * You can use the producer timestamp or the fragment number. If you use the producer timestamp, you must put the time in milliseconds. - * For more information about fragment numbers, see Fragment. - *

    - *

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

    + *

    Describes the UserID metadata.

    */ - StartSelector?: StreamProcessingStartSelector; + Similarity?: number; /** - *

    - * Specifies when to stop processing the stream. You can specify a - * maximum amount of time to process the video. - *

    - *

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

    + *

    Confidence in the match of this UserID with the input face.

    */ - StopSelector?: StreamProcessingStopSelector; + User?: MatchedUser; } /** * @public */ -export interface StartStreamProcessorResponse { +export interface SearchUsersResponse { /** - *

    - * A unique identifier for the stream processing session. - *

    + *

    An array of UserMatch objects that matched the input face along with the confidence in + * the match. Array will be empty if there are no matches.

    */ - SessionId?: string; -} + UserMatches?: UserMatch[]; -/** - * @public - *

    Set of optional parameters that let you set the criteria text must meet to be included in your response. - * WordFilter looks at a word's height, width and minimum confidence. RegionOfInterest - * lets you set a specific region of the screen to look for text in.

    - */ -export interface StartTextDetectionFilters { /** - *

    Filters focusing on qualities of the text, such as confidence or size.

    + *

    Version number of the face detection model associated with the input + * CollectionId.

    */ - WordFilter?: DetectionFilter; + FaceModelVersion?: string; /** - *

    Filter focusing on a certain area of the frame. Uses a BoundingBox object to set the region - * of the screen.

    + *

    Contains the ID of a face that was used to search for matches in a collection.

    */ - RegionsOfInterest?: RegionOfInterest[]; + SearchedFace?: SearchedFace; + + /** + *

    Contains the ID of the UserID that was used to search for matches in a collection.

    + */ + SearchedUser?: SearchedUser; } /** * @public */ -export interface StartTextDetectionRequest { +export interface SearchUsersByImageRequest { /** - *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to - * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + *

    The ID of an existing collection containing the UserID.

    */ - Video: Video | undefined; + CollectionId: string | undefined; /** - *

    Idempotent token used to identify the start request. If you use the same token with multiple StartTextDetection - * requests, the same JobId is returned. Use ClientRequestToken to prevent the same job - * from being accidentaly started more than once.

    + *

    Provides the input image either as bytes or an S3 object.

    + *

    You pass image bytes to an Amazon Rekognition API operation by using the Bytes + * property. For example, you would use the Bytes property to pass an image loaded + * from a local file system. Image bytes passed by using the Bytes property must be + * base64-encoded. Your code may not need to encode image bytes if you are using an AWS SDK to + * call Amazon Rekognition API operations.

    + *

    For more information, see Analyzing an Image Loaded from a Local File System + * in the Amazon Rekognition Developer Guide.

    + *

    You pass images stored in an S3 bucket to an Amazon Rekognition API operation by using the + * S3Object property. Images stored in an S3 bucket do not need to be + * base64-encoded.

    + *

    The region for the S3 bucket containing the S3 object must match the region you use for + * Amazon Rekognition operations.

    + *

    If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes using the + * Bytes property is not supported. You must first upload the image to an Amazon S3 bucket and + * then call the operation using the S3Object property.

    + *

    For Amazon Rekognition to process an S3 object, the user must have permission to + * access the S3 object. For more information, see How Amazon Rekognition works with IAM in the + * Amazon Rekognition Developer Guide.

    */ - ClientRequestToken?: string; + Image: Image | undefined; /** - *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see - * Calling Amazon Rekognition Video operations. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic. - * For more information, see Giving access to multiple Amazon SNS topics.

    + *

    Specifies the minimum confidence in the UserID match to return. Default value is + * 80.

    */ - NotificationChannel?: NotificationChannel; + UserMatchThreshold?: number; /** - *

    An identifier returned in the completion status published by your Amazon Simple Notification Service topic. For example, you can use JobTag to group related jobs - * and identify them in the completion notification.

    + *

    Maximum number of UserIDs to return.

    */ - JobTag?: string; + MaxUsers?: number; /** - *

    Optional parameters that let you set criteria the text must meet to be included in your response.

    + *

    A filter that specifies a quality bar for how much filtering is done to identify faces. + * Filtered faces aren't searched for in the collection. The default value is NONE.

    */ - Filters?: StartTextDetectionFilters; + QualityFilter?: QualityFilter | string; } /** * @public + *

    Contains data regarding the input face used for a search.

    */ -export interface StartTextDetectionResponse { +export interface SearchedFaceDetails { /** - *

    Identifier for the text detection job. Use JobId to identify the job in a subsequent call to GetTextDetection.

    + *

    Structure containing attributes of the face that the algorithm detected.

    + *

    A FaceDetail object contains either the default facial attributes or all + * facial attributes. The default attributes are BoundingBox, + * Confidence, Landmarks, Pose, and + * Quality.

    + *

    + * GetFaceDetection is the only Amazon Rekognition Video stored video operation that can + * return a FaceDetail object with all attributes. To specify which attributes to + * return, use the FaceAttributes input parameter for StartFaceDetection. The following Amazon Rekognition Video operations return only the default + * attributes. The corresponding Start operations don't have a FaceAttributes input + * parameter:

    + *
      + *
    • + *

      GetCelebrityRecognition

      + *
    • + *
    • + *

      GetPersonTracking

      + *
    • + *
    • + *

      GetFaceSearch

      + *
    • + *
    + *

    The Amazon Rekognition Image DetectFaces and IndexFaces operations + * can return all facial attributes. To specify which attributes to return, use the + * Attributes input parameter for DetectFaces. For + * IndexFaces, use the DetectAttributes input parameter.

    */ - JobId?: string; + FaceDetail?: FaceDetail; } /** * @public + * @enum */ -export interface StopProjectVersionRequest { - /** - *

    The Amazon Resource Name (ARN) of the model version that you want to delete.

    - *

    This operation requires permissions to perform the rekognition:StopProjectVersion action.

    - */ - ProjectVersionArn: string | undefined; -} +export const UnsearchedFaceReason = { + EXCEEDS_MAX_FACES: "EXCEEDS_MAX_FACES", + EXTREME_POSE: "EXTREME_POSE", + FACE_NOT_LARGEST: "FACE_NOT_LARGEST", + LOW_BRIGHTNESS: "LOW_BRIGHTNESS", + LOW_CONFIDENCE: "LOW_CONFIDENCE", + LOW_FACE_QUALITY: "LOW_FACE_QUALITY", + LOW_SHARPNESS: "LOW_SHARPNESS", + SMALL_BOUNDING_BOX: "SMALL_BOUNDING_BOX", +} as const; /** * @public */ -export interface StopProjectVersionResponse { - /** - *

    The current status of the stop operation.

    - */ - Status?: ProjectVersionStatus | string; -} +export type UnsearchedFaceReason = (typeof UnsearchedFaceReason)[keyof typeof UnsearchedFaceReason]; /** * @public + *

    Face details inferred from the image but not used for search. The response attribute + * contains reasons for why a face wasn't used for Search.

    */ -export interface StopStreamProcessorRequest { +export interface UnsearchedFace { + /** + *

    Structure containing attributes of the face that the algorithm detected.

    + *

    A FaceDetail object contains either the default facial attributes or all + * facial attributes. The default attributes are BoundingBox, + * Confidence, Landmarks, Pose, and + * Quality.

    + *

    + * GetFaceDetection is the only Amazon Rekognition Video stored video operation that can + * return a FaceDetail object with all attributes. To specify which attributes to + * return, use the FaceAttributes input parameter for StartFaceDetection. The following Amazon Rekognition Video operations return only the default + * attributes. The corresponding Start operations don't have a FaceAttributes input + * parameter:

    + *
      + *
    • + *

      GetCelebrityRecognition

      + *
    • + *
    • + *

      GetPersonTracking

      + *
    • + *
    • + *

      GetFaceSearch

      + *
    • + *
    + *

    The Amazon Rekognition Image DetectFaces and IndexFaces operations + * can return all facial attributes. To specify which attributes to return, use the + * Attributes input parameter for DetectFaces. For + * IndexFaces, use the DetectAttributes input parameter.

    + */ + FaceDetails?: FaceDetail; + /** - *

    The name of a stream processor created by CreateStreamProcessor.

    + *

    Reasons why a face wasn't used for Search.

    */ - Name: string | undefined; + Reasons?: (UnsearchedFaceReason | string)[]; } /** * @public */ -export interface StopStreamProcessorResponse {} +export interface SearchUsersByImageResponse { + /** + *

    An array of UserID objects that matched the input face, along with the confidence in the + * match. The returned structure will be empty if there are no matches. Returned if the + * SearchUsersByImageResponse action is successful.

    + */ + UserMatches?: UserMatch[]; -/** - * @public - */ -export interface TagResourceRequest { /** - *

    Amazon Resource Name (ARN) of the model, collection, or stream processor that you want to - * assign the tags to.

    + *

    Version number of the face detection model associated with the input collection + * CollectionId.

    */ - ResourceArn: string | undefined; + FaceModelVersion?: string; + + /** + *

    A list of FaceDetail objects containing the BoundingBox for the largest face in image, + * as well as the confidence in the bounding box, that was searched for matches. If no valid + * face is detected in the image the response will contain no SearchedFace object.

    + */ + SearchedFace?: SearchedFaceDetails; /** - *

    The key-value tags to assign to the resource.

    + *

    List of UnsearchedFace objects. Contains the face details infered from the specified + * image but not used for search. Contains reasons that describe why a face wasn't used for + * Search.

    */ - Tags: Record | undefined; + UnsearchedFaces?: UnsearchedFace[]; } /** * @public */ -export interface TagResourceResponse {} +export interface StartCelebrityRecognitionRequest { + /** + *

    The video in which you want to recognize celebrities. The video must be stored + * in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartCelebrityRecognition requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the + * celebrity recognition analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; +} /** * @internal diff --git a/clients/client-rekognition/src/models/models_1.ts b/clients/client-rekognition/src/models/models_1.ts index cde497694394..5df330ed4845 100644 --- a/clients/client-rekognition/src/models/models_1.ts +++ b/clients/client-rekognition/src/models/models_1.ts @@ -1,10 +1,661 @@ // smithy-typescript generated code +import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client"; + import { + BlackFrame, ConnectedHomeSettingsForUpdate, DatasetChanges, + DetectionFilter, + FaceAttributes, + KinesisVideoStreamStartSelector, + LabelDetectionFeatureName, + LabelDetectionSettings, + NotificationChannel, + ProjectVersionStatus, RegionOfInterest, + SegmentType, StreamProcessorDataSharingPreference, + Video, } from "./models_0"; +import { RekognitionServiceException as __BaseException } from "./RekognitionServiceException"; + +/** + * @public + */ +export interface StartCelebrityRecognitionResponse { + /** + *

    The identifier for the celebrity recognition analysis job. Use JobId to identify the job in + * a subsequent call to GetCelebrityRecognition.

    + */ + JobId?: string; +} + +/** + * @public + *

    The file size or duration of the supplied media is too large. The maximum file size is 10GB. + * The maximum duration is 6 hours.

    + */ +export class VideoTooLargeException extends __BaseException { + readonly name: "VideoTooLargeException" = "VideoTooLargeException"; + readonly $fault: "client" = "client"; + Message?: string; + Code?: string; + /** + *

    A universally unique identifier (UUID) for the request.

    + */ + Logref?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "VideoTooLargeException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, VideoTooLargeException.prototype); + this.Message = opts.Message; + this.Code = opts.Code; + this.Logref = opts.Logref; + } +} + +/** + * @public + */ +export interface StartContentModerationRequest { + /** + *

    The video in which you want to detect inappropriate, unwanted, or offensive content. The video must be stored + * in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Specifies the minimum confidence that Amazon Rekognition must have in order to return a moderated content label. Confidence + * represents how certain Amazon Rekognition is that the moderated content is correctly identified. 0 is the lowest confidence. + * 100 is the highest confidence. Amazon Rekognition doesn't return any moderated content labels with a confidence level + * lower than this specified value. If you don't specify MinConfidence, GetContentModeration + * returns labels with confidence values greater than or equal to 50 percent.

    + */ + MinConfidence?: number; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartContentModeration requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The Amazon SNS topic ARN that you want Amazon Rekognition Video to publish the completion status of the + * content analysis to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; +} + +/** + * @public + */ +export interface StartContentModerationResponse { + /** + *

    The identifier for the content analysis job. Use JobId to identify the job in + * a subsequent call to GetContentModeration.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StartFaceDetectionRequest { + /** + *

    The video in which you want to detect faces. The video must be stored + * in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartFaceDetection requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the + * face detection operation. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    The face attributes you want returned.

    + *

    + * DEFAULT - The following subset of facial attributes are returned: BoundingBox, Confidence, Pose, Quality and Landmarks.

    + *

    + * ALL - All facial attributes are returned.

    + */ + FaceAttributes?: FaceAttributes | string; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; +} + +/** + * @public + */ +export interface StartFaceDetectionResponse { + /** + *

    The identifier for the face detection job. Use JobId to identify the job in + * a subsequent call to GetFaceDetection.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StartFaceSearchRequest { + /** + *

    The video you want to search. The video must be stored in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartFaceSearch requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The minimum confidence in the person match to return. For example, don't return any matches where confidence in matches is less than 70%. + * The default value is 80%.

    + */ + FaceMatchThreshold?: number; + + /** + *

    ID of the collection that contains the faces you want to search for.

    + */ + CollectionId: string | undefined; + + /** + *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the search. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; +} + +/** + * @public + */ +export interface StartFaceSearchResponse { + /** + *

    The identifier for the search job. Use JobId to identify the job in a subsequent call to GetFaceSearch.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StartLabelDetectionRequest { + /** + *

    The video in which you want to detect labels. The video must be stored + * in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartLabelDetection requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected label. Confidence + * represents how certain Amazon Rekognition is that a label is correctly identified.0 is the lowest confidence. + * 100 is the highest confidence. Amazon Rekognition Video doesn't return any labels with a confidence level + * lower than this specified value.

    + *

    If you don't specify MinConfidence, the operation returns labels and + * bounding boxes (if detected) with confidence values greater than or equal to 50 + * percent.

    + */ + MinConfidence?: number; + + /** + *

    The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the label detection + * operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; + + /** + *

    The features to return after video analysis. You can specify that GENERAL_LABELS are returned.

    + */ + Features?: (LabelDetectionFeatureName | string)[]; + + /** + *

    The settings for a StartLabelDetection request.Contains the specified parameters for the label detection request of an asynchronous label analysis operation. + * Settings can include filters for GENERAL_LABELS.

    + */ + Settings?: LabelDetectionSettings; +} + +/** + * @public + */ +export interface StartLabelDetectionResponse { + /** + *

    The identifier for the label detection job. Use JobId to identify the job in + * a subsequent call to GetLabelDetection.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StartPersonTrackingRequest { + /** + *

    The video in which you want to detect people. The video must be stored + * in an Amazon S3 bucket.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartPersonTracking requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The Amazon SNS topic ARN you want Amazon Rekognition Video to publish the completion status of the people detection + * operation to. The Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; +} + +/** + * @public + */ +export interface StartPersonTrackingResponse { + /** + *

    The identifier for the person detection job. Use JobId to identify the job in + * a subsequent call to GetPersonTracking.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StartProjectVersionRequest { + /** + *

    The Amazon Resource Name(ARN) of the model version that you want to start.

    + */ + ProjectVersionArn: string | undefined; + + /** + *

    The minimum number of inference units to use. A single + * inference unit represents 1 hour of processing.

    + *

    For information about the number + * of transactions per second (TPS) that an inference unit can support, see + * Running a trained Amazon Rekognition Custom Labels model in the + * Amazon Rekognition Custom Labels Guide. + *

    + *

    Use a higher number to increase the TPS throughput of your model. You are charged for the number + * of inference units that you use. + *

    + */ + MinInferenceUnits: number | undefined; + + /** + *

    The maximum number of inference units to use for auto-scaling the model. If you don't + * specify a value, Amazon Rekognition Custom Labels doesn't auto-scale the model.

    + */ + MaxInferenceUnits?: number; +} + +/** + * @public + */ +export interface StartProjectVersionResponse { + /** + *

    The current running status of the model.

    + */ + Status?: ProjectVersionStatus | string; +} + +/** + * @public + *

    Filters for the shot detection segments returned by GetSegmentDetection. + * For more information, see StartSegmentDetectionFilters.

    + */ +export interface StartShotDetectionFilter { + /** + *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected segment. Confidence + * represents how certain Amazon Rekognition is that a segment is correctly identified. 0 is the lowest confidence. + * 100 is the highest confidence. Amazon Rekognition Video doesn't return any segments with a confidence level + * lower than this specified value.

    + *

    If you don't specify MinSegmentConfidence, the GetSegmentDetection returns + * segments with confidence values greater than or equal to 50 percent.

    + */ + MinSegmentConfidence?: number; +} + +/** + * @public + *

    Filters for the technical segments returned by GetSegmentDetection. For more information, + * see StartSegmentDetectionFilters.

    + */ +export interface StartTechnicalCueDetectionFilter { + /** + *

    Specifies the minimum confidence that Amazon Rekognition Video must have in order to return a detected segment. Confidence + * represents how certain Amazon Rekognition is that a segment is correctly identified. 0 is the lowest confidence. + * 100 is the highest confidence. Amazon Rekognition Video doesn't return any segments with a confidence level + * lower than this specified value.

    + *

    If you don't specify MinSegmentConfidence, GetSegmentDetection returns + * segments with confidence values greater than or equal to 50 percent.

    + */ + MinSegmentConfidence?: number; + + /** + *

    + * A filter that allows you to control the black frame detection by specifying the black levels and pixel coverage of black pixels in a frame. + * Videos can come from multiple sources, formats, and time periods, with different standards and varying noise levels for black frames that need to be accounted for. + *

    + */ + BlackFrame?: BlackFrame; +} + +/** + * @public + *

    Filters applied to the technical cue or shot detection segments. + * For more information, see StartSegmentDetection. + *

    + */ +export interface StartSegmentDetectionFilters { + /** + *

    Filters that are specific to technical cues.

    + */ + TechnicalCueFilter?: StartTechnicalCueDetectionFilter; + + /** + *

    Filters that are specific to shot detections.

    + */ + ShotFilter?: StartShotDetectionFilter; +} + +/** + * @public + */ +export interface StartSegmentDetectionRequest { + /** + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple + * StartSegmentDetection requests, the same JobId is returned. Use + * ClientRequestToken to prevent the same job from being accidently started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The ARN of the Amazon SNS topic to which you want Amazon Rekognition Video to publish the completion status of the + * segment detection operation. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier you specify that's returned in the completion notification that's published to your Amazon Simple Notification Service topic. + * For example, you can use JobTag to group related jobs and identify them in the completion notification.

    + */ + JobTag?: string; + + /** + *

    Filters for technical cue or shot detection.

    + */ + Filters?: StartSegmentDetectionFilters; + + /** + *

    An array of segment types to detect in the video. Valid values are TECHNICAL_CUE and SHOT.

    + */ + SegmentTypes: (SegmentType | string)[] | undefined; +} + +/** + * @public + */ +export interface StartSegmentDetectionResponse { + /** + *

    Unique identifier for the segment detection job. The JobId is returned from StartSegmentDetection. + *

    + */ + JobId?: string; +} + +/** + * @public + *

    This is a required parameter for label detection stream processors and should not be used + * to start a face search stream processor.

    + */ +export interface StreamProcessingStartSelector { + /** + *

    + * Specifies the starting point in the stream to start processing. This can be done with a producer timestamp or a fragment number in a Kinesis stream. + *

    + */ + KVSStreamStartSelector?: KinesisVideoStreamStartSelector; +} + +/** + * @public + *

    + * Specifies when to stop processing the stream. You can specify a maximum amount + * of time to process the video. + *

    + */ +export interface StreamProcessingStopSelector { + /** + *

    + * Specifies the maximum amount of time in seconds that you want the stream to be processed. The largest amount of time is 2 minutes. The default is 10 seconds. + *

    + */ + MaxDurationInSeconds?: number; +} + +/** + * @public + */ +export interface StartStreamProcessorRequest { + /** + *

    The name of the stream processor to start processing.

    + */ + Name: string | undefined; + + /** + *

    + * Specifies the starting point in the Kinesis stream to start processing. + * You can use the producer timestamp or the fragment number. If you use the producer timestamp, you must put the time in milliseconds. + * For more information about fragment numbers, see Fragment. + *

    + *

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

    + */ + StartSelector?: StreamProcessingStartSelector; + + /** + *

    + * Specifies when to stop processing the stream. You can specify a + * maximum amount of time to process the video. + *

    + *

    This is a required parameter for label detection stream processors and should not be used to start a face search stream processor.

    + */ + StopSelector?: StreamProcessingStopSelector; +} + +/** + * @public + */ +export interface StartStreamProcessorResponse { + /** + *

    + * A unique identifier for the stream processing session. + *

    + */ + SessionId?: string; +} + +/** + * @public + *

    Set of optional parameters that let you set the criteria text must meet to be included in your response. + * WordFilter looks at a word's height, width and minimum confidence. RegionOfInterest + * lets you set a specific region of the screen to look for text in.

    + */ +export interface StartTextDetectionFilters { + /** + *

    Filters focusing on qualities of the text, such as confidence or size.

    + */ + WordFilter?: DetectionFilter; + + /** + *

    Filter focusing on a certain area of the frame. Uses a BoundingBox object to set the region + * of the screen.

    + */ + RegionsOfInterest?: RegionOfInterest[]; +} + +/** + * @public + */ +export interface StartTextDetectionRequest { + /** + *

    Video file stored in an Amazon S3 bucket. Amazon Rekognition video start operations such as StartLabelDetection use Video to + * specify a video for analysis. The supported file formats are .mp4, .mov and .avi.

    + */ + Video: Video | undefined; + + /** + *

    Idempotent token used to identify the start request. If you use the same token with multiple StartTextDetection + * requests, the same JobId is returned. Use ClientRequestToken to prevent the same job + * from being accidentaly started more than once.

    + */ + ClientRequestToken?: string; + + /** + *

    The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see + * Calling Amazon Rekognition Video operations. Note that the Amazon SNS topic must have a topic name that begins with AmazonRekognition if you are using the AmazonRekognitionServiceRole permissions policy to access the topic. + * For more information, see Giving access to multiple Amazon SNS topics.

    + */ + NotificationChannel?: NotificationChannel; + + /** + *

    An identifier returned in the completion status published by your Amazon Simple Notification Service topic. For example, you can use JobTag to group related jobs + * and identify them in the completion notification.

    + */ + JobTag?: string; + + /** + *

    Optional parameters that let you set criteria the text must meet to be included in your response.

    + */ + Filters?: StartTextDetectionFilters; +} + +/** + * @public + */ +export interface StartTextDetectionResponse { + /** + *

    Identifier for the text detection job. Use JobId to identify the job in a subsequent call to GetTextDetection.

    + */ + JobId?: string; +} + +/** + * @public + */ +export interface StopProjectVersionRequest { + /** + *

    The Amazon Resource Name (ARN) of the model version that you want to delete.

    + *

    This operation requires permissions to perform the rekognition:StopProjectVersion action.

    + */ + ProjectVersionArn: string | undefined; +} + +/** + * @public + */ +export interface StopProjectVersionResponse { + /** + *

    The current status of the stop operation.

    + */ + Status?: ProjectVersionStatus | string; +} + +/** + * @public + */ +export interface StopStreamProcessorRequest { + /** + *

    The name of a stream processor created by CreateStreamProcessor.

    + */ + Name: string | undefined; +} + +/** + * @public + */ +export interface StopStreamProcessorResponse {} + +/** + * @public + */ +export interface TagResourceRequest { + /** + *

    Amazon Resource Name (ARN) of the model, collection, or stream processor that you want to + * assign the tags to.

    + */ + ResourceArn: string | undefined; + + /** + *

    The key-value tags to assign to the resource.

    + */ + Tags: Record | undefined; +} + +/** + * @public + */ +export interface TagResourceResponse {} /** * @public diff --git a/clients/client-rekognition/src/pagination/ListUsersPaginator.ts b/clients/client-rekognition/src/pagination/ListUsersPaginator.ts new file mode 100644 index 000000000000..4644e6742d1f --- /dev/null +++ b/clients/client-rekognition/src/pagination/ListUsersPaginator.ts @@ -0,0 +1,46 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { ListUsersCommand, ListUsersCommandInput, ListUsersCommandOutput } from "../commands/ListUsersCommand"; +import { RekognitionClient } from "../RekognitionClient"; +import { RekognitionPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: RekognitionClient, + input: ListUsersCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new ListUsersCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateListUsers( + config: RekognitionPaginationConfiguration, + input: ListUsersCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.NextToken + let token: typeof input.NextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: ListUsersCommandOutput; + while (hasNext) { + input.NextToken = token; + input["MaxResults"] = config.pageSize; + if (config.client instanceof RekognitionClient) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Rekognition | RekognitionClient"); + } + yield page; + const prevToken = token; + token = page.NextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-rekognition/src/pagination/index.ts b/clients/client-rekognition/src/pagination/index.ts index 0d9ead4a6c10..0fdb6acf8f87 100644 --- a/clients/client-rekognition/src/pagination/index.ts +++ b/clients/client-rekognition/src/pagination/index.ts @@ -25,3 +25,4 @@ export * from "./ListDatasetLabelsPaginator"; export * from "./ListFacesPaginator"; export * from "./ListProjectPoliciesPaginator"; export * from "./ListStreamProcessorsPaginator"; +export * from "./ListUsersPaginator"; diff --git a/clients/client-rekognition/src/protocols/Aws_json1_1.ts b/clients/client-rekognition/src/protocols/Aws_json1_1.ts index a7f53c0920df..a5304cb1d0e3 100644 --- a/clients/client-rekognition/src/protocols/Aws_json1_1.ts +++ b/clients/client-rekognition/src/protocols/Aws_json1_1.ts @@ -18,7 +18,9 @@ import { import { HeaderBag as __HeaderBag, ResponseMetadata as __ResponseMetadata } from "@aws-sdk/types"; import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { Endpoint as __Endpoint, SerdeContext as __SerdeContext } from "@smithy/types"; +import { v4 as generateIdempotencyToken } from "uuid"; +import { AssociateFacesCommandInput, AssociateFacesCommandOutput } from "../commands/AssociateFacesCommand"; import { CompareFacesCommandInput, CompareFacesCommandOutput } from "../commands/CompareFacesCommand"; import { CopyProjectVersionCommandInput, CopyProjectVersionCommandOutput } from "../commands/CopyProjectVersionCommand"; import { CreateCollectionCommandInput, CreateCollectionCommandOutput } from "../commands/CreateCollectionCommand"; @@ -36,6 +38,7 @@ import { CreateStreamProcessorCommandInput, CreateStreamProcessorCommandOutput, } from "../commands/CreateStreamProcessorCommand"; +import { CreateUserCommandInput, CreateUserCommandOutput } from "../commands/CreateUserCommand"; import { DeleteCollectionCommandInput, DeleteCollectionCommandOutput } from "../commands/DeleteCollectionCommand"; import { DeleteDatasetCommandInput, DeleteDatasetCommandOutput } from "../commands/DeleteDatasetCommand"; import { DeleteFacesCommandInput, DeleteFacesCommandOutput } from "../commands/DeleteFacesCommand"; @@ -52,6 +55,7 @@ import { DeleteStreamProcessorCommandInput, DeleteStreamProcessorCommandOutput, } from "../commands/DeleteStreamProcessorCommand"; +import { DeleteUserCommandInput, DeleteUserCommandOutput } from "../commands/DeleteUserCommand"; import { DescribeCollectionCommandInput, DescribeCollectionCommandOutput } from "../commands/DescribeCollectionCommand"; import { DescribeDatasetCommandInput, DescribeDatasetCommandOutput } from "../commands/DescribeDatasetCommand"; import { DescribeProjectsCommandInput, DescribeProjectsCommandOutput } from "../commands/DescribeProjectsCommand"; @@ -75,6 +79,7 @@ import { DetectProtectiveEquipmentCommandOutput, } from "../commands/DetectProtectiveEquipmentCommand"; import { DetectTextCommandInput, DetectTextCommandOutput } from "../commands/DetectTextCommand"; +import { DisassociateFacesCommandInput, DisassociateFacesCommandOutput } from "../commands/DisassociateFacesCommand"; import { DistributeDatasetEntriesCommandInput, DistributeDatasetEntriesCommandOutput, @@ -118,6 +123,7 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "../commands/ListTagsForResourceCommand"; +import { ListUsersCommandInput, ListUsersCommandOutput } from "../commands/ListUsersCommand"; import { PutProjectPolicyCommandInput, PutProjectPolicyCommandOutput } from "../commands/PutProjectPolicyCommand"; import { RecognizeCelebritiesCommandInput, @@ -125,6 +131,8 @@ import { } from "../commands/RecognizeCelebritiesCommand"; import { SearchFacesByImageCommandInput, SearchFacesByImageCommandOutput } from "../commands/SearchFacesByImageCommand"; import { SearchFacesCommandInput, SearchFacesCommandOutput } from "../commands/SearchFacesCommand"; +import { SearchUsersByImageCommandInput, SearchUsersByImageCommandOutput } from "../commands/SearchUsersByImageCommand"; +import { SearchUsersCommandInput, SearchUsersCommandOutput } from "../commands/SearchUsersCommand"; import { StartCelebrityRecognitionCommandInput, StartCelebrityRecognitionCommandOutput, @@ -174,6 +182,8 @@ import { import { AccessDeniedException, Asset, + AssociateFacesRequest, + AssociateFacesResponse, Attribute, AuditImage, Beard, @@ -187,6 +197,7 @@ import { CompareFacesMatch, CompareFacesRequest, CompareFacesResponse, + ConflictException, ConnectedHomeSettings, ConnectedHomeSettingsForUpdate, ContentClassifier, @@ -200,6 +211,7 @@ import { CreateProjectRequest, CreateProjectVersionRequest, CreateStreamProcessorRequest, + CreateUserRequest, CustomLabel, DatasetChanges, DatasetDescription, @@ -212,6 +224,7 @@ import { DeleteProjectRequest, DeleteProjectVersionRequest, DeleteStreamProcessorRequest, + DeleteUserRequest, DescribeCollectionRequest, DescribeCollectionResponse, DescribeDatasetRequest, @@ -243,6 +256,7 @@ import { DetectTextFilters, DetectTextRequest, DetectTextResponse, + DisassociateFacesRequest, DistributeDataset, DistributeDatasetEntriesRequest, DominantColor, @@ -317,6 +331,7 @@ import { ListProjectPoliciesResponse, ListStreamProcessorsRequest, ListTagsForResourceRequest, + ListUsersRequest, LivenessOutputConfig, MalformedPolicyDocumentException, ModerationLabel, @@ -347,10 +362,15 @@ import { ResourceNotReadyException, S3Destination, S3Object, + SearchedFaceDetails, SearchFacesByImageRequest, SearchFacesByImageResponse, SearchFacesRequest, SearchFacesResponse, + SearchUsersByImageRequest, + SearchUsersByImageResponse, + SearchUsersRequest, + SearchUsersResponse, SegmentDetection, SegmentType, ServiceQuotaExceededException, @@ -358,30 +378,12 @@ import { ShotSegment, Smile, StartCelebrityRecognitionRequest, - StartContentModerationRequest, - StartFaceDetectionRequest, - StartFaceSearchRequest, - StartLabelDetectionRequest, - StartPersonTrackingRequest, - StartProjectVersionRequest, - StartSegmentDetectionFilters, - StartSegmentDetectionRequest, - StartShotDetectionFilter, - StartStreamProcessorRequest, - StartTechnicalCueDetectionFilter, - StartTextDetectionFilters, - StartTextDetectionRequest, - StopProjectVersionRequest, - StopStreamProcessorRequest, - StreamProcessingStartSelector, - StreamProcessingStopSelector, StreamProcessorDataSharingPreference, StreamProcessorInput, StreamProcessorNotificationChannel, StreamProcessorOutput, StreamProcessorSettings, Sunglasses, - TagResourceRequest, TechnicalCueSegment, TestingData, TextDetection, @@ -389,19 +391,53 @@ import { ThrottlingException, TrainingData, UnindexedFace, + UnsearchedFace, + UnsuccessfulFaceAssociation, + UserMatch, Video, VideoMetadata, - VideoTooLargeException, } from "../models/models_0"; import { + StartContentModerationRequest, + StartFaceDetectionRequest, + StartFaceSearchRequest, + StartLabelDetectionRequest, + StartPersonTrackingRequest, + StartProjectVersionRequest, + StartSegmentDetectionFilters, + StartSegmentDetectionRequest, + StartShotDetectionFilter, + StartStreamProcessorRequest, + StartTechnicalCueDetectionFilter, + StartTextDetectionFilters, + StartTextDetectionRequest, + StopProjectVersionRequest, + StopStreamProcessorRequest, + StreamProcessingStartSelector, + StreamProcessingStopSelector, StreamProcessorParameterToDelete, StreamProcessorSettingsForUpdate, + TagResourceRequest, UntagResourceRequest, UpdateDatasetEntriesRequest, UpdateStreamProcessorRequest, + VideoTooLargeException, } from "../models/models_1"; import { RekognitionServiceException as __BaseException } from "../models/RekognitionServiceException"; +/** + * serializeAws_json1_1AssociateFacesCommand + */ +export const se_AssociateFacesCommand = async ( + input: AssociateFacesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("AssociateFaces"); + let body: any; + body = JSON.stringify(se_AssociateFacesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1CompareFacesCommand */ @@ -506,6 +542,19 @@ export const se_CreateStreamProcessorCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1CreateUserCommand + */ +export const se_CreateUserCommand = async ( + input: CreateUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateUser"); + let body: any; + body = JSON.stringify(se_CreateUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DeleteCollectionCommand */ @@ -597,6 +646,19 @@ export const se_DeleteStreamProcessorCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DeleteUserCommand + */ +export const se_DeleteUserCommand = async ( + input: DeleteUserCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteUser"); + let body: any; + body = JSON.stringify(se_DeleteUserRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeCollectionCommand */ @@ -740,6 +802,19 @@ export const se_DetectTextCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DisassociateFacesCommand + */ +export const se_DisassociateFacesCommand = async ( + input: DisassociateFacesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DisassociateFaces"); + let body: any; + body = JSON.stringify(se_DisassociateFacesRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DistributeDatasetEntriesCommand */ @@ -987,6 +1062,19 @@ export const se_ListTagsForResourceCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1ListUsersCommand + */ +export const se_ListUsersCommand = async ( + input: ListUsersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListUsers"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1PutProjectPolicyCommand */ @@ -1039,6 +1127,32 @@ export const se_SearchFacesByImageCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1SearchUsersCommand + */ +export const se_SearchUsersCommand = async ( + input: SearchUsersCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SearchUsers"); + let body: any; + body = JSON.stringify(se_SearchUsersRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_1SearchUsersByImageCommand + */ +export const se_SearchUsersByImageCommand = async ( + input: SearchUsersByImageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SearchUsersByImage"); + let body: any; + body = JSON.stringify(se_SearchUsersByImageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1StartCelebrityRecognitionCommand */ @@ -1247,6 +1361,76 @@ export const se_UpdateStreamProcessorCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * deserializeAws_json1_1AssociateFacesCommand + */ +export const de_AssociateFacesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_AssociateFacesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_AssociateFacesResponse(data, context); + const response: AssociateFacesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1AssociateFacesCommandError + */ +const de_AssociateFacesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.rekognition#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "IdempotentParameterMismatchException": + case "com.amazonaws.rekognition#IdempotentParameterMismatchException": + throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.rekognition#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1CompareFacesCommand */ @@ -1777,6 +1961,76 @@ const de_CreateStreamProcessorCommandError = async ( } }; +/** + * deserializeAws_json1_1CreateUserCommand + */ +export const de_CreateUserCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreateUserCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CreateUserCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1CreateUserCommandError + */ +const de_CreateUserCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.rekognition#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "IdempotentParameterMismatchException": + case "com.amazonaws.rekognition#IdempotentParameterMismatchException": + throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.rekognition#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1DeleteCollectionCommand */ @@ -2223,19 +2477,19 @@ const de_DeleteStreamProcessorCommandError = async ( }; /** - * deserializeAws_json1_1DescribeCollectionCommand + * deserializeAws_json1_1DeleteUserCommand */ -export const de_DescribeCollectionCommand = async ( +export const de_DeleteUserCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_DescribeCollectionCommandError(output, context); + return de_DeleteUserCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeCollectionResponse(data, context); - const response: DescribeCollectionCommandOutput = { + contents = _json(data); + const response: DeleteUserCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -2243,12 +2497,12 @@ export const de_DescribeCollectionCommand = async ( }; /** - * deserializeAws_json1_1DescribeCollectionCommandError + * deserializeAws_json1_1DeleteUserCommandError */ -const de_DescribeCollectionCommandError = async ( +const de_DeleteUserCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2258,6 +2512,12 @@ const de_DescribeCollectionCommandError = async ( case "AccessDeniedException": case "com.amazonaws.rekognition#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.rekognition#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "IdempotentParameterMismatchException": + case "com.amazonaws.rekognition#IdempotentParameterMismatchException": + throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context); case "InternalServerError": case "com.amazonaws.rekognition#InternalServerError": throw await de_InternalServerErrorRes(parsedOutput, context); @@ -2284,19 +2544,19 @@ const de_DescribeCollectionCommandError = async ( }; /** - * deserializeAws_json1_1DescribeDatasetCommand + * deserializeAws_json1_1DescribeCollectionCommand */ -export const de_DescribeDatasetCommand = async ( +export const de_DescribeCollectionCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_DescribeDatasetCommandError(output, context); + return de_DescribeCollectionCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeDatasetResponse(data, context); - const response: DescribeDatasetCommandOutput = { + contents = de_DescribeCollectionResponse(data, context); + const response: DescribeCollectionCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -2304,12 +2564,12 @@ export const de_DescribeDatasetCommand = async ( }; /** - * deserializeAws_json1_1DescribeDatasetCommandError + * deserializeAws_json1_1DescribeCollectionCommandError */ -const de_DescribeDatasetCommandError = async ( +const de_DescribeCollectionCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -2345,19 +2605,19 @@ const de_DescribeDatasetCommandError = async ( }; /** - * deserializeAws_json1_1DescribeProjectsCommand + * deserializeAws_json1_1DescribeDatasetCommand */ -export const de_DescribeProjectsCommand = async ( +export const de_DescribeDatasetCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_DescribeProjectsCommandError(output, context); + return de_DescribeDatasetCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_DescribeProjectsResponse(data, context); - const response: DescribeProjectsCommandOutput = { + contents = de_DescribeDatasetResponse(data, context); + const response: DescribeDatasetCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -2365,7 +2625,68 @@ export const de_DescribeProjectsCommand = async ( }; /** - * deserializeAws_json1_1DescribeProjectsCommandError + * deserializeAws_json1_1DescribeDatasetCommandError + */ +const de_DescribeDatasetCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1DescribeProjectsCommand + */ +export const de_DescribeProjectsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DescribeProjectsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DescribeProjectsResponse(data, context); + const response: DescribeProjectsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DescribeProjectsCommandError */ const de_DescribeProjectsCommandError = async ( output: __HttpResponse, @@ -2944,6 +3265,73 @@ const de_DetectTextCommandError = async ( } }; +/** + * deserializeAws_json1_1DisassociateFacesCommand + */ +export const de_DisassociateFacesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DisassociateFacesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DisassociateFacesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1DisassociateFacesCommandError + */ +const de_DisassociateFacesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ConflictException": + case "com.amazonaws.rekognition#ConflictException": + throw await de_ConflictExceptionRes(parsedOutput, context); + case "IdempotentParameterMismatchException": + case "com.amazonaws.rekognition#IdempotentParameterMismatchException": + throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_json1_1DistributeDatasetEntriesCommand */ @@ -4111,17 +4499,218 @@ const de_ListStreamProcessorsCommandError = async ( /** * deserializeAws_json1_1ListTagsForResourceCommand */ -export const de_ListTagsForResourceCommand = async ( +export const de_ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListTagsForResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListTagsForResourceCommandError + */ +const de_ListTagsForResourceCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1ListUsersCommand + */ +export const de_ListUsersCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListUsersCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListUsersCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1ListUsersCommandError + */ +const de_ListUsersCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidPaginationTokenException": + case "com.amazonaws.rekognition#InvalidPaginationTokenException": + throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1PutProjectPolicyCommand + */ +export const de_PutProjectPolicyCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_PutProjectPolicyCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: PutProjectPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_1PutProjectPolicyCommandError + */ +const de_PutProjectPolicyCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.rekognition#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerError": + case "com.amazonaws.rekognition#InternalServerError": + throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidParameterException": + case "com.amazonaws.rekognition#InvalidParameterException": + throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidPolicyRevisionIdException": + case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException": + throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context); + case "LimitExceededException": + case "com.amazonaws.rekognition#LimitExceededException": + throw await de_LimitExceededExceptionRes(parsedOutput, context); + case "MalformedPolicyDocumentException": + case "com.amazonaws.rekognition#MalformedPolicyDocumentException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "ProvisionedThroughputExceededException": + case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": + throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceAlreadyExistsException": + case "com.amazonaws.rekognition#ResourceAlreadyExistsException": + throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ServiceQuotaExceededException": + case "com.amazonaws.rekognition#ServiceQuotaExceededException": + throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.rekognition#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_1RecognizeCelebritiesCommand + */ +export const de_RecognizeCelebritiesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_ListTagsForResourceCommandError(output, context); + return de_RecognizeCelebritiesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = _json(data); - const response: ListTagsForResourceCommandOutput = { + contents = de_RecognizeCelebritiesResponse(data, context); + const response: RecognizeCelebritiesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -4129,12 +4718,12 @@ export const de_ListTagsForResourceCommand = async ( }; /** - * deserializeAws_json1_1ListTagsForResourceCommandError + * deserializeAws_json1_1RecognizeCelebritiesCommandError */ -const de_ListTagsForResourceCommandError = async ( +const de_RecognizeCelebritiesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -4144,18 +4733,24 @@ const de_ListTagsForResourceCommandError = async ( case "AccessDeniedException": case "com.amazonaws.rekognition#AccessDeniedException": throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "ImageTooLargeException": + case "com.amazonaws.rekognition#ImageTooLargeException": + throw await de_ImageTooLargeExceptionRes(parsedOutput, context); case "InternalServerError": case "com.amazonaws.rekognition#InternalServerError": throw await de_InternalServerErrorRes(parsedOutput, context); + case "InvalidImageFormatException": + case "com.amazonaws.rekognition#InvalidImageFormatException": + throw await de_InvalidImageFormatExceptionRes(parsedOutput, context); case "InvalidParameterException": case "com.amazonaws.rekognition#InvalidParameterException": throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidS3ObjectException": + case "com.amazonaws.rekognition#InvalidS3ObjectException": + throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context); case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.rekognition#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -4170,19 +4765,19 @@ const de_ListTagsForResourceCommandError = async ( }; /** - * deserializeAws_json1_1PutProjectPolicyCommand + * deserializeAws_json1_1SearchFacesCommand */ -export const de_PutProjectPolicyCommand = async ( +export const de_SearchFacesCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_PutProjectPolicyCommandError(output, context); + return de_SearchFacesCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = _json(data); - const response: PutProjectPolicyCommandOutput = { + contents = de_SearchFacesResponse(data, context); + const response: SearchFacesCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -4190,12 +4785,12 @@ export const de_PutProjectPolicyCommand = async ( }; /** - * deserializeAws_json1_1PutProjectPolicyCommandError + * deserializeAws_json1_1SearchFacesCommandError */ -const de_PutProjectPolicyCommandError = async ( +const de_SearchFacesCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -4211,27 +4806,12 @@ const de_PutProjectPolicyCommandError = async ( case "InvalidParameterException": case "com.amazonaws.rekognition#InvalidParameterException": throw await de_InvalidParameterExceptionRes(parsedOutput, context); - case "InvalidPolicyRevisionIdException": - case "com.amazonaws.rekognition#InvalidPolicyRevisionIdException": - throw await de_InvalidPolicyRevisionIdExceptionRes(parsedOutput, context); - case "LimitExceededException": - case "com.amazonaws.rekognition#LimitExceededException": - throw await de_LimitExceededExceptionRes(parsedOutput, context); - case "MalformedPolicyDocumentException": - case "com.amazonaws.rekognition#MalformedPolicyDocumentException": - throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); - case "ResourceAlreadyExistsException": - case "com.amazonaws.rekognition#ResourceAlreadyExistsException": - throw await de_ResourceAlreadyExistsExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.rekognition#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "ServiceQuotaExceededException": - case "com.amazonaws.rekognition#ServiceQuotaExceededException": - throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -4246,19 +4826,19 @@ const de_PutProjectPolicyCommandError = async ( }; /** - * deserializeAws_json1_1RecognizeCelebritiesCommand + * deserializeAws_json1_1SearchFacesByImageCommand */ -export const de_RecognizeCelebritiesCommand = async ( +export const de_SearchFacesByImageCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_RecognizeCelebritiesCommandError(output, context); + return de_SearchFacesByImageCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_RecognizeCelebritiesResponse(data, context); - const response: RecognizeCelebritiesCommandOutput = { + contents = de_SearchFacesByImageResponse(data, context); + const response: SearchFacesByImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -4266,12 +4846,12 @@ export const de_RecognizeCelebritiesCommand = async ( }; /** - * deserializeAws_json1_1RecognizeCelebritiesCommandError + * deserializeAws_json1_1SearchFacesByImageCommandError */ -const de_RecognizeCelebritiesCommandError = async ( +const de_SearchFacesByImageCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -4299,6 +4879,9 @@ const de_RecognizeCelebritiesCommandError = async ( case "ProvisionedThroughputExceededException": case "com.amazonaws.rekognition#ProvisionedThroughputExceededException": throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rekognition#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "ThrottlingException": case "com.amazonaws.rekognition#ThrottlingException": throw await de_ThrottlingExceptionRes(parsedOutput, context); @@ -4313,19 +4896,19 @@ const de_RecognizeCelebritiesCommandError = async ( }; /** - * deserializeAws_json1_1SearchFacesCommand + * deserializeAws_json1_1SearchUsersCommand */ -export const de_SearchFacesCommand = async ( +export const de_SearchUsersCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_SearchFacesCommandError(output, context); + return de_SearchUsersCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchFacesResponse(data, context); - const response: SearchFacesCommandOutput = { + contents = de_SearchUsersResponse(data, context); + const response: SearchUsersCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -4333,12 +4916,12 @@ export const de_SearchFacesCommand = async ( }; /** - * deserializeAws_json1_1SearchFacesCommandError + * deserializeAws_json1_1SearchUsersCommandError */ -const de_SearchFacesCommandError = async ( +const de_SearchUsersCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -4374,19 +4957,19 @@ const de_SearchFacesCommandError = async ( }; /** - * deserializeAws_json1_1SearchFacesByImageCommand + * deserializeAws_json1_1SearchUsersByImageCommand */ -export const de_SearchFacesByImageCommand = async ( +export const de_SearchUsersByImageCommand = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { if (output.statusCode >= 300) { - return de_SearchFacesByImageCommandError(output, context); + return de_SearchUsersByImageCommandError(output, context); } const data: any = await parseBody(output.body, context); let contents: any = {}; - contents = de_SearchFacesByImageResponse(data, context); - const response: SearchFacesByImageCommandOutput = { + contents = de_SearchUsersByImageResponse(data, context); + const response: SearchUsersByImageCommandOutput = { $metadata: deserializeMetadata(output), ...contents, }; @@ -4394,12 +4977,12 @@ export const de_SearchFacesByImageCommand = async ( }; /** - * deserializeAws_json1_1SearchFacesByImageCommandError + * deserializeAws_json1_1SearchUsersByImageCommandError */ -const de_SearchFacesByImageCommandError = async ( +const de_SearchUsersByImageCommandError = async ( output: __HttpResponse, context: __SerdeContext -): Promise => { +): Promise => { const parsedOutput: any = { ...output, body: await parseErrorBody(output.body, context), @@ -5537,6 +6120,19 @@ const de_AccessDeniedExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_json1_1ConflictExceptionRes + */ +const de_ConflictExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_json1_1HumanLoopQuotaExceededExceptionRes */ @@ -5855,6 +6451,19 @@ const de_VideoTooLargeExceptionRes = async ( // se_Assets omitted. +/** + * serializeAws_json1_1AssociateFacesRequest + */ +const se_AssociateFacesRequest = (input: AssociateFacesRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + CollectionId: [], + FaceIds: _json, + UserId: [], + UserMatchThreshold: __serializeFloat, + }); +}; + // se_Attributes omitted. /** @@ -5947,6 +6556,17 @@ const se_CreateStreamProcessorRequest = (input: CreateStreamProcessorRequest, co }); }; +/** + * serializeAws_json1_1CreateUserRequest + */ +const se_CreateUserRequest = (input: CreateUserRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + CollectionId: [], + UserId: [], + }); +}; + /** * serializeAws_json1_1DatasetChanges */ @@ -5974,6 +6594,17 @@ const se_DatasetChanges = (input: DatasetChanges, context: __SerdeContext): any // se_DeleteStreamProcessorRequest omitted. +/** + * serializeAws_json1_1DeleteUserRequest + */ +const se_DeleteUserRequest = (input: DeleteUserRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + CollectionId: [], + UserId: [], + }); +}; + // se_DescribeCollectionRequest omitted. // se_DescribeDatasetRequest omitted. @@ -6077,6 +6708,18 @@ const se_DetectTextRequest = (input: DetectTextRequest, context: __SerdeContext) }); }; +/** + * serializeAws_json1_1DisassociateFacesRequest + */ +const se_DisassociateFacesRequest = (input: DisassociateFacesRequest, context: __SerdeContext): any => { + return take(input, { + ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()], + CollectionId: [], + FaceIds: _json, + UserId: [], + }); +}; + // se_DistributeDataset omitted. // se_DistributeDatasetEntriesRequest omitted. @@ -6173,6 +6816,8 @@ const se_IndexFacesRequest = (input: IndexFacesRequest, context: __SerdeContext) // se_ListTagsForResourceRequest omitted. +// se_ListUsersRequest omitted. + // se_LivenessOutputConfig omitted. // se_NotificationChannel omitted. @@ -6278,6 +6923,32 @@ const se_SearchFacesRequest = (input: SearchFacesRequest, context: __SerdeContex }); }; +/** + * serializeAws_json1_1SearchUsersByImageRequest + */ +const se_SearchUsersByImageRequest = (input: SearchUsersByImageRequest, context: __SerdeContext): any => { + return take(input, { + CollectionId: [], + Image: (_) => se_Image(_, context), + MaxUsers: [], + QualityFilter: [], + UserMatchThreshold: __serializeFloat, + }); +}; + +/** + * serializeAws_json1_1SearchUsersRequest + */ +const se_SearchUsersRequest = (input: SearchUsersRequest, context: __SerdeContext): any => { + return take(input, { + CollectionId: [], + FaceId: [], + MaxUsers: [], + UserId: [], + UserMatchThreshold: __serializeFloat, + }); +}; + // se_SegmentTypes omitted. // se_StartCelebrityRecognitionRequest omitted. @@ -6470,6 +7141,8 @@ const se_UpdateStreamProcessorRequest = (input: UpdateStreamProcessorRequest, co }); }; +// se_UserFaceIdList omitted. + // se_VersionNames omitted. // se_Video omitted. @@ -6482,6 +7155,21 @@ const se_UpdateStreamProcessorRequest = (input: UpdateStreamProcessorRequest, co // de_Assets omitted. +// de_AssociatedFace omitted. + +// de_AssociatedFacesList omitted. + +/** + * deserializeAws_json1_1AssociateFacesResponse + */ +const de_AssociateFacesResponse = (output: any, context: __SerdeContext): AssociateFacesResponse => { + return take(output, { + AssociatedFaces: _json, + UnsuccessfulFaceAssociations: (_: any) => de_UnsuccessfulFaceAssociationList(_, context), + UserStatus: __expectString, + }) as any; +}; + // de_AudioMetadata omitted. // de_AudioMetadataList omitted. @@ -6692,6 +7380,8 @@ const de_CompareFacesUnmatchList = (output: any, context: __SerdeContext): Compa return retVal; }; +// de_ConflictException omitted. + // de_ConnectedHomeLabels omitted. /** @@ -6753,6 +7443,8 @@ const de_CoversBodyPart = (output: any, context: __SerdeContext): CoversBodyPart // de_CreateStreamProcessorResponse omitted. +// de_CreateUserResponse omitted. + /** * deserializeAws_json1_1CustomLabel */ @@ -6840,6 +7532,8 @@ const de_DatasetMetadataList = (output: any, context: __SerdeContext): DatasetMe // de_DeleteStreamProcessorResponse omitted. +// de_DeleteUserResponse omitted. + /** * deserializeAws_json1_1DescribeCollectionResponse */ @@ -6849,6 +7543,7 @@ const de_DescribeCollectionResponse = (output: any, context: __SerdeContext): De CreationTimestamp: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), FaceCount: __expectLong, FaceModelVersion: __expectString, + UserCount: __expectLong, }) as any; }; @@ -7012,6 +7707,12 @@ const de_DetectTextResponse = (output: any, context: __SerdeContext): DetectText }) as any; }; +// de_DisassociatedFace omitted. + +// de_DisassociatedFacesList omitted. + +// de_DisassociateFacesResponse omitted. + // de_DistributeDatasetEntriesResponse omitted. /** @@ -7139,6 +7840,7 @@ const de_Face = (output: any, context: __SerdeContext): Face => { FaceId: __expectString, ImageId: __expectString, IndexFacesModelVersion: __expectString, + UserId: __expectString, }) as any; }; @@ -7657,8 +8359,12 @@ const de_ListProjectPoliciesResponse = (output: any, context: __SerdeContext): L // de_ListTagsForResourceResponse omitted. +// de_ListUsersResponse omitted. + // de_MalformedPolicyDocumentException omitted. +// de_MatchedUser omitted. + /** * deserializeAws_json1_1ModerationLabel */ @@ -7972,6 +8678,19 @@ const de_RegionsOfInterest = (output: any, context: __SerdeContext): RegionOfInt // de_S3Object omitted. +// de_SearchedFace omitted. + +/** + * deserializeAws_json1_1SearchedFaceDetails + */ +const de_SearchedFaceDetails = (output: any, context: __SerdeContext): SearchedFaceDetails => { + return take(output, { + FaceDetail: (_: any) => de_FaceDetail(_, context), + }) as any; +}; + +// de_SearchedUser omitted. + /** * deserializeAws_json1_1SearchFacesByImageResponse */ @@ -7995,6 +8714,30 @@ const de_SearchFacesResponse = (output: any, context: __SerdeContext): SearchFac }) as any; }; +/** + * deserializeAws_json1_1SearchUsersByImageResponse + */ +const de_SearchUsersByImageResponse = (output: any, context: __SerdeContext): SearchUsersByImageResponse => { + return take(output, { + FaceModelVersion: __expectString, + SearchedFace: (_: any) => de_SearchedFaceDetails(_, context), + UnsearchedFaces: (_: any) => de_UnsearchedFacesList(_, context), + UserMatches: (_: any) => de_UserMatchList(_, context), + }) as any; +}; + +/** + * deserializeAws_json1_1SearchUsersResponse + */ +const de_SearchUsersResponse = (output: any, context: __SerdeContext): SearchUsersResponse => { + return take(output, { + FaceModelVersion: __expectString, + SearchedFace: _json, + SearchedUser: _json, + UserMatches: (_: any) => de_UserMatchList(_, context), + }) as any; +}; + /** * deserializeAws_json1_1SegmentDetection */ @@ -8207,6 +8950,68 @@ const de_UnindexedFaces = (output: any, context: __SerdeContext): UnindexedFace[ return retVal; }; +/** + * deserializeAws_json1_1UnsearchedFace + */ +const de_UnsearchedFace = (output: any, context: __SerdeContext): UnsearchedFace => { + return take(output, { + FaceDetails: (_: any) => de_FaceDetail(_, context), + Reasons: _json, + }) as any; +}; + +// de_UnsearchedFaceReasons omitted. + +/** + * deserializeAws_json1_1UnsearchedFacesList + */ +const de_UnsearchedFacesList = (output: any, context: __SerdeContext): UnsearchedFace[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_UnsearchedFace(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_json1_1UnsuccessfulFaceAssociation + */ +const de_UnsuccessfulFaceAssociation = (output: any, context: __SerdeContext): UnsuccessfulFaceAssociation => { + return take(output, { + Confidence: __limitedParseFloat32, + FaceId: __expectString, + Reasons: _json, + UserId: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_1UnsuccessfulFaceAssociationList + */ +const de_UnsuccessfulFaceAssociationList = (output: any, context: __SerdeContext): UnsuccessfulFaceAssociation[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_UnsuccessfulFaceAssociation(entry, context); + }); + return retVal; +}; + +// de_UnsuccessfulFaceAssociationReasons omitted. + +// de_UnsuccessfulFaceDeletion omitted. + +// de_UnsuccessfulFaceDeletionReasons omitted. + +// de_UnsuccessfulFaceDeletionsList omitted. + +// de_UnsuccessfulFaceDisassociation omitted. + +// de_UnsuccessfulFaceDisassociationList omitted. + +// de_UnsuccessfulFaceDisassociationReasons omitted. + // de_UntagResourceResponse omitted. // de_UpdateDatasetEntriesResponse omitted. @@ -8215,6 +9020,32 @@ const de_UnindexedFaces = (output: any, context: __SerdeContext): UnindexedFace[ // de_Urls omitted. +// de_User omitted. + +// de_UserList omitted. + +/** + * deserializeAws_json1_1UserMatch + */ +const de_UserMatch = (output: any, context: __SerdeContext): UserMatch => { + return take(output, { + Similarity: __limitedParseFloat32, + User: _json, + }) as any; +}; + +/** + * deserializeAws_json1_1UserMatchList + */ +const de_UserMatchList = (output: any, context: __SerdeContext): UserMatch[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_UserMatch(entry, context); + }); + return retVal; +}; + // de_ValidationData omitted. // de_Video omitted. diff --git a/codegen/sdk-codegen/aws-models/rekognition.json b/codegen/sdk-codegen/aws-models/rekognition.json index 9e078bdbd85a..006e8a93e2c9 100644 --- a/codegen/sdk-codegen/aws-models/rekognition.json +++ b/codegen/sdk-codegen/aws-models/rekognition.json @@ -87,6 +87,178 @@ "target": "com.amazonaws.rekognition#Asset" } }, + "com.amazonaws.rekognition#AssociateFaces": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#AssociateFacesRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#AssociateFacesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#ConflictException" + }, + { + "target": "com.amazonaws.rekognition#IdempotentParameterMismatchException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Associates one or more faces with an existing UserID. Takes an array of\n FaceIds. Each FaceId that are present in the FaceIds\n list is associated with the provided UserID. The maximum number of total FaceIds\n per UserID is 100.

    \n

    The UserMatchThreshold parameter specifies the minimum user match confidence\n required for the face to be associated with a UserID that has at least one FaceID\n already associated. This ensures that the FaceIds are associated with the right\n UserID. The value ranges from 0-100 and default value is 75.

    \n

    If successful, an array of AssociatedFace objects containing the associated\n FaceIds is returned. If a given face is already associated with the given\n UserID, it will be ignored and will not be returned in the response. If a given\n face is already associated to a different UserID, isn't found in the collection,\n doesn’t meet the UserMatchThreshold, or there are already 100 faces associated\n with the UserID, it will be returned as part of an array of\n UnsuccessfulFaceAssociations.\n

    \n

    The UserStatus reflects the status of an operation which updates a UserID\n representation with a list of given faces. The UserStatus can be:

    \n
      \n
    • \n

      ACTIVE - All associations or disassociations of FaceID(s) for a UserID are\n complete.

      \n
    • \n
    • \n

      CREATED - A UserID has been created, but has no FaceID(s) associated with it.

      \n
    • \n
    • \n

      UPDATING - A UserID is being updated and there are current associations or\n disassociations of FaceID(s) taking place.

      \n
    • \n
    ", + "smithy.api#examples": [ + { + "title": "AssociateFaces", + "documentation": "This operation associates one or more faces with an existing UserID.", + "input": { + "CollectionId": "MyCollection", + "UserId": "DemoUser", + "FaceIds": [ + "f5817d37-94f6-4335-bfee-6cf79a3d806e", + "851cb847-dccc-4fea-9309-9f4805967855", + "35ebbb41-7f67-4263-908d-dd0ecba05ab9" + ], + "UserMatchThreshold": 70, + "ClientRequestToken": "550e8400-e29b-41d4-a716-446655440002" + }, + "output": { + "UnsuccessfulFaceAssociations": [ + { + "Reasons": ["LOW_MATCH_CONFIDENCE"], + "FaceId": "f5817d37-94f6-4335-bfee-6cf79a3d806e", + "Confidence": 0.9375374913215637 + }, + { + "Reasons": ["ASSOCIATED_TO_A_DIFFERENT_USER"], + "FaceId": "851cb847-dccc-4fea-9309-9f4805967855", + "UserId": "demoUser2" + } + ], + "UserStatus": "UPDATING", + "AssociatedFaces": [ + { + "FaceId": "35ebbb41-7f67-4263-908d-dd0ecba05ab9" + } + ] + } + } + ] + } + }, + "com.amazonaws.rekognition#AssociateFacesRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection containing the UserID.

    ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    The ID for the existing UserID.

    ", + "smithy.api#required": {} + } + }, + "FaceIds": { + "target": "com.amazonaws.rekognition#UserFaceIdList", + "traits": { + "smithy.api#documentation": "

    An array of FaceIDs to associate with the UserID.

    ", + "smithy.api#required": {} + } + }, + "UserMatchThreshold": { + "target": "com.amazonaws.rekognition#Percent", + "traits": { + "smithy.api#documentation": "

    An optional value specifying the minimum confidence in the UserID match to return. The\n default value is 75.

    " + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.rekognition#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Idempotent token used to identify the request to AssociateFaces. If you use\n the same token with multiple AssociateFaces requests, the same response is returned.\n Use ClientRequestToken to prevent the same request from being processed more than\n once.

    ", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#AssociateFacesResponse": { + "type": "structure", + "members": { + "AssociatedFaces": { + "target": "com.amazonaws.rekognition#AssociatedFacesList", + "traits": { + "smithy.api#documentation": "

    An array of AssociatedFace objects containing FaceIDs that are successfully associated\n with the UserID is returned. Returned if the AssociateFaces action is successful.

    " + } + }, + "UnsuccessfulFaceAssociations": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceAssociationList", + "traits": { + "smithy.api#documentation": "

    An array of UnsuccessfulAssociation objects containing FaceIDs that are not successfully\n associated along with the reasons. Returned if the AssociateFaces action is successful.

    " + } + }, + "UserStatus": { + "target": "com.amazonaws.rekognition#UserStatus", + "traits": { + "smithy.api#documentation": "

    The status of an update made to a UserID. Reflects if the UserID has been updated for\n every requested change.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#AssociatedFace": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    Unique identifier assigned to the face.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Provides face metadata for the faces that are associated to a specific UserID.

    " + } + }, + "com.amazonaws.rekognition#AssociatedFacesList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#AssociatedFace" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.rekognition#Attribute": { "type": "enum", "members": { @@ -589,7 +761,53 @@ } ], "traits": { - "smithy.api#documentation": "

    Compares a face in the source input image with each of the 100\n largest faces detected in the target input image.

    \n

    If the source image contains multiple faces, the service detects the largest face and\n compares it with each face detected in the target image.

    \n \n

    CompareFaces uses machine learning algorithms, which are probabilistic. A false negative\n is an incorrect prediction that a face in the target image has a low similarity confidence\n score when compared to the face in the source image. To reduce the probability of false\n negatives, we recommend that you compare the target image against multiple source images. If\n you plan to use CompareFaces to make a decision that impacts an individual's\n rights, privacy, or access to services, we recommend that you pass the result to a human for\n review and further validation before taking action.

    \n
    \n

    You pass the input and target images either as base64-encoded image bytes or as\n references to images in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes isn't\n supported. The image must be formatted as a PNG or JPEG file.

    \n

    In response, the operation returns an array of face matches ordered by similarity score\n in descending order. For each face match, the response provides a bounding box of the face,\n facial landmarks, pose details (pitch, roll, and yaw), quality (brightness and sharpness), and\n confidence value (indicating the level of confidence that the bounding box contains a face).\n The response also provides a similarity score, which indicates how closely the faces match.

    \n \n

    By default, only faces with a similarity score of greater than or equal to 80% are\n returned in the response. You can change this value by specifying the\n SimilarityThreshold parameter.

    \n
    \n

    \n CompareFaces also returns an array of faces that don't match the source\n image. For each face, it returns a bounding box, confidence value, landmarks, pose details,\n and quality. The response also returns information about the face in the source image,\n including the bounding box of the face and confidence value.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. Use QualityFilter to set the quality bar by specifying LOW,\n MEDIUM, or HIGH. If you do not want to filter detected faces,\n specify NONE. The default value is NONE.

    \n

    If the image doesn't contain Exif metadata, CompareFaces returns\n orientation information for the source and target images. Use these values to display the\n images with the correct image orientation.

    \n

    If no faces are detected in the source or target images, CompareFaces\n returns an InvalidParameterException error.

    \n \n

    This is a stateless API operation. That is, data returned by this operation doesn't\n persist.

    \n
    \n

    For an example, see Comparing Faces in Images in the Amazon Rekognition Developer\n Guide.

    \n

    This operation requires permissions to perform the\n rekognition:CompareFaces action.

    " + "smithy.api#documentation": "

    Compares a face in the source input image with each of the 100\n largest faces detected in the target input image.

    \n

    If the source image contains multiple faces, the service detects the largest face and\n compares it with each face detected in the target image.

    \n \n

    CompareFaces uses machine learning algorithms, which are probabilistic. A false negative\n is an incorrect prediction that a face in the target image has a low similarity confidence\n score when compared to the face in the source image. To reduce the probability of false\n negatives, we recommend that you compare the target image against multiple source images. If\n you plan to use CompareFaces to make a decision that impacts an individual's\n rights, privacy, or access to services, we recommend that you pass the result to a human for\n review and further validation before taking action.

    \n
    \n

    You pass the input and target images either as base64-encoded image bytes or as\n references to images in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes isn't\n supported. The image must be formatted as a PNG or JPEG file.

    \n

    In response, the operation returns an array of face matches ordered by similarity score\n in descending order. For each face match, the response provides a bounding box of the face,\n facial landmarks, pose details (pitch, roll, and yaw), quality (brightness and sharpness), and\n confidence value (indicating the level of confidence that the bounding box contains a face).\n The response also provides a similarity score, which indicates how closely the faces match.

    \n \n

    By default, only faces with a similarity score of greater than or equal to 80% are\n returned in the response. You can change this value by specifying the\n SimilarityThreshold parameter.

    \n
    \n

    \n CompareFaces also returns an array of faces that don't match the source\n image. For each face, it returns a bounding box, confidence value, landmarks, pose details,\n and quality. The response also returns information about the face in the source image,\n including the bounding box of the face and confidence value.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. Use QualityFilter to set the quality bar by specifying LOW,\n MEDIUM, or HIGH. If you do not want to filter detected faces,\n specify NONE. The default value is NONE.

    \n

    If the image doesn't contain Exif metadata, CompareFaces returns\n orientation information for the source and target images. Use these values to display the\n images with the correct image orientation.

    \n

    If no faces are detected in the source or target images, CompareFaces\n returns an InvalidParameterException error.

    \n \n

    This is a stateless API operation. That is, data returned by this operation doesn't\n persist.

    \n
    \n

    For an example, see Comparing Faces in Images in the Amazon Rekognition Developer\n Guide.

    \n

    This operation requires permissions to perform the\n rekognition:CompareFaces action.

    ", + "smithy.api#examples": [ + { + "title": "To compare two images", + "documentation": "This operation compares the largest face detected in the source image with each face detected in the target image.", + "input": { + "SourceImage": { + "S3Object": { + "Bucket": "mybucket", + "Name": "mysourceimage" + } + }, + "TargetImage": { + "S3Object": { + "Bucket": "mybucket", + "Name": "mytargetimage" + } + }, + "SimilarityThreshold": 90 + }, + "output": { + "FaceMatches": [ + { + "Face": { + "BoundingBox": { + "Width": 0.25, + "Top": 0.4933333396911621, + "Left": 0.31888890266418457, + "Height": 0.33481481671333313 + }, + "Confidence": 99.9991226196289 + }, + "Similarity": 100 + } + ], + "SourceImageFace": { + "BoundingBox": { + "Width": 0.25, + "Top": 0.4933333396911621, + "Left": 0.31888890266418457, + "Height": 0.33481481671333313 + }, + "Confidence": 99.9991226196289 + } + } + } + ] } }, "com.amazonaws.rekognition#CompareFacesMatch": { @@ -772,6 +990,27 @@ "smithy.api#documentation": "

    Type that describes the face Amazon Rekognition chose to compare with the faces in the target.\n This contains a bounding box for the selected face and confidence level that the bounding box\n contains a face. Note that Amazon Rekognition selects the largest face in the source image for this\n comparison.

    " } }, + "com.amazonaws.rekognition#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.rekognition#String" + }, + "Code": { + "target": "com.amazonaws.rekognition#String" + }, + "Logref": { + "target": "com.amazonaws.rekognition#String", + "traits": { + "smithy.api#documentation": "

    A universally unique identifier (UUID) for the request.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    \n A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. ** \n

    ", + "smithy.api#error": "client" + } + }, "com.amazonaws.rekognition#ConnectedHomeLabel": { "type": "string" }, @@ -974,7 +1213,30 @@ } ], "traits": { - "smithy.api#documentation": "

    Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and\n destination projects can be in different AWS accounts but must be in the same AWS Region.\n You can't copy a model to another AWS service.\n \n

    \n

    To copy a model version to a different AWS account, you need to create a resource-based policy known as a\n project policy. You attach the project policy to the\n source project by calling PutProjectPolicy. The project policy\n gives permission to copy the model version from a trusting AWS account to a trusted account.

    \n

    For more information creating and attaching a project policy, see Attaching a project policy (SDK)\n in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n

    If you are copying a model version to a project in the same AWS account, you don't need to create a project policy.

    \n \n

    To copy a model, the destination project, source project, and source model version must already exist.

    \n
    \n

    Copying a model version takes a while to complete. To get the current status, call DescribeProjectVersions and check the value of Status in the\n ProjectVersionDescription object. The copy operation has finished when\n the value of Status is COPYING_COMPLETED.

    \n

    This operation requires permissions to perform the rekognition:CopyProjectVersion action.

    " + "smithy.api#documentation": "

    Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and\n destination projects can be in different AWS accounts but must be in the same AWS Region.\n You can't copy a model to another AWS service.\n \n

    \n

    To copy a model version to a different AWS account, you need to create a resource-based policy known as a\n project policy. You attach the project policy to the\n source project by calling PutProjectPolicy. The project policy\n gives permission to copy the model version from a trusting AWS account to a trusted account.

    \n

    For more information creating and attaching a project policy, see Attaching a project policy (SDK)\n in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n

    If you are copying a model version to a project in the same AWS account, you don't need to create a project policy.

    \n \n

    To copy a model, the destination project, source project, and source model version must already exist.

    \n
    \n

    Copying a model version takes a while to complete. To get the current status, call DescribeProjectVersions and check the value of Status in the\n ProjectVersionDescription object. The copy operation has finished when\n the value of Status is COPYING_COMPLETED.

    \n

    This operation requires permissions to perform the rekognition:CopyProjectVersion action.

    ", + "smithy.api#examples": [ + { + "title": "CopyProjectVersion", + "documentation": "This operation copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project.", + "input": { + "SourceProjectArn": "arn:aws:rekognition:us-east-1:111122223333:project/SourceProject/16565123456", + "SourceProjectVersionArn": "arn:aws:rekognition:us-east-1:111122223333:project/SourceProject/version/model_1/1656611123456", + "DestinationProjectArn": "arn:aws:rekognition:us-east-1:555555555555:project/DestinationProject/1656705098765", + "VersionName": "DestinationVersionName_cross_account", + "OutputConfig": { + "S3Bucket": "bucket-name", + "S3KeyPrefix": "path_to_folder" + }, + "Tags": { + "key1": "val1" + }, + "KmsKeyId": "arn:1234abcd-12ab-34cd-56ef-1234567890ab" + }, + "output": { + "ProjectVersionArn": "arn:aws:rekognition:us-east-1:555555555555:project/DestinationProject/version/DestinationVersionName_cross_account/16567050987651" + } + } + ] } }, "com.amazonaws.rekognition#CopyProjectVersionRequest": { @@ -1099,7 +1361,20 @@ } ], "traits": { - "smithy.api#documentation": "

    Creates a collection in an AWS Region. You can add faces to the collection using the\n IndexFaces operation.

    \n

    For example, you might create collections, one for each of your application users. A\n user can then index faces using the IndexFaces operation and persist results in a\n specific collection. Then, a user can search the collection for faces in the user-specific\n container.

    \n

    When you create a collection, it is associated with the latest version of the face model\n version.

    \n \n

    Collection names are case-sensitive.

    \n
    \n

    This operation requires permissions to perform the\n rekognition:CreateCollection action. If you want to tag your collection, you\n also require permission to perform the rekognition:TagResource\n operation.

    " + "smithy.api#documentation": "

    Creates a collection in an AWS Region. You can add faces to the collection using the\n IndexFaces operation.

    \n

    For example, you might create collections, one for each of your application users. A\n user can then index faces using the IndexFaces operation and persist results in a\n specific collection. Then, a user can search the collection for faces in the user-specific\n container.

    \n

    When you create a collection, it is associated with the latest version of the face model\n version.

    \n \n

    Collection names are case-sensitive.

    \n
    \n

    This operation requires permissions to perform the\n rekognition:CreateCollection action. If you want to tag your collection, you\n also require permission to perform the rekognition:TagResource\n operation.

    ", + "smithy.api#examples": [ + { + "title": "To create a collection", + "documentation": "This operation creates a Rekognition collection for storing image data.", + "input": { + "CollectionId": "myphotos" + }, + "output": { + "StatusCode": 200, + "CollectionArn": "aws:rekognition:us-west-2:123456789012:collection/myphotos" + } + } + ] } }, "com.amazonaws.rekognition#CreateCollectionRequest": { @@ -1617,6 +1892,93 @@ "smithy.api#output": {} } }, + "com.amazonaws.rekognition#CreateUser": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#CreateUserRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#CreateUserResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#ConflictException" + }, + { + "target": "com.amazonaws.rekognition#IdempotentParameterMismatchException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Creates a new User within a collection specified by CollectionId. Takes\n UserId as a parameter, which is a user provided ID which should be unique\n within the collection. The provided UserId will alias the system generated\n UUID to make the UserId more user friendly.

    \n

    Uses a ClientToken, an idempotency token that ensures a call to\n CreateUser completes only once. If the value is not supplied, the AWS SDK\n generates an idempotency token for the requests. This prevents retries after a network\n error results from making multiple CreateUser calls.

    ", + "smithy.api#examples": [ + { + "title": "CreateUser", + "documentation": "Creates a new User within a collection specified by CollectionId.", + "input": { + "CollectionId": "MyCollection", + "UserId": "DemoUser" + } + } + ] + } + }, + "com.amazonaws.rekognition#CreateUserRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection to which the new UserID needs to be created.

    ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    ID for the UserID to be created. This ID needs to be unique within the collection.

    ", + "smithy.api#required": {} + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.rekognition#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Idempotent token used to identify the request to CreateUser. If you use the\n same token with multiple CreateUser requests, the same response is returned. \n Use ClientRequestToken to prevent the same request from being processed more than\n once.

    ", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#CreateUserResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.rekognition#CustomLabel": { "type": "structure", "members": { @@ -2029,7 +2391,19 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes the specified collection. Note that this operation removes all faces in the\n collection. For an example, see Deleting a\n collection.

    \n

    This operation requires permissions to perform the\n rekognition:DeleteCollection action.

    " + "smithy.api#documentation": "

    Deletes the specified collection. Note that this operation removes all faces in the\n collection. For an example, see Deleting a\n collection.

    \n

    This operation requires permissions to perform the\n rekognition:DeleteCollection action.

    ", + "smithy.api#examples": [ + { + "title": "To delete a collection", + "documentation": "This operation deletes a Rekognition collection.", + "input": { + "CollectionId": "myphotos" + }, + "output": { + "StatusCode": 200 + } + } + ] } }, "com.amazonaws.rekognition#DeleteCollectionRequest": { @@ -2150,7 +2524,20 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes faces from a collection. You specify a collection ID and an array of face IDs\n to remove from the collection.

    \n

    This operation requires permissions to perform the rekognition:DeleteFaces\n action.

    " + "smithy.api#documentation": "

    Deletes faces from a collection. You specify a collection ID and an array of face IDs\n to remove from the collection.

    \n

    This operation requires permissions to perform the rekognition:DeleteFaces\n action.

    ", + "smithy.api#examples": [ + { + "title": "To delete a face", + "documentation": "This operation deletes one or more faces from a Rekognition collection.", + "input": { + "CollectionId": "myphotos", + "FaceIds": ["ff43d742-0c13-5d16-a3e8-03d3f58e980b"] + }, + "output": { + "DeletedFaces": ["ff43d742-0c13-5d16-a3e8-03d3f58e980b"] + } + } + ] } }, "com.amazonaws.rekognition#DeleteFacesRequest": { @@ -2183,6 +2570,12 @@ "traits": { "smithy.api#documentation": "

    An array of strings (face IDs) of the faces that were deleted.

    " } + }, + "UnsuccessfulFaceDeletions": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDeletionsList", + "traits": { + "smithy.api#documentation": "

    An array of any faces that weren't deleted.

    " + } } }, "traits": { @@ -2256,7 +2649,19 @@ } ], "traits": { - "smithy.api#documentation": "

    Deletes an existing project policy.

    \n

    To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy.

    \n

    This operation requires permissions to perform the rekognition:DeleteProjectPolicy action.

    " + "smithy.api#documentation": "

    Deletes an existing project policy.

    \n

    To get a list of project policies attached to a project, call ListProjectPolicies. To attach a project policy to a project, call PutProjectPolicy.

    \n

    This operation requires permissions to perform the rekognition:DeleteProjectPolicy action.

    ", + "smithy.api#examples": [ + { + "title": "DeleteProjectPolicy", + "documentation": "This operation deletes a revision of an existing project policy from an Amazon Rekognition Custom Labels project.", + "input": { + "ProjectArn": "arn:aws:rekognition:us-east-1:111122223333:project/SourceProject/1656557123456", + "PolicyName": "testPolicy1", + "PolicyRevisionId": "3b274c25e9203a56a99e00e3ff205fbc" + }, + "output": {} + } + ] } }, "com.amazonaws.rekognition#DeleteProjectPolicyRequest": { @@ -2444,18 +2849,24 @@ "smithy.api#output": {} } }, - "com.amazonaws.rekognition#DescribeCollection": { + "com.amazonaws.rekognition#DeleteUser": { "type": "operation", "input": { - "target": "com.amazonaws.rekognition#DescribeCollectionRequest" + "target": "com.amazonaws.rekognition#DeleteUserRequest" }, "output": { - "target": "com.amazonaws.rekognition#DescribeCollectionResponse" + "target": "com.amazonaws.rekognition#DeleteUserResponse" }, "errors": [ { "target": "com.amazonaws.rekognition#AccessDeniedException" }, + { + "target": "com.amazonaws.rekognition#ConflictException" + }, + { + "target": "com.amazonaws.rekognition#IdempotentParameterMismatchException" + }, { "target": "com.amazonaws.rekognition#InternalServerError" }, @@ -2473,25 +2884,104 @@ } ], "traits": { - "smithy.api#documentation": "

    Describes the specified collection. You can use DescribeCollection to get\n information, such as the number of faces indexed into a collection and the version of the\n model used by the collection for face detection.

    \n

    For more information, see Describing a Collection in the \n Amazon Rekognition Developer Guide.

    " + "smithy.api#documentation": "

    Deletes the specified UserID within the collection. Faces that are associated with the\n UserID are disassociated from the UserID before deleting the specified UserID. If the\n specified Collection or UserID is already deleted or not found, a\n ResourceNotFoundException will be thrown. If the action is successful with a\n 200 response, an empty HTTP body is returned.

    ", + "smithy.api#examples": [ + { + "title": "DeleteUser", + "documentation": "Deletes the specified UserID within the collection.", + "input": { + "CollectionId": "MyCollection", + "UserId": "DemoUser", + "ClientRequestToken": "550e8400-e29b-41d4-a716-446655440001" + } + } + ] } }, - "com.amazonaws.rekognition#DescribeCollectionRequest": { + "com.amazonaws.rekognition#DeleteUserRequest": { "type": "structure", "members": { "CollectionId": { "target": "com.amazonaws.rekognition#CollectionId", "traits": { - "smithy.api#documentation": "

    The ID of the collection to describe.

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

    The ID of an existing collection from which the UserID needs to be deleted.

    ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    ID for the UserID to be deleted.

    ", "smithy.api#required": {} } + }, + "ClientRequestToken": { + "target": "com.amazonaws.rekognition#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Idempotent token used to identify the request to DeleteUser. If you use the\n same token with multiple DeleteUser requests, the same response is returned. \n Use ClientRequestToken to prevent the same request from being processed more than\n once.

    ", + "smithy.api#idempotencyToken": {} + } } }, "traits": { "smithy.api#input": {} } }, - "com.amazonaws.rekognition#DescribeCollectionResponse": { + "com.amazonaws.rekognition#DeleteUserResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#DescribeCollection": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#DescribeCollectionRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#DescribeCollectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Describes the specified collection. You can use DescribeCollection to get\n information, such as the number of faces indexed into a collection and the version of the\n model used by the collection for face detection.

    \n

    For more information, see Describing a Collection in the \n Amazon Rekognition Developer Guide.

    " + } + }, + "com.amazonaws.rekognition#DescribeCollectionRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of the collection to describe.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#DescribeCollectionResponse": { "type": "structure", "members": { "FaceCount": { @@ -2517,6 +3007,12 @@ "traits": { "smithy.api#documentation": "

    The number of milliseconds since the Unix epoch time until the creation of the collection.\n The Unix epoch time is 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970.

    " } + }, + "UserCount": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { + "smithy.api#documentation": "

    The number of UserIDs assigned to the specified colleciton.

    " + } } }, "traits": { @@ -3081,7 +3577,71 @@ } ], "traits": { - "smithy.api#documentation": "

    Detects faces within an image that is provided as input.

    \n

    \n DetectFaces detects the 100 largest faces in the image. For each face\n detected, the operation returns face details. These details include a bounding box of the\n face, a confidence value (that the bounding box contains a face), and a fixed set of\n attributes such as facial landmarks (for example, coordinates of eye and mouth), pose,\n presence of facial occlusion, and so on.

    \n

    The face-detection algorithm is most effective on frontal faces. For non-frontal or\n obscured faces, the algorithm might not detect the faces or might detect faces with lower\n confidence.

    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations,\n passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.

    \n \n

    This is a stateless API operation. That is, the operation does not persist any\n data.

    \n
    \n

    This operation requires permissions to perform the rekognition:DetectFaces\n action.

    " + "smithy.api#documentation": "

    Detects faces within an image that is provided as input.

    \n

    \n DetectFaces detects the 100 largest faces in the image. For each face\n detected, the operation returns face details. These details include a bounding box of the\n face, a confidence value (that the bounding box contains a face), and a fixed set of\n attributes such as facial landmarks (for example, coordinates of eye and mouth), pose,\n presence of facial occlusion, and so on.

    \n

    The face-detection algorithm is most effective on frontal faces. For non-frontal or\n obscured faces, the algorithm might not detect the faces or might detect faces with lower\n confidence.

    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations,\n passing image bytes is not supported. The image must be either a PNG or JPEG formatted file.

    \n \n

    This is a stateless API operation. That is, the operation does not persist any\n data.

    \n
    \n

    This operation requires permissions to perform the rekognition:DetectFaces\n action.

    ", + "smithy.api#examples": [ + { + "title": "To detect faces in an image", + "documentation": "This operation detects faces in an image stored in an AWS S3 bucket.", + "input": { + "Image": { + "S3Object": { + "Bucket": "mybucket", + "Name": "myphoto" + } + } + }, + "output": { + "FaceDetails": [ + { + "BoundingBox": { + "Width": 0.23999999463558197, + "Top": 0.33666667342185974, + "Left": 0.5555555820465088, + "Height": 0.18000000715255737 + }, + "Landmarks": [ + { + "Y": 0.40819624066352844, + "X": 0.6394737362861633, + "Type": "eyeLeft" + }, + { + "Y": 0.41039225459098816, + "X": 0.7266660928726196, + "Type": "eyeRight" + }, + { + "Y": 0.44240960478782654, + "X": 0.6912462115287781, + "Type": "eyeRight" + }, + { + "Y": 0.46700039505958557, + "X": 0.6306198239326477, + "Type": "mouthDown" + }, + { + "Y": 0.47114261984825134, + "X": 0.7215608954429626, + "Type": "mouthUp" + } + ], + "Pose": { + "Yaw": 13.693790435791016, + "Roll": 0.9950747489929199, + "Pitch": 4.050806522369385 + }, + "Quality": { + "Sharpness": 80, + "Brightness": 37.60169982910156 + }, + "Confidence": 100 + } + ], + "OrientationCorrection": "ROTATE_0" + } + } + ] } }, "com.amazonaws.rekognition#DetectFacesRequest": { @@ -3160,7 +3720,35 @@ } ], "traits": { - "smithy.api#documentation": "

    Detects instances of real-world entities within an image (JPEG or PNG) provided as\n input. This includes objects like flower, tree, and table; events like wedding, graduation,\n and birthday party; and concepts like landscape, evening, and nature.

    \n

    For an example, see Analyzing images stored in an Amazon S3 bucket in the\n Amazon Rekognition Developer Guide.

    \n

    You pass the input image as base64-encoded image bytes or as a reference to an image in\n an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n

    \n Optional Parameters\n

    \n

    You can specify one or both of the GENERAL_LABELS and\n IMAGE_PROPERTIES feature types when calling the DetectLabels API. Including\n GENERAL_LABELS will ensure the response includes the labels detected in the\n input image, while including IMAGE_PROPERTIES will ensure the response includes\n information about the image quality and color.

    \n

    When using GENERAL_LABELS and/or IMAGE_PROPERTIES you can\n provide filtering criteria to the Settings parameter. You can filter with sets of individual\n labels or with label categories. You can specify inclusive filters, exclusive filters, or a\n combination of inclusive and exclusive filters. For more information on filtering see Detecting\n Labels in an Image.

    \n

    You can specify MinConfidence to control the confidence threshold for the\n labels returned. The default is 55%. You can also add the MaxLabels parameter to\n limit the number of labels returned. The default and upper limit is 1000 labels.

    \n

    \n Response Elements\n

    \n

    For each object, scene, and concept the API returns one or more labels. The API\n returns the following types of information about labels:

    \n
      \n
    • \n

      Name - The name of the detected label.

      \n
    • \n
    • \n

      Confidence - The level of confidence in the label assigned to a detected object.\n

      \n
    • \n
    • \n

      Parents - The ancestor labels for a detected label. DetectLabels returns a\n hierarchical taxonomy of detected labels. For example, a detected car might be assigned\n the label car. The label car has two parent labels: Vehicle (its parent) and\n Transportation (its grandparent). The response includes the all ancestors for a label,\n where every ancestor is a unique label. In the previous example, Car, Vehicle, and\n Transportation are returned as unique labels in the response.

      \n
    • \n
    • \n

      Aliases - Possible Aliases for the label.

      \n
    • \n
    • \n

      Categories - The label categories that the detected label belongs to.

      \n
    • \n
    • \n

      BoundingBox — Bounding boxes are described for all instances of detected common\n object labels, returned in an array of Instance objects. An Instance object contains a\n BoundingBox object, describing the location of the label on the input image. It also\n includes the confidence for the accuracy of the detected bounding box.

      \n
    • \n
    \n

    The API returns the following information regarding the image, as part of the\n ImageProperties structure:

    \n
      \n
    • \n

      Quality - Information about the Sharpness, Brightness, and Contrast of the input\n image, scored between 0 to 100. Image quality is returned for the entire image, as well as\n the background and the foreground.

      \n
    • \n
    • \n

      Dominant Color - An array of the dominant colors in the image.

      \n
    • \n
    • \n

      Foreground - Information about the sharpness, brightness, and dominant colors of the input image’s foreground.

      \n
    • \n
    • \n

      Background - Information about the sharpness, brightness, and dominant colors of the input image’s background.

      \n
    • \n
    \n

    The list of returned labels will include at least one label for every detected object,\n along with information about that label. In the following example, suppose the input image has\n a lighthouse, the sea, and a rock. The response includes all three labels, one for each\n object, as well as the confidence in the label:

    \n

    \n {Name: lighthouse, Confidence: 98.4629}\n

    \n

    \n {Name: rock,Confidence: 79.2097}\n

    \n

    \n {Name: sea,Confidence: 75.061}\n

    \n

    The list of labels can include multiple labels for the same object. For example, if the\n input image shows a flower (for example, a tulip), the operation might return the following\n three labels.

    \n

    \n {Name: flower,Confidence: 99.0562}\n

    \n

    \n {Name: plant,Confidence: 99.0562}\n

    \n

    \n {Name: tulip,Confidence: 99.0562}\n

    \n

    In this example, the detection algorithm more precisely identifies the flower as a\n tulip.

    \n \n

    If the object detected is a person, the operation doesn't provide the same facial\n details that the DetectFaces operation provides.

    \n
    \n

    This is a stateless API operation that doesn't return any data.

    \n

    This operation requires permissions to perform the\n rekognition:DetectLabels action.

    " + "smithy.api#documentation": "

    Detects instances of real-world entities within an image (JPEG or PNG) provided as\n input. This includes objects like flower, tree, and table; events like wedding, graduation,\n and birthday party; and concepts like landscape, evening, and nature.

    \n

    For an example, see Analyzing images stored in an Amazon S3 bucket in the\n Amazon Rekognition Developer Guide.

    \n

    You pass the input image as base64-encoded image bytes or as a reference to an image in\n an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n

    \n Optional Parameters\n

    \n

    You can specify one or both of the GENERAL_LABELS and\n IMAGE_PROPERTIES feature types when calling the DetectLabels API. Including\n GENERAL_LABELS will ensure the response includes the labels detected in the\n input image, while including IMAGE_PROPERTIES will ensure the response includes\n information about the image quality and color.

    \n

    When using GENERAL_LABELS and/or IMAGE_PROPERTIES you can\n provide filtering criteria to the Settings parameter. You can filter with sets of individual\n labels or with label categories. You can specify inclusive filters, exclusive filters, or a\n combination of inclusive and exclusive filters. For more information on filtering see Detecting\n Labels in an Image.

    \n

    You can specify MinConfidence to control the confidence threshold for the\n labels returned. The default is 55%. You can also add the MaxLabels parameter to\n limit the number of labels returned. The default and upper limit is 1000 labels.

    \n

    \n Response Elements\n

    \n

    For each object, scene, and concept the API returns one or more labels. The API\n returns the following types of information about labels:

    \n
      \n
    • \n

      Name - The name of the detected label.

      \n
    • \n
    • \n

      Confidence - The level of confidence in the label assigned to a detected object.\n

      \n
    • \n
    • \n

      Parents - The ancestor labels for a detected label. DetectLabels returns a\n hierarchical taxonomy of detected labels. For example, a detected car might be assigned\n the label car. The label car has two parent labels: Vehicle (its parent) and\n Transportation (its grandparent). The response includes the all ancestors for a label,\n where every ancestor is a unique label. In the previous example, Car, Vehicle, and\n Transportation are returned as unique labels in the response.

      \n
    • \n
    • \n

      Aliases - Possible Aliases for the label.

      \n
    • \n
    • \n

      Categories - The label categories that the detected label belongs to.

      \n
    • \n
    • \n

      BoundingBox — Bounding boxes are described for all instances of detected common\n object labels, returned in an array of Instance objects. An Instance object contains a\n BoundingBox object, describing the location of the label on the input image. It also\n includes the confidence for the accuracy of the detected bounding box.

      \n
    • \n
    \n

    The API returns the following information regarding the image, as part of the\n ImageProperties structure:

    \n
      \n
    • \n

      Quality - Information about the Sharpness, Brightness, and Contrast of the input\n image, scored between 0 to 100. Image quality is returned for the entire image, as well as\n the background and the foreground.

      \n
    • \n
    • \n

      Dominant Color - An array of the dominant colors in the image.

      \n
    • \n
    • \n

      Foreground - Information about the sharpness, brightness, and dominant colors of the input image’s foreground.

      \n
    • \n
    • \n

      Background - Information about the sharpness, brightness, and dominant colors of the input image’s background.

      \n
    • \n
    \n

    The list of returned labels will include at least one label for every detected object,\n along with information about that label. In the following example, suppose the input image has\n a lighthouse, the sea, and a rock. The response includes all three labels, one for each\n object, as well as the confidence in the label:

    \n

    \n {Name: lighthouse, Confidence: 98.4629}\n

    \n

    \n {Name: rock,Confidence: 79.2097}\n

    \n

    \n {Name: sea,Confidence: 75.061}\n

    \n

    The list of labels can include multiple labels for the same object. For example, if the\n input image shows a flower (for example, a tulip), the operation might return the following\n three labels.

    \n

    \n {Name: flower,Confidence: 99.0562}\n

    \n

    \n {Name: plant,Confidence: 99.0562}\n

    \n

    \n {Name: tulip,Confidence: 99.0562}\n

    \n

    In this example, the detection algorithm more precisely identifies the flower as a\n tulip.

    \n \n

    If the object detected is a person, the operation doesn't provide the same facial\n details that the DetectFaces operation provides.

    \n
    \n

    This is a stateless API operation that doesn't return any data.

    \n

    This operation requires permissions to perform the\n rekognition:DetectLabels action.

    ", + "smithy.api#examples": [ + { + "title": "To detect labels", + "documentation": "This operation detects labels in the supplied image", + "input": { + "Image": { + "S3Object": { + "Bucket": "mybucket", + "Name": "myphoto" + } + }, + "MaxLabels": 123, + "MinConfidence": 70 + }, + "output": { + "Labels": [ + { + "Confidence": 99.25072479248047, + "Name": "People" + }, + { + "Confidence": 99.25074005126953, + "Name": "Person" + } + ] + } + } + ] } }, "com.amazonaws.rekognition#DetectLabelsFeatureList": { @@ -3707,6 +4295,159 @@ "smithy.api#documentation": "

    A set of parameters that allow you to filter out certain results from your returned results.

    " } }, + "com.amazonaws.rekognition#DisassociateFaces": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#DisassociateFacesRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#DisassociateFacesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#ConflictException" + }, + { + "target": "com.amazonaws.rekognition#IdempotentParameterMismatchException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Removes the association between a Face supplied in an array of\n FaceIds and the User. If the User is not present already, then a\n ResourceNotFound exception is thrown. If successful, an array of faces that are\n disassociated from the User is returned. If a given face is already disassociated from the\n given UserID, it will be ignored and not be returned in the response. If a given face is\n already associated with a different User or not found in the collection it will be returned as\n part of UnsuccessfulDisassociations. You can remove 1 - 100 face IDs from a user\n at one time.

    ", + "smithy.api#examples": [ + { + "title": "DisassociateFaces", + "documentation": "Removes the association between a Face supplied in an array of FaceIds and the User.", + "input": { + "CollectionId": "MyCollection", + "UserId": "DemoUser", + "FaceIds": ["f5817d37-94f6-4335-bfee-6cf79a3d806e", "c92265d4-5f9c-43af-a58e-12be0ce02bc3"], + "ClientRequestToken": "550e8400-e29b-41d4-a716-446655440003" + }, + "output": { + "UserStatus": "UPDATING", + "DisassociatedFaces": [ + { + "FaceId": "c92265d4-5f9c-43af-a58e-12be0ce02bc3" + } + ], + "UnsuccessfulFaceDisassociations": [ + { + "Reasons": ["ASSOCIATED_TO_A_DIFFERENT_USER"], + "FaceId": "f5817d37-94f6-4335-bfee-6cf79a3d806e", + "UserId": "demoUser1" + } + ] + } + } + ] + } + }, + "com.amazonaws.rekognition#DisassociateFacesRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection containing the UserID.

    ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    ID for the existing UserID.

    ", + "smithy.api#required": {} + } + }, + "ClientRequestToken": { + "target": "com.amazonaws.rekognition#ClientRequestToken", + "traits": { + "smithy.api#documentation": "

    Idempotent token used to identify the request to DisassociateFaces. If you\n use the same token with multiple DisassociateFaces requests, the same response is\n returned. Use ClientRequestToken to prevent the same request from being processed more than\n once.

    ", + "smithy.api#idempotencyToken": {} + } + }, + "FaceIds": { + "target": "com.amazonaws.rekognition#UserFaceIdList", + "traits": { + "smithy.api#documentation": "

    An array of face IDs to disassociate from the UserID.

    ", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#DisassociateFacesResponse": { + "type": "structure", + "members": { + "DisassociatedFaces": { + "target": "com.amazonaws.rekognition#DisassociatedFacesList", + "traits": { + "smithy.api#documentation": "

    An array of DissociatedFace objects containing FaceIds that are successfully disassociated\n with the UserID is returned. Returned if the DisassociatedFaces action is successful.

    " + } + }, + "UnsuccessfulFaceDisassociations": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationList", + "traits": { + "smithy.api#documentation": "

    An array of UnsuccessfulDisassociation objects containing FaceIds that are not\n successfully associated, along with the reasons for the failure to associate. Returned if the\n DisassociateFaces action is successful.

    " + } + }, + "UserStatus": { + "target": "com.amazonaws.rekognition#UserStatus", + "traits": { + "smithy.api#documentation": "

    The status of an update made to a User. Reflects if the User has been updated for every requested change.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#DisassociatedFace": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    Unique identifier assigned to the face.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Provides face metadata for the faces that are disassociated from a specific UserID.

    " + } + }, + "com.amazonaws.rekognition#DisassociatedFacesList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#DisassociatedFace" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.rekognition#DistributeDataset": { "type": "structure", "members": { @@ -4115,6 +4856,12 @@ "traits": { "smithy.api#documentation": "

    The version of the face detect and storage model that was used when indexing the face\n vector.

    " } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    Unique identifier assigned to the user.

    " + } } }, "traits": { @@ -6087,7 +6834,145 @@ } ], "traits": { - "smithy.api#documentation": "

    Detects faces in the input image and adds them to the specified collection.

    \n

    Amazon Rekognition doesn't save the actual faces that are detected. Instead, the underlying\n detection algorithm first detects the faces in the input image. For each face, the algorithm\n extracts facial features into a feature vector, and stores it in the backend database.\n Amazon Rekognition uses feature vectors when it performs face match and search operations using the\n SearchFaces and SearchFacesByImage operations.

    \n

    For more information, see Adding faces to a collection in the Amazon Rekognition\n Developer Guide.

    \n

    To get the number of faces in a collection, call DescribeCollection.

    \n

    If you're using version 1.0 of the face detection model, IndexFaces\n indexes the 15 largest faces in the input image. Later versions of the face detection model\n index the 100 largest faces in the input image.

    \n

    If you're using version 4 or later of the face model, image orientation information is not\n returned in the OrientationCorrection field.

    \n

    To determine which version of the model you're using, call DescribeCollection and supply the collection ID. You can also get the model\n version from the value of FaceModelVersion in the response from\n IndexFaces\n

    \n

    For more information, see Model Versioning in the Amazon Rekognition Developer\n Guide.

    \n

    If you provide the optional ExternalImageId for the input image you\n provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the ListFaces operation, the response returns the external ID. You can use this\n external image ID to create a client-side index to associate the faces with each image. You\n can then use the index to find all faces in an image.

    \n

    You can specify the maximum number of faces to index with the MaxFaces input\n parameter. This is useful when you want to index the largest faces in an image and don't want\n to index smaller faces, such as those belonging to people standing in the background.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. By default, IndexFaces chooses the quality bar that's used to filter\n faces. You can also explicitly choose the quality bar. Use QualityFilter, to set\n the quality bar by specifying LOW, MEDIUM, or HIGH. If\n you do not want to filter detected faces, specify NONE.

    \n \n

    To use quality filtering, you need a collection associated with version 3 of the face\n model or higher. To get the version of the face model associated with a collection, call\n DescribeCollection.

    \n
    \n

    Information about faces detected in an image, but not indexed, is returned in an array of\n UnindexedFace objects, UnindexedFaces. Faces aren't indexed\n for reasons such as:

    \n
      \n
    • \n

      The number of faces detected exceeds the value of the MaxFaces request\n parameter.

      \n
    • \n
    • \n

      The face is too small compared to the image dimensions.

      \n
    • \n
    • \n

      The face is too blurry.

      \n
    • \n
    • \n

      The image is too dark.

      \n
    • \n
    • \n

      The face has an extreme pose.

      \n
    • \n
    • \n

      The face doesn’t have enough detail to be suitable for face search.

      \n
    • \n
    \n

    In response, the IndexFaces operation returns an array of metadata for all\n detected faces, FaceRecords. This includes:

    \n
      \n
    • \n

      The bounding box, BoundingBox, of the detected face.

      \n
    • \n
    • \n

      A confidence value, Confidence, which indicates the confidence that the\n bounding box contains a face.

      \n
    • \n
    • \n

      A face ID, FaceId, assigned by the service for each face that's detected\n and stored.

      \n
    • \n
    • \n

      An image ID, ImageId, assigned by the service for the input image.

      \n
    • \n
    \n

    If you request ALL or specific facial attributes (e.g.,\n FACE_OCCLUDED) by using the detectionAttributes parameter, Amazon Rekognition\n returns detailed facial attributes, such as facial landmarks (for example, location of eye and\n mouth), facial occlusion, and other facial attributes.

    \n

    If you provide the same image, specify the same collection, and use the same external ID\n in the IndexFaces operation, Amazon Rekognition doesn't save duplicate face\n metadata.

    \n

    \n

    The input image is passed either as base64-encoded image bytes, or as a reference to an\n image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations,\n passing image bytes isn't supported. The image must be formatted as a PNG or JPEG file.

    \n

    This operation requires permissions to perform the rekognition:IndexFaces\n action.

    " + "smithy.api#documentation": "

    Detects faces in the input image and adds them to the specified collection.

    \n

    Amazon Rekognition doesn't save the actual faces that are detected. Instead, the underlying\n detection algorithm first detects the faces in the input image. For each face, the algorithm\n extracts facial features into a feature vector, and stores it in the backend database.\n Amazon Rekognition uses feature vectors when it performs face match and search operations using the\n SearchFaces and SearchFacesByImage operations.

    \n

    For more information, see Adding faces to a collection in the Amazon Rekognition\n Developer Guide.

    \n

    To get the number of faces in a collection, call DescribeCollection.

    \n

    If you're using version 1.0 of the face detection model, IndexFaces\n indexes the 15 largest faces in the input image. Later versions of the face detection model\n index the 100 largest faces in the input image.

    \n

    If you're using version 4 or later of the face model, image orientation information is not\n returned in the OrientationCorrection field.

    \n

    To determine which version of the model you're using, call DescribeCollection and supply the collection ID. You can also get the model\n version from the value of FaceModelVersion in the response from\n IndexFaces\n

    \n

    For more information, see Model Versioning in the Amazon Rekognition Developer\n Guide.

    \n

    If you provide the optional ExternalImageId for the input image you\n provided, Amazon Rekognition associates this ID with all faces that it detects. When you call the ListFaces operation, the response returns the external ID. You can use this\n external image ID to create a client-side index to associate the faces with each image. You\n can then use the index to find all faces in an image.

    \n

    You can specify the maximum number of faces to index with the MaxFaces input\n parameter. This is useful when you want to index the largest faces in an image and don't want\n to index smaller faces, such as those belonging to people standing in the background.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. By default, IndexFaces chooses the quality bar that's used to filter\n faces. You can also explicitly choose the quality bar. Use QualityFilter, to set\n the quality bar by specifying LOW, MEDIUM, or HIGH. If\n you do not want to filter detected faces, specify NONE.

    \n \n

    To use quality filtering, you need a collection associated with version 3 of the face\n model or higher. To get the version of the face model associated with a collection, call\n DescribeCollection.

    \n
    \n

    Information about faces detected in an image, but not indexed, is returned in an array of\n UnindexedFace objects, UnindexedFaces. Faces aren't indexed\n for reasons such as:

    \n
      \n
    • \n

      The number of faces detected exceeds the value of the MaxFaces request\n parameter.

      \n
    • \n
    • \n

      The face is too small compared to the image dimensions.

      \n
    • \n
    • \n

      The face is too blurry.

      \n
    • \n
    • \n

      The image is too dark.

      \n
    • \n
    • \n

      The face has an extreme pose.

      \n
    • \n
    • \n

      The face doesn’t have enough detail to be suitable for face search.

      \n
    • \n
    \n

    In response, the IndexFaces operation returns an array of metadata for all\n detected faces, FaceRecords. This includes:

    \n
      \n
    • \n

      The bounding box, BoundingBox, of the detected face.

      \n
    • \n
    • \n

      A confidence value, Confidence, which indicates the confidence that the\n bounding box contains a face.

      \n
    • \n
    • \n

      A face ID, FaceId, assigned by the service for each face that's detected\n and stored.

      \n
    • \n
    • \n

      An image ID, ImageId, assigned by the service for the input image.

      \n
    • \n
    \n

    If you request ALL or specific facial attributes (e.g.,\n FACE_OCCLUDED) by using the detectionAttributes parameter, Amazon Rekognition\n returns detailed facial attributes, such as facial landmarks (for example, location of eye and\n mouth), facial occlusion, and other facial attributes.

    \n

    If you provide the same image, specify the same collection, and use the same external ID\n in the IndexFaces operation, Amazon Rekognition doesn't save duplicate face\n metadata.

    \n

    \n

    The input image is passed either as base64-encoded image bytes, or as a reference to an\n image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations,\n passing image bytes isn't supported. The image must be formatted as a PNG or JPEG file.

    \n

    This operation requires permissions to perform the rekognition:IndexFaces\n action.

    ", + "smithy.api#examples": [ + { + "title": "To add a face to a collection", + "documentation": "This operation detects faces in an image and adds them to the specified Rekognition collection.", + "input": { + "CollectionId": "myphotos", + "Image": { + "S3Object": { + "Bucket": "mybucket", + "Name": "myphoto" + } + }, + "ExternalImageId": "myphotoid", + "DetectionAttributes": [] + }, + "output": { + "FaceRecords": [ + { + "FaceDetail": { + "BoundingBox": { + "Width": 0.25, + "Top": 0.4933333396911621, + "Left": 0.31888890266418457, + "Height": 0.33481481671333313 + }, + "Landmarks": [ + { + "Y": 0.6248345971107483, + "X": 0.3976764678955078, + "Type": "eyeLeft" + }, + { + "Y": 0.6317117214202881, + "X": 0.4810936450958252, + "Type": "eyeRight" + }, + { + "Y": 0.7111940383911133, + "X": 0.41986238956451416, + "Type": "noseLeft" + }, + { + "Y": 0.7497701048851013, + "X": 0.40525302290916443, + "Type": "mouthDown" + }, + { + "Y": 0.7558549642562866, + "X": 0.4753248989582062, + "Type": "mouthUp" + } + ], + "Pose": { + "Yaw": -24.438663482666016, + "Roll": 4.707281112670898, + "Pitch": -9.713645935058594 + }, + "Quality": { + "Sharpness": 80, + "Brightness": 29.23358917236328 + }, + "Confidence": 99.9991226196289 + }, + "Face": { + "BoundingBox": { + "Width": 0.25, + "Top": 0.4933333396911621, + "Left": 0.31888890266418457, + "Height": 0.33481481671333313 + }, + "FaceId": "ff43d742-0c13-5d16-a3e8-03d3f58e980b", + "Confidence": 99.9991226196289, + "ImageId": "465f4e93-763e-51d0-b030-b9667a2d94b1" + } + }, + { + "FaceDetail": { + "BoundingBox": { + "Width": 0.24444444477558136, + "Top": 0.15111111104488373, + "Left": 0.5144444704055786, + "Height": 0.32592591643333435 + }, + "Landmarks": [ + { + "Y": 0.290842205286026, + "X": 0.6006892323493958, + "Type": "eyeLeft" + }, + { + "Y": 0.29609042406082153, + "X": 0.6808141469955444, + "Type": "eyeRight" + }, + { + "Y": 0.3522595763206482, + "X": 0.6395332217216492, + "Type": "noseLeft" + }, + { + "Y": 0.38689887523651123, + "X": 0.5892083048820496, + "Type": "mouthDown" + }, + { + "Y": 0.394125759601593, + "X": 0.674560010433197, + "Type": "mouthUp" + } + ], + "Pose": { + "Yaw": 6.716655254364014, + "Roll": 2.1029529571533203, + "Pitch": -4.683138370513916 + }, + "Quality": { + "Sharpness": 160, + "Brightness": 34.951698303222656 + }, + "Confidence": 99.99950408935547 + }, + "Face": { + "BoundingBox": { + "Width": 0.24444444477558136, + "Top": 0.15111111104488373, + "Left": 0.5144444704055786, + "Height": 0.32592591643333435 + }, + "FaceId": "8be04dba-4e58-520d-850e-9eae4af70eb2", + "Confidence": 99.99950408935547, + "ImageId": "465f4e93-763e-51d0-b030-b9667a2d94b1" + } + } + ], + "OrientationCorrection": "ROTATE_0" + } + } + ] } }, "com.amazonaws.rekognition#IndexFacesModelVersion": { @@ -6963,6 +7848,15 @@ ], "traits": { "smithy.api#documentation": "

    Returns list of collection IDs in your account. If the result is truncated, the\n response also provides a NextToken that you can use in the subsequent request to\n fetch the next set of collection IDs.

    \n

    For an example, see Listing collections in the Amazon Rekognition Developer\n Guide.

    \n

    This operation requires permissions to perform the\n rekognition:ListCollections action.

    ", + "smithy.api#examples": [ + { + "title": "To list the collections", + "documentation": "This operation returns a list of Rekognition collections.", + "output": { + "CollectionIds": ["myphotos"] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -7280,6 +8174,58 @@ ], "traits": { "smithy.api#documentation": "

    Returns metadata for faces in the specified collection. This metadata\n includes information such as the bounding box coordinates, the confidence (that the bounding\n box contains a face), and face ID. For an example, see Listing Faces in a Collection in the\n Amazon Rekognition Developer Guide.

    \n

    This operation requires permissions to perform the rekognition:ListFaces\n action.

    ", + "smithy.api#examples": [ + { + "title": "To list the faces in a collection", + "documentation": "This operation lists the faces in a Rekognition collection.", + "input": { + "CollectionId": "myphotos", + "MaxResults": 20 + }, + "output": { + "FaceModelVersion": "6.0", + "Faces": [ + { + "Confidence": 99.76940155029297, + "IndexFacesModelVersion": "6.0", + "UserId": "demoUser2", + "ImageId": "56a0ca74-1c83-39dd-b363-051a64168a65", + "BoundingBox": { + "Width": 0.03177810087800026, + "Top": 0.36568498611450195, + "Left": 0.3453829884529114, + "Height": 0.056759100407361984 + }, + "FaceId": "c92265d4-5f9c-43af-a58e-12be0ce02bc3" + }, + { + "BoundingBox": { + "Width": 0.03254450112581253, + "Top": 0.6080359816551208, + "Left": 0.5160620212554932, + "Height": 0.06347999721765518 + }, + "IndexFacesModelVersion": "6.0", + "FaceId": "851cb847-dccc-4fea-9309-9f4805967855", + "Confidence": 99.94369506835938, + "ImageId": "a8aed589-ceec-35f7-9c04-82e0b546b024" + }, + { + "BoundingBox": { + "Width": 0.03094629943370819, + "Top": 0.4218429923057556, + "Left": 0.6513839960098267, + "Height": 0.05266290158033371 + }, + "IndexFacesModelVersion": "6.0", + "FaceId": "c0eb3b65-24a0-41e1-b23a-1908b1aaeac1", + "Confidence": 99.82969665527344, + "ImageId": "56a0ca74-1c83-39dd-b363-051a64168a65" + } + ] + } + } + ], "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", @@ -7309,6 +8255,18 @@ "traits": { "smithy.api#documentation": "

    Maximum number of faces to return.

    " } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    An array of user IDs to match when listing faces in a collection.

    " + } + }, + "FaceIds": { + "target": "com.amazonaws.rekognition#FaceIdList", + "traits": { + "smithy.api#documentation": "

    An array of face IDs to match when listing faces in a collection.

    " + } } }, "traits": { @@ -7576,18 +8534,128 @@ "smithy.api#output": {} } }, - "com.amazonaws.rekognition#LivenessImageBlob": { - "type": "blob", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 204800 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.rekognition#LivenessOutputConfig": { - "type": "structure", + "com.amazonaws.rekognition#ListUsers": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#ListUsersRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#ListUsersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidPaginationTokenException" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Returns metadata of the User such as UserID in the specified collection.\n Anonymous User (to reserve faces without any identity) is not returned as part of this\n request. The results are sorted by system generated primary key ID. If the response is\n truncated, NextToken is returned in the response that can be used in the\n subsequent request to retrieve the next set of identities.

    ", + "smithy.api#examples": [ + { + "title": "ListUsers", + "documentation": "Returns metadata of the User such as UserID in the specified collection.", + "input": { + "CollectionId": "MyCollection" + }, + "output": { + "NextToken": "MGYZLAHX1T5a....", + "Users": [ + { + "UserId": "demoUser4", + "UserStatus": "CREATED" + }, + { + "UserId": "demoUser2", + "UserStatus": "CREATED" + } + ] + } + } + ], + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "Users", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.rekognition#ListUsersRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection.

    ", + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.rekognition#MaxUserResults", + "traits": { + "smithy.api#documentation": "

    Maximum number of UsersID to return.

    " + } + }, + "NextToken": { + "target": "com.amazonaws.rekognition#PaginationToken", + "traits": { + "smithy.api#documentation": "

    Pagingation token to receive the next set of UsersID.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#ListUsersResponse": { + "type": "structure", + "members": { + "Users": { + "target": "com.amazonaws.rekognition#UserList", + "traits": { + "smithy.api#documentation": "

    List of UsersID associated with the specified collection.

    " + } + }, + "NextToken": { + "target": "com.amazonaws.rekognition#PaginationToken", + "traits": { + "smithy.api#documentation": "

    A pagination token to be used with the subsequent request if the response is truncated.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#LivenessImageBlob": { + "type": "blob", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 204800 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.rekognition#LivenessOutputConfig": { + "type": "structure", "members": { "S3Bucket": { "target": "com.amazonaws.rekognition#S3Bucket", @@ -7683,6 +8751,26 @@ "smithy.api#error": "client" } }, + "com.amazonaws.rekognition#MatchedUser": { + "type": "structure", + "members": { + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the UserID. Unique within the collection.

    " + } + }, + "UserStatus": { + "target": "com.amazonaws.rekognition#UserStatus", + "traits": { + "smithy.api#documentation": "

    The status of the user matched to a provided FaceID.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains metadata for a UserID matched with a given face.

    " + } + }, "com.amazonaws.rekognition#MaxDurationInSecondsULong": { "type": "long", "traits": { @@ -7726,6 +8814,15 @@ } } }, + "com.amazonaws.rekognition#MaxUserResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 500 + } + } + }, "com.amazonaws.rekognition#MinCoveragePercentage": { "type": "float", "traits": { @@ -8683,7 +9780,22 @@ } ], "traits": { - "smithy.api#documentation": "

    Attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account. A\n project policy specifies that a trusted AWS account can copy a model version from a\n trusting AWS account to a project in the trusted AWS account. To copy a model version you use\n the CopyProjectVersion operation.

    \n

    For more information about the format of a project policy document, see Attaching a project policy (SDK)\n in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n

    The response from PutProjectPolicy is a revision ID for the project policy.\n You can attach multiple project policies to a project. You can also update an existing\n project policy by specifying the policy revision ID of the existing policy.

    \n

    To remove a project policy from a project, call DeleteProjectPolicy.\n To get a list of project policies attached to a project, call ListProjectPolicies.

    \n

    You copy a model version by calling CopyProjectVersion.

    \n

    This operation requires permissions to perform the rekognition:PutProjectPolicy action.

    " + "smithy.api#documentation": "

    Attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account. A\n project policy specifies that a trusted AWS account can copy a model version from a\n trusting AWS account to a project in the trusted AWS account. To copy a model version you use\n the CopyProjectVersion operation.

    \n

    For more information about the format of a project policy document, see Attaching a project policy (SDK)\n in the Amazon Rekognition Custom Labels Developer Guide.\n

    \n

    The response from PutProjectPolicy is a revision ID for the project policy.\n You can attach multiple project policies to a project. You can also update an existing\n project policy by specifying the policy revision ID of the existing policy.

    \n

    To remove a project policy from a project, call DeleteProjectPolicy.\n To get a list of project policies attached to a project, call ListProjectPolicies.

    \n

    You copy a model version by calling CopyProjectVersion.

    \n

    This operation requires permissions to perform the rekognition:PutProjectPolicy action.

    ", + "smithy.api#examples": [ + { + "title": "PutProjectPolicy", + "documentation": "This operation attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account.", + "input": { + "ProjectArn": "arn:aws:rekognition:us-east-1:111122223333:project/my-sdk-project/1656557051929", + "PolicyName": "SamplePolicy", + "PolicyRevisionId": "0123456789abcdef", + "PolicyDocument": "'{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"ALLOW\",\"Principal\":{\"AWS\":\"principal\"},\"Action\":\"rekognition:CopyProjectVersion\",\"Resource\":\"arn:aws:rekognition:us-east-1:123456789012:project/my-sdk-project/version/DestinationVersionName/1627045542080\"}]}'" + }, + "output": { + "PolicyRevisionId": "0123456789abcdef" + } + } + ] } }, "com.amazonaws.rekognition#PutProjectPolicyRequest": { @@ -8948,6 +10060,9 @@ "type": "service", "version": "2016-06-27", "operations": [ + { + "target": "com.amazonaws.rekognition#AssociateFaces" + }, { "target": "com.amazonaws.rekognition#CompareFaces" }, @@ -8972,6 +10087,9 @@ { "target": "com.amazonaws.rekognition#CreateStreamProcessor" }, + { + "target": "com.amazonaws.rekognition#CreateUser" + }, { "target": "com.amazonaws.rekognition#DeleteCollection" }, @@ -8993,6 +10111,9 @@ { "target": "com.amazonaws.rekognition#DeleteStreamProcessor" }, + { + "target": "com.amazonaws.rekognition#DeleteUser" + }, { "target": "com.amazonaws.rekognition#DescribeCollection" }, @@ -9026,6 +10147,9 @@ { "target": "com.amazonaws.rekognition#DetectText" }, + { + "target": "com.amazonaws.rekognition#DisassociateFaces" + }, { "target": "com.amazonaws.rekognition#DistributeDatasetEntries" }, @@ -9083,6 +10207,9 @@ { "target": "com.amazonaws.rekognition#ListTagsForResource" }, + { + "target": "com.amazonaws.rekognition#ListUsers" + }, { "target": "com.amazonaws.rekognition#PutProjectPolicy" }, @@ -9095,6 +10222,12 @@ { "target": "com.amazonaws.rekognition#SearchFacesByImage" }, + { + "target": "com.amazonaws.rekognition#SearchUsers" + }, + { + "target": "com.amazonaws.rekognition#SearchUsersByImage" + }, { "target": "com.amazonaws.rekognition#StartCelebrityRecognition" }, @@ -9156,7 +10289,7 @@ "name": "rekognition" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

    This is the API Reference for Amazon Rekognition Image, Amazon Rekognition Custom Labels,\n Amazon Rekognition Stored\n Video, Amazon Rekognition Streaming Video. It provides descriptions of actions, data types, common\n parameters, and common errors.

    \n

    \n Amazon Rekognition Image\n

    \n \n

    \n Amazon Rekognition Custom Labels\n

    \n \n

    \n Amazon Rekognition Video Stored Video\n

    \n \n

    \n Amazon Rekognition Video Streaming Video\n

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

    This is the API Reference for Amazon Rekognition Image, Amazon Rekognition Custom Labels,\n Amazon Rekognition Stored\n Video, Amazon Rekognition Streaming Video. It provides descriptions of actions, data types, common\n parameters, and common errors.

    \n

    \n Amazon Rekognition Image\n

    \n \n

    \n Amazon Rekognition Custom Labels\n

    \n \n

    \n Amazon Rekognition Video Stored Video\n

    \n \n

    \n Amazon Rekognition Video Streaming Video\n

    \n ", "smithy.api#title": "Amazon Rekognition", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -10281,7 +11414,66 @@ } ], "traits": { - "smithy.api#documentation": "

    For a given input face ID, searches for matching faces in the collection the face\n belongs to. You get a face ID when you add a face to the collection using the IndexFaces operation. The operation compares the features of the input face with\n faces in the specified collection.

    \n \n

    You can also search faces without indexing faces by using the\n SearchFacesByImage operation.

    \n
    \n

    The operation response returns an array of faces that match, ordered by similarity\n score with the highest similarity first. More specifically, it is an array of metadata for\n each face match that is found. Along with the metadata, the response also includes a\n confidence value for each face match, indicating the confidence that the\n specific face matches the input face.

    \n

    For an example, see Searching for a face using its face ID in the Amazon Rekognition\n Developer Guide.

    \n

    This operation requires permissions to perform the rekognition:SearchFaces\n action.

    " + "smithy.api#documentation": "

    For a given input face ID, searches for matching faces in the collection the face\n belongs to. You get a face ID when you add a face to the collection using the IndexFaces operation. The operation compares the features of the input face with\n faces in the specified collection.

    \n \n

    You can also search faces without indexing faces by using the\n SearchFacesByImage operation.

    \n
    \n

    The operation response returns an array of faces that match, ordered by similarity\n score with the highest similarity first. More specifically, it is an array of metadata for\n each face match that is found. Along with the metadata, the response also includes a\n confidence value for each face match, indicating the confidence that the\n specific face matches the input face.

    \n

    For an example, see Searching for a face using its face ID in the Amazon Rekognition\n Developer Guide.

    \n

    This operation requires permissions to perform the rekognition:SearchFaces\n action.

    ", + "smithy.api#examples": [ + { + "title": "To delete a face", + "documentation": "This operation searches for matching faces in the collection the supplied face belongs to.", + "input": { + "CollectionId": "myphotos", + "FaceId": "70008e50-75e4-55d0-8e80-363fb73b3a14", + "MaxFaces": 10, + "FaceMatchThreshold": 90 + }, + "output": { + "SearchedFaceId": "70008e50-75e4-55d0-8e80-363fb73b3a14", + "FaceMatches": [ + { + "Face": { + "BoundingBox": { + "Width": 0.24444399774074554, + "Top": 0.15111100673675537, + "Left": 0.5144439935684204, + "Height": 0.3259260058403015 + }, + "FaceId": "8be04dba-4e58-520d-850e-9eae4af70eb2", + "Confidence": 99.99949645996094, + "ImageId": "465f4e93-763e-51d0-b030-b9667a2d94b1" + }, + "Similarity": 99.97222137451172 + }, + { + "Face": { + "BoundingBox": { + "Width": 0.22074100375175476, + "Top": 0.7066670060157776, + "Left": 0.30963000655174255, + "Height": 0.16555599868297577 + }, + "FaceId": "29a75abe-397b-5101-ba4f-706783b2246c", + "Confidence": 100, + "ImageId": "147fdf82-7a71-52cf-819b-e786c7b9746e" + }, + "Similarity": 97.04154968261719 + }, + { + "Face": { + "BoundingBox": { + "Width": 0.25222599506378174, + "Top": 0.2355560064315796, + "Left": 0.3783380091190338, + "Height": 0.18888899683952332 + }, + "FaceId": "908544ad-edc3-59df-8faf-6a87cc256cf5", + "Confidence": 99.9999008178711, + "ImageId": "3c731605-d772-541a-a5e7-0375dbc68a07" + }, + "Similarity": 95.94520568847656 + } + ] + } + } + ] } }, "com.amazonaws.rekognition#SearchFacesByImage": { @@ -10322,7 +11514,49 @@ } ], "traits": { - "smithy.api#documentation": "

    For a given input image, first detects the largest face in the image, and then searches\n the specified collection for matching faces. The operation compares the features of the input\n face with faces in the specified collection.

    \n \n

    To search for all faces in an input image, you might first call the IndexFaces operation, and then use the face IDs returned in subsequent calls\n to the SearchFaces operation.

    \n

    You can also call the DetectFaces operation and use the bounding boxes\n in the response to make face crops, which then you can pass in to the\n SearchFacesByImage operation.

    \n
    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n

    The response returns an array of faces that match, ordered by similarity score with\n the highest similarity first. More specifically, it is an array of metadata for each face\n match found. Along with the metadata, the response also includes a similarity\n indicating how similar the face is to the input face. In the response, the operation also\n returns the bounding box (and a confidence level that the bounding box contains a face) of the\n face that Amazon Rekognition used for the input image.

    \n

    If no faces are detected in the input image, SearchFacesByImage returns an\n InvalidParameterException error.

    \n

    For an example, Searching for a Face Using an Image in the Amazon Rekognition\n Developer Guide.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. Use QualityFilter to set the quality bar for filtering by specifying\n LOW, MEDIUM, or HIGH. If you do not want to filter\n detected faces, specify NONE. The default value is NONE.

    \n \n

    To use quality filtering, you need a collection associated with version 3 of the face\n model or higher. To get the version of the face model associated with a collection, call\n DescribeCollection.

    \n
    \n

    This operation requires permissions to perform the\n rekognition:SearchFacesByImage action.

    " + "smithy.api#documentation": "

    For a given input image, first detects the largest face in the image, and then searches\n the specified collection for matching faces. The operation compares the features of the input\n face with faces in the specified collection.

    \n \n

    To search for all faces in an input image, you might first call the IndexFaces operation, and then use the face IDs returned in subsequent calls\n to the SearchFaces operation.

    \n

    You can also call the DetectFaces operation and use the bounding boxes\n in the response to make face crops, which then you can pass in to the\n SearchFacesByImage operation.

    \n
    \n

    You pass the input image either as base64-encoded image bytes or as a reference to an\n image in an Amazon S3 bucket. If you use the\n AWS\n CLI to call Amazon Rekognition operations, passing image bytes is not\n supported. The image must be either a PNG or JPEG formatted file.

    \n

    The response returns an array of faces that match, ordered by similarity score with\n the highest similarity first. More specifically, it is an array of metadata for each face\n match found. Along with the metadata, the response also includes a similarity\n indicating how similar the face is to the input face. In the response, the operation also\n returns the bounding box (and a confidence level that the bounding box contains a face) of the\n face that Amazon Rekognition used for the input image.

    \n

    If no faces are detected in the input image, SearchFacesByImage returns an\n InvalidParameterException error.

    \n

    For an example, Searching for a Face Using an Image in the Amazon Rekognition\n Developer Guide.

    \n

    The QualityFilter input parameter allows you to filter out detected faces\n that don’t meet a required quality bar. The quality bar is based on a variety of common use\n cases. Use QualityFilter to set the quality bar for filtering by specifying\n LOW, MEDIUM, or HIGH. If you do not want to filter\n detected faces, specify NONE. The default value is NONE.

    \n \n

    To use quality filtering, you need a collection associated with version 3 of the face\n model or higher. To get the version of the face model associated with a collection, call\n DescribeCollection.

    \n
    \n

    This operation requires permissions to perform the\n rekognition:SearchFacesByImage action.

    ", + "smithy.api#examples": [ + { + "title": "To search for faces matching a supplied image", + "documentation": "This operation searches for faces in a Rekognition collection that match the largest face in an S3 bucket stored image.", + "input": { + "CollectionId": "myphotos", + "Image": { + "S3Object": { + "Bucket": "mybucket", + "Name": "myphoto" + } + }, + "MaxFaces": 5, + "FaceMatchThreshold": 95 + }, + "output": { + "SearchedFaceBoundingBox": { + "Width": 0.25, + "Top": 0.4933333396911621, + "Left": 0.31888890266418457, + "Height": 0.33481481671333313 + }, + "SearchedFaceConfidence": 99.9991226196289, + "FaceMatches": [ + { + "Face": { + "BoundingBox": { + "Width": 0.24222199618816376, + "Top": 0.5, + "Left": 0.3233329951763153, + "Height": 0.3234420120716095 + }, + "FaceId": "38271d79-7bc2-5efb-b752-398a8d575b85", + "Confidence": 99.99829864501953, + "ImageId": "d5631190-d039-54e4-b267-abd22c8647c5" + }, + "Similarity": 99.97036743164062 + } + ] + } + } + ] } }, "com.amazonaws.rekognition#SearchFacesByImageRequest": { @@ -10457,77 +11691,422 @@ "smithy.api#output": {} } }, - "com.amazonaws.rekognition#SegmentConfidence": { - "type": "float", - "traits": { - "smithy.api#range": { - "min": 50, - "max": 100 - } - } - }, - "com.amazonaws.rekognition#SegmentDetection": { - "type": "structure", - "members": { - "Type": { - "target": "com.amazonaws.rekognition#SegmentType", - "traits": { - "smithy.api#documentation": "

    The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

    " - } + "com.amazonaws.rekognition#SearchUsers": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#SearchUsersRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#SearchUsersResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" }, - "StartTimestampMillis": { - "target": "com.amazonaws.rekognition#Timestamp", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

    The start time of the detected segment in milliseconds from the start of the video. This value\n is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of\n 100 millis.

    " - } + { + "target": "com.amazonaws.rekognition#InternalServerError" }, - "EndTimestampMillis": { - "target": "com.amazonaws.rekognition#Timestamp", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

    The end time of the detected segment, in milliseconds, from the start of the video.\n This value is rounded down.

    " - } + { + "target": "com.amazonaws.rekognition#InvalidParameterException" }, - "DurationMillis": { - "target": "com.amazonaws.rekognition#ULong", - "traits": { - "smithy.api#documentation": "

    The duration of the detected segment in milliseconds.

    " - } + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" }, - "StartTimecodeSMPTE": { - "target": "com.amazonaws.rekognition#Timecode", - "traits": { - "smithy.api#documentation": "

    The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment.\n StartTimecode is in HH:MM:SS:fr format\n (and ;fr for drop frame-rates).

    " - } + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" }, - "EndTimecodeSMPTE": { - "target": "com.amazonaws.rekognition#Timecode", - "traits": { - "smithy.api#documentation": "

    The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. \n EndTimecode is in HH:MM:SS:fr format\n (and ;fr for drop frame-rates).

    " + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Searches for UserIDs within a collection based on a FaceId or\n UserId. This API can be used to find the closest UserID (with a highest\n similarity) to associate a face. The request must be provided with either FaceId\n or UserId. The operation returns an array of UserID that match the\n FaceId or UserId, ordered by similarity score with the highest\n similarity first.

    ", + "smithy.api#examples": [ + { + "title": "SearchUsers", + "documentation": "Searches for UserIDs within a collection based on a FaceId or UserId.", + "input": { + "CollectionId": "MyCollection", + "UserId": "DemoUser", + "MaxUsers": 2, + "UserMatchThreshold": 70 + }, + "output": { + "SearchedUser": { + "UserId": "DemoUser" + }, + "UserMatches": [ + { + "User": { + "UserId": "demoUser1", + "UserStatus": "ACTIVE" + }, + "Similarity": 99.88186645507812 + } + ], + "FaceModelVersion": "6" + } } + ] + } + }, + "com.amazonaws.rekognition#SearchUsersByImage": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#SearchUsersByImageRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#SearchUsersByImageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" }, - "DurationSMPTE": { - "target": "com.amazonaws.rekognition#Timecode", - "traits": { - "smithy.api#documentation": "

    The duration of the timecode for the detected segment in SMPTE format.

    " - } + { + "target": "com.amazonaws.rekognition#ImageTooLargeException" }, - "TechnicalCueSegment": { - "target": "com.amazonaws.rekognition#TechnicalCueSegment", - "traits": { - "smithy.api#documentation": "

    If the segment is a technical cue, contains information about the technical cue.

    " - } + { + "target": "com.amazonaws.rekognition#InternalServerError" }, - "ShotSegment": { - "target": "com.amazonaws.rekognition#ShotSegment", - "traits": { - "smithy.api#documentation": "

    If the segment is a shot detection, contains information about the shot detection.

    " - } + { + "target": "com.amazonaws.rekognition#InvalidImageFormatException" }, - "StartFrameNumber": { - "target": "com.amazonaws.rekognition#ULong", - "traits": { + { + "target": "com.amazonaws.rekognition#InvalidParameterException" + }, + { + "target": "com.amazonaws.rekognition#InvalidS3ObjectException" + }, + { + "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" + }, + { + "target": "com.amazonaws.rekognition#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rekognition#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

    Searches for UserIDs using a supplied image. It first detects the largest face in the\n image, and then searches a specified collection for matching UserIDs.

    \n

    The operation returns an array of UserIDs that match the face in the supplied image,\n ordered by similarity score with the highest similarity first. It also returns a bounding box\n for the face found in the input image.

    \n

    Information about faces detected in the supplied image, but not used for the search, is\n returned in an array of UnsearchedFace objects. If no valid face is detected\n in the image, the response will contain an empty UserMatches list and no\n SearchedFace object.

    ", + "smithy.api#examples": [ + { + "title": "SearchUsersByImage", + "documentation": "Searches for UserIDs using a supplied image.", + "input": { + "CollectionId": "MyCollection", + "Image": { + "S3Object": { + "Bucket": "bucket", + "Name": "input.jpg" + } + }, + "MaxUsers": 2, + "UserMatchThreshold": 70, + "QualityFilter": "MEDIUM" + }, + "output": { + "SearchedFace": { + "FaceDetail": { + "BoundingBox": { + "Width": 0.03692837432026863, + "Top": 0.5391526818275452, + "Left": 0.3598678708076477, + "Height": 0.07510016113519669 + } + } + }, + "UserMatches": [ + { + "User": { + "UserId": "demoUser1", + "UserStatus": "ACTIVE" + }, + "Similarity": 99.88186645507812 + } + ], + "FaceModelVersion": "6", + "UnsearchedFaces": [ + { + "FaceDetails": { + "BoundingBox": { + "Width": 0.031677018851041794, + "Top": 0.5593535900115967, + "Left": 0.6102562546730042, + "Height": 0.0682177022099495 + } + }, + "Reasons": ["FACE_NOT_LARGEST"] + }, + { + "FaceDetails": { + "BoundingBox": { + "Width": 0.03254449740052223, + "Top": 0.6080358028411865, + "Left": 0.516062319278717, + "Height": 0.06347997486591339 + } + }, + "Reasons": ["FACE_NOT_LARGEST"] + } + ] + } + } + ] + } + }, + "com.amazonaws.rekognition#SearchUsersByImageRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection containing the UserID.

    ", + "smithy.api#required": {} + } + }, + "Image": { + "target": "com.amazonaws.rekognition#Image", + "traits": { + "smithy.api#required": {} + } + }, + "UserMatchThreshold": { + "target": "com.amazonaws.rekognition#Percent", + "traits": { + "smithy.api#documentation": "

    Specifies the minimum confidence in the UserID match to return. Default value is\n 80.

    " + } + }, + "MaxUsers": { + "target": "com.amazonaws.rekognition#MaxUserResults", + "traits": { + "smithy.api#documentation": "

    Maximum number of UserIDs to return.

    " + } + }, + "QualityFilter": { + "target": "com.amazonaws.rekognition#QualityFilter", + "traits": { + "smithy.api#documentation": "

    A filter that specifies a quality bar for how much filtering is done to identify faces.\n Filtered faces aren't searched for in the collection. The default value is NONE.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#SearchUsersByImageResponse": { + "type": "structure", + "members": { + "UserMatches": { + "target": "com.amazonaws.rekognition#UserMatchList", + "traits": { + "smithy.api#documentation": "

    An array of UserID objects that matched the input face, along with the confidence in the\n match. The returned structure will be empty if there are no matches. Returned if the\n SearchUsersByImageResponse action is successful.

    " + } + }, + "FaceModelVersion": { + "target": "com.amazonaws.rekognition#String", + "traits": { + "smithy.api#documentation": "

    Version number of the face detection model associated with the input collection\n CollectionId.

    " + } + }, + "SearchedFace": { + "target": "com.amazonaws.rekognition#SearchedFaceDetails", + "traits": { + "smithy.api#documentation": "

    A list of FaceDetail objects containing the BoundingBox for the largest face in image,\n as well as the confidence in the bounding box, that was searched for matches. If no valid\n face is detected in the image the response will contain no SearchedFace object.

    " + } + }, + "UnsearchedFaces": { + "target": "com.amazonaws.rekognition#UnsearchedFacesList", + "traits": { + "smithy.api#documentation": "

    List of UnsearchedFace objects. Contains the face details infered from the specified\n image but not used for search. Contains reasons that describe why a face wasn't used for\n Search.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#SearchUsersRequest": { + "type": "structure", + "members": { + "CollectionId": { + "target": "com.amazonaws.rekognition#CollectionId", + "traits": { + "smithy.api#documentation": "

    The ID of an existing collection containing the UserID, used with a UserId or FaceId. If a\n FaceId is provided, UserId isn’t required to be present in the Collection.

    ", + "smithy.api#required": {} + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    ID for the existing User.

    " + } + }, + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    ID for the existing face.

    " + } + }, + "UserMatchThreshold": { + "target": "com.amazonaws.rekognition#Percent", + "traits": { + "smithy.api#documentation": "

    Optional value that specifies the minimum confidence in the matched UserID to return.\n Default value of 80.

    " + } + }, + "MaxUsers": { + "target": "com.amazonaws.rekognition#MaxUserResults", + "traits": { + "smithy.api#documentation": "

    Maximum number of identities to return.

    " + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.rekognition#SearchUsersResponse": { + "type": "structure", + "members": { + "UserMatches": { + "target": "com.amazonaws.rekognition#UserMatchList", + "traits": { + "smithy.api#documentation": "

    An array of UserMatch objects that matched the input face along with the confidence in\n the match. Array will be empty if there are no matches.

    " + } + }, + "FaceModelVersion": { + "target": "com.amazonaws.rekognition#String", + "traits": { + "smithy.api#documentation": "

    Version number of the face detection model associated with the input\n CollectionId.

    " + } + }, + "SearchedFace": { + "target": "com.amazonaws.rekognition#SearchedFace", + "traits": { + "smithy.api#documentation": "

    Contains the ID of a face that was used to search for matches in a collection.

    " + } + }, + "SearchedUser": { + "target": "com.amazonaws.rekognition#SearchedUser", + "traits": { + "smithy.api#documentation": "

    Contains the ID of the UserID that was used to search for matches in a collection.

    " + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.rekognition#SearchedFace": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    Unique identifier assigned to the face.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Provides face metadata such as FaceId, BoundingBox, Confidence of the input face used for search.

    " + } + }, + "com.amazonaws.rekognition#SearchedFaceDetails": { + "type": "structure", + "members": { + "FaceDetail": { + "target": "com.amazonaws.rekognition#FaceDetail" + } + }, + "traits": { + "smithy.api#documentation": "

    Contains data regarding the input face used for a search.

    " + } + }, + "com.amazonaws.rekognition#SearchedUser": { + "type": "structure", + "members": { + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the UserID. Unique within the collection.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains metadata about a User searched for within a collection.

    " + } + }, + "com.amazonaws.rekognition#SegmentConfidence": { + "type": "float", + "traits": { + "smithy.api#range": { + "min": 50, + "max": 100 + } + } + }, + "com.amazonaws.rekognition#SegmentDetection": { + "type": "structure", + "members": { + "Type": { + "target": "com.amazonaws.rekognition#SegmentType", + "traits": { + "smithy.api#documentation": "

    The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

    " + } + }, + "StartTimestampMillis": { + "target": "com.amazonaws.rekognition#Timestamp", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

    The start time of the detected segment in milliseconds from the start of the video. This value\n is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of\n 100 millis.

    " + } + }, + "EndTimestampMillis": { + "target": "com.amazonaws.rekognition#Timestamp", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

    The end time of the detected segment, in milliseconds, from the start of the video.\n This value is rounded down.

    " + } + }, + "DurationMillis": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { + "smithy.api#documentation": "

    The duration of the detected segment in milliseconds.

    " + } + }, + "StartTimecodeSMPTE": { + "target": "com.amazonaws.rekognition#Timecode", + "traits": { + "smithy.api#documentation": "

    The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment.\n StartTimecode is in HH:MM:SS:fr format\n (and ;fr for drop frame-rates).

    " + } + }, + "EndTimecodeSMPTE": { + "target": "com.amazonaws.rekognition#Timecode", + "traits": { + "smithy.api#documentation": "

    The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. \n EndTimecode is in HH:MM:SS:fr format\n (and ;fr for drop frame-rates).

    " + } + }, + "DurationSMPTE": { + "target": "com.amazonaws.rekognition#Timecode", + "traits": { + "smithy.api#documentation": "

    The duration of the timecode for the detected segment in SMPTE format.

    " + } + }, + "TechnicalCueSegment": { + "target": "com.amazonaws.rekognition#TechnicalCueSegment", + "traits": { + "smithy.api#documentation": "

    If the segment is a technical cue, contains information about the technical cue.

    " + } + }, + "ShotSegment": { + "target": "com.amazonaws.rekognition#ShotSegment", + "traits": { + "smithy.api#documentation": "

    If the segment is a shot detection, contains information about the shot detection.

    " + } + }, + "StartFrameNumber": { + "target": "com.amazonaws.rekognition#ULong", + "traits": { "smithy.api#documentation": "

    \n The frame number of the start of a video segment, using a frame index that starts with 0.\n

    " } }, @@ -12526,23 +14105,300 @@ "target": "com.amazonaws.rekognition#UnindexedFace" } }, - "com.amazonaws.rekognition#UntagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.rekognition#UntagResourceRequest" - }, - "output": { - "target": "com.amazonaws.rekognition#UntagResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.rekognition#AccessDeniedException" - }, - { - "target": "com.amazonaws.rekognition#InternalServerError" + "com.amazonaws.rekognition#UnsearchedFace": { + "type": "structure", + "members": { + "FaceDetails": { + "target": "com.amazonaws.rekognition#FaceDetail" }, - { - "target": "com.amazonaws.rekognition#InvalidParameterException" + "Reasons": { + "target": "com.amazonaws.rekognition#UnsearchedFaceReasons", + "traits": { + "smithy.api#documentation": "

    Reasons why a face wasn't used for Search.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Face details inferred from the image but not used for search. The response attribute\n contains reasons for why a face wasn't used for Search.

    " + } + }, + "com.amazonaws.rekognition#UnsearchedFaceReason": { + "type": "enum", + "members": { + "FACE_NOT_LARGEST": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FACE_NOT_LARGEST" + } + }, + "EXCEEDS_MAX_FACES": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXCEEDS_MAX_FACES" + } + }, + "EXTREME_POSE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EXTREME_POSE" + } + }, + "LOW_BRIGHTNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW_BRIGHTNESS" + } + }, + "LOW_SHARPNESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW_SHARPNESS" + } + }, + "LOW_CONFIDENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW_CONFIDENCE" + } + }, + "SMALL_BOUNDING_BOX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SMALL_BOUNDING_BOX" + } + }, + "LOW_FACE_QUALITY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW_FACE_QUALITY" + } + } + } + }, + "com.amazonaws.rekognition#UnsearchedFaceReasons": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsearchedFaceReason" + } + }, + "com.amazonaws.rekognition#UnsearchedFacesList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsearchedFace" + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceAssociation": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    A unique identifier assigned to the face.

    " + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the UserID. Unique within the collection.

    " + } + }, + "Confidence": { + "target": "com.amazonaws.rekognition#Percent", + "traits": { + "smithy.api#documentation": "

    Match confidence with the UserID, provides information regarding if a face association was\n unsuccessful because it didn't meet UserMatchThreshold.

    " + } + }, + "Reasons": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceAssociationReasons", + "traits": { + "smithy.api#documentation": "

    The reason why the association was unsuccessful.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully associated.

    " + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceAssociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceAssociation" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceAssociationReason": { + "type": "enum", + "members": { + "FACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FACE_NOT_FOUND" + } + }, + "ASSOCIATED_TO_A_DIFFERENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATED_TO_A_DIFFERENT_USER" + } + }, + "LOW_MATCH_CONFIDENCE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LOW_MATCH_CONFIDENCE" + } + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceAssociationReasons": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceAssociationReason" + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDeletion": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    A unique identifier assigned to the face.

    " + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the UserID. Unique within the collection.

    " + } + }, + "Reasons": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDeletionReasons", + "traits": { + "smithy.api#documentation": "

    The reason why the deletion was unsuccessful.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully deleted.

    " + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDeletionReason": { + "type": "enum", + "members": { + "ASSOCIATED_TO_AN_EXISTING_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATED_TO_AN_EXISTING_USER" + } + }, + "FACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FACE_NOT_FOUND" + } + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDeletionReasons": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDeletionReason" + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDeletionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDeletion" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 4096 + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDisassociation": { + "type": "structure", + "members": { + "FaceId": { + "target": "com.amazonaws.rekognition#FaceId", + "traits": { + "smithy.api#documentation": "

    A unique identifier assigned to the face.

    " + } + }, + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the UserID. Unique within the collection.

    " + } + }, + "Reasons": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationReasons", + "traits": { + "smithy.api#documentation": "

    The reason why the deletion was unsuccessful.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Contains metadata like FaceId, UserID, and Reasons, for a face that was unsuccessfully disassociated.

    " + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDisassociation" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationReason": { + "type": "enum", + "members": { + "FACE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FACE_NOT_FOUND" + } + }, + "ASSOCIATED_TO_A_DIFFERENT_USER": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ASSOCIATED_TO_A_DIFFERENT_USER" + } + } + } + }, + "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationReasons": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UnsuccessfulFaceDisassociationReason" + } + }, + "com.amazonaws.rekognition#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.rekognition#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.rekognition#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rekognition#AccessDeniedException" + }, + { + "target": "com.amazonaws.rekognition#InternalServerError" + }, + { + "target": "com.amazonaws.rekognition#InvalidParameterException" }, { "target": "com.amazonaws.rekognition#ProvisionedThroughputExceededException" @@ -12750,6 +14606,121 @@ } } }, + "com.amazonaws.rekognition#User": { + "type": "structure", + "members": { + "UserId": { + "target": "com.amazonaws.rekognition#UserId", + "traits": { + "smithy.api#documentation": "

    A provided ID for the User. Unique within the collection.

    " + } + }, + "UserStatus": { + "target": "com.amazonaws.rekognition#UserStatus", + "traits": { + "smithy.api#documentation": "

    Communicates if the UserID has been updated with latest set of faces to be associated\n with the UserID.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Metadata of the user stored in a collection.

    " + } + }, + "com.amazonaws.rekognition#UserFaceIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#FaceId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } + } + }, + "com.amazonaws.rekognition#UserId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9_.\\-:]+$" + } + }, + "com.amazonaws.rekognition#UserList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#User" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.rekognition#UserMatch": { + "type": "structure", + "members": { + "Similarity": { + "target": "com.amazonaws.rekognition#Percent", + "traits": { + "smithy.api#documentation": "

    Describes the UserID metadata.

    " + } + }, + "User": { + "target": "com.amazonaws.rekognition#MatchedUser", + "traits": { + "smithy.api#documentation": "

    Confidence in the match of this UserID with the input face.

    " + } + } + }, + "traits": { + "smithy.api#documentation": "

    Provides UserID metadata along with the confidence in the match of this UserID with the\n input face.

    " + } + }, + "com.amazonaws.rekognition#UserMatchList": { + "type": "list", + "member": { + "target": "com.amazonaws.rekognition#UserMatch" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 500 + } + } + }, + "com.amazonaws.rekognition#UserStatus": { + "type": "enum", + "members": { + "ACTIVE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ACTIVE" + } + }, + "UPDATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "UPDATING" + } + }, + "CREATING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATING" + } + }, + "CREATED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CREATED" + } + } + } + }, "com.amazonaws.rekognition#ValidationData": { "type": "structure", "members": {