Coder Social home page Coder Social logo

put-the-room-usage-status-retrieved-from-google-calendar-into-s3's Introduction

put-the-room-usage-status-retrieved-from-google-calendar-into-s3

CloudWatch Event によって駆動された Lambda が任意のユーザー・会議室の google calendar の実行日のみの予定を取得し、5分毎のその1日の予定の埋まり具合(埋まっている: 1, 埋まっていない: 0)をCSVでS3に出力する

準備するもの

GCPのサービスアカウント

  • ユーザーに紐付かないアプリケーションから任意の Google Calendar にアクセスするにはサービスアカウントが必要なため、これを用意すること。

  • このサービスアカウントに紐づくメールアドレス(*@*.iam.gserviceaccount.com)を予め取得したいユーザーの予定表に共有設定を施す必要がある。

  • サービスアカウントの秘密鍵をcredentials.jsonとしてプロジェクト直下に格納する必要がある

取得したいユーザーのカレンダーID

  • 取得したいユーザーの「設定と共有」> 「カレンダーの設定」 > 「カレンダーの統合」の下にカレンダーIDが記載されている

  • 以下のようにカレンダーIDとその名前のオブジェクトを配列形式でcdk.context.jsonとして記載する

{
    "calendarList": [
        {
            "name": "test",
            "calendarId": "*@gmail.com"
        },
        {
            "name": "会議室1",
            "calendarId": "*@resource.calendar.google.com"
        }
    ]
}

デプロイ

credentails.jsoncdk.context.jsonを用意して以下のコマンドを実行する

cdk deploy --all

put-the-room-usage-status-retrieved-from-google-calendar-into-s3's People

Contributors

nmemoto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.