diff --git a/cloud-tasks/createHttpTask.js b/cloud-tasks/createHttpTask.js index a991811187..8e5a1ec9d5 100644 --- a/cloud-tasks/createHttpTask.js +++ b/cloud-tasks/createHttpTask.js @@ -70,7 +70,7 @@ function main( // Send create task request. console.log('Sending task:'); console.log(task); - const request = {parent, task}; + const request = {parent: parent, task: task}; const [response] = await client.createTask(request); console.log(`Created task ${response.name}`); } diff --git a/cloud-tasks/createHttpTaskWithToken.js b/cloud-tasks/createHttpTaskWithToken.js index 804509a355..bffe6d87ae 100644 --- a/cloud-tasks/createHttpTaskWithToken.js +++ b/cloud-tasks/createHttpTaskWithToken.js @@ -66,7 +66,7 @@ function main( console.log('Sending task:'); console.log(task); // Send create task request. - const request = {parent, task}; + const request = {parent: parent, task: task}; const [response] = await client.createTask(request); const name = response.name; console.log(`Created task ${name}`); diff --git a/cloud-tasks/createTask.js b/cloud-tasks/createTask.js index 2f191b5869..95c3b9f5ae 100644 --- a/cloud-tasks/createTask.js +++ b/cloud-tasks/createTask.js @@ -67,7 +67,7 @@ function main( console.log('Sending task:'); console.log(task); // Send create task request. - const request = {parent, task}; + const request = {parent: parent, task: task}; const [response] = await client.createTask(request); const name = response.name; console.log(`Created task ${name}`);