Temukan akun layanan service-PROJECT_NUMBER@gcp-sa-transcoder. di konsol Google Cloud , dengan PROJECT_NUMBER adalah nomor project dari project tempat Anda mengaktifkan Transcoder API dan Anda berencana membuat feed.
Centang kotak Include Google-provided role grants.
Pastikan akun layanan mengaktifkan izin pubsub.topics.publish.
Pelaporan status tugas
Status tugas dilaporkan setelah tugas gagal atau berhasil selesai. Tidak ada perubahan status
lain yang dilaporkan. Status tugas dilaporkan menggunakan format pesan
JobResult:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Pub/Sub notifications for job updates\n\nThis page explains how to configure a Pub/Sub topic that you can use\nto receive job status updates from the Transcoder API.\n\nConfigure job status updates\n----------------------------\n\nTo receive job status updates, do the following:\n\n1. If you don't have an existing Pub/Sub topic, create a topic.\n To learn how to create a Pub/Sub topic, see\n [Managing topics and subscriptions](/pubsub/docs/admin).\n\n2. Make sure to configure the\n [`pubsubDestination`](/transcoder/docs/reference/rest/v1/JobConfig#FIELDS.pubsub_destination)\n field in the job configuration.\n\n {\n \"config\": {\n \"pubsubDestination\": {\n \"topic\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/topics/\u003cvar translate=\"no\"\u003emy-topic-id\u003c/var\u003e\"\n }\n }\n }\n\n3. [Create a job](/transcoder/docs/how-to/jobs) to enable the\n [Google-managed Transcoder service account](/iam/docs/service-account-types#google-managed).\n\n4. Find the\n `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-transcoder.iam.gserviceaccount.com`\n service account in the Google Cloud console, where\n \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e is the project number of the project you enabled\n the Transcoder API in and you plan to create the feed from.\n\n 1. In the Google Cloud console, go to the **IAM** page.\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam/project)\n 2. Select the **Include Google-provided role grants** checkbox.\n\n5. Make sure the service account has the `pubsub.topics.publish` permission\n enabled.\n\nJob status reporting\n--------------------\n\nJob status is reported once the job fails or finishes successfully. No other\nstate changes are reported. Job status is reported using the `JobResult` message\nformat: \n\n Resource PubSubMessage\n {\n job: {\n object (JobResult)\n }\n }\n\n JobResult\n {\n name: string;\n state: string;\n error: {\n object (Status)\n }\n }\n\nFor more information, refer to the following:\n\n- [Job state](/transcoder/docs/reference/rest/v1/projects.locations.jobs#processingstate)\n- [Job status](/transcoder/docs/reference/rest/v1/projects.locations.jobs#status)\n- [Troubleshooting job errors](/transcoder/docs/troubleshooting)"]]