Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.
This repository was archived by the owner on Jul 13, 2023. It is now read-only.

How can we update cloud scheduler job httpTarget? #370

@askdhyan

Description

@askdhyan

My code:

 job: {
            name: client.jobPath(process.env.GCP_PROJECT, process.env.FUNCTION_REGION, req.body.name),
            description: 'dhyan edited',
            schedule: req.body.schedule,
            retryConfig: {
                retryCount: Number(process.env.JOB_RETRY_MAX)
            },
            httpTarget: {
                uri: req.body.httpTarget.uri,
                httpMethod: req.body.httpTarget.httpMethod || 'POST',
                headers: req.body.httpTarget.headers ? { ...req.body.httpTarget.headers } : undefined,
                body: req.body.httpTarget.body ? Buffer.from(JSON.stringify(req.body.httpTarget.body)).toString('base64') : undefined
            },
            updateMask: {
                paths: ['description', 'retryConfig', 'httpTarget']
            }
        }

I'm getting below error.
Error: 3 INVALID_ARGUMENT: Invalid mask for Job: httpTarget at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:26) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:179:52) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141) at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181) at /workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78 at processTicksAndRejections (internal/process/task_queues.js:79:11)

I feel there is no support for the "httpTARGET" update mask. 😔

Metadata

Metadata

Assignees

Labels

api: cloudschedulerIssues related to the googleapis/nodejs-scheduler API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions