(projectId, location, templateId)
| 16 | 'use strict'; |
| 17 | |
| 18 | function main(projectId, location, templateId) { |
| 19 | // [START transcoder_delete_job_template] |
| 20 | /** |
| 21 | * TODO(developer): Uncomment these variables before running the sample. |
| 22 | */ |
| 23 | // projectId = 'my-project-id'; |
| 24 | // location = 'us-central1'; |
| 25 | // templateId = 'my-job-template'; |
| 26 | |
| 27 | // Imports the Transcoder library |
| 28 | const {TranscoderServiceClient} = |
| 29 | require('@google-cloud/video-transcoder').v1; |
| 30 | |
| 31 | // Instantiates a client |
| 32 | const transcoderServiceClient = new TranscoderServiceClient(); |
| 33 | |
| 34 | async function deleteJobTemplate() { |
| 35 | // Construct request |
| 36 | const request = { |
| 37 | name: transcoderServiceClient.jobTemplatePath( |
| 38 | projectId, |
| 39 | location, |
| 40 | templateId |
| 41 | ), |
| 42 | }; |
| 43 | await transcoderServiceClient.deleteJobTemplate(request); |
| 44 | console.log('Deleted job template'); |
| 45 | } |
| 46 | |
| 47 | deleteJobTemplate(); |
| 48 | // [END transcoder_delete_job_template] |
| 49 | } |
| 50 | |
| 51 | // node deleteJobTemplate.js <projectId> <location> <templateId> |
| 52 | process.on('unhandledRejection', err => { |
no test coverage detected