I have a dataflow job created from the custom template and trying to set up schedule using Google Cloud Scheduler.
These are my execution configurations: Target type : HTTP
URL : https://dataflow.googleapis.com/v1b3/projects//locations//templates:launch?gcsPath=xyz
HTTP Method: POST
HTTP Headers: Content-Type : application/json User-Agent : Google-Cloud-Scheduler
Body: {}
Auth Header : Add OAUTH Token
Service Account : newly created one with Cloud Scheduler Admin, Dataflow Admin, Cloud Functions Invoker
Scope: https://dataflow.googleapis.com/v1b3/projects//locations//templates:launch
I am encountering below error :
{ "insertId": "1e7pitfe7pugf", "jsonPayload": { "targetType": "HTTP", "status": "INVALID_ARGUMENT", "@type": "type.googleapis.com/google.cloud.scheduler.logging.AttemptFinished", "jobName": "projects//locations/us-central1/jobs/my-job", "url": "https://dataflow.googleapis.com/v1b3/projects//locations/us-central1/templates:launch?gcsPath=gs://xyz" }, "httpRequest": {}, "resource": { "type": "cloud_scheduler_job", "labels": { "location": "us-central1", "job_id": "my-job", "project_id": "" } }, "timestamp": "2024-02-27T06:16:00.506128456Z", "severity": "ERROR", "logName": "projects//logs/cloudscheduler.googleapis.com%2Fexecutions", "receiveTimestamp": "2024-02-27T06:16:00.506128456Z" }
When I tried to use OIDC token, I get UNATHENTICATED error
Can someone please help me on this? Thanks in advance
- I tried putting base64 encode of action in the message body, resulted in the same error
- I tried by creating new Service Account with different permission access - same error
- Found on stackoverflow that disabling and re-enabling Cloud Scheduler API helped someone, dint work for me
- tried by using target type as pubsub and created the pubsub topic - same error