Cloud Recommender is a service on Google Cloud that provides usage recommendations for Cloud products and services. This sample Java application demonstrates how to access the Recommender API using the Google Cloud Client Library for Java.
- Set up a Java Development Environment for Maven.
- Enable Recommender API for your project.
- Authenticate using a service account.
Create a service account, download a JSON key file, and set the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable. - Set the
GOOGLE_CLOUD_PROJECTenvironment variable to your project ID.
Build your project with:
mvn clean package -DskipTests
To run the unit tests:
mvn clean verify