Skip to content

Commit 1012048

Browse files
author
awstools
committed
docs(client-rekognition): This release adds code snippets for Amazon Rekognition Custom Labels.
1 parent eba3ce4 commit 1012048

13 files changed

+196
-192
lines changed

clients/client-rekognition/src/commands/AssociateFacesCommand.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ export interface AssociateFacesCommandOutput extends AssociateFacesResponse, __M
115115
* <p>You are not authorized to perform the action.</p>
116116
*
117117
* @throws {@link ConflictException} (client fault)
118-
* <p>
119-
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
120-
* </p>
118+
* <p> A User with the same Id already exists within the collection, or the update or deletion
119+
* of the User caused an inconsistent state. ** </p>
121120
*
122121
* @throws {@link IdempotentParameterMismatchException} (client fault)
123122
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input

clients/client-rekognition/src/commands/CreateDatasetCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met
3838
* @public
3939
* <p>Creates a new Amazon Rekognition Custom Labels dataset. You can create a dataset by using
4040
* an Amazon Sagemaker format manifest file or by copying an existing Amazon Rekognition Custom Labels dataset.</p>
41-
* <p>To create a training dataset for a project, specify <code>train</code> for the value of
41+
* <p>To create a training dataset for a project, specify <code>TRAIN</code> for the value of
4242
* <code>DatasetType</code>. To create the test dataset for a project,
43-
* specify <code>test</code> for the value of <code>DatasetType</code>.
43+
* specify <code>TEST</code> for the value of <code>DatasetType</code>.
4444
* </p>
4545
* <p>The response from <code>CreateDataset</code> is the Amazon Resource Name (ARN) for the dataset.
4646
* Creating a dataset takes a while to complete. Use <a>DescribeDataset</a> to check the

clients/client-rekognition/src/commands/CreateFaceLivenessSessionCommand.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ export interface CreateFaceLivenessSessionCommandOutput extends CreateFaceLivene
3838
* @public
3939
* <p>This API operation initiates a Face Liveness session. It returns a <code>SessionId</code>,
4040
* which you can use to start streaming Face Liveness video and get the results for a Face
41-
* Liveness session. You can use the <code>OutputConfig</code> option in the Settings parameter
42-
* to provide an Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images.
43-
* You can use <code>AuditImagesLimit</code> to limit the number of audit images returned. This
44-
* number is between 0 and 4. By default, it is set to 0. The limit is best effort and based on
45-
* the duration of the selfie-video. </p>
41+
* Liveness session. </p>
42+
* <p>You can use the <code>OutputConfig</code> option in the Settings parameter to provide an
43+
* Amazon S3 bucket location. The Amazon S3 bucket stores reference images and audit images. If no Amazon S3
44+
* bucket is defined, raw bytes are sent instead. </p>
45+
* <p>You can use <code>AuditImagesLimit</code> to limit the number of audit images returned
46+
* when <code>GetFaceLivenessSessionResults</code> is called. This number is between 0 and 4. By
47+
* default, it is set to 0. The limit is best effort and based on the duration of the
48+
* selfie-video. </p>
4649
* @example
4750
* Use a bare-bones client and the command you need to make an API call.
4851
* ```javascript

clients/client-rekognition/src/commands/CreateUserCommand.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
3737
/**
3838
* @public
3939
* <p>Creates a new User within a collection specified by <code>CollectionId</code>. Takes
40-
* <code>UserId</code> as a parameter, which is a user provided ID which should be unique
41-
* within the collection. The provided <code>UserId</code> will alias the system generated
42-
* UUID to make the <code>UserId</code> more user friendly. </p>
40+
* <code>UserId</code> as a parameter, which is a user provided ID which should be unique
41+
* within the collection. The provided <code>UserId</code> will alias the system generated UUID
42+
* to make the <code>UserId</code> more user friendly. </p>
4343
* <p>Uses a <code>ClientToken</code>, an idempotency token that ensures a call to
44-
* <code>CreateUser</code> completes only once. If the value is not supplied, the AWS SDK
45-
* generates an idempotency token for the requests. This prevents retries after a network
46-
* error results from making multiple <code>CreateUser</code> calls. </p>
44+
* <code>CreateUser</code> completes only once. If the value is not supplied, the AWS SDK
45+
* generates an idempotency token for the requests. This prevents retries after a network error
46+
* results from making multiple <code>CreateUser</code> calls. </p>
4747
* @example
4848
* Use a bare-bones client and the command you need to make an API call.
4949
* ```javascript
@@ -71,9 +71,8 @@ export interface CreateUserCommandOutput extends CreateUserResponse, __MetadataB
7171
* <p>You are not authorized to perform the action.</p>
7272
*
7373
* @throws {@link ConflictException} (client fault)
74-
* <p>
75-
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
76-
* </p>
74+
* <p> A User with the same Id already exists within the collection, or the update or deletion
75+
* of the User caused an inconsistent state. ** </p>
7776
*
7877
* @throws {@link IdempotentParameterMismatchException} (client fault)
7978
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input

clients/client-rekognition/src/commands/DeleteUserCommand.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ export interface DeleteUserCommandOutput extends DeleteUserResponse, __MetadataB
6868
* <p>You are not authorized to perform the action.</p>
6969
*
7070
* @throws {@link ConflictException} (client fault)
71-
* <p>
72-
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
73-
* </p>
71+
* <p> A User with the same Id already exists within the collection, or the update or deletion
72+
* of the User caused an inconsistent state. ** </p>
7473
*
7574
* @throws {@link IdempotentParameterMismatchException} (client fault)
7675
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input

clients/client-rekognition/src/commands/DetectLabelsCommand.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ export interface DetectLabelsCommandOutput extends DetectLabelsResponse, __Metad
5959
* labels or with label categories. You can specify inclusive filters, exclusive filters, or a
6060
* 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
6161
* Labels in an Image</a>.</p>
62-
* <p>You can specify <code>MinConfidence</code> to control the confidence threshold for the
63-
* labels returned. The default is 55%. You can also add the <code>MaxLabels</code> parameter to
64-
* limit the number of labels returned. The default and upper limit is 1000 labels.</p>
62+
* <p>When getting labels, you can specify <code>MinConfidence</code> to control the
63+
* confidence threshold for the labels returned. The default is 55%. You can also add the
64+
* <code>MaxLabels</code> parameter to limit the number of labels returned. The default and
65+
* upper limit is 1000 labels. These arguments are only valid when supplying GENERAL_LABELS as a
66+
* feature type.</p>
6567
* <p>
6668
* <b>Response Elements</b>
6769
* </p>
@@ -108,10 +110,12 @@ export interface DetectLabelsCommandOutput extends DetectLabelsResponse, __Metad
108110
* <p>Dominant Color - An array of the dominant colors in the image. </p>
109111
* </li>
110112
* <li>
111-
* <p>Foreground - Information about the sharpness, brightness, and dominant colors of the input image’s foreground. </p>
113+
* <p>Foreground - Information about the sharpness, brightness, and dominant colors of the
114+
* input image’s foreground. </p>
112115
* </li>
113116
* <li>
114-
* <p>Background - Information about the sharpness, brightness, and dominant colors of the input image’s background.</p>
117+
* <p>Background - Information about the sharpness, brightness, and dominant colors of the
118+
* input image’s background.</p>
115119
* </li>
116120
* </ul>
117121
* <p>The list of returned labels will include at least one label for every detected object,

clients/client-rekognition/src/commands/DisassociateFacesCommand.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ export interface DisassociateFacesCommandOutput extends DisassociateFacesRespons
9090
* <p>You are not authorized to perform the action.</p>
9191
*
9292
* @throws {@link ConflictException} (client fault)
93-
* <p>
94-
* A User with the same Id already exists within the collection, or the update or deletion of the User caused an inconsistent state. **
95-
* </p>
93+
* <p> A User with the same Id already exists within the collection, or the update or deletion
94+
* of the User caused an inconsistent state. ** </p>
9695
*
9796
* @throws {@link IdempotentParameterMismatchException} (client fault)
9897
* <p>A <code>ClientRequestToken</code> input parameter was reused with an operation, but at least one of the other input

