Skip to content

Latest commit

 

History

History

servicedirectory

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Service Directory

Service Directory is a platform for discovering, publishing, and connecting services. It offers customers a single place to register and discover their services in a consistent and reliable way, regardless of their environment. These sample Java applications demonstrate how to access the Service Directory API using the Google Java API Client Libraries.

Prerequisites

Enable the API

You must enable the Service Directory API for your project in order to use these samples. You can do so here.

Set Environment Variables

You must set your project ID in order to run the tests

$ export GOOGLE_CLOUD_PROJECT=<your-project-id-here>

Grant Permissions

You must ensure that the user account or service account you used to authorize your gcloud session has the proper permissions to edit Service Directory resources for your project. In the Cloud Console under IAM, add the Service Directory Admin role to the project whose service account you're using to test.

More information can be found in the Authentication docs.

Quickstart

Install Maven.

Build your project with:

mvn clean package -DskipTests

You can run all tests with:

mvn clean verify