google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

computeMetadata API?

Open kbowling-bullish opened this issue 1 year ago • 1 comments

https://github.com/googleapis/google-cloud-cpp/issues/14670 was closed as completed but I cannot find an implementation to verify completion.

Please note that this request is coming from the needs of a sizable corporate account.

kbowling-bullish avatar Sep 20 '24 00:09 kbowling-bullish

I would recommend that you contact your customer representative about this feature request. The compute related code in this SDK focuses on configuring GCE per the API defined here (https://cloud.google.com/compute/docs/reference/rest/v1).

You mention in your original issue that you want to do this without needing an HTTP or JSON library. I'm not aware of any other way to retrieve the metadata. In situations (typically authentication) where this SDK need to access the metadata, we do so using libcurl (HTTP) and nlohmann JSON (https://github.com/googleapis/google-cloud-cpp/blob/39a3faf28d22440aedd371d21bdf158e847f0aca/google/cloud/internal/oauth2_compute_engine_credentials.cc#L309)

scotthart avatar Sep 20 '24 15:09 scotthart