start_media_analysis_job
¶
start_media_analysis_job(
operations_config: MediaAnalysisOperationsConfig,
input: MediaAnalysisInput,
output_config: MediaAnalysisOutputConfig,
*,
config_overrides: Optional[RekognitionClientConfig] = None,
client_request_token: Optional[ClientRequestToken] = None,
job_name: Optional[MediaAnalysisJobName] = None,
kms_key_id: Optional[KmsKeyId] = None,
) -> StartMediaAnalysisJobResponse
Service availability notice: Streaming Video and Bulk Image Analysis is no longer available to new customers. For more information, see Rekognition feature availability changes. This change does not impact the availability of other Amazon Rekognition features.
Initiates a new media analysis job. Accepts a manifest file in an Amazon S3 bucket. The output is a manifest file and a summary of the manifest stored in the Amazon S3 bucket.
Parameters:
-
client_request_token(Optional[ClientRequestToken], default:None) –Idempotency token used to prevent the accidental creation of duplicate versions. If you use the same token with multiple
StartMediaAnalysisJobRequestrequests, the same response is returned. UseClientRequestTokento prevent the same request from being processed more than once. -
job_name(Optional[MediaAnalysisJobName], default:None) –The name of the job. Does not have to be unique.
-
operations_config(MediaAnalysisOperationsConfig) –Configuration options for the media analysis job to be created.
-
input(MediaAnalysisInput) –Input data to be analyzed by the job.
-
output_config(MediaAnalysisOutputConfig) –The Amazon S3 bucket location to store the results.
-
kms_key_id(Optional[KmsKeyId], default:None) –The identifier of customer managed AWS KMS key (name or ARN). The key is used to encrypt images copied into the service. The key is also used to encrypt results and manifest files written to the output Amazon S3 bucket.
Raises:
-
AccessDeniedException–You are not authorized to perform the action.
-
IdempotentParameterMismatchException–A
ClientRequestTokeninput parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation. -
InternalServerError–Amazon Rekognition experienced a service issue. Try your call again.
-
InvalidManifestException–Indicates that a provided manifest file is empty or larger than the allowed limit.
-
InvalidParameterException–Input parameter violated a constraint. Validate your parameter before calling the API operation again.
-
InvalidS3ObjectException–Amazon Rekognition is unable to access the S3 object specified in the request.
-
LimitExceededException–An Amazon Rekognition service limit was exceeded. For example, if you start too many jobs concurrently, subsequent calls to start operations (ex:
StartLabelDetection) will raise aLimitExceededExceptionexception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit. -
ProvisionedThroughputExceededException–The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
-
ResourceNotFoundException–The resource specified in the request cannot be found.
-
ResourceNotReadyException–The requested resource isn't ready. For example, this exception occurs when you call
DetectCustomLabelswith a model version that isn't deployed. -
ThrottlingException–Amazon Rekognition is temporarily unable to process the request. Try your call again.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
StartMediaAnalysisJob Initiates a new media analysis job.
>>> client.start_media_analysis_job(job_name='job-name', operations_config={'DetectModerationLabels': {'MinConfidence': 50, 'ProjectVersion': 'arn:aws:rekognition:us-east-1:111122223333:project/my-project/version/1/1690556751958'}}, input={'S3Object': {'Bucket': 'input-bucket', 'Name': 'input-manifest.json'}}, output_config={'S3Bucket': 'output-bucket', 'S3KeyPrefix': 'output-location'})
Source code in docs_src/capo_rekognition/_services/rekognition.py
5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 | |