Class: Falcon::CspmRegistrationApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CspmRegistrationApi

Returns a new instance of CspmRegistrationApi.



36
37
38
# File 'lib/crimson-falcon/api/cspm_registration_api.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/cspm_registration_api.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#azure_download_certificate(tenant_id, opts = {}) ⇒ RegistrationAzureDownloadCertificateResponseV1

Returns JSON object(s) that contain the base64 encoded certificate for a service principal.

Parameters:

  • tenant_id (Array<String>)

    Azure Tenant ID

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Setting to true will invalidate the current certificate and generate a new certificate (default to false)

  • :years_valid (String)

    Years the certificate should be valid (only used when refresh&#x3D;true)

Returns:



45
46
47
48
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 45

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

#azure_download_certificate_with_http_info(tenant_id, opts = {}) ⇒ Array<(RegistrationAzureDownloadCertificateResponseV1, Integer, Hash)>

Returns JSON object(s) that contain the base64 encoded certificate for a service principal.

Parameters:

  • tenant_id (Array<String>)

    Azure Tenant ID

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

    the optional parameters

Options Hash (opts):

  • :refresh (Boolean)

    Setting to true will invalidate the current certificate and generate a new certificate (default to false)

  • :years_valid (String)

    Years the certificate should be valid (only used when refresh&#x3D;true)

Returns:



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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 56

def azure_download_certificate_with_http_info(tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.azure_download_certificate ...'
  end
  # verify the required parameter 'tenant_id' is set
  if @api_client.config.client_side_validation && tenant_id.nil?
    fail ArgumentError, "Missing the required parameter 'tenant_id' when calling CspmRegistrationApi.azure_download_certificate"
  end
  if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length > 2
    fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistrationApi.azure_download_certificate, the character length must be smaller than or equal to 2.'
  end

  if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'].to_s.length < 1
    fail ArgumentError, 'invalid value for "opts[:"years_valid"]" when calling CspmRegistrationApi.azure_download_certificate, the character length must be great than or equal to 1.'
  end

  pattern = Regexp.new(/^[0-9]{1,2}$/)
  if @api_client.config.client_side_validation && !opts[:'years_valid'].nil? && opts[:'years_valid'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"years_valid\"]' when calling CspmRegistrationApi.azure_download_certificate, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/download-certificate/v1'

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

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

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

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

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

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

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

#connect_cspmgcp_account(body, opts = {}) ⇒ RegistrationGCPAccountResponseExtV2

Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id

Parameters:

Returns:



124
125
126
127
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 124

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

#connect_cspmgcp_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationGCPAccountResponseExtV2, Integer, Hash)>

Creates a new GCP account with newly-uploaded service account or connects with existing service account with only the following fields: parent_id, parent_type and service_account_id

Parameters:

Returns:



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 133

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.connect_cspmgcp_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 CspmRegistrationApi.connect_cspmgcp_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/account/v2'

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

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

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

#create_cspm_aws_account(body, opts = {}) ⇒ RegistrationAWSAccountResponseV2

Creates a new account in our system for a customer and generates a script for them to run in their AWS cloud environment to grant us access.

Parameters:

Returns:



190
191
192
193
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 190

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

#create_cspm_aws_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationAWSAccountResponseV2, Integer, Hash)>

Creates a new account in our system for a customer and generates a script for them to run in their AWS cloud environment to grant us access.

Parameters:

Returns:



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/crimson-falcon/api/cspm_registration_api.rb', line 199

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspm_aws_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 CspmRegistrationApi.create_cspm_aws_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/account/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] || 'RegistrationAWSAccountResponseV2'

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

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

#create_cspm_azure_account(body, opts = {}) ⇒ RegistrationAzureAccountResponseV1

Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access.

Parameters:

Returns:



256
257
258
259
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 256

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

#create_cspm_azure_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>

Creates a new account in our system for a customer and generates a script for them to run in their cloud environment to grant us access.

Parameters:

Returns:



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
310
311
312
313
314
315
316
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 265

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspm_azure_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 CspmRegistrationApi.create_cspm_azure_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/account/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] || 'RegistrationAzureAccountResponseV1'

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

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

#create_cspm_azure_management_group(body, opts = {}) ⇒ RegistrationAzureAccountResponseV1

Creates a new management group in our system for a customer.

Parameters:

Returns:



322
323
324
325
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 322

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

#create_cspm_azure_management_group_with_http_info(body, opts = {}) ⇒ Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>

Creates a new management group in our system for a customer.

Parameters:

Returns:



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
376
377
378
379
380
381
382
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 331

def create_cspm_azure_management_group_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspm_azure_management_group ...'
  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 CspmRegistrationApi.create_cspm_azure_management_group"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/management-group/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] || 'RegistrationAzureAccountResponseV1'

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

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

#create_cspmgcp_account(body, opts = {}) ⇒ RegistrationGCPAccountResponseV1

Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access.

Parameters:

Returns:



388
389
390
391
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 388

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

#create_cspmgcp_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>

Creates a new account in our system for a customer and generates a new service account for them to add access to in their GCP environment to grant us access.

Parameters:

Returns:



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
446
447
448
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 397

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.create_cspmgcp_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 CspmRegistrationApi.create_cspmgcp_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'RegistrationGCPAccountResponseV1'

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

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

#delete_cspm_aws_account(opts = {}) ⇒ MsaBaseEntitiesResponse

Deletes an existing AWS account or organization in our system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs to remove

  • :organization_ids (Array<String>)

    AWS organization IDs to remove

Returns:



455
456
457
458
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 455

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

#delete_cspm_aws_account_with_http_info(opts = {}) ⇒ Array<(MsaBaseEntitiesResponse, Integer, Hash)>

Deletes an existing AWS account or organization in our system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs to remove

  • :organization_ids (Array<String>)

    AWS organization IDs to remove

Returns:

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

    MsaBaseEntitiesResponse data, response status code and response headers



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

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.delete_cspm_aws_account ...'
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/account/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'organization-ids'] = @api_client.build_collection_param(opts[:'organization_ids'], :multi) if !opts[:'organization_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] || 'MsaBaseEntitiesResponse'

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

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

#delete_cspm_azure_account(opts = {}) ⇒ MsaBaseEntitiesResponse

Deletes an Azure subscription from the system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    Azure subscription IDs to remove

  • :tenant_ids (Array<String>)

    Tenant ids to remove

  • :retain_tenant (String)

Returns:



517
518
519
520
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 517

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

#delete_cspm_azure_account_with_http_info(opts = {}) ⇒ Array<(MsaBaseEntitiesResponse, Integer, Hash)>

Deletes an Azure subscription from the system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    Azure subscription IDs to remove

  • :tenant_ids (Array<String>)

    Tenant ids to remove

  • :retain_tenant (String)

Returns:

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

    MsaBaseEntitiesResponse data, response status code and response headers



528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 528

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.delete_cspm_azure_account ...'
  end
  if @api_client.config.client_side_validation && !opts[:'retain_tenant'].nil? && opts[:'retain_tenant'].to_s.length > 5
    fail ArgumentError, 'invalid value for "opts[:"retain_tenant"]" when calling CspmRegistrationApi.delete_cspm_azure_account, the character length must be smaller than or equal to 5.'
  end

  if @api_client.config.client_side_validation && !opts[:'retain_tenant'].nil? && opts[:'retain_tenant'].to_s.length < 4
    fail ArgumentError, 'invalid value for "opts[:"retain_tenant"]" when calling CspmRegistrationApi.delete_cspm_azure_account, the character length must be great than or equal to 4.'
  end

  pattern = Regexp.new(/^(true|false)$/)
  if @api_client.config.client_side_validation && !opts[:'retain_tenant'].nil? && opts[:'retain_tenant'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"retain_tenant\"]' when calling CspmRegistrationApi.delete_cspm_azure_account, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/account/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'tenant_ids'] = @api_client.build_collection_param(opts[:'tenant_ids'], :multi) if !opts[:'tenant_ids'].nil?
  query_params[:'retain_tenant'] = opts[:'retain_tenant'] if !opts[:'retain_tenant'].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] || 'MsaBaseEntitiesResponse'

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

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

#delete_cspmgcp_account(opts = {}) ⇒ MsaBaseEntitiesResponse

Deletes a GCP account from the system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

Returns:



592
593
594
595
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 592

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

#delete_cspmgcp_account_with_http_info(opts = {}) ⇒ Array<(MsaBaseEntitiesResponse, Integer, Hash)>

Deletes a GCP account from the system.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

Returns:

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

    MsaBaseEntitiesResponse data, response status code and response headers



601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 601

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.delete_cspmgcp_account ...'
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'MsaBaseEntitiesResponse'

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

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

#get_behavior_detections(opts = {}) ⇒ RegistrationExternalIOAEventResponse

Get list of detected behaviors

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_provider (String)

    Cloud Provider (e.g.: aws|azure)

  • :service (String)

    Cloud Service (e.g. EC2 | EBS | S3)

  • :account_id (String)

    Cloud Account ID (e.g.: AWS accountID, Azure subscriptionID)

  • :aws_account_id (String)

    AWS Account ID

  • :azure_subscription_id (String)

    Azure Subscription ID

  • :azure_tenant_id (String)

    Azure Tenant ID

  • :state (String)

    State (e.g.: open | closed)

  • :date_time_since (String)

    Filter to get all events after this date, in format RFC3339 : e.g. 2006-01-02T15:04:05Z07:00

  • :since (String)

    Filter events using a duration string (e.g. 24h) (default to ‘24h’)

  • :severity (String)

    Policy Severity

  • :next_token (String)

    String to get next page of results, is associated with a previous execution of GetBehaviorDetections. Must include all filters from previous execution.

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :resource_id (Array<String>)

    Resource ID

  • :resource_uuid (Array<String>)

    Resource UUID

Returns:



663
664
665
666
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 663

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

#get_behavior_detections_with_http_info(opts = {}) ⇒ Array<(RegistrationExternalIOAEventResponse, Integer, Hash)>

Get list of detected behaviors

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_provider (String)

    Cloud Provider (e.g.: aws|azure)

  • :service (String)

    Cloud Service (e.g. EC2 | EBS | S3)

  • :account_id (String)

    Cloud Account ID (e.g.: AWS accountID, Azure subscriptionID)

  • :aws_account_id (String)

    AWS Account ID

  • :azure_subscription_id (String)

    Azure Subscription ID

  • :azure_tenant_id (String)

    Azure Tenant ID

  • :state (String)

    State (e.g.: open | closed)

  • :date_time_since (String)

    Filter to get all events after this date, in format RFC3339 : e.g. 2006-01-02T15:04:05Z07:00

  • :since (String)

    Filter events using a duration string (e.g. 24h) (default to ‘24h’)

  • :severity (String)

    Policy Severity

  • :next_token (String)

    String to get next page of results, is associated with a previous execution of GetBehaviorDetections. Must include all filters from previous execution.

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :resource_id (Array<String>)

    Resource ID

  • :resource_uuid (Array<String>)

    Resource UUID

Returns:



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
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 685

def get_behavior_detections_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_behavior_detections ...'
  end
  allowable_values = ["aws", "azure"]
  if @api_client.config.client_side_validation && opts[:'cloud_provider'] && !allowable_values.include?(opts[:'cloud_provider'])
    fail ArgumentError, "invalid value for \"cloud_provider\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^(aws|azure)$/)
  if @api_client.config.client_side_validation && !opts[:'cloud_provider'].nil? && opts[:'cloud_provider'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"cloud_provider\"]' when calling CspmRegistrationApi.get_behavior_detections, must conform to the pattern #{pattern}."
  end

  allowable_values = ["ACM", "ACR", "Any", "App Engine", "AppService", "BigQuery", "Cloud Load Balancing", "Cloud Logging", "Cloud SQL", "Cloud Storage", "CloudFormation", "CloudTrail", "CloudWatch Logs", "Cloudfront", "Compute Engine", "Config", "Disk", "DynamoDB", "EBS", "EC2", "ECR", "EFS", "EKS", "ELB", "EMR", "Elasticache", "GuardDuty", "IAM", "Identity", "KMS", "KeyVault", "Kinesis", "Kubernetes", "Lambda", "LoadBalancer", "Monitor", "NLB/ALB", "NetworkSecurityGroup", "PostgreSQL", "RDS", "Redshift", "S3", "SES", "SNS", "SQLDatabase", "SQLServer", "SQS", "SSM", "Serverless Application Repository", "StorageAccount", "Subscriptions", "VPC", "VirtualMachine", "VirtualNetwork"]
  if @api_client.config.client_side_validation && opts[:'service'] && !allowable_values.include?(opts[:'service'])
    fail ArgumentError, "invalid value for \"service\", must be one of #{allowable_values}"
  end
  allowable_values = ["closed", "open"]
  if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state'])
    fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}"
  end
  allowable_values = ["Critical", "High", "Informational", "Medium"]
  if @api_client.config.client_side_validation && opts[:'severity'] && !allowable_values.include?(opts[:'severity'])
    fail ArgumentError, "invalid value for \"severity\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^\d+$/)
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"limit\"]' when calling CspmRegistrationApi.get_behavior_detections, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/detects/entities/ioa/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cloud_provider'] = opts[:'cloud_provider'] if !opts[:'cloud_provider'].nil?
  query_params[:'service'] = opts[:'service'] if !opts[:'service'].nil?
  query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'aws_account_id'] = opts[:'aws_account_id'] if !opts[:'aws_account_id'].nil?
  query_params[:'azure_subscription_id'] = opts[:'azure_subscription_id'] if !opts[:'azure_subscription_id'].nil?
  query_params[:'azure_tenant_id'] = opts[:'azure_tenant_id'] if !opts[:'azure_tenant_id'].nil?
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
  query_params[:'date_time_since'] = opts[:'date_time_since'] if !opts[:'date_time_since'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'severity'] = opts[:'severity'] if !opts[:'severity'].nil?
  query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'resource_id'] = @api_client.build_collection_param(opts[:'resource_id'], :multi) if !opts[:'resource_id'].nil?
  query_params[:'resource_uuid'] = @api_client.build_collection_param(opts[:'resource_uuid'], :multi) if !opts[:'resource_uuid'].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] || 'RegistrationExternalIOAEventResponse'

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

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

