Copyright | (c) 2013-2018 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 |
Language | Haskell2010 |
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
.
- getCelebrityRecognition :: Text -> GetCelebrityRecognition
- data GetCelebrityRecognition
- gcrNextToken :: Lens' GetCelebrityRecognition (Maybe Text)
- gcrMaxResults :: Lens' GetCelebrityRecognition (Maybe Natural)
- gcrSortBy :: Lens' GetCelebrityRecognition (Maybe CelebrityRecognitionSortBy)
- gcrJobId :: Lens' GetCelebrityRecognition Text
- getCelebrityRecognitionResponse :: Int -> GetCelebrityRecognitionResponse
- data GetCelebrityRecognitionResponse
- gcrrsNextToken :: Lens' GetCelebrityRecognitionResponse (Maybe Text)
- gcrrsVideoMetadata :: Lens' GetCelebrityRecognitionResponse (Maybe VideoMetadata)
- gcrrsStatusMessage :: Lens' GetCelebrityRecognitionResponse (Maybe Text)
- gcrrsCelebrities :: Lens' GetCelebrityRecognitionResponse [CelebrityRecognition]
- gcrrsJobStatus :: Lens' GetCelebrityRecognitionResponse (Maybe VideoJobStatus)
- gcrrsResponseStatus :: Lens' GetCelebrityRecognitionResponse Int
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 inCelebrities
field. SpecifyID
to sort by the celebrity identifier, specifyTIMESTAMP
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 toStartCelebrityRecognition
.
data GetCelebrityRecognition Source #
See: getCelebrityRecognition
smart constructor.
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.
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.
gcrrsResponseStatus :: Lens' GetCelebrityRecognitionResponse Int Source #
- - | The response status code.