Page Summary
-
The page provides a list of different versions of a software component, specifically for
composer_v1_1_1EnvironmentsClient-service-account-snippet, with 2.45.0 identified as the latest stable version and 2.46.0-rc as a release candidate. -
It includes a C++ code snippet demonstrating how to override authentication defaults for the
composer_v1::EnvironmentsClient. -
The code snippet shows the use of
MakeServiceAccountCredentialsto set unified credentials from a keyfile.
[](std::string const& keyfile) {
auto is = std::ifstream(keyfile);
is.exceptions(std::ios::badbit); // Minimal error handling in examples
auto contents = std::string(std::istreambuf_iterator<char>(is.rdbuf()), {});
auto options =
google::cloud::Options{}.set<google::cloud::UnifiedCredentialsOption>(
google::cloud::MakeServiceAccountCredentials(contents));
return google::cloud::composer_v1::EnvironmentsClient(
google::cloud::composer_v1::MakeEnvironmentsConnection(options));
}