Found the solution in google:
gcloud functions add-event-trigger FUNCTION_NAME --trigger-resource TOPIC_NAME --trigger-event google.pubsub.topic.publish --subscription SUBSCRIPTION_NAME
But its showing Invalid choice: 'add-event-trigger'
gcloud functions deploy FUNCTION_NAME --trigger-resource TOPIC_NAME --trigger-event google.pubsub.topic.publish --subscription SUBSCRIPTION_NAME
Its giving error: unrecognized arguments: --subscription
Hi @anindita,
SUBSCRIPTION_NAME is not necessary in this context because Pub/Sub triggers are set up based on a topic, not a specific subscription.
You can see all flags on Google documentation --> https://cloud.google.com/sdk/gcloud/reference/functions/deploy
Hi @MaxImbrox
Thanks for your response.
My requirement is
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 |