README.md
1# Google Cloud Java Client Libraries
2
3> Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
4
5* [Java on Google Cloud][cloud-java]
6
7## Supported APIs
8
9Libraries are available on GitHub and Maven Central for developing Java applications that interact with individual Google Cloud services:
10
11[//]: # (API_TABLE_START)
12
13| Client | Release Level | Version |
14| ------ | ------------- | ------- |
15| [AI Platform Notebooks](https://github.com/googleapis/google-cloud-java/tree/main/java-notebooks) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-notebooks&core=gav) |
16| [API Gateway](https://github.com/googleapis/google-cloud-java/tree/main/java-api-gateway) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-api-gateway&core=gav) |
17| [Access Approval](https://github.com/googleapis/google-cloud-java/tree/main/java-accessapproval) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-accessapproval&core=gav) |
18| [Apigee Connect](https://github.com/googleapis/google-cloud-java/tree/main/java-apigee-connect) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-apigee-connect&core=gav) |
19| [App Engine Admin API](https://github.com/googleapis/google-cloud-java/tree/main/java-appengine-admin) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-appengine-admin&core=gav) |
20| [Artifact Registry](https://github.com/googleapis/google-cloud-java/tree/main/java-artifact-registry) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-artifact-registry&core=gav) |
21| [Asset Inventory](https://github.com/googleapis/google-cloud-java/tree/main/java-asset) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-asset&core=gav) |
22| [Assured Workloads for Government](https://github.com/googleapis/google-cloud-java/tree/main/java-assured-workloads) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-assured-workloads&core=gav) |
23| [Auto ML](https://github.com/googleapis/google-cloud-java/tree/main/java-automl) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-automl&core=gav) |
24| [BigQuery](https://github.com/googleapis/java-bigquery) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquery&core=gav) |
25| [BigQuery Connection](https://github.com/googleapis/google-cloud-java/tree/main/java-bigqueryconnection) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigqueryconnection&core=gav) |
26| [BigQuery Data Transfer Service](https://github.com/googleapis/google-cloud-java/tree/main/java-bigquerydatatransfer) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquerydatatransfer&core=gav) |
27| [BigQuery Reservation](https://github.com/googleapis/google-cloud-java/tree/main/java-bigqueryreservation) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigqueryreservation&core=gav) |
28| [BigQuery Storage](https://github.com/googleapis/java-bigquerystorage) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquerystorage&core=gav) |
29| [Bigtable](https://github.com/googleapis/java-bigtable) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigtable&core=gav) |
30| [Bigtable Hbase Client](https://github.com/googleapis/java-bigtable-hbase) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud.bigtable%20AND%20a:bigtable-client-parent&core=gav) |
31| [Billing](https://github.com/googleapis/google-cloud-java/tree/main/java-billing) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-billing&core=gav) |
32| [Billing Budgets](https://github.com/googleapis/google-cloud-java/tree/main/java-billingbudgets) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-billingbudgets&core=gav) |
33| [Binary Authorization](https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-binary-authorization&core=gav) |
34| [Build](https://github.com/googleapis/google-cloud-java/tree/main/java-cloudbuild) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-build&core=gav) |
35| [CCAI Insights](https://github.com/googleapis/google-cloud-java/tree/main/java-contact-center-insights) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-contact-center-insights&core=gav) |
36| [Certificate Authority Service](https://github.com/googleapis/google-cloud-java/tree/main/java-security-private-ca) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-security-private-ca&core=gav) |
37| [Channel Services](https://github.com/googleapis/google-cloud-java/tree/main/java-channel) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-channel&core=gav) |
38| [Composer](https://github.com/googleapis/google-cloud-java/tree/main/java-orchestration-airflow) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-orchestration-airflow&core=gav) |
39| [Compute Engine](https://github.com/googleapis/google-cloud-java/tree/main/java-compute) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-compute&core=gav) |
40| [Container Analysis](https://github.com/googleapis/google-cloud-java/tree/main/java-containeranalysis) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-containeranalysis&core=gav) |
41| [DNS](https://github.com/googleapis/google-cloud-java/tree/main/java-dns) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dns&core=gav) |
42| [Data Catalog](https://github.com/googleapis/google-cloud-java/tree/main/java-datacatalog) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datacatalog&core=gav) |
43| [Data Fusion](https://github.com/googleapis/google-cloud-java/tree/main/java-data-fusion) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-data-fusion&core=gav) |
44| [Data Loss Prevention](https://github.com/googleapis/google-cloud-java/tree/main/java-dlp) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dlp&core=gav) |
45| [Database Migration Service](https://github.com/googleapis/google-cloud-java/tree/main/java-dms) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dms&core=gav) |
46| [Dataplex](https://github.com/googleapis/google-cloud-java/tree/main/java-dataplex) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataplex&core=gav) |
47| [Dataproc](https://github.com/googleapis/google-cloud-java/tree/main/java-dataproc) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataproc&core=gav) |
48| [Dataproc Metastore](https://github.com/googleapis/google-cloud-java/tree/main/java-dataproc-metastore) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataproc-metastore&core=gav) |
49| [Datastore](https://github.com/googleapis/java-datastore) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datastore&core=gav) |
50| [Datastream](https://github.com/googleapis/google-cloud-java/tree/main/java-datastream) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datastream&core=gav) |
51| [Debugger](https://github.com/googleapis/google-cloud-java/tree/main/java-debugger-client) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-debugger-client&core=gav) |
52| [Deploy](https://github.com/googleapis/google-cloud-java/tree/main/java-deploy) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-deploy&core=gav) |
53| [Dialogflow API](https://github.com/googleapis/google-cloud-java/tree/main/java-dialogflow) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dialogflow&core=gav) |
54| [Document AI](https://github.com/googleapis/google-cloud-java/tree/main/java-document-ai) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-document-ai&core=gav) |
55| [Domains](https://github.com/googleapis/google-cloud-java/tree/main/java-domains) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-domains&core=gav) |
56| [Essential Contacts API](https://github.com/googleapis/google-cloud-java/tree/main/java-essential-contacts) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-essential-contacts&core=gav) |
57| [Eventarc](https://github.com/googleapis/google-cloud-java/tree/main/java-eventarc) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-eventarc&core=gav) |
58| [Filestore API](https://github.com/googleapis/google-cloud-java/tree/main/java-filestore) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-filestore&core=gav) |
59| [Firestore](https://github.com/googleapis/java-firestore) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-firestore&core=gav) |
60| [Fleet Routing](https://github.com/googleapis/google-cloud-java/tree/main/java-optimization) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-optimization&core=gav) |
61| [Functions](https://github.com/googleapis/google-cloud-java/tree/main/java-functions) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-functions&core=gav) |
62| [GKE Hub API](https://github.com/googleapis/google-cloud-java/tree/main/java-gkehub) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gkehub&core=gav) |
63| [Gaming](https://github.com/googleapis/google-cloud-java/tree/main/java-game-servers) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-game-servers&core=gav) |
64| [IAM](https://github.com/googleapis/google-cloud-java/tree/main/java-iam) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-iam-policy&core=gav) |
65| [IAM Admin API](https://github.com/googleapis/google-cloud-java/tree/main/java-iam-admin) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-iam-admin&core=gav) |
66| [IAM Policy Troubleshooter API](https://github.com/googleapis/google-cloud-java/tree/main/java-policy-troubleshooter) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-policy-troubleshooter&core=gav) |
67| [IAM Service Account Credentials API](https://github.com/googleapis/google-cloud-java/tree/main/java-iamcredentials) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-iamcredentials&core=gav) |
68| [Identity Access Context Manager](https://github.com/googleapis/google-cloud-java/tree/main/java-accesscontextmanager) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-identity-accesscontextmanager&core=gav) |
69| [Internet of Things (IoT) Core](https://github.com/googleapis/google-cloud-java/tree/main/java-iot) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-iot&core=gav) |
70| [Intrusion Detection System](https://github.com/googleapis/google-cloud-java/tree/main/java-ids) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-ids&core=gav) |
71| [Key Management Service](https://github.com/googleapis/google-cloud-java/tree/main/java-kms) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-kms&core=gav) |
72| [Kubernetes Engine](https://github.com/googleapis/google-cloud-java/tree/main/java-container) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-container&core=gav) |
73| [Logging](https://github.com/googleapis/java-logging) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-logging&core=gav) |
74| [Managed Service for Microsoft Active Directory](https://github.com/googleapis/google-cloud-java/tree/main/java-managed-identities) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-managed-identities&core=gav) |
75| [Memcache](https://github.com/googleapis/google-cloud-java/tree/main/java-memcache) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-memcache&core=gav) |
76| [Monitoring Dashboards](https://github.com/googleapis/google-cloud-java/tree/main/java-monitoring-dashboards) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-monitoring-dashboard&core=gav) |
77| [Natural Language](https://github.com/googleapis/google-cloud-java/tree/main/java-language) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-language&core=gav) |
78| [Network Connectivity Center](https://github.com/googleapis/google-cloud-java/tree/main/java-networkconnectivity) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-networkconnectivity&core=gav) |
79| [Network Management API](https://github.com/googleapis/google-cloud-java/tree/main/java-network-management) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-network-management&core=gav) |
80| [OS Config API](https://github.com/googleapis/google-cloud-java/tree/main/java-os-config) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-os-config&core=gav) |
81| [OS Login](https://github.com/googleapis/google-cloud-java/tree/main/java-os-login) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-os-login&core=gav) |
82| [Organization Policy](https://github.com/googleapis/google-cloud-java/tree/main/java-orgpolicy) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-orgpolicy&core=gav) |
83| [Profiler](https://github.com/googleapis/google-cloud-java/tree/main/java-profiler) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-profiler&core=gav) |
84| [Pub/Sub](https://github.com/googleapis/java-pubsub) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-pubsub&core=gav) |
85| [Pub/Sub Group Kafka Connector](https://github.com/googleapis/java-pubsub-group-kafka-connector) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:pubsub-group-kafka-connector&core=gav) |
86| [Pub/Sub Lite](https://github.com/googleapis/java-pubsublite) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-pubsublite&core=gav) |
87| [Pub/Sub Lite Kafka Shim](https://github.com/googleapis/java-pubsublite-kafka) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:pubsublite-kafka&core=gav) |
88| [Pub/Sub Lite Spark Connector](https://github.com/googleapis/java-pubsublite-spark) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:pubsublite-spark-sql-streaming&core=gav) |
89| [Recommender](https://github.com/googleapis/google-cloud-java/tree/main/java-recommender) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-recommender&core=gav) |
90| [Redis](https://github.com/googleapis/google-cloud-java/tree/main/java-redis) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-redis&core=gav) |
91| [Resource Manager API](https://github.com/googleapis/google-cloud-java/tree/main/java-resourcemanager) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-resourcemanager&core=gav) |
92| [Resource Settings API](https://github.com/googleapis/google-cloud-java/tree/main/java-resource-settings) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-resource-settings&core=gav) |
93| [Retail](https://github.com/googleapis/google-cloud-java/tree/main/java-retail) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-retail&core=gav) |
94| [Routes API](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-routing) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.maps%20AND%20a:google-maps-routing&core=gav) |
95| [Scheduler](https://github.com/googleapis/google-cloud-java/tree/main/java-scheduler) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-scheduler&core=gav) |
96| [Secret Management](https://github.com/googleapis/google-cloud-java/tree/main/java-secretmanager) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-secretmanager&core=gav) |
97| [Security Command Center](https://github.com/googleapis/google-cloud-java/tree/main/java-securitycenter) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-securitycenter&core=gav) |
98| [Security Scanner](https://github.com/googleapis/google-cloud-java/tree/main/java-websecurityscanner) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-websecurityscanner&core=gav) |
99| [Serverless VPC Access](https://github.com/googleapis/google-cloud-java/tree/main/java-vpcaccess) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vpcaccess&core=gav) |
100| [Service Control API](https://github.com/googleapis/google-cloud-java/tree/main/java-service-control) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-service-control&core=gav) |
101| [Service Directory](https://github.com/googleapis/google-cloud-java/tree/main/java-servicedirectory) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-servicedirectory&core=gav) |
102| [Service Management API](https://github.com/googleapis/google-cloud-java/tree/main/java-service-management) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-service-management&core=gav) |
103| [Service Usage](https://github.com/googleapis/google-cloud-java/tree/main/java-service-usage) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-service-usage&core=gav) |
104| [Shell](https://github.com/googleapis/google-cloud-java/tree/main/java-shell) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-shell&core=gav) |
105| [Spanner](https://github.com/googleapis/java-spanner) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-spanner&core=gav) |
106| [Spanner JDBC](https://github.com/googleapis/java-spanner-jdbc) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-spanner-jdbc&core=gav) |
107| [Speech](https://github.com/googleapis/google-cloud-java/tree/main/java-speech) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-speech&core=gav) |
108| [Stackdriver Monitoring](https://github.com/googleapis/google-cloud-java/tree/main/java-monitoring) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-monitoring&core=gav) |
109| [Stackdriver Trace](https://github.com/googleapis/google-cloud-java/tree/main/java-trace) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-trace&core=gav) |
110| [Storage](https://github.com/googleapis/java-storage) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-storage&core=gav) |
111| [Storage Transfer Service](https://github.com/googleapis/google-cloud-java/tree/main/java-storage-transfer) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-storage-transfer&core=gav) |
112| [TPU](https://github.com/googleapis/google-cloud-java/tree/main/java-tpu) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-tpu&core=gav) |
113| [Talent Solution](https://github.com/googleapis/google-cloud-java/tree/main/java-talent) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-talent&core=gav) |
114| [Tasks](https://github.com/googleapis/google-cloud-java/tree/main/java-tasks) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-tasks&core=gav) |
115| [Text-to-Speech](https://github.com/googleapis/google-cloud-java/tree/main/java-texttospeech) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-texttospeech&core=gav) |
116| [Translation](https://github.com/googleapis/google-cloud-java/tree/main/java-translate) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-translate&core=gav) |
117| [VM Migration](https://github.com/googleapis/google-cloud-java/tree/main/java-vmmigration) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vmmigration&core=gav) |
118| [Vertex AI](https://github.com/googleapis/google-cloud-java/tree/main/java-aiplatform) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-aiplatform&core=gav) |
119| [Video Intelligence](https://github.com/googleapis/google-cloud-java/tree/main/java-video-intelligence) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-video-intelligence&core=gav) |
120| [Video Transcoder](https://github.com/googleapis/google-cloud-java/tree/main/java-video-transcoder) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-video-transcoder&core=gav) |
121| [Vision](https://github.com/googleapis/google-cloud-java/tree/main/java-vision) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vision&core=gav) |
122| [Web Risk](https://github.com/googleapis/google-cloud-java/tree/main/java-webrisk) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-webrisk&core=gav) |
123| [Workflow Executions](https://github.com/googleapis/google-cloud-java/tree/main/java-workflow-executions) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-workflow-executions&core=gav) |
124| [Workflows](https://github.com/googleapis/google-cloud-java/tree/main/java-workflows) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-workflows&core=gav) |
125| [Workspace Add-ons API](https://github.com/googleapis/google-cloud-java/tree/main/java-gsuite-addons) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gsuite-addons&core=gav) |
126| [reCAPTCHA Enterprise](https://github.com/googleapis/google-cloud-java/tree/main/java-recaptchaenterprise) | [![stable][stable-stability]][stable-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-recaptchaenterprise&core=gav) |
127| [API Keys API](https://github.com/googleapis/google-cloud-java/tree/main/java-apikeys) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-apikeys&core=gav) |
128| [Address Validation API](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-addressvalidation) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.maps%20AND%20a:google-maps-addressvalidation&core=gav) |
129| [Advisory Notifications API](https://github.com/googleapis/google-cloud-java/tree/main/java-advisorynotifications) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-advisorynotifications&core=gav) |
130| [AlloyDB](https://github.com/googleapis/google-cloud-java/tree/main/java-alloydb) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-alloydb&core=gav) |
131| [Analytics Admin](https://github.com/googleapis/google-cloud-java/tree/main/java-analytics-admin) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.analytics%20AND%20a:google-analytics-admin&core=gav) |
132| [Analytics Data](https://github.com/googleapis/google-cloud-java/tree/main/java-analytics-data) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.analytics%20AND%20a:google-analytics-data&core=gav) |
133| [Analytics Hub](https://github.com/googleapis/google-cloud-java/tree/main/java-bigquery-data-exchange) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquery-data-exchange&core=gav) |
134| [Analytics Hub API](https://github.com/googleapis/google-cloud-java/tree/main/java-analyticshub) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-analyticshub&core=gav) |
135| [Anthos Multicloud](https://github.com/googleapis/google-cloud-java/tree/main/java-gke-multi-cloud) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gke-multi-cloud&core=gav) |
136| [Area 120 Tables](https://github.com/googleapis/google-cloud-java/tree/main/java-area120-tables) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.area120%20AND%20a:google-area120-tables&core=gav) |
137| [Backup for GKE](https://github.com/googleapis/google-cloud-java/tree/main/java-gke-backup) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gke-backup&core=gav) |
138| [Bare Metal Solution](https://github.com/googleapis/google-cloud-java/tree/main/java-bare-metal-solution) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bare-metal-solution&core=gav) |
139| [Batch](https://github.com/googleapis/google-cloud-java/tree/main/java-batch) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-batch&core=gav) |
140| [BeyondCorp AppConnections](https://github.com/googleapis/google-cloud-java/tree/main/java-beyondcorp-appconnections) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-appconnections&core=gav) |
141| [BeyondCorp AppConnectors](https://github.com/googleapis/google-cloud-java/tree/main/java-beyondcorp-appconnectors) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-appconnectors&core=gav) |
142| [BeyondCorp AppGateways](https://github.com/googleapis/google-cloud-java/tree/main/java-beyondcorp-appgateways) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-appgateways&core=gav) |
143| [BeyondCorp ClientConnectorServices](https://github.com/googleapis/google-cloud-java/tree/main/java-beyondcorp-clientconnectorservices) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-clientconnectorservices&core=gav) |
144| [BeyondCorp ClientGateways](https://github.com/googleapis/google-cloud-java/tree/main/java-beyondcorp-clientgateways) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-beyondcorp-clientgateways&core=gav) |
145| [BigLake](https://github.com/googleapis/google-cloud-java/tree/main/java-biglake) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-biglake&core=gav) |
146| [BigQuery DataPolicy API](https://github.com/googleapis/google-cloud-java/tree/main/java-bigquerydatapolicy) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquerydatapolicy&core=gav) |
147| [BigQuery Migration](https://github.com/googleapis/google-cloud-java/tree/main/java-bigquerymigration) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-bigquerymigration&core=gav) |
148| [Certificate Manager](https://github.com/googleapis/google-cloud-java/tree/main/java-certificate-manager) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-certificate-manager&core=gav) |
149| [Commerce Consumer Procurement](https://github.com/googleapis/google-cloud-java/tree/main/java-cloudcommerceconsumerprocurement) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-cloudcommerceconsumerprocurement&core=gav) |
150| [Confidential Computing API](https://github.com/googleapis/google-cloud-java/tree/main/java-confidentialcomputing) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-confidentialcomputing&core=gav) |
151| [Connect Gateway API](https://github.com/googleapis/google-cloud-java/tree/main/java-gke-connect-gateway) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-gke-connect-gateway&core=gav) |
152| [Data Labeling](https://github.com/googleapis/google-cloud-java/tree/main/java-datalabeling) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datalabeling&core=gav) |
153| [Data Lineage](https://github.com/googleapis/google-cloud-java/tree/main/java-datalineage) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-datalineage&core=gav) |
154| [Dataflow](https://github.com/googleapis/google-cloud-java/tree/main/java-dataflow) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataflow&core=gav) |
155| [Dataform](https://github.com/googleapis/google-cloud-java/tree/main/java-dataform) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dataform&core=gav) |
156| [Dialogflow CX](https://github.com/googleapis/google-cloud-java/tree/main/java-dialogflow-cx) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-dialogflow-cx&core=gav) |
157| [Discovery Engine API](https://github.com/googleapis/google-cloud-java/tree/main/java-discoveryengine) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-discoveryengine&core=gav) |
158| [Distributed Edge](https://github.com/googleapis/google-cloud-java/tree/main/java-distributedcloudedge) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-distributedcloudedge&core=gav) |
159| [Document AI Warehouse](https://github.com/googleapis/google-cloud-java/tree/main/java-contentwarehouse) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-contentwarehouse&core=gav) |
160| [Enterprise Knowledge Graph](https://github.com/googleapis/google-cloud-java/tree/main/java-enterpriseknowledgegraph) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-enterpriseknowledgegraph&core=gav) |
161| [Error Reporting](https://github.com/googleapis/google-cloud-java/tree/main/java-errorreporting) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-errorreporting&core=gav) |
162| [Eventarc Publishing](https://github.com/googleapis/google-cloud-java/tree/main/java-eventarc-publishing) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-eventarc-publishing&core=gav) |
163| [KMS Inventory API](https://github.com/googleapis/google-cloud-java/tree/main/java-kmsinventory) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-kmsinventory&core=gav) |
164| [Life Sciences](https://github.com/googleapis/google-cloud-java/tree/main/java-life-sciences) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-life-sciences&core=gav) |
165| [Live Stream API](https://github.com/googleapis/google-cloud-java/tree/main/java-video-live-stream) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-live-stream&core=gav) |
166| [Logging Logback Appender](https://github.com/googleapis/java-logging-logback) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-logging-logback&core=gav) |
167| [Logging Servlet Initializer](https://github.com/googleapis/java-logging-servlet-initializer) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-logging-servlet-initializer&core=gav) |
168| [Maps Platform Datasets API](https://github.com/googleapis/google-cloud-java/tree/main/java-maps-mapsplatformdatasets) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.maps%20AND%20a:google-maps-mapsplatformdatasets&core=gav) |
169| [Media Translation API](https://github.com/googleapis/google-cloud-java/tree/main/java-mediatranslation) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-mediatranslation&core=gav) |
170| [Monitoring Metrics Scopes](https://github.com/googleapis/google-cloud-java/tree/main/java-monitoring-metricsscope) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-monitoring-metricsscope&core=gav) |
171| [NIO Filesystem Provider for Storage](https://github.com/googleapis/java-storage-nio) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-nio&core=gav) |
172| [Network Security API](https://github.com/googleapis/google-cloud-java/tree/main/java-network-security) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-network-security&core=gav) |
173| [Phishing Protection](https://github.com/googleapis/google-cloud-java/tree/main/java-phishingprotection) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-phishingprotection&core=gav) |
174| [Private Catalog](https://github.com/googleapis/google-cloud-java/tree/main/java-private-catalog) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-private-catalog&core=gav) |
175| [Pub/Sub Lite Flink Connector](https://github.com/googleapis/java-pubsublite-flink) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-pubsublite-flink&core=gav) |
176| [Public Certificate Authority](https://github.com/googleapis/google-cloud-java/tree/main/java-publicca) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-publicca&core=gav) |
177| [Recommendations AI](https://github.com/googleapis/google-cloud-java/tree/main/java-recommendations-ai) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-recommendations-ai&core=gav) |
178| [Registry API](https://github.com/googleapis/google-cloud-java/tree/main/java-apigee-registry) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-apigee-registry&core=gav) |
179| [Run](https://github.com/googleapis/google-cloud-java/tree/main/java-run) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-run&core=gav) |
180| [Security Command Center Settings API](https://github.com/googleapis/google-cloud-java/tree/main/java-securitycenter-settings) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-securitycenter-settings&core=gav) |
181| [Storage Insights API](https://github.com/googleapis/google-cloud-java/tree/main/java-storageinsights) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-storageinsights&core=gav) |
182| [Support API](https://github.com/googleapis/google-cloud-java/tree/main/java-cloudsupport) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-cloudsupport&core=gav) |
183| [VMware Engine](https://github.com/googleapis/google-cloud-java/tree/main/java-vmwareengine) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vmwareengine&core=gav) |
184| [Video Stitcher API](https://github.com/googleapis/google-cloud-java/tree/main/java-video-stitcher) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-video-stitcher&core=gav) |
185| [Workstations](https://github.com/googleapis/google-cloud-java/tree/main/java-workstations) | [![preview][preview-stability]][preview-description] | [](https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-workstations&core=gav) |
186
187[//]: # (API_TABLE_END)
188
189If the service is not listed, [google-api-java-client][google-api-java-client-services] interfaces with additional Google Cloud APIs using a legacy REST interface.
190
191*When building Java applications, preference should be given to the libraries listed in the table.*
192
193
194
195## Specifying a Project ID
196
197Most `google-cloud` libraries require a project ID. There are multiple ways to specify this project ID.
198
1991. When using `google-cloud` libraries from within Compute/App Engine, there's no need to specify a project ID. It is automatically inferred from the production environment.
2002. When using `google-cloud` elsewhere, you can do one of the following:
201* Supply the project ID when building the service options. For example, to use Datastore from a project with ID "PROJECT_ID", you can write:
202
203 ```java
204 Datastore datastore = DatastoreOptions.newBuilder().setProjectId("PROJECT_ID").build().getService();
205 ```
206* Specify the environment variable `GOOGLE_CLOUD_PROJECT` to be your desired project ID.
207* Set the project ID using the [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already, and set the project ID from the command line. For example:
208
209 ```
210 gcloud config set project PROJECT_ID
211 ```
212
213`google-cloud` determines the project ID from the following sources in the listed order, stopping once it finds a value:
214
2151. The project ID supplied when building the service options
2162. Project ID specified by the environment variable `GOOGLE_CLOUD_PROJECT`
2173. The App Engine / Compute Engine project ID
2184. The project ID specified in the JSON credentials file pointed by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
2195. The Google Cloud SDK project ID
220
221In cases where the library may expect a project ID explicitly, we provide a helper that can provide the inferred project ID:
222 ```java
223 import com.google.cloud.ServiceOptions;
224 ...
225 String projectId = ServiceOptions.getDefaultProjectId();
226 ```
227
228## Authentication
229
230`google-cloud-java` uses
231[https://github.com/googleapis/google-auth-library-java](https://github.com/googleapis/google-auth-library-java)
232to authenticate requests. `google-auth-library-java` supports a wide range of authentication types;
233see the project's [README](https://github.com/google/google-auth-library-java/blob/main/README.md)
234and [javadoc](https://cloud.google.com/java/docs/reference/google-auth-library/latest/overview) for more
235details.
236
237### Google Cloud Platform environment
238
239When using Google Cloud libraries from a Google Cloud Platform environment such as Compute Engine,
240Kubernetes Engine, or App Engine, no additional authentication steps are necessary.
241
242For example:
243
244```java
245Storage storage = StorageOptions.getDefaultInstance().getService();
246```
247
248or:
249
250```java
251CloudTasksClient cloudTasksClient = CloudTasksClient.create();
252```
253
254### Other environments
255
256#### Using a service account (recommended)
257
2581. [Generate a JSON service account key](https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts).
259
2602. After downloading that key, you must do one of the following:
261 * Define the environment variable GOOGLE_APPLICATION_CREDENTIALS to be the location of the key.
262 For example:
263 ```bash
264 export GOOGLE_APPLICATION_CREDENTIALS=/path/to/my/key.json
265 ```
266 * Supply the JSON credentials file when building the service options. For example, this Storage
267 object has the necessary permissions to interact with your Google Cloud Storage data:
268 ```java
269 Storage storage = StorageOptions.newBuilder()
270 .setCredentials(ServiceAccountCredentials.fromStream(new FileInputStream("/path/to/my/key.json")))
271 .build()
272 .getService();
273 ```
274
275#### Local development/testing
276
277If running locally for development/testing, you can use the [Google Cloud SDK](https://cloud.google.com/sdk/).
278Create Application Default Credentials with `gcloud auth application-default login`, and then
279`google-cloud` will automatically detect such credentials.
280
281#### Existing OAuth2 access token
282
283If you already have an OAuth2 access token, you can use it to authenticate (notice that in this case, the
284access token will not be automatically refreshed):
285
286```java
287Credentials credentials = GoogleCredentials.create(new AccessToken(accessToken, expirationTime));
288Storage storage = StorageOptions.newBuilder()
289 .setCredentials(credentials)
290 .build()
291 .getService();
292```
293
294or:
295
296```java
297Credentials credentials = GoogleCredentials.create(new AccessToken(accessToken, expirationTime));
298CloudTasksSettings cloudTasksSettings = CloudTasksSettings.newBuilder()
299 .setCredentialProvider(FixedCredentialsProvider.create(credentials))
300 .build();
301CloudTasksClient cloudTasksClient = CloudTasksClient.create(cloudTasksSettings);
302```
303
304### Application Default Credentials
305
306If no credentials are provided, `google-cloud` will attempt to detect them from the environment
307using `GoogleCredentials.getApplicationDefault()` which will search for Application Default
308Credentials in the following locations (in order):
309
3101. The credentials file pointed to by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
3112. Credentials provided by the Google Cloud SDK `gcloud auth application-default login` command
3123. Google App Engine built-in credentials
3134. Google Cloud Shell built-in credentials
3145. Google Compute Engine built-in credentials
315
316## Troubleshooting
317
318To get help, follow the instructions in the [Troubleshooting document](https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md).
319
320## Configuring a Proxy
321
322Google Cloud client libraries use HTTPS and gRPC in underlying communication
323with the services.
324In both protocols, you can configure a proxy using `https.proxyHost`
325and (optional) `https.proxyPort` properties.
326
327### gRPC Custom Proxy Configuration
328
329For a more custom proxy with gRPC, you will need supply a `ProxyDetector` to
330the `ManagedChannelBuilder`:
331
332```java
333import com.google.api.core.ApiFunction;
334import com.google.api.gax.rpc.TransportChannelProvider;
335import com.google.cloud.tasks.v2.CloudTasksClient;
336import com.google.cloud.tasks.v2.CloudTasksSettings;
337import com.google.cloud.tasks.v2.stub.CloudTasksStubSettings;
338import io.grpc.HttpConnectProxiedSocketAddress;
339import io.grpc.ManagedChannelBuilder;
340import io.grpc.ProxiedSocketAddress;
341import io.grpc.ProxyDetector;
342
343import javax.annotation.Nullable;
344import java.io.IOException;
345import java.net.InetSocketAddress;
346import java.net.SocketAddress;
347
348public CloudTasksClient getService() throws IOException {
349 TransportChannelProvider transportChannelProvider =
350 CloudTasksStubSettings.defaultGrpcTransportProviderBuilder()
351 .setChannelConfigurator(
352 new ApiFunction<ManagedChannelBuilder, ManagedChannelBuilder>() {
353 @Override
354 public ManagedChannelBuilder apply(ManagedChannelBuilder managedChannelBuilder) {
355 return managedChannelBuilder.proxyDetector(
356 new ProxyDetector() {
357 @Nullable
358 @Override
359 public ProxiedSocketAddress proxyFor(SocketAddress socketAddress)
360 throws IOException {
361 return HttpConnectProxiedSocketAddress.newBuilder()
362 .setUsername(PROXY_USERNAME)
363 .setPassword(PROXY_PASSWORD)
364 .setProxyAddress(new InetSocketAddress(PROXY_HOST, PROXY_PORT))
365 .setTargetAddress((InetSocketAddress) socketAddress)
366 .build();
367 }
368 });
369 }
370 })
371 .build();
372 CloudTasksSettings cloudTasksSettings =
373 CloudTasksSettings.newBuilder()
374 .setTransportChannelProvider(transportChannelProvider)
375 .build();
376 return CloudTasksClient.create(cloudTasksSettings);
377}
378```
379
380## Long Running Operations
381
382Long running operations (LROs) are often used for API calls that are expected to
383take a long time to complete (e.g. provisioning a GCE instance or a Dataflow pipeline).
384The initial API call creates an "operation" on the server and returns an operation ID
385to track its progress.
386
387Our generated gRPC clients provide a nice interface for starting the operation and
388then waiting for the operation to complete. This is accomplished by returning an
389[`OperationFuture`](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture).
390When you call `get()` on the `OperationFuture` we poll the operation endpoint to
391check on the operation. These polling operations have a default timeout that
392varies from service to service and will throw a `java.util.concurrent.CancellationException`
393with the message: `Task was cancelled.` after that timeout has been reached.
394
395### Configuring LRO Timeouts
396
397```java
398ClusterControllerSettings.Builder settingsBuilder = ClusterControllerSettings.newBuilder();
399TimedRetryAlgorithm timedRetryAlgorithm = OperationTimedPollAlgorithm.create(
400 RetrySettings.newBuilder()
401 .setInitialRetryDelay(Duration.ofMillis(500L))
402 .setRetryDelayMultiplier(1.5)
403 .setMaxRetryDelay(Duration.ofMillis(5000L))
404 .setInitialRpcTimeout(Duration.ZERO) // ignored
405 .setRpcTimeoutMultiplier(1.0) // ignored
406 .setMaxRpcTimeout(Duration.ZERO) // ignored
407 .setTotalTimeout(Duration.ofHours(24L)) // set polling timeout to 24 hours
408 .build());
409settingsBuilder.createClusterOperationSettings()
410 .setPollingAlgorithm(timedRetryAlgorithm);
411ClusterControllerClient clusterControllerClient = ClusterControllerClient.create(settingsBuilder.build());
412```
413
414## Managing Dependencies
415
416If you are using more than one Google Cloud client library, we recommend you use one of
417our Bill of Material (BOM) artifacts to help manage dependency versions. For more information,
418see [Using the Cloud Client Libraries](https://cloud.google.com/java/docs/bom).
419
420## Java Versions
421
422Java 8 or above is required for using the clients in this repository.
423
424## Supported Platforms
425
426Clients in this repository use either HTTP or gRPC for the transport layer. All
427HTTP-based clients should work in all environments.
428
429For clients that use gRPC, the supported platforms are constrained by the platforms
430that [Forked Tomcat Native](http://netty.io/wiki/forked-tomcat-native.html) supports,
431which for architectures means only x86_64, and for operating systems means Mac OS X,
432Windows, and Linux. Additionally, gRPC constrains the use of platforms with
433threading restrictions.
434
435Thus, the following are not supported:
436
437- Android
438 - Consider [Firebase](https://firebase.google.com), which includes many of these APIs.
439 - It is possible to use these libraries in many cases, although it is unsupported.
440 You can find examples, such as [this one](https://github.com/GoogleCloudPlatform/android-docs-samples/tree/main/speech/SpeechRecognitionClient),
441 in this [example repository](https://github.com/GoogleCloudPlatform/android-docs-samples) but consider the risks carefully before using these libraries in an application.
442- Raspberry Pi (since it runs on the ARM architecture)
443- Google App Engine Standard Java 7
444
445The following environments should work (among others):
446
447- standalone Windows on x86_64
448- standalone Mac OS X on x86_64
449- standalone Linux on x86_64
450- Google Compute Engine (GCE)
451- Google Container Engine (GKE)
452- Google App Engine Standard Java 8 (GAE Std J8)
453- Google App Engine Flex (GAE Flex)
454- Alpine Linux (Java 11+)
455
456## Testing
457
458This library provides tools to help write tests for code that uses google-cloud services.
459
460See [TESTING] to read more about using our testing helpers.
461
462## Versioning
463
464This library follows [Semantic Versioning](http://semver.org/), with some
465additional qualifications:
466
4671. Components marked with `@BetaApi` or `@Experimental` are considered to be "0.x"
468 features inside a "1.x" library. This means they can change between minor and
469 patch releases in incompatible ways. These features should not be used by any
470 library "B" that itself has consumers, unless the components of library B that
471 use `@BetaApi` features are also marked with `@BetaApi`. Features marked as
472 `@BetaApi` are on a path to eventually become "1.x" features with the marker
473 removed.
474
475 **Special exception for google-cloud-java**: google-cloud-java is
476 allowed to depend on `@BetaApi` features in gax-java without declaring the consuming
477 code `@BetaApi`, because gax-java and google-cloud-java move in step
478 with each other. For this reason, gax-java should not be used
479 independently of google-cloud-java.
480
4811. Components marked with `@InternalApi` are technically public, but only
482 because of the limitations of Java's access
483 modifiers. For the purposes of semver, they should be considered private.
484
4851. Interfaces marked with `@InternalExtensionOnly` are public, but should only be
486 implemented by internal classes. For the purposes of semver, we reserve the right
487 to add to these interfaces without default implementations (for Java 7).
488
489Please note these clients are currently under active development. Any release versioned 0.x.y is
490subject to backwards incompatible changes at any time.
491
492### Stable
493
494Libraries defined at a Stable quality level are expected to be stable and all updates in the
495libraries are guaranteed to be backwards-compatible. Any backwards-incompatible changes will lead
496to the major version increment (1.x.y -> 2.0.0).
497
498### Preview
499
500Libraries defined at a Preview quality level are still a work-in-progress and
501are more likely to get backwards-incompatible updates. Additionally, it's possible for Preview
502libraries to get deprecated and deleted before ever being promoted to Preview or Stable.
503
504## IDE Plugins
505
506If you're using IntelliJ or Eclipse, you can add client libraries to your project using these IDE plugins:
507* [Cloud Tools for IntelliJ](https://cloud.google.com/tools/intellij/docs/client-libraries?utm_source=github&utm_medium=google-cloud-java&utm_campaign=ToolsforIntelliJ)
508* [Cloud Tools for Eclipse](https://cloud.google.com/eclipse/docs/libraries?utm_source=github&utm_medium=google-cloud-java&utm_campaign=ToolsforEclipse)
509
510Besides adding client libraries, the plugins provide additional functionality, such as service account
511key management. Refer to the documentation for each plugin for more details.
512
513These client libraries can be used on App Engine standard for Java 8 runtime and App Engine flexible
514(including the Compat runtime). Most of the libraries do not work on the App Engine standard for Java 7
515runtime. However, Datastore, Storage, and Bigquery should work.
516
517## Contributing
518
519Contributions to this library are always welcome and highly encouraged.
520
521See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/googleapis/google-cloud-common/blob/main/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started.
522
523Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.
524
525## License
526
527Apache 2.0 - See [LICENSE] for more information.
528
529[cloud-java]: https://cloud.google.com/java
530[stable-stability]: https://img.shields.io/badge/stability-stable-green
531[stable-description]: #stable
532[preview-stability]: https://img.shields.io/badge/stability-preview-yellow
533[preview-description]: #preview
534[google-api-java-client-services]: https://github.com/googleapis/google-api-java-client-services#supported-google-apis
535[CONTRIBUTING]:https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
536[code-of-conduct]:https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
537[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
538[TESTING]: https://github.com/googleapis/google-cloud-java/blob/main/TESTING.md
539[cloud-platform]: https://cloud.google.com/
540[cloud-platform-docs]: https://cloud.google.com/docs/
541[client-lib-docs]: https://cloud.google.com/java/docs/reference
542