Skip to content

Commit

Permalink
feat(client-rekognition): This release adds ContentType and TaxonomyL…
Browse files Browse the repository at this point in the history
…evel attributes to DetectModerationLabels and GetMediaAnalysisJob API responses.
  • Loading branch information
awstools committed Jan 16, 2024
1 parent a54f8c4 commit daf640b
Show file tree
Hide file tree
Showing 13 changed files with 265 additions and 50 deletions.
15 changes: 15 additions & 0 deletions clients/client-rekognition/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ parameters, and common errors.</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html">GetMediaAnalysisJob</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html">IndexFaces</a>
</p>
</li>
Expand All @@ -101,6 +106,11 @@ parameters, and common errors.</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJob.html">ListMediaAnalysisJob</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html">ListFaces</a>
</p>
</li>
Expand Down Expand Up @@ -134,6 +144,11 @@ parameters, and common errors.</p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html">SearchUsersByImage</a>
</p>
</li>
<li>
<p>
<a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html">StartMediaAnalysisJob</a>
</p>
</li>
</ul>
<p>
<b>Amazon Rekognition Custom Labels</b>
Expand Down
15 changes: 15 additions & 0 deletions clients/client-rekognition/src/Rekognition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,11 @@ export interface Rekognition {
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html">GetMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html">IndexFaces</a>
* </p>
* </li>
Expand All @@ -1661,6 +1666,11 @@ export interface Rekognition {
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJob.html">ListMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html">ListFaces</a>
* </p>
* </li>
Expand Down Expand Up @@ -1694,6 +1704,11 @@ export interface Rekognition {
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html">SearchUsersByImage</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html">StartMediaAnalysisJob</a>
* </p>
* </li>
* </ul>
* <p>
* <b>Amazon Rekognition Custom Labels</b>
Expand Down
15 changes: 15 additions & 0 deletions clients/client-rekognition/src/RekognitionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,11 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html">GetMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html">IndexFaces</a>
* </p>
* </li>
Expand All @@ -657,6 +662,11 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJob.html">ListMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html">ListFaces</a>
* </p>
* </li>
Expand Down Expand Up @@ -690,6 +700,11 @@ export interface RekognitionClientResolvedConfig extends RekognitionClientResolv
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html">SearchUsersByImage</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html">StartMediaAnalysisJob</a>
* </p>
* </li>
* </ul>
* <p>
* <b>Amazon Rekognition Custom Labels</b>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ export interface DetectCustomLabelsCommandOutput extends DetectCustomLabelsRespo
* an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing
* image bytes is not supported. The image must be either a PNG or JPEG formatted file. </p>
* <p> For each object that the model version detects on an image, the API returns a
* (<code>CustomLabel</code>) object in an array (<code>CustomLabels</code>).
* Each <code>CustomLabel</code> object provides the label name (<code>Name</code>), the level
* of confidence that the image contains the object (<code>Confidence</code>), and
* object location information, if it exists, for the label on the image (<code>Geometry</code>). </p>
* (<code>CustomLabel</code>) object in an array (<code>CustomLabels</code>). Each
* <code>CustomLabel</code> object provides the label name (<code>Name</code>), the level
* of confidence that the image contains the object (<code>Confidence</code>), and object
* location information, if it exists, for the label on the image (<code>Geometry</code>).
* Note that for the <code>DetectCustomLabelsLabels</code> operation, <code>Polygons</code>
* are not returned in the <code>Geometry</code> section of the response.</p>
* <p>To filter labels that are returned, specify a value for <code>MinConfidence</code>.
* <code>DetectCustomLabelsLabels</code> only returns labels with a confidence that's higher than
* the specified value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export interface DetectModerationLabelsCommandOutput extends DetectModerationLab
* // Confidence: Number("float"),
* // Name: "STRING_VALUE",
* // ParentName: "STRING_VALUE",
* // TaxonomyLevel: Number("int"),
* // },
* // ],
* // ModerationModelVersion: "STRING_VALUE",
Expand All @@ -89,6 +90,12 @@ export interface DetectModerationLabelsCommandOutput extends DetectModerationLab
* // HumanLoopActivationConditionsEvaluationResults: "STRING_VALUE",
* // },
* // ProjectVersion: "STRING_VALUE",
* // ContentTypes: [ // ContentTypes
* // { // ContentType
* // Confidence: Number("float"),
* // Name: "STRING_VALUE",
* // },
* // ],
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export interface GetContentModerationCommandOutput extends GetContentModerationR
* // Confidence: Number("float"),
* // Name: "STRING_VALUE",
* // ParentName: "STRING_VALUE",
* // TaxonomyLevel: Number("int"),
* // },
* // StartTimestampMillis: Number("long"),
* // EndTimestampMillis: Number("long"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export interface GetMediaAnalysisJobCommandOutput extends GetMediaAnalysisJobRes
* // Name: "STRING_VALUE",
* // Version: "STRING_VALUE",
* // },
* // ModelVersions: { // MediaAnalysisModelVersions
* // Moderation: "STRING_VALUE",
* // },
* // },
* // ManifestSummary: { // MediaAnalysisManifestSummary
* // S3Object: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ export interface ListMediaAnalysisJobsCommandOutput extends ListMediaAnalysisJob
* // Name: "STRING_VALUE",
* // Version: "STRING_VALUE",
* // },
* // ModelVersions: { // MediaAnalysisModelVersions
* // Moderation: "STRING_VALUE",
* // },
* // },
* // ManifestSummary: { // MediaAnalysisManifestSummary
* // S3Object: {
Expand Down
15 changes: 15 additions & 0 deletions clients/client-rekognition/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetMediaAnalysisJob.html">GetMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_IndexFaces.html">IndexFaces</a>
* </p>
* </li>
Expand All @@ -96,6 +101,11 @@
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListMediaAnalysisJob.html">ListMediaAnalysisJob</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_ListFaces.html">ListFaces</a>
* </p>
* </li>
Expand Down Expand Up @@ -129,6 +139,11 @@
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_SearchUsersByImage.html">SearchUsersByImage</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_StartMediaAnalysisJob.html">StartMediaAnalysisJob</a>
* </p>
* </li>
* </ul>
* <p>
* <b>Amazon Rekognition Custom Labels</b>
Expand Down
91 changes: 51 additions & 40 deletions clients/client-rekognition/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus];
export interface AssociateFacesResponse {
/**
* @public
* <p>An array of AssociatedFace objects containing FaceIDs that are successfully associated
* with the UserID is returned. Returned if the AssociateFaces action is successful.</p>
* <p>An array of AssociatedFace objects containing FaceIDs that have been successfully associated
* with the UserID. Returned if the AssociateFaces action is successful.</p>
*/
AssociatedFaces?: AssociatedFace[];

Expand Down Expand Up @@ -1975,6 +1975,12 @@ export interface ModerationLabel {
* label <code>""</code>.</p>
*/
ParentName?: string;

/**
* @public
* <p>The level of the moderation label with regard to its taxonomy, from 1 to 3.</p>
*/
TaxonomyLevel?: number;
}

/**
Expand Down Expand Up @@ -2031,6 +2037,24 @@ export const ContentModerationSortBy = {
*/
export type ContentModerationSortBy = (typeof ContentModerationSortBy)[keyof typeof ContentModerationSortBy];

/**
* @public
* <p>Contains information regarding the confidence and name of a detected content type.</p>
*/
export interface ContentType {
/**
* @public
* <p>The confidence level of the label given</p>
*/
Confidence?: number;

/**
* @public
* <p>The name of the label</p>
*/
Name?: string;
}

/**
* @public
* <p>The S3 bucket and folder location where training output is placed.</p>
Expand Down Expand Up @@ -5006,6 +5030,13 @@ export interface DetectModerationLabelsResponse {
* indicating that a base moderation detection project version was used.</p>
*/
ProjectVersion?: string;

/**
* @public
* <p>A list of predicted results for the type of content an image contains. For example,
* the image content might be from animation, sports, or a video game.</p>
*/
ContentTypes?: ContentType[];
}

/**
Expand Down Expand Up @@ -6654,6 +6685,18 @@ export interface MediaAnalysisOutputConfig {
S3KeyPrefix?: string;
}

/**
* @public
* <p>Object containing information about the model versions of selected features in a given job.</p>
*/
export interface MediaAnalysisModelVersions {
/**
* @public
* <p>The Moderation base model version.</p>
*/
Moderation?: string;
}

/**
* @public
* <p>Contains the results for a media analysis job created with StartMediaAnalysisJob.</p>
Expand All @@ -6669,6 +6712,12 @@ export interface MediaAnalysisResults {
* Amazon Rekognition Developer Guide. </p>
*/
S3Object?: S3Object;

/**
* @public
* <p>Information about the model versions for the features selected in a given job.</p>
*/
ModelVersions?: MediaAnalysisModelVersions;
}

/**
Expand Down Expand Up @@ -8181,44 +8230,6 @@ export class MalformedPolicyDocumentException extends __BaseException {
}
}

/**
* @public
* <p>Contains metadata for a UserID matched with a given face.</p>
*/
export interface MatchedUser {
/**
* @public
* <p>A provided ID for the UserID. Unique within the collection.</p>
*/
UserId?: string;

/**
* @public
* <p>The status of the user matched to a provided FaceID.</p>
*/
UserStatus?: UserStatus;
}

/**
* @public
* <p>The Amazon Simple Notification Service topic to which Amazon Rekognition publishes the completion status of a video analysis operation. For more information, see
* <a href="https://docs.aws.amazon.com/rekognition/latest/dg/api-video.html">Calling Amazon Rekognition Video operations</a>. Note that the Amazon SNS topic must have a topic name that begins with <i>AmazonRekognition</i> if you are using the AmazonRekognitionServiceRole permissions policy to access the topic.
* For more information, see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/api-video-roles.html#api-video-roles-all-topics">Giving access to multiple Amazon SNS topics</a>.</p>
*/
export interface NotificationChannel {
/**
* @public
* <p>The Amazon SNS topic to which Amazon Rekognition posts the completion status.</p>
*/
SNSTopicArn: string | undefined;

/**
* @public
* <p>The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic. </p>
*/
RoleArn: string | undefined;
}

/**
* @internal
*/
Expand Down

0 comments on commit daf640b

Please sign in to comment.