Skip to content

Commit

Permalink
feat(client-rekognition): Amazon Rekognition introduces support for C…
Browse files Browse the repository at this point in the history
…ustom Moderation. This allows the enhancement of accuracy for detect moderation labels operations by creating custom adapters tuned on customer data.
  • Loading branch information
awstools committed Oct 12, 2023
1 parent 4ce1e29 commit 87763f3
Show file tree
Hide file tree
Showing 35 changed files with 911 additions and 400 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export interface CopyProjectVersionCommandOutput extends CopyProjectVersionRespo

/**
* @public
* <p>Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and
* <note>
* <p>This operation applies only to Amazon Rekognition Custom Labels.</p>
* </note>
* <p>Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and
* destination projects can be in different AWS accounts but must be in the same AWS Region.
* You can't copy a model to another AWS service.
*
Expand All @@ -51,7 +54,9 @@ export interface CopyProjectVersionCommandOutput extends CopyProjectVersionRespo
* </p>
* <p>If you are copying a model version to a project in the same AWS account, you don't need to create a project policy.</p>
* <note>
* <p>To copy a model, the destination project, source project, and source model version must already exist.</p>
* <p>Copying project versions is supported only for Custom Labels models. </p>
* <p>To copy a model, the destination project, source project, and source model version
* must already exist.</p>
* </note>
* <p>Copying a model version takes a while to complete. To get the current status, call <a>DescribeProjectVersions</a> and check the value of <code>Status</code> in the
* <a>ProjectVersionDescription</a> object. The copy operation has finished when
Expand Down Expand Up @@ -102,9 +107,11 @@ export interface CopyProjectVersionCommandOutput extends CopyProjectVersionRespo
* operation again.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
13 changes: 9 additions & 4 deletions clients/client-rekognition/src/commands/CreateDatasetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met

/**
* @public
* <p>Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using
* <note>
* <p>This operation applies only to Amazon Rekognition Custom Labels.</p>
* </note>
* <p>Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using
* an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset.</p>
* <p>To create a training dataset for a project, specify <code>TRAIN</code> for the value of
* <code>DatasetType</code>. To create the test dataset for a project,
Expand Down Expand Up @@ -104,9 +107,11 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met
* <p>Amazon Rekognition is unable to access the S3 object specified in the request.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
19 changes: 13 additions & 6 deletions clients/client-rekognition/src/commands/CreateProjectCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ export interface CreateProjectCommandOutput extends CreateProjectResponse, __Met

/**
* @public
* <p>Creates a new Amazon Rekognition Custom Labels project. A project is a group of resources (datasets, model versions)
* that you use to create and manage Amazon Rekognition Custom Labels models. </p>
* <p>This operation requires permissions to perform the <code>rekognition:CreateProject</code> action.</p>
* <p>Creates a new Amazon Rekognition project. A project is a group of resources (datasets, model
* versions) that you use to create and manage a Amazon Rekognition Custom Labels Model or custom adapter. You can
* specify a feature to create the project with, if no feature is specified then Custom Labels
* is used by default. For adapters, you can also choose whether or not to have the project
* auto update by using the AutoUpdate argument. This operation requires permissions to
* perform the <code>rekognition:CreateProject</code> action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -48,6 +51,8 @@ export interface CreateProjectCommandOutput extends CreateProjectResponse, __Met
* const client = new RekognitionClient(config);
* const input = { // CreateProjectRequest
* ProjectName: "STRING_VALUE", // required
* Feature: "CONTENT_MODERATION" || "CUSTOM_LABELS",
* AutoUpdate: "ENABLED" || "DISABLED",
* };
* const command = new CreateProjectCommand(input);
* const response = await client.send(command);
Expand All @@ -74,9 +79,11 @@ export interface CreateProjectCommandOutput extends CreateProjectResponse, __Met
* operation again.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,24 @@ export interface CreateProjectVersionCommandOutput extends CreateProjectVersionR

/**
* @public
* <p>Creates a new version of a model and begins training.
* Models are managed as part of an Amazon Rekognition Custom Labels project.
* The response from <code>CreateProjectVersion</code>
* is an Amazon Resource Name (ARN) for the version of the model. </p>
* <p>Training uses the training and test datasets associated with the project.
* For more information, see Creating training and test dataset in the <i>Amazon Rekognition Custom Labels Developer Guide</i>.
* </p>
* <p>Creates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter)
* and begins training. Models and adapters are managed as part of a Rekognition project. The
* response from <code>CreateProjectVersion</code> is an Amazon Resource Name (ARN) for the
* project version. </p>
* <p>The FeatureConfig operation argument allows you to configure specific model or adapter
* settings. You can provide a description to the project version by using the
* VersionDescription argment. Training can take a while to complete. You can get the current
* status by calling <a>DescribeProjectVersions</a>. Training completed
* successfully if the value of the <code>Status</code> field is
* <code>TRAINING_COMPLETED</code>. Once training has successfully completed, call <a>DescribeProjectVersions</a> to get the training results and evaluate the
* model.</p>
* <p>This operation requires permissions to perform the
* <code>rekognition:CreateProjectVersion</code> action.</p>
* <note>
* <p>
* <i>The following applies only to projects with Amazon Rekognition Custom Labels as the chosen
* feature:</i>
* </p>
* <p>You can train a model in a project that doesn't have associated datasets by specifying manifest files in the
* <code>TrainingData</code> and <code>TestingData</code> fields.
* </p>
Expand All @@ -55,18 +65,7 @@ export interface CreateProjectVersionCommandOutput extends CreateProjectVersionR
* we recommend that you use the manifest
* files to create training and test datasets for the project.</p>
* </note>
* <p>Training takes a while to complete. You can get the current status by calling
* <a>DescribeProjectVersions</a>. Training completed successfully if
* the value of the <code>Status</code> field is <code>TRAINING_COMPLETED</code>.</p>
* <p>If training
* fails, see Debugging a failed model training in the <i>Amazon Rekognition Custom Labels</i> developer guide. </p>
* <p>Once training has successfully completed, call <a>DescribeProjectVersions</a> to
* get the training results and evaluate the model. For more information, see Improving a trained Amazon Rekognition Custom Labels model
* in the <i>Amazon Rekognition Custom Labels</i> developers guide.
* </p>
* <p>After evaluating the model, you start the model
* by calling <a>StartProjectVersion</a>.</p>
* <p>This operation requires permissions to perform the <code>rekognition:CreateProjectVersion</code> action.</p>
* <p></p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -111,6 +110,12 @@ export interface CreateProjectVersionCommandOutput extends CreateProjectVersionR
* "<keys>": "STRING_VALUE",
* },
* KmsKeyId: "STRING_VALUE",
* VersionDescription: "STRING_VALUE",
* FeatureConfig: { // CustomizationFeatureConfig
* ContentModeration: { // CustomizationFeatureContentModerationConfig
* ConfidenceThreshold: Number("float"),
* },
* },
* };
* const command = new CreateProjectVersionCommand(input);
* const response = await client.send(command);
Expand All @@ -137,9 +142,11 @@ export interface CreateProjectVersionCommandOutput extends CreateProjectVersionR
* operation again.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@ export interface CreateStreamProcessorCommandOutput extends CreateStreamProcesso
* operation again.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
13 changes: 9 additions & 4 deletions clients/client-rekognition/src/commands/DeleteDatasetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export interface DeleteDatasetCommandOutput extends DeleteDatasetResponse, __Met

/**
* @public
* <p>Deletes an existing Amazon Rekognition Custom Labels dataset.
* <note>
* <p>This operation applies only to Amazon Rekognition Custom Labels.</p>
* </note>
* <p>Deletes an existing Amazon Rekognition Custom Labels dataset.
* Deleting a dataset might take while. Use <a>DescribeDataset</a> to check the
* current status. The dataset is still deleting if the value of <code>Status</code> is
* <code>DELETE_IN_PROGRESS</code>. If you try to access the dataset after it is deleted, you get
Expand Down Expand Up @@ -79,9 +82,11 @@ export interface DeleteDatasetCommandOutput extends DeleteDatasetResponse, __Met
* operation again.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many Amazon Rekognition Video jobs concurrently, calls to start operations
* (<code>StartLabelDetection</code>, for example) will raise a <code>LimitExceededException</code> exception (HTTP status code: 400) until
* the number of concurrently running jobs is below the Amazon Rekognition service limit. </p>
* <p>An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs
* concurrently, subsequent calls to start operations (ex:
* <code>StartLabelDetection</code>) will raise a <code>LimitExceededException</code>
* exception (HTTP status code: 400) until the number of concurrently running jobs is below
* the Amazon Rekognition service limit. </p>
*
* @throws {@link ProvisionedThroughputExceededException} (client fault)
* <p>The number of requests exceeded your throughput limit. If you want to increase this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface DeleteProjectCommandOutput extends DeleteProjectResponse, __Met

/**
* @public
* <p>Deletes an Amazon Rekognition Custom Labels project. To delete a project you must first delete all models associated
* with the project. To delete a model, see <a>DeleteProjectVersion</a>.</p>
* <p>Deletes a Amazon Rekognition project. To delete a project you must first delete all models or
* adapters associated with the project. To delete a model or adapter, see <a>DeleteProjectVersion</a>.</p>
* <p>
* <code>DeleteProject</code> is an asynchronous operation. To check if the project is
* deleted, call <a>DescribeProjects</a>. The project is deleted when the project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export interface DeleteProjectPolicyCommandOutput extends DeleteProjectPolicyRes

/**
* @public
* <p>Deletes an existing project policy.</p>
* <note>
* <p>This operation applies only to Amazon Rekognition Custom Labels.</p>
* </note>
* <p>Deletes an existing project policy.</p>
* <p>To get a list of project policies attached to a project, call <a>ListProjectPolicies</a>. To attach a project policy to a project, call <a>PutProjectPolicy</a>.</p>
* <p>This operation requires permissions to perform the <code>rekognition:DeleteProjectPolicy</code> action.</p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ export interface DeleteProjectVersionCommandOutput extends DeleteProjectVersionR

/**
* @public
* <p>Deletes an Amazon Rekognition Custom Labels model. </p>
* <p>You can't delete a model if it is running or if it is training.
* To check the status of a model, use the <code>Status</code> field returned
* from <a>DescribeProjectVersions</a>.
* To stop a running model call <a>StopProjectVersion</a>. If the model
* is training, wait until it finishes.</p>
* <p>Deletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom
* adapter.</p>
* <p>You can't delete a project version if it is running or if it is training. To check
* the status of a project version, use the Status field returned from <a>DescribeProjectVersions</a>. To stop a project version call <a>StopProjectVersion</a>. If the project version is training, wait until it
* finishes.</p>
* <p>This operation requires permissions to perform the
* <code>rekognition:DeleteProjectVersion</code> action. </p>
* @example
Expand All @@ -57,7 +56,7 @@ export interface DeleteProjectVersionCommandOutput extends DeleteProjectVersionR
* const command = new DeleteProjectVersionCommand(input);
* const response = await client.send(command);
* // { // DeleteProjectVersionResponse
* // Status: "TRAINING_IN_PROGRESS" || "TRAINING_COMPLETED" || "TRAINING_FAILED" || "STARTING" || "RUNNING" || "FAILED" || "STOPPING" || "STOPPED" || "DELETING" || "COPYING_IN_PROGRESS" || "COPYING_COMPLETED" || "COPYING_FAILED",
* // Status: "TRAINING_IN_PROGRESS" || "TRAINING_COMPLETED" || "TRAINING_FAILED" || "STARTING" || "RUNNING" || "FAILED" || "STOPPING" || "STOPPED" || "DELETING" || "COPYING_IN_PROGRESS" || "COPYING_COMPLETED" || "COPYING_FAILED" || "DEPRECATED" || "EXPIRED",
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export interface DescribeDatasetCommandOutput extends DescribeDatasetResponse, _

/**
* @public
* <p>
* <note>
* <p>This operation applies only to Amazon Rekognition Custom Labels.</p>
* </note>
* <p>
* Describes an Amazon Rekognition Custom Labels dataset. You can get information such as the current status of a dataset and
* statistics about the images and labels in a dataset.
* </p>
Expand Down
Loading

0 comments on commit 87763f3

Please sign in to comment.