start_media_analysis_job
async
¶
start_media_analysis_job(
operations_config: MediaAnalysisOperationsConfig,
input: MediaAnalysisInput,
output_config: MediaAnalysisOutputConfig,
*,
config_overrides: Optional[AsyncRekognitionClientConfig] = 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.
>>> await 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/async_rekognition.py
5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 | |