-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
snippet_metadata.google.cloud.billing.v1.json
567 lines (567 loc) · 21.2 KB
/
snippet_metadata.google.cloud.billing.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
{
"clientLibrary": {
"name": "cloud.google.com/go/billing/apiv1",
"version": "1.17.0",
"language": "GO",
"apis": [
{
"id": "google.cloud.billing.v1",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_CreateBillingAccount_sync",
"title": "cloudbilling CreateBillingAccount Sample",
"description": "CreateBillingAccount this method creates [billing\nsubaccounts](https: //cloud.google.com/billing/docs/concepts#subaccounts).\n\nGoogle Cloud resellers should use the\nChannel Services APIs,\n[accounts.customers.create](https: //cloud.google.com/channel/docs/reference/rest/v1/accounts.customers/create)\nand\n[accounts.customers.entitlements.create](https: //cloud.google.com/channel/docs/reference/rest/v1/accounts.customers.entitlements/create).\n\nWhen creating a subaccount, the current authenticated user must have the\n`billing.accounts.update` IAM permission on the parent account, which is\ntypically given to billing account\n[administrators](https: //cloud.google.com/billing/docs/how-to/billing-access).\nThis method will return an error if the parent account has not been\nprovisioned as a reseller account.",
"file": "CloudBillingClient/CreateBillingAccount/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBillingClient.CreateBillingAccount",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.CreateBillingAccountRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*billingpb.BillingAccount",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "CreateBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBilling.CreateBillingAccount",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_GetBillingAccount_sync",
"title": "cloudbilling GetBillingAccount Sample",
"description": "GetBillingAccount gets information about a billing account. The current authenticated user\nmust be a [viewer of the billing\naccount](https: //cloud.google.com/billing/docs/how-to/billing-access).",
"file": "CloudBillingClient/GetBillingAccount/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBillingClient.GetBillingAccount",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.GetBillingAccountRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*billingpb.BillingAccount",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "GetBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBilling.GetBillingAccount",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_GetIamPolicy_sync",
"title": "cloudbilling GetIamPolicy Sample",
"description": "GetIamPolicy gets the access control policy for a billing account.\nThe caller must have the `billing.accounts.getIamPolicy` permission on the\naccount, which is often given to billing account\n[viewers](https: //cloud.google.com/billing/docs/how-to/billing-access).",
"file": "CloudBillingClient/GetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetIamPolicy",
"fullName": "google.cloud.billing.v1.CloudBillingClient.GetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.GetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.Policy",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "GetIamPolicy",
"fullName": "google.cloud.billing.v1.CloudBilling.GetIamPolicy",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_GetProjectBillingInfo_sync",
"title": "cloudbilling GetProjectBillingInfo Sample",
"description": "GetProjectBillingInfo gets the billing information for a project. The current authenticated user\nmust have the `resourcemanager.projects.get` permission for the project,\nwhich can be granted by assigning the [Project\nViewer](https: //cloud.google.com/iam/docs/understanding-roles#predefined_roles)\nrole.",
"file": "CloudBillingClient/GetProjectBillingInfo/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBillingClient.GetProjectBillingInfo",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.GetProjectBillingInfoRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*billingpb.ProjectBillingInfo",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "GetProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBilling.GetProjectBillingInfo",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_ListBillingAccounts_sync",
"title": "cloudbilling ListBillingAccounts Sample",
"description": "ListBillingAccounts lists the billing accounts that the current authenticated user has\npermission to\n[view](https: //cloud.google.com/billing/docs/how-to/billing-access).",
"file": "CloudBillingClient/ListBillingAccounts/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListBillingAccounts",
"fullName": "google.cloud.billing.v1.CloudBillingClient.ListBillingAccounts",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.ListBillingAccountsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "BillingAccountIterator",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "ListBillingAccounts",
"fullName": "google.cloud.billing.v1.CloudBilling.ListBillingAccounts",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_ListProjectBillingInfo_sync",
"title": "cloudbilling ListProjectBillingInfo Sample",
"description": "ListProjectBillingInfo lists the projects associated with a billing account. The current\nauthenticated user must have the `billing.resourceAssociations.list` IAM\npermission, which is often given to billing account\n[viewers](https: //cloud.google.com/billing/docs/how-to/billing-access).",
"file": "CloudBillingClient/ListProjectBillingInfo/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBillingClient.ListProjectBillingInfo",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.ListProjectBillingInfoRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ProjectBillingInfoIterator",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "ListProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBilling.ListProjectBillingInfo",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_SetIamPolicy_sync",
"title": "cloudbilling SetIamPolicy Sample",
"description": "SetIamPolicy sets the access control policy for a billing account. Replaces any existing\npolicy.\nThe caller must have the `billing.accounts.setIamPolicy` permission on the\naccount, which is often given to billing account\n[administrators](https: //cloud.google.com/billing/docs/how-to/billing-access).",
"file": "CloudBillingClient/SetIamPolicy/main.go",
"language": "GO",
"clientMethod": {
"shortName": "SetIamPolicy",
"fullName": "google.cloud.billing.v1.CloudBillingClient.SetIamPolicy",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.SetIamPolicyRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.Policy",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "SetIamPolicy",
"fullName": "google.cloud.billing.v1.CloudBilling.SetIamPolicy",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_TestIamPermissions_sync",
"title": "cloudbilling TestIamPermissions Sample",
"description": "TestIamPermissions tests the access control policy for a billing account. This method takes\nthe resource and a set of permissions as input and returns the subset of\nthe input permissions that the caller is allowed for that resource.",
"file": "CloudBillingClient/TestIamPermissions/main.go",
"language": "GO",
"clientMethod": {
"shortName": "TestIamPermissions",
"fullName": "google.cloud.billing.v1.CloudBillingClient.TestIamPermissions",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "iampb.TestIamPermissionsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*iampb.TestIamPermissionsResponse",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "TestIamPermissions",
"fullName": "google.cloud.billing.v1.CloudBilling.TestIamPermissions",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_UpdateBillingAccount_sync",
"title": "cloudbilling UpdateBillingAccount Sample",
"description": "UpdateBillingAccount updates a billing account's fields.\nCurrently the only field that can be edited is `display_name`.\nThe current authenticated user must have the `billing.accounts.update`\nIAM permission, which is typically given to the\n[administrator](https: //cloud.google.com/billing/docs/how-to/billing-access)\nof the billing account.",
"file": "CloudBillingClient/UpdateBillingAccount/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBillingClient.UpdateBillingAccount",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.UpdateBillingAccountRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*billingpb.BillingAccount",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "UpdateBillingAccount",
"fullName": "google.cloud.billing.v1.CloudBilling.UpdateBillingAccount",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudBilling_UpdateProjectBillingInfo_sync",
"title": "cloudbilling UpdateProjectBillingInfo Sample",
"description": "UpdateProjectBillingInfo sets or updates the billing account associated with a project. You specify\nthe new billing account by setting the `billing_account_name` in the\n`ProjectBillingInfo` resource to the resource name of a billing account.\nAssociating a project with an open billing account enables billing on the\nproject and allows charges for resource usage. If the project already had a\nbilling account, this method changes the billing account used for resource\nusage charges.\n\n*Note: * Incurred charges that have not yet been reported in the transaction\nhistory of the Google Cloud Console might be billed to the new billing\naccount, even if the charge occurred before the new billing account was\nassigned to the project.\n\nThe current authenticated user must have ownership privileges for both the\n[project](https: //cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo\n) and the [billing\naccount](https: //cloud.google.com/billing/docs/how-to/billing-access).\n\nYou can disable billing on the project by setting the\n`billing_account_name` field to empty. This action disassociates the\ncurrent billing account from the project. Any billable activity of your\nin-use services will stop, and your application could stop functioning as\nexpected. Any unbilled charges to date will be billed to the previously\nassociated account. The current authenticated user must be either an owner\nof the project or an owner of the billing account for the project.\n\nNote that associating a project with a *closed* billing account will have\nmuch the same effect as disabling billing on the project: any paid\nresources used by the project will be shut down. Thus, unless you wish to\ndisable billing, you should always call this method with the name of an\n*open* billing account.",
"file": "CloudBillingClient/UpdateProjectBillingInfo/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBillingClient.UpdateProjectBillingInfo",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.UpdateProjectBillingInfoRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*billingpb.ProjectBillingInfo",
"client": {
"shortName": "CloudBillingClient",
"fullName": "google.cloud.billing.v1.CloudBillingClient"
},
"method": {
"shortName": "UpdateProjectBillingInfo",
"fullName": "google.cloud.billing.v1.CloudBilling.UpdateProjectBillingInfo",
"service": {
"shortName": "CloudBilling",
"fullName": "google.cloud.billing.v1.CloudBilling"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudCatalog_ListServices_sync",
"title": "cloudbilling ListServices Sample",
"description": "ListServices lists all public cloud services.",
"file": "CloudCatalogClient/ListServices/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListServices",
"fullName": "google.cloud.billing.v1.CloudCatalogClient.ListServices",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.ListServicesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ServiceIterator",
"client": {
"shortName": "CloudCatalogClient",
"fullName": "google.cloud.billing.v1.CloudCatalogClient"
},
"method": {
"shortName": "ListServices",
"fullName": "google.cloud.billing.v1.CloudCatalog.ListServices",
"service": {
"shortName": "CloudCatalog",
"fullName": "google.cloud.billing.v1.CloudCatalog"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
},
{
"regionTag": "cloudbilling_v1_generated_CloudCatalog_ListSkus_sync",
"title": "cloudbilling ListSkus Sample",
"description": "ListSkus lists all publicly available SKUs for a given cloud service.",
"file": "CloudCatalogClient/ListSkus/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListSkus",
"fullName": "google.cloud.billing.v1.CloudCatalogClient.ListSkus",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "billingpb.ListSkusRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "SkuIterator",
"client": {
"shortName": "CloudCatalogClient",
"fullName": "google.cloud.billing.v1.CloudCatalogClient"
},
"method": {
"shortName": "ListSkus",
"fullName": "google.cloud.billing.v1.CloudCatalog.ListSkus",
"service": {
"shortName": "CloudCatalog",
"fullName": "google.cloud.billing.v1.CloudCatalog"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 60,
"type": "FULL"
}
]
}
]
}