#get_configuration_detection_entities(ids, opts = {}) ⇒ RegistrationExternalIOMEventResponseV2

Get misconfigurations based on the ID - including custom policy detections in addition to default policy detections.

Parameters:

  • ids (Array<String>)

    detection ids

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

    the optional parameters

Returns:



773
774
775
776
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 773

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

#get_configuration_detection_entities_with_http_info(ids, opts = {}) ⇒ Array<(RegistrationExternalIOMEventResponseV2, Integer, Hash)>

Get misconfigurations based on the ID - including custom policy detections in addition to default policy detections.

Parameters:

  • ids (Array<String>)

    detection ids

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

    the optional parameters

Returns:



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
822
823
824
825
826
827
828
829
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 782

def get_configuration_detection_entities_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_configuration_detection_entities ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling CspmRegistrationApi.get_configuration_detection_entities"
  end
  # resource path
  local_var_path = '/detects/entities/iom/v2'

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

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

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

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

#get_configuration_detection_ids_v2(opts = {}) ⇒ RegistrationIOMEventIDsResponseV2

Get list of active misconfiguration ids - including custom policy detections in addition to default policy detections.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    use_current_scan_ids - *use this to get records for latest scans* account_name account_id agent_id attack_types azure_subscription_id cloud_provider cloud_service_keyword custom_policy_id is_managed policy_id policy_type resource_id region status scan_time severity severity_string

  • :sort (String)

    account_name account_id attack_types azure_subscription_id cloud_provider cloud_service_keyword status is_managed policy_id policy_type resource_id region scan_time severity severity_string timestamp (default to ‘timestamp|desc’)

  • :limit (Integer)

    The max number of detections to return (default to 500)

  • :offset (Integer)

    Offset returned detections. Cannot be combined with next_token filter

  • :next_token (String)

    String to get next page of results. Cannot be combined with any filter except limit.

