Class: IonoscloudDbaasMongo::UsersApi
- Inherits:
-
Object
- Object
- IonoscloudDbaasMongo::UsersApi
- Defined in:
- lib/ionoscloud-dbaas-mongo/api/users_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#clusters_users_delete(cluster_id, username, opts = {}) ⇒ User
Delete a MongoDB User by ID Deletes a MongoDB user specified by its ID.
-
#clusters_users_delete_with_http_info(cluster_id, username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Delete a MongoDB User by ID Deletes a MongoDB user specified by its ID.
-
#clusters_users_find_by_id(cluster_id, username, opts = {}) ⇒ User
Get a MongoDB User by ID Retrieves the MongoDB user identified by the username.
-
#clusters_users_find_by_id_with_http_info(cluster_id, username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Get a MongoDB User by ID Retrieves the MongoDB user identified by the username.
-
#clusters_users_get(cluster_id, opts = {}) ⇒ UsersList
Get all Cluster Users Retrieves a list of MongoDB users.
-
#clusters_users_get_with_http_info(cluster_id, opts = {}) ⇒ Array<(UsersList, Integer, Hash)>
Get all Cluster Users Retrieves a list of MongoDB users.
-
#clusters_users_patch(cluster_id, username, patch_user_request, opts = {}) ⇒ User
Patch a MongoDB User by ID Patches a MongoDB user specified by its ID.
-
#clusters_users_patch_with_http_info(cluster_id, username, patch_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Patch a MongoDB User by ID Patches a MongoDB user specified by its ID.
-
#clusters_users_post(cluster_id, user, opts = {}) ⇒ User
Create MongoDB User Creates a MongoDB user.
-
#clusters_users_post_with_http_info(cluster_id, user, opts = {}) ⇒ Array<(User, Integer, Hash)>
Create MongoDB User Creates a MongoDB user.
-
#initialize(api_client = ApiClient.default) ⇒ UsersApi
constructor
A new instance of UsersApi.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#clusters_users_delete(cluster_id, username, opts = {}) ⇒ User
Delete a MongoDB User by ID Deletes a MongoDB user specified by its ID.
28 29 30 31 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 28 def clusters_users_delete(cluster_id, username, opts = {}) data, _status_code, _headers = clusters_users_delete_with_http_info(cluster_id, username, opts) data end |
#clusters_users_delete_with_http_info(cluster_id, username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Delete a MongoDB User by ID Deletes a MongoDB user specified by its ID.
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 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 39 def clusters_users_delete_with_http_info(cluster_id, username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_delete ...' end # verify the required parameter 'cluster_id' is set if @api_client.config.client_side_validation && cluster_id.nil? fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_delete" end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.clusters_users_delete" end # resource path local_var_path = '/clusters/{clusterId}/users/{username}'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth'] = opts.merge( :operation => :"UsersApi.clusters_users_delete", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#clusters_users_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clusters_users_find_by_id(cluster_id, username, opts = {}) ⇒ User
Get a MongoDB User by ID Retrieves the MongoDB user identified by the username.
97 98 99 100 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 97 def clusters_users_find_by_id(cluster_id, username, opts = {}) data, _status_code, _headers = clusters_users_find_by_id_with_http_info(cluster_id, username, opts) data end |
#clusters_users_find_by_id_with_http_info(cluster_id, username, opts = {}) ⇒ Array<(User, Integer, Hash)>
Get a MongoDB User by ID Retrieves the MongoDB user identified by the username.
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 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 108 def clusters_users_find_by_id_with_http_info(cluster_id, username, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_find_by_id ...' end # verify the required parameter 'cluster_id' is set if @api_client.config.client_side_validation && cluster_id.nil? fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_find_by_id" end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.clusters_users_find_by_id" end # resource path local_var_path = '/clusters/{clusterId}/users/{username}'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth'] = opts.merge( :operation => :"UsersApi.clusters_users_find_by_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#clusters_users_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clusters_users_get(cluster_id, opts = {}) ⇒ UsersList
Get all Cluster Users Retrieves a list of MongoDB users.
167 168 169 170 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 167 def clusters_users_get(cluster_id, opts = {}) data, _status_code, _headers = clusters_users_get_with_http_info(cluster_id, opts) data end |
#clusters_users_get_with_http_info(cluster_id, opts = {}) ⇒ Array<(UsersList, Integer, Hash)>
Get all Cluster Users Retrieves a list of MongoDB users.
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 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 179 def clusters_users_get_with_http_info(cluster_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_get ...' end # verify the required parameter 'cluster_id' is set if @api_client.config.client_side_validation && cluster_id.nil? fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_get" end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 1000 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.clusters_users_get, must be smaller than or equal to 1000.' end if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1 fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UsersApi.clusters_users_get, must be greater than or equal to 1.' end # resource path local_var_path = '/clusters/{clusterId}/users'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'UsersList' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth'] = opts.merge( :operation => :"UsersApi.clusters_users_get", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#clusters_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clusters_users_patch(cluster_id, username, patch_user_request, opts = {}) ⇒ User
Patch a MongoDB User by ID Patches a MongoDB user specified by its ID.
244 245 246 247 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 244 def clusters_users_patch(cluster_id, username, patch_user_request, opts = {}) data, _status_code, _headers = clusters_users_patch_with_http_info(cluster_id, username, patch_user_request, opts) data end |
#clusters_users_patch_with_http_info(cluster_id, username, patch_user_request, opts = {}) ⇒ Array<(User, Integer, Hash)>
Patch a MongoDB User by ID Patches a MongoDB user specified by its ID.
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 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 256 def clusters_users_patch_with_http_info(cluster_id, username, patch_user_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_patch ...' end # verify the required parameter 'cluster_id' is set if @api_client.config.client_side_validation && cluster_id.nil? fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_patch" end # verify the required parameter 'username' is set if @api_client.config.client_side_validation && username.nil? fail ArgumentError, "Missing the required parameter 'username' when calling UsersApi.clusters_users_patch" end # verify the required parameter 'patch_user_request' is set if @api_client.config.client_side_validation && patch_user_request.nil? fail ArgumentError, "Missing the required parameter 'patch_user_request' when calling UsersApi.clusters_users_patch" end # resource path local_var_path = '/clusters/{clusterId}/users/{username}'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)).sub('{' + 'username' + '}', CGI.escape(username.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_user_request) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth'] = opts.merge( :operation => :"UsersApi.clusters_users_patch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#clusters_users_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#clusters_users_post(cluster_id, user, opts = {}) ⇒ User
Create MongoDB User Creates a MongoDB user.
320 321 322 323 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 320 def clusters_users_post(cluster_id, user, opts = {}) data, _status_code, _headers = clusters_users_post_with_http_info(cluster_id, user, opts) data end |
#clusters_users_post_with_http_info(cluster_id, user, opts = {}) ⇒ Array<(User, Integer, Hash)>
Create MongoDB User Creates a MongoDB user.
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 |
# File 'lib/ionoscloud-dbaas-mongo/api/users_api.rb', line 331 def clusters_users_post_with_http_info(cluster_id, user, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsersApi.clusters_users_post ...' end # verify the required parameter 'cluster_id' is set if @api_client.config.client_side_validation && cluster_id.nil? fail ArgumentError, "Missing the required parameter 'cluster_id' when calling UsersApi.clusters_users_post" end # verify the required parameter 'user' is set if @api_client.config.client_side_validation && user.nil? fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.clusters_users_post" end # resource path local_var_path = '/clusters/{clusterId}/users'.sub('{' + 'clusterId' + '}', CGI.escape(cluster_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(user) # return_type return_type = opts[:debug_return_type] || 'User' # auth_names auth_names = opts[:debug_auth_names] || ['basicAuth', 'tokenAuth'] = opts.merge( :operation => :"UsersApi.clusters_users_post", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#clusters_users_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |