Class: Falcon::CloudAzureRegistration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CloudAzureRegistration

Returns a new instance of CloudAzureRegistration.



35
36
37
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 35

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



33
34
35
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#cloud_registration_azure_create_registration(body, opts = {}) ⇒ AzureAzureRegistrationResponseExtV1

Create an Azure registration for a tenant.

Parameters:

Returns:



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

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

#cloud_registration_azure_create_registration_with_http_info(body, opts = {}) ⇒ Array<(AzureAzureRegistrationResponseExtV1, Integer, Hash)>

Create an Azure registration for a tenant.

Parameters:

Returns:



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

def cloud_registration_azure_create_registration_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_create_registration ...'
  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 CloudAzureRegistration.cloud_registration_azure_create_registration"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/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] || 'AzureAzureRegistrationResponseExtV1'

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

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

#cloud_registration_azure_delete_legacy_subscription(body, opts = {}) ⇒ AzureLegacySubscriptionDeleteResponseExtV1

Delete existing legacy Azure subscriptions.

Parameters:

Returns:



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

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

#cloud_registration_azure_delete_legacy_subscription_with_http_info(body, opts = {}) ⇒ Array<(AzureLegacySubscriptionDeleteResponseExtV1, Integer, Hash)>

Delete existing legacy Azure subscriptions.

Parameters:

Returns:



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 117

def cloud_registration_azure_delete_legacy_subscription_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_delete_legacy_subscription ...'
  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 CloudAzureRegistration.cloud_registration_azure_delete_legacy_subscription"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/accounts/legacy/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] || 'AzureLegacySubscriptionDeleteResponseExtV1'

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

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

#cloud_registration_azure_delete_registration(tenant_ids, opts = {}) ⇒ AzureDeleteRegistrationResponseExtV1

Deletes existing Azure registrations.

Parameters:

  • tenant_ids (Array<String>)

    Azure tenant IDs

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

    the optional parameters

Returns:



174
175
176
177
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 174

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

#cloud_registration_azure_delete_registration_with_http_info(tenant_ids, opts = {}) ⇒ Array<(AzureDeleteRegistrationResponseExtV1, Integer, Hash)>

Deletes existing Azure registrations.

Parameters:

  • tenant_ids (Array<String>)

    Azure tenant IDs

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

    the optional parameters

Returns:



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

