Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Gets face detection results for a Amazon Rekognition Video analysis started by StartFaceDetection.
Face detection with Amazon Rekognition Video is an asynchronous
operation. You start face detection by calling StartFaceDetection which
returns a job identifier (JobId
). When the face detection operation
finishes, Amazon Rekognition Video publishes a completion status to the
Amazon Simple Notification Service topic registered in the initial call
to StartFaceDetection
. To get the results of the face detection
operation, first check that the status value published to the Amazon SNS
topic is SUCCEEDED
. If so, call GetFaceDetection and pass the job
identifier (JobId
) from the initial call to StartFaceDetection
.
GetFaceDetection
returns an array of detected faces (Faces
) sorted
by the time the faces were detected.
Use MaxResults parameter to limit the number of labels returned. If
there are more results than specified in MaxResults
, the value of
NextToken
in the operation response contains a pagination token for
getting the next set of results. To get the next page of results, call
GetFaceDetection
and populate the NextToken
request parameter with
the token value returned from the previous call to GetFaceDetection
.
Synopsis
- data GetFaceDetection = GetFaceDetection' {}
- newGetFaceDetection :: Text -> GetFaceDetection
- getFaceDetection_nextToken :: Lens' GetFaceDetection (Maybe Text)
- getFaceDetection_maxResults :: Lens' GetFaceDetection (Maybe Natural)
- getFaceDetection_jobId :: Lens' GetFaceDetection Text
- data GetFaceDetectionResponse = GetFaceDetectionResponse' {}
- newGetFaceDetectionResponse :: Int -> GetFaceDetectionResponse
- getFaceDetectionResponse_nextToken :: Lens' GetFaceDetectionResponse (Maybe Text)
- getFaceDetectionResponse_videoMetadata :: Lens' GetFaceDetectionResponse (Maybe VideoMetadata)
- getFaceDetectionResponse_statusMessage :: Lens' GetFaceDetectionResponse (Maybe Text)
- getFaceDetectionResponse_faces :: Lens' GetFaceDetectionResponse (Maybe [FaceDetection])
- getFaceDetectionResponse_jobStatus :: Lens' GetFaceDetectionResponse (Maybe VideoJobStatus)
- getFaceDetectionResponse_httpStatus :: Lens' GetFaceDetectionResponse Int
Creating a Request
data GetFaceDetection Source #
See: newGetFaceDetection
smart constructor.
GetFaceDetection' | |
|
Instances
Create a value of GetFaceDetection
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:GetFaceDetection'
, getFaceDetection_nextToken
- 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.
$sel:maxResults:GetFaceDetection'
, getFaceDetection_maxResults
- 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.
$sel:jobId:GetFaceDetection'
, getFaceDetection_jobId
- Unique identifier for the face detection job. The JobId
is returned
from StartFaceDetection
.
Request Lenses
getFaceDetection_nextToken :: Lens' GetFaceDetection (Maybe Text) Source #
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.
getFaceDetection_maxResults :: Lens' GetFaceDetection (Maybe Natural) Source #
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.
getFaceDetection_jobId :: Lens' GetFaceDetection Text Source #
Unique identifier for the face detection job. The JobId
is returned
from StartFaceDetection
.
Destructuring the Response
data GetFaceDetectionResponse Source #
See: newGetFaceDetectionResponse
smart constructor.
GetFaceDetectionResponse' | |
|
Instances
newGetFaceDetectionResponse Source #
Create a value of GetFaceDetectionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:nextToken:GetFaceDetection'
, getFaceDetectionResponse_nextToken
- 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.
$sel:videoMetadata:GetFaceDetectionResponse'
, getFaceDetectionResponse_videoMetadata
- Information about a video that Amazon Rekognition Video analyzed.
Videometadata
is returned in every page of paginated responses from a
Amazon Rekognition video operation.
$sel:statusMessage:GetFaceDetectionResponse'
, getFaceDetectionResponse_statusMessage
- If the job fails, StatusMessage
provides a descriptive error message.
$sel:faces:GetFaceDetectionResponse'
, getFaceDetectionResponse_faces
- 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.
$sel:jobStatus:GetFaceDetectionResponse'
, getFaceDetectionResponse_jobStatus
- The current status of the face detection job.
$sel:httpStatus:GetFaceDetectionResponse'
, getFaceDetectionResponse_httpStatus
- The response's http status code.
Response Lenses
getFaceDetectionResponse_nextToken :: Lens' GetFaceDetectionResponse (Maybe Text) Source #
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.
getFaceDetectionResponse_videoMetadata :: Lens' GetFaceDetectionResponse (Maybe VideoMetadata) Source #
Information about a video that Amazon Rekognition Video analyzed.
Videometadata
is returned in every page of paginated responses from a
Amazon Rekognition video operation.
getFaceDetectionResponse_statusMessage :: Lens' GetFaceDetectionResponse (Maybe Text) Source #
If the job fails, StatusMessage
provides a descriptive error message.
getFaceDetectionResponse_faces :: Lens' GetFaceDetectionResponse (Maybe [FaceDetection]) Source #
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.
getFaceDetectionResponse_jobStatus :: Lens' GetFaceDetectionResponse (Maybe VideoJobStatus) Source #
The current status of the face detection job.
getFaceDetectionResponse_httpStatus :: Lens' GetFaceDetectionResponse Int Source #
The response's http status code.