jobs
Creates, updates, deletes, gets or lists a jobs
resource.
Overview
Name | jobs |
Type | Resource |
Id | google.transcoder.jobs |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the job. Format: projects/{project_number}/locations/{location}/jobs/{job} |
batchModePriority | integer (int32) | The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job. |
config | object | The configuration for this job. (id: JobConfig) |
createTime | string (google-datetime) | Output only. The time the job was created. |
endTime | string (google-datetime) | Output only. The time the transcoding finished. |
error | object | Output only. An error object that describes the reason for the failure. This property is always present when ProcessingState is FAILED . (id: Status) |
fillContentGaps | boolean | Optional. Insert silence and duplicate frames when timestamp gaps are detected in a given stream. |
inputUri | string | Input only. Specify the input_uri to populate empty uri fields in each element of Job.config.inputs or JobTemplate.config.inputs when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, gs://bucket/inputs/file.mp4 ). See Supported input and output formats. |
labels | object | The labels associated with this job. You can use these to organize and group your jobs. |
mode | string | The processing mode of the job. The default is PROCESSING_MODE_INTERACTIVE . |
optimization | string | Optional. The optimization strategy of the job. The default is AUTODETECT . |
outputUri | string | Input only. Specify the output_uri to populate an empty Job.config.output.uri or JobTemplate.config.output.uri when using template. URI for the output file(s). For example, gs://my-bucket/outputs/ . See Supported input and output formats. |
startTime | string (google-datetime) | Output only. The time the transcoding started. |
state | string | Output only. The current state of the job. |
templateId | string | Input only. Specify the template_id to use for populating Job.config . The default is preset/web-hd , which is the only supported preset. User defined JobTemplate: {job_template_id} |
ttlAfterCompletionDays | integer (int32) | Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the job. Format: projects/{project_number}/locations/{location}/jobs/{job} |
batchModePriority | integer (int32) | The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job. |
config | object | The configuration for this job. (id: JobConfig) |
createTime | string (google-datetime) | Output only. The time the job was created. |
endTime | string (google-datetime) | Output only. The time the transcoding finished. |
error | object | Output only. An error object that describes the reason for the failure. This property is always present when ProcessingState is FAILED . (id: Status) |
fillContentGaps | boolean | Optional. Insert silence and duplicate frames when timestamp gaps are detected in a given stream. |
inputUri | string | Input only. Specify the input_uri to populate empty uri fields in each element of Job.config.inputs or JobTemplate.config.inputs when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, gs://bucket/inputs/file.mp4 ). See Supported input and output formats. |
labels | object | The labels associated with this job. You can use these to organize and group your jobs. |
mode | string | The processing mode of the job. The default is PROCESSING_MODE_INTERACTIVE . |
optimization | string | Optional. The optimization strategy of the job. The default is AUTODETECT . |
outputUri | string | Input only. Specify the output_uri to populate an empty Job.config.output.uri or JobTemplate.config.output.uri when using template. URI for the output file(s). For example, gs://my-bucket/outputs/ . See Supported input and output formats. |
startTime | string (google-datetime) | Output only. The time the transcoding started. |
state | string | Output only. The current state of the job. |
templateId | string | Input only. Specify the template_id to use for populating Job.config . The default is preset/web-hd , which is the only supported preset. User defined JobTemplate: {job_template_id} |
ttlAfterCompletionDays | integer (int32) | Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , jobsId | Returns the job data. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists jobs in the specified region. |
create | insert | projectsId , locationsId | Creates a job in the specified region. | |
delete | delete | projectsId , locationsId , jobsId | allowMissing | Deletes a job. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
jobsId | string | |
locationsId | string | |
projectsId | string | |
allowMissing | boolean | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string |
SELECT
examples
- get
- list
Returns the job data.
SELECT
name,
batchModePriority,
config,
createTime,
endTime,
error,
fillContentGaps,
inputUri,
labels,
mode,
optimization,
outputUri,
startTime,
state,
templateId,
ttlAfterCompletionDays
FROM google.transcoder.jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND jobsId = '{{ jobsId }}' -- required;
Lists jobs in the specified region.
SELECT
name,
batchModePriority,
config,
createTime,
endTime,
error,
fillContentGaps,
inputUri,
labels,
mode,
optimization,
outputUri,
startTime,
state,
templateId,
ttlAfterCompletionDays
FROM google.transcoder.jobs
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a job in the specified region.
INSERT INTO google.transcoder.jobs (
data__name,
data__inputUri,
data__outputUri,
data__templateId,
data__config,
data__ttlAfterCompletionDays,
data__labels,
data__mode,
data__batchModePriority,
data__optimization,
data__fillContentGaps,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ inputUri }}',
'{{ outputUri }}',
'{{ templateId }}',
'{{ config }}',
{{ ttlAfterCompletionDays }},
'{{ labels }}',
'{{ mode }}',
{{ batchModePriority }},
'{{ optimization }}',
{{ fillContentGaps }},
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
batchModePriority,
config,
createTime,
endTime,
error,
fillContentGaps,
inputUri,
labels,
mode,
optimization,
outputUri,
startTime,
state,
templateId,
ttlAfterCompletionDays
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: projectsId
value: string
description: Required parameter for the jobs resource.
- name: locationsId
value: string
description: Required parameter for the jobs resource.
- name: name
value: string
description: >
The resource name of the job. Format: `projects/{project_number}/locations/{location}/jobs/{job}`
- name: inputUri
value: string
description: >
Input only. Specify the `input_uri` to populate empty `uri` fields in each element of `Job.config.inputs` or `JobTemplate.config.inputs` when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
- name: outputUri
value: string
description: >
Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or `JobTemplate.config.output.uri` when using template. URI for the output file(s). For example, `gs://my-bucket/outputs/`. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).
- name: templateId
value: string
description: >
Input only. Specify the `template_id` to use for populating `Job.config`. The default is `preset/web-hd`, which is the only supported preset. User defined JobTemplate: `{job_template_id}`
- name: config
value: object
description: >
The configuration for this job.
- name: ttlAfterCompletionDays
value: integer
description: >
Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30.
- name: labels
value: object
description: >
The labels associated with this job. You can use these to organize and group your jobs.
- name: mode
value: string
description: >
The processing mode of the job. The default is `PROCESSING_MODE_INTERACTIVE`.
valid_values: ['PROCESSING_MODE_UNSPECIFIED', 'PROCESSING_MODE_INTERACTIVE', 'PROCESSING_MODE_BATCH']
- name: batchModePriority
value: integer
description: >
The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job.
- name: optimization
value: string
description: >
Optional. The optimization strategy of the job. The default is `AUTODETECT`.
valid_values: ['OPTIMIZATION_STRATEGY_UNSPECIFIED', 'AUTODETECT', 'DISABLED']
- name: fillContentGaps
value: boolean
description: >
Optional. Insert silence and duplicate frames when timestamp gaps are detected in a given stream.
DELETE
examples
- delete
Deletes a job.
DELETE FROM google.transcoder.jobs
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND jobsId = '{{ jobsId }}' --required
AND allowMissing = '{{ allowMissing }}';