ionoscloud-dbaas-mongo 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +6 -2
- data/docs/README.md +56 -0
- data/docs/api/ClustersApi.md +78 -0
- data/docs/api/UsersApi.md +82 -0
- data/docs/models/ClusterProperties.md +1 -1
- data/docs/models/Connection.md +1 -1
- data/docs/models/CreateClusterProperties.md +1 -1
- data/docs/models/PatchClusterProperties.md +26 -0
- data/docs/models/PatchClusterRequest.md +20 -0
- data/docs/models/PatchUserProperties.md +20 -0
- data/docs/models/PatchUserRequest.md +20 -0
- data/docs/models/TemplateList.md +11 -1
- data/docs/models/TemplateListAllOf.md +4 -0
- data/docs/models/TemplateResponse.md +4 -0
- data/docs/models/UserProperties.md +0 -2
- data/lib/ionoscloud-dbaas-mongo/api/clusters_api.rb +71 -0
- data/lib/ionoscloud-dbaas-mongo/api/users_api.rb +83 -0
- data/lib/ionoscloud-dbaas-mongo/api_client.rb +1 -1
- data/lib/ionoscloud-dbaas-mongo/models/cluster_properties.rb +1 -1
- data/lib/ionoscloud-dbaas-mongo/models/connection.rb +1 -1
- data/lib/ionoscloud-dbaas-mongo/models/create_cluster_properties.rb +1 -1
- data/lib/ionoscloud-dbaas-mongo/models/patch_cluster_properties.rb +322 -0
- data/lib/ionoscloud-dbaas-mongo/models/patch_cluster_request.rb +244 -0
- data/lib/ionoscloud-dbaas-mongo/models/patch_user_properties.rb +259 -0
- data/lib/ionoscloud-dbaas-mongo/models/patch_user_request.rb +244 -0
- data/lib/ionoscloud-dbaas-mongo/models/resource_type.rb +1 -0
- data/lib/ionoscloud-dbaas-mongo/models/template_list.rb +123 -4
- data/lib/ionoscloud-dbaas-mongo/models/template_list_all_of.rb +36 -1
- data/lib/ionoscloud-dbaas-mongo/models/template_response.rb +37 -1
- data/lib/ionoscloud-dbaas-mongo/models/user_properties.rb +19 -23
- data/lib/ionoscloud-dbaas-mongo/version.rb +1 -1
- data/lib/ionoscloud-dbaas-mongo.rb +4 -0
- data/sonar-project.properties +12 -0
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 84551fc4361fd70caaf4c597437afe9d2c655b418b60d3b987f37c5e2003e671
|
|
4
|
+
data.tar.gz: 2c344a0cd41ab41bec3b1bc0e97b64ccb9be7a55ad097d3ad0f274f574edfe5e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cdce9d37ed75e60b9ce67242c4dcee14c830e87985aa9ef2890c5a3e3bfee03898aa5a8e096733ec5a5205181ff04b31e90d36f43afe3d0df5b13757e9ebd31
|
|
7
|
+
data.tar.gz: 3bc313e40cfb60097923886b8fbda7ac0ef0a192674f24d2f93c8f2885f67574a736a2a0e7088bc02c1b5f0b6ea3ec7569ede26d299b5586cb98c7c94ccdd274
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ionoscloud-dbaas-mongo (1.
|
|
4
|
+
ionoscloud-dbaas-mongo (1.1.0)
|
|
5
5
|
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -11,7 +11,7 @@ GEM
|
|
|
11
11
|
byebug (11.1.3)
|
|
12
12
|
coderay (1.1.3)
|
|
13
13
|
diff-lcs (1.5.0)
|
|
14
|
-
ethon (0.
|
|
14
|
+
ethon (0.16.0)
|
|
15
15
|
ffi (>= 1.15.0)
|
|
16
16
|
ffi (1.15.5)
|
|
17
17
|
jaro_winkler (1.5.4)
|
|
@@ -67,4 +67,4 @@ DEPENDENCIES
|
|
|
67
67
|
rubocop (~> 0.66.0)
|
|
68
68
|
|
|
69
69
|
BUNDLED WITH
|
|
70
|
-
2.3.
|
|
70
|
+
2.3.26
|
data/README.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
|
+
[](https://rubygems.org/gems/ionoscloud-cert-manager)
|
|
3
|
+
[](https://gitter.im/ionos-cloud/sdk-general)
|
|
4
|
+
|
|
5
|
+

|
|
2
6
|
|
|
3
7
|
# ionoscloud-dbaas-mongo
|
|
4
8
|
|
|
@@ -55,4 +59,4 @@ Include the Ruby code directly using `-I` as follows:
|
|
|
55
59
|
ruby -Ilib script.rb
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
## Our latest, most up to date documentation is available [here](https://github.com/ionos-cloud/sdk-ruby/blob/master/
|
|
62
|
+
## Our latest, most up to date documentation is available [here](https://github.com/ionos-cloud/sdk-ruby/blob/master/README.md)
|
data/docs/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# ionoscloud-dbaas-mongo
|
|
2
|
+
|
|
3
|
+
IonoscloudDbaasMongo - the Ruby gem for the IONOS DBaaS MongoDB REST API
|
|
4
|
+
|
|
5
|
+
With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API.
|
|
6
|
+
|
|
7
|
+
MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas.
|
|
8
|
+
|
|
9
|
+
The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
13
|
+
|
|
14
|
+
- API version: 0.1.0
|
|
15
|
+
- Package version: 1.0.0
|
|
16
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Build a gem
|
|
21
|
+
|
|
22
|
+
To build the Ruby code into a gem:
|
|
23
|
+
|
|
24
|
+
```shell
|
|
25
|
+
gem build ionoscloud-dbaas-mongo.gemspec
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then either install the gem locally:
|
|
29
|
+
|
|
30
|
+
```shell
|
|
31
|
+
gem install ./ionoscloud-dbaas-mongo-1.0.0.gem
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
(for development, run `gem install --dev ./ionoscloud-dbaas-mongo-1.0.0.gem` to install the development dependencies)
|
|
35
|
+
|
|
36
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
37
|
+
|
|
38
|
+
Finally add this to the Gemfile:
|
|
39
|
+
|
|
40
|
+
gem 'ionoscloud-dbaas-mongo', '~> 1.0.0'
|
|
41
|
+
|
|
42
|
+
### Install from Git
|
|
43
|
+
|
|
44
|
+
If the Ruby gem is hosted at a git repository: https://github.com/ionos-cloud/sdk-ruby-dbaas-mongo, then add the following in the Gemfile:
|
|
45
|
+
|
|
46
|
+
gem 'ionoscloud-dbaas-mongo', :git => 'https://github.com/ionos-cloud/sdk-ruby-dbaas-mongo.git'
|
|
47
|
+
|
|
48
|
+
### Include the Ruby code directly
|
|
49
|
+
|
|
50
|
+
Include the Ruby code directly using `-I` as follows:
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
ruby -Ilib script.rb
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Our latest, most up to date documentation is available [here](https://github.com/ionos-cloud/sdk-ruby/blob/master/README.md)
|
data/docs/api/ClustersApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
|
|
7
7
|
| [**clusters_delete**](ClustersApi.md#clusters_delete) | **DELETE** /clusters/{clusterId} | Delete a Cluster |
|
|
8
8
|
| [**clusters_find_by_id**](ClustersApi.md#clusters_find_by_id) | **GET** /clusters/{clusterId} | Get a cluster by id |
|
|
9
9
|
| [**clusters_get**](ClustersApi.md#clusters_get) | **GET** /clusters | Get Clusters |
|
|
10
|
+
| [**clusters_patch**](ClustersApi.md#clusters_patch) | **PATCH** /clusters/{clusterId} | Patch a cluster |
|
|
10
11
|
| [**clusters_post**](ClustersApi.md#clusters_post) | **POST** /clusters | Create a Cluster |
|
|
11
12
|
|
|
12
13
|
|
|
@@ -237,6 +238,83 @@ basicAuth, tokenAuth
|
|
|
237
238
|
- **Accept**: application/json
|
|
238
239
|
|
|
239
240
|
|
|
241
|
+
## clusters_patch
|
|
242
|
+
|
|
243
|
+
> <ClusterResponse> clusters_patch(cluster_id, patch_cluster_request)
|
|
244
|
+
|
|
245
|
+
Patch a cluster
|
|
246
|
+
|
|
247
|
+
Patch attributes of a MongoDB cluster.
|
|
248
|
+
|
|
249
|
+
### Examples
|
|
250
|
+
|
|
251
|
+
```ruby
|
|
252
|
+
require 'time'
|
|
253
|
+
require 'ionoscloud-dbaas-mongo'
|
|
254
|
+
# setup authorization
|
|
255
|
+
IonoscloudDbaasMongo.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 = IonoscloudDbaasMongo::ClustersApi.new
|
|
267
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
|
268
|
+
patch_cluster_request = IonoscloudDbaasMongo::PatchClusterRequest.new # PatchClusterRequest | Part of the cluster which should be modified.
|
|
269
|
+
|
|
270
|
+
begin
|
|
271
|
+
# Patch a cluster
|
|
272
|
+
result = api_instance.clusters_patch(cluster_id, patch_cluster_request)
|
|
273
|
+
p result
|
|
274
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
|
275
|
+
puts "Error when calling ClustersApi->clusters_patch: #{e}"
|
|
276
|
+
end
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
#### Using the clusters_patch_with_http_info variant
|
|
280
|
+
|
|
281
|
+
This returns an Array which contains the response data, status code and headers.
|
|
282
|
+
|
|
283
|
+
> <Array(<ClusterResponse>, Integer, Hash)> clusters_patch_with_http_info(cluster_id, patch_cluster_request)
|
|
284
|
+
|
|
285
|
+
```ruby
|
|
286
|
+
begin
|
|
287
|
+
# Patch a cluster
|
|
288
|
+
data, status_code, headers = api_instance.clusters_patch_with_http_info(cluster_id, patch_cluster_request)
|
|
289
|
+
p status_code # => 2xx
|
|
290
|
+
p headers # => { ... }
|
|
291
|
+
p data # => <ClusterResponse>
|
|
292
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
|
293
|
+
puts "Error when calling ClustersApi->clusters_patch_with_http_info: #{e}"
|
|
294
|
+
end
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Parameters
|
|
298
|
+
|
|
299
|
+
| Name | Type | Description | Notes |
|
|
300
|
+
| ---- | ---- | ----------- | ----- |
|
|
301
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
|
302
|
+
| **patch_cluster_request** | [**PatchClusterRequest**](PatchClusterRequest.md) | Part of the cluster which should be modified. | |
|
|
303
|
+
|
|
304
|
+
### Return type
|
|
305
|
+
|
|
306
|
+
[**ClusterResponse**](ClusterResponse.md)
|
|
307
|
+
|
|
308
|
+
### Authorization
|
|
309
|
+
|
|
310
|
+
basicAuth, tokenAuth
|
|
311
|
+
|
|
312
|
+
### HTTP request headers
|
|
313
|
+
|
|
314
|
+
- **Content-Type**: application/json
|
|
315
|
+
- **Accept**: application/json
|
|
316
|
+
|
|
317
|
+
|
|
240
318
|
## clusters_post
|
|
241
319
|
|
|
242
320
|
> <ClusterResponse> clusters_post(create_cluster_request)
|
data/docs/api/UsersApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb*
|
|
|
7
7
|
| [**clusters_users_delete**](UsersApi.md#clusters_users_delete) | **DELETE** /clusters/{clusterId}/users/{database}/{username} | Delete a MongoDB User by ID |
|
|
8
8
|
| [**clusters_users_find_by_id**](UsersApi.md#clusters_users_find_by_id) | **GET** /clusters/{clusterId}/users/{database}/{username} | Get a MongoDB User by ID |
|
|
9
9
|
| [**clusters_users_get**](UsersApi.md#clusters_users_get) | **GET** /clusters/{clusterId}/users | Get a Cluster Users |
|
|
10
|
+
| [**clusters_users_patch**](UsersApi.md#clusters_users_patch) | **PATCH** /clusters/{clusterId}/users/{database}/{username} | Patch a MongoDB User by ID |
|
|
10
11
|
| [**clusters_users_post**](UsersApi.md#clusters_users_post) | **POST** /clusters/{clusterId}/users | Create MongoDB User |
|
|
11
12
|
|
|
12
13
|
|
|
@@ -243,6 +244,87 @@ basicAuth, tokenAuth
|
|
|
243
244
|
- **Accept**: application/json
|
|
244
245
|
|
|
245
246
|
|
|
247
|
+
## clusters_users_patch
|
|
248
|
+
|
|
249
|
+
> <User> clusters_users_patch(cluster_id, database, username, patch_user_request)
|
|
250
|
+
|
|
251
|
+
Patch a MongoDB User by ID
|
|
252
|
+
|
|
253
|
+
Patches a MongoDB user specified by its ID.
|
|
254
|
+
|
|
255
|
+
### Examples
|
|
256
|
+
|
|
257
|
+
```ruby
|
|
258
|
+
require 'time'
|
|
259
|
+
require 'ionoscloud-dbaas-mongo'
|
|
260
|
+
# setup authorization
|
|
261
|
+
IonoscloudDbaasMongo.configure do |config|
|
|
262
|
+
# Configure HTTP basic authorization: basicAuth
|
|
263
|
+
config.username = 'YOUR USERNAME'
|
|
264
|
+
config.password = 'YOUR PASSWORD'
|
|
265
|
+
|
|
266
|
+
# Configure API key authorization: tokenAuth
|
|
267
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
268
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
269
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
api_instance = IonoscloudDbaasMongo::UsersApi.new
|
|
273
|
+
cluster_id = 'cluster_id_example' # String | The unique ID of the cluster.
|
|
274
|
+
database = 'database_example' # String | The authentication database.
|
|
275
|
+
username = 'username_example' # String | The authentication username.
|
|
276
|
+
patch_user_request = IonoscloudDbaasMongo::PatchUserRequest.new # PatchUserRequest | Part of the MongoDB user which should be modified.
|
|
277
|
+
|
|
278
|
+
begin
|
|
279
|
+
# Patch a MongoDB User by ID
|
|
280
|
+
result = api_instance.clusters_users_patch(cluster_id, database, username, patch_user_request)
|
|
281
|
+
p result
|
|
282
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
|
283
|
+
puts "Error when calling UsersApi->clusters_users_patch: #{e}"
|
|
284
|
+
end
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
#### Using the clusters_users_patch_with_http_info variant
|
|
288
|
+
|
|
289
|
+
This returns an Array which contains the response data, status code and headers.
|
|
290
|
+
|
|
291
|
+
> <Array(<User>, Integer, Hash)> clusters_users_patch_with_http_info(cluster_id, database, username, patch_user_request)
|
|
292
|
+
|
|
293
|
+
```ruby
|
|
294
|
+
begin
|
|
295
|
+
# Patch a MongoDB User by ID
|
|
296
|
+
data, status_code, headers = api_instance.clusters_users_patch_with_http_info(cluster_id, database, username, patch_user_request)
|
|
297
|
+
p status_code # => 2xx
|
|
298
|
+
p headers # => { ... }
|
|
299
|
+
p data # => <User>
|
|
300
|
+
rescue IonoscloudDbaasMongo::ApiError => e
|
|
301
|
+
puts "Error when calling UsersApi->clusters_users_patch_with_http_info: #{e}"
|
|
302
|
+
end
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Parameters
|
|
306
|
+
|
|
307
|
+
| Name | Type | Description | Notes |
|
|
308
|
+
| ---- | ---- | ----------- | ----- |
|
|
309
|
+
| **cluster_id** | **String** | The unique ID of the cluster. | |
|
|
310
|
+
| **database** | **String** | The authentication database. | |
|
|
311
|
+
| **username** | **String** | The authentication username. | |
|
|
312
|
+
| **patch_user_request** | [**PatchUserRequest**](PatchUserRequest.md) | Part of the MongoDB user which should be modified. | |
|
|
313
|
+
|
|
314
|
+
### Return type
|
|
315
|
+
|
|
316
|
+
[**User**](User.md)
|
|
317
|
+
|
|
318
|
+
### Authorization
|
|
319
|
+
|
|
320
|
+
basicAuth, tokenAuth
|
|
321
|
+
|
|
322
|
+
### HTTP request headers
|
|
323
|
+
|
|
324
|
+
- **Content-Type**: application/json
|
|
325
|
+
- **Accept**: application/json
|
|
326
|
+
|
|
327
|
+
|
|
246
328
|
## clusters_users_post
|
|
247
329
|
|
|
248
330
|
> <User> clusters_users_post(cluster_id, user)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
| **instances** | **Integer** | The total number of instances in the cluster (one primary and n-1 secondaries). | [optional] |
|
|
11
11
|
| **connections** | [**Array<Connection>**](Connection.md) | | [optional] |
|
|
12
12
|
| **maintenance_window** | [**MaintenanceWindow**](MaintenanceWindow.md) | | [optional] |
|
|
13
|
-
| **template_id** | **String** | The unique ID of the template, which specifies the number of cores, storage size, and memory. | [optional] |
|
|
13
|
+
| **template_id** | **String** | The unique ID of the template, which specifies the number of cores, storage size, and memory. You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). To get a list of all templates to confirm the changes use the /templates endpoint. | [optional] |
|
|
14
14
|
| **connection_string** | **String** | The connection string for your cluster. | [optional] |
|
|
15
15
|
|
|
16
16
|
## Example
|
data/docs/models/Connection.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **datacenter_id** | **String** | The datacenter to which your cluster will be connected. | |
|
|
8
8
|
| **lan_id** | **String** | The numeric LAN ID with which you connect your cluster. | |
|
|
9
|
-
| **cidr_list** | **Array<String>** | The list of IPs
|
|
9
|
+
| **cidr_list** | **Array<String>** | The list of IPs for your cluster. All IPs must be in a /24 network. Note the following unavailable IP ranges: 10.233.114.0/24 | |
|
|
10
10
|
|
|
11
11
|
## Example
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **template_id** | **String** | The unique ID of the template, which specifies the number of cores, storage size, and memory. | |
|
|
7
|
+
| **template_id** | **String** | The unique ID of the template, which specifies the number of cores, storage size, and memory. You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). To get a list of all templates to confirm the changes use the /templates endpoint. | |
|
|
8
8
|
| **mongo_db_version** | **String** | The MongoDB version of your cluster. | [optional] |
|
|
9
9
|
| **instances** | **Integer** | The total number of instances in the cluster (one primary and n-1 secondaries). | |
|
|
10
10
|
| **connections** | [**Array<Connection>**](Connection.md) | | |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# PatchClusterProperties
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **display_name** | **String** | The name of your cluster. | [optional] |
|
|
8
|
+
| **maintenance_window** | [**MaintenanceWindow**](MaintenanceWindow.md) | | [optional] |
|
|
9
|
+
| **instances** | **Integer** | The total number of instances in the cluster (one primary and n-1 secondaries). | [optional] |
|
|
10
|
+
| **connections** | [**Array<Connection>**](Connection.md) | | [optional] |
|
|
11
|
+
| **template_id** | **String** | The unique ID of the template, which specifies the number of cores, storage size, and memory. You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). To get a list of all templates to confirm the changes use the /templates endpoint. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ionoscloud-dbaas-mongo'
|
|
17
|
+
|
|
18
|
+
instance = IonoscloudDbaasMongo::PatchClusterProperties.new(
|
|
19
|
+
display_name: MongoDB cluster,
|
|
20
|
+
maintenance_window: null,
|
|
21
|
+
instances: 3,
|
|
22
|
+
connections: null,
|
|
23
|
+
template_id: 498ae72f-411f-11eb-9d07-046c59cc737e
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# PatchClusterRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **metadata** | [**Metadata**](Metadata.md) | | [optional] |
|
|
8
|
+
| **properties** | [**PatchClusterProperties**](PatchClusterProperties.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ionoscloud-dbaas-mongo'
|
|
14
|
+
|
|
15
|
+
instance = IonoscloudDbaasMongo::PatchClusterRequest.new(
|
|
16
|
+
metadata: null,
|
|
17
|
+
properties: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# PatchUserProperties
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **password** | **String** | | [optional] |
|
|
8
|
+
| **roles** | [**Array<UserRoles>**](UserRoles.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ionoscloud-dbaas-mongo'
|
|
14
|
+
|
|
15
|
+
instance = IonoscloudDbaasMongo::PatchUserProperties.new(
|
|
16
|
+
password: null,
|
|
17
|
+
roles: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# PatchUserRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **metadata** | [**UserMetadata**](UserMetadata.md) | | [optional] |
|
|
8
|
+
| **properties** | [**PatchUserProperties**](PatchUserProperties.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ionoscloud-dbaas-mongo'
|
|
14
|
+
|
|
15
|
+
instance = IonoscloudDbaasMongo::PatchUserRequest.new(
|
|
16
|
+
metadata: null,
|
|
17
|
+
properties: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/models/TemplateList.md
CHANGED
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | [**ResourceType**](ResourceType.md) | | [optional] |
|
|
8
|
+
| **id** | **String** | The unique ID of the resource. | [optional] |
|
|
7
9
|
| **items** | [**Array<TemplateResponse>**](TemplateResponse.md) | | [optional] |
|
|
10
|
+
| **offset** | **Integer** | The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). | [optional][readonly] |
|
|
11
|
+
| **limit** | **Integer** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). | [optional][readonly] |
|
|
12
|
+
| **_links** | [**PaginationLinks**](PaginationLinks.md) | | [optional] |
|
|
8
13
|
|
|
9
14
|
## Example
|
|
10
15
|
|
|
@@ -12,7 +17,12 @@
|
|
|
12
17
|
require 'ionoscloud-dbaas-mongo'
|
|
13
18
|
|
|
14
19
|
instance = IonoscloudDbaasMongo::TemplateList.new(
|
|
15
|
-
|
|
20
|
+
type: null,
|
|
21
|
+
id: 498ae72f-411f-11eb-9d07-046c59cc737e,
|
|
22
|
+
items: null,
|
|
23
|
+
offset: 0,
|
|
24
|
+
limit: 42,
|
|
25
|
+
_links: null
|
|
16
26
|
)
|
|
17
27
|
```
|
|
18
28
|
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | [**ResourceType**](ResourceType.md) | | [optional] |
|
|
8
|
+
| **id** | **String** | The unique ID of the resource. | [optional] |
|
|
7
9
|
| **items** | [**Array<TemplateResponse>**](TemplateResponse.md) | | [optional] |
|
|
8
10
|
|
|
9
11
|
## Example
|
|
@@ -12,6 +14,8 @@
|
|
|
12
14
|
require 'ionoscloud-dbaas-mongo'
|
|
13
15
|
|
|
14
16
|
instance = IonoscloudDbaasMongo::TemplateListAllOf.new(
|
|
17
|
+
type: null,
|
|
18
|
+
id: 498ae72f-411f-11eb-9d07-046c59cc737e,
|
|
15
19
|
items: null
|
|
16
20
|
)
|
|
17
21
|
```
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | The unique template ID. | [optional] |
|
|
8
|
+
| **name** | **String** | The name of the template. | [optional] |
|
|
9
|
+
| **edition** | **String** | The edition of the template (e.g. enterprise) | [optional] |
|
|
8
10
|
| **cores** | **Integer** | The number of CPU cores. | [optional] |
|
|
9
11
|
| **ram** | **Integer** | The amount of memory in GB. | [optional] |
|
|
10
12
|
| **storage_size** | **Integer** | The amount of storage size in GB. | [optional] |
|
|
@@ -16,6 +18,8 @@ require 'ionoscloud-dbaas-mongo'
|
|
|
16
18
|
|
|
17
19
|
instance = IonoscloudDbaasMongo::TemplateResponse.new(
|
|
18
20
|
id: 15c6dd2f-02d2-4987-b439-9a58dd59ecc3,
|
|
21
|
+
name: MongoDB Community 4XL,
|
|
22
|
+
edition: enterprise,
|
|
19
23
|
cores: 1,
|
|
20
24
|
ram: 4,
|
|
21
25
|
storage_size: 30
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **username** | **String** | | |
|
|
8
|
-
| **database** | **String** | The user database to use for authentication. | |
|
|
9
8
|
| **password** | **String** | | |
|
|
10
9
|
| **roles** | [**Array<UserRoles>**](UserRoles.md) | | [optional] |
|
|
11
10
|
|
|
@@ -16,7 +15,6 @@ require 'ionoscloud-dbaas-mongo'
|
|
|
16
15
|
|
|
17
16
|
instance = IonoscloudDbaasMongo::UserProperties.new(
|
|
18
17
|
username: null,
|
|
19
|
-
database: admin,
|
|
20
18
|
password: null,
|
|
21
19
|
roles: null
|
|
22
20
|
)
|
|
@@ -205,6 +205,77 @@ module IonoscloudDbaasMongo
|
|
|
205
205
|
return data, status_code, headers
|
|
206
206
|
end
|
|
207
207
|
|
|
208
|
+
# Patch a cluster
|
|
209
|
+
# Patch attributes of a MongoDB cluster.
|
|
210
|
+
# @param cluster_id [String] The unique ID of the cluster.
|
|
211
|
+
# @param patch_cluster_request [PatchClusterRequest] Part of the cluster which should be modified.
|
|
212
|
+
# @param [Hash] opts the optional parameters
|
|
213
|
+
# @return [ClusterResponse]
|
|
214
|
+
def clusters_patch(cluster_id, patch_cluster_request, opts = {})
|
|
215
|
+
data, _status_code, _headers = clusters_patch_with_http_info(cluster_id, patch_cluster_request, opts)
|
|
216
|
+
data
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Patch a cluster
|
|
220
|
+
# Patch attributes of a MongoDB cluster.
|
|
221
|
+
# @param cluster_id [String] The unique ID of the cluster.
|
|
222
|
+
# @param patch_cluster_request [PatchClusterRequest] Part of the cluster which should be modified.
|
|
223
|
+
# @param [Hash] opts the optional parameters
|
|
224
|
+
# @return [Array<(ClusterResponse, Integer, Hash)>] ClusterResponse data, response status code and response headers
|
|
225
|
+
def clusters_patch_with_http_info(cluster_id, patch_cluster_request, opts = {})
|
|
226
|
+
if @api_client.config.debugging
|
|
227
|
+
@api_client.config.logger.debug 'Calling API: ClustersApi.clusters_patch ...'
|
|
228
|
+
end
|
|
229
|
+
# verify the required parameter 'cluster_id' is set
|
|
230
|
+
if @api_client.config.client_side_validation && cluster_id.nil?
|
|
231
|
+
fail ArgumentError, "Missing the required parameter 'cluster_id' when calling ClustersApi.clusters_patch"
|
|
232
|
+
end
|
|
233
|
+
# verify the required parameter 'patch_cluster_request' is set
|
|
234
|
+
if @api_client.config.client_side_validation && patch_cluster_request.nil?
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'patch_cluster_request' when calling ClustersApi.clusters_patch"
|
|
236
|
+
end
|
|
237
|
+
# resource path
|
|
238
|
+
local_var_path = '/clusters/{clusterId}'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s))
|
|
239
|
+
|
|
240
|
+
# query parameters
|
|
241
|
+
query_params = opts[:query_params] || {}
|
|
242
|
+
|
|
243
|
+
# header parameters
|
|
244
|
+
header_params = opts[:header_params] || {}
|
|
245
|
+
# HTTP header 'Accept' (if needed)
|
|
246
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
247
|
+
# HTTP header 'Content-Type'
|
|
248
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
249
|
+
|
|
250
|
+
# form parameters
|
|
251
|
+
form_params = opts[:form_params] || {}
|
|
252
|
+
|
|
253
|
+
# http body (model)
|
|
254
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_cluster_request)
|
|
255
|
+
|
|
256
|
+
# return_type
|
|
257
|
+
return_type = opts[:debug_return_type] || 'ClusterResponse'
|
|
258
|
+
|
|
259
|
+
# auth_names
|
|
260
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
|
|
261
|
+
|
|
262
|
+
new_options = opts.merge(
|
|
263
|
+
:operation => :"ClustersApi.clusters_patch",
|
|
264
|
+
:header_params => header_params,
|
|
265
|
+
:query_params => query_params,
|
|
266
|
+
:form_params => form_params,
|
|
267
|
+
:body => post_body,
|
|
268
|
+
:auth_names => auth_names,
|
|
269
|
+
:return_type => return_type
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
273
|
+
if @api_client.config.debugging
|
|
274
|
+
@api_client.config.logger.debug "API called: ClustersApi#clusters_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
275
|
+
end
|
|
276
|
+
return data, status_code, headers
|
|
277
|
+
end
|
|
278
|
+
|
|
208
279
|
# Create a Cluster
|
|
209
280
|
# Creates a new MongoDB cluster.
|
|
210
281
|
# @param create_cluster_request [CreateClusterRequest] The cluster to be created.
|
|
@@ -232,6 +232,89 @@ module IonoscloudDbaasMongo
|
|
|
232
232
|
return data, status_code, headers
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
+
# Patch a MongoDB User by ID
|
|
236
|
+
# Patches a MongoDB user specified by its ID.
|
|
237
|
+
# @param cluster_id [String] The unique ID of the cluster.
|
|
238
|
+
# @param database [String] The authentication database.
|
|
239
|
+
# @param username [String] The authentication username.
|
|
240
|
+
# @param patch_user_request [PatchUserRequest] Part of the MongoDB user which should be modified.
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [User]
|
|
243
|
+
def clusters_users_patch(cluster_id, database, username, patch_user_request, opts = {})
|
|
244
|
+
data, _status_code, _headers = clusters_users_patch_with_http_info(cluster_id, database, username, patch_user_request, opts)
|
|
245
|
+
data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Patch a MongoDB User by ID
|
|
249
|
+
# Patches a MongoDB user specified by its ID.
|
|
250
|
+
# @param cluster_id [String] The unique ID of the cluster.
|
|
251
|
+
# @param database [String] The authentication database.
|
|
252
|
+
# @param username [String] The authentication username.
|
|
253
|
+
# @param patch_user_request [PatchUserRequest] Part of the MongoDB user which should be modified.
|
|
254
|
+
# @param [Hash] opts the optional parameters
|
|
255
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
|
256
|
+
def clusters_users_patch_with_http_info(cluster_id, database, username, patch_user_request, opts = {})
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_patch ...'
|
|
259
|
+
end
|
|
260
|
+
# verify the required parameter 'cluster_id' is set
|
|
261
|
+
if @api_client.config.client_side_validation && cluster_id.nil?
|
|
262
|
+
fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_patch"
|
|
263
|
+
end
|
|
264
|
+
# verify the required parameter 'database' is set
|
|
265
|
+
if @api_client.config.client_side_validation && database.nil?
|
|
266
|
+
fail ArgumentError, "Missing the required parameter 'database' when calling UsersApi.clusters_users_patch"
|
|
267
|
+
end
|
|
268
|
+
# verify the required parameter 'username' is set
|
|
269
|
+
if @api_client.config.client_side_validation && username.nil?
|
|
270
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.clusters_users_patch"
|
|
271
|
+
end
|
|
272
|
+
# verify the required parameter 'patch_user_request' is set
|
|
273
|
+
if @api_client.config.client_side_validation && patch_user_request.nil?
|
|
274
|
+
fail ArgumentError, "Missing the required parameter 'patch_user_request' when calling UsersApi.clusters_users_patch"
|
|
275
|
+
end
|
|
276
|
+
# resource path
|
|
277
|
+
local_var_path = '/clusters/{clusterId}/users/{database}/{username}'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)).sub('{' + 'database' + '}', CGI.escape(database.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
|
278
|
+
|
|
279
|
+
# query parameters
|
|
280
|
+
query_params = opts[:query_params] || {}
|
|
281
|
+
|
|
282
|
+
# header parameters
|
|
283
|
+
header_params = opts[:header_params] || {}
|
|
284
|
+
# HTTP header 'Accept' (if needed)
|
|
285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
286
|
+
# HTTP header 'Content-Type'
|
|
287
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
288
|
+
|
|
289
|
+
# form parameters
|
|
290
|
+
form_params = opts[:form_params] || {}
|
|
291
|
+
|
|
292
|
+
# http body (model)
|
|
293
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_user_request)
|
|
294
|
+
|
|
295
|
+
# return_type
|
|
296
|
+
return_type = opts[:debug_return_type] || 'User'
|
|
297
|
+
|
|
298
|
+
# auth_names
|
|
299
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth']
|
|
300
|
+
|
|
301
|
+
new_options = opts.merge(
|
|
302
|
+
:operation => :"UsersApi.clusters_users_patch",
|
|
303
|
+
:header_params => header_params,
|
|
304
|
+
:query_params => query_params,
|
|
305
|
+
:form_params => form_params,
|
|
306
|
+
:body => post_body,
|
|
307
|
+
:auth_names => auth_names,
|
|
308
|
+
:return_type => return_type
|
|
309
|
+
)
|
|
310
|
+
|
|
311
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
312
|
+
if @api_client.config.debugging
|
|
313
|
+
@api_client.config.logger.debug "API called: UsersApi#clusters_users_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
314
|
+
end
|
|
315
|
+
return data, status_code, headers
|
|
316
|
+
end
|
|
317
|
+
|
|
235
318
|
# Create MongoDB User
|
|
236
319
|
# Creates a MongoDB user.
|
|
237
320
|
# @param cluster_id [String] The unique ID of the cluster.
|