Class: Falcon::CloudOciRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/cloud_oci_registration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CloudOciRegistration

Returns a new instance of CloudOciRegistration.



36
37
38
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 36

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#cloud_security_registration_oci_create_account(body, opts = {}) ⇒ DomainOCITenancyCreateResponseExtV1

Create OCI tenancy account in CSPM

Parameters:

Returns:



43
44
45
46
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 43

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

#cloud_security_registration_oci_create_account_with_http_info(body, opts = {}) ⇒ Array<(DomainOCITenancyCreateResponseExtV1, Integer, Hash)>

Create OCI tenancy account in CSPM

Parameters:

Returns:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 52

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_create_account ...'
  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 CloudOciRegistration.cloud_security_registration_oci_create_account"
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/accounts/v1'

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

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

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

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

#cloud_security_registration_oci_delete_account(opts = {}) ⇒ MsaspecResponseFields

Delete an existing OCI tenancy in CSPM.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    OCI tenancy ocids to remove

Returns:



109
110
111
112
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 109

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

#cloud_security_registration_oci_delete_account_with_http_info(opts = {}) ⇒ Array<(MsaspecResponseFields, Integer, Hash)>

Delete an existing OCI tenancy in CSPM.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    OCI tenancy ocids to remove

Returns:

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

    MsaspecResponseFields data, response status code and response headers



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
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 118

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_delete_account ...'
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/accounts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

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

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

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

#cloud_security_registration_oci_download_script(body, opts = {}) ⇒ DomainOCIProvisionGetAccountScriptResponseV1

Retrieve script to create resources in tenancy OCID

Parameters:

Returns:



167
168
169
170
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 167

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

#cloud_security_registration_oci_download_script_with_http_info(body, opts = {}) ⇒ Array<(DomainOCIProvisionGetAccountScriptResponseV1, Integer, Hash)>

Retrieve script to create resources in tenancy OCID

Parameters:

Returns:



176
177
178
179
180
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
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 176

def cloud_security_registration_oci_download_script_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_download_script ...'
  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 CloudOciRegistration.cloud_security_registration_oci_download_script"
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/scripts/v1'

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

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

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

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

#cloud_security_registration_oci_get_account(opts = {}) ⇒ DomainOCITenancyResponseExtV1

Retrieve a list of OCI tenancies with support for FQL filtering, sorting, and pagination

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL (Falcon Query Language) string for filtering results. Allowed filters are Setoverall_status, created_at, updated_at, tenancy_ocid, tenancy_name, home_region

  • :sort (String)

    Field and direction for sorting results - allowed sort fields are Setcreated_at, updated_at, tenancy_ocid, tenancy_name, home_region, key_age

  • :next_token (String)

    Token for cursor-based pagination. Currently unsupported.

  • :limit (Integer)

    Maximum number of records to return (default: 100, max: 10000) (default to 100)

  • :offset (Integer)

    Starting index of result (default to 0)

Returns:



237
238
239
240
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 237

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

#cloud_security_registration_oci_get_account_with_http_info(opts = {}) ⇒ Array<(DomainOCITenancyResponseExtV1, Integer, Hash)>

Retrieve a list of OCI tenancies with support for FQL filtering, sorting, and pagination

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    FQL (Falcon Query Language) string for filtering results. Allowed filters are Setoverall_status, created_at, updated_at, tenancy_ocid, tenancy_name, home_region

  • :sort (String)

    Field and direction for sorting results - allowed sort fields are Setcreated_at, updated_at, tenancy_ocid, tenancy_name, home_region, key_age

  • :next_token (String)

    Token for cursor-based pagination. Currently unsupported.

  • :limit (Integer)

    Maximum number of records to return (default: 100, max: 10000) (default to 100)

  • :offset (Integer)

    Starting index of result (default to 0)

Returns:



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
300
301
302
303
304
305
306
307
308
309
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 250

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_get_account ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudOciRegistration.cloud_security_registration_oci_get_account, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CloudOciRegistration.cloud_security_registration_oci_get_account, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling CloudOciRegistration.cloud_security_registration_oci_get_account, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/cloud-security-registration-oci/combined/accounts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

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

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

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

#cloud_security_registration_oci_rotate_key(body, opts = {}) ⇒ DomainOCITenancyRotateKeyResponseExtV1

Refresh key for the OCI Tenancy

Parameters:

Returns:



315
316
317
318
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 315

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

#cloud_security_registration_oci_rotate_key_with_http_info(body, opts = {}) ⇒ Array<(DomainOCITenancyRotateKeyResponseExtV1, Integer, Hash)>

Refresh key for the OCI Tenancy

Parameters:

Returns:



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
366
367
368
369
370
371
372
373
374
375
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 324

def cloud_security_registration_oci_rotate_key_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_rotate_key ...'
  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 CloudOciRegistration.cloud_security_registration_oci_rotate_key"
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/account-rotate-keys/v1'

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

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

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

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

#cloud_security_registration_oci_update_account(body, opts = {}) ⇒ DomainOCITenancyUpdateResponseExtV1

Patch an existing OCI account in our system for a customer.

Parameters:

Returns:



381
382
383
384
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 381

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

#cloud_security_registration_oci_update_account_with_http_info(body, opts = {}) ⇒ Array<(DomainOCITenancyUpdateResponseExtV1, Integer, Hash)>

Patch an existing OCI account in our system for a customer.

Parameters:

Returns:



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
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 390

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_update_account ...'
  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 CloudOciRegistration.cloud_security_registration_oci_update_account"
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/accounts/v1'

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

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

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

  new_options = opts.merge(
    :operation => :"CloudOciRegistration.cloud_security_registration_oci_update_account",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CloudOciRegistration#cloud_security_registration_oci_update_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#cloud_security_registration_oci_validate_tenancy(body, opts = {}) ⇒ DomainOCITenancyValidationResponse

Validate the OCI account in CSPM for a provided CID. For internal clients only.

Parameters:

Returns:



447
448
449
450
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 447

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

#cloud_security_registration_oci_validate_tenancy_with_http_info(body, opts = {}) ⇒ Array<(DomainOCITenancyValidationResponse, Integer, Hash)>

Validate the OCI account in CSPM for a provided CID. For internal clients only.

Parameters:

Returns:



456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# File 'lib/crimson-falcon/api/cloud_oci_registration.rb', line 456

def cloud_security_registration_oci_validate_tenancy_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudOciRegistration.cloud_security_registration_oci_validate_tenancy ...'
  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 CloudOciRegistration.cloud_security_registration_oci_validate_tenancy"
  end
  # resource path
  local_var_path = '/cloud-security-registration-oci/entities/account-validate/v1'

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

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

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

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