ionoscloud-dbaas-postgres 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +70 -0
- data/LICENSE +201 -0
- data/README.md +65 -0
- data/Rakefile +10 -0
- data/docs/README.md +163 -0
- data/docs/api/BackupsApi.md +232 -0
- data/docs/api/ClustersApi.md +540 -0
- data/docs/api/LogsApi.md +91 -0
- data/docs/api/MetadataApi.md +153 -0
- data/docs/api/RestoresApi.md +84 -0
- data/docs/models/APIVersion.md +20 -0
- data/docs/models/BackupLocation.md +15 -0
- data/docs/models/BackupMetadata.md +20 -0
- data/docs/models/BackupResponse.md +24 -0
- data/docs/models/ClusterBackup.md +26 -0
- data/docs/models/ClusterBackupList.md +28 -0
- data/docs/models/ClusterBackupListAllOf.md +22 -0
- data/docs/models/ClusterList.md +28 -0
- data/docs/models/ClusterListAllOf.md +22 -0
- data/docs/models/ClusterLogs.md +18 -0
- data/docs/models/ClusterLogsInstances.md +20 -0
- data/docs/models/ClusterLogsMessages.md +20 -0
- data/docs/models/ClusterProperties.md +40 -0
- data/docs/models/ClusterResponse.md +24 -0
- data/docs/models/Connection.md +22 -0
- data/docs/models/CreateClusterProperties.md +42 -0
- data/docs/models/CreateClusterRequest.md +20 -0
- data/docs/models/CreateRestoreRequest.md +20 -0
- data/docs/models/DBUser.md +20 -0
- data/docs/models/DayOfTheWeek.md +15 -0
- data/docs/models/ErrorMessage.md +20 -0
- data/docs/models/ErrorResponse.md +20 -0
- data/docs/models/Location.md +15 -0
- data/docs/models/MaintenanceWindow.md +20 -0
- data/docs/models/Metadata.md +30 -0
- data/docs/models/Pagination.md +22 -0
- data/docs/models/PaginationLinks.md +22 -0
- data/docs/models/PatchClusterProperties.md +32 -0
- data/docs/models/PatchClusterRequest.md +20 -0
- data/docs/models/PostgresVersionList.md +18 -0
- data/docs/models/PostgresVersionListData.md +18 -0
- data/docs/models/ResourceType.md +15 -0
- data/docs/models/State.md +15 -0
- data/docs/models/StorageType.md +15 -0
- data/docs/models/SynchronizationMode.md +15 -0
- data/docs/summary.md +50 -0
- data/git_push.sh +58 -0
- data/ionoscloud-dbaas-postgres.gemspec +38 -0
- data/lib/ionoscloud-dbaas-postgres/api/backups_api.rb +205 -0
- data/lib/ionoscloud-dbaas-postgres/api/clusters_api.rb +464 -0
- data/lib/ionoscloud-dbaas-postgres/api/logs_api.rb +102 -0
- data/lib/ionoscloud-dbaas-postgres/api/metadata_api.rb +136 -0
- data/lib/ionoscloud-dbaas-postgres/api/restores_api.rb +93 -0
- data/lib/ionoscloud-dbaas-postgres/api_client.rb +471 -0
- data/lib/ionoscloud-dbaas-postgres/api_error.rb +57 -0
- data/lib/ionoscloud-dbaas-postgres/configuration.rb +291 -0
- data/lib/ionoscloud-dbaas-postgres/models/api_version.rb +227 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_location.rb +36 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_metadata.rb +229 -0
- data/lib/ionoscloud-dbaas-postgres/models/backup_response.rb +247 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup.rb +260 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list.rb +305 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_backup_list_all_of.rb +237 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_list.rb +305 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_list_all_of.rb +237 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs.rb +219 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_instances.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_logs_messages.rb +227 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_properties.rb +417 -0
- data/lib/ionoscloud-dbaas-postgres/models/cluster_response.rb +247 -0
- data/lib/ionoscloud-dbaas-postgres/models/connection.rb +255 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_cluster_properties.rb +501 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_cluster_request.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/create_restore_request.rb +235 -0
- data/lib/ionoscloud-dbaas-postgres/models/day_of_the_week.rb +42 -0
- data/lib/ionoscloud-dbaas-postgres/models/db_user.rb +239 -0
- data/lib/ionoscloud-dbaas-postgres/models/error_message.rb +229 -0
- data/lib/ionoscloud-dbaas-postgres/models/error_response.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/location.rb +41 -0
- data/lib/ionoscloud-dbaas-postgres/models/maintenance_window.rb +238 -0
- data/lib/ionoscloud-dbaas-postgres/models/metadata.rb +275 -0
- data/lib/ionoscloud-dbaas-postgres/models/pagination.rb +268 -0
- data/lib/ionoscloud-dbaas-postgres/models/pagination_links.rb +240 -0
- data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_properties.rb +381 -0
- data/lib/ionoscloud-dbaas-postgres/models/patch_cluster_request.rb +228 -0
- data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list.rb +219 -0
- data/lib/ionoscloud-dbaas-postgres/models/postgres_version_list_data.rb +218 -0
- data/lib/ionoscloud-dbaas-postgres/models/resource_type.rb +38 -0
- data/lib/ionoscloud-dbaas-postgres/models/state.rb +40 -0
- data/lib/ionoscloud-dbaas-postgres/models/storage_type.rb +37 -0
- data/lib/ionoscloud-dbaas-postgres/models/synchronization_mode.rb +38 -0
- data/lib/ionoscloud-dbaas-postgres/version.rb +15 -0
- data/lib/ionoscloud-dbaas-postgres.rb +79 -0
- data/lib/test_driver.rb +119 -0
- data/sonar-project.properties +12 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +190 -0
@@ -0,0 +1,540 @@
|
|
1
|
+
# ClustersApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/postgresql*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cluster_postgres_versions_get**](ClustersApi.md#cluster_postgres_versions_get) | **GET** /clusters/{clusterId}/postgresversions | List PostgreSQL versions |
|
8
|
+
| [**clusters_delete**](ClustersApi.md#clusters_delete) | **DELETE** /clusters/{clusterId} | Delete a cluster |
|
9
|
+
| [**clusters_find_by_id**](ClustersApi.md#clusters_find_by_id) | **GET** /clusters/{clusterId} | Fetch a cluster |
|
10
|
+
| [**clusters_get**](ClustersApi.md#clusters_get) | **GET** /clusters | List clusters |
|
11
|
+
| [**clusters_patch**](ClustersApi.md#clusters_patch) | **PATCH** /clusters/{clusterId} | Patch a cluster |
|
12
|
+
| [**clusters_post**](ClustersApi.md#clusters_post) | **POST** /clusters | Create a cluster |
|
13
|
+
| [**postgres_versions_get**](ClustersApi.md#postgres_versions_get) | **GET** /clusters/postgresversions | List PostgreSQL versions |
|
14
|
+
|
15
|
+
|
16
|
+
## cluster_postgres_versions_get
|
17
|
+
|
18
|
+
> <PostgresVersionList> cluster_postgres_versions_get(cluster_id)
|
19
|
+
|
20
|
+
List PostgreSQL versions
|
21
|
+
|
22
|
+
Retrieves a list of all PostgreSQL versions available for this cluster including the current version.
|
23
|
+
|
24
|
+
### Examples
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'time'
|
28
|
+
require 'ionoscloud-dbaas-postgres'
|
29
|
+
# setup authorization
|
30
|
+
IonoscloudDbaasPostgres.configure do |config|
|
31
|
+
# Configure HTTP basic authorization: basicAuth
|
32
|
+
config.username = 'YOUR USERNAME'
|
33
|
+
config.password = 'YOUR PASSWORD'
|
34
|
+
|
35
|
+
# Configure API key authorization: tokenAuth
|
36
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
37
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
38
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
39
|
+
end
|
40
|
+
|
41
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
42
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
43
|
+
|
44
|
+
begin
|
45
|
+
# List PostgreSQL versions
|
46
|
+
result = api_instance.cluster_postgres_versions_get(cluster_id)
|
47
|
+
p result
|
48
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
49
|
+
puts "Error when calling ClustersApi->cluster_postgres_versions_get: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
#### Using the cluster_postgres_versions_get_with_http_info variant
|
54
|
+
|
55
|
+
This returns an Array which contains the response data, status code and headers.
|
56
|
+
|
57
|
+
> <Array(<PostgresVersionList>, Integer, Hash)> cluster_postgres_versions_get_with_http_info(cluster_id)
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
begin
|
61
|
+
# List PostgreSQL versions
|
62
|
+
data, status_code, headers = api_instance.cluster_postgres_versions_get_with_http_info(cluster_id)
|
63
|
+
p status_code # => 2xx
|
64
|
+
p headers # => { ... }
|
65
|
+
p data # => <PostgresVersionList>
|
66
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
67
|
+
puts "Error when calling ClustersApi->cluster_postgres_versions_get_with_http_info: #{e}"
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
### Parameters
|
72
|
+
|
73
|
+
| Name | Type | Description | Notes |
|
74
|
+
| ---- | ---- | ----------- | ----- |
|
75
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
76
|
+
|
77
|
+
### Return type
|
78
|
+
|
79
|
+
[**PostgresVersionList**](PostgresVersionList.md)
|
80
|
+
|
81
|
+
### Authorization
|
82
|
+
|
83
|
+
basicAuth, tokenAuth
|
84
|
+
|
85
|
+
### HTTP request headers
|
86
|
+
|
87
|
+
- **Content-Type**: Not defined
|
88
|
+
- **Accept**: application/json
|
89
|
+
|
90
|
+
|
91
|
+
## clusters_delete
|
92
|
+
|
93
|
+
> <ClusterResponse> clusters_delete(cluster_id)
|
94
|
+
|
95
|
+
Delete a cluster
|
96
|
+
|
97
|
+
Delete a PostgreSQL cluster.
|
98
|
+
|
99
|
+
### Examples
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
require 'time'
|
103
|
+
require 'ionoscloud-dbaas-postgres'
|
104
|
+
# setup authorization
|
105
|
+
IonoscloudDbaasPostgres.configure do |config|
|
106
|
+
# Configure HTTP basic authorization: basicAuth
|
107
|
+
config.username = 'YOUR USERNAME'
|
108
|
+
config.password = 'YOUR PASSWORD'
|
109
|
+
|
110
|
+
# Configure API key authorization: tokenAuth
|
111
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
112
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
113
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
114
|
+
end
|
115
|
+
|
116
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
117
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
118
|
+
|
119
|
+
begin
|
120
|
+
# Delete a cluster
|
121
|
+
result = api_instance.clusters_delete(cluster_id)
|
122
|
+
p result
|
123
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
124
|
+
puts "Error when calling ClustersApi->clusters_delete: #{e}"
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
128
|
+
#### Using the clusters_delete_with_http_info variant
|
129
|
+
|
130
|
+
This returns an Array which contains the response data, status code and headers.
|
131
|
+
|
132
|
+
> <Array(<ClusterResponse>, Integer, Hash)> clusters_delete_with_http_info(cluster_id)
|
133
|
+
|
134
|
+
```ruby
|
135
|
+
begin
|
136
|
+
# Delete a cluster
|
137
|
+
data, status_code, headers = api_instance.clusters_delete_with_http_info(cluster_id)
|
138
|
+
p status_code # => 2xx
|
139
|
+
p headers # => { ... }
|
140
|
+
p data # => <ClusterResponse>
|
141
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
142
|
+
puts "Error when calling ClustersApi->clusters_delete_with_http_info: #{e}"
|
143
|
+
end
|
144
|
+
```
|
145
|
+
|
146
|
+
### Parameters
|
147
|
+
|
148
|
+
| Name | Type | Description | Notes |
|
149
|
+
| ---- | ---- | ----------- | ----- |
|
150
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
151
|
+
|
152
|
+
### Return type
|
153
|
+
|
154
|
+
[**ClusterResponse**](ClusterResponse.md)
|
155
|
+
|
156
|
+
### Authorization
|
157
|
+
|
158
|
+
basicAuth, tokenAuth
|
159
|
+
|
160
|
+
### HTTP request headers
|
161
|
+
|
162
|
+
- **Content-Type**: Not defined
|
163
|
+
- **Accept**: application/json
|
164
|
+
|
165
|
+
|
166
|
+
## clusters_find_by_id
|
167
|
+
|
168
|
+
> <ClusterResponse> clusters_find_by_id(cluster_id)
|
169
|
+
|
170
|
+
Fetch a cluster
|
171
|
+
|
172
|
+
You can retrieve a PostgreSQL cluster by using its ID. This value can be found in the response body when a PostgreSQL cluster is created or when you GET a list of PostgreSQL clusters.
|
173
|
+
|
174
|
+
### Examples
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
require 'time'
|
178
|
+
require 'ionoscloud-dbaas-postgres'
|
179
|
+
# setup authorization
|
180
|
+
IonoscloudDbaasPostgres.configure do |config|
|
181
|
+
# Configure HTTP basic authorization: basicAuth
|
182
|
+
config.username = 'YOUR USERNAME'
|
183
|
+
config.password = 'YOUR PASSWORD'
|
184
|
+
|
185
|
+
# Configure API key authorization: tokenAuth
|
186
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
187
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
188
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
189
|
+
end
|
190
|
+
|
191
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
192
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
193
|
+
|
194
|
+
begin
|
195
|
+
# Fetch a cluster
|
196
|
+
result = api_instance.clusters_find_by_id(cluster_id)
|
197
|
+
p result
|
198
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
199
|
+
puts "Error when calling ClustersApi->clusters_find_by_id: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
#### Using the clusters_find_by_id_with_http_info variant
|
204
|
+
|
205
|
+
This returns an Array which contains the response data, status code and headers.
|
206
|
+
|
207
|
+
> <Array(<ClusterResponse>, Integer, Hash)> clusters_find_by_id_with_http_info(cluster_id)
|
208
|
+
|
209
|
+
```ruby
|
210
|
+
begin
|
211
|
+
# Fetch a cluster
|
212
|
+
data, status_code, headers = api_instance.clusters_find_by_id_with_http_info(cluster_id)
|
213
|
+
p status_code # => 2xx
|
214
|
+
p headers # => { ... }
|
215
|
+
p data # => <ClusterResponse>
|
216
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
217
|
+
puts "Error when calling ClustersApi->clusters_find_by_id_with_http_info: #{e}"
|
218
|
+
end
|
219
|
+
```
|
220
|
+
|
221
|
+
### Parameters
|
222
|
+
|
223
|
+
| Name | Type | Description | Notes |
|
224
|
+
| ---- | ---- | ----------- | ----- |
|
225
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
226
|
+
|
227
|
+
### Return type
|
228
|
+
|
229
|
+
[**ClusterResponse**](ClusterResponse.md)
|
230
|
+
|
231
|
+
### Authorization
|
232
|
+
|
233
|
+
basicAuth, tokenAuth
|
234
|
+
|
235
|
+
### HTTP request headers
|
236
|
+
|
237
|
+
- **Content-Type**: Not defined
|
238
|
+
- **Accept**: application/json
|
239
|
+
|
240
|
+
|
241
|
+
## clusters_get
|
242
|
+
|
243
|
+
> <ClusterList> clusters_get(opts)
|
244
|
+
|
245
|
+
List clusters
|
246
|
+
|
247
|
+
Retrieves a list of PostgreSQL clusters.
|
248
|
+
|
249
|
+
### Examples
|
250
|
+
|
251
|
+
```ruby
|
252
|
+
require 'time'
|
253
|
+
require 'ionoscloud-dbaas-postgres'
|
254
|
+
# setup authorization
|
255
|
+
IonoscloudDbaasPostgres.configure do |config|
|
256
|
+
# Configure HTTP basic authorization: basicAuth
|
257
|
+
config.username = 'YOUR USERNAME'
|
258
|
+
config.password = 'YOUR PASSWORD'
|
259
|
+
|
260
|
+
# Configure API key authorization: tokenAuth
|
261
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
262
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
263
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
264
|
+
end
|
265
|
+
|
266
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
267
|
+
opts = {
|
268
|
+
filter_name: 'filter_name_example' # String | Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field.
|
269
|
+
}
|
270
|
+
|
271
|
+
begin
|
272
|
+
# List clusters
|
273
|
+
result = api_instance.clusters_get(opts)
|
274
|
+
p result
|
275
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
276
|
+
puts "Error when calling ClustersApi->clusters_get: #{e}"
|
277
|
+
end
|
278
|
+
```
|
279
|
+
|
280
|
+
#### Using the clusters_get_with_http_info variant
|
281
|
+
|
282
|
+
This returns an Array which contains the response data, status code and headers.
|
283
|
+
|
284
|
+
> <Array(<ClusterList>, Integer, Hash)> clusters_get_with_http_info(opts)
|
285
|
+
|
286
|
+
```ruby
|
287
|
+
begin
|
288
|
+
# List clusters
|
289
|
+
data, status_code, headers = api_instance.clusters_get_with_http_info(opts)
|
290
|
+
p status_code # => 2xx
|
291
|
+
p headers # => { ... }
|
292
|
+
p data # => <ClusterList>
|
293
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
294
|
+
puts "Error when calling ClustersApi->clusters_get_with_http_info: #{e}"
|
295
|
+
end
|
296
|
+
```
|
297
|
+
|
298
|
+
### Parameters
|
299
|
+
|
300
|
+
| Name | Type | Description | Notes |
|
301
|
+
| ---- | ---- | ----------- | ----- |
|
302
|
+
| **filter_name** | **String** | Response filter to list only the PostgreSQL clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field. | [optional] |
|
303
|
+
|
304
|
+
### Return type
|
305
|
+
|
306
|
+
[**ClusterList**](ClusterList.md)
|
307
|
+
|
308
|
+
### Authorization
|
309
|
+
|
310
|
+
basicAuth, tokenAuth
|
311
|
+
|
312
|
+
### HTTP request headers
|
313
|
+
|
314
|
+
- **Content-Type**: Not defined
|
315
|
+
- **Accept**: application/json
|
316
|
+
|
317
|
+
|
318
|
+
## clusters_patch
|
319
|
+
|
320
|
+
> <ClusterResponse> clusters_patch(cluster_id, patch_cluster_request)
|
321
|
+
|
322
|
+
Patch a cluster
|
323
|
+
|
324
|
+
Patch attributes of a PostgreSQL cluster.
|
325
|
+
|
326
|
+
### Examples
|
327
|
+
|
328
|
+
```ruby
|
329
|
+
require 'time'
|
330
|
+
require 'ionoscloud-dbaas-postgres'
|
331
|
+
# setup authorization
|
332
|
+
IonoscloudDbaasPostgres.configure do |config|
|
333
|
+
# Configure HTTP basic authorization: basicAuth
|
334
|
+
config.username = 'YOUR USERNAME'
|
335
|
+
config.password = 'YOUR PASSWORD'
|
336
|
+
|
337
|
+
# Configure API key authorization: tokenAuth
|
338
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
339
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
340
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
341
|
+
end
|
342
|
+
|
343
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
344
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
345
|
+
patch_cluster_request = IonoscloudDbaasPostgres::PatchClusterRequest.new # PatchClusterRequest | The modified cluster.
|
346
|
+
|
347
|
+
begin
|
348
|
+
# Patch a cluster
|
349
|
+
result = api_instance.clusters_patch(cluster_id, patch_cluster_request)
|
350
|
+
p result
|
351
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
352
|
+
puts "Error when calling ClustersApi->clusters_patch: #{e}"
|
353
|
+
end
|
354
|
+
```
|
355
|
+
|
356
|
+
#### Using the clusters_patch_with_http_info variant
|
357
|
+
|
358
|
+
This returns an Array which contains the response data, status code and headers.
|
359
|
+
|
360
|
+
> <Array(<ClusterResponse>, Integer, Hash)> clusters_patch_with_http_info(cluster_id, patch_cluster_request)
|
361
|
+
|
362
|
+
```ruby
|
363
|
+
begin
|
364
|
+
# Patch a cluster
|
365
|
+
data, status_code, headers = api_instance.clusters_patch_with_http_info(cluster_id, patch_cluster_request)
|
366
|
+
p status_code # => 2xx
|
367
|
+
p headers # => { ... }
|
368
|
+
p data # => <ClusterResponse>
|
369
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
370
|
+
puts "Error when calling ClustersApi->clusters_patch_with_http_info: #{e}"
|
371
|
+
end
|
372
|
+
```
|
373
|
+
|
374
|
+
### Parameters
|
375
|
+
|
376
|
+
| Name | Type | Description | Notes |
|
377
|
+
| ---- | ---- | ----------- | ----- |
|
378
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
379
|
+
| **patch_cluster_request** | [**PatchClusterRequest**](PatchClusterRequest.md) | The modified cluster. | |
|
380
|
+
|
381
|
+
### Return type
|
382
|
+
|
383
|
+
[**ClusterResponse**](ClusterResponse.md)
|
384
|
+
|
385
|
+
### Authorization
|
386
|
+
|
387
|
+
basicAuth, tokenAuth
|
388
|
+
|
389
|
+
### HTTP request headers
|
390
|
+
|
391
|
+
- **Content-Type**: application/json
|
392
|
+
- **Accept**: application/json
|
393
|
+
|
394
|
+
|
395
|
+
## clusters_post
|
396
|
+
|
397
|
+
> <ClusterResponse> clusters_post(create_cluster_request)
|
398
|
+
|
399
|
+
Create a cluster
|
400
|
+
|
401
|
+
Creates a new PostgreSQL cluster. If the `fromBackup` field is populated, the new cluster will be created based on the given backup.
|
402
|
+
|
403
|
+
### Examples
|
404
|
+
|
405
|
+
```ruby
|
406
|
+
require 'time'
|
407
|
+
require 'ionoscloud-dbaas-postgres'
|
408
|
+
# setup authorization
|
409
|
+
IonoscloudDbaasPostgres.configure do |config|
|
410
|
+
# Configure HTTP basic authorization: basicAuth
|
411
|
+
config.username = 'YOUR USERNAME'
|
412
|
+
config.password = 'YOUR PASSWORD'
|
413
|
+
|
414
|
+
# Configure API key authorization: tokenAuth
|
415
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
416
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
417
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
418
|
+
end
|
419
|
+
|
420
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
421
|
+
create_cluster_request = IonoscloudDbaasPostgres::CreateClusterRequest.new # CreateClusterRequest | The cluster to be created.
|
422
|
+
|
423
|
+
begin
|
424
|
+
# Create a cluster
|
425
|
+
result = api_instance.clusters_post(create_cluster_request)
|
426
|
+
p result
|
427
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
428
|
+
puts "Error when calling ClustersApi->clusters_post: #{e}"
|
429
|
+
end
|
430
|
+
```
|
431
|
+
|
432
|
+
#### Using the clusters_post_with_http_info variant
|
433
|
+
|
434
|
+
This returns an Array which contains the response data, status code and headers.
|
435
|
+
|
436
|
+
> <Array(<ClusterResponse>, Integer, Hash)> clusters_post_with_http_info(create_cluster_request)
|
437
|
+
|
438
|
+
```ruby
|
439
|
+
begin
|
440
|
+
# Create a cluster
|
441
|
+
data, status_code, headers = api_instance.clusters_post_with_http_info(create_cluster_request)
|
442
|
+
p status_code # => 2xx
|
443
|
+
p headers # => { ... }
|
444
|
+
p data # => <ClusterResponse>
|
445
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
446
|
+
puts "Error when calling ClustersApi->clusters_post_with_http_info: #{e}"
|
447
|
+
end
|
448
|
+
```
|
449
|
+
|
450
|
+
### Parameters
|
451
|
+
|
452
|
+
| Name | Type | Description | Notes |
|
453
|
+
| ---- | ---- | ----------- | ----- |
|
454
|
+
| **create_cluster_request** | [**CreateClusterRequest**](CreateClusterRequest.md) | The cluster to be created. | |
|
455
|
+
|
456
|
+
### Return type
|
457
|
+
|
458
|
+
[**ClusterResponse**](ClusterResponse.md)
|
459
|
+
|
460
|
+
### Authorization
|
461
|
+
|
462
|
+
basicAuth, tokenAuth
|
463
|
+
|
464
|
+
### HTTP request headers
|
465
|
+
|
466
|
+
- **Content-Type**: application/json
|
467
|
+
- **Accept**: application/json
|
468
|
+
|
469
|
+
|
470
|
+
## postgres_versions_get
|
471
|
+
|
472
|
+
> <PostgresVersionList> postgres_versions_get
|
473
|
+
|
474
|
+
List PostgreSQL versions
|
475
|
+
|
476
|
+
Retrieves a list of all available PostgreSQL versions.
|
477
|
+
|
478
|
+
### Examples
|
479
|
+
|
480
|
+
```ruby
|
481
|
+
require 'time'
|
482
|
+
require 'ionoscloud-dbaas-postgres'
|
483
|
+
# setup authorization
|
484
|
+
IonoscloudDbaasPostgres.configure do |config|
|
485
|
+
# Configure HTTP basic authorization: basicAuth
|
486
|
+
config.username = 'YOUR USERNAME'
|
487
|
+
config.password = 'YOUR PASSWORD'
|
488
|
+
|
489
|
+
# Configure API key authorization: tokenAuth
|
490
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
491
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
492
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
493
|
+
end
|
494
|
+
|
495
|
+
api_instance = IonoscloudDbaasPostgres::ClustersApi.new
|
496
|
+
|
497
|
+
begin
|
498
|
+
# List PostgreSQL versions
|
499
|
+
result = api_instance.postgres_versions_get
|
500
|
+
p result
|
501
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
502
|
+
puts "Error when calling ClustersApi->postgres_versions_get: #{e}"
|
503
|
+
end
|
504
|
+
```
|
505
|
+
|
506
|
+
#### Using the postgres_versions_get_with_http_info variant
|
507
|
+
|
508
|
+
This returns an Array which contains the response data, status code and headers.
|
509
|
+
|
510
|
+
> <Array(<PostgresVersionList>, Integer, Hash)> postgres_versions_get_with_http_info
|
511
|
+
|
512
|
+
```ruby
|
513
|
+
begin
|
514
|
+
# List PostgreSQL versions
|
515
|
+
data, status_code, headers = api_instance.postgres_versions_get_with_http_info
|
516
|
+
p status_code # => 2xx
|
517
|
+
p headers # => { ... }
|
518
|
+
p data # => <PostgresVersionList>
|
519
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
520
|
+
puts "Error when calling ClustersApi->postgres_versions_get_with_http_info: #{e}"
|
521
|
+
end
|
522
|
+
```
|
523
|
+
|
524
|
+
### Parameters
|
525
|
+
|
526
|
+
This endpoint does not need any parameter.
|
527
|
+
|
528
|
+
### Return type
|
529
|
+
|
530
|
+
[**PostgresVersionList**](PostgresVersionList.md)
|
531
|
+
|
532
|
+
### Authorization
|
533
|
+
|
534
|
+
basicAuth, tokenAuth
|
535
|
+
|
536
|
+
### HTTP request headers
|
537
|
+
|
538
|
+
- **Content-Type**: Not defined
|
539
|
+
- **Accept**: application/json
|
540
|
+
|
data/docs/api/LogsApi.md
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
# LogsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/postgresql*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cluster_logs_get**](LogsApi.md#cluster_logs_get) | **GET** /clusters/{clusterId}/logs | Get logs of your cluster |
|
8
|
+
|
9
|
+
|
10
|
+
## cluster_logs_get
|
11
|
+
|
12
|
+
> <ClusterLogs> cluster_logs_get(cluster_id, opts)
|
13
|
+
|
14
|
+
Get logs of your cluster
|
15
|
+
|
16
|
+
Retrieves PostgreSQL logs based on the given parameters.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'ionoscloud-dbaas-postgres'
|
23
|
+
# setup authorization
|
24
|
+
IonoscloudDbaasPostgres.configure do |config|
|
25
|
+
# Configure HTTP basic authorization: basicAuth
|
26
|
+
config.username = 'YOUR USERNAME'
|
27
|
+
config.password = 'YOUR PASSWORD'
|
28
|
+
|
29
|
+
# Configure API key authorization: tokenAuth
|
30
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
32
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = IonoscloudDbaasPostgres::LogsApi.new
|
36
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
37
|
+
opts = {
|
38
|
+
limit: 56, # Integer | The maximal number of log lines to return.
|
39
|
+
start: Time.parse('2013-10-20T19:20:30+01:00'), # Time | The start time for the query in RFC3339 format.
|
40
|
+
_end: Time.parse('2013-10-20T19:20:30+01:00') # Time | The end time for the query in RFC3339 format.
|
41
|
+
}
|
42
|
+
|
43
|
+
begin
|
44
|
+
# Get logs of your cluster
|
45
|
+
result = api_instance.cluster_logs_get(cluster_id, opts)
|
46
|
+
p result
|
47
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
48
|
+
puts "Error when calling LogsApi->cluster_logs_get: #{e}"
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
#### Using the cluster_logs_get_with_http_info variant
|
53
|
+
|
54
|
+
This returns an Array which contains the response data, status code and headers.
|
55
|
+
|
56
|
+
> <Array(<ClusterLogs>, Integer, Hash)> cluster_logs_get_with_http_info(cluster_id, opts)
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
begin
|
60
|
+
# Get logs of your cluster
|
61
|
+
data, status_code, headers = api_instance.cluster_logs_get_with_http_info(cluster_id, opts)
|
62
|
+
p status_code # => 2xx
|
63
|
+
p headers # => { ... }
|
64
|
+
p data # => <ClusterLogs>
|
65
|
+
rescue IonoscloudDbaasPostgres::ApiError => e
|
66
|
+
puts "Error when calling LogsApi->cluster_logs_get_with_http_info: #{e}"
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
### Parameters
|
71
|
+
|
72
|
+
| Name | Type | Description | Notes |
|
73
|
+
| ---- | ---- | ----------- | ----- |
|
74
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
75
|
+
| **limit** | **Integer** | The maximal number of log lines to return. | [optional] |
|
76
|
+
| **start** | **Time** | The start time for the query in RFC3339 format. | [optional] |
|
77
|
+
| **_end** | **Time** | The end time for the query in RFC3339 format. | [optional] |
|
78
|
+
|
79
|
+
### Return type
|
80
|
+
|
81
|
+
[**ClusterLogs**](ClusterLogs.md)
|
82
|
+
|
83
|
+
### Authorization
|
84
|
+
|
85
|
+
basicAuth, tokenAuth
|
86
|
+
|
87
|
+
### HTTP request headers
|
88
|
+
|
89
|
+
- **Content-Type**: Not defined
|
90
|
+
- **Accept**: application/json
|
91
|
+
|