Rekognition / Client / get_media_analysis_job

get_media_analysis_job#

Rekognition.Client.get_media_analysis_job(**kwargs)#

Retrieves the results for a given media analysis job. Takes a JobId returned by StartMediaAnalysisJob.

See also: AWS API Documentation

Request Syntax

response = client.get_media_analysis_job(
    JobId='string'
)
Parameters:

JobId (string) –

[REQUIRED]

Unique identifier for the media analysis job for which you want to retrieve results.

Return type:

dict

Returns:

Response Syntax

{
    'JobId': 'string',
    'JobName': 'string',
    'OperationsConfig': {
        'DetectModerationLabels': {
            'MinConfidence': ...,
            'ProjectVersion': 'string'
        }
    },
    'Status': 'CREATED'|'QUEUED'|'IN_PROGRESS'|'SUCCEEDED'|'FAILED',
    'FailureDetails': {
        'Code': 'INTERNAL_ERROR'|'INVALID_S3_OBJECT'|'INVALID_MANIFEST'|'INVALID_OUTPUT_CONFIG'|'INVALID_KMS_KEY'|'ACCESS_DENIED'|'RESOURCE_NOT_FOUND'|'RESOURCE_NOT_READY'|'THROTTLED',
        'Message': 'string'
    },
    'CreationTimestamp': datetime(2015, 1, 1),
    'CompletionTimestamp': datetime(2015, 1, 1),
    'Input': {
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    },
    'OutputConfig': {
        'S3Bucket': 'string',
        'S3KeyPrefix': 'string'
    },
    'KmsKeyId': 'string',
    'Results': {
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        },
        'ModelVersions': {
            'Moderation': 'string'
        }
    },
    'ManifestSummary': {
        'S3Object': {
            'Bucket': 'string',
            'Name': 'string',
            'Version': 'string'
        }
    }
}

Response Structure

  • (dict) –

    • JobId (string) –

      The identifier for the media analysis job.

    • JobName (string) –

      The name of the media analysis job.

    • OperationsConfig (dict) –

      Operation configurations that were provided during job creation.

      • DetectModerationLabels (dict) –

        Contains configuration options for a DetectModerationLabels job.

        • MinConfidence (float) –

          Specifies the minimum confidence level for the moderation labels to return. Amazon Rekognition doesn’t return any labels with a confidence level lower than this specified value.

        • ProjectVersion (string) –

          Specifies the custom moderation model to be used during the label detection job. If not provided the pre-trained model is used.

    • Status (string) –

      The current status of the media analysis job.

    • FailureDetails (dict) –

      Details about the error that resulted in failure of the job.

      • Code (string) –

        Error code for the failed job.

      • Message (string) –

        Human readable error message.

    • CreationTimestamp (datetime) –

      The Unix date and time when the job was started.

    • CompletionTimestamp (datetime) –

      The Unix date and time when the job finished.

    • Input (dict) –

      Reference to the input manifest that was provided in the job creation request.

      • S3Object (dict) –

        Provides the S3 bucket name and object name.

        The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.

        For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see How Amazon Rekognition works with IAM in the Amazon Rekognition Developer Guide.

        • Bucket (string) –

          Name of the S3 bucket.

        • Name (string) –

          S3 object key name.

        • Version (string) –

          If the bucket is versioning enabled, you can specify the object version.

    • OutputConfig (dict) –

      Output configuration that was provided in the creation request.

      • S3Bucket (string) –

        Specifies the Amazon S3 bucket to contain the output of the media analysis job.

      • S3KeyPrefix (string) –

        Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated for storage.

    • KmsKeyId (string) –

      KMS Key that was provided in the creation request.

    • Results (dict) –

      Output manifest that contains prediction results.

      • S3Object (dict) –

        Provides the S3 bucket name and object name.

        The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.

        For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see How Amazon Rekognition works with IAM in the Amazon Rekognition Developer Guide.

        • Bucket (string) –

          Name of the S3 bucket.

        • Name (string) –

          S3 object key name.

        • Version (string) –

          If the bucket is versioning enabled, you can specify the object version.

      • ModelVersions (dict) –

        Information about the model versions for the features selected in a given job.

        • Moderation (string) –

          The Moderation base model version.

    • ManifestSummary (dict) –

      The summary manifest provides statistics on input manifest and errors identified in the input manifest.

      • S3Object (dict) –

        Provides the S3 bucket name and object name.

        The region for the S3 bucket containing the S3 object must match the region you use for Amazon Rekognition operations.

        For Amazon Rekognition to process an S3 object, the user must have permission to access the S3 object. For more information, see How Amazon Rekognition works with IAM in the Amazon Rekognition Developer Guide.

        • Bucket (string) –

          Name of the S3 bucket.

        • Name (string) –

          S3 object key name.

        • Version (string) –

          If the bucket is versioning enabled, you can specify the object version.

Exceptions