'Mapping dependencies/requirements for GCP APIs/services

Does anyone knows a way to map the dependencies or requirements of any GCP API? E.g. enabling container.googleapis.com would automatically enable compute.googleapis.com and others into a same chart/table/text/anything.

The GCP docs don't specify any such dependency for any API (from what I have seen so far). So I'm either looking for a Doc which specifies this, a gcloud command or a completely different tool that can help mapping it.



Solution 1:[1]

We don't have any public external documentation around service dependencies for now. therefore please open a FR in refer to this link

Solution 2:[2]

One workaround could be to use the Service Usage API. The disable method has a disableDependentServices field which disables all services that depend on the services being disabled.

You could enable a bunch of services in GCP, disable a service, and observe which dependent services are also disabled.

Solution 3:[3]

did you open a Feature Request as suggested ? If so, can you share the link ?

As a faint consolation, you can have a look at this article from which we can tell that the API interdependency information was once available through the serviceusage API.

There you'll find a diagram as of october 2020 (see screenshot bellow)

GCP API dependency diagram excerpt

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ali Reza Izadi
Solution 2 Jack
Solution 3 Alexis D.