def cloud_registration_azure_delete_registration_with_http_info(tenant_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_delete_registration ...'
  end
  # verify the required parameter 'tenant_ids' is set
  if @api_client.config.client_side_validation && tenant_ids.nil?
    fail ArgumentError, "Missing the required parameter 'tenant_ids' when calling CloudAzureRegistration.cloud_registration_azure_delete_registration"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tenant_ids'] = @api_client.build_collection_param(tenant_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] || 'AzureDeleteRegistrationResponseExtV1'

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

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

#cloud_registration_azure_download_script(body, opts = {}) ⇒ AzureAzureProvisionGetAccountScriptResponseV1

Retrieve script to create resources

Parameters:

Returns:



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

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

#cloud_registration_azure_download_script_with_http_info(body, opts = {}) ⇒ Array<(AzureAzureProvisionGetAccountScriptResponseV1, Integer, Hash)>

Retrieve script to create resources

Parameters:

Returns:



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

def cloud_registration_azure_download_script_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_download_script ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling CloudAzureRegistration.cloud_registration_azure_download_script"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/scripts/v1'

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

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

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

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

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

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

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

#cloud_registration_azure_get_registration(tenant_id, opts = {}) ⇒ AzureAzureRegistrationResponseExtV1

Retrieve existing Azure registration for a tenant.

Parameters:

  • tenant_id (String)

    Tenant ID

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

    the optional parameters

Returns:



302
303
304
305
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 302

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

#cloud_registration_azure_get_registration_with_http_info(tenant_id, opts = {}) ⇒ Array<(AzureAzureRegistrationResponseExtV1, Integer, Hash)>

Retrieve existing Azure registration for a tenant.

Parameters:

  • tenant_id (String)

    Tenant ID

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

    the optional parameters

Returns:



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 311

def cloud_registration_azure_get_registration_with_http_info(tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_get_registration ...'
  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 CloudAzureRegistration.cloud_registration_azure_get_registration"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/v1'

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

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

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

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

#cloud_registration_azure_get_script(tenant_id, opts = {}) ⇒ nil

Download Azure deployment script (Terraform or Bicep)

Parameters:

  • tenant_id (String)

    Azure tenant ID

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

    the optional parameters

Returns:

  • (nil)


364
365
366
367
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 364

def cloud_registration_azure_get_script(tenant_id, opts = {})
  cloud_registration_azure_get_script_with_http_info(tenant_id, opts)
  nil
end

#cloud_registration_azure_get_script_with_http_info(tenant_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Download Azure deployment script (Terraform or Bicep)

Parameters:

  • tenant_id (String)

    Azure tenant ID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 373

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

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

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

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

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

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

#cloud_registration_azure_trigger_health_check(opts = {}) ⇒ AzureHealthCheckTriggerResponseExtV1

Trigger health check scan for Azure registrations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_ids (Array<String>)

    Azure tenant IDs

Returns:



426
427
428
429
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 426

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

#cloud_registration_azure_trigger_health_check_with_http_info(opts = {}) ⇒ Array<(AzureHealthCheckTriggerResponseExtV1, Integer, Hash)>

Trigger health check scan for Azure registrations

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tenant_ids (Array<String>)

    Azure tenant IDs

Returns:



435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 435

def cloud_registration_azure_trigger_health_check_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_trigger_health_check ...'
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/healthcheck/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?

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

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

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

#cloud_registration_azure_update_registration(body, opts = {}) ⇒ AzureAzureRegistrationResponseExtV1

Update an existing Azure registration for a tenant.

Parameters:

Returns:



484
485
486
487
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 484

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

#cloud_registration_azure_update_registration_with_http_info(body, opts = {}) ⇒ Array<(AzureAzureRegistrationResponseExtV1, Integer, Hash)>

Update an existing Azure registration for a tenant.

Parameters:

Returns:



493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 493

def cloud_registration_azure_update_registration_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_update_registration ...'
  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 CloudAzureRegistration.cloud_registration_azure_update_registration"
  end
  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/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] || 'AzureAzureRegistrationResponseExtV1'

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

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

#cloud_registration_azure_validate_registration(tenant_id, opts = {}) ⇒ AzureRegistrationValidateResponseV1

Validate an Azure registration by checking service principal, role assignments and deployment stack (if the deployment method is Bicep)

Parameters:

  • tenant_id (String)

    Azure tenant ID to be validated

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

    the optional parameters

Options Hash (opts):

  • :stack_name (String)

    Azure deployment stack name to be validated

Returns:



551
552
553
554
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 551

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

#cloud_registration_azure_validate_registration_with_http_info(tenant_id, opts = {}) ⇒ Array<(AzureRegistrationValidateResponseV1, Integer, Hash)>

Validate an Azure registration by checking service principal, role assignments and deployment stack (if the deployment method is Bicep)

Parameters:

  • tenant_id (String)

    Azure tenant ID to be validated

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

    the optional parameters

Options Hash (opts):

  • :stack_name (String)

    Azure deployment stack name to be validated

Returns:



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
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
# File 'lib/crimson-falcon/api/cloud_azure_registration.rb', line 561

def cloud_registration_azure_validate_registration_with_http_info(tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: CloudAzureRegistration.cloud_registration_azure_validate_registration ...'
  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 CloudAzureRegistration.cloud_registration_azure_validate_registration"
  end
  if @api_client.config.client_side_validation && tenant_id.to_s.length > 36
    fail ArgumentError, 'invalid value for "tenant_id" when calling CloudAzureRegistration.cloud_registration_azure_validate_registration, the character length must be smaller than or equal to 36.'
  end

  if @api_client.config.client_side_validation && tenant_id.to_s.length < 36
    fail ArgumentError, 'invalid value for "tenant_id" when calling CloudAzureRegistration.cloud_registration_azure_validate_registration, 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 && tenant_id !~ pattern
    fail ArgumentError, "invalid value for 'tenant_id' when calling CloudAzureRegistration.cloud_registration_azure_validate_registration, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-security-registration-azure/entities/registrations/validate/v1'

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

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

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