Class: IbmCloudIam::AccountSettingsTemplateApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AccountSettingsTemplateApi

Returns a new instance of AccountSettingsTemplateApi.



19
20
21
# File 'lib/ibm_cloud_iam/api/account_settings_template_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/account_settings_template_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#commit_account_settings_template(template_id, version, authorization, opts = {}) ⇒ nil

Commit a template version Commit a specific version of an account settings template in an Enterprise Account. A Template must be committed before being assigned, and once committed, can no longer be modified.

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 29

def (template_id, version, authorization, opts = {})
  (template_id, version, authorization, opts)
  nil
end

#commit_account_settings_template_with_http_info(template_id, version, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Commit a template version Commit a specific version of an account settings template in an Enterprise Account. A Template must be committed before being assigned, and once committed, can no longer be modified.

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. 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



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
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 41

def (template_id, version, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.commit_account_settings_template ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountSettingsTemplateApi.commit_account_settings_template"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling AccountSettingsTemplateApi.commit_account_settings_template"
  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 AccountSettingsTemplateApi.commit_account_settings_template"
  end
  # resource path
  local_var_path = '/v1/account_settings_templates/{template_id}/versions/{version}/commit'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.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 => :"AccountSettingsTemplateApi.commit_account_settings_template",
    :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: AccountSettingsTemplateApi#commit_account_settings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_account_settings_template(authorization, account_settings_template_request, opts = {}) ⇒ AccountSettingsTemplateResponse

Create an account settings template Create a new account settings template in an enterprise account.

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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create an account settings template.

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

    the optional parameters

Returns:



102
103
104
105
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 102

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

#create_account_settings_template_version(template_id, authorization, account_settings_template_request, opts = {}) ⇒ AccountSettingsTemplateResponse

Create a new version of an account settings template Create a new version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create new version of an account settings template

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

    the optional parameters

Returns:



178
179
180
181
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 178

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

#create_account_settings_template_version_with_http_info(template_id, authorization, account_settings_template_request, opts = {}) ⇒ Array<(AccountSettingsTemplateResponse, Integer, Hash)>

Create a new version of an account settings template Create a new version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create new version of an account settings template

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

    the optional parameters

Returns:



190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 190

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

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

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

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

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

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

#create_account_settings_template_with_http_info(authorization, account_settings_template_request, opts = {}) ⇒ Array<(AccountSettingsTemplateResponse, Integer, Hash)>

Create an account settings template Create a new account settings template in an enterprise account.

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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create an account settings template.

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

    the optional parameters

Returns:



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
163
164
165
166
167
168
169
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 113

def (authorization, , opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.create_account_settings_template ...'
  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 AccountSettingsTemplateApi.create_account_settings_template"
  end
  # verify the required parameter 'account_settings_template_request' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'account_settings_template_request' when calling AccountSettingsTemplateApi.create_account_settings_template"
  end
  # resource path
  local_var_path = '/v1/account_settings_templates'

  # 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'] = authorization

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

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

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

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

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

#delete_account_settings_template_version(template_id, version, authorization, opts = {}) ⇒ nil

Delete version of an account settings template Delete a specific version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Returns:

  • (nil)


259
260
261
262
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 259

def (template_id, version, authorization, opts = {})
  (template_id, version, authorization, opts)
  nil
end

#delete_account_settings_template_version_with_http_info(template_id, version, authorization, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete version of an account settings template Delete a specific version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. 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



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 271

def (template_id, version, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.delete_account_settings_template_version ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountSettingsTemplateApi.delete_account_settings_template_version"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling AccountSettingsTemplateApi.delete_account_settings_template_version"
  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 AccountSettingsTemplateApi.delete_account_settings_template_version"
  end
  # resource path
  local_var_path = '/v1/account_settings_templates/{template_id}/versions/{version}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.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 => :"AccountSettingsTemplateApi.delete_account_settings_template_version",
    :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: AccountSettingsTemplateApi#delete_account_settings_template_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_all_versions_of_account_settings_template(template_id, authorization, opts = {}) ⇒ nil

Delete all versions of an account settings template Delete all versions of an account settings template in an enterprise account. If any version is assigned to child accounts, you must first delete the assignment.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Returns:

  • (nil)


332
333
334
335
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 332

def (template_id, authorization, opts = {})
  (template_id, authorization, opts)
  nil
end

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

Delete all versions of an account settings template Delete all versions of an account settings template in an enterprise account. If any version is assigned to child accounts, you must first delete the assignment.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. 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



343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 343

def (template_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.delete_all_versions_of_account_settings_template ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountSettingsTemplateApi.delete_all_versions_of_account_settings_template"
  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 AccountSettingsTemplateApi.delete_all_versions_of_account_settings_template"
  end
  # resource path
  local_var_path = '/v1/account_settings_templates/{template_id}'.sub('{template_id}', CGI.escape(template_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 => :"AccountSettingsTemplateApi.delete_all_versions_of_account_settings_template",
    :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: AccountSettingsTemplateApi#delete_all_versions_of_account_settings_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_account_settings_template_version(template_id, version, authorization, opts = {}) ⇒ AccountSettingsTemplateResponse

Get version of an account settings template Get a specific version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. 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 (Boolean)

    Defines if the entity history is included in the response (default to false)

Returns:



402
403
404
405
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 402

def (template_id, version, authorization, opts = {})
  data, _status_code, _headers = (template_id, version, authorization, opts)
  data
end

#get_account_settings_template_version_with_http_info(template_id, version, authorization, opts = {}) ⇒ Array<(AccountSettingsTemplateResponse, Integer, Hash)>

Get version of an account settings template Get a specific version of an account settings template in an Enterprise Account

Parameters:

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. 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 (Boolean)

    Defines if the entity history is included in the response (default to false)

Returns:



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
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
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 415

def (template_id, version, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.get_account_settings_template_version ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountSettingsTemplateApi.get_account_settings_template_version"
  end
  # verify the required parameter 'version' is set
  if @api_client.config.client_side_validation && version.nil?
    fail ArgumentError, "Missing the required parameter 'version' when calling AccountSettingsTemplateApi.get_account_settings_template_version"
  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 AccountSettingsTemplateApi.get_account_settings_template_version"
  end
  # resource path
  local_var_path = '/v1/account_settings_templates/{template_id}/versions/{version}'.sub('{template_id}', CGI.escape(template_id.to_s)).sub('{version}', CGI.escape(version.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] || 'AccountSettingsTemplateResponse'

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

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

#get_latest_account_settings_template_version(template_id, authorization, opts = {}) ⇒ AccountSettingsTemplateResponse

Get latest version of an account settings template Get the latest version of a specific account settings template in an enterprise account.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. 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 (Boolean)

    Defines if the entity history is included in the response (default to false)

Returns:



480
481
482
483
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 480

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

#get_latest_account_settings_template_version_with_http_info(template_id, authorization, opts = {}) ⇒ Array<(AccountSettingsTemplateResponse, Integer, Hash)>

Get latest version of an account settings template Get the latest version of a specific account settings template in an enterprise account.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. 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 (Boolean)

    Defines if the entity history is included in the response (default to false)

Returns:



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

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

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

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

#list_account_settings_templates(authorization, opts = {}) ⇒ AccountSettingsTemplateList

List account settings templates List account settings templates in an enterprise account

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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Account ID of the account settings templates to query. This parameter is required unless using a pagetoken.

  • :limit (String)

    Optional size of a single page. (default to '20')

  • :pagetoken (String)

    Optional Prev or Next page token returned from a previous query execution. Default is start with first page.

  • :sort (String)

    Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')

  • :order (String)

    Optional sort order. (default to 'asc')

  • :include_history (String)

    Defines if the entity history is included in the response (default to 'false')

Returns:



557
558
559
560
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 557

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

#list_account_settings_templates_with_http_info(authorization, opts = {}) ⇒ Array<(AccountSettingsTemplateList, Integer, Hash)>

List account settings templates List account settings templates in an enterprise account

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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Options Hash (opts):

  • :account_id (String)

    Account ID of the account settings templates to query. This parameter is required unless using a pagetoken.

  • :limit (String)

    Optional size of a single page. (default to '20')

  • :pagetoken (String)

    Optional Prev or Next page token returned from a previous query execution. Default is start with first page.

  • :sort (String)

    Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')

  • :order (String)

    Optional sort order. (default to 'asc')

  • :include_history (String)

    Defines if the entity history is included in the response (default to 'false')

Returns:

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

    AccountSettingsTemplateList data, response status code and response headers



573
574
575
576
577
578
579
580
581
582
583
584
585
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
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 573

def (authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.list_account_settings_templates ...'
  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 AccountSettingsTemplateApi.list_account_settings_templates"
  end
  allowable_values = ["created_at", "last_modified_at", "name"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  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/account_settings_templates'

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

  # 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] || 'AccountSettingsTemplateList'

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

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

#list_versions_of_account_settings_template(template_id, authorization, opts = {}) ⇒ AccountSettingsTemplateList

List account settings template versions List the versions of a specific account settings template in an enterprise account.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Options Hash (opts):

  • :limit (String)

    Optional size of a single page. (default to '20')

  • :pagetoken (String)

    Optional Prev or Next page token returned from a previous query execution. Default is start with first page.

  • :sort (String)

    Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')

  • :order (String)

    Optional sort order. (default to 'asc')

  • :include_history (String)

    Defines if the entity history is included in the response (default to 'false')

Returns:



647
648
649
650
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 647

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

#list_versions_of_account_settings_template_with_http_info(template_id, authorization, opts = {}) ⇒ Array<(AccountSettingsTemplateList, Integer, Hash)>

List account settings template versions List the versions of a specific account settings template in an enterprise account.

Parameters:

  • template_id (String)

    ID of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

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

    the optional parameters

Options Hash (opts):

  • :limit (String)

    Optional size of a single page. (default to '20')

  • :pagetoken (String)

    Optional Prev or Next page token returned from a previous query execution. Default is start with first page.

  • :sort (String)

    Optional sort property. If specified, the returned templated are sorted according to this property (default to 'created_at')

  • :order (String)

    Optional sort order. (default to 'asc')

  • :include_history (String)

    Defines if the entity history is included in the response (default to 'false')

Returns:

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

    AccountSettingsTemplateList data, response status code and response headers



663
664
665
666
667
668
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
725
726
727
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 663

def (template_id, authorization, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AccountSettingsTemplateApi.list_versions_of_account_settings_template ...'
  end
  # verify the required parameter 'template_id' is set
  if @api_client.config.client_side_validation && template_id.nil?
    fail ArgumentError, "Missing the required parameter 'template_id' when calling AccountSettingsTemplateApi.list_versions_of_account_settings_template"
  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 AccountSettingsTemplateApi.list_versions_of_account_settings_template"
  end
  allowable_values = ["created_at", "last_modified_at", "name"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  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/account_settings_templates/{template_id}/versions'.sub('{template_id}', CGI.escape(template_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'pagetoken'] = opts[:'pagetoken'] if !opts[:'pagetoken'].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?

  # 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] || 'AccountSettingsTemplateList'

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

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

#update_account_settings_template_version(if_match, template_id, version, authorization, account_settings_template_request, opts = {}) ⇒ AccountSettingsTemplateResponse

Update version of an account settings template Update a specific version of an account settings template in an Enterprise Account

Parameters:

  • if_match (String)

    Entity tag of the Template to be updated. Specify the tag that you retrieved when reading the account settings template. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create an account settings template.

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

    the optional parameters

Returns:



738
739
740
741
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 738

def (if_match, template_id, version, authorization, , opts = {})
  data, _status_code, _headers = (if_match, template_id, version, authorization, , opts)
  data
end

#update_account_settings_template_version_with_http_info(if_match, template_id, version, authorization, account_settings_template_request, opts = {}) ⇒ Array<(AccountSettingsTemplateResponse, Integer, Hash)>

Update version of an account settings template Update a specific version of an account settings template in an Enterprise Account

Parameters:

  • if_match (String)

    Entity tag of the Template to be updated. Specify the tag that you retrieved when reading the account settings template. This value helps identifying parallel usage of this API. Pass * to indicate to update any version available. This might result in stale updates.

  • template_id (String)

    ID of the account settings template

  • version (String)

    Version of the account settings template

  • 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'. Make sure that the provided token has the required authority for the request.

  • account_settings_template_request (AccountSettingsTemplateRequest)

    Request to create an account settings template.

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

    the optional parameters

Returns:



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
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
# File 'lib/ibm_cloud_iam/api/account_settings_template_api.rb', line 752

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

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

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

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

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

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