Returns:



839
840
841
842
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 839

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

#get_configuration_detection_ids_v2_with_http_info(opts = {}) ⇒ Array<(RegistrationIOMEventIDsResponseV2, Integer, Hash)>

Get list of active misconfiguration ids - including custom policy detections in addition to default policy detections.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    use_current_scan_ids - *use this to get records for latest scans* account_name account_id agent_id attack_types azure_subscription_id cloud_provider cloud_service_keyword custom_policy_id is_managed policy_id policy_type resource_id region status scan_time severity severity_string

  • :sort (String)

    account_name account_id attack_types azure_subscription_id cloud_provider cloud_service_keyword status is_managed policy_id policy_type resource_id region scan_time severity severity_string timestamp (default to ‘timestamp|desc’)

  • :limit (Integer)

    The max number of detections to return (default to 500)

  • :offset (Integer)

    Offset returned detections. Cannot be combined with next_token filter

  • :next_token (String)

    String to get next page of results. Cannot be combined with any filter except limit.

Returns:



852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 852

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

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 0
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CspmRegistrationApi.get_configuration_detection_ids_v2, 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 CspmRegistrationApi.get_configuration_detection_ids_v2, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/detects/queries/iom/v2'

  # 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[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].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] || 'RegistrationIOMEventIDsResponseV2'

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

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

#get_configuration_detections(opts = {}) ⇒ RegistrationExternalIOMEventResponse

Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_provider (String)

    Cloud Provider (e.g.: aws|azure|gcp)

  • :account_id (String)

    AWS account ID or GCP Project Number or Azure subscription ID

  • :azure_subscription_id (String)

    Azure Subscription ID

  • :azure_tenant_id (String)

    Azure Tenant ID

  • :status (String)

    Status (e.g.: new|reoccurring|all)

  • :region (String)

    Cloud Provider Region

  • :severity (String)

    Policy Severity

  • :service (String)

    Cloud Service (e.g.: EBS|EC2|S3 etc.)

  • :next_token (String)

    String to get next page of results, is associated with a previous execution of GetConfigurationDetections. Cannot be combined with any filter except limit.

  • :limit (Integer)

    The maximum records to return. [1-500]

Returns:



926
927
928
929
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 926

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

#get_configuration_detections_with_http_info(opts = {}) ⇒ Array<(RegistrationExternalIOMEventResponse, Integer, Hash)>

Get list of active misconfigurations. This endpoint is deprecated, please use /queries/iom/v2 and /entities/iom/v2 instead

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_provider (String)

    Cloud Provider (e.g.: aws|azure|gcp)

  • :account_id (String)

    AWS account ID or GCP Project Number or Azure subscription ID

  • :azure_subscription_id (String)

    Azure Subscription ID

  • :azure_tenant_id (String)

    Azure Tenant ID

  • :status (String)

    Status (e.g.: new|reoccurring|all)

  • :region (String)

    Cloud Provider Region

  • :severity (String)

    Policy Severity

  • :service (String)

    Cloud Service (e.g.: EBS|EC2|S3 etc.)

  • :next_token (String)

    String to get next page of results, is associated with a previous execution of GetConfigurationDetections. Cannot be combined with any filter except limit.

  • :limit (Integer)

    The maximum records to return. [1-500]

