amazonka-rekognition-1.6.1: Amazon Rekognition SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.Rekognition.GetLabelDetection

Contents

Description

Gets the label detection results of a Rekognition Video analysis started by .

The label detection operation is started by a call to which returns a job identifier (JobId ). When the label detection operation finishes, Amazon Rekognition publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartlabelDetection . To get the results of the label detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call and pass the job identifier (JobId ) from the initial call to StartLabelDetection .

GetLabelDetection returns an array of detected labels (Labels ) sorted by the time the labels were detected. You can also sort by the label name by specifying NAME for the SortBy input parameter.

The labels returned include the label name, the percentage confidence in the accuracy of the detected label, and the time the label was detected in the video.

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 GetlabelDetection and populate the NextToken request parameter with the token value returned from the previous call to GetLabelDetection .

Synopsis

Creating a Request

getLabelDetection Source #

Creates a value of GetLabelDetection with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gldNextToken - If the previous response was incomplete (because there are more labels to retrieve), Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of labels.
  • gldMaxResults - 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.
  • gldSortBy - Sort to use for elements in the Labels array. Use TIMESTAMP to sort array elements by the time labels are detected. Use NAME to alphabetically group elements for a label together. Within each label group, the array element are sorted by detection confidence. The default sort is by TIMESTAMP .
  • gldJobId - Job identifier for the label detection operation for which you want results returned. You get the job identifer from an initial call to StartlabelDetection .

data GetLabelDetection Source #

See: getLabelDetection smart constructor.

Instances
Eq GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Data GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetLabelDetection -> c GetLabelDetection #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetLabelDetection #

toConstr :: GetLabelDetection -> Constr #

dataTypeOf :: GetLabelDetection -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GetLabelDetection) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetLabelDetection) #

gmapT :: (forall b. Data b => b -> b) -> GetLabelDetection -> GetLabelDetection #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetLabelDetection -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetLabelDetection -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetLabelDetection -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetLabelDetection -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetLabelDetection -> m GetLabelDetection #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetLabelDetection -> m GetLabelDetection #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetLabelDetection -> m GetLabelDetection #

Read GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Show GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Generic GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Associated Types

type Rep GetLabelDetection :: Type -> Type #

Hashable GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

ToJSON GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

AWSRequest GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Associated Types

type Rs GetLabelDetection :: Type #

ToHeaders GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

ToPath GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

ToQuery GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

NFData GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Methods

rnf :: GetLabelDetection -> () #

type Rep GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

type Rep GetLabelDetection = D1 (MetaData "GetLabelDetection" "Network.AWS.Rekognition.GetLabelDetection" "amazonka-rekognition-1.6.1-ELwOF0LSGWFp8S3Ef6QMe" False) (C1 (MetaCons "GetLabelDetection'" PrefixI True) ((S1 (MetaSel (Just "_gldNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_gldMaxResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))) :*: (S1 (MetaSel (Just "_gldSortBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe LabelDetectionSortBy)) :*: S1 (MetaSel (Just "_gldJobId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))
type Rs GetLabelDetection Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Request Lenses

gldNextToken :: Lens' GetLabelDetection (Maybe Text) Source #

If the previous response was incomplete (because there are more labels to retrieve), Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of labels.

gldMaxResults :: Lens' GetLabelDetection (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.

gldSortBy :: Lens' GetLabelDetection (Maybe LabelDetectionSortBy) Source #

Sort to use for elements in the Labels array. Use TIMESTAMP to sort array elements by the time labels are detected. Use NAME to alphabetically group elements for a label together. Within each label group, the array element are sorted by detection confidence. The default sort is by TIMESTAMP .

gldJobId :: Lens' GetLabelDetection Text Source #

Job identifier for the label detection operation for which you want results returned. You get the job identifer from an initial call to StartlabelDetection .

Destructuring the Response

getLabelDetectionResponse Source #

Creates a value of GetLabelDetectionResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • gldrsNextToken - If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of labels.
  • gldrsVideoMetadata - Information about a video that Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a Amazon Rekognition video operation.
  • gldrsStatusMessage - If the job fails, StatusMessage provides a descriptive error message.
  • gldrsLabels - An array of labels detected in the video. Each element contains the detected label and the time, in milliseconds from the start of the video, that the label was detected.
  • gldrsJobStatus - The current status of the label detection job.
  • gldrsResponseStatus - -- | The response status code.

data GetLabelDetectionResponse Source #

See: getLabelDetectionResponse smart constructor.

Instances
Eq GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Data GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GetLabelDetectionResponse -> c GetLabelDetectionResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GetLabelDetectionResponse #

toConstr :: GetLabelDetectionResponse -> Constr #

dataTypeOf :: GetLabelDetectionResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GetLabelDetectionResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GetLabelDetectionResponse) #

gmapT :: (forall b. Data b => b -> b) -> GetLabelDetectionResponse -> GetLabelDetectionResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GetLabelDetectionResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GetLabelDetectionResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> GetLabelDetectionResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GetLabelDetectionResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GetLabelDetectionResponse -> m GetLabelDetectionResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GetLabelDetectionResponse -> m GetLabelDetectionResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GetLabelDetectionResponse -> m GetLabelDetectionResponse #

Read GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Show GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Generic GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

Associated Types

type Rep GetLabelDetectionResponse :: Type -> Type #

NFData GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

type Rep GetLabelDetectionResponse Source # 
Instance details

Defined in Network.AWS.Rekognition.GetLabelDetection

type Rep GetLabelDetectionResponse = D1 (MetaData "GetLabelDetectionResponse" "Network.AWS.Rekognition.GetLabelDetection" "amazonka-rekognition-1.6.1-ELwOF0LSGWFp8S3Ef6QMe" False) (C1 (MetaCons "GetLabelDetectionResponse'" PrefixI True) ((S1 (MetaSel (Just "_gldrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_gldrsVideoMetadata") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe VideoMetadata)) :*: S1 (MetaSel (Just "_gldrsStatusMessage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_gldrsLabels") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [LabelDetection])) :*: (S1 (MetaSel (Just "_gldrsJobStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe VideoJobStatus)) :*: S1 (MetaSel (Just "_gldrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

gldrsNextToken :: Lens' GetLabelDetectionResponse (Maybe Text) Source #

If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of labels.

gldrsVideoMetadata :: Lens' GetLabelDetectionResponse (Maybe VideoMetadata) Source #

Information about a video that Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a Amazon Rekognition video operation.

gldrsStatusMessage :: Lens' GetLabelDetectionResponse (Maybe Text) Source #

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

gldrsLabels :: Lens' GetLabelDetectionResponse [LabelDetection] Source #

An array of labels detected in the video. Each element contains the detected label and the time, in milliseconds from the start of the video, that the label was detected.

gldrsJobStatus :: Lens' GetLabelDetectionResponse (Maybe VideoJobStatus) Source #

The current status of the label detection job.