REST Resource: projects.locations.jobs

Resource: Job

Transcoding job resource.

JSON representation
{
  "name": string,
  "inputUri": string,
  "outputUri": string,
  "state": enum (ProcessingState),
  "createTime": string,
  "startTime": string,
  "endTime": string,
  "ttlAfterCompletionDays": integer,
  "error": {
    object (Status)
  },

  // Union field job_config can be only one of the following:
  "templateId": string,
  "config": {
    object (JobConfig)
  }
  // End of list of possible types for union field job_config.
}
Fields
name

string

The resource name of the job. Format: projects/{project_number}/locations/{location}/jobs/{job}

inputUri

string

Input only. Specify the inputUri 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).

outputUri

string

Input only. Specify the outputUri 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/.

state

enum (ProcessingState)

Output only. The current state of the job.

createTime

string (Timestamp format)

Output only. The time the job was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

startTime

string (Timestamp format)

Output only. The time the transcoding started.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Output only. The time the transcoding finished.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

ttlAfterCompletionDays

integer

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.

error

object (Status)

Output only. An error object that describes the reason for the failure. This property is always present when state is FAILED.

Union field job_config. Specify the job_config for the transcoding job. If you don't specify the job_config, the API selects templateId; this template ID is set to preset/web-hd by default. When you use a template_id to create a job, the Job.config is populated by the JobTemplate.config.
job_config can be only one of the following:
templateId

string

Input only. Specify the templateId to use for populating Job.config. The default is preset/web-hd.

Preset Transcoder templates: - preset/{preset_id}

  • User defined JobTemplate: {jobTemplateId}
config

object (JobConfig)

The configuration for this job.

ProcessingState

The current state of the job.

Enums
PROCESSING_STATE_UNSPECIFIED The processing state is not specified.
PENDING The job is enqueued and will be picked up for processing soon.
RUNNING The job is being processed.
SUCCEEDED The job has been completed successfully.
FAILED The job has failed. For additional information, see failureReason and failureDetails

Status

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the API Design Guide.

JSON representation
{
  "code": integer,
  "message": string,
  "details": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ]
}
Fields
code

integer

The status code, which should be an enum value of google.rpc.Code.

message

string

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.

details[]

object

A list of messages that carry the error details. There is a common set of message types for APIs to use.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

Methods

create

Creates a job in the specified region.

delete

Deletes a job.

get

Returns the job data.

list

Lists jobs in the specified region.