Class: IbmCloudIam::AccountSettingsApi
- Inherits:
-
Object
- Object
- IbmCloudIam::AccountSettingsApi
- Defined in:
- lib/ibm_cloud_iam/api/account_settings_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_account_settings(account_id, authorization, opts = {}) ⇒ AccountSettingsResponse
Get account configurations Returns the details of an account's configuration.
-
#get_account_settings_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(AccountSettingsResponse, Integer, Hash)>
Get account configurations Returns the details of an account's configuration.
-
#get_effective_account_settings(account_id, authorization, opts = {}) ⇒ EffectiveAccountSettingsResponse
Get effective account settings configuration Returns effective account settings for given account ID.
-
#get_effective_account_settings_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(EffectiveAccountSettingsResponse, Integer, Hash)>
Get effective account settings configuration Returns effective account settings for given account ID.
-
#initialize(api_client = ApiClient.default) ⇒ AccountSettingsApi
constructor
A new instance of AccountSettingsApi.
-
#update_account_settings(authorization, if_match, account_id, account_settings_request, opts = {}) ⇒ AccountSettingsResponse
Update account configurations Allows a user to configure settings on their account with regards to MFA, MFA excemption list, session lifetimes, access control for creating new identities, and enforcing IP restrictions on token creation.
-
#update_account_settings_with_http_info(authorization, if_match, account_id, account_settings_request, opts = {}) ⇒ Array<(AccountSettingsResponse, Integer, Hash)>
Update account configurations Allows a user to configure settings on their account with regards to MFA, MFA excemption list, session lifetimes, access control for creating new identities, and enforcing IP restrictions on token creation.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountSettingsApi
Returns a new instance of AccountSettingsApi.
19 20 21 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_account_settings(account_id, authorization, opts = {}) ⇒ AccountSettingsResponse
Get account configurations Returns the details of an account's configuration.
30 31 32 33 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 30 def get_account_settings(account_id, , opts = {}) data, _status_code, _headers = get_account_settings_with_http_info(account_id, , opts) data end |
#get_account_settings_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(AccountSettingsResponse, Integer, Hash)>
Get account configurations Returns the details of an account's configuration.
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 90 91 92 93 94 95 96 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 43 def get_account_settings_with_http_info(account_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountSettingsApi.get_account_settings ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountSettingsApi.get_account_settings" end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling AccountSettingsApi.get_account_settings" end # resource path local_var_path = '/v1/accounts/{account_id}/settings/identity'.sub('{account_id}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? query_params[:'resolve_user_mfa'] = opts[:'resolve_user_mfa'] if !opts[:'resolve_user_mfa'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Authorization'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AccountSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AccountSettingsApi.get_account_settings", :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: AccountSettingsApi#get_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_effective_account_settings(account_id, authorization, opts = {}) ⇒ EffectiveAccountSettingsResponse
Get effective account settings configuration Returns effective account settings for given account ID
106 107 108 109 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 106 def get_effective_account_settings(account_id, , opts = {}) data, _status_code, _headers = get_effective_account_settings_with_http_info(account_id, , opts) data end |
#get_effective_account_settings_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(EffectiveAccountSettingsResponse, Integer, Hash)>
Get effective account settings configuration Returns effective account settings for given account ID
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 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 119 def get_effective_account_settings_with_http_info(account_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountSettingsApi.get_effective_account_settings ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountSettingsApi.get_effective_account_settings" end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling AccountSettingsApi.get_effective_account_settings" end # resource path local_var_path = '/v1/accounts/{account_id}/effective_settings/identity'.sub('{account_id}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? query_params[:'resolve_user_mfa'] = opts[:'resolve_user_mfa'] if !opts[:'resolve_user_mfa'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] header_params[:'Authorization'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'EffectiveAccountSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AccountSettingsApi.get_effective_account_settings", :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: AccountSettingsApi#get_effective_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_account_settings(authorization, if_match, account_id, account_settings_request, opts = {}) ⇒ AccountSettingsResponse
Update account configurations Allows a user to configure settings on their account with regards to MFA, MFA excemption list, session lifetimes, access control for creating new identities, and enforcing IP restrictions on token creation.
182 183 184 185 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 182 def update_account_settings(, if_match, account_id, account_settings_request, opts = {}) data, _status_code, _headers = update_account_settings_with_http_info(, if_match, account_id, account_settings_request, opts) data end |
#update_account_settings_with_http_info(authorization, if_match, account_id, account_settings_request, opts = {}) ⇒ Array<(AccountSettingsResponse, Integer, Hash)>
Update account configurations Allows a user to configure settings on their account with regards to MFA, MFA excemption list, session lifetimes, access control for creating new identities, and enforcing IP restrictions on token creation.
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 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
# File 'lib/ibm_cloud_iam/api/account_settings_api.rb', line 195 def update_account_settings_with_http_info(, if_match, account_id, account_settings_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountSettingsApi.update_account_settings ...' end # verify the required parameter 'authorization' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'authorization' when calling AccountSettingsApi.update_account_settings" end # verify the required parameter 'if_match' is set if @api_client.config.client_side_validation && if_match.nil? fail ArgumentError, "Missing the required parameter 'if_match' when calling AccountSettingsApi.update_account_settings" end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountSettingsApi.update_account_settings" end # verify the required parameter 'account_settings_request' is set if @api_client.config.client_side_validation && account_settings_request.nil? fail ArgumentError, "Missing the required parameter 'account_settings_request' when calling AccountSettingsApi.update_account_settings" end # resource path local_var_path = '/v1/accounts/{account_id}/settings/identity'.sub('{account_id}', CGI.escape(account_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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'Authorization'] = header_params[:'If-Match'] = if_match # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(account_settings_request) # return_type return_type = opts[:debug_return_type] || 'AccountSettingsResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"AccountSettingsApi.update_account_settings", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountSettingsApi#update_account_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |