gcloud project create ${PROJECT_ID} --set-as-default
# gcloud config set project ${PROJECT_ID}
gcloud app create --project=${PROJECT_ID}
gcloud app deploy gcloud app browse
gcloud project delete ${PROJECT_ID}
export NAME=webuser
gcloud iam service-accounts create
(c'è già nello script) export GOOGLE_APPLICATION_CREDENTIALS="$(pwd)/credentials.json"
export ENDPOINTS_SERVICE_NAME=$(grep 'host:'
export TOPIC=name_topic
export SUBSCRIPTION_NAME=sub_name
gcloud pubsub topics create
(send message) gcloud pubsub topics publish testTopic --attribute=from="cli" --message="Test Message" (receive message) gcloud pubsub subscriptions pull ${SUBSCRIPTION_NAME}
(push_logic) gcloud pubsub subscriptions create ${SUBSCRIPTION_NAME} --topic ${TOPIC} --push-endpoint "https://${PROJECT_ID}.appspot.com/pubsub/push?token=${TOKEN}" --ack-deadline 10
def myFunction(event_data, context)
stringValue integerValue doubleValue esame20230116sm gcloud functions deploy name_fn --runtime=python39 --trigger-event="providers/cloud.firestore/eventTypes/document.create" --trigger-resource="projects/${PROJECT_ID}/databases/(default)/documents/cars/{car}"
gcloud functions call ${FUNCTION_NAME} --data '{"name": "Boba"}'
Lezione 5 dic (b) -> PubSub