Returns:



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 944

def get_configuration_detections_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_configuration_detections ...'
  end
  allowable_values = ["aws", "azure", "gcp"]
  if @api_client.config.client_side_validation && opts[:'cloud_provider'] && !allowable_values.include?(opts[:'cloud_provider'])
    fail ArgumentError, "invalid value for \"cloud_provider\", must be one of #{allowable_values}"
  end
  allowable_values = ["all", "new", "reoccurring"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^[0-9a-z\-_]{2,}$/)
  if @api_client.config.client_side_validation && !opts[:'region'].nil? && opts[:'region'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"region\"]' when calling CspmRegistrationApi.get_configuration_detections, must conform to the pattern #{pattern}."
  end

  allowable_values = ["Critical", "High", "Informational", "Medium"]
  if @api_client.config.client_side_validation && opts[:'severity'] && !allowable_values.include?(opts[:'severity'])
    fail ArgumentError, "invalid value for \"severity\", must be one of #{allowable_values}"
  end
  allowable_values = ["ACM", "ACR", "Any", "App Engine", "AppService", "BigQuery", "Cloud Load Balancing", "Cloud Logging", "Cloud SQL", "Cloud Storage", "CloudFormation", "CloudTrail", "CloudWatch Logs", "Cloudfront", "Compute Engine", "Config", "Disk", "DynamoDB", "EBS", "EC2", "ECR", "EFS", "EKS", "ELB", "EMR", "Elasticache", "GuardDuty", "IAM", "Identity", "KMS", "KeyVault", "Kinesis", "Kubernetes", "Lambda", "LoadBalancer", "Monitor", "NLB/ALB", "NetworkSecurityGroup", "PostgreSQL", "RDS", "Redshift", "S3", "SES", "SNS", "SQLDatabase", "SQLServer", "SQS", "SSM", "Serverless Application Repository", "StorageAccount", "Subscriptions", "VPC", "VirtualMachine", "VirtualNetwork"]
  if @api_client.config.client_side_validation && opts[:'service'] && !allowable_values.include?(opts[:'service'])
    fail ArgumentError, "invalid value for \"service\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^\d+$/)
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"limit\"]' when calling CspmRegistrationApi.get_configuration_detections, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/detects/entities/iom/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cloud_provider'] = opts[:'cloud_provider'] if !opts[:'cloud_provider'].nil?
  query_params[:'account_id'] = opts[:'account_id'] if !opts[:'account_id'].nil?
  query_params[:'azure_subscription_id'] = opts[:'azure_subscription_id'] if !opts[:'azure_subscription_id'].nil?
  query_params[:'azure_tenant_id'] = opts[:'azure_tenant_id'] if !opts[:'azure_tenant_id'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'region'] = opts[:'region'] if !opts[:'region'].nil?
  query_params[:'severity'] = opts[:'severity'] if !opts[:'severity'].nil?
  query_params[:'service'] = opts[:'service'] if !opts[:'service'].nil?
  query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'RegistrationExternalIOMEventResponse'

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

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

#get_cspm_aws_account(opts = {}) ⇒ RegistrationAWSAccountResponseV2

Returns information about the current status of an AWS account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :ids (Array<String>)

    AWS account IDs

  • :iam_role_arns (Array<String>)

    AWS IAM role ARNs

  • :organization_ids (Array<String>)

    AWS organization IDs

  • :status (String)

    Account status to filter results by.

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :cspm_lite (String)

    Only return CSPM Lite accounts

  • :migrated (String)

    Only return migrated d4c accounts

  • :offset (Integer)

    The offset to start retrieving records from

  • :group_by (String)

    Field to group by.

Returns:



1037
1038
1039
1040
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1037

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

#get_cspm_aws_account_scripts_attachment(opts = {}) ⇒ RegistrationAWSProvisionGetAccountScriptResponseV2

Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs

Returns:



1133
1134
1135
1136
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1133

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

#get_cspm_aws_account_scripts_attachment_with_http_info(opts = {}) ⇒ Array<(RegistrationAWSProvisionGetAccountScriptResponseV2, Integer, Hash)>

Return a script for customer to run in their cloud environment to grant us access to their AWS environment as a downloadable attachment.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs

Returns:



1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1142

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_aws_account_scripts_attachment ...'
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/user-scripts-download/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', 'application/octet-stream'])

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

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

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

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

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

#get_cspm_aws_account_with_http_info(opts = {}) ⇒ Array<(RegistrationAWSAccountResponseV2, Integer, Hash)>

Returns information about the current status of an AWS account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :ids (Array<String>)

    AWS account IDs

  • :iam_role_arns (Array<String>)

    AWS IAM role ARNs

  • :organization_ids (Array<String>)

    AWS organization IDs

  • :status (String)

    Account status to filter results by.

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :cspm_lite (String)

    Only return CSPM Lite accounts

  • :migrated (String)

    Only return migrated d4c accounts

  • :offset (Integer)

    The offset to start retrieving records from

  • :group_by (String)

    Field to group by.

Returns:



1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1055

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_aws_account ...'
  end
  allowable_values = ["dry", "full"]
  if @api_client.config.client_side_validation && opts[:'scan_type'] && !allowable_values.include?(opts[:'scan_type'])
    fail ArgumentError, "invalid value for \"scan_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["provisioned", "operational"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'cspm_lite'] && !allowable_values.include?(opts[:'cspm_lite'])
    fail ArgumentError, "invalid value for \"cspm_lite\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'migrated'] && !allowable_values.include?(opts[:'migrated'])
    fail ArgumentError, "invalid value for \"migrated\", must be one of #{allowable_values}"
  end
  allowable_values = ["organization"]
  if @api_client.config.client_side_validation && opts[:'group_by'] && !allowable_values.include?(opts[:'group_by'])
    fail ArgumentError, "invalid value for \"group_by\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/account/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'scan-type'] = opts[:'scan_type'] if !opts[:'scan_type'].nil?
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'iam_role_arns'] = @api_client.build_collection_param(opts[:'iam_role_arns'], :multi) if !opts[:'iam_role_arns'].nil?
  query_params[:'organization-ids'] = @api_client.build_collection_param(opts[:'organization_ids'], :multi) if !opts[:'organization_ids'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'cspm_lite'] = opts[:'cspm_lite'] if !opts[:'cspm_lite'].nil?
  query_params[:'migrated'] = opts[:'migrated'] if !opts[:'migrated'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'group_by'] = opts[:'group_by'] if !opts[:'group_by'].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] || 'RegistrationAWSAccountResponseV2'

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

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

