amazonka-rekognition-2.0: Amazon Rekognition SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Rekognition.GetFaceDetection

Description

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

Creating a Request

data GetFaceDetection Source #

See: newGetFaceDetection smart constructor.

Constructors

GetFaceDetection' 

Fields

  • maxResults :: Maybe Natural

    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.

  • nextToken :: Maybe Text

    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.

  • jobId :: Text

    Unique identifier for the face detection job. The JobId is returned from StartFaceDetection.

Instances

Instances details
ToJSON GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

ToHeaders GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

ToPath GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

ToQuery GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

AWSRequest GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Associated Types

type AWSResponse GetFaceDetection #

Generic GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Associated Types

type Rep GetFaceDetection :: Type -> Type #

Read GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Show GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

NFData GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Methods

rnf :: GetFaceDetection -> () #

Eq GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Hashable GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

type AWSResponse GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

type Rep GetFaceDetection Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

type Rep GetFaceDetection = D1 ('MetaData "GetFaceDetection" "Amazonka.Rekognition.GetFaceDetection" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "GetFaceDetection'" 'PrefixI 'True) (S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newGetFaceDetection Source #

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: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.

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:jobId:GetFaceDetection', getFaceDetection_jobId - Unique identifier for the face detection job. The JobId is returned from StartFaceDetection.

Request Lenses

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_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_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.

Constructors

GetFaceDetectionResponse' 

Fields

  • faces :: Maybe [FaceDetection]

    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.

  • jobStatus :: Maybe VideoJobStatus

    The current status of the face detection job.

  • nextToken :: Maybe Text

    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.

  • statusMessage :: Maybe Text

    If the job fails, StatusMessage provides a descriptive error message.

  • videoMetadata :: Maybe 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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Associated Types

type Rep GetFaceDetectionResponse :: Type -> Type #

Read GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Show GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

NFData GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

Eq GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

type Rep GetFaceDetectionResponse Source # 
Instance details

Defined in Amazonka.Rekognition.GetFaceDetection

type Rep GetFaceDetectionResponse = D1 ('MetaData "GetFaceDetectionResponse" "Amazonka.Rekognition.GetFaceDetection" "amazonka-rekognition-2.0-EaCrS9R3rWADqefEZvOx5B" 'False) (C1 ('MetaCons "GetFaceDetectionResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "faces") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [FaceDetection])) :*: (S1 ('MetaSel ('Just "jobStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoJobStatus)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "statusMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "videoMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VideoMetadata)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

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: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.

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.

GetFaceDetectionResponse, getFaceDetectionResponse_statusMessage - If the job fails, StatusMessage provides a descriptive error message.

$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:httpStatus:GetFaceDetectionResponse', getFaceDetectionResponse_httpStatus - The response's http status code.

Response Lenses

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_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_statusMessage :: Lens' GetFaceDetectionResponse (Maybe Text) Source #

If the job fails, StatusMessage provides a descriptive error message.

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.