Google Cloud Platform APIs - List of Enabled APIs for GCP Project | SiteName

List of Enabled APIs for GCP Project

Question

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?

Answers

Explanations

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:

  1. Open the Cloud Shell:

  2. 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.

  3. Set the current project to my-project by running the command:

    python
    gcloud config set project my-project
  4. Run the command:

    css
    gcloud 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.