Complete the code to deploy a Cloud Function named 'helloWorld'.
gcloud functions deploy helloWorld --runtime [1] --trigger-http --allow-unauthenticatedThe correct runtime for deploying a Python 3.9 Cloud Function is python39.
Complete the code to test the deployed Cloud Function using curl.
curl -X GET [1]The correct URL to invoke the Cloud Function is the HTTPS trigger URL, which looks like https://region-project.cloudfunctions.net/helloWorld.
Fix the error in the deployment command by completing the missing flag.
gcloud functions deploy helloWorld [1] main --runtime python39 --trigger-httpThe --entry-point flag specifies the function in your code to execute. It is required if the function name differs from the default.
Fill both blanks to set environment variables during deployment.
gcloud functions deploy helloWorld --runtime python39 --trigger-http --set-env-vars [1]=[2]
Environment variables are set as key=value pairs. Here, ENVIRONMENT=production sets the environment to production.
Fill all three blanks to write a test command that sends JSON data to the function.
curl -X POST -H 'Content-Type: application/json' -d '{"name": "[1]"}' [2] [3]
The JSON data includes a name field with value 'Alice'. The URL is the function's HTTPS trigger. The --silent flag suppresses curl progress output.