#get_cspm_aws_console_setup_urls(opts = {}) ⇒ RegistrationAWSAccountConsoleURL

Return a URL for customer to visit in their cloud environment to grant us access to their AWS environment.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs

  • :use_existing_cloudtrail (String)
  • :region (String)

    Region

Returns:



1193
1194
1195
1196
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1193

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

#get_cspm_aws_console_setup_urls_with_http_info(opts = {}) ⇒ Array<(RegistrationAWSAccountConsoleURL, Integer, Hash)>

Return a URL for customer to visit in their cloud environment to grant us access to their AWS environment.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    AWS account IDs

  • :use_existing_cloudtrail (String)
  • :region (String)

    Region

Returns:



1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1204

def get_cspm_aws_console_setup_urls_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_aws_console_setup_urls ...'
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'use_existing_cloudtrail'] && !allowable_values.include?(opts[:'use_existing_cloudtrail'])
    fail ArgumentError, "invalid value for \"use_existing_cloudtrail\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^[0-9a-z-]{2,}$/)
  if @api_client.config.client_side_validation && !opts[:'region'].nil? && opts[:'region'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"region\"]' when calling CspmRegistrationApi.get_cspm_aws_console_setup_urls, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/console-setup-urls/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'use_existing_cloudtrail'] = opts[:'use_existing_cloudtrail'] if !opts[:'use_existing_cloudtrail'].nil?
  query_params[:'region'] = opts[:'region'] if !opts[:'region'].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] || 'RegistrationAWSAccountConsoleURL'

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

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

#get_cspm_azure_account(opts = {}) ⇒ RegistrationAzureAccountResponseV1

Return information about Azure account registration

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    SubscriptionIDs of accounts to select for this status operation. If this is empty then all accounts are returned.

  • :tenant_ids (Array<String>)

    Tenant ids to filter azure accounts

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :status (String)

    Account status to filter results by.

  • :cspm_lite (String)

    Only return CSPM Lite accounts

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1270
1271
1272
1273
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1270

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

#get_cspm_azure_account_with_http_info(opts = {}) ⇒ Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>

