| 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 |
Network.AWS.Rekognition.GetContentModeration
Description
Gets the content moderation analysis results for a Rekognition Video analysis started by .
Content moderation analysis of a video is an asynchronous operation. You start analysis by calling . which returns a job identifier (JobId ). When analysis finishes, Rekognition Video publishes a completion status to the Amazon Simple Notification Service topic registered in the initial call to StartContentModeration . To get the results of the content moderation 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 .
GetContentModeration returns detected content moderation labels, and the time they are detected, in an array, ModerationLabels , of objects.
By default, the moderated labels are returned sorted by time, in milliseconds from the start of the video. You can also sort them by moderated label by specifying NAME for the SortBy input parameter.
Since video analysis can return a large number of results, use the MaxResults parameter to limit the number of labels returned in a single call to GetContentModeration . 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 GetContentModeration and populate the NextToken request parameter with the value of NextToken returned from the previous call to GetContentModeration .
For more information, see moderation .
Synopsis
- getContentModeration :: Text -> GetContentModeration
- data GetContentModeration
- gcmNextToken :: Lens' GetContentModeration (Maybe Text)
- gcmMaxResults :: Lens' GetContentModeration (Maybe Natural)
- gcmSortBy :: Lens' GetContentModeration (Maybe ContentModerationSortBy)
- gcmJobId :: Lens' GetContentModeration Text
- getContentModerationResponse :: Int -> GetContentModerationResponse
- data GetContentModerationResponse
- gcmrsNextToken :: Lens' GetContentModerationResponse (Maybe Text)
- gcmrsVideoMetadata :: Lens' GetContentModerationResponse (Maybe VideoMetadata)
- gcmrsStatusMessage :: Lens' GetContentModerationResponse (Maybe Text)
- gcmrsJobStatus :: Lens' GetContentModerationResponse (Maybe VideoJobStatus)
- gcmrsModerationLabels :: Lens' GetContentModerationResponse [ContentModerationDetection]
- gcmrsResponseStatus :: Lens' GetContentModerationResponse Int
Creating a Request
Arguments
| :: Text | |
| -> GetContentModeration |
Creates a value of GetContentModeration with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gcmNextToken- If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of content moderation labels.gcmMaxResults- 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.gcmSortBy- Sort to use for elements in theModerationLabelDetectionsarray. UseTIMESTAMPto sort array elements by the time labels are detected. UseNAMEto alphabetically group elements for a label together. Within each label group, the array element are sorted by detection confidence. The default sort is byTIMESTAMP.gcmJobId- The identifier for the content moderation job. UseJobIdto identify the job in a subsequent call toGetContentModeration.
data GetContentModeration Source #
See: getContentModeration smart constructor.
Instances
Request Lenses
gcmNextToken :: Lens' GetContentModeration (Maybe Text) Source #
If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition returns a pagination token in the response. You can use this pagination token to retrieve the next set of content moderation labels.
gcmMaxResults :: Lens' GetContentModeration (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.
gcmSortBy :: Lens' GetContentModeration (Maybe ContentModerationSortBy) Source #
Sort to use for elements in the ModerationLabelDetections 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 .
gcmJobId :: Lens' GetContentModeration Text Source #
The identifier for the content moderation job. Use JobId to identify the job in a subsequent call to GetContentModeration .
Destructuring the Response
getContentModerationResponse Source #
Arguments
| :: Int | |
| -> GetContentModerationResponse |
Creates a value of GetContentModerationResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gcmrsNextToken- If the response is truncated, Rekognition Video returns this token that you can use in the subsequent request to retrieve the next set of moderation labels.gcmrsVideoMetadata- Information about a video that Amazon Rekognition analyzed.Videometadatais returned in every page of paginated responses fromGetContentModeration.gcmrsStatusMessage- If the job fails,StatusMessageprovides a descriptive error message.gcmrsJobStatus- The current status of the content moderation job.gcmrsModerationLabels- The detected moderation labels and the time(s) they were detected.gcmrsResponseStatus- -- | The response status code.
data GetContentModerationResponse Source #
See: getContentModerationResponse smart constructor.
Instances
Response Lenses
gcmrsNextToken :: Lens' GetContentModerationResponse (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 moderation labels.
gcmrsVideoMetadata :: Lens' GetContentModerationResponse (Maybe VideoMetadata) Source #
Information about a video that Amazon Rekognition analyzed. Videometadata is returned in every page of paginated responses from GetContentModeration .
gcmrsStatusMessage :: Lens' GetContentModerationResponse (Maybe Text) Source #
If the job fails, StatusMessage provides a descriptive error message.
gcmrsJobStatus :: Lens' GetContentModerationResponse (Maybe VideoJobStatus) Source #
The current status of the content moderation job.
gcmrsModerationLabels :: Lens' GetContentModerationResponse [ContentModerationDetection] Source #
The detected moderation labels and the time(s) they were detected.
gcmrsResponseStatus :: Lens' GetContentModerationResponse Int Source #
- - | The response status code.