Topic 1 Question 75
You need to produce a list of the enabled Google Cloud Platform APIs for a GCP project using the gcloud command line in the Cloud Shell. The project name is my-project. What should you do?
Run gcloud projects list to get the project ID, and then run gcloud services list --project <project ID>.
Run gcloud init to set the current project to my-project, and then run gcloud services list --available.
Run gcloud info to view the account value, and then run gcloud services list --account <Account>.
Run gcloud projects describe <project ID> to verify the project value, and then run gcloud services list --available.
ユーザの投票
コメント(17)
A is the correct answer, log to gcloud and run the commands, doesnt make sense to run cloud init and gcloud services list --available gives you the full services that are available.
👍 48dan802020/06/06"A" is correct.
For those, who have doubts:
gcloud services list --availablereturns not only the enabled services in the project but also services that CAN be enabled. Therefore, option B is incorrect.https://cloud.google.com/sdk/gcloud/reference/services/list#--available
👍 12lxgywil2021/05/09- 正解だと思う選択肢: A
Let's do a side-by-side analysis of Answer A and Answer D to clear our doubts:
Answer A: Run gcloud projects list to get the project ID, and then run gcloud services list --project <project ID>.
This option first retrieves the project ID by running the gcloud projects list command. Then, it uses the gcloud services list command with the --project flag to list the enabled APIs for the specified project.
👍 3Buruguduystunstugudunstuy2023/02/20
シャッフルモード