Return information about Azure account registration

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :ids (Array<String>)

    SubscriptionIDs of accounts to select for this status operation. If this is empty then all accounts are returned.

  • :tenant_ids (Array<String>)

    Tenant ids to filter azure accounts

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :status (String)

    Account status to filter results by.

  • :cspm_lite (String)

    Only return CSPM Lite accounts

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1285

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_account ...'
  end
  if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'].to_s.length > 4
    fail ArgumentError, 'invalid value for "opts[:"scan_type"]" when calling CspmRegistrationApi.get_cspm_azure_account, the character length must be smaller than or equal to 4.'
  end

  if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'].to_s.length < 3
    fail ArgumentError, 'invalid value for "opts[:"scan_type"]" when calling CspmRegistrationApi.get_cspm_azure_account, the character length must be great than or equal to 3.'
  end

  pattern = Regexp.new(/^(full|dry)$/)
  if @api_client.config.client_side_validation && !opts[:'scan_type'].nil? && opts[:'scan_type'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"scan_type\"]' when calling CspmRegistrationApi.get_cspm_azure_account, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/^(provisioned|operational)$/)
  if @api_client.config.client_side_validation && !opts[:'status'].nil? && opts[:'status'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"status\"]' when calling CspmRegistrationApi.get_cspm_azure_account, must conform to the pattern #{pattern}."
  end

  allowable_values = ["false", "true"]
  if @api_client.config.client_side_validation && opts[:'cspm_lite'] && !allowable_values.include?(opts[:'cspm_lite'])
    fail ArgumentError, "invalid value for \"cspm_lite\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^(true|false)$/)
  if @api_client.config.client_side_validation && !opts[:'cspm_lite'].nil? && opts[:'cspm_lite'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"cspm_lite\"]' when calling CspmRegistrationApi.get_cspm_azure_account, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/account/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'tenant_ids'] = @api_client.build_collection_param(opts[:'tenant_ids'], :multi) if !opts[:'tenant_ids'].nil?
  query_params[:'scan-type'] = opts[:'scan_type'] if !opts[:'scan_type'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'cspm_lite'] = opts[:'cspm_lite'] if !opts[:'cspm_lite'].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] || 'RegistrationAzureAccountResponseV1'

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

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

#get_cspm_azure_management_group(opts = {}) ⇒ RegistrationAzureManagementGroupResponseV1

Return information about Azure management group registration

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_ids (Array<String>)

    Tenant ids to filter azure accounts

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1369
1370
1371
1372
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1369

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

#get_cspm_azure_management_group_with_http_info(opts = {}) ⇒ Array<(RegistrationAzureManagementGroupResponseV1, Integer, Hash)>

Return information about Azure management group registration

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_ids (Array<String>)

    Tenant ids to filter azure accounts

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1380

def get_cspm_azure_management_group_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_management_group ...'
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/management-group/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tenant_ids'] = @api_client.build_collection_param(opts[:'tenant_ids'], :multi) if !opts[:'tenant_ids'].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] || 'RegistrationAzureManagementGroupResponseV1'

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

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

#get_cspm_azure_user_scripts_attachment(opts = {}) ⇒ RegistrationAzureProvisionGetUserScriptResponseV1

Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to generate script for. Defaults to most recently registered tenant.

  • :subscription_ids (Array<String>)

    Subscription IDs to generate script for. Defaults to all.

  • :account_type (String)
  • :template (String)

    Template to be rendered

  • :azure_management_group (Boolean)

    Use Azure Management Group

Returns:



1435
1436
1437
1438
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1435

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

#get_cspm_azure_user_scripts_attachment_with_http_info(opts = {}) ⇒ Array<(RegistrationAzureProvisionGetUserScriptResponseV1, Integer, Hash)>

Return a script for customer to run in their cloud environment to grant us access to their Azure environment as a downloadable attachment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to generate script for. Defaults to most recently registered tenant.

  • :subscription_ids (Array<String>)

    Subscription IDs to generate script for. Defaults to all.

  • :account_type (String)
  • :template (String)

    Template to be rendered

  • :azure_management_group (Boolean)

    Use Azure Management Group

Returns:



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1448

def get_cspm_azure_user_scripts_attachment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_azure_user_scripts_attachment ...'
  end
  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length > 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length < 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, the character length must be great than or equal to 36.'
  end

  pattern = Regexp.new(/^[0-9a-z-]{36}$/)
  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"tenant_id\"]' when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, must conform to the pattern #{pattern}."
  end

  allowable_values = ["commercial", "gov"]
  if @api_client.config.client_side_validation && opts[:'account_type'] && !allowable_values.include?(opts[:'account_type'])
    fail ArgumentError, "invalid value for \"account_type\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^(commercial|gov)$/)
  if @api_client.config.client_side_validation && !opts[:'account_type'].nil? && opts[:'account_type'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"account_type\"]' when calling CspmRegistrationApi.get_cspm_azure_user_scripts_attachment, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/user-scripts-download/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tenant-id'] = opts[:'tenant_id'] if !opts[:'tenant_id'].nil?
  query_params[:'subscription_ids'] = @api_client.build_collection_param(opts[:'subscription_ids'], :multi) if !opts[:'subscription_ids'].nil?
  query_params[:'account_type'] = opts[:'account_type'] if !opts[:'account_type'].nil?
  query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil?
  query_params[:'azure_management_group'] = opts[:'azure_management_group'] if !opts[:'azure_management_group'].nil?

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

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

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

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

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

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

#get_cspm_policies_details(ids, opts = {}) ⇒ RegistrationPolicyResponseV1

Given an array of policy IDs, returns detailed policies information.

Parameters:

  • ids (Array<Integer>)

    Policy IDs

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

    the optional parameters

Returns:



1523
1524
1525
1526
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1523

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

#get_cspm_policies_details_with_http_info(ids, opts = {}) ⇒ Array<(RegistrationPolicyResponseV1, Integer, Hash)>

Given an array of policy IDs, returns detailed policies information.

Parameters:

  • ids (Array<Integer>)

    Policy IDs

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

    the optional parameters

Returns:



1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1532

def get_cspm_policies_details_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_policies_details ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling CspmRegistrationApi.get_cspm_policies_details"
  end
  # resource path
  local_var_path = '/settings/entities/policy-details/v2'

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

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

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

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

#get_cspm_policy(ids, opts = {}) ⇒ RegistrationPolicyResponseV1

Given a policy ID, returns detailed policy information.

Parameters:

  • ids (Integer)

    Policy ID

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

    the optional parameters

Returns:



1585
1586
1587
1588
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1585

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

#get_cspm_policy_settings(opts = {}) ⇒ RegistrationPolicySettingsResponseV1

Returns information about current policy settings.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :service (String)

    Service type to filter policy settings by.

  • :policy_id (String)

    Policy ID

  • :cloud_platform (String)

    Cloud Platform (e.g.: aws|azure|gcp)

Returns:



1654
1655
1656
1657
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1654

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

#get_cspm_policy_settings_with_http_info(opts = {}) ⇒ Array<(RegistrationPolicySettingsResponseV1, Integer, Hash)>

Returns information about current policy settings.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :service (String)

    Service type to filter policy settings by.

  • :policy_id (String)

    Policy ID

  • :cloud_platform (String)

    Cloud Platform (e.g.: aws|azure|gcp)

Returns:



1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1665

def get_cspm_policy_settings_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_policy_settings ...'
  end
  allowable_values = ["ACM", "ACR", "Any", "App Engine", "AppService", "BigQuery", "Cloud Load Balancing", "Cloud Logging", "Cloud SQL", "Cloud Storage", "CloudFormation", "CloudTrail", "CloudWatch Logs", "Cloudfront", "Compute Engine", "Config", "Disk", "DynamoDB", "EBS", "EC2", "ECR", "EFS", "EKS", "ELB", "EMR", "Elasticache", "GuardDuty", "IAM", "Identity", "KMS", "KeyVault", "Kinesis", "Kubernetes", "Lambda", "LoadBalancer", "Monitor", "NLB/ALB", "NetworkSecurityGroup", "PostgreSQL", "RDS", "Redshift", "S3", "SES", "SNS", "SQLDatabase", "SQLServer", "SQS", "SSM", "Serverless Application Repository", "StorageAccount", "Subscriptions", "VPC", "VirtualMachine", "VirtualNetwork"]
  if @api_client.config.client_side_validation && opts[:'service'] && !allowable_values.include?(opts[:'service'])
    fail ArgumentError, "invalid value for \"service\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^\d+$/)
  if @api_client.config.client_side_validation && !opts[:'policy_id'].nil? && opts[:'policy_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"policy_id\"]' when calling CspmRegistrationApi.get_cspm_policy_settings, must conform to the pattern #{pattern}."
  end

  allowable_values = ["aws", "azure", "gcp"]
  if @api_client.config.client_side_validation && opts[:'cloud_platform'] && !allowable_values.include?(opts[:'cloud_platform'])
    fail ArgumentError, "invalid value for \"cloud_platform\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^(aws|azure|gcp)$/)
  if @api_client.config.client_side_validation && !opts[:'cloud_platform'].nil? && opts[:'cloud_platform'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"cloud_platform\"]' when calling CspmRegistrationApi.get_cspm_policy_settings, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/settings/entities/policy/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'service'] = opts[:'service'] if !opts[:'service'].nil?
  query_params[:'policy-id'] = opts[:'policy_id'] if !opts[:'policy_id'].nil?
  query_params[:'cloud-platform'] = opts[:'cloud_platform'] if !opts[:'cloud_platform'].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] || 'RegistrationPolicySettingsResponseV1'

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

  new_options = opts.merge(
    :operation => :"CspmRegistrationApi.get_cspm_policy_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CspmRegistrationApi#get_cspm_policy_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_cspm_policy_with_http_info(ids, opts = {}) ⇒ Array<(RegistrationPolicyResponseV1, Integer, Hash)>

Given a policy ID, returns detailed policy information.

Parameters:

  • ids (Integer)

    Policy ID

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

    the optional parameters

Returns:



1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1594

def get_cspm_policy_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_policy ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling CspmRegistrationApi.get_cspm_policy"
  end
  pattern = Regexp.new(/^\d+$/)
  if @api_client.config.client_side_validation && ids !~ pattern
    fail ArgumentError, "invalid value for 'ids' when calling CspmRegistrationApi.get_cspm_policy, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/settings/entities/policy-details/v1'

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

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

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

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

#get_cspm_scan_schedule(opts = {}) ⇒ RegistrationScanScheduleResponseV1

Returns scan schedule configuration for one or more cloud platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_platform (Array<String>)

    Cloud Platform

Returns:



1734
1735
1736
1737
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1734

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

#get_cspm_scan_schedule_with_http_info(opts = {}) ⇒ Array<(RegistrationScanScheduleResponseV1, Integer, Hash)>

Returns scan schedule configuration for one or more cloud platforms.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cloud_platform (Array<String>)

    Cloud Platform

Returns:



1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1743

def get_cspm_scan_schedule_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspm_scan_schedule ...'
  end
  # resource path
  local_var_path = '/settings/scan-schedule/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cloud-platform'] = @api_client.build_collection_param(opts[:'cloud_platform'], :multi) if !opts[:'cloud_platform'].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] || 'RegistrationScanScheduleResponseV1'

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

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

#get_cspmcgp_account(opts = {}) ⇒ RegistrationGCPAccountResponseV1

Returns information about the current status of an GCP account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :status (String)

    Account status to filter results by.

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

  • :sort (String)

    Order fields in ascending or descending order. Ex: parent_type|asc.

Returns:



1798
1799
1800
1801
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1798

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

#get_cspmcgp_account_with_http_info(opts = {}) ⇒ Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>

Returns information about the current status of an GCP account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

  • :scan_type (String)

    Type of scan, dry or full, to perform on selected accounts

  • :status (String)

    Account status to filter results by.

  • :limit (Integer)

    The maximum records to return. Defaults to 100. (default to 100)

  • :offset (Integer)

    The offset to start retrieving records from

  • :sort (String)

    Order fields in ascending or descending order. Ex: parent_type|asc.

Returns:



1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1813

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmcgp_account ...'
  end
  allowable_values = ["Folder", "Organization", "Project"]
  if @api_client.config.client_side_validation && opts[:'parent_type'] && !allowable_values.include?(opts[:'parent_type'])
    fail ArgumentError, "invalid value for \"parent_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["dry", "full"]
  if @api_client.config.client_side_validation && opts[:'scan_type'] && !allowable_values.include?(opts[:'scan_type'])
    fail ArgumentError, "invalid value for \"scan_type\", must be one of #{allowable_values}"
  end
  allowable_values = ["operational", "provisioned"]
  if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
    fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/account/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'parent_type'] = opts[:'parent_type'] if !opts[:'parent_type'].nil?
  query_params[:'ids'] = @api_client.build_collection_param(opts[:'ids'], :multi) if !opts[:'ids'].nil?
  query_params[:'scan-type'] = opts[:'scan_type'] if !opts[:'scan_type'].nil?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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] || 'RegistrationGCPAccountResponseV1'

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

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

#get_cspmgcp_service_accounts_ext(opts = {}) ⇒ RegistrationGCPServiceAccountResponseExtV1

Returns the service account id and client email for external clients.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Service Account ID

Returns:



1880
1881
1882
1883
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1880

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

#get_cspmgcp_service_accounts_ext_with_http_info(opts = {}) ⇒ Array<(RegistrationGCPServiceAccountResponseExtV1, Integer, Hash)>

Returns the service account id and client email for external clients.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    Service Account ID

Returns:



1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1889

def get_cspmgcp_service_accounts_ext_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmgcp_service_accounts_ext ...'
  end
  pattern = Regexp.new(/^\d+$/)
  if @api_client.config.client_side_validation && !opts[:'id'].nil? && opts[:'id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"id\"]' when calling CspmRegistrationApi.get_cspmgcp_service_accounts_ext, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/service-accounts/v1'

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

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

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

#get_cspmgcp_user_scripts_attachment(opts = {}) ⇒ RegistrationGCPProvisionGetUserScriptResponseV1

Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

Returns:



1944
1945
1946
1947
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1944

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

#get_cspmgcp_user_scripts_attachment_with_http_info(opts = {}) ⇒ Array<(RegistrationGCPProvisionGetUserScriptResponseV1, Integer, Hash)>

Return a script for customer to run in their cloud environment to grant us access to their GCP environment as a downloadable attachment

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

  • :ids (Array<String>)

    Hierarchical Resource IDs of accounts

Returns:



1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 1954

def get_cspmgcp_user_scripts_attachment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.get_cspmgcp_user_scripts_attachment ...'
  end
  allowable_values = ["Folder", "Organization", "Project"]
  if @api_client.config.client_side_validation && opts[:'parent_type'] && !allowable_values.include?(opts[:'parent_type'])
    fail ArgumentError, "invalid value for \"parent_type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/user-scripts-download/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'parent_type'] = opts[:'parent_type'] if !opts[:'parent_type'].nil?
  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', 'application/octet-stream'])

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

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

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

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

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

#patch_cspm_aws_account(body, opts = {}) ⇒ RegistrationAWSAccountResponseV2

Patches a existing account in our system for a customer.

Parameters:

Returns:



2008
2009
2010
2011
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2008

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

#patch_cspm_aws_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationAWSAccountResponseV2, Integer, Hash)>

Patches a existing account in our system for a customer.

Parameters:

Returns:



2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2017

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.patch_cspm_aws_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 CspmRegistrationApi.patch_cspm_aws_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-aws/entities/account/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] || 'RegistrationAWSAccountResponseV2'

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

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

#update_cspm_azure_account(body, opts = {}) ⇒ RegistrationAzureAccountResponseV1

Patches a existing account in our system for a customer.

Parameters:

Returns:



2074
2075
2076
2077
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2074

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

#update_cspm_azure_account_client_id(id, opts = {}) ⇒ RegistrationAzureTenantConfigurationResponseV1

Update an Azure service account in our system by with the user-created client_id created with the public key we’ve provided

Parameters:

  • id (String)

    ClientID to use for the Service Principal associated with the customer&#39;s Azure account

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to update client ID for. Required if multiple tenants are registered.

Returns:



2141
2142
2143
2144
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2141

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

#update_cspm_azure_account_client_id_with_http_info(id, opts = {}) ⇒ Array<(RegistrationAzureTenantConfigurationResponseV1, Integer, Hash)>

Update an Azure service account in our system by with the user-created client_id created with the public key we&#39;ve provided

Parameters:

  • id (String)

    ClientID to use for the Service Principal associated with the customer&#39;s Azure account

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to update client ID for. Required if multiple tenants are registered.

Returns:



2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2151

def (id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_azure_account_client_id ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling CspmRegistrationApi.update_cspm_azure_account_client_id"
  end
  if @api_client.config.client_side_validation && id.to_s.length > 36
    fail ArgumentError, 'invalid value for "id" when calling CspmRegistrationApi.update_cspm_azure_account_client_id, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && id.to_s.length < 36
    fail ArgumentError, 'invalid value for "id" when calling CspmRegistrationApi.update_cspm_azure_account_client_id, the character length must be great than or equal to 36.'
  end

  pattern = Regexp.new(/^[0-9a-z-]{36}$/)
  if @api_client.config.client_side_validation && id !~ pattern
    fail ArgumentError, "invalid value for 'id' when calling CspmRegistrationApi.update_cspm_azure_account_client_id, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length > 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.update_cspm_azure_account_client_id, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length < 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.update_cspm_azure_account_client_id, the character length must be great than or equal to 36.'
  end

  pattern = Regexp.new(/^[0-9a-z-]{36}$/)
  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"tenant_id\"]' when calling CspmRegistrationApi.update_cspm_azure_account_client_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/client-id/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id
  query_params[:'tenant-id'] = opts[:'tenant_id'] if !opts[:'tenant_id'].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] || 'RegistrationAzureTenantConfigurationResponseV1'

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

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

#update_cspm_azure_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationAzureAccountResponseV1, Integer, Hash)>

Patches a existing account in our system for a customer.

Parameters:

Returns:



2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2083

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_azure_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 CspmRegistrationApi.update_cspm_azure_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/account/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] || 'RegistrationAzureAccountResponseV1'

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

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

#update_cspm_azure_tenant_default_subscription_id(subscription_id, opts = {}) ⇒ RegistrationAzureTenantDefaultSubscriptionIDResponseV1

Update an Azure default subscription_id in our system for given tenant_id

Parameters:

  • subscription_id (String)

    Default Subscription ID to patch for all subscriptions belonged to a tenant.

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to update client ID for. Required if multiple tenants are registered.

Returns:



2232
2233
2234
2235
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2232

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

#update_cspm_azure_tenant_default_subscription_id_with_http_info(subscription_id, opts = {}) ⇒ Array<(RegistrationAzureTenantDefaultSubscriptionIDResponseV1, Integer, Hash)>

Update an Azure default subscription_id in our system for given tenant_id

Parameters:

  • subscription_id (String)

    Default Subscription ID to patch for all subscriptions belonged to a tenant.

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

    the optional parameters

Options Hash (opts):

  • :tenant_id (String)

    Tenant ID to update client ID for. Required if multiple tenants are registered.

Returns:



2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2242

def update_cspm_azure_tenant_default_subscription_id_with_http_info(subscription_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id ...'
  end
  # verify the required parameter 'subscription_id' is set
  if @api_client.config.client_side_validation && subscription_id.nil?
    fail ArgumentError, "Missing the required parameter 'subscription_id' when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id"
  end
  if @api_client.config.client_side_validation && subscription_id.to_s.length > 36
    fail ArgumentError, 'invalid value for "subscription_id" when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && subscription_id.to_s.length < 36
    fail ArgumentError, 'invalid value for "subscription_id" when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, the character length must be great than or equal to 36.'
  end

  pattern = Regexp.new(/^[0-9a-z-]{36}$/)
  if @api_client.config.client_side_validation && subscription_id !~ pattern
    fail ArgumentError, "invalid value for 'subscription_id' when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, must conform to the pattern #{pattern}."
  end

  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length > 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'].to_s.length < 36
    fail ArgumentError, 'invalid value for "opts[:"tenant_id"]" when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, the character length must be great than or equal to 36.'
  end

  pattern = Regexp.new(/^[0-9a-z-]{36}$/)
  if @api_client.config.client_side_validation && !opts[:'tenant_id'].nil? && opts[:'tenant_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"tenant_id\"]' when calling CspmRegistrationApi.update_cspm_azure_tenant_default_subscription_id, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-cspm-azure/entities/default-subscription-id/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subscription_id'] = subscription_id
  query_params[:'tenant-id'] = opts[:'tenant_id'] if !opts[:'tenant_id'].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] || 'RegistrationAzureTenantDefaultSubscriptionIDResponseV1'

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

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

#update_cspm_policy_settings(body, opts = {}) ⇒ RegistrationPolicySettingsResponseV1

Updates a policy setting - can be used to override policy severity or to disable a policy entirely.

Parameters:

Returns:



2322
2323
2324
2325
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2322

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

#update_cspm_policy_settings_with_http_info(body, opts = {}) ⇒ Array<(RegistrationPolicySettingsResponseV1, Integer, Hash)>

Updates a policy setting - can be used to override policy severity or to disable a policy entirely.

Parameters:

Returns:



2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2331

def update_cspm_policy_settings_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_policy_settings ...'
  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 CspmRegistrationApi.update_cspm_policy_settings"
  end
  # resource path
  local_var_path = '/settings/entities/policy/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] || 'RegistrationPolicySettingsResponseV1'

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

  new_options = opts.merge(
    :operation => :"CspmRegistrationApi.update_cspm_policy_settings",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CspmRegistrationApi#update_cspm_policy_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_cspm_scan_schedule(body, opts = {}) ⇒ RegistrationScanScheduleResponseV1

Updates scan schedule configuration for one or more cloud platforms.

Parameters:

Returns:



2388
2389
2390
2391
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2388

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

#update_cspm_scan_schedule_with_http_info(body, opts = {}) ⇒ Array<(RegistrationScanScheduleResponseV1, Integer, Hash)>

Updates scan schedule configuration for one or more cloud platforms.

Parameters:

Returns:



2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2397

def update_cspm_scan_schedule_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspm_scan_schedule ...'
  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 CspmRegistrationApi.update_cspm_scan_schedule"
  end
  # resource path
  local_var_path = '/settings/scan-schedule/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] || 'RegistrationScanScheduleResponseV1'

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

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

#update_cspmgcp_account(body, opts = {}) ⇒ RegistrationGCPAccountResponseV1

Patches a existing account in our system for a customer.

Parameters:

Returns:



2454
2455
2456
2457
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2454

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

#update_cspmgcp_account_with_http_info(body, opts = {}) ⇒ Array<(RegistrationGCPAccountResponseV1, Integer, Hash)>

Patches a existing account in our system for a customer.

Parameters:

Returns:



2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
# File 'lib/crimson-falcon/api/cspm_registration_api.rb', line 2463

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CspmRegistrationApi.update_cspmgcp_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 CspmRegistrationApi.update_cspmgcp_account"
  end
  # resource path
  local_var_path = '/cloud-connect-cspm-gcp/entities/account/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] || 'RegistrationGCPAccountResponseV1'

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

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