Skip to content

Commit

Permalink
docs(client-rekognition): This release adds code snippets for Amazon …
Browse files Browse the repository at this point in the history
…Rekognition Custom Labels.
  • Loading branch information
awstools committed Aug 7, 2023
1 parent eba3ce4 commit 1012048
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 192 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ export interface AssociateFacesCommandOutput extends AssociateFacesResponse, __M
* <p>You are not authorized to perform the action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
* </p>
* <p> A User with the same Id already exists within the collection, or the update or deletion
* of the User caused an inconsistent state. ** </p>
*
* @throws {@link IdempotentParameterMismatchException} (client fault)
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met
* @public
* <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
* <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,
* specify <code>test</code> for the value of <code>DatasetType</code>.
* specify <code>TEST</code> for the value of <code>DatasetType</code>.
* </p>
* <p>The response from <code>CreateDataset</code> is the Amazon Resource Name (ARN) for the dataset.
* Creating a dataset takes a while to complete. Use <a>DescribeDataset</a> to check the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ export interface CreateFaceLivenessSessionCommandOutput extends CreateFaceLivene
* @public
* <p>This API operation initiates a Face Liveness session. It returns a <code>SessionId</code>,
* which you can use to start streaming Face Liveness video and get the results for a Face
* Liveness session. You can use the <code>OutputConfig</code> option in the Settings parameter
* to provide an Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images.
* You can use <code>AuditImagesLimit</code> to limit the number of audit images returned. This
* number is between 0 and 4. By default, it is set to 0. The limit is best effort and based on
* the duration of the selfie-video. </p>
* Liveness session. </p>
* <p>You can use the <code>OutputConfig</code> option in the Settings parameter to provide an
* Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images. If no Amazon S3
* bucket is defined, raw bytes are sent instead. </p>
* <p>You can use <code>AuditImagesLimit</code> to limit the number of audit images returned
* when <code>GetFaceLivenessSessionResults</code> is called. This number is between 0 and 4. By
* default, it is set to 0. The limit is best effort and based on the duration of the
* selfie-video. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
17 changes: 8 additions & 9 deletions clients/client-rekognition/src/commands/CreateUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
/**
* @public
* <p>Creates a new User within a collection specified by <code>CollectionId</code>. Takes
* <code>UserId</code> as a parameter, which is a user provided ID which should be unique
* within the collection. The provided <code>UserId</code> will alias the system generated
* UUID to make the <code>UserId</code> more user friendly. </p>
* <code>UserId</code> as a parameter, which is a user provided ID which should be unique
* within the collection. The provided <code>UserId</code> will alias the system generated UUID
* to make the <code>UserId</code> more user friendly. </p>
* <p>Uses a <code>ClientToken</code>, an idempotency token that ensures a call to
* <code>CreateUser</code> 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 <code>CreateUser</code> calls. </p>
* <code>CreateUser</code> 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 <code>CreateUser</code> calls. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -71,9 +71,8 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
* <p>You are not authorized to perform the action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
* </p>
* <p> A User with the same Id already exists within the collection, or the update or deletion
* of the User caused an inconsistent state. ** </p>
*
* @throws {@link IdempotentParameterMismatchException} (client fault)
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input
Expand Down
5 changes: 2 additions & 3 deletions clients/client-rekognition/src/commands/DeleteUserCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ export interface DeleteUserCommandOutput extends DeleteUserResponse, __MetadataB
* <p>You are not authorized to perform the action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
* </p>
* <p> A User with the same Id already exists within the collection, or the update or deletion
* of the User caused an inconsistent state. ** </p>
*
* @throws {@link IdempotentParameterMismatchException} (client fault)
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input
Expand Down
14 changes: 9 additions & 5 deletions clients/client-rekognition/src/commands/DetectLabelsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ export interface DetectLabelsCommandOutput extends DetectLabelsResponse, __Metad
* labels or with label categories. You can specify inclusive filters, exclusive filters, or a
* combination of inclusive and exclusive filters. For more information on filtering see <a href="https://docs.aws.amazon.com/rekognition/latest/dg/labels-detect-labels-image.html">Detecting
* Labels in an Image</a>.</p>
* <p>You can specify <code>MinConfidence</code> to control the confidence threshold for the
* labels returned. The default is 55%. You can also add the <code>MaxLabels</code> parameter to
* limit the number of labels returned. The default and upper limit is 1000 labels.</p>
* <p>When getting labels, you can specify <code>MinConfidence</code> to control the
* confidence threshold for the labels returned. The default is 55%. You can also add the
* <code>MaxLabels</code> parameter to limit the number of labels returned. The default and
* upper limit is 1000 labels. These arguments are only valid when supplying GENERAL_LABELS as a
* feature type.</p>
* <p>
* <b>Response Elements</b>
* </p>
Expand Down Expand Up @@ -108,10 +110,12 @@ export interface DetectLabelsCommandOutput extends DetectLabelsResponse, __Metad
* <p>Dominant Color - An array of the dominant colors in the image. </p>
* </li>
* <li>
* <p>Foreground - Information about the sharpness, brightness, and dominant colors of the input image’s foreground. </p>
* <p>Foreground - Information about the sharpness, brightness, and dominant colors of the
* input image’s foreground. </p>
* </li>
* <li>
* <p>Background - Information about the sharpness, brightness, and dominant colors of the input image’s background.</p>
* <p>Background - Information about the sharpness, brightness, and dominant colors of the
* input image’s background.</p>
* </li>
* </ul>
* <p>The list of returned labels will include at least one label for every detected object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ export interface DisassociateFacesCommandOutput extends DisassociateFacesRespons
* <p>You are not authorized to perform the action.</p>
*
* @throws {@link ConflictException} (client fault)
* <p>
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
* </p>
* <p> A User with the same Id already exists within the collection, or the update or deletion
* of the User caused an inconsistent state. ** </p>
*
* @throws {@link IdempotentParameterMismatchException} (client fault)
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ export interface GetFaceDetectionCommandOutput extends GetFaceDetectionResponse,
* specified in <code>MaxResults</code>, the value of <code>NextToken</code> in the operation response contains a pagination token for getting the next set
* of results. To get the next page of results, call <code>GetFaceDetection</code> and populate the <code>NextToken</code> request parameter with the token
* value returned from the previous call to <code>GetFaceDetection</code>.</p>
* <p>Note that for the <code>GetFaceDetection</code> operation, the returned values for
* <code>FaceOccluded</code> and <code>EyeDirection</code> will always be "null".</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ export interface GetFaceLivenessSessionResultsCommandOutput
* <code>sessionId</code> as input, which was created using
* <code>CreateFaceLivenessSession</code>. Returns the corresponding Face Liveness confidence
* score, a reference image that includes a face bounding box, and audit images that also contain
* face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. The reference
* image can optionally be returned.</p>
* face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. </p>
* <p>The number of audit images returned by <code>GetFaceLivenessSessionResults</code> is
* defined by the <code>AuditImagesLimit</code> paramater when calling
* <code>CreateFaceLivenessSession</code>. Reference images are always returned when
* possible.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface GetTextDetectionCommandOutput extends GetTextDetectionResponse,
* of <code>StartLabelDetection</code>.</p>
* <p>
* <code>GetTextDetection</code> returns an array of detected text (<code>TextDetections</code>) sorted by
* the time the text was detected, up to 50 words per frame of video.</p>
* the time the text was detected, up to 100 words per frame of video.</p>
* <p>Each element of the array includes the detected text, the precentage confidence in the acuracy
* of the detected text, the time the text was detected, bounding box information for where the text
* was located, and unique identifiers for words and their lines.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ export interface SearchUsersByImageCommandOutput extends SearchUsersByImageRespo
* ordered by similarity score with the highest similarity first. It also returns a bounding box
* for the face found in the input image. </p>
* <p>Information about faces detected in the supplied image, but not used for the search, is
* returned in an array of <code>UnsearchedFace</code> objects. If no valid face is detected
* in the image, the response will contain an empty <code>UserMatches</code> list and no
* <code>SearchedFace</code> object. </p>
* returned in an array of <code>UnsearchedFace</code> objects. If no valid face is detected in
* the image, the response will contain an empty <code>UserMatches</code> list and no
* <code>SearchedFace</code> object. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-rekognition/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://rekognition-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://rekognition.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit 1012048

Please sign in to comment.