clients/client-rekognition/src/commands/GetFaceDetectionCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ export interface GetFaceDetectionCommandOutput extends GetFaceDetectionResponse,
4949
* specified in <code>MaxResults</code>, the value of <code>NextToken</code> in the operation response contains a pagination token for getting the next set
5050
* of results. To get the next page of results, call <code>GetFaceDetection</code> and populate the <code>NextToken</code> request parameter with the token
5151
* value returned from the previous call to <code>GetFaceDetection</code>.</p>
52+
* <p>Note that for the <code>GetFaceDetection</code> operation, the returned values for
53+
* <code>FaceOccluded</code> and <code>EyeDirection</code> will always be "null".</p>
5254
* @example
5355
* Use a bare-bones client and the command you need to make an API call.
5456
* ```javascript

clients/client-rekognition/src/commands/GetFaceLivenessSessionResultsCommand.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ export interface GetFaceLivenessSessionResultsCommandOutput
4949
* <code>sessionId</code> as input, which was created using
5050
* <code>CreateFaceLivenessSession</code>. Returns the corresponding Face Liveness confidence
5151
* score, a reference image that includes a face bounding box, and audit images that also contain
52-
* face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. The reference
53-
* image can optionally be returned.</p>
52+
* face bounding boxes. The Face Liveness confidence score ranges from 0 to 100. </p>
53+
* <p>The number of audit images returned by <code>GetFaceLivenessSessionResults</code> is
54+
* defined by the <code>AuditImagesLimit</code> paramater when calling
55+
* <code>CreateFaceLivenessSession</code>. Reference images are always returned when
56+
* possible.</p>
5457
* @example
5558
* Use a bare-bones client and the command you need to make an API call.
5659
* ```javascript

clients/client-rekognition/src/commands/GetTextDetectionCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export interface GetTextDetectionCommandOutput extends GetTextDetectionResponse,
4646
* of <code>StartLabelDetection</code>.</p>
4747
* <p>
4848
* <code>GetTextDetection</code> returns an array of detected text (<code>TextDetections</code>) sorted by
49-
* the time the text was detected, up to 50 words per frame of video.</p>
49+
* the time the text was detected, up to 100 words per frame of video.</p>
5050
* <p>Each element of the array includes the detected text, the precentage confidence in the acuracy
5151
* of the detected text, the time the text was detected, bounding box information for where the text
5252
* was located, and unique identifiers for words and their lines.</p>

clients/client-rekognition/src/commands/SearchUsersByImageCommand.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export interface SearchUsersByImageCommandOutput extends SearchUsersByImageRespo
4242
* ordered by similarity score with the highest similarity first. It also returns a bounding box
4343
* for the face found in the input image. </p>
4444
* <p>Information about faces detected in the supplied image, but not used for the search, is
45-
* returned in an array of <code>UnsearchedFace</code> objects. If no valid face is detected
46-
* in the image, the response will contain an empty <code>UserMatches</code> list and no
47-
* <code>SearchedFace</code> object. </p>
45+
* returned in an array of <code>UnsearchedFace</code> objects. If no valid face is detected in
46+
* the image, the response will contain an empty <code>UserMatches</code> list and no
47+
* <code>SearchedFace</code> object. </p>
4848
* @example
4949
* Use a bare-bones client and the command you need to make an API call.
5050
* ```javascript

clients/client-rekognition/src/endpoint/ruleset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"
2626
n=[i],
2727
o=[j],
2828
p=[{[t]:"Region"}];
29-
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}]}]};
29+
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}]};
3030
export const ruleSet: RuleSetObject = _data;

0 commit comments

Comments
 (0)