This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import Flask, request | |
| from google.cloud import bigquery | |
| from google.auth import impersonated_credentials | |
| import google.auth | |
| import json | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def page_home(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| # Copyright 2018 Google LLC | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # https://www.apache.org/licenses/LICENSE-2.0 | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from google.cloud import monitoring_v3 | |
| import time | |
| # for multiple projects, feed in a list of project names and use folder/org level IAM role for perm | |
| project_name = "injae-sandbox" | |
| def create_client(): | |
| try: | |
| client = monitoring_v3.MetricServiceClient() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| import json | |
| from datetime import datetime | |
| region = "us-east-1" | |
| client = boto3.client("s3",region) | |
| bucketName = "connect-demo-voicemail" | |
| def lambda_handler(event, context): | |
| print ("raw event: {}".format(event)) |