This page explains how to configure a Pub/Sub topic that you can use to receive job status updates from the Transcoder API.
Configure job status updates
To receive job status updates, do the following:
If you don't have an existing Pub/Sub topic, create a topic. To learn how to create a Pub/Sub topic, see Managing topics and subscriptions.
Make sure to configure the
pubsubDestination
field in the job configuration.{ "config": { "pubsubDestination": { "topic": "projects/PROJECT_ID/topics/my-topic-id" } } }
Create a job to enable the Google-managed Transcoder service account.
Find the
service-PROJECT_NUMBER@gcp-sa-transcoder.iam.gserviceaccount.com
service account in the Google Cloud console, where PROJECT_NUMBER is the project number of the project you enabled the Transcoder API in and you plan to create the feed from.In the Google Cloud console, go to the IAM page.
Select the Include Google-provided role grants checkbox.
Make sure the service account has the
pubsub.topics.publish
permission enabled.
Job status reporting
Job status is reported once the job fails or finishes successfully. No other
state changes are reported. Job status is reported using the JobResult
message
format:
Resource PubSubMessage
{
job: {
object (JobResult)
}
}
JobResult
{
name: string;
state: string;
error: {
object (Status)
}
}
For more information, refer to the following: