Class: IbmCloudIam::IDPManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/ibm_cloud_iam/api/idp_management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IDPManagementApi

Returns a new instance of IDPManagementApi.



19
20
21
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_idp(authorization, create_idp_request, opts = {}) ⇒ Idp

Create IdP

Parameters:

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • create_idp_request (CreateIdpRequest)

    Request to create idp

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :automation (String)

    boolean to flag if IdP is created via automation

Returns:



28
29
30
31
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 28

def create_idp(authorization, create_idp_request, opts = {})
  data, _status_code, _headers = create_idp_with_http_info(authorization, create_idp_request, opts)
  data
end

#create_idp_with_http_info(authorization, create_idp_request, opts = {}) ⇒ Array<(Idp, Integer, Hash)>

Create IdP

Parameters:

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • create_idp_request (CreateIdpRequest)

    Request to create idp

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :automation (String)

    boolean to flag if IdP is created via automation

Returns:

  • (Array<(Idp, Integer, Hash)>)

    Idp data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 39

def create_idp_with_http_info(authorization, create_idp_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.create_idp ...'
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.create_idp"
  end
  # verify the required parameter 'create_idp_request' is set
  if @api_client.config.client_side_validation && create_idp_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_idp_request' when calling IDPManagementApi.create_idp"
  end
  # resource path
  local_var_path = '/v1/idps/'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'automation'] = opts[:'automation'] if !opts[:'automation'].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']
  # 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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(create_idp_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Idp'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.create_idp",
    :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: IDPManagementApi#create_idp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_idp(idp_id, authorization, opts = {}) ⇒ nil

Delete IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


103
104
105
106
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 103

def delete_idp(idp_id, authorization, opts = {})
  delete_idp_with_http_info(idp_id, authorization, opts)
  nil
end

#delete_idp_with_http_info(idp_id, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 113

def delete_idp_with_http_info(idp_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.delete_idp ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.delete_idp"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.delete_idp"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}'.sub('{idp_id}', CGI.escape(idp_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  header_params[:'Authorization'] = 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] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.delete_idp",
    :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: IDPManagementApi#delete_idp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_saml_metadata(idp_id, opts = {}) ⇒ String

Export SAML IdP metadata Returns the Service Provider (SP) SAML metadata document for the specified Identity Provider. The generated metadata contains the SP entity ID, signing certificate, supported NameID formats, and Assertion Consumer Service endpoints derived from the Identity Provider configuration.

Parameters:

  • idp_id (String)

    ID of the IDP

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

Returns:

  • (String)


170
171
172
173
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 170

def (idp_id, opts = {})
  data, _status_code, _headers = (idp_id, opts)
  data
end

#export_saml_metadata_with_http_info(idp_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Export SAML IdP metadata Returns the Service Provider (SP) SAML metadata document for the specified Identity Provider. The generated metadata contains the SP entity ID, signing certificate, supported NameID formats, and Assertion Consumer Service endpoints derived from the Identity Provider configuration.

Parameters:

  • idp_id (String)

    ID of the IDP

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 181

def (idp_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.export_saml_metadata ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.export_saml_metadata"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}/saml/metadata'.sub('{idp_id}', CGI.escape(idp_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(['text/xml']) unless header_params['Accept']
  header_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.export_saml_metadata",
    :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: IDPManagementApi#export_saml_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_idp(idp_id, authorization, opts = {}) ⇒ Idp

Get IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_history (String)

    include history of the idp

Returns:



236
237
238
239
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 236

def get_idp(idp_id, authorization, opts = {})
  data, _status_code, _headers = get_idp_with_http_info(idp_id, authorization, opts)
  data
end

#get_idp_test_result(idp_id, opts = {}) ⇒ TestResult

Get IdP test results Get IDP test record.

Parameters:

  • idp_id (String)

    ID of the IDP

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

Returns:



307
308
309
310
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 307

def get_idp_test_result(idp_id, opts = {})
  data, _status_code, _headers = get_idp_test_result_with_http_info(idp_id, opts)
  data
end

#get_idp_test_result_with_http_info(idp_id, opts = {}) ⇒ Array<(TestResult, Integer, Hash)>

Get IdP test results Get IDP test record.

Parameters:

  • idp_id (String)

    ID of the IDP

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

Returns:

  • (Array<(TestResult, Integer, Hash)>)

    TestResult data, response status code and response headers



318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 318

def get_idp_test_result_with_http_info(idp_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.get_idp_test_result ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.get_idp_test_result"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}/test'.sub('{idp_id}', CGI.escape(idp_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'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TestResult'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.get_idp_test_result",
    :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: IDPManagementApi#get_idp_test_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_idp_with_http_info(idp_id, authorization, opts = {}) ⇒ Array<(Idp, Integer, Hash)>

Get IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_history (String)

    include history of the idp

Returns:

  • (Array<(Idp, Integer, Hash)>)

    Idp data, response status code and response headers



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 247

def get_idp_with_http_info(idp_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.get_idp ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.get_idp"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.get_idp"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}'.sub('{idp_id}', CGI.escape(idp_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Idp'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.get_idp",
    :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: IDPManagementApi#get_idp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_saml_idp_metadata(idp_id, body, opts = {}) ⇒ SamlMetadataImportResponse

Import SAML IdP metadata Import a metadata.xml originating from the federated SAML Identity Provider

Parameters:

  • idp_id (String)

    ID of the IDP

  • body (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • :parse_only (Boolean)

    If true, validates and parses the metadata without updating the Identity Provider. (default to false)

Returns:



375
376
377
378
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 375

def (idp_id, body, opts = {})
  data, _status_code, _headers = (idp_id, body, opts)
  data
end

#import_saml_idp_metadata_with_http_info(idp_id, body, opts = {}) ⇒ Array<(SamlMetadataImportResponse, Integer, Hash)>

Import SAML IdP metadata Import a metadata.xml originating from the federated SAML Identity Provider

Parameters:

  • idp_id (String)

    ID of the IDP

  • body (File)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • :parse_only (Boolean)

    If true, validates and parses the metadata without updating the Identity Provider. (default to false)

Returns:

  • (Array<(SamlMetadataImportResponse, Integer, Hash)>)

    SamlMetadataImportResponse data, response status code and response headers



388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 388

def (idp_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.import_saml_idp_metadata ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.import_saml_idp_metadata"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling IDPManagementApi.import_saml_idp_metadata"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}/saml/metadata'.sub('{idp_id}', CGI.escape(idp_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'parse_only'] = opts[:'parse_only'] if !opts[:'parse_only'].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']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['text/xml'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'Authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'SamlMetadataImportResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.import_saml_idp_metadata",
    :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: IDPManagementApi#import_saml_idp_metadata\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_consumer_accounts(idp_id, authorization, opts = {}) ⇒ ConsumersResponse

Get consumers of IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



452
453
454
455
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 452

def list_consumer_accounts(idp_id, authorization, opts = {})
  data, _status_code, _headers = list_consumer_accounts_with_http_info(idp_id, authorization, opts)
  data
end

#list_consumer_accounts_with_http_info(idp_id, authorization, opts = {}) ⇒ Array<(ConsumersResponse, Integer, Hash)>

Get consumers of IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ConsumersResponse, Integer, Hash)>)

    ConsumersResponse data, response status code and response headers



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
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 462

def list_consumer_accounts_with_http_info(idp_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.list_consumer_accounts ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.list_consumer_accounts"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.list_consumer_accounts"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}/consumers'.sub('{idp_id}', CGI.escape(idp_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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ConsumersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.list_consumer_accounts",
    :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: IDPManagementApi#list_consumer_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_idps(account_id, authorization, opts = {}) ⇒ ListIdps200Response

List IdPs

Parameters:

  • account_id (String)

    Account id to query

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_history (String)

    include history of the idp

Returns:



521
522
523
524
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 521

def list_idps(, authorization, opts = {})
  data, _status_code, _headers = list_idps_with_http_info(, authorization, opts)
  data
end

#list_idps_with_http_info(account_id, authorization, opts = {}) ⇒ Array<(ListIdps200Response, Integer, Hash)>

List IdPs

Parameters:

  • account_id (String)

    Account id to query

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_history (String)

    include history of the idp

Returns:

  • (Array<(ListIdps200Response, Integer, Hash)>)

    ListIdps200Response data, response status code and response headers



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
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 532

def list_idps_with_http_info(, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.list_idps ...'
  end
  # verify the required parameter 'account_id' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_id' when calling IDPManagementApi.list_idps"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.list_idps"
  end
  # resource path
  local_var_path = '/v1/idps/'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'account_id'] = 
  query_params[:'include_history'] = opts[:'include_history'] if !opts[:'include_history'].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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListIdps200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.list_idps",
    :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: IDPManagementApi#list_idps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#test_idp(idp_id, authorization, opts = {}) ⇒ TestTriggerResponse

Trigger IdP configuration test

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



592
593
594
595
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 592

def test_idp(idp_id, authorization, opts = {})
  data, _status_code, _headers = test_idp_with_http_info(idp_id, authorization, opts)
  data
end

#test_idp_with_http_info(idp_id, authorization, opts = {}) ⇒ Array<(TestTriggerResponse, Integer, Hash)>

Trigger IdP configuration test

Parameters:

  • idp_id (String)

    ID of the IDP

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TestTriggerResponse, Integer, Hash)>)

    TestTriggerResponse data, response status code and response headers



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
649
650
651
652
653
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 602

def test_idp_with_http_info(idp_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.test_idp ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.test_idp"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.test_idp"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}/test'.sub('{idp_id}', CGI.escape(idp_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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TestTriggerResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.test_idp",
    :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: IDPManagementApi#test_idp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_idp(idp_id, if_match, authorization, update_id_p_request, opts = {}) ⇒ Idp

Update IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • if_match (String)

    Version of the account IdP settings to be updated. Specify the version that you retrieved as entity_tag (ETag header) when reading the account. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • update_id_p_request (UpdateIdPRequest)

    Request to update idp

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :force_share_scope_update (Boolean)

    Enforces sharescope update even if active consumers are removed from the share scope

Returns:



663
664
665
666
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 663

def update_idp(idp_id, if_match, authorization, update_id_p_request, opts = {})
  data, _status_code, _headers = update_idp_with_http_info(idp_id, if_match, authorization, update_id_p_request, opts)
  data
end

#update_idp_with_http_info(idp_id, if_match, authorization, update_id_p_request, opts = {}) ⇒ Array<(Idp, Integer, Hash)>

Update IdP

Parameters:

  • idp_id (String)

    ID of the IDP

  • if_match (String)

    Version of the account IdP settings to be updated. Specify the version that you retrieved as entity_tag (ETag header) when reading the account. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.

  • authorization (String)

    Authorization Token used for the request. The supported token type is a Cloud IAM Access Token. If the token is omitted the request will fail with BXNIM0308E: 'No authorization header found'. Please make sure that the provided token has the required authority for the request.

  • update_id_p_request (UpdateIdPRequest)

    Request to update idp

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :force_share_scope_update (Boolean)

    Enforces sharescope update even if active consumers are removed from the share scope

Returns:

  • (Array<(Idp, Integer, Hash)>)

    Idp data, response status code and response headers



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
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/ibm_cloud_iam/api/idp_management_api.rb', line 676

def update_idp_with_http_info(idp_id, if_match, authorization, update_id_p_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IDPManagementApi.update_idp ...'
  end
  # verify the required parameter 'idp_id' is set
  if @api_client.config.client_side_validation && idp_id.nil?
    fail ArgumentError, "Missing the required parameter 'idp_id' when calling IDPManagementApi.update_idp"
  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 IDPManagementApi.update_idp"
  end
  # verify the required parameter 'authorization' is set
  if @api_client.config.client_side_validation && authorization.nil?
    fail ArgumentError, "Missing the required parameter 'authorization' when calling IDPManagementApi.update_idp"
  end
  # verify the required parameter 'update_id_p_request' is set
  if @api_client.config.client_side_validation && update_id_p_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_id_p_request' when calling IDPManagementApi.update_idp"
  end
  # resource path
  local_var_path = '/v1/idps/{idp_id}'.sub('{idp_id}', CGI.escape(idp_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'force_share_scope_update'] = opts[:'force_share_scope_update'] if !opts[:'force_share_scope_update'].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']
  # 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'] = authorization

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_id_p_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Idp'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"IDPManagementApi.update_idp",
    :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: IDPManagementApi#update_idp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end