Repository navigation
Expand file tree
/
Copy pathbigtable-instance-api.html
More file actions
525 lines (401 loc) · 33.3 KB
/
Copy pathbigtable-instance-api.html
File metadata and controls
525 lines (401 loc) · 33.3 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Instance Admin API — google-cloud 0.23.0 documentation</title>
<link rel="shortcut icon" href="_static/favicon.ico"/>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="google-cloud 0.23.0 documentation" href="index.html"/>
<link rel="next" title="Table Admin API" href="bigtable-table-api.html"/>
<link rel="prev" title="Base for Everything" href="bigtable-client-intro.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> google-cloud
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">google-cloud</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="google-cloud-api.html">Shared Core Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="google-cloud-config.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="google-cloud-auth.html">Authentication</a></li>
<li class="toctree-l1"><a class="reference internal" href="iterators.html">Iterators</a></li>
<li class="toctree-l1"><a class="reference internal" href="operation-api.html">Long-Running Operations</a></li>
</ul>
<p class="caption"><span class="caption-text">Datastore</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="datastore-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-entities.html">Entities</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-keys.html">Keys</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-queries.html">Queries</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-transactions.html">Transactions</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-batches.html">Batches</a></li>
<li class="toctree-l1"><a class="reference internal" href="datastore-helpers.html">Helpers</a></li>
</ul>
<p class="caption"><span class="caption-text">Storage</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="storage-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="storage-blobs.html">Blobs / Objects</a></li>
<li class="toctree-l1"><a class="reference internal" href="storage-buckets.html">Buckets</a></li>
<li class="toctree-l1"><a class="reference internal" href="storage-acl.html">ACL</a></li>
<li class="toctree-l1"><a class="reference internal" href="storage-batch.html">Batches</a></li>
</ul>
<p class="caption"><span class="caption-text">Pub/Sub</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="pubsub-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubsub-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubsub-topic.html">Topics</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubsub-subscription.html">Subscriptions</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubsub-message.html">Message</a></li>
<li class="toctree-l1"><a class="reference internal" href="pubsub-iam.html">IAM Policy</a></li>
</ul>
<p class="caption"><span class="caption-text">BigQuery</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="bigquery-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-dataset.html">Datasets</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-job.html">Jobs</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-table.html">Tables</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-query.html">Query</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigquery-schema.html">Schemas</a></li>
</ul>
<p class="caption"><span class="caption-text">Cloud Bigtable</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="bigtable-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-client-intro.html">Base for Everything</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Instance Admin API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#list-instances">List Instances</a></li>
<li class="toctree-l2"><a class="reference internal" href="#instance-factory">Instance Factory</a></li>
<li class="toctree-l2"><a class="reference internal" href="#create-a-new-instance">Create a new Instance</a></li>
<li class="toctree-l2"><a class="reference internal" href="#check-on-current-operation">Check on Current Operation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#get-metadata-for-an-existing-instance">Get metadata for an existing Instance</a></li>
<li class="toctree-l2"><a class="reference internal" href="#update-an-existing-instance">Update an existing Instance</a></li>
<li class="toctree-l2"><a class="reference internal" href="#delete-an-existing-instance">Delete an existing Instance</a></li>
<li class="toctree-l2"><a class="reference internal" href="#next-step">Next Step</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-table-api.html">Table Admin API</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-data-api.html">Data API</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-instance.html">Instance</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-cluster.html">Cluster</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-table.html">Table</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-column-family.html">Column Families</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-row.html">Bigtable Row</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-row-filters.html">Bigtable Row Filters</a></li>
<li class="toctree-l1"><a class="reference internal" href="bigtable-row-data.html">Row Data</a></li>
</ul>
<p class="caption"><span class="caption-text">Resource Manager</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="resource-manager-api.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="resource-manager-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="resource-manager-project.html">Projects</a></li>
</ul>
<p class="caption"><span class="caption-text">DNS</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="dns-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="dns-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="dns-zone.html">Managed Zones</a></li>
<li class="toctree-l1"><a class="reference internal" href="dns-resource-record-set.html">Resource Record Sets</a></li>
<li class="toctree-l1"><a class="reference internal" href="dns-changes.html">Change Sets</a></li>
</ul>
<p class="caption"><span class="caption-text">Stackdriver Logging</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="logging-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-usage.html#cloud-logging-handler">Cloud Logging Handler</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-usage.html#fluentd-logging-handlers">fluentd logging handlers</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-usage.html#cloud-logging-handler-transports">Cloud Logging Handler transports</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-logger.html">Logger</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-entries.html">Entries</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-metric.html">Metrics</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-sink.html">Sinks</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-stdlib-usage.html">Integration with Python logging module</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-handlers.html">Python Logging Module Handler</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-handlers-app-engine.html">Google App Engine flexible Log Handler</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-handlers-container-engine.html">Google Container Engine Log Handler</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-transports-sync.html">Python Logging Handler Sync Transport</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-transports-thread.html">Python Logging Handler Threaded Transport</a></li>
<li class="toctree-l1"><a class="reference internal" href="logging-transports-base.html">Python Logging Handler Sync Transport</a></li>
</ul>
<p class="caption"><span class="caption-text">Stackdriver Error Reporting</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="error-reporting-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="error-reporting-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="error-reporting-util.html">Error Reporting Utilities</a></li>
</ul>
<p class="caption"><span class="caption-text">Stackdriver Monitoring</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="monitoring-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-metric.html">Metric Descriptors</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-resource.html">Monitored Resource Descriptors</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-group.html">Groups</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-query.html">Time Series Query</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-timeseries.html">Time Series</a></li>
<li class="toctree-l1"><a class="reference internal" href="monitoring-label.html">Label Descriptors</a></li>
</ul>
<p class="caption"><span class="caption-text">Translate</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="translate-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="translate-client.html">Client</a></li>
</ul>
<p class="caption"><span class="caption-text">Vision</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="vision-usage.html">Using the Vision API</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-annotations.html">Vision Annotations</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-batch.html">Vision Batch</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-client.html">Vision Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-color.html">Vision Image Properties</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-crop-hint.html">Vision Crop Hint</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-entity.html">Vision Entity</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-feature.html">Vision Feature</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-face.html">Vision Face</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-image.html">Vision Image</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-safe-search.html">Vision Safe Search</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-text.html">Vision Full Text</a></li>
<li class="toctree-l1"><a class="reference internal" href="vision-web.html">Vision Web Annotations</a></li>
</ul>
<p class="caption"><span class="caption-text">Natural Language</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="language-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="language-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="language-document.html">Document</a></li>
<li class="toctree-l1"><a class="reference internal" href="language-responses.html">Natural Language Response Classes</a></li>
</ul>
<p class="caption"><span class="caption-text">Speech</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="speech-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-encoding.html">Speech Encoding</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-operation.html">Speech Operation</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-result.html">Speech Result</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-sample.html">Speech Sample</a></li>
<li class="toctree-l1"><a class="reference internal" href="speech-alternative.html">Speech Alternative</a></li>
</ul>
<p class="caption"><span class="caption-text">Runtime Configuration</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="runtimeconfig-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="runtimeconfig-client.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="runtimeconfig-config.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="runtimeconfig-variable.html">Variables</a></li>
</ul>
<p class="caption"><span class="caption-text">Spanner</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="spanner-usage.html">Using the API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-client-usage.html">Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-instance-usage.html">Instance Admin API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-database-usage.html">Database Admin API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-session-crud-usage.html">Session Creation / Deletion</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-session-implicit-txn-usage.html">Implicit Transactions</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-session-pool-usage.html">Session Pools</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-batch-usage.html">Batching Modifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-snapshot-usage.html">Read-only Transactions via Snapshots</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-transaction-usage.html">Read-write Transactions</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-client-api.html">Spanner Client</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-instance-api.html">Instance API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-database-api.html">Database API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-session-api.html">Session API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-session-api.html#module-google.cloud.spanner.pool">Session Pools API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-keyset-api.html">Keyset API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-snapshot-api.html">Snapshot API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-batch-api.html">Batch API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-transaction-api.html">Transaction API</a></li>
<li class="toctree-l1"><a class="reference internal" href="spanner-streamed-api.html">StreamedResultSet API</a></li>
</ul>
<p class="caption"><span class="caption-text">External Links</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://github.com/GoogleCloudPlatform/google-cloud-python/">GitHub</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/GoogleCloudPlatform/google-cloud-python/issues">Issues</a></li>
<li class="toctree-l1"><a class="reference external" href="http://stackoverflow.com/questions/tagged/google-cloud-python">Stack Overflow</a></li>
<li class="toctree-l1"><a class="reference external" href="https://pypi.python.org/pypi/google-cloud">PyPI</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">google-cloud</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Instance Admin API</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/bigtable-instance-api.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="instance-admin-api">
<h1>Instance Admin API<a class="headerlink" href="#instance-admin-api" title="Permalink to this headline">#</a></h1>
<p>After creating a <a class="reference internal" href="bigtable-client.html#google.cloud.bigtable.client.Client" title="google.cloud.bigtable.client.Client"><code class="xref py py-class docutils literal"><span class="pre">Client</span></code></a>, you can
interact with individual instances for a project.</p>
<div class="section" id="list-instances">
<h2>List Instances<a class="headerlink" href="#list-instances" title="Permalink to this headline">#</a></h2>
<p>If you want a comprehensive list of all existing instances, make a
<a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L44-L46">ListInstances</a> API request with
<a class="reference internal" href="bigtable-client.html#google.cloud.bigtable.client.Client.list_instances" title="google.cloud.bigtable.client.Client.list_instances"><code class="xref py py-meth docutils literal"><span class="pre">Client.list_instances()</span></code></a>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instances</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">list_instances</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="instance-factory">
<h2>Instance Factory<a class="headerlink" href="#instance-factory" title="Permalink to this headline">#</a></h2>
<p>To create an <a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance" title="google.cloud.bigtable.instance.Instance"><code class="xref py py-class docutils literal"><span class="pre">Instance</span></code></a> object:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instance</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">instance</span><span class="p">(</span><span class="n">instance_id</span><span class="p">,</span> <span class="n">location_id</span><span class="p">,</span>
<span class="n">display_name</span><span class="o">=</span><span class="n">display_name</span><span class="p">)</span>
</pre></div>
</div>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">location_id</span></code> is the ID of the location in which the instance’s cluster
will be hosted, e.g. <code class="docutils literal"><span class="pre">'us-central1-c'</span></code>. <code class="docutils literal"><span class="pre">location_id</span></code> is required for
instances which do not already exist.</li>
<li><code class="docutils literal"><span class="pre">display_name</span></code> is optional. When not provided, <code class="docutils literal"><span class="pre">display_name</span></code> defaults
to the <code class="docutils literal"><span class="pre">instance_id</span></code> value.</li>
</ul>
<p>You can also use <code class="xref py py-meth docutils literal"><span class="pre">Client.instance()</span></code> to create a local wrapper for
instances that have already been created with the API, or through the web
conole:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instance</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">instance</span><span class="p">(</span><span class="n">existing_instance_id</span><span class="p">)</span>
<span class="n">instance</span><span class="o">.</span><span class="n">reload</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="create-a-new-instance">
<h2>Create a new Instance<a class="headerlink" href="#create-a-new-instance" title="Permalink to this headline">#</a></h2>
<p>After creating the instance object, make a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L66-L68">CreateInstance</a> API request
with <a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.create" title="google.cloud.bigtable.instance.Instance.create"><code class="xref py py-meth docutils literal"><span class="pre">create()</span></code></a>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instance</span><span class="o">.</span><span class="n">display_name</span> <span class="o">=</span> <span class="s1">'My very own instance'</span>
<span class="n">instance</span><span class="o">.</span><span class="n">create</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="check-on-current-operation">
<h2>Check on Current Operation<a class="headerlink" href="#check-on-current-operation" title="Permalink to this headline">#</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When modifying an instance (via a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L66-L68">CreateInstance</a> request), the Bigtable
API will return a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/longrunning/operations.proto#L73-L102">long-running operation</a> and a corresponding
<code class="xref py py-class docutils literal"><span class="pre">Operation</span></code> object
will be returned by
<a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.create" title="google.cloud.bigtable.instance.Instance.create"><code class="xref py py-meth docutils literal"><span class="pre">create()</span></code></a>.</p>
</div>
<p>You can check if a long-running operation (for a
<a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.create" title="google.cloud.bigtable.instance.Instance.create"><code class="xref py py-meth docutils literal"><span class="pre">create()</span></code></a> has finished
by making a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/longrunning/operations.proto#L43-L45">GetOperation</a> request with
<code class="xref py py-meth docutils literal"><span class="pre">Operation.finished()</span></code>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">operation</span> <span class="o">=</span> <span class="n">instance</span><span class="o">.</span><span class="n">create</span><span class="p">()</span>
<span class="gp">>>> </span><span class="n">operation</span><span class="o">.</span><span class="n">finished</span><span class="p">()</span>
<span class="go">True</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Once an <code class="xref py py-class docutils literal"><span class="pre">Operation</span></code> object
has returned <a class="reference external" href="https://docs.python.org/2/library/constants.html#True" title="(in Python v2.7)"><code class="xref py py-data docutils literal"><span class="pre">True</span></code></a> from
<code class="xref py py-meth docutils literal"><span class="pre">finished()</span></code>, the
object should not be re-used. Subsequent calls to
<code class="xref py py-meth docutils literal"><span class="pre">finished()</span></code>
will result in a <a class="reference external" href="https://docs.python.org/2/library/exceptions.html#exceptions.ValueError" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">ValueError</span></code></a>.</p>
</div>
</div>
<div class="section" id="get-metadata-for-an-existing-instance">
<h2>Get metadata for an existing Instance<a class="headerlink" href="#get-metadata-for-an-existing-instance" title="Permalink to this headline">#</a></h2>
<p>After creating the instance object, make a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L38-L40">GetInstance</a> API request
with <a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.reload" title="google.cloud.bigtable.instance.Instance.reload"><code class="xref py py-meth docutils literal"><span class="pre">reload()</span></code></a>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instance</span><span class="o">.</span><span class="n">reload</span><span class="p">()</span>
</pre></div>
</div>
<p>This will load <code class="docutils literal"><span class="pre">display_name</span></code> for the existing <code class="docutils literal"><span class="pre">instance</span></code> object.</p>
</div>
<div class="section" id="update-an-existing-instance">
<h2>Update an existing Instance<a class="headerlink" href="#update-an-existing-instance" title="Permalink to this headline">#</a></h2>
<p>After creating the instance object, make an <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L93-L95">UpdateInstance</a> API request
with <a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.update" title="google.cloud.bigtable.instance.Instance.update"><code class="xref py py-meth docutils literal"><span class="pre">update()</span></code></a>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">client</span><span class="o">.</span><span class="n">display_name</span> <span class="o">=</span> <span class="s1">'New display_name'</span>
<span class="n">instance</span><span class="o">.</span><span class="n">update</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="delete-an-existing-instance">
<h2>Delete an existing Instance<a class="headerlink" href="#delete-an-existing-instance" title="Permalink to this headline">#</a></h2>
<p>Make a <a class="reference external" href="https://github.com/GoogleCloudPlatform/cloud-bigtable-client/blob/2aae624081f652427052fb652d3ae43d8ac5bf5a/bigtable-protos/src/main/proto/google/bigtable/admin/instance/v1/bigtable_instance_service.proto#L109-L111">DeleteInstance</a> API request with
<a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance.delete" title="google.cloud.bigtable.instance.Instance.delete"><code class="xref py py-meth docutils literal"><span class="pre">delete()</span></code></a>:</p>
<div class="code python highlight-default"><div class="highlight"><pre><span></span><span class="n">instance</span><span class="o">.</span><span class="n">delete</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="section" id="next-step">
<h2>Next Step<a class="headerlink" href="#next-step" title="Permalink to this headline">#</a></h2>
<p>Now we go down the hierarchy from
<a class="reference internal" href="bigtable-instance.html#google.cloud.bigtable.instance.Instance" title="google.cloud.bigtable.instance.Instance"><code class="xref py py-class docutils literal"><span class="pre">Instance</span></code></a> to a
<a class="reference internal" href="bigtable-table.html#google.cloud.bigtable.table.Table" title="google.cloud.bigtable.table.Table"><code class="xref py py-class docutils literal"><span class="pre">Table</span></code></a>.</p>
<p>Head next to learn about the <a class="reference internal" href="bigtable-table-api.html"><span class="doc">Table Admin API</span></a>.</p>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="bigtable-table-api.html" class="btn btn-neutral float-right" title="Table Admin API" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="bigtable-client-intro.html" class="btn btn-neutral" title="Base for Everything" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2014, Google.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.23.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>