/
snippet_metadata.google.spanner.admin.instance.v1.json
657 lines (657 loc) · 29 KB
/
snippet_metadata.google.spanner.admin.instance.v1.json
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
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
{
"clientLibrary": {
"name": "cloud.google.com/go/spanner/admin/instance/apiv1",
"version": "1.46.0",
"language": "GO",
"apis": [
{
"id": "google.spanner.admin.instance.v1",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "spanner_v1_generated_InstanceAdmin_CreateInstance_sync",
"title": "spanner CreateInstance Sample",
"description": "CreateInstance creates an instance and begins preparing it to begin serving. The\nreturned [long-running operation][google.longrunning.Operation]\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request: \n\n* The instance is readable via the API, with all requested attributes\nbut no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation: \n\n* Cancelling the operation renders the instance immediately unreadable\nvia the API.\n* The instance can be deleted.\n* All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation: \n\n* Billing for all successfully-allocated resources begins (some types\nmay have lower than the requested levels).\n* Databases can be created in the instance.\n* The instance's allocated resource levels are readable via the API.\n* The instance's state becomes `READY`.\n\nThe returned [long-running operation][google.longrunning.Operation] will\nhave a name of the format `<instance_name>/operations/<operation_id>` and\ncan be used to track creation of the instance. The\n[metadata][google.longrunning.Operation.metadata] field type is\n[CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].\nThe [response][google.longrunning.Operation.response] field type is\n[Instance][google.spanner.admin.instance.v1.Instance], if successful.",
"file": "InstanceAdminClient/CreateInstance/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.CreateInstance",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.CreateInstanceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "CreateInstanceOperation",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "CreateInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_CreateInstanceConfig_sync",
"title": "spanner CreateInstanceConfig Sample",
"description": "CreateInstanceConfig creates an instance config and begins preparing it to be used. The\nreturned [long-running operation][google.longrunning.Operation]\ncan be used to track the progress of preparing the new\ninstance config. The instance config name is assigned by the caller. If the\nnamed instance config already exists, `CreateInstanceConfig` returns\n`ALREADY_EXISTS`.\n\nImmediately after the request returns: \n\n* The instance config is readable via the API, with all requested\nattributes. The instance config's\n[reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]\nfield is set to true. Its state is `CREATING`.\n\nWhile the operation is pending: \n\n* Cancelling the operation renders the instance config immediately\nunreadable via the API.\n* Except for deleting the creating resource, all other attempts to modify\nthe instance config are rejected.\n\nUpon completion of the returned operation: \n\n* Instances can be created using the instance configuration.\n* The instance config's\n[reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]\nfield becomes false. Its state becomes `READY`.\n\nThe returned [long-running operation][google.longrunning.Operation] will\nhave a name of the format\n`<instance_config_name>/operations/<operation_id>` and can be used to track\ncreation of the instance config. The\n[metadata][google.longrunning.Operation.metadata] field type is\n[CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].\nThe [response][google.longrunning.Operation.response] field type is\n[InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if\nsuccessful.\n\nAuthorization requires `spanner.instanceConfigs.create` permission on\nthe resource\n[parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].",
"file": "InstanceAdminClient/CreateInstanceConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.CreateInstanceConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.CreateInstanceConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "CreateInstanceConfigOperation",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "CreateInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_DeleteInstance_sync",
"title": "spanner DeleteInstance Sample",
"description": "DeleteInstance deletes an instance.\n\nImmediately upon completion of the request: \n\n* Billing ceases for all of the instance's reserved resources.\n\nSoon afterward: \n\n* The instance and *all of its databases* immediately and\nirrevocably disappear from the API. All data in the databases\nis permanently deleted.",
"file": "InstanceAdminClient/DeleteInstance/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.DeleteInstance",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.DeleteInstanceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "DeleteInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstance",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_DeleteInstanceConfig_sync",
"title": "spanner DeleteInstanceConfig Sample",
"description": "DeleteInstanceConfig deletes the instance config. Deletion is only allowed when no\ninstances are using the configuration. If any instances are using\nthe config, returns `FAILED_PRECONDITION`.\n\nOnly user managed configurations can be deleted.\n\nAuthorization requires `spanner.instanceConfigs.delete` permission on\nthe resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].",
"file": "InstanceAdminClient/DeleteInstanceConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.DeleteInstanceConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.DeleteInstanceConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "DeleteInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_GetIamPolicy_sync",
"title": "spanner GetIamPolicy Sample",
"description": "GetIamPolicy gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\n[resource][google.iam.v1.GetIamPolicyRequest.resource].",
"file": "InstanceAdminClient/GetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetIamPolicy",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.GetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.GetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.Policy",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "GetIamPolicy",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.GetIamPolicy",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_GetInstance_sync",
"title": "spanner GetInstance Sample",
"description": "GetInstance gets information about a particular instance.",
"file": "InstanceAdminClient/GetInstance/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.GetInstance",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.GetInstanceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*instancepb.Instance",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "GetInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstance",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_GetInstanceConfig_sync",
"title": "spanner GetInstanceConfig Sample",
"description": "GetInstanceConfig gets information about a particular instance configuration.",
"file": "InstanceAdminClient/GetInstanceConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.GetInstanceConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.GetInstanceConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*instancepb.InstanceConfig",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "GetInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.GetInstanceConfig",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigOperations_sync",
"title": "spanner ListInstanceConfigOperations Sample",
"description": "ListInstanceConfigOperations lists the user-managed instance config [long-running\noperations][google.longrunning.Operation] in the given project. An instance\nconfig operation has a name of the form\n`projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.\nThe long-running operation\n[metadata][google.longrunning.Operation.metadata] field type\n`metadata.type_url` describes the type of the metadata. Operations returned\ninclude those that have completed/failed/canceled within the last 7 days,\nand pending operations. Operations returned are ordered by\n`operation.metadata.value.start_time` in descending order starting\nfrom the most recently started operation.",
"file": "InstanceAdminClient/ListInstanceConfigOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListInstanceConfigOperations",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.ListInstanceConfigOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "ListInstanceConfigOperations",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_ListInstanceConfigs_sync",
"title": "spanner ListInstanceConfigs Sample",
"description": "ListInstanceConfigs lists the supported instance configurations for a given project.",
"file": "InstanceAdminClient/ListInstanceConfigs/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListInstanceConfigs",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.ListInstanceConfigs",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.ListInstanceConfigsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "InstanceConfigIterator",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "ListInstanceConfigs",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigs",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_ListInstances_sync",
"title": "spanner ListInstances Sample",
"description": "ListInstances lists all instances in the given project.",
"file": "InstanceAdminClient/ListInstances/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListInstances",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.ListInstances",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.ListInstancesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "InstanceIterator",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "ListInstances",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.ListInstances",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_SetIamPolicy_sync",
"title": "spanner SetIamPolicy Sample",
"description": "SetIamPolicy sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\n[resource][google.iam.v1.SetIamPolicyRequest.resource].",
"file": "InstanceAdminClient/SetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "SetIamPolicy",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.SetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.SetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.Policy",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "SetIamPolicy",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.SetIamPolicy",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_TestIamPermissions_sync",
"title": "spanner TestIamPermissions Sample",
"description": "TestIamPermissions returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions.",
"file": "InstanceAdminClient/TestIamPermissions/main.go",
"language": "GO",
"clientMethod": {
"shortName": "TestIamPermissions",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.TestIamPermissions",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.TestIamPermissionsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.TestIamPermissionsResponse",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "TestIamPermissions",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.TestIamPermissions",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_UpdateInstance_sync",
"title": "spanner UpdateInstance Sample",
"description": "UpdateInstance updates an instance, and begins allocating or releasing resources\nas requested. The returned [long-running\noperation][google.longrunning.Operation] can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request: \n\n* For resource types for which a decrease in the instance's allocation\nhas been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation: \n\n* Cancelling the operation sets its metadata's\n[cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],\nand begins restoring resources to their pre-request values. The\noperation is guaranteed to succeed at undoing all resource changes,\nafter which point it terminates with a `CANCELLED` status.\n* All other attempts to modify the instance are rejected.\n* Reading the instance via the API continues to give the pre-request\nresource levels.\n\nUpon completion of the returned operation: \n\n* Billing begins for all successfully-allocated resources (some types\nmay have lower than the requested levels).\n* All newly-reserved resources are available for serving the instance's\ntables.\n* The instance's new resource levels are readable via the API.\n\nThe returned [long-running operation][google.longrunning.Operation] will\nhave a name of the format `<instance_name>/operations/<operation_id>` and\ncan be used to track the instance modification. The\n[metadata][google.longrunning.Operation.metadata] field type is\n[UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].\nThe [response][google.longrunning.Operation.response] field type is\n[Instance][google.spanner.admin.instance.v1.Instance], if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nthe resource [name][google.spanner.admin.instance.v1.Instance.name].",
"file": "InstanceAdminClient/UpdateInstance/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.UpdateInstance",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.UpdateInstanceRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "UpdateInstanceOperation",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "UpdateInstance",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstance",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "spanner_v1_generated_InstanceAdmin_UpdateInstanceConfig_sync",
"title": "spanner UpdateInstanceConfig Sample",
"description": "UpdateInstanceConfig updates an instance config. The returned\n[long-running operation][google.longrunning.Operation] can be used to track\nthe progress of updating the instance. If the named instance config does\nnot exist, returns `NOT_FOUND`.\n\nOnly user managed configurations can be updated.\n\nImmediately after the request returns: \n\n* The instance config's\n[reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]\nfield is set to true.\n\nWhile the operation is pending: \n\n* Cancelling the operation sets its metadata's\n[cancel_time][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata.cancel_time].\nThe operation is guaranteed to succeed at undoing all changes, after\nwhich point it terminates with a `CANCELLED` status.\n* All other attempts to modify the instance config are rejected.\n* Reading the instance config via the API continues to give the\npre-request values.\n\nUpon completion of the returned operation: \n\n* Creating instances using the instance configuration uses the new\nvalues.\n* The instance config's new values are readable via the API.\n* The instance config's\n[reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]\nfield becomes false.\n\nThe returned [long-running operation][google.longrunning.Operation] will\nhave a name of the format\n`<instance_config_name>/operations/<operation_id>` and can be used to track\nthe instance config modification. The\n[metadata][google.longrunning.Operation.metadata] field type is\n[UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].\nThe [response][google.longrunning.Operation.response] field type is\n[InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if\nsuccessful.\n\nAuthorization requires `spanner.instanceConfigs.update` permission on\nthe resource [name][google.spanner.admin.instance.v1.InstanceConfig.name].",
"file": "InstanceAdminClient/UpdateInstanceConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient.UpdateInstanceConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "instancepb.UpdateInstanceConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "UpdateInstanceConfigOperation",
"client": {
"shortName": "InstanceAdminClient",
"fullName": "google.spanner.admin.instance.v1.InstanceAdminClient"
},
"method": {
"shortName": "UpdateInstanceConfig",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig",
"service": {
"shortName": "InstanceAdmin",
"fullName": "google.spanner.admin.instance.v1.InstanceAdmin"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
}
]
}