Override appengine_v1::VersionsClient Authentication Defaults

 [](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::appengine_v1::VersionsClient(
 google::cloud::appengine_v1::MakeVersionsConnection(options));
 }

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年12月17日 UTC.