google-cloud-scheduler

how to add a service account security definition in openapi yml file

丶灬走出姿态 提交于 2020-02-04 22:18:01
问题 I want to add a security definition to an API to run it in the google cloud scheduler (using OIDC token, and a service account).My openapi.yml looks like this "/common/test": post: description: "test" operationId: "test" responses: 200: description: "Success" 400: description: "Fail" security: - service_account: [] securityDefinitions: service_account: authorizationUrl: "" flow: "implicit" type: "oauth2" x-google-issuer: "xx@example.iam.gserviceaccount.com" x-google-jwks_uri: "https://www

how to add a service account security definition in openapi yml file

房东的猫 提交于 2020-02-04 22:17:52
问题 I want to add a security definition to an API to run it in the google cloud scheduler (using OIDC token, and a service account).My openapi.yml looks like this "/common/test": post: description: "test" operationId: "test" responses: 200: description: "Success" 400: description: "Fail" security: - service_account: [] securityDefinitions: service_account: authorizationUrl: "" flow: "implicit" type: "oauth2" x-google-issuer: "xx@example.iam.gserviceaccount.com" x-google-jwks_uri: "https://www

Restrict access to Google Cloud Function

混江龙づ霸主 提交于 2020-02-02 13:13:48
问题 I have successfully deployed a Cloud Function that does some basic pre-processing to some data and uploads it to gSheet. Now, the trigger url accepts external unauthenticated invocations, leading to the risk of excessive bills in case the url ends up in the wrong hands. I am wondering if there's any way to restrict invocation to Cloud Scheduler in IAM, preventing external calls to the service altoghether. Reading around it seems that including some header in the request and checking for it in

Creating a Data Pipeline to BigQuery Using Cloud Functions and Cloud Scheduler

夙愿已清 提交于 2020-01-07 08:07:39
问题 I am trying to build a Data Pipeline that will download the data from this website and push it to a BigQuery Table. def OH_Data_Pipeline(trigger='Yes'): if trigger=='Yes': import pandas as pd import pandas_gbq import datetime schema=[{'name': 'SOS_VOTERID', 'type': 'STRING'},{'name': 'COUNTY_NUMBER', 'type': 'STRING'}, {'name': 'COUNTY_ID', 'type': 'INT64'}, {'name': 'LAST_NAME', 'type': 'STRING'}, {'name': 'FIRST_NAME', 'type': 'STRING'}, {'name': 'MIDDLE_NAME', 'type': 'STRING'}, {'name':

HTTP Triggering Cloud Function with Cloud Scheduler

半城伤御伤魂 提交于 2019-12-04 03:19:06
问题 I have a problem with a job in the Cloud Scheduler for my cloud function. I created the job with next parameters: Target : HTTP URL : my trigger url for cloud function HTTP method : POST Body : { "expertsender": { "apiKey": "ExprtSender API key", "apiAddress": "ExpertSender APIv2 address", "date": "YYYY-MM-DD", "entities": [ { "entity": "Messages" }, { "entity": "Activities", "types":[ "Subscriptions" ] } ] }, "bq": { "project_id": "YOUR GCP PROJECT", "dataset_id": "YOUR DATASET NAME",

How to use scheduler for Firebase Cloud Functions with Realtime Database/Analytics triggers?

一曲冷凌霜 提交于 2019-11-28 14:38:47
I'm working on a Firebase Cloud Function, to send triggered push notifications. Right now my function sends a push as soon as an user triggers the "IAP" event in my app. 'use strict'; const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendIAPAnalytics = functions.analytics.event('IAP').onLog((event) => { const user = event.user; const uid = user.userId; // The user ID set via the setUserId API. sendPushToUser(); return true; }); function sendPushToUser(uid) { // Fetching all the user's device

Verify HTTP request from Google Cloud Scheduler

混江龙づ霸主 提交于 2019-11-27 18:53:41
问题 What's the process for verifying the HTTP request from Google Cloud scheduler? The docs (https://cloud.google.com/scheduler/docs/creating) mention you can create a job with a target of any publicly available HTTP endpoint but do not mention how the server verifies the cron/scheduler request. 回答1: [Update May 28, 2019] Google Cloud Scheduler now has two command line options: --oidc-service-account-email=<service_account_email> --oidc-token-audience=<service_endpoint_being_called> These options

How to use scheduler for Firebase Cloud Functions with Realtime Database/Analytics triggers?

杀马特。学长 韩版系。学妹 提交于 2019-11-27 07:26:41
问题 I'm working on a Firebase Cloud Function, to send triggered push notifications. Right now my function sends a push as soon as an user triggers the "IAP" event in my app. 'use strict'; const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.sendIAPAnalytics = functions.analytics.event('IAP').onLog((event) => { const user = event.user; const uid = user.userId; // The user ID set via the setUserId API.