Stay organized with collections Save and categorize content based on your preferences.
You can access Google Cloud products and services from your code using Cloud APIs. These Cloud APIs expose a simple JSON REST interface that you can call via client libraries.
This document describes how to enable Cloud APIs and add Cloud Client Libraries to your project.
Note: For projects that don't use both Java and Maven, Cloud Code doesn't add the Cloud Client Libraries to your build automatically, but does support the other features described here and provides build snippets for your build system. Browse Cloud APIs Note: Cloud Code's list of APIs and libraries covers the majority, but not all, APIs.To explore all available Google Cloud APIs in your IDE, follow these steps:
Navigate to Tools > Google Cloud Code > Cloud APIs.
The Manage Google Cloud APIs window groups Cloud APIs by category. You can also use the Search APIs search bar to find specific APIs.
Click an API to view more details, such as its status, language-specific installation instructions for its corresponding client libraries, and relevant documentation.
To enable Cloud APIs for a project using the API details, follow these steps:
In the Cloud API details view, select a Google Cloud project that you want to enable the Cloud API for.
Click Enable API.
When the API is enabled, a message appears to confirm the change.
To add libraries to your project in IntelliJ, follow these steps:
For Java Maven projectsThe Install Client Library section in the Manage Google Cloud APIs dialog displays the supported libraries.
pom.xml
file of your projects.
The Install Client Library section in the Manage Google Cloud APIs dialog displays the supported libraries.
If you're developing a Java application, you need to also specify your library preference as Google Cloud Client Library (recommended) or Java Spring Google Cloud.
To search for and use code samples for each API in the API explorer, follow these steps:
Navigate to Tools > Google Cloud Code > Cloud APIs.
To open the detail view, click the name of an API.
To view code samples for the API, click the Code Samples tab.
To filter the list of samples, type text to search for or select a programming language from the Language drop-down menu.
After you've enabled the required APIs and added the necessary client libraries, you need to configure your application in order for it to be successfully authenticated. Your configuration depends on your type of development and the platform you're running on.
Once you complete the relevant authentication steps, your application can authenticate and is ready to be deployed.
Local development Local machineCloud Code ensures you have your Application Default Credentials (ADC) set if you logged into Google Cloud via your IDE. If you're not signing in with Cloud Code, run gcloud auth application-default login
manually.
gcloud auth application-default login
manually.minikube start --addons gcp-auth
. This mounts your ADC in your pods. For a detailed minikube auth guide for Google Cloud, refer to the minikube gcp-auth docs.gcloud auth application-default login
manually.gcloud
directory in your Kubernetes pods by editing the Pod specification in the Pod or Deployment manifests, so that the Google Cloud Client Libraries can find your credentials. Kubernetes pod configuration example:
apiVersion: v1 kind: Pod metadata: name: my-app labels: name: my-app spec: containers: - name: my-app image: gcr.io/google-containers/busybox ports: - containerPort: 8080 volumeMounts: - mountPath: /root/.config/gcloud name: gcloud-volume volumes: - name: gcloud-volume hostPath: path: /path/to/home/.config/gcloud
Cloud Code ensures you have your Application Default Credentials (ADC) set if you logged into Google Cloud via your IDE. If you're not signing in with Cloud Code, run gcloud auth application-default login
manually.
For a list of IAM role types and predefined roles you can grant to identities, see the Understanding roles guide.
For steps to grant the roles, see Granting, changing, and revoking access to resources.
.spec.serviceAccountName
field in your Kubernetes Deployment YAML file. For a list of IAM role types and predefined roles you can grant to identities, see the Understanding roles guide.
For steps to grant the roles, see Granting, changing, and revoking access to resources.
For a list of IAM role types and predefined roles you can grant to identities, see the Understanding roles guide.
For steps to grant the roles, see Granting, changing, and revoking access to resources.
For a list of IAM role types and predefined roles you can grant to identities, see the Understanding roles guide.
For steps to grant the roles, see Granting, changing, and revoking access to resources.
If you're developing remotely, using a service account for authentication, and your application uses secrets, you need to complete a few more steps in addition to the remote development instructions. These steps assign your Google service account the role required to access a particular Secret Manager secret:
To open the Secret Manager tool window, navigate to Tools > Google Cloud Code > Secret Manager.
Select the secret that you want to access in your code.
Click the Permissions tab and then configure your secret's permissions by clicking edit Edit Permission.
The Google Cloud console opens in a new window of your web browser, displaying the Secret Manager configuration page of your secret.
In the Google Cloud console, click the Permissions tab and then click Grant Access.
In the New principals field, enter your service account.
In the Select a role dropdown field, select the Secret Manager Secret Accessor role.
When you're finished, click Save.
Your service account has permission to access this secret.
To submit feedback or report an issue in your IntelliJ IDE, go to
Tools>
Cloud Code>
Help / About>
Submit feedback or report an issueto report an issue on
GitHub.
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-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Google Cloud APIs, accessible via a JSON REST interface and client libraries, can be managed within your IDE via Cloud Code."],["You can enable Cloud APIs for your project directly through the Cloud API details view in the IDE."],["Cloud Client Libraries can be added to your Java Maven projects, as well as other project types, using the Cloud APIs dialog in Cloud Code."],["Cloud Code ensures that Application Default Credentials (ADC) are set when logged into Google Cloud via the IDE, simplifying authentication for local and remote development."],["For remote development on GKE and Cloud Run, you can authenticate using either the default Compute Engine service account with full API access for development or a more secure Workload Identity approach recommended for production."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4