CreateJob
Creates a job. A job is a set of instructions that Deadline Cloud uses to schedule and run work on available workers. For more information, see Deadline Cloud jobs.
Request Syntax
POST /2023-10-12/farms/farmId
/queues/queueId
/jobs HTTP/1.1
X-Amz-Client-Token: clientToken
Content-type: application/json
{
"attachments": {
"fileSystem": "string
",
"manifests": [
{
"fileSystemLocationName": "string
",
"inputManifestHash": "string
",
"inputManifestPath": "string
",
"outputRelativeDirectories": [ "string
" ],
"rootPath": "string
",
"rootPathFormat": "string
"
}
]
},
"maxFailedTasksCount": number
,
"maxRetriesPerTask": number
,
"maxWorkerCount": number
,
"parameters": {
"string
" : { ... }
},
"priority": number
,
"sourceJobId": "string
",
"storageProfileId": "string
",
"targetTaskRunStatus": "string
",
"template": "string
",
"templateType": "string
"
}
URI Request Parameters
The request uses the following URI parameters.
- clientToken
-
The unique token which the server uses to recognize retries of the same request.
Length Constraints: Minimum length of 1. Maximum length of 64.
- farmId
-
The farm ID of the farm to connect to the job.
Pattern:
farm-[0-9a-f]{32}
Required: Yes
- queueId
-
The ID of the queue that the job is submitted to.
Pattern:
queue-[0-9a-f]{32}
Required: Yes
Request Body
The request accepts the following data in JSON format.
- attachments
-
The attachments for the job. Attach files required for the job to run to a render job.
Type: Attachments object
Required: No
- maxFailedTasksCount
-
The number of task failures before the job stops running and is marked as
FAILED
.Type: Integer
Valid Range: Minimum value of 0. Maximum value of 2147483647.
Required: No
- maxRetriesPerTask
-
The maximum number of retries for each task.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 2147483647.
Required: No
- maxWorkerCount
-
The maximum number of worker hosts that can concurrently process a job. When the
maxWorkerCount
is reached, no more workers will be assigned to process the job, even if the fleets assigned to the job's queue has available workers.You can't set the
maxWorkerCount
to 0. If you set it to -1, there is no maximum number of workers.If you don't specify the
maxWorkerCount
, Deadline Cloud won't throttle the number of workers used to process the job.Type: Integer
Valid Range: Minimum value of -1. Maximum value of 2147483647.
Required: No
- parameters
-
The parameters for the job.
Type: String to JobParameter object map
Required: No
- priority
-
The priority of the job on a scale of 0 to 100. The highest priority (first scheduled) is 100. When two jobs have the same priority, the oldest job is scheduled first.
Type: Integer
Valid Range: Minimum value of 0. Maximum value of 100.
Required: Yes
- sourceJobId
-
The job ID for the source job.
Type: String
Pattern:
job-[0-9a-f]{32}
Required: No
- storageProfileId
-
The storage profile ID for the storage profile to connect to the job.
Type: String
Pattern:
sp-[0-9a-f]{32}
Required: No
- targetTaskRunStatus
-
The initial job status when it is created. Jobs that are created with a
SUSPENDED
status will not run until manually requeued.Type: String
Valid Values:
READY | SUSPENDED
Required: No
- template
-
The job template to use for this job.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 300000.
Required: No
- templateType
-
The file type for the job template.
Type: String
Valid Values:
JSON | YAML
Required: No
Response Syntax
HTTP/1.1 201
Content-type: application/json
{
"jobId": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 201 response.
The following data is returned in JSON format by the service.
- jobId
-
The job ID.
Type: String
Pattern:
job-[0-9a-f]{32}
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You don't have permission to perform the action.
HTTP Status Code: 403
- InternalServerErrorException
-
Deadline Cloud can't process your request right now. Try again later.
HTTP Status Code: 500
- ResourceNotFoundException
-
The requested resource can't be found.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
You exceeded your service quota. Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account.
HTTP Status Code: 402
- ThrottlingException
-
Your request exceeded a request rate quota.
HTTP Status Code: 429
- ValidationException
-
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: