amazonka-rekognition-1.6.0: 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.GetCelebrityRecognition

Contents

Description

Gets the celebrity recognition results for a Rekognition Video analysis started by .

Celebrity recognition in a video is an asynchronous operation. Analysis is started by a call to which returns a job identifier (JobId ). When the celebrity recognition operation finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartCelebrityRecognition . To get the results of the celebrity recognition analysis, first check that the status value published to the Amazon SNS topic is SUCCEEDED . If so, call GetCelebrityDetection and pass the job identifier (JobId ) from the initial call to StartCelebrityDetection . For more information, see video .

GetCelebrityRecognition returns detected celebrities and the time(s) they are detected in an array (Celebrities ) of objects. Each CelebrityRecognition contains information about the celebrity in a object and the time, Timestamp , the celebrity was detected.

By default, the Celebrities array is sorted by time (milliseconds from the start of the video). You can also sort the array by celebrity by specifying the value ID in the SortBy input parameter.

The CelebrityDetail object includes the celebrity identifer and additional information urls. If you don't store the additional information urls, you can get them later by calling with the celebrity identifer.

No information is returned for faces not recognized as celebrities.

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

Synopsis

Creating a Request

getCelebrityRecognition Source #

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

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

  • gcrNextToken - If the previous response was incomplete (because there is more recognized celebrities to retrieve), Rekognition Video returns a pagination token in the response. You can use this pagination token to retrieve the next set of celebrities.
  • gcrMaxResults - 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.
  • gcrSortBy - Sort to use for celebrities returned in Celebrities field. Specify ID to sort by the celebrity identifier, specify TIMESTAMP to sort by the time the celebrity was recognized.
  • gcrJobId - Job identifier for the required celebrity recognition analysis. You can get the job identifer from a call to StartCelebrityRecognition .

data GetCelebrityRecognition Source #

See: getCelebrityRecognition smart constructor.

Instances

Eq GetCelebrityRecognition Source # 
Data GetCelebrityRecognition Source # 

Methods

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

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

toConstr :: GetCelebrityRecognition -> Constr #

dataTypeOf :: GetCelebrityRecognition -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetCelebrityRecognition Source # 
Show GetCelebrityRecognition Source # 
Generic GetCelebrityRecognition Source # 
Hashable GetCelebrityRecognition Source # 
ToJSON GetCelebrityRecognition Source # 
NFData GetCelebrityRecognition Source # 

Methods

rnf :: GetCelebrityRecognition -> () #

AWSRequest GetCelebrityRecognition Source # 
ToHeaders GetCelebrityRecognition Source # 
ToPath GetCelebrityRecognition Source # 
ToQuery GetCelebrityRecognition Source # 
type Rep GetCelebrityRecognition Source # 
type Rep GetCelebrityRecognition = D1 * (MetaData "GetCelebrityRecognition" "Network.AWS.Rekognition.GetCelebrityRecognition" "amazonka-rekognition-1.6.0-3jgXZy5HWud2mYhTRx5OTT" False) (C1 * (MetaCons "GetCelebrityRecognition'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_gcrMaxResults") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Nat)))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrSortBy") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe CelebrityRecognitionSortBy))) (S1 * (MetaSel (Just Symbol "_gcrJobId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)))))
type Rs GetCelebrityRecognition Source # 

Request Lenses

gcrNextToken :: Lens' GetCelebrityRecognition (Maybe Text) Source #

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

gcrMaxResults :: Lens' GetCelebrityRecognition (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.

gcrSortBy :: Lens' GetCelebrityRecognition (Maybe CelebrityRecognitionSortBy) Source #

Sort to use for celebrities returned in Celebrities field. Specify ID to sort by the celebrity identifier, specify TIMESTAMP to sort by the time the celebrity was recognized.

gcrJobId :: Lens' GetCelebrityRecognition Text Source #

Job identifier for the required celebrity recognition analysis. You can get the job identifer from a call to StartCelebrityRecognition .

Destructuring the Response

getCelebrityRecognitionResponse Source #

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

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

  • gcrrsNextToken - If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of celebrities.
  • gcrrsVideoMetadata - Information about a video that Rekognition Video analyzed. Videometadata is returned in every page of paginated responses from a Rekognition Video operation.
  • gcrrsStatusMessage - If the job fails, StatusMessage provides a descriptive error message.
  • gcrrsCelebrities - Array of celebrities recognized in the video.
  • gcrrsJobStatus - The current status of the celebrity recognition job.
  • gcrrsResponseStatus - -- | The response status code.

data GetCelebrityRecognitionResponse Source #

See: getCelebrityRecognitionResponse smart constructor.

Instances

Eq GetCelebrityRecognitionResponse Source # 
Data GetCelebrityRecognitionResponse Source # 

Methods

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

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

toConstr :: GetCelebrityRecognitionResponse -> Constr #

dataTypeOf :: GetCelebrityRecognitionResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read GetCelebrityRecognitionResponse Source # 
Show GetCelebrityRecognitionResponse Source # 
Generic GetCelebrityRecognitionResponse Source # 
NFData GetCelebrityRecognitionResponse Source # 
type Rep GetCelebrityRecognitionResponse Source # 
type Rep GetCelebrityRecognitionResponse = D1 * (MetaData "GetCelebrityRecognitionResponse" "Network.AWS.Rekognition.GetCelebrityRecognition" "amazonka-rekognition-1.6.0-3jgXZy5HWud2mYhTRx5OTT" False) (C1 * (MetaCons "GetCelebrityRecognitionResponse'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrrsNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrrsVideoMetadata") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe VideoMetadata))) (S1 * (MetaSel (Just Symbol "_gcrrsStatusMessage") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrrsCelebrities") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe [CelebrityRecognition]))) ((:*:) * (S1 * (MetaSel (Just Symbol "_gcrrsJobStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe VideoJobStatus))) (S1 * (MetaSel (Just Symbol "_gcrrsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Int))))))

Response Lenses

gcrrsNextToken :: Lens' GetCelebrityRecognitionResponse (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 celebrities.

gcrrsVideoMetadata :: Lens' GetCelebrityRecognitionResponse (Maybe VideoMetadata) Source #

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

gcrrsStatusMessage :: Lens' GetCelebrityRecognitionResponse (Maybe Text) Source #

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

gcrrsCelebrities :: Lens' GetCelebrityRecognitionResponse [CelebrityRecognition] Source #

Array of celebrities recognized in the video.

gcrrsJobStatus :: Lens' GetCelebrityRecognitionResponse (Maybe VideoJobStatus) Source #

The current status of the celebrity recognition job.