ionoscloud-dbaas-mongo 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 +58 -0
- data/Rakefile +10 -0
- data/docs/api/ClustersApi.md +313 -0
- data/docs/api/LogsApi.md +93 -0
- data/docs/api/MetadataApi.md +153 -0
- data/docs/api/RestoresApi.md +84 -0
- data/docs/api/SnapshotsApi.md +83 -0
- data/docs/api/TemplatesApi.md +80 -0
- data/docs/api/UsersApi.md +321 -0
- data/docs/models/APIVersion.md +20 -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 +32 -0
- data/docs/models/ClusterResponse.md +24 -0
- data/docs/models/Connection.md +22 -0
- data/docs/models/CreateClusterProperties.md +30 -0
- data/docs/models/CreateClusterRequest.md +20 -0
- data/docs/models/CreateRestoreRequest.md +18 -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/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/ResourceType.md +15 -0
- data/docs/models/SnapshotList.md +28 -0
- data/docs/models/SnapshotListAllOf.md +22 -0
- data/docs/models/SnapshotProperties.md +22 -0
- data/docs/models/SnapshotResponse.md +22 -0
- data/docs/models/State.md +15 -0
- data/docs/models/TemplateList.md +18 -0
- data/docs/models/TemplateListAllOf.md +18 -0
- data/docs/models/TemplateResponse.md +24 -0
- data/docs/models/User.md +22 -0
- data/docs/models/UserMetadata.md +24 -0
- data/docs/models/UserProperties.md +24 -0
- data/docs/models/UserRoles.md +20 -0
- data/docs/models/UsersList.md +22 -0
- data/docs/summary.md +50 -0
- data/git_push.sh +56 -0
- data/ionoscloud-dbaas-mongo.gemspec +38 -0
- data/lib/ionoscloud-dbaas-mongo/api/clusters_api.rb +273 -0
- data/lib/ionoscloud-dbaas-mongo/api/logs_api.rb +109 -0
- data/lib/ionoscloud-dbaas-mongo/api/metadata_api.rb +136 -0
- data/lib/ionoscloud-dbaas-mongo/api/restores_api.rb +93 -0
- data/lib/ionoscloud-dbaas-mongo/api/snapshots_api.rb +85 -0
- data/lib/ionoscloud-dbaas-mongo/api/templates_api.rb +79 -0
- data/lib/ionoscloud-dbaas-mongo/api/users_api.rb +306 -0
- data/lib/ionoscloud-dbaas-mongo/api_client.rb +471 -0
- data/lib/ionoscloud-dbaas-mongo/api_error.rb +57 -0
- data/lib/ionoscloud-dbaas-mongo/configuration.rb +276 -0
- data/lib/ionoscloud-dbaas-mongo/models/api_version.rb +243 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_list.rb +353 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_list_all_of.rb +261 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_logs.rb +227 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_logs_instances.rb +244 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_logs_messages.rb +243 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_properties.rb +376 -0
- data/lib/ionoscloud-dbaas-mongo/models/cluster_response.rb +279 -0
- data/lib/ionoscloud-dbaas-mongo/models/connection.rb +279 -0
- data/lib/ionoscloud-dbaas-mongo/models/create_cluster_properties.rb +387 -0
- data/lib/ionoscloud-dbaas-mongo/models/create_cluster_request.rb +244 -0
- data/lib/ionoscloud-dbaas-mongo/models/create_restore_request.rb +233 -0
- data/lib/ionoscloud-dbaas-mongo/models/day_of_the_week.rb +42 -0
- data/lib/ionoscloud-dbaas-mongo/models/error_message.rb +245 -0
- data/lib/ionoscloud-dbaas-mongo/models/error_response.rb +244 -0
- data/lib/ionoscloud-dbaas-mongo/models/maintenance_window.rb +254 -0
- data/lib/ionoscloud-dbaas-mongo/models/metadata.rb +335 -0
- data/lib/ionoscloud-dbaas-mongo/models/pagination.rb +292 -0
- data/lib/ionoscloud-dbaas-mongo/models/pagination_links.rb +264 -0
- data/lib/ionoscloud-dbaas-mongo/models/resource_type.rb +38 -0
- data/lib/ionoscloud-dbaas-mongo/models/snapshot_list.rb +353 -0
- data/lib/ionoscloud-dbaas-mongo/models/snapshot_list_all_of.rb +261 -0
- data/lib/ionoscloud-dbaas-mongo/models/snapshot_properties.rb +264 -0
- data/lib/ionoscloud-dbaas-mongo/models/snapshot_response.rb +262 -0
- data/lib/ionoscloud-dbaas-mongo/models/state.rb +40 -0
- data/lib/ionoscloud-dbaas-mongo/models/template_list.rb +234 -0
- data/lib/ionoscloud-dbaas-mongo/models/template_list_all_of.rb +226 -0
- data/lib/ionoscloud-dbaas-mongo/models/template_response.rb +282 -0
- data/lib/ionoscloud-dbaas-mongo/models/user.rb +261 -0
- data/lib/ionoscloud-dbaas-mongo/models/user_metadata.rb +316 -0
- data/lib/ionoscloud-dbaas-mongo/models/user_properties.rb +294 -0
- data/lib/ionoscloud-dbaas-mongo/models/user_roles.rb +278 -0
- data/lib/ionoscloud-dbaas-mongo/models/users_list.rb +262 -0
- data/lib/ionoscloud-dbaas-mongo/version.rb +15 -0
- data/lib/ionoscloud-dbaas-mongo.rb +79 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +189 -0
data/docs/api/LogsApi.md
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
# LogsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**clusters_logs_get**](LogsApi.md#clusters_logs_get) | **GET** /clusters/{clusterId}/logs | Get logs of your cluster |
|
8
|
+
|
9
|
+
|
10
|
+
## clusters_logs_get
|
11
|
+
|
12
|
+
> <ClusterLogs> clusters_logs_get(cluster_id, opts)
|
13
|
+
|
14
|
+
Get logs of your cluster
|
15
|
+
|
16
|
+
Retrieves MongoDB logs based on the given parameters.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'ionoscloud-dbaas-mongo'
|
23
|
+
# setup authorization
|
24
|
+
IonoscloudDbaasMongo.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 = IonoscloudDbaasMongo::LogsApi.new
|
36
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
37
|
+
opts = {
|
38
|
+
start: Time.parse('2013-10-20T19:20:30+01:00'), # Time | The start time for the query in RFC3339 format. Must not be more than 30 days ago but before the end parameter. The default is 30 days ago.
|
39
|
+
_end: Time.parse('2013-10-20T19:20:30+01:00'), # Time | The end time for the query in RFC3339 format. Must not be greater than now. The default is the current timestamp.
|
40
|
+
direction: 'BACKWARD', # String | The direction in which to scan through the logs. The logs are returned in order of the direction.
|
41
|
+
limit: 56 # Integer | The maximal number of log lines to return. If the limit is reached then log lines will be cut at the end (respecting the scan direction).
|
42
|
+
}
|
43
|
+
|
44
|
+
begin
|
45
|
+
# Get logs of your cluster
|
46
|
+
result = api_instance.clusters_logs_get(cluster_id, opts)
|
47
|
+
p result
|
48
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
49
|
+
puts "Error when calling LogsApi->clusters_logs_get: #{e}"
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
#### Using the clusters_logs_get_with_http_info variant
|
54
|
+
|
55
|
+
This returns an Array which contains the response data, status code and headers.
|
56
|
+
|
57
|
+
> <Array(<ClusterLogs>, Integer, Hash)> clusters_logs_get_with_http_info(cluster_id, opts)
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
begin
|
61
|
+
# Get logs of your cluster
|
62
|
+
data, status_code, headers = api_instance.clusters_logs_get_with_http_info(cluster_id, opts)
|
63
|
+
p status_code # => 2xx
|
64
|
+
p headers # => { ... }
|
65
|
+
p data # => <ClusterLogs>
|
66
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
67
|
+
puts "Error when calling LogsApi->clusters_logs_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
|
+
| **start** | **Time** | The start time for the query in RFC3339 format. Must not be more than 30 days ago but before the end parameter. The default is 30 days ago. | [optional] |
|
77
|
+
| **_end** | **Time** | The end time for the query in RFC3339 format. Must not be greater than now. The default is the current timestamp. | [optional] |
|
78
|
+
| **direction** | **String** | The direction in which to scan through the logs. The logs are returned in order of the direction. | [optional][default to 'BACKWARD'] |
|
79
|
+
| **limit** | **Integer** | The maximal number of log lines to return. If the limit is reached then log lines will be cut at the end (respecting the scan direction). | [optional][default to 100] |
|
80
|
+
|
81
|
+
### Return type
|
82
|
+
|
83
|
+
[**ClusterLogs**](ClusterLogs.md)
|
84
|
+
|
85
|
+
### Authorization
|
86
|
+
|
87
|
+
basicAuth, tokenAuth
|
88
|
+
|
89
|
+
### HTTP request headers
|
90
|
+
|
91
|
+
- **Content-Type**: Not defined
|
92
|
+
- **Accept**: application/json
|
93
|
+
|
@@ -0,0 +1,153 @@
|
|
1
|
+
# MetadataApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**infos_version_get**](MetadataApi.md#infos_version_get) | **GET** /infos/version | Get API Version |
|
8
|
+
| [**infos_versions_get**](MetadataApi.md#infos_versions_get) | **GET** /infos/versions | Get All API Versions |
|
9
|
+
|
10
|
+
|
11
|
+
## infos_version_get
|
12
|
+
|
13
|
+
> <APIVersion> infos_version_get
|
14
|
+
|
15
|
+
Get API Version
|
16
|
+
|
17
|
+
Retrieves the current version of the responding API.
|
18
|
+
|
19
|
+
### Examples
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'time'
|
23
|
+
require 'ionoscloud-dbaas-mongo'
|
24
|
+
# setup authorization
|
25
|
+
IonoscloudDbaasMongo.configure do |config|
|
26
|
+
# Configure HTTP basic authorization: basicAuth
|
27
|
+
config.username = 'YOUR USERNAME'
|
28
|
+
config.password = 'YOUR PASSWORD'
|
29
|
+
|
30
|
+
# Configure API key authorization: tokenAuth
|
31
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
32
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
33
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
34
|
+
end
|
35
|
+
|
36
|
+
api_instance = IonoscloudDbaasMongo::MetadataApi.new
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Get API Version
|
40
|
+
result = api_instance.infos_version_get
|
41
|
+
p result
|
42
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
43
|
+
puts "Error when calling MetadataApi->infos_version_get: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the infos_version_get_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
50
|
+
|
51
|
+
> <Array(<APIVersion>, Integer, Hash)> infos_version_get_with_http_info
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# Get API Version
|
56
|
+
data, status_code, headers = api_instance.infos_version_get_with_http_info
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => <APIVersion>
|
60
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
61
|
+
puts "Error when calling MetadataApi->infos_version_get_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
This endpoint does not need any parameter.
|
68
|
+
|
69
|
+
### Return type
|
70
|
+
|
71
|
+
[**APIVersion**](APIVersion.md)
|
72
|
+
|
73
|
+
### Authorization
|
74
|
+
|
75
|
+
basicAuth, tokenAuth
|
76
|
+
|
77
|
+
### HTTP request headers
|
78
|
+
|
79
|
+
- **Content-Type**: Not defined
|
80
|
+
- **Accept**: application/json
|
81
|
+
|
82
|
+
|
83
|
+
## infos_versions_get
|
84
|
+
|
85
|
+
> <Array<APIVersion>> infos_versions_get
|
86
|
+
|
87
|
+
Get All API Versions
|
88
|
+
|
89
|
+
Retrieves all available versions of the responding API.
|
90
|
+
|
91
|
+
### Examples
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
require 'time'
|
95
|
+
require 'ionoscloud-dbaas-mongo'
|
96
|
+
# setup authorization
|
97
|
+
IonoscloudDbaasMongo.configure do |config|
|
98
|
+
# Configure HTTP basic authorization: basicAuth
|
99
|
+
config.username = 'YOUR USERNAME'
|
100
|
+
config.password = 'YOUR PASSWORD'
|
101
|
+
|
102
|
+
# Configure API key authorization: tokenAuth
|
103
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
104
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
105
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
106
|
+
end
|
107
|
+
|
108
|
+
api_instance = IonoscloudDbaasMongo::MetadataApi.new
|
109
|
+
|
110
|
+
begin
|
111
|
+
# Get All API Versions
|
112
|
+
result = api_instance.infos_versions_get
|
113
|
+
p result
|
114
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
115
|
+
puts "Error when calling MetadataApi->infos_versions_get: #{e}"
|
116
|
+
end
|
117
|
+
```
|
118
|
+
|
119
|
+
#### Using the infos_versions_get_with_http_info variant
|
120
|
+
|
121
|
+
This returns an Array which contains the response data, status code and headers.
|
122
|
+
|
123
|
+
> <Array(<Array<APIVersion>>, Integer, Hash)> infos_versions_get_with_http_info
|
124
|
+
|
125
|
+
```ruby
|
126
|
+
begin
|
127
|
+
# Get All API Versions
|
128
|
+
data, status_code, headers = api_instance.infos_versions_get_with_http_info
|
129
|
+
p status_code # => 2xx
|
130
|
+
p headers # => { ... }
|
131
|
+
p data # => <Array<APIVersion>>
|
132
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
133
|
+
puts "Error when calling MetadataApi->infos_versions_get_with_http_info: #{e}"
|
134
|
+
end
|
135
|
+
```
|
136
|
+
|
137
|
+
### Parameters
|
138
|
+
|
139
|
+
This endpoint does not need any parameter.
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
[**Array<APIVersion>**](APIVersion.md)
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
basicAuth, tokenAuth
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: Not defined
|
152
|
+
- **Accept**: application/json
|
153
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# RestoresApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**clusters_restore_post**](RestoresApi.md#clusters_restore_post) | **POST** /clusters/{clusterId}/restore | In-place restore of a cluster |
|
8
|
+
|
9
|
+
|
10
|
+
## clusters_restore_post
|
11
|
+
|
12
|
+
> clusters_restore_post(cluster_id, create_restore_request)
|
13
|
+
|
14
|
+
In-place restore of a cluster
|
15
|
+
|
16
|
+
Triggers an in-place restore of the given MongoDB cluster.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'ionoscloud-dbaas-mongo'
|
23
|
+
# setup authorization
|
24
|
+
IonoscloudDbaasMongo.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 = IonoscloudDbaasMongo::RestoresApi.new
|
36
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
37
|
+
create_restore_request = IonoscloudDbaasMongo::CreateRestoreRequest.new({snapshot_id: 'dcd31531-3ac8-11eb-9feb-046c59cc737e'}) # CreateRestoreRequest | The restore request to create.
|
38
|
+
|
39
|
+
begin
|
40
|
+
# In-place restore of a cluster
|
41
|
+
api_instance.clusters_restore_post(cluster_id, create_restore_request)
|
42
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
43
|
+
puts "Error when calling RestoresApi->clusters_restore_post: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the clusters_restore_post_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
50
|
+
|
51
|
+
> <Array(nil, Integer, Hash)> clusters_restore_post_with_http_info(cluster_id, create_restore_request)
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# In-place restore of a cluster
|
56
|
+
data, status_code, headers = api_instance.clusters_restore_post_with_http_info(cluster_id, create_restore_request)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => nil
|
60
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
61
|
+
puts "Error when calling RestoresApi->clusters_restore_post_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
70
|
+
| **create_restore_request** | [**CreateRestoreRequest**](CreateRestoreRequest.md) | The restore request to create. | |
|
71
|
+
|
72
|
+
### Return type
|
73
|
+
|
74
|
+
nil (empty response body)
|
75
|
+
|
76
|
+
### Authorization
|
77
|
+
|
78
|
+
basicAuth, tokenAuth
|
79
|
+
|
80
|
+
### HTTP request headers
|
81
|
+
|
82
|
+
- **Content-Type**: application/json
|
83
|
+
- **Accept**: application/json
|
84
|
+
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# SnapshotsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**clusters_snapshots_get**](SnapshotsApi.md#clusters_snapshots_get) | **GET** /clusters/{clusterId}/snapshots | Get the snapshots of your cluster |
|
8
|
+
|
9
|
+
|
10
|
+
## clusters_snapshots_get
|
11
|
+
|
12
|
+
> <SnapshotList> clusters_snapshots_get(cluster_id)
|
13
|
+
|
14
|
+
Get the snapshots of your cluster
|
15
|
+
|
16
|
+
Retrieves MongoDB snapshots.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'ionoscloud-dbaas-mongo'
|
23
|
+
# setup authorization
|
24
|
+
IonoscloudDbaasMongo.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 = IonoscloudDbaasMongo::SnapshotsApi.new
|
36
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
37
|
+
|
38
|
+
begin
|
39
|
+
# Get the snapshots of your cluster
|
40
|
+
result = api_instance.clusters_snapshots_get(cluster_id)
|
41
|
+
p result
|
42
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
43
|
+
puts "Error when calling SnapshotsApi->clusters_snapshots_get: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Using the clusters_snapshots_get_with_http_info variant
|
48
|
+
|
49
|
+
This returns an Array which contains the response data, status code and headers.
|
50
|
+
|
51
|
+
> <Array(<SnapshotList>, Integer, Hash)> clusters_snapshots_get_with_http_info(cluster_id)
|
52
|
+
|
53
|
+
```ruby
|
54
|
+
begin
|
55
|
+
# Get the snapshots of your cluster
|
56
|
+
data, status_code, headers = api_instance.clusters_snapshots_get_with_http_info(cluster_id)
|
57
|
+
p status_code # => 2xx
|
58
|
+
p headers # => { ... }
|
59
|
+
p data # => <SnapshotList>
|
60
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
61
|
+
puts "Error when calling SnapshotsApi->clusters_snapshots_get_with_http_info: #{e}"
|
62
|
+
end
|
63
|
+
```
|
64
|
+
|
65
|
+
### Parameters
|
66
|
+
|
67
|
+
| Name | Type | Description | Notes |
|
68
|
+
| ---- | ---- | ----------- | ----- |
|
69
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
70
|
+
|
71
|
+
### Return type
|
72
|
+
|
73
|
+
[**SnapshotList**](SnapshotList.md)
|
74
|
+
|
75
|
+
### Authorization
|
76
|
+
|
77
|
+
basicAuth, tokenAuth
|
78
|
+
|
79
|
+
### HTTP request headers
|
80
|
+
|
81
|
+
- **Content-Type**: Not defined
|
82
|
+
- **Accept**: application/json
|
83
|
+
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# TemplatesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**templates_get**](TemplatesApi.md#templates_get) | **GET** /templates | Get Templates |
|
8
|
+
|
9
|
+
|
10
|
+
## templates_get
|
11
|
+
|
12
|
+
> <TemplateList> templates_get
|
13
|
+
|
14
|
+
Get Templates
|
15
|
+
|
16
|
+
Retrieves a list of valid templates. These templates can be used to create MongoDB clusters; they contain properties, such as number of cores, RAM, and the storage size.
|
17
|
+
|
18
|
+
### Examples
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'time'
|
22
|
+
require 'ionoscloud-dbaas-mongo'
|
23
|
+
# setup authorization
|
24
|
+
IonoscloudDbaasMongo.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 = IonoscloudDbaasMongo::TemplatesApi.new
|
36
|
+
|
37
|
+
begin
|
38
|
+
# Get Templates
|
39
|
+
result = api_instance.templates_get
|
40
|
+
p result
|
41
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
42
|
+
puts "Error when calling TemplatesApi->templates_get: #{e}"
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
46
|
+
#### Using the templates_get_with_http_info variant
|
47
|
+
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
49
|
+
|
50
|
+
> <Array(<TemplateList>, Integer, Hash)> templates_get_with_http_info
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
begin
|
54
|
+
# Get Templates
|
55
|
+
data, status_code, headers = api_instance.templates_get_with_http_info
|
56
|
+
p status_code # => 2xx
|
57
|
+
p headers # => { ... }
|
58
|
+
p data # => <TemplateList>
|
59
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
60
|
+
puts "Error when calling TemplatesApi->templates_get_with_http_info: #{e}"
|
61
|
+
end
|
62
|
+
```
|
63
|
+
|
64
|
+
### Parameters
|
65
|
+
|
66
|
+
This endpoint does not need any parameter.
|
67
|
+
|
68
|
+
### Return type
|
69
|
+
|
70
|
+
[**TemplateList**](TemplateList.md)
|
71
|
+
|
72
|
+
### Authorization
|
73
|
+
|
74
|
+
basicAuth, tokenAuth
|
75
|
+
|
76
|
+
### HTTP request headers
|
77
|
+
|
78
|
+
- **Content-Type**: Not defined
|
79
|
+
- **Accept**: application/json
|
80
|
+
|