-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.ts
21246 lines (21236 loc) · 846 KB
/
spec.ts
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
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
/** WithRequired type helpers */
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
/** OneOf type helpers */
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;
export interface paths {
"/v2/1-clicks": {
/**
* List 1-Click Applications
* @description To list all available 1-Click applications, send a GET request to `/v2/1-clicks`. The `type` may
* be provided as query paramater in order to restrict results to a certain type of 1-Click, for
* example: `/v2/1-clicks?type=droplet`. Current supported types are `kubernetes` and `droplet`.
*
* The response will be a JSON object with a key called `1_clicks`. This will be set to an array of
* 1-Click application data, each of which will contain the the slug and type for the 1-Click.
*/
get: operations["oneClicks_list"];
};
"/v2/1-clicks/kubernetes": {
/**
* Install Kubernetes 1-Click Applications
* @description To install a Kubernetes 1-Click application on a cluster, send a POST request to
* `/v2/1-clicks/kubernetes`. The `addon_slugs` and `cluster_uuid` must be provided as body
* parameter in order to specify which 1-Click application(s) to install. To list all available
* 1-Click Kubernetes applications, send a request to `/v2/1-clicks?type=kubernetes`.
*/
post: operations["oneClicks_install_kubernetes"];
};
"/v2/account": {
/**
* Get User Information
* @description To show information about the current user account, send a GET request to `/v2/account`.
*/
get: operations["account_get"];
};
"/v2/account/keys": {
/**
* List All SSH Keys
* @description To list all of the keys in your account, send a GET request to `/v2/account/keys`. The response will be a JSON object with a key set to `ssh_keys`. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes.
*/
get: operations["sshKeys_list"];
/**
* Create a New SSH Key
* @description To add a new SSH public key to your DigitalOcean account, send a POST request to `/v2/account/keys`. Set the `name` attribute to the name you wish to use and the `public_key` attribute to the full public key you are adding.
*/
post: operations["sshKeys_create"];
};
"/v2/account/keys/{ssh_key_identifier}": {
/**
* Retrieve an Existing SSH Key
* @description To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.
* The response will be a JSON object with the key `ssh_key` and value an ssh_key object which contains the standard ssh_key attributes.
*/
get: operations["sshKeys_get"];
/**
* Update an SSH Key's Name
* @description To update the name of an SSH key, send a PUT request to either `/v2/account/keys/$SSH_KEY_ID` or `/v2/account/keys/$SSH_KEY_FINGERPRINT`. Set the `name` attribute to the new name you want to use.
*/
put: operations["sshKeys_update"];
/**
* Delete an SSH Key
* @description To destroy a public SSH key that you have in your account, send a DELETE request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.
* A 204 status will be returned, indicating that the action was successful and that the response body is empty.
*/
delete: operations["sshKeys_delete"];
};
"/v2/actions": {
/**
* List All Actions
* @description This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default.
*/
get: operations["actions_list"];
};
"/v2/actions/{action_id}": {
/**
* Retrieve an Existing Action
* @description To retrieve a specific action object, send a GET request to `/v2/actions/$ACTION_ID`.
*/
get: operations["actions_get"];
};
"/v2/apps": {
/**
* List All Apps
* @description List all apps on your account. Information about the current active deployment as well as any in progress ones will also be included for each app.
*/
get: operations["apps_list"];
/**
* Create a New App
* @description Create a new app by submitting an app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/).
*/
post: operations["apps_create"];
};
"/v2/apps/{id}": {
/**
* Retrieve an Existing App
* @description Retrieve details about an existing app by either its ID or name. To retrieve an app by its name, do not include an ID in the request path. Information about the current active deployment as well as any in progress ones will also be included in the response.
*/
get: operations["apps_get"];
/**
* Update an App
* @description Update an existing app by submitting a new app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/).
*/
put: operations["apps_update"];
/**
* Delete an App
* @description Delete an existing app. Once deleted, all active deployments will be permanently shut down and the app deleted. If needed, be sure to back up your app specification so that you may re-create it at a later time.
*/
delete: operations["apps_delete"];
};
"/v2/apps/{app_id}/components/{component_name}/logs": {
/**
* Retrieve Active Deployment Logs
* @description Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.
*/
get: operations["apps_get_logs_active_deployment"];
};
"/v2/apps/{app_id}/deployments": {
/**
* List App Deployments
* @description List all deployments of an app.
*/
get: operations["apps_list_deployments"];
/**
* Create an App Deployment
* @description Creating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app.
*/
post: operations["apps_create_deployment"];
};
"/v2/apps/{app_id}/deployments/{deployment_id}": {
/**
* Retrieve an App Deployment
* @description Retrieve information about an app deployment.
*/
get: operations["apps_get_deployment"];
};
"/v2/apps/{app_id}/deployments/{deployment_id}/cancel": {
/**
* Cancel a Deployment
* @description Immediately cancel an in-progress deployment.
*/
post: operations["apps_cancel_deployment"];
};
"/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs": {
/**
* Retrieve Deployment Logs
* @description Retrieve the logs of a past, in-progress, or active deployment. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.
*/
get: operations["apps_get_logs"];
};
"/v2/apps/{app_id}/deployments/{deployment_id}/logs": {
/**
* Retrieve Aggregate Deployment Logs
* @description Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment.
*/
get: operations["apps_get_logs_aggregate"];
};
"/v2/apps/{app_id}/logs": {
/**
* Retrieve Active Deployment Aggregate Logs
* @description Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id.
*/
get: operations["apps_get_logs_active_deployment_aggregate"];
};
"/v2/apps/tiers": {
/**
* List App Tiers
* @deprecated
* @description List all app tiers.
* This endpoint has been deprecated because app tiers are not tied to instance sizes anymore.
* The concept of tiers will be retired in the future.
*/
get: operations["apps_list_tiers"];
};
"/v2/apps/tiers/{slug}": {
/**
* Retrieve an App Tier
* @deprecated
* @description Retrieve information about a specific app tier.
* This endpoint has been deprecated because app tiers are not tied to instance sizes anymore.
* The concept of tiers will be retired in the future.
*/
get: operations["apps_get_tier"];
};
"/v2/apps/tiers/instance_sizes": {
/**
* List Instance Sizes
* @description List all instance sizes for `service`, `worker`, and `job` components.
*/
get: operations["apps_list_instanceSizes"];
};
"/v2/apps/tiers/instance_sizes/{slug}": {
/**
* Retrieve an Instance Size
* @description Retrieve information about a specific instance size for `service`, `worker`, and `job` components.
*/
get: operations["apps_get_instanceSize"];
};
"/v2/apps/regions": {
/**
* List App Regions
* @description List all regions supported by App Platform.
*/
get: operations["apps_list_regions"];
};
"/v2/apps/propose": {
/**
* Propose an App Spec
* @description To propose and validate a spec for a new or existing app, send a POST request to the `/v2/apps/propose` endpoint. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app.
*/
post: operations["apps_validate_appSpec"];
};
"/v2/apps/{app_id}/alerts": {
/**
* List all app alerts
* @description List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions.
*/
get: operations["apps_list_alerts"];
};
"/v2/apps/{app_id}/alerts/{alert_id}/destinations": {
/**
* Update destinations for alerts
* @description Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app.
*/
post: operations["apps_assign_alertDestinations"];
};
"/v2/apps/{app_id}/rollback": {
/**
* Rollback App
* @description Rollback an app to a previous deployment. A new deployment will be created to perform the rollback.
* The app will be pinned to the rollback deployment preventing any new deployments from being created,
* either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be
* either committed or reverted.
*
* It is recommended to use the Validate App Rollback endpoint to double check if the rollback is
* valid and if there are any warnings.
*/
post: operations["apps_create_rollback"];
};
"/v2/apps/{app_id}/rollback/validate": {
/**
* Validate App Rollback
* @description Check whether an app can be rolled back to a specific deployment. This endpoint can also be used
* to check if there are any warnings or validation conditions that will cause the rollback to proceed
* under unideal circumstances. For example, if a component must be rebuilt as part of the rollback
* causing it to take longer than usual.
*/
post: operations["apps_validate_rollback"];
};
"/v2/apps/{app_id}/rollback/commit": {
/**
* Commit App Rollback
* @description Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments.
*/
post: operations["apps_commit_rollback"];
};
"/v2/apps/{app_id}/rollback/revert": {
/**
* Revert App Rollback
* @description Revert an app rollback. This action reverts the active rollback by creating a new deployment from the
* latest app spec prior to the rollback and unpins the app to resume new deployments.
*/
post: operations["apps_revert_rollback"];
};
"/v2/apps/{app_id}/metrics/bandwidth_daily": {
/**
* Retrieve App Daily Bandwidth Metrics
* @description Retrieve daily bandwidth usage metrics for a single app.
*/
get: operations["apps_get_metrics_bandwidth_daily"];
};
"/v2/apps/metrics/bandwidth_daily": {
/**
* Retrieve Multiple Apps' Daily Bandwidth Metrics
* @description Retrieve daily bandwidth usage metrics for multiple apps.
*/
post: operations["apps_list_metrics_bandwidth_daily"];
};
"/v2/cdn/endpoints": {
/**
* List All CDN Endpoints
* @description To list all of the CDN endpoints available on your account, send a GET request to `/v2/cdn/endpoints`.
*/
get: operations["cdn_list_endpoints"];
/**
* Create a New CDN Endpoint
* @description To create a new CDN endpoint, send a POST request to `/v2/cdn/endpoints`. The
* origin attribute must be set to the fully qualified domain name (FQDN) of a
* DigitalOcean Space. Optionally, the TTL may be configured by setting the `ttl`
* attribute.
*
* A custom subdomain may be configured by specifying the `custom_domain` and
* `certificate_id` attributes.
*/
post: operations["cdn_create_endpoint"];
};
"/v2/cdn/endpoints/{cdn_id}": {
/**
* Retrieve an Existing CDN Endpoint
* @description To show information about an existing CDN endpoint, send a GET request to `/v2/cdn/endpoints/$ENDPOINT_ID`.
*/
get: operations["cdn_get_endpoint"];
/**
* Update a CDN Endpoint
* @description To update the TTL, certificate ID, or the FQDN of the custom subdomain for
* an existing CDN endpoint, send a PUT request to
* `/v2/cdn/endpoints/$ENDPOINT_ID`.
*/
put: operations["cdn_update_endpoints"];
/**
* Delete a CDN Endpoint
* @description To delete a specific CDN endpoint, send a DELETE request to
* `/v2/cdn/endpoints/$ENDPOINT_ID`.
*
* A status of 204 will be given. This indicates that the request was processed
* successfully, but that no response body is needed.
*/
delete: operations["cdn_delete_endpoint"];
};
"/v2/cdn/endpoints/{cdn_id}/cache": {
/**
* Purge the Cache for an Existing CDN Endpoint
* @description To purge cached content from a CDN endpoint, send a DELETE request to
* `/v2/cdn/endpoints/$ENDPOINT_ID/cache`. The body of the request should include
* a `files` attribute containing a list of cached file paths to be purged. A
* path may be for a single file or may contain a wildcard (`*`) to recursively
* purge all files under a directory. When only a wildcard is provided, all
* cached files will be purged. There is a rate limit of 50 files per 20 seconds
* that can be purged.
*/
delete: operations["cdn_purge_cache"];
};
"/v2/certificates": {
/**
* List All Certificates
* @description To list all of the certificates available on your account, send a GET request to `/v2/certificates`.
*/
get: operations["certificates_list"];
/**
* Create a New Certificate
* @description To upload new SSL certificate which you have previously generated, send a POST
* request to `/v2/certificates`.
*
* When uploading a user-generated certificate, the `private_key`,
* `leaf_certificate`, and optionally the `certificate_chain` attributes should
* be provided. The type must be set to `custom`.
*
* When using Let's Encrypt to create a certificate, the `dns_names` attribute
* must be provided, and the type must be set to `lets_encrypt`.
*/
post: operations["certificates_create"];
};
"/v2/certificates/{certificate_id}": {
/**
* Retrieve an Existing Certificate
* @description To show information about an existing certificate, send a GET request to `/v2/certificates/$CERTIFICATE_ID`.
*/
get: operations["certificates_get"];
/**
* Delete a Certificate
* @description To delete a specific certificate, send a DELETE request to
* `/v2/certificates/$CERTIFICATE_ID`.
*/
delete: operations["certificates_delete"];
};
"/v2/customers/my/balance": {
/**
* Get Customer Balance
* @description To retrieve the balances on a customer's account, send a GET request to `/v2/customers/my/balance`.
*/
get: operations["balance_get"];
};
"/v2/customers/my/billing_history": {
/**
* List Billing History
* @description To retrieve a list of all billing history entries, send a GET request to `/v2/customers/my/billing_history`.
*/
get: operations["billingHistory_list"];
};
"/v2/customers/my/invoices": {
/**
* List All Invoices
* @description To retrieve a list of all invoices, send a GET request to `/v2/customers/my/invoices`.
*/
get: operations["invoices_list"];
};
"/v2/customers/my/invoices/{invoice_uuid}": {
/**
* Retrieve an Invoice by UUID
* @description To retrieve the invoice items for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID`.
*/
get: operations["invoices_get_byUUID"];
};
"/v2/customers/my/invoices/{invoice_uuid}/csv": {
/**
* Retrieve an Invoice CSV by UUID
* @description To retrieve a CSV for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/csv`.
*/
get: operations["invoices_get_csvByUUID"];
};
"/v2/customers/my/invoices/{invoice_uuid}/pdf": {
/**
* Retrieve an Invoice PDF by UUID
* @description To retrieve a PDF for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/pdf`.
*/
get: operations["invoices_get_pdfByUUID"];
};
"/v2/customers/my/invoices/{invoice_uuid}/summary": {
/**
* Retrieve an Invoice Summary by UUID
* @description To retrieve a summary for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/summary`.
*/
get: operations["invoices_get_summaryByUUID"];
};
"/v2/databases/options": {
/**
* List Database Options
* @description To list all of the options available for the offered database engines, send a GET request to `/v2/databases/options`.
* The result will be a JSON object with an `options` key.
*/
get: operations["databases_list_options"];
};
"/v2/databases": {
/**
* List All Database Clusters
* @description To list all of the database clusters available on your account, send a GET request to `/v2/databases`. To limit the results to database clusters with a specific tag, include the `tag_name` query parameter set to the name of the tag. For example, `/v2/databases?tag_name=$TAG_NAME`.
*
* The result will be a JSON object with a `databases` key. This will be set to an array of database objects, each of which will contain the standard database attributes.
*
* The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster's standby node(s).
*
* The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster.
*/
get: operations["databases_list_clusters"];
/**
* Create a New Database Cluster
* @description To create a database cluster, send a POST request to `/v2/databases`.
* The response will be a JSON object with a key called `database`. The value of this will be an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster's `status` attribute will be `creating`. When the cluster is ready to receive traffic, this will transition to `online`.
*
* The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster's standby node(s).
*
* DigitalOcean managed PostgreSQL and MySQL database clusters take automated daily backups. To create a new database cluster based on a backup of an existing cluster, send a POST request to `/v2/databases`. In addition to the standard database cluster attributes, the JSON body must include a key named `backup_restore` with the name of the original database cluster and the timestamp of the backup to be restored. Creating a database from a backup is the same as forking a database in the control panel.
* Note: Backups are not supported for Redis clusters.
*/
post: operations["databases_create_cluster"];
};
"/v2/databases/{database_cluster_uuid}": {
/**
* Retrieve an Existing Database Cluster
* @description To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID`.
*
* The response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes.
*
* The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects contain the information needed to connect to the cluster's standby node(s).
*
* The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster.
*/
get: operations["databases_get_cluster"];
/**
* Destroy a Database Cluster
* @description To destroy a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID`.
* A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.
*/
delete: operations["databases_destroy_cluster"];
};
"/v2/databases/{database_cluster_uuid}/config": {
/**
* Retrieve an Existing Database Cluster Configuration
* @description Shows configuration parameters for an existing database cluster by sending a GET request to
* `/v2/databases/$DATABASE_ID/config`.
* The response is a JSON object with a `config` key, which is set to an object
* containing any database configuration parameters.
*/
get: operations["databases_get_config"];
/**
* Update the Database Configuration for an Existing Database
* @description To update the configuration for an existing database cluster, send a PATCH request to
* `/v2/databases/$DATABASE_ID/config`.
*/
patch: operations["databases_patch_config"];
};
"/v2/databases/{database_cluster_uuid}/ca": {
/**
* Retrieve the Public Certificate
* @description To retrieve the public certificate used to secure the connection to the database cluster send a GET request to
* `/v2/databases/$DATABASE_ID/ca`.
*
* The response will be a JSON object with a `ca` key. This will be set to an object
* containing the base64 encoding of the public key certificate.
*/
get: operations["databases_get_ca"];
};
"/v2/databases/{database_cluster_uuid}/online-migration": {
/**
* Retrieve the Status of an Online Migration
* @description To retrieve the status of the most recent online migration, send a GET request to `/v2/databases/$DATABASE_ID/online-migration`.
*/
get: operations["databases_get_migrationStatus"];
/**
* Start an Online Migration
* @description To start an online migration, send a PUT request to `/v2/databases/$DATABASE_ID/online-migration` endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, and Redis clusters.
*/
put: operations["databases_update_onlineMigration"];
};
"/v2/databases/{database_cluster_uuid}/online-migration/{migration_id}": {
/**
* Stop an Online Migration
* @description To stop an online migration, send a DELETE request to `/v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID`.
*
* A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.
*/
delete: operations["databases_delete_onlineMigration"];
};
"/v2/databases/{database_cluster_uuid}/migrate": {
/**
* Migrate a Database Cluster to a New Region
* @description To migrate a database cluster to a new region, send a `PUT` request to
* `/v2/databases/$DATABASE_ID/migrate`. The body of the request must specify a
* `region` attribute.
*
* A successful request will receive a 202 Accepted status code with no body in
* response. Querying the database cluster will show that its `status` attribute
* will now be set to `migrating`. This will transition back to `online` when the
* migration has completed.
*/
put: operations["databases_update_region"];
};
"/v2/databases/{database_cluster_uuid}/resize": {
/**
* Resize a Database Cluster
* @description To resize a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/resize`. The body of the request must specify both the size and num_nodes attributes.
* A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed.
*/
put: operations["databases_update_clusterSize"];
};
"/v2/databases/{database_cluster_uuid}/firewall": {
/**
* List Firewall Rules (Trusted Sources) for a Database Cluster
* @description To list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to `/v2/databases/$DATABASE_ID/firewall`.
* The result will be a JSON object with a `rules` key.
*/
get: operations["databases_list_firewall_rules"];
/**
* Update Firewall Rules (Trusted Sources) for a Database
* @description To update a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to `/v2/databases/$DATABASE_ID/firewall` specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). When possible, we recommend [placing your databases into a VPC network](https://www.digitalocean.com/docs/networking/vpc/) to limit access to them instead of using a firewall.
* A successful
*/
put: operations["databases_update_firewall_rules"];
};
"/v2/databases/{database_cluster_uuid}/maintenance": {
/**
* Configure a Database Cluster's Maintenance Window
* @description To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/maintenance`.
* A successful request will receive a 204 No Content status code with no body in response.
*/
put: operations["databases_update_maintenanceWindow"];
};
"/v2/databases/{database_cluster_uuid}/backups": {
/**
* List Backups for a Database Cluster
* @description To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/backups`.
* **Note**: Backups are not supported for Redis clusters.
* The result will be a JSON object with a `backups key`. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created.
*/
get: operations["databases_list_backups"];
};
"/v2/databases/{database_cluster_uuid}/replicas": {
/**
* List All Read-only Replicas
* @description To list all of the read-only replicas associated with a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/replicas`.
*
* **Note**: Read-only replicas are not supported for Redis clusters.
*
* The result will be a JSON object with a `replicas` key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes.
*/
get: operations["databases_list_replicas"];
/**
* Create a Read-only Replica
* @description To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/replicas` specifying the name it should be given, the size of the node to be used, and the region where it will be located.
*
* **Note**: Read-only replicas are not supported for Redis clusters.
*
* The response will be a JSON object with a key called `replica`. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's `status` attribute will be `forking`. When the replica is ready to receive traffic, this will transition to `active`.
*/
post: operations["databases_create_replica"];
};
"/v2/databases/{database_cluster_uuid}/events": {
/**
* List all Events Logs
* @description To list all of the cluster events, send a GET request to
* `/v2/databases/$DATABASE_ID/events`.
*
* The result will be a JSON object with a `events` key.
*/
get: operations["databases_list_events_logs"];
};
"/v2/databases/{database_cluster_uuid}/replicas/{replica_name}": {
/**
* Retrieve an Existing Read-only Replica
* @description To show information about an existing database replica, send a GET request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`.
*
* **Note**: Read-only replicas are not supported for Redis clusters.
*
* The response will be a JSON object with a `replica key`. This will be set to an object containing the standard database replica attributes.
*/
get: operations["databases_get_replica"];
/**
* Destroy a Read-only Replica
* @description To destroy a specific read-only replica, send a DELETE request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`.
*
* **Note**: Read-only replicas are not supported for Redis clusters.
*
* A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.
*/
delete: operations["databases_destroy_replica"];
};
"/v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote": {
/**
* Promote a Read-only Replica to become a Primary Cluster
* @description To promote a specific read-only replica, send a PUT request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME/promote`.
*
* **Note**: Read-only replicas are not supported for Redis clusters.
*
* A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed.
*/
put: operations["databases_promote_replica"];
};
"/v2/databases/{database_cluster_uuid}/users": {
/**
* List all Database Users
* @description To list all of the users for your database cluster, send a GET request to
* `/v2/databases/$DATABASE_ID/users`.
*
* Note: User management is not supported for Redis clusters.
*
* The result will be a JSON object with a `users` key. This will be set to an array
* of database user objects, each of which will contain the standard database user attributes.
*
* For MySQL clusters, additional options will be contained in the mysql_settings object.
*/
get: operations["databases_list_users"];
/**
* Add a Database User
* @description To add a new database user, send a POST request to `/v2/databases/$DATABASE_ID/users`
* with the desired username.
*
* Note: User management is not supported for Redis clusters.
*
* When adding a user to a MySQL cluster, additional options can be configured in the
* `mysql_settings` object.
*
* When adding a user to a Kafka cluster, additional options can be configured in
* the `settings` object.
*
* The response will be a JSON object with a key called `user`. The value of this will be an
* object that contains the standard attributes associated with a database user including
* its randomly generated password.
*/
post: operations["databases_add_user"];
};
"/v2/databases/{database_cluster_uuid}/users/{username}": {
/**
* Retrieve an Existing Database User
* @description To show information about an existing database user, send a GET request to
* `/v2/databases/$DATABASE_ID/users/$USERNAME`.
*
* Note: User management is not supported for Redis clusters.
*
* The response will be a JSON object with a `user` key. This will be set to an object
* containing the standard database user attributes.
*
* For MySQL clusters, additional options will be contained in the `mysql_settings`
* object.
*
* For Kafka clusters, additional options will be contained in the `settings` object.
*/
get: operations["databases_get_user"];
/**
* Update a Database User
* @description To update an existing database user, send a PUT request to `/v2/databases/$DATABASE_ID/users/$USERNAME`
* with the desired settings.
*
* **Note**: only `settings` can be updated via this type of request. If you wish to change the name of a user,
* you must recreate a new user.
*
* The response will be a JSON object with a key called `user`. The value of this will be an
* object that contains the name of the update database user, along with the `settings` object that
* has been updated.
*/
put: operations["databases_update_user"];
/**
* Remove a Database User
* @description To remove a specific database user, send a DELETE request to
* `/v2/databases/$DATABASE_ID/users/$USERNAME`.
*
* A status of 204 will be given. This indicates that the request was processed
* successfully, but that no response body is needed.
*
* Note: User management is not supported for Redis clusters.
*/
delete: operations["databases_delete_user"];
};
"/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth": {
/**
* Reset a Database User's Password or Authentication Method
* @description To reset the password for a database user, send a POST request to
* `/v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth`.
*
* For `mysql` databases, the authentication method can be specifying by
* including a key in the JSON body called `mysql_settings` with the `auth_plugin`
* value specified.
*
* The response will be a JSON object with a `user` key. This will be set to an
* object containing the standard database user attributes.
*/
post: operations["databases_reset_auth"];
};
"/v2/databases/{database_cluster_uuid}/dbs": {
/**
* List All Databases
* @description To list all of the databases in a clusters, send a GET request to
* `/v2/databases/$DATABASE_ID/dbs`.
*
* The result will be a JSON object with a `dbs` key. This will be set to an array
* of database objects, each of which will contain the standard database attributes.
*
* Note: Database management is not supported for Redis clusters.
*/
get: operations["databases_list"];
/**
* Add a New Database
* @description To add a new database to an existing cluster, send a POST request to
* `/v2/databases/$DATABASE_ID/dbs`.
*
* Note: Database management is not supported for Redis clusters.
*
* The response will be a JSON object with a key called `db`. The value of this will be
* an object that contains the standard attributes associated with a database.
*/
post: operations["databases_add"];
};
"/v2/databases/{database_cluster_uuid}/dbs/{database_name}": {
/**
* Retrieve an Existing Database
* @description To show information about an existing database cluster, send a GET request to
* `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`.
*
* Note: Database management is not supported for Redis clusters.
*
* The response will be a JSON object with a `db` key. This will be set to an object
* containing the standard database attributes.
*/
get: operations["databases_get"];
/**
* Delete a Database
* @description To delete a specific database, send a DELETE request to
* `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`.
*
* A status of 204 will be given. This indicates that the request was processed
* successfully, but that no response body is needed.
*
* Note: Database management is not supported for Redis clusters.
*/
delete: operations["databases_delete"];
};
"/v2/databases/{database_cluster_uuid}/pools": {
/**
* List Connection Pools (PostgreSQL)
* @description To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools`.
* The result will be a JSON object with a `pools` key. This will be set to an array of connection pool objects.
*/
get: operations["databases_list_connectionPools"];
/**
* Add a New Connection Pool (PostgreSQL)
* @description For PostgreSQL database clusters, connection pools can be used to allow a
* database to share its idle connections. The popular PostgreSQL connection
* pooling utility PgBouncer is used to provide this service. [See here for more information](https://www.digitalocean.com/docs/databases/postgresql/how-to/manage-connection-pools/)
* about how and why to use PgBouncer connection pooling including
* details about the available transaction modes.
*
* To add a new connection pool to a PostgreSQL database cluster, send a POST
* request to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool,
* the user to connect with, the database to connect to, as well as its desired
* size and transaction mode.
*/
post: operations["databases_add_connectionPool"];
};
"/v2/databases/{database_cluster_uuid}/pools/{pool_name}": {
/**
* Retrieve Existing Connection Pool (PostgreSQL)
* @description To show information about an existing connection pool for a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`.
* The response will be a JSON object with a `pool` key.
*/
get: operations["databases_get_connectionPool"];
/**
* Update Connection Pools (PostgreSQL)
* @description To update a connection pool for a PostgreSQL database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`.
*/
put: operations["databases_update_connectionPool"];
/**
* Delete a Connection Pool (PostgreSQL)
* @description To delete a specific connection pool for a PostgreSQL database cluster, send
* a DELETE request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`.
*
* A status of 204 will be given. This indicates that the request was processed
* successfully, but that no response body is needed.
*/
delete: operations["databases_delete_connectionPool"];
};
"/v2/databases/{database_cluster_uuid}/eviction_policy": {
/**
* Retrieve the Eviction Policy for a Redis Cluster
* @description To retrieve the configured eviction policy for an existing Redis cluster, send a GET request to `/v2/databases/$DATABASE_ID/eviction_policy`.
* The response will be a JSON object with an `eviction_policy` key. This will be set to a string representing the eviction policy.
*/
get: operations["databases_get_evictionPolicy"];
/**
* Configure the Eviction Policy for a Redis Cluster
* @description To configure an eviction policy for an existing Redis cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy.
*/
put: operations["databases_update_evictionPolicy"];
};
"/v2/databases/{database_cluster_uuid}/sql_mode": {
/**
* Retrieve the SQL Modes for a MySQL Cluster
* @description To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to `/v2/databases/$DATABASE_ID/sql_mode`.
* The response will be a JSON object with a `sql_mode` key. This will be set to a string representing the configured SQL modes.
*/
get: operations["databases_get_sql_mode"];
/**
* Update SQL Mode for a Cluster
* @description To configure the SQL modes for an existing MySQL cluster, send a PUT request to `/v2/databases/$DATABASE_ID/sql_mode` specifying the desired modes. See the official MySQL 8 documentation for a [full list of supported SQL modes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-full).
* A successful request will receive a 204 No Content status code with no body in response.
*/
put: operations["databases_update_sql_mode"];
};
"/v2/databases/{database_cluster_uuid}/upgrade": {
/**
* Upgrade Major Version for a Database
* @description To upgrade the major version of a database, send a PUT request to `/v2/databases/$DATABASE_ID/upgrade`, specifying the target version.
* A successful request will receive a 204 No Content status code with no body in response.
*/
put: operations["databases_update_major_version"];
};
"/v2/databases/{database_cluster_uuid}/topics": {
/**
* List Topics for a Kafka Cluster
* @description To list all of a Kafka cluster's topics, send a GET request to
* `/v2/databases/$DATABASE_ID/topics`.
*
* The result will be a JSON object with a `topics` key.
*/
get: operations["databases_list_kafka_topics"];
/**
* Create Topic for a Kafka Cluster
* @description To create a topic attached to a Kafka cluster, send a POST request to
* `/v2/databases/$DATABASE_ID/topics`.
*
* The result will be a JSON object with a `topic` key.
*/
post: operations["databases_create_kafka_topic"];
};
"/v2/databases/{database_cluster_uuid}/topics/{topic_name}": {
/**
* Get Topic for a Kafka Cluster
* @description To retrieve a given topic by name from the set of a Kafka cluster's topics,
* send a GET request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`.
*
* The result will be a JSON object with a `topic` key.
*/
get: operations["databases_get_kafka_topic"];
/**
* Update Topic for a Kafka Cluster
* @description To update a topic attached to a Kafka cluster, send a PUT request to
* `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`.
*
* The result will be a JSON object with a `topic` key.
*/
put: operations["databases_update_kafka_topic"];
/**
* Delete Topic for a Kafka Cluster
* @description To delete a single topic within a Kafka cluster, send a DELETE request
* to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`.
*
* A status of 204 will be given. This indicates that the request was
* processed successfully, but that no response body is needed.
*/
delete: operations["databases_delete_kafka_topic"];
};
"/v2/databases/{database_cluster_uuid}/logsink": {
/**
* List Logsinks for a Database Cluster
*
* @description To list logsinks for a database cluster, send a GET request to
* `/v2/databases/$DATABASE_ID/logsink`.
*/
get: operations["databases_list_logsink"];
/**
* Create Logsink for a Database Cluster
*
* @description To create logsink for a database cluster, send a POST request to
* `/v2/databases/$DATABASE_ID/logsink`.
*/
post: operations["databases_create_logsink"];
};
"/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}": {
/**
* Get Logsink for a Database Cluster
*
* @description To get a logsink for a database cluster, send a GET request to
* `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`.
*/
get: operations["databases_get_logsink"];
/**
* Update Logsink for a Database Cluster
*
* @description To update a logsink for a database cluster, send a PUT request to
* `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`.
*/
put: operations["databases_update_logsink"];
/**
* Delete Logsink for a Database Cluster
*
* @description To delete a logsink for a database cluster, send a DELETE request to
* `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`.
*/
delete: operations["databases_delete_logsink"];
};
"/v2/databases/metrics/credentials": {
/**
* Retrieve Database Clusters' Metrics Endpoint Credentials
* @description To show the credentials for all database clusters' metrics endpoints, send a GET request to `/v2/databases/metrics/credentials`. The result will be a JSON object with a `credentials` key.
*/
get: operations["databases_get_cluster_metrics_credentials"];
/**
* Update Database Clusters' Metrics Endpoint Credentials
* @description To update the credentials for all database clusters' metrics endpoints, send a PUT request to `/v2/databases/metrics/credentials`. A successful request will receive a 204 No Content status code with no body in response.
*/
put: operations["databases_update_cluster_metrics_credentials"];
};
"/v2/domains": {
/**
* List All Domains
* @description To retrieve a list of all of the domains in your account, send a GET request to `/v2/domains`.
*/
get: operations["domains_list"];
/**
* Create a New Domain
* @description To create a new domain, send a POST request to `/v2/domains`. Set the "name"
* attribute to the domain name you are adding. Optionally, you may set the
* "ip_address" attribute, and an A record will be automatically created pointing
* to the apex domain.
*/
post: operations["domains_create"];
};
"/v2/domains/{domain_name}": {
/**
* Retrieve an Existing Domain
* @description To get details about a specific domain, send a GET request to `/v2/domains/$DOMAIN_NAME`.
*/
get: operations["domains_get"];
/**
* Delete a Domain
* @description To delete a domain, send a DELETE request to `/v2/domains/$DOMAIN_NAME`.
*/
delete: operations["domains_delete"];
};
"/v2/domains/{domain_name}/records": {
/**
* List All Domain Records
* @description To get a listing of all records configured for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records`.
* The list of records returned can be filtered by using the `name` and `type` query parameters. For example, to only include A records for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records?type=A`. `name` must be a fully qualified record name. For example, to only include records matching `sub.example.com`, send a GET request to `/v2/domains/$DOMAIN_NAME/records?name=sub.example.com`. Both name and type may be used together.
*/
get: operations["domains_list_records"];
/**
* Create a New Domain Record
* @description To create a new record to a domain, send a POST request to
* `/v2/domains/$DOMAIN_NAME/records`.
*
* The request must include all of the required fields for the domain record type
* being added.
*
* See the [attribute table](#tag/Domain-Records) for details regarding record
* types and their respective required attributes.
*/
post: operations["domains_create_record"];
};
"/v2/domains/{domain_name}/records/{domain_record_id}": {
/**
* Retrieve an Existing Domain Record
* @description To retrieve a specific domain record, send a GET request to `/v2/domains/$DOMAIN_NAME/records/$RECORD_ID`.
*/