lib/ionoscloud/api/user_management_api.rb in ionoscloud-5.1.2 vs lib/ionoscloud/api/user_management_api.rb in ionoscloud-6.0.0.beta.1
- old
+ new
@@ -1,14 +1,14 @@
=begin
#CLOUD API
#An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
-The version of the OpenAPI document: 5.0
+The version of the OpenAPI document: 6.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.2.1-SNAPSHOT
+OpenAPI Generator version: 5.0.1-SNAPSHOT
=end
require 'cgi'
@@ -938,11 +938,11 @@
end
return data, status_code, headers
end
# Remove a user from a group
- # This will remove a user from a group
+ # This will remove a user from a group.
# @param group_id [String]
# @param user_id [String]
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
@@ -952,11 +952,11 @@
data, _status_code, _headers = um_groups_users_delete_with_http_info(group_id, user_id, opts)
data
end
# Remove a user from a group
- # This will remove a user from a group
+ # This will remove a user from a group.
# @param group_id [String]
# @param user_id [String]
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
@@ -1358,11 +1358,11 @@
end
return data, status_code, headers
end
# List All Resources.
- # You can retrieve a complete list of all resources that you have access to
+ # You can retrieve a complete list of all resources that you have access to.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
# @return [Resources]
@@ -1370,11 +1370,11 @@
data, _status_code, _headers = um_resources_get_with_http_info(opts)
data
end
# List All Resources.
- # You can retrieve a complete list of all resources that you have access to
+ # You can retrieve a complete list of all resources that you have access to.
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
# @return [Array<(Resources, Integer, Hash)>] Resources data, response status code and response headers
@@ -1597,12 +1597,10 @@
# You can retrieve a complete list of users under your account
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) (default to 0)
- # @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination) (default to 100)
# @return [Users]
def um_users_get(opts = {})
data, _status_code, _headers = um_users_get_with_http_info(opts)
data
end
@@ -1611,12 +1609,10 @@
# You can retrieve a complete list of users under your account
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
- # @option opts [Integer] :limit the maximum number of elements to return (use together with <code>offset</code> for pagination)
# @return [Array<(Users, Integer, Hash)>] Users data, response status code and response headers
def um_users_get_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_get ...'
end
@@ -1626,31 +1622,17 @@
if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_get, must be greater than or equal to 0.'
end
- if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
- fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UserManagementApi.um_users_get, must be greater than or equal to 0.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.um_users_get, must be smaller than or equal to 100.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.um_users_get, must be greater than or equal to 1.'
- end
-
# resource path
local_var_path = '/um/users'
# query parameters
query_params = opts[:query_params] || {}
query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
- query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
@@ -1850,11 +1832,11 @@
# @param user [UserPost] User to be created
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [User]
+ # @return [UserPost]
def um_users_post(user, opts = {})
data, _status_code, _headers = um_users_post_with_http_info(user, opts)
data
end
@@ -1863,11 +1845,11 @@
# @param user [UserPost] User to be created
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
+ # @return [Array<(UserPost, Integer, Hash)>] UserPost data, response status code and response headers
def um_users_post_with_http_info(user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_post ...'
end
# verify the required parameter 'user' is set
@@ -1903,11 +1885,11 @@
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
# return_type
- return_type = opts[:debug_return_type] || 'User'
+ return_type = opts[:debug_return_type] || 'UserPost'
# auth_names
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
new_options = opts.merge(
@@ -1933,11 +1915,11 @@
# @param user [UserPut] Modified user
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [User]
+ # @return [UserPut]
def um_users_put(user_id, user, opts = {})
data, _status_code, _headers = um_users_put_with_http_info(user_id, user, opts)
data
end
@@ -1947,11 +1929,11 @@
# @param user [UserPut] Modified user
# @param [Hash] opts the optional parameters
# @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
# @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
# @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
+ # @return [Array<(UserPut, Integer, Hash)>] UserPut data, response status code and response headers
def um_users_put_with_http_info(user_id, user, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_put ...'
end
# verify the required parameter 'user_id' is set
@@ -1991,11 +1973,11 @@
# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(user)
# return_type
- return_type = opts[:debug_return_type] || 'User'
+ return_type = opts[:debug_return_type] || 'UserPut'
# auth_names
auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
new_options = opts.merge(
@@ -2009,504 +1991,9 @@
)
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: UserManagementApi#um_users_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Delete a S3 key
- # Delete a S3 key
- # @param user_id [String] The unique ID of the user
- # @param key_id [String] The unique access key ID of the S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Object]
- def um_users_s3keys_delete(user_id, key_id, opts = {})
- data, _status_code, _headers = um_users_s3keys_delete_with_http_info(user_id, key_id, opts)
- data
- end
-
- # Delete a S3 key
- # Delete a S3 key
- # @param user_id [String] The unique ID of the user
- # @param key_id [String] The unique access key ID of the S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
- def um_users_s3keys_delete_with_http_info(user_id, key_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_delete ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_delete"
- end
- # verify the required parameter 'key_id' is set
- if @api_client.config.client_side_validation && key_id.nil?
- fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_delete"
- end
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_delete, must be smaller than or equal to 10.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_delete, must be greater than or equal to 0.'
- end
-
- # resource path
- local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
- query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'Object'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3keys_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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Retrieve given S3 key belonging to the given User
- # You can retrieve S3 key belonging to the given User. This user Id can be found in the response body when a user is created or when you GET a list of users. The key Id can be found in the response body when a S3 key is created or when you GET a list of all S3 keys of a user
- # @param user_id [String] The unique ID of the user
- # @param key_id [String] The unique access key ID of the S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [S3Key]
- def um_users_s3keys_find_by_key_id(user_id, key_id, opts = {})
- data, _status_code, _headers = um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, opts)
- data
- end
-
- # Retrieve given S3 key belonging to the given User
- # You can retrieve S3 key belonging to the given User. This user Id can be found in the response body when a user is created or when you GET a list of users. The key Id can be found in the response body when a S3 key is created or when you GET a list of all S3 keys of a user
- # @param user_id [String] The unique ID of the user
- # @param key_id [String] The unique access key ID of the S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
- def um_users_s3keys_find_by_key_id_with_http_info(user_id, key_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_find_by_key_id ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_find_by_key_id"
- end
- # verify the required parameter 'key_id' is set
- if @api_client.config.client_side_validation && key_id.nil?
- fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_find_by_key_id"
- end
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_find_by_key_id, must be smaller than or equal to 10.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_find_by_key_id, must be greater than or equal to 0.'
- end
-
- # resource path
- local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
- query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'S3Key'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3keys_find_by_key_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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_find_by_key_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Retrieve a User's S3 keys
- # You can retrieve S3 keys owned by a user by using the users ID. This user Id can be found in the response body when a user is created or when you GET a list of users.
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [S3Keys]
- def um_users_s3keys_get(user_id, opts = {})
- data, _status_code, _headers = um_users_s3keys_get_with_http_info(user_id, opts)
- data
- end
-
- # Retrieve a User's S3 keys
- # You can retrieve S3 keys owned by a user by using the users ID. This user Id can be found in the response body when a user is created or when you GET a list of users.
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(S3Keys, Integer, Hash)>] S3Keys data, response status code and response headers
- def um_users_s3keys_get_with_http_info(user_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_get ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_get"
- end
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_get, must be smaller than or equal to 10.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_get, must be greater than or equal to 0.'
- end
-
- # resource path
- local_var_path = '/um/users/{userId}/s3keys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
- query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'S3Keys'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3keys_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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Create a S3 key for the given user
- # Creates a S3 key for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users. Maximum of 5 keys can be generated for a given user
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [S3Key]
- def um_users_s3keys_post(user_id, opts = {})
- data, _status_code, _headers = um_users_s3keys_post_with_http_info(user_id, opts)
- data
- end
-
- # Create a S3 key for the given user
- # Creates a S3 key for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users. Maximum of 5 keys can be generated for a given user
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
- def um_users_s3keys_post_with_http_info(user_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_post ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_post"
- end
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_post, must be smaller than or equal to 10.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_post, must be greater than or equal to 0.'
- end
-
- # resource path
- local_var_path = '/um/users/{userId}/s3keys'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
- query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'S3Key'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3keys_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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Modify a S3 key having the given key id
- # You can enable or disable a given S3 key.
- # @param user_id [String]
- # @param key_id [String] The unique access key ID of the S3 key
- # @param s3_key [S3Key] Modified S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (default to 0)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [S3Key]
- def um_users_s3keys_put(user_id, key_id, s3_key, opts = {})
- data, _status_code, _headers = um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, opts)
- data
- end
-
- # Modify a S3 key having the given key id
- # You can enable or disable a given S3 key.
- # @param user_id [String]
- # @param key_id [String] The unique access key ID of the S3 key
- # @param s3_key [S3Key] Modified S3 key
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(S3Key, Integer, Hash)>] S3Key data, response status code and response headers
- def um_users_s3keys_put_with_http_info(user_id, key_id, s3_key, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3keys_put ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3keys_put"
- end
- # verify the required parameter 'key_id' is set
- if @api_client.config.client_side_validation && key_id.nil?
- fail ArgumentError, "Missing the required parameter 'key_id' when calling UserManagementApi.um_users_s3keys_put"
- end
- # verify the required parameter 's3_key' is set
- if @api_client.config.client_side_validation && s3_key.nil?
- fail ArgumentError, "Missing the required parameter 's3_key' when calling UserManagementApi.um_users_s3keys_put"
- end
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_put, must be smaller than or equal to 10.'
- end
-
- if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
- fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling UserManagementApi.um_users_s3keys_put, must be greater than or equal to 0.'
- end
-
- # resource path
- local_var_path = '/um/users/{userId}/s3keys/{keyId}'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s)).sub('{' + 'keyId' + '}', CGI.escape(key_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
- query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
-
- # 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'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body] || @api_client.object_to_http_body(s3_key)
-
- # return_type
- return_type = opts[:debug_return_type] || 'S3Key'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3keys_put",
- :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(:PUT, local_var_path, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3keys_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Retrieve S3 object storage single signon URL for the given user
- # You can retrieve S3 object storage single signon URL for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users.
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [S3ObjectStorageSSO]
- def um_users_s3ssourl_get(user_id, opts = {})
- data, _status_code, _headers = um_users_s3ssourl_get_with_http_info(user_id, opts)
- data
- end
-
- # Retrieve S3 object storage single signon URL for the given user
- # You can retrieve S3 object storage single signon URL for the given user. This user Id can be found in the response body when a user is created or when you GET a list of users.
- # @param user_id [String] The unique ID of the user
- # @param [Hash] opts the optional parameters
- # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
- # @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed
- # @return [Array<(S3ObjectStorageSSO, Integer, Hash)>] S3ObjectStorageSSO data, response status code and response headers
- def um_users_s3ssourl_get_with_http_info(user_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug 'Calling API: UserManagementApi.um_users_s3ssourl_get ...'
- end
- # verify the required parameter 'user_id' is set
- if @api_client.config.client_side_validation && user_id.nil?
- fail ArgumentError, "Missing the required parameter 'user_id' when calling UserManagementApi.um_users_s3ssourl_get"
- end
- # resource path
- local_var_path = '/um/users/{userId}/s3ssourl'.sub('{' + 'userId' + '}', CGI.escape(user_id.to_s))
-
- # query parameters
- query_params = opts[:query_params] || {}
- query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
-
- # header parameters
- header_params = opts[:header_params] || {}
- # HTTP header 'Accept' (if needed)
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
- header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
-
- # form parameters
- form_params = opts[:form_params] || {}
-
- # http body (model)
- post_body = opts[:debug_body]
-
- # return_type
- return_type = opts[:debug_return_type] || 'S3ObjectStorageSSO'
-
- # auth_names
- auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
-
- new_options = opts.merge(
- :operation => :"UserManagementApi.um_users_s3ssourl_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, new_options)
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: UserManagementApi#um_users_s3ssourl_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end