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?
Click on the arrows to vote for the correct answer
A. B. C. D.A.
To produce a list of the enabled Google Cloud Platform APIs for a GCP project using the gcloud command line in the Cloud Shell, you need to follow these steps:
Open the Cloud Shell:
Verify that you are logged in with the correct account by running the command:
gcloud auth list
If you are not logged in, use the command gcloud auth login
to log in with the appropriate credentials.
Set the current project to my-project by running the command:
pythongcloud config set project my-project
Run the command:
cssgcloud services list --enabled
This command will display a list of all the APIs that are enabled for the current project.
The correct answer to the question is D: Run gcloud projects describe <project ID> to verify the project value, and then run gcloud services list --available. However, the answer is not entirely correct, as it is asking for the enabled APIs, not the available APIs. Therefore, the correct command to use is gcloud services list --enabled
. Option A is also partially correct as it suggests using gcloud services list
to get the list of APIs, but it requires first getting the project ID with gcloud projects list
. Option B is incorrect as it suggests using gcloud services list --available
instead of gcloud services list --enabled
. Option C is incorrect as it suggests using gcloud info
to get the account value, which is not needed for getting the list of enabled APIs.