Bird
0
0

Which of the following is the correct command to deploy a 1st generation Cloud Function named 'processData' with Node.js 16 runtime?

easy📝 Syntax Q3 of 15
GCP - Cloud Functions
Which of the following is the correct command to deploy a 1st generation Cloud Function named 'processData' with Node.js 16 runtime?
Agcloud functions deploy processData --runtime nodejs16 --gen 2
Bgcloud functions deploy processData --runtime nodejs16 --region us-central1 --gen 2
Cgcloud functions deploy processData --runtime nodejs16 --trigger-http
Dgcloud functions deploy processData --runtime nodejs16 --trigger-http --gen 2
Step-by-Step Solution
Solution:
  1. Step 1: Identify 1st generation deployment syntax

    1st gen functions do not require the --gen flag; default is 1st gen.
  2. Step 2: Check command correctness

    gcloud functions deploy processData --runtime nodejs16 --trigger-http deploys with runtime nodejs16 and HTTP trigger without specifying generation, so defaults to 1st gen.
  3. Final Answer:

    gcloud functions deploy processData --runtime nodejs16 --trigger-http -> Option C
  4. Quick Check:

    1st gen deploy omits --gen flag [OK]
Quick Trick: Omit --gen flag for 1st gen functions [OK]
Common Mistakes:
  • Adding --gen 2 for 1st gen functions
  • Missing trigger flag

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GCP Quizzes