StartMediaAnalysisJob
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.
Request Syntax
{
"ClientRequestToken": "string
",
"Input": {
"S3Object": {
"Bucket": "string
",
"Name": "string
",
"Version": "string
"
}
},
"JobName": "string
",
"KmsKeyId": "string
",
"OperationsConfig": {
"DetectModerationLabels": {
"MinConfidence": number
,
"ProjectVersion": "string
"
}
},
"OutputConfig": {
"S3Bucket": "string
",
"S3KeyPrefix": "string
"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- ClientRequestToken
-
Idempotency token used to prevent the accidental creation of duplicate versions. If you use the same token with multiple
StartMediaAnalysisJobRequest
requests, the same response is returned. UseClientRequestToken
to prevent the same request from being processed more than once.Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-zA-Z0-9-_]+$
Required: No
- Input
-
Input data to be analyzed by the job.
Type: MediaAnalysisInput object
Required: Yes
- JobName
-
The name of the job. Does not have to be unique.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-zA-Z0-9_.\-]+
Required: No
- KmsKeyId
-
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.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$
Required: No
- OperationsConfig
-
Configuration options for the media analysis job to be created.
Type: MediaAnalysisOperationsConfig object
Required: Yes
- OutputConfig
-
The Amazon S3 bucket location to store the results.
Type: MediaAnalysisOutputConfig object
Required: Yes
Response Syntax
{
"JobId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- JobId
-
Identifier for the created job.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
^[a-zA-Z0-9-_]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You are not authorized to perform the action.
HTTP Status Code: 400
- IdempotentParameterMismatchException
-
A
ClientRequestToken
input parameter was reused with an operation, but at least one of the other input parameters is different from the previous call to the operation.HTTP Status Code: 400
- InternalServerError
-
Amazon Rekognition experienced a service issue. Try your call again.
HTTP Status Code: 500
- InvalidManifestException
-
Indicates that a provided manifest file is empty or larger than the allowed limit.
HTTP Status Code: 400
- InvalidParameterException
-
Input parameter violated a constraint. Validate your parameter before calling the API operation again.
HTTP Status Code: 400
- InvalidS3ObjectException
-
Amazon Rekognition is unable to access the S3 object specified in the request.
HTTP Status Code: 400
- 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 aLimitExceededException
exception (HTTP status code: 400) until the number of concurrently running jobs is below the Amazon Rekognition service limit.HTTP Status Code: 400
- ProvisionedThroughputExceededException
-
The number of requests exceeded your throughput limit. If you want to increase this limit, contact Amazon Rekognition.
HTTP Status Code: 400
- ResourceNotFoundException
-
The resource specified in the request cannot be found.
HTTP Status Code: 400
- ResourceNotReadyException
-
The requested resource isn't ready. For example, this exception occurs when you call
DetectCustomLabels
with a model version that isn't deployed.HTTP Status Code: 400
- ThrottlingException
-
Amazon Rekognition is temporarily unable to process the request. Try your call again.
HTTP Status Code: 500
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: