Class: IbmCloudIam::TrustedProfilesApi
- Inherits:
-
Object
- Object
- IbmCloudIam::TrustedProfilesApi
- Defined in:
- lib/ibm_cloud_iam/api/trusted_profiles_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_claim_rule(authorization, profile_id, profile_claim_rule_request, opts = {}) ⇒ ProfileClaimRule
Create claim rule for a trusted profile Create a claim rule for a trusted profile.
-
#create_claim_rule_with_http_info(authorization, profile_id, profile_claim_rule_request, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Create claim rule for a trusted profile Create a claim rule for a trusted profile.
-
#create_link(profile_id, authorization, create_profile_link_request, opts = {}) ⇒ ProfileLink
Create link to a trusted profile Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
-
#create_link_with_http_info(profile_id, authorization, create_profile_link_request, opts = {}) ⇒ Array<(ProfileLink, Integer, Hash)>
Create link to a trusted profile Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
-
#create_profile(authorization, create_trusted_profile_request, opts = {}) ⇒ TrustedProfile
Create a trusted profile Create a trusted profile for a given account ID.
-
#create_profile_with_http_info(authorization, create_trusted_profile_request, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Create a trusted profile Create a trusted profile for a given account ID.
-
#delete_claim_rule(profile_id, rule_id, authorization, opts = {}) ⇒ nil
Delete a claim rule Delete a claim rule.
-
#delete_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a claim rule Delete a claim rule.
-
#delete_link(profile_id, link_id, authorization, opts = {}) ⇒ nil
Delete link to a trusted profile Delete a link between a compute resource and a trusted profile.
-
#delete_link_by_parameters(profile_id, type, authorization, opts = {}) ⇒ nil
Delete compute resource link to profile by given parameters.
-
#delete_link_by_parameters_with_http_info(profile_id, type, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete compute resource link to profile by given parameters.
-
#delete_link_with_http_info(profile_id, link_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete link to a trusted profile Delete a link between a compute resource and a trusted profile.
-
#delete_profile(profile_id, authorization, opts = {}) ⇒ nil
Delete a trusted profile Delete a trusted profile.
-
#delete_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ nil
Delete the identity that can assume the trusted profile Delete the identity that can assume the trusted profile.
-
#delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the identity that can assume the trusted profile Delete the identity that can assume the trusted profile.
-
#delete_profile_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a trusted profile Delete a trusted profile.
-
#get_claim_rule(profile_id, rule_id, authorization, opts = {}) ⇒ ProfileClaimRule
Get a claim rule for a trusted profile A specific claim rule can be fetched for a given trusted profile ID and rule ID.
-
#get_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Get a claim rule for a trusted profile A specific claim rule can be fetched for a given trusted profile ID and rule ID.
-
#get_link(profile_id, link_id, authorization, opts = {}) ⇒ ProfileLink
Get link to a trusted profile Get a specific link to a trusted profile by
link_id. -
#get_link_with_http_info(profile_id, link_id, authorization, opts = {}) ⇒ Array<(ProfileLink, Integer, Hash)>
Get link to a trusted profile Get a specific link to a trusted profile by `link_id`.
-
#get_profile(profile_id, authorization, opts = {}) ⇒ TrustedProfile
Get a trusted profile Retrieve a trusted profile by its
profile-id. -
#get_profile_identities(profile_id, authorization, opts = {}) ⇒ ProfileIdentitiesResponse
Get a list of identities that can assume the trusted profile Get a list of identities that can assume the trusted profile.
-
#get_profile_identities_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileIdentitiesResponse, Integer, Hash)>
Get a list of identities that can assume the trusted profile Get a list of identities that can assume the trusted profile.
-
#get_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ ProfileIdentityResponse
Get the identity that can assume the trusted profile Get the identity that can assume the trusted profile.
-
#get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ Array<(ProfileIdentityResponse, Integer, Hash)>
Get the identity that can assume the trusted profile Get the identity that can assume the trusted profile.
-
#get_profile_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Get a trusted profile Retrieve a trusted profile by its `profile-id`.
-
#initialize(api_client = ApiClient.default) ⇒ TrustedProfilesApi
constructor
A new instance of TrustedProfilesApi.
-
#list_claim_rules(profile_id, authorization, opts = {}) ⇒ ProfileClaimRuleList
List claim rules for a trusted profile Get a list of all claim rules for a trusted profile.
-
#list_claim_rules_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileClaimRuleList, Integer, Hash)>
List claim rules for a trusted profile Get a list of all claim rules for a trusted profile.
-
#list_links(profile_id, authorization, opts = {}) ⇒ ProfileLinkList
List links to a trusted profile Get a list of links to a trusted profile.
-
#list_links_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileLinkList, Integer, Hash)>
List links to a trusted profile Get a list of links to a trusted profile.
-
#list_profiles(account_id, authorization, opts = {}) ⇒ TrustedProfilesList
List trusted profiles List the trusted profiles in an account.
-
#list_profiles_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(TrustedProfilesList, Integer, Hash)>
List trusted profiles List the trusted profiles in an account.
-
#set_profile_identities(profile_id, if_match, authorization, profile_identities_update_request, opts = {}) ⇒ ProfileIdentitiesResponse
Update the list of identities that can assume the trusted profile Update the list of identities that can assume the trusted profile.
-
#set_profile_identities_with_http_info(profile_id, if_match, authorization, profile_identities_update_request, opts = {}) ⇒ Array<(ProfileIdentitiesResponse, Integer, Hash)>
Update the list of identities that can assume the trusted profile Update the list of identities that can assume the trusted profile.
-
#set_profile_identity(profile_id, identity_type, authorization, profile_identity_request, opts = {}) ⇒ ProfileIdentityResponse
Add a specific identity that can assume the trusted profile Add a specific identity that can assume the trusted profile.
-
#set_profile_identity_with_http_info(profile_id, identity_type, authorization, profile_identity_request, opts = {}) ⇒ Array<(ProfileIdentityResponse, Integer, Hash)>
Add a specific identity that can assume the trusted profile Add a specific identity that can assume the trusted profile.
-
#update_claim_rule(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {}) ⇒ ProfileClaimRule
Update claim rule for a trusted profile Update a specific claim rule for a given trusted profile ID and rule ID.
-
#update_claim_rule_with_http_info(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Update claim rule for a trusted profile Update a specific claim rule for a given trusted profile ID and rule ID.
-
#update_profile(profile_id, authorization, if_match, update_trusted_profile_request, opts = {}) ⇒ TrustedProfile
Update a trusted profile Update the name or description of an existing trusted profile.
-
#update_profile_with_http_info(profile_id, authorization, if_match, update_trusted_profile_request, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Update a trusted profile Update the name or description of an existing trusted profile.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TrustedProfilesApi
Returns a new instance of TrustedProfilesApi.
19 20 21 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_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/trusted_profiles_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_claim_rule(authorization, profile_id, profile_claim_rule_request, opts = {}) ⇒ ProfileClaimRule
Create claim rule for a trusted profile Create a claim rule for a trusted profile. There is a limit of 20 rules per trusted profile.
29 30 31 32 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 29 def create_claim_rule(, profile_id, profile_claim_rule_request, opts = {}) data, _status_code, _headers = create_claim_rule_with_http_info(, profile_id, profile_claim_rule_request, opts) data end |
#create_claim_rule_with_http_info(authorization, profile_id, profile_claim_rule_request, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Create claim rule for a trusted profile Create a claim rule for a trusted profile. There is a limit of 20 rules per trusted profile.
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 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 41 def create_claim_rule_with_http_info(, profile_id, profile_claim_rule_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_claim_rule ...' 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 TrustedProfilesApi.create_claim_rule" end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.create_claim_rule" end # verify the required parameter 'profile_claim_rule_request' is set if @api_client.config.client_side_validation && profile_claim_rule_request.nil? fail ArgumentError, "Missing the required parameter 'profile_claim_rule_request' when calling TrustedProfilesApi.create_claim_rule" end # resource path local_var_path = '/v1/profiles/{profile-id}/rules'.sub('{profile-id}', CGI.escape(profile_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'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_claim_rule_request) # return_type return_type = opts[:debug_return_type] || 'ProfileClaimRule' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.create_claim_rule", :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: TrustedProfilesApi#create_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_link(profile_id, authorization, create_profile_link_request, opts = {}) ⇒ ProfileLink
Create link to a trusted profile Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
110 111 112 113 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 110 def create_link(profile_id, , create_profile_link_request, opts = {}) data, _status_code, _headers = create_link_with_http_info(profile_id, , create_profile_link_request, opts) data end |
#create_link_with_http_info(profile_id, authorization, create_profile_link_request, opts = {}) ⇒ Array<(ProfileLink, Integer, Hash)>
Create link to a trusted profile Create a direct link between a specific compute resource and a trusted profile, rather than creating conditions that a compute resource must fulfill to apply a trusted profile.
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 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 122 def create_link_with_http_info(profile_id, , create_profile_link_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_link ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.create_link" 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 TrustedProfilesApi.create_link" end # verify the required parameter 'create_profile_link_request' is set if @api_client.config.client_side_validation && create_profile_link_request.nil? fail ArgumentError, "Missing the required parameter 'create_profile_link_request' when calling TrustedProfilesApi.create_link" end # resource path local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_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'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_profile_link_request) # return_type return_type = opts[:debug_return_type] || 'ProfileLink' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.create_link", :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: TrustedProfilesApi#create_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_profile(authorization, create_trusted_profile_request, opts = {}) ⇒ TrustedProfile
Create a trusted profile Create a trusted profile for a given account ID.
190 191 192 193 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 190 def create_profile(, create_trusted_profile_request, opts = {}) data, _status_code, _headers = create_profile_with_http_info(, create_trusted_profile_request, opts) data end |
#create_profile_with_http_info(authorization, create_trusted_profile_request, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Create a trusted profile Create a trusted profile for a given account ID.
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 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 201 def create_profile_with_http_info(, create_trusted_profile_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.create_profile ...' 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 TrustedProfilesApi.create_profile" end # verify the required parameter 'create_trusted_profile_request' is set if @api_client.config.client_side_validation && create_trusted_profile_request.nil? fail ArgumentError, "Missing the required parameter 'create_trusted_profile_request' when calling TrustedProfilesApi.create_profile" end # resource path local_var_path = '/v1/profiles' # 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'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(create_trusted_profile_request) # return_type return_type = opts[:debug_return_type] || 'TrustedProfile' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.create_profile", :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: TrustedProfilesApi#create_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_claim_rule(profile_id, rule_id, authorization, opts = {}) ⇒ nil
Delete a claim rule Delete a claim rule. When you delete a claim rule, federated user or compute resources are no longer required to meet the conditions of the claim rule in order to apply the trusted profile.
266 267 268 269 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 266 def delete_claim_rule(profile_id, rule_id, , opts = {}) delete_claim_rule_with_http_info(profile_id, rule_id, , opts) nil end |
#delete_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a claim rule Delete a claim rule. When you delete a claim rule, federated user or compute resources are no longer required to meet the conditions of the claim rule in order to apply the trusted profile.
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 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 278 def delete_claim_rule_with_http_info(profile_id, rule_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_claim_rule ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_claim_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.delete_claim_rule" 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 TrustedProfilesApi.delete_claim_rule" end # resource path local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.delete_claim_rule", :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: TrustedProfilesApi#delete_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_link(profile_id, link_id, authorization, opts = {}) ⇒ nil
Delete link to a trusted profile Delete a link between a compute resource and a trusted profile.
340 341 342 343 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 340 def delete_link(profile_id, link_id, , opts = {}) delete_link_with_http_info(profile_id, link_id, , opts) nil end |
#delete_link_by_parameters(profile_id, type, authorization, opts = {}) ⇒ nil
Delete compute resource link to profile by given parameters. Deletes compute resource link of a Trusted Profile matching the given parameters.
419 420 421 422 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 419 def delete_link_by_parameters(profile_id, type, , opts = {}) delete_link_by_parameters_with_http_info(profile_id, type, , opts) nil end |
#delete_link_by_parameters_with_http_info(profile_id, type, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete compute resource link to profile by given parameters. Deletes compute resource link of a Trusted Profile matching the given parameters.
436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 436 def delete_link_by_parameters_with_http_info(profile_id, type, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_link_by_parameters ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_link_by_parameters" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling TrustedProfilesApi.delete_link_by_parameters" 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 TrustedProfilesApi.delete_link_by_parameters" end # resource path local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type query_params[:'crn'] = opts[:'crn'] if !opts[:'crn'].nil? query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'component_type'] = opts[:'component_type'] if !opts[:'component_type'].nil? query_params[:'component_name'] = opts[:'component_name'] if !opts[:'component_name'].nil? # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.delete_link_by_parameters", :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: TrustedProfilesApi#delete_link_by_parameters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_link_with_http_info(profile_id, link_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete link to a trusted profile Delete a link between a compute resource and a trusted profile.
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 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 352 def delete_link_with_http_info(profile_id, link_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_link ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_link" end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TrustedProfilesApi.delete_link" 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 TrustedProfilesApi.delete_link" end # resource path local_var_path = '/v1/profiles/{profile-id}/links/{link-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{link-id}', CGI.escape(link_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.delete_link", :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: TrustedProfilesApi#delete_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_profile(profile_id, authorization, opts = {}) ⇒ nil
Delete a trusted profile Delete a trusted profile. When you delete trusted profile, compute resources and federated users are unlinked from the profile and can no longer apply the trusted profile identity.
503 504 505 506 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 503 def delete_profile(profile_id, , opts = {}) delete_profile_with_http_info(profile_id, , opts) nil end |
#delete_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ nil
Delete the identity that can assume the trusted profile Delete the identity that can assume the trusted profile. Note: This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
573 574 575 576 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 573 def delete_profile_identity(profile_id, identity_type, identifier_id, , opts = {}) delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, , opts) nil end |
#delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete the identity that can assume the trusted profile Delete the identity that can assume the trusted profile. Note: This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 586 def delete_profile_identity_with_http_info(profile_id, identity_type, identifier_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_profile_identity ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_profile_identity" end # verify the required parameter 'identity_type' is set if @api_client.config.client_side_validation && identity_type.nil? fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.delete_profile_identity" end # verify enum value allowable_values = ["user", "serviceid", "crn"] if @api_client.config.client_side_validation && !allowable_values.include?(identity_type) fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}" end # verify the required parameter 'identifier_id' is set if @api_client.config.client_side_validation && identifier_id.nil? fail ArgumentError, "Missing the required parameter 'identifier_id' when calling TrustedProfilesApi.delete_profile_identity" 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 TrustedProfilesApi.delete_profile_identity" end # resource path local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}/{identifier-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.to_s)).sub('{identifier-id}', CGI.escape(identifier_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.delete_profile_identity", :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: TrustedProfilesApi#delete_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_profile_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a trusted profile Delete a trusted profile. When you delete trusted profile, compute resources and federated users are unlinked from the profile and can no longer apply the trusted profile identity.
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 514 def delete_profile_with_http_info(profile_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.delete_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.delete_profile" 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 TrustedProfilesApi.delete_profile" end # resource path local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} 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] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.delete_profile", :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: TrustedProfilesApi#delete_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_claim_rule(profile_id, rule_id, authorization, opts = {}) ⇒ ProfileClaimRule
Get a claim rule for a trusted profile A specific claim rule can be fetched for a given trusted profile ID and rule ID.
657 658 659 660 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 657 def get_claim_rule(profile_id, rule_id, , opts = {}) data, _status_code, _headers = get_claim_rule_with_http_info(profile_id, rule_id, , opts) data end |
#get_claim_rule_with_http_info(profile_id, rule_id, authorization, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Get a claim rule for a trusted profile A specific claim rule can be fetched for a given trusted profile ID and rule ID.
669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 669 def get_claim_rule_with_http_info(profile_id, rule_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_claim_rule ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_claim_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.get_claim_rule" 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 TrustedProfilesApi.get_claim_rule" end # resource path local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_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'] 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] || 'ProfileClaimRule' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.get_claim_rule", :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: TrustedProfilesApi#get_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_link(profile_id, link_id, authorization, opts = {}) ⇒ ProfileLink
Get link to a trusted profile
Get a specific link to a trusted profile by link_id.
733 734 735 736 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 733 def get_link(profile_id, link_id, , opts = {}) data, _status_code, _headers = get_link_with_http_info(profile_id, link_id, , opts) data end |
#get_link_with_http_info(profile_id, link_id, authorization, opts = {}) ⇒ Array<(ProfileLink, Integer, Hash)>
Get link to a trusted profile Get a specific link to a trusted profile by `link_id`.
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 745 def get_link_with_http_info(profile_id, link_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_link ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_link" end # verify the required parameter 'link_id' is set if @api_client.config.client_side_validation && link_id.nil? fail ArgumentError, "Missing the required parameter 'link_id' when calling TrustedProfilesApi.get_link" 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 TrustedProfilesApi.get_link" end # resource path local_var_path = '/v1/profiles/{profile-id}/links/{link-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{link-id}', CGI.escape(link_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'] 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] || 'ProfileLink' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.get_link", :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: TrustedProfilesApi#get_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile(profile_id, authorization, opts = {}) ⇒ TrustedProfile
Get a trusted profile
Retrieve a trusted profile by its profile-id. Only the trusted profile's data is returned (name, description, iam_id, etc.), not the federated users or compute resources that qualify to apply the trusted profile.
809 810 811 812 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 809 def get_profile(profile_id, , opts = {}) data, _status_code, _headers = get_profile_with_http_info(profile_id, , opts) data end |
#get_profile_identities(profile_id, authorization, opts = {}) ⇒ ProfileIdentitiesResponse
Get a list of identities that can assume the trusted profile Get a list of identities that can assume the trusted profile
881 882 883 884 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 881 def get_profile_identities(profile_id, , opts = {}) data, _status_code, _headers = get_profile_identities_with_http_info(profile_id, , opts) data end |
#get_profile_identities_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileIdentitiesResponse, Integer, Hash)>
Get a list of identities that can assume the trusted profile Get a list of identities that can assume the trusted profile
892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 892 def get_profile_identities_with_http_info(profile_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile_identities ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile_identities" 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 TrustedProfilesApi.get_profile_identities" end # resource path local_var_path = '/v1/profiles/{profile-id}/identities'.sub('{profile-id}', CGI.escape(profile_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'] 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] || 'ProfileIdentitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.get_profile_identities", :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: TrustedProfilesApi#get_profile_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_identity(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ ProfileIdentityResponse
Get the identity that can assume the trusted profile Get the identity that can assume the trusted profile
953 954 955 956 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 953 def get_profile_identity(profile_id, identity_type, identifier_id, , opts = {}) data, _status_code, _headers = get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, , opts) data end |
#get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, authorization, opts = {}) ⇒ Array<(ProfileIdentityResponse, Integer, Hash)>
Get the identity that can assume the trusted profile Get the identity that can assume the trusted profile
966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 966 def get_profile_identity_with_http_info(profile_id, identity_type, identifier_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile_identity ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile_identity" end # verify the required parameter 'identity_type' is set if @api_client.config.client_side_validation && identity_type.nil? fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.get_profile_identity" end # verify enum value allowable_values = ["user", "serviceid", "crn"] if @api_client.config.client_side_validation && !allowable_values.include?(identity_type) fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}" end # verify the required parameter 'identifier_id' is set if @api_client.config.client_side_validation && identifier_id.nil? fail ArgumentError, "Missing the required parameter 'identifier_id' when calling TrustedProfilesApi.get_profile_identity" 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 TrustedProfilesApi.get_profile_identity" end # resource path local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}/{identifier-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.to_s)).sub('{identifier-id}', CGI.escape(identifier_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'] 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] || 'ProfileIdentityResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.get_profile_identity", :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: TrustedProfilesApi#get_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_profile_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Get a trusted profile Retrieve a trusted profile by its `profile-id`. Only the trusted profile's data is returned (`name`, `description`, `iam_id`, etc.), not the federated users or compute resources that qualify to apply the trusted profile.
821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 821 def get_profile_with_http_info(profile_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.get_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.get_profile" 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 TrustedProfilesApi.get_profile" end # resource path local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_activity'] = opts[:'include_activity'] if !opts[:'include_activity'].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] || 'TrustedProfile' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.get_profile", :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: TrustedProfilesApi#get_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_claim_rules(profile_id, authorization, opts = {}) ⇒ ProfileClaimRuleList
List claim rules for a trusted profile
Get a list of all claim rules for a trusted profile. The profile-id query parameter determines the profile from which to retrieve the list of claim rules.
1038 1039 1040 1041 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1038 def list_claim_rules(profile_id, , opts = {}) data, _status_code, _headers = list_claim_rules_with_http_info(profile_id, , opts) data end |
#list_claim_rules_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileClaimRuleList, Integer, Hash)>
List claim rules for a trusted profile Get a list of all claim rules for a trusted profile. The `profile-id` query parameter determines the profile from which to retrieve the list of claim rules.
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1049 def list_claim_rules_with_http_info(profile_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_claim_rules ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.list_claim_rules" 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 TrustedProfilesApi.list_claim_rules" end # resource path local_var_path = '/v1/profiles/{profile-id}/rules'.sub('{profile-id}', CGI.escape(profile_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'] 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] || 'ProfileClaimRuleList' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.list_claim_rules", :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: TrustedProfilesApi#list_claim_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_links(profile_id, authorization, opts = {}) ⇒ ProfileLinkList
List links to a trusted profile Get a list of links to a trusted profile.
1108 1109 1110 1111 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1108 def list_links(profile_id, , opts = {}) data, _status_code, _headers = list_links_with_http_info(profile_id, , opts) data end |
#list_links_with_http_info(profile_id, authorization, opts = {}) ⇒ Array<(ProfileLinkList, Integer, Hash)>
List links to a trusted profile Get a list of links to a trusted profile.
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1119 def list_links_with_http_info(profile_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_links ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.list_links" 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 TrustedProfilesApi.list_links" end # resource path local_var_path = '/v1/profiles/{profile-id}/links'.sub('{profile-id}', CGI.escape(profile_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'] 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] || 'ProfileLinkList' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.list_links", :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: TrustedProfilesApi#list_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_profiles(account_id, authorization, opts = {}) ⇒ TrustedProfilesList
List trusted profiles
List the trusted profiles in an account. The account_id query parameter determines the account from which to retrieve the list of trusted profiles.
1185 1186 1187 1188 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1185 def list_profiles(account_id, , opts = {}) data, _status_code, _headers = list_profiles_with_http_info(account_id, , opts) data end |
#list_profiles_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(TrustedProfilesList, Integer, Hash)>
List trusted profiles List the trusted profiles in an account. The `account_id` query parameter determines the account from which to retrieve the list of trusted profiles.
1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1203 def list_profiles_with_http_info(account_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.list_profiles ...' 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 TrustedProfilesApi.list_profiles" 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 TrustedProfilesApi.list_profiles" end allowable_values = ["asc", "desc"] if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order']) fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}" end # resource path local_var_path = '/v1/profiles' # query parameters query_params = opts[:query_params] || {} query_params[:'account_id'] = account_id query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'pagesize'] = opts[:'pagesize'] if !opts[:'pagesize'].nil? query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].nil? query_params[:'pagetoken'] = opts[:'pagetoken'] if !opts[:'pagetoken'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].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] || 'TrustedProfilesList' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.list_profiles", :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: TrustedProfilesApi#list_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_profile_identities(profile_id, if_match, authorization, profile_identities_update_request, opts = {}) ⇒ ProfileIdentitiesResponse
Update the list of identities that can assume the trusted profile Update the list of identities that can assume the trusted profile
1276 1277 1278 1279 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1276 def set_profile_identities(profile_id, if_match, , profile_identities_update_request, opts = {}) data, _status_code, _headers = set_profile_identities_with_http_info(profile_id, if_match, , profile_identities_update_request, opts) data end |
#set_profile_identities_with_http_info(profile_id, if_match, authorization, profile_identities_update_request, opts = {}) ⇒ Array<(ProfileIdentitiesResponse, Integer, Hash)>
Update the list of identities that can assume the trusted profile Update the list of identities that can assume the trusted profile
1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1289 def set_profile_identities_with_http_info(profile_id, if_match, , profile_identities_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.set_profile_identities ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.set_profile_identities" 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 TrustedProfilesApi.set_profile_identities" 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 TrustedProfilesApi.set_profile_identities" end # verify the required parameter 'profile_identities_update_request' is set if @api_client.config.client_side_validation && profile_identities_update_request.nil? fail ArgumentError, "Missing the required parameter 'profile_identities_update_request' when calling TrustedProfilesApi.set_profile_identities" end # resource path local_var_path = '/v1/profiles/{profile-id}/identities'.sub('{profile-id}', CGI.escape(profile_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[:'If-Match'] = if_match header_params[:'Authorization'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_identities_update_request) # return_type return_type = opts[:debug_return_type] || 'ProfileIdentitiesResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.set_profile_identities", :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: TrustedProfilesApi#set_profile_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_profile_identity(profile_id, identity_type, authorization, profile_identity_request, opts = {}) ⇒ ProfileIdentityResponse
Add a specific identity that can assume the trusted profile Add a specific identity that can assume the trusted profile. Note: This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
1364 1365 1366 1367 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1364 def set_profile_identity(profile_id, identity_type, , profile_identity_request, opts = {}) data, _status_code, _headers = set_profile_identity_with_http_info(profile_id, identity_type, , profile_identity_request, opts) data end |
#set_profile_identity_with_http_info(profile_id, identity_type, authorization, profile_identity_request, opts = {}) ⇒ Array<(ProfileIdentityResponse, Integer, Hash)>
Add a specific identity that can assume the trusted profile Add a specific identity that can assume the trusted profile. Note: This API will update the trusted profile itself, thus calling it repeatedly for the same profile can lead to conflicts responded with HTTP code 409. Make sure to call this API only once in a few seconds for the same trusted profile.
1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1377 def set_profile_identity_with_http_info(profile_id, identity_type, , profile_identity_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.set_profile_identity ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.set_profile_identity" end # verify the required parameter 'identity_type' is set if @api_client.config.client_side_validation && identity_type.nil? fail ArgumentError, "Missing the required parameter 'identity_type' when calling TrustedProfilesApi.set_profile_identity" end # verify enum value allowable_values = ["user", "serviceid", "crn"] if @api_client.config.client_side_validation && !allowable_values.include?(identity_type) fail ArgumentError, "invalid value for \"identity_type\", must be one of #{allowable_values}" 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 TrustedProfilesApi.set_profile_identity" end # verify the required parameter 'profile_identity_request' is set if @api_client.config.client_side_validation && profile_identity_request.nil? fail ArgumentError, "Missing the required parameter 'profile_identity_request' when calling TrustedProfilesApi.set_profile_identity" end # resource path local_var_path = '/v1/profiles/{profile-id}/identities/{identity-type}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{identity-type}', CGI.escape(identity_type.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'] = # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(profile_identity_request) # return_type return_type = opts[:debug_return_type] || 'ProfileIdentityResponse' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.set_profile_identity", :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: TrustedProfilesApi#set_profile_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_claim_rule(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {}) ⇒ ProfileClaimRule
Update claim rule for a trusted profile Update a specific claim rule for a given trusted profile ID and rule ID.
1457 1458 1459 1460 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1457 def update_claim_rule(profile_id, rule_id, , if_match, profile_claim_rule_request, opts = {}) data, _status_code, _headers = update_claim_rule_with_http_info(profile_id, rule_id, , if_match, profile_claim_rule_request, opts) data end |
#update_claim_rule_with_http_info(profile_id, rule_id, authorization, if_match, profile_claim_rule_request, opts = {}) ⇒ Array<(ProfileClaimRule, Integer, Hash)>
Update claim rule for a trusted profile Update a specific claim rule for a given trusted profile ID and rule ID.
1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1471 def update_claim_rule_with_http_info(profile_id, rule_id, , if_match, profile_claim_rule_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.update_claim_rule ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.update_claim_rule" end # verify the required parameter 'rule_id' is set if @api_client.config.client_side_validation && rule_id.nil? fail ArgumentError, "Missing the required parameter 'rule_id' when calling TrustedProfilesApi.update_claim_rule" 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 TrustedProfilesApi.update_claim_rule" 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 TrustedProfilesApi.update_claim_rule" end # verify the required parameter 'profile_claim_rule_request' is set if @api_client.config.client_side_validation && profile_claim_rule_request.nil? fail ArgumentError, "Missing the required parameter 'profile_claim_rule_request' when calling TrustedProfilesApi.update_claim_rule" end # resource path local_var_path = '/v1/profiles/{profile-id}/rules/{rule-id}'.sub('{profile-id}', CGI.escape(profile_id.to_s)).sub('{rule-id}', CGI.escape(rule_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(profile_claim_rule_request) # return_type return_type = opts[:debug_return_type] || 'ProfileClaimRule' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.update_claim_rule", :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: TrustedProfilesApi#update_claim_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_profile(profile_id, authorization, if_match, update_trusted_profile_request, opts = {}) ⇒ TrustedProfile
Update a trusted profile Update the name or description of an existing trusted profile.
1550 1551 1552 1553 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1550 def update_profile(profile_id, , if_match, update_trusted_profile_request, opts = {}) data, _status_code, _headers = update_profile_with_http_info(profile_id, , if_match, update_trusted_profile_request, opts) data end |
#update_profile_with_http_info(profile_id, authorization, if_match, update_trusted_profile_request, opts = {}) ⇒ Array<(TrustedProfile, Integer, Hash)>
Update a trusted profile Update the name or description of an existing trusted profile.
1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 |
# File 'lib/ibm_cloud_iam/api/trusted_profiles_api.rb', line 1563 def update_profile_with_http_info(profile_id, , if_match, update_trusted_profile_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TrustedProfilesApi.update_profile ...' end # verify the required parameter 'profile_id' is set if @api_client.config.client_side_validation && profile_id.nil? fail ArgumentError, "Missing the required parameter 'profile_id' when calling TrustedProfilesApi.update_profile" 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 TrustedProfilesApi.update_profile" 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 TrustedProfilesApi.update_profile" end # verify the required parameter 'update_trusted_profile_request' is set if @api_client.config.client_side_validation && update_trusted_profile_request.nil? fail ArgumentError, "Missing the required parameter 'update_trusted_profile_request' when calling TrustedProfilesApi.update_profile" end # resource path local_var_path = '/v1/profiles/{profile-id}'.sub('{profile-id}', CGI.escape(profile_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(update_trusted_profile_request) # return_type return_type = opts[:debug_return_type] || 'TrustedProfile' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TrustedProfilesApi.update_profile", :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: TrustedProfilesApi#update_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |