Newman で CLI から実行できる 21 ɹɹ$ newman run --environment postman_environment.json postman_collection.json ɹɹDemoAPIs ɹɹ! 1. όʔδϣϯ͕औಘͰ͖Δ (200) ɹɹ GET http://localhost:8080/version [200 OK, 127B, 26ms] ɹɹ ✓ Successful HTTP request ɹɹ ✓ Returns OK status ɹɹ ✓ It has a `version` string ɹɹ! 2. ڐՄ͞Ε͍ͯͳ͍ϝιου (405) ɹɹ POST http://localhost:8080/version [405 Method Not Allowed, 216B, 2ms] ɹɹ ✓ Successful HTTP request ɹɹ ✓ It has an error code ɹɹ ✓ It has an error message ɹɹ…
App Engine のバージョン管理 25 Google App Engine service v0.1 service v1.1 service v1.0 stopped stopped 例)gcloud app deploy https://project.appspot.com https://v1-1-dot-project.appspot.com
例)deploy --no-stop-previous-version App Engine のバージョン管理 26 Google App Engine service v0.1 service v1.1 service v1.2 service v1.0 https://v1-1-dot-project.. https://v1-2-dot-project.. stopped stopped https://project.appspot.com
App Engine のバージョン管理 27 Google App Engine service v0.1 service v1.1 service v1.2 service v2.0 service v1.0 https://v1-1-dot-project.. https://v1-2-dot-project.. https://v2-0-dot-project.appspot.com stopped stopped https://project.appspot.com 例)deploy --no-stop-previous-version --no-promote
App Engine のバージョン管理 28 Google App Engine service v0.1 service v1.1 service v1.2 service v2.0 service v1.0 例)services set-traffic --splits=v1-2=0.9,v2-0=0.1 https://project.appspot.com 90% 10%
つまりこうなる 34 • 許可されていないユーザからの要求(一例) $ curl -s https://your-project-id.appspot.com/needauth | jq . { “code”: 16, “message”: “Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.”, “details”: [ “@type”: “type.googleapis.com/google.rpc.DebugInfo”, “stackEntries”: [], “detail”: “service_control” { ] }
ご静聴ありがとうございました :) 参考文献: • Google Cloud Endpoints: serving your API to the world (Google Cloud Next '17) https://www.youtube.com/watch?v=bR9hEyZ9774 • Getting Started with Endpoints on App Engine Flexible Environment https://cloud.google.com/endpoints/docs/openapi/get-started-app- engine • Configuring your App with app.yaml | Custom runtimes for the App Engine flexible environment | Google Cloud Platform https://cloud.google.com/appengine/docs/flexible/custom-runtimes/ configuring-your-app-with-app-yaml#updated_health_checks