forked from googleapis/google-cloud-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
162 lines (150 loc) · 9.25 KB
/
index.html
File metadata and controls
162 lines (150 loc) · 9.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>gcloud</title>
<meta name="description" content="Java idiomatic client for Google Cloud services">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/github.min.css">
<link rel="stylesheet" href="css/site.css">
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono|Roboto:300,400,700,700italic,400italic|Open+Sans:300' rel='stylesheet' type='text/css'>
</head>
<body>
<header class="page-header" role="banner">
<h1 class="logo"><img src="img/logo-full.svg" alt="Google Cloud Platform" /></h1>
<nav class="main-nav">
<div class="nav-current">Java</div>
<ul class="menu">
<li>
<a href="#" title="Java docs page">
<img src="img/icon-lang-java.png" alt="Java icon" class="menu-icon" width="24" height="24" />
Java
</a>
</li>
<li>
<a href="https://googlecloudplatform.github.io/gcloud-node/" title="Node.js docs page">
<img src="img/icon-lang-nodejs.svg" alt="Node.js icon" class="menu-icon" />
Node.js
</a>
</li>
<li>
<a href="https://googlecloudplatform.github.io/gcloud-python/" title="Python docs page">
<img src="img/icon-lang-python.svg" alt="Python icon" class="menu-icon" />
Python
</a>
</li>
<li>
<a href="https://googlecloudplatform.github.io/gcloud-ruby/" title="Ruby docs page">
<img src="img/icon-lang-ruby.svg" alt="Ruby icon" class="menu-icon" />
Ruby
</a>
</li>
</ul>
</nav><!-- end of .main-nav -->
</header><!-- end of .page-header -->
<article class="main" role="main">
<section class="hero-banner">
<div class="container clearfix">
<div class="col col-left">
<h1>gcloud</h1>
<p>Google Cloud Client Library for Java - an idiomatic, intuitive, and natural way for Java developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage.</p>
</div><!-- end of .col.col-left -->
<div class="col col-right">
<h2>Quickstart with Maven: Add gcloud to your pom.xml</h2>
<pre><dependency>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java</artifactId>
<version>0.0.6</version>
</dependency></pre>
</div><!-- end of .col.col-right -->
</div><!-- end of .container -->
</section><!-- end of .hero-banner -->
<section class="block featuring">
<div class="container">
<ul class="featuring-links">
<li>
<a href="./apidocs/index.html" title="gcloud-java docs" class="btn btn-docs">
<img src="img/icon-lang-java.png" alt="Java icon" class="menu-icon" />
Read the Docs
</a>
</li>
<li>
<a href="https://github.com/GoogleCloudPlatform/gcloud-java" title="gcloud-java on Github" class="ext-link">
<img src="img/icon-link-github.svg" alt="Github icon" />
Github
</a>
</li>
<li>
<a href="https://github.com/GoogleCloudPlatform/gcloud-java/issues" title="gcloud-java issues on Github" class="ext-link">
<img src="img/icon-link-github.svg" alt="Github icon" />
Issues
</a>
</li>
<li>
<a href="http://stackoverflow.com/questions/tagged/gcloud-java" title="gcloud on StackOverflow" class="ext-link">
<img src="img/icon-link-stackoverflow.svg" alt="StackOverflow icon" />
StackOverflow
</a>
</li>
<li>
<a href="./project-info.html" title="Java package manager" class="ext-link">
<img src="img/icon-link-package-manager.svg" alt="Package Manager icon" />
Package Information
</a>
</li>
</ul>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block about">
<div class="container clearfix">
<h3 class="block-title">What is it?</h3>
<p><code>gcloud</code> is a client library for accessing Google
Cloud Platform services that significantly reduces the boilerplate
code you have to write. The library provides high-level API
abstractions so they're easier to understand. It embraces
idioms of Java, works well with the standard library, and
integrates better with your codebase.
All this means you spend more time creating code that matters
to you.</p>
<p><code>gcloud</code> is configured to access Google Cloud Platform
services and authorize (OAuth 2.0) automatically on your behalf.
Add the <code>gcloud</code> dependency to your project and get a private key to be
up and ready to go. Better yet, if you are running on a Google
Compute Engine instance, the private key is automatically detected.
<h4>Example: Retrieve Datastore Entries</h4>
<div hljs="" language="js">
<pre><code class="hljs java"><span class="hljs-keyword">import</span> com.google.gcloud.datastore.Datastore;
<span class="hljs-keyword">import</span> com.google.gcloud.datastore.DatastoreFactory;
<span class="hljs-keyword">import</span> com.google.gcloud.datastore.DatastoreOptions;
<span class="hljs-keyword">import</span> com.google.gcloud.datastore.Entity;
<span class="hljs-keyword">import</span> com.google.gcloud.datastore.Key;
<span class="hljs-keyword">import</span> com.google.gcloud.datastore.KeyFactory;
DatastoreOptions options = DatastoreOptions.builder().projectId(<span class="hljs-string">PROJECT_ID</span>).build();
Datastore datastore = DatastoreFactory.instance().get(options);
KeyFactory keyFactory = datastore.newKeyFactory().kind(<span class="hljs-string">KIND</span>);
Key key = keyFactory.newKey(keyName);
Entity entity = datastore.get(key);</code></pre></div>
</div><!-- end of .container -->
</section><!-- end of .featuring -->
<section class="block faq">
<div class="container">
<h3 class="block-title">FAQ</h3>
<h4>What is the relationship between the gcloud-java library and the gcloud command-line tool?</h4>
<p>Both the gcloud command-line tool and gcloud-java library are a part of the Google Cloud SDK: a collection of tools and libraries that enable you to easily create and manage resources on the Google Cloud Platform. The gcloud command-line tool can be used to manage both your development workflow and your Google Cloud Platform resources while the gcloud-java library is the Google Cloud Client Library for Java.</p>
<h4>What is the relationship between gcloud and the Google APIs Java Client?</h4>
<p>The <a href="https://github.com/google/google-api-java-client">Google APIs Java Client</a> is a client library for using the broad set of Google APIs. gcloud is built specifically for the Google Cloud Platform and is the recommended way to integrate Google Cloud APIs into your Java applications. If your application requires both Google Cloud Platform and other Google APIs, the 2 libraries may be used by your application.</p>
</div><!-- end of .container -->
</section><!-- end of .faq -->
</article><!-- end of .main -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>