Class: Falcon::D4cRegistration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ D4cRegistration

Returns a new instance of D4cRegistration.



35
36
37
# File 'lib/crimson-falcon/api/d4c_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/d4c_registration.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#connect_d4_cgcp_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:



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

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

#connect_d4_cgcp_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:



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/d4c_registration.rb', line 51

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.connect_d4_cgcp_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 D4cRegistration.connect_d4_cgcp_account"
  end
  # resource path
  local_var_path = '/cloud-connect-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 => :"D4cRegistration.connect_d4_cgcp_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: D4cRegistration#connect_d4_cgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_d4_c_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:



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

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

#create_d4_c_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:



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/d4c_registration.rb', line 117

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

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

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

#create_d4_c_gcp_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:



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

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

#create_d4_c_gcp_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:



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
231
232
233
234
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 183

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.create_d4_c_gcp_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 D4cRegistration.create_d4_c_gcp_account"
  end
  # resource path
  local_var_path = '/cloud-connect-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 => :"D4cRegistration.create_d4_c_gcp_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: D4cRegistration#create_d4_c_gcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_discover_cloud_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:



240
241
242
243
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 240

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

#create_discover_cloud_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:



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

def (body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.create_discover_cloud_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 D4cRegistration.create_discover_cloud_azure_account"
  end
  # resource path
  local_var_path = '/cloud-connect-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 => :"D4cRegistration.create_discover_cloud_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: D4cRegistration#create_discover_cloud_azure_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_d4_c_aws_account(opts = {}) ⇒ MsaspecResponseFields

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:



307
308
309
310
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 307

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

#delete_d4_c_aws_account_with_http_info(opts = {}) ⇒ Array<(MsaspecResponseFields, 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<(MsaspecResponseFields, Integer, Hash)>)

    MsaspecResponseFields data, response status code and response headers



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
359
360
361
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 317

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

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

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

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

#delete_d4_cgcp_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:



367
368
369
370
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 367

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

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



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

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.delete_d4_cgcp_account ...'
  end
  # resource path
  local_var_path = '/cloud-connect-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 => :"D4cRegistration.delete_d4_cgcp_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: D4cRegistration#delete_d4_cgcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

  • :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)

  • :offset (Integer)

    The offset to start retrieving records from

  • :migrated (String)

    Only return migrated d4c accounts

Returns:



431
432
433
434
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 431

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

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

  • :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)

  • :offset (Integer)

    The offset to start retrieving records from

  • :migrated (String)

    Only return migrated d4c accounts

Returns:



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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 446

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_c_aws_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 D4cRegistration.get_d4_c_aws_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 D4cRegistration.get_d4_c_aws_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 D4cRegistration.get_d4_c_aws_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 D4cRegistration.get_d4_c_aws_account, must conform to the pattern #{pattern}."
  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
  # resource path
  local_var_path = '/cloud-connect-aws/entities/account/v2'

  # 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[:'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[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'migrated'] = opts[:'migrated'] if !opts[:'migrated'].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 => :"D4cRegistration.get_d4_c_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: D4cRegistration#get_d4_c_aws_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_d4_c_aws_console_setup_urls(opts = {}) ⇒ RegistrationAWSConsoleURLResponseV2

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):

  • :region (String)

    Region

Returns:



523
524
525
526
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 523

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

#get_d4_c_aws_console_setup_urls_with_http_info(opts = {}) ⇒ Array<(RegistrationAWSConsoleURLResponseV2, 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):

  • :region (String)

    Region

Returns:



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

def get_d4_c_aws_console_setup_urls_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_c_aws_console_setup_urls ...'
  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 D4cRegistration.get_d4_c_aws_console_setup_urls, must conform to the pattern #{pattern}."
  end

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

  # query parameters
  query_params = opts[:query_params] || {}
  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] || 'RegistrationAWSConsoleURLResponseV2'

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

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

#get_d4_c_gcp_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:



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

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

#get_d4_c_gcp_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:



607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 607

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_c_gcp_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-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 => :"D4cRegistration.get_d4_c_gcp_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: D4cRegistration#get_d4_c_gcp_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_d4_c_gcp_user_scripts(opts = {}) ⇒ RegistrationGCPProvisionGetUserScriptResponseV1

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

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

Returns:



674
675
676
677
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 674

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

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

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :parent_type (String)

    GCP Hierarchy Parent Type, organization/folder/project

Returns:



683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 683

def get_d4_c_gcp_user_scripts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_c_gcp_user_scripts ...'
  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-gcp/entities/user-scripts/v1'

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

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

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

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

  • :template (String)

    Template to be rendered (default to ‘aws-bash’)

  • :accounts (Array<String>)

    The list of accounts to register

  • :behavior_assessment_enabled (String)
  • :sensor_management_enabled (String)
  • :dspm_enabled (String)
  • :dspm_regions (Array<String>)
  • :dspm_host_account_id (String)
  • :dspm_host_integration_role_name (String)
  • :dspm_host_scanner_role_name (String)
  • :dspm_role (String)
  • :vulnerability_scanning_enabled (String)
  • :vulnerability_scanning_regions (Array<String>)
  • :vulnerability_scanning_host_account_id (String)
  • :vulnerability_scanning_host_integration_role_name (String)
  • :vulnerability_scanning_host_scanner_role_name (String)
  • :vulnerability_scanning_role (String)
  • :use_existing_cloudtrail (String)
  • :organization_id (String)

    The AWS organization ID to be registered

  • :organizational_unit_ids (Array<String>)

    The AWS Organizational Unit IDs to be registered

  • :aws_profile (String)

    The AWS profile to be used during registration

  • :aws_region (String)

    The AWS region to be used during registration

  • :iam_role_arn (String)

    The custom IAM role to be used during registration

  • :falcon_client_id (String)

    The Falcon client ID used during registration

  • :idp_enabled (String)

    Set to true to enable Identity Protection feature

  • :tags (String)

    Base64 encoded JSON string to be used as AWS tags

Returns:



761
762
763
764
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 761

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

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

  • :template (String)

    Template to be rendered (default to ‘aws-bash’)

  • :accounts (Array<String>)

    The list of accounts to register

  • :behavior_assessment_enabled (String)
  • :sensor_management_enabled (String)
  • :dspm_enabled (String)
  • :dspm_regions (Array<String>)
  • :dspm_host_account_id (String)
  • :dspm_host_integration_role_name (String)
  • :dspm_host_scanner_role_name (String)
  • :dspm_role (String)
  • :vulnerability_scanning_enabled (String)
  • :vulnerability_scanning_regions (Array<String>)
  • :vulnerability_scanning_host_account_id (String)
  • :vulnerability_scanning_host_integration_role_name (String)
  • :vulnerability_scanning_host_scanner_role_name (String)
  • :vulnerability_scanning_role (String)
  • :use_existing_cloudtrail (String)
  • :organization_id (String)

    The AWS organization ID to be registered

  • :organizational_unit_ids (Array<String>)

    The AWS Organizational Unit IDs to be registered

  • :aws_profile (String)

    The AWS profile to be used during registration

  • :aws_region (String)

    The AWS region to be used during registration

  • :iam_role_arn (String)

    The custom IAM role to be used during registration

  • :falcon_client_id (String)

    The Falcon client ID used during registration

  • :idp_enabled (String)

    Set to true to enable Identity Protection feature

  • :tags (String)

    Base64 encoded JSON string to be used as AWS tags

Returns:



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
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
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
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 795

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_caws_account_scripts_attachment ...'
  end
  allowable_values = ["aws-bash"]
  if @api_client.config.client_side_validation && opts[:'template'] && !allowable_values.include?(opts[:'template'])
    fail ArgumentError, "invalid value for \"template\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'behavior_assessment_enabled'] && !allowable_values.include?(opts[:'behavior_assessment_enabled'])
    fail ArgumentError, "invalid value for \"behavior_assessment_enabled\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'sensor_management_enabled'] && !allowable_values.include?(opts[:'sensor_management_enabled'])
    fail ArgumentError, "invalid value for \"sensor_management_enabled\", must be one of #{allowable_values}"
  end
  allowable_values = ["true", "false"]
  if @api_client.config.client_side_validation && opts[:'dspm_enabled'] && !allowable_values.include?(opts[:'dspm_enabled'])
    fail ArgumentError, "invalid value for \"dspm_enabled\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/\d{12}/)
  if @api_client.config.client_side_validation && !opts[:'dspm_host_account_id'].nil? && opts[:'dspm_host_account_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"dspm_host_account_id\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/^[a-zA-Z0-9+=,.@_-]{1,64}$/)
  if @api_client.config.client_side_validation && !opts[:'dspm_host_integration_role_name'].nil? && opts[:'dspm_host_integration_role_name'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"dspm_host_integration_role_name\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/^[a-zA-Z0-9+=,.@_-]{1,64}$/)
  if @api_client.config.client_side_validation && !opts[:'dspm_host_scanner_role_name'].nil? && opts[:'dspm_host_scanner_role_name'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"dspm_host_scanner_role_name\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

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

  pattern = Regexp.new(/^[a-zA-Z0-9+=,.@_-]{1,64}$/)
  if @api_client.config.client_side_validation && !opts[:'vulnerability_scanning_host_integration_role_name'].nil? && opts[:'vulnerability_scanning_host_integration_role_name'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"vulnerability_scanning_host_integration_role_name\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/^[a-zA-Z0-9+=,.@_-]{1,64}$/)
  if @api_client.config.client_side_validation && !opts[:'vulnerability_scanning_host_scanner_role_name'].nil? && opts[:'vulnerability_scanning_host_scanner_role_name'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"vulnerability_scanning_host_scanner_role_name\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  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(/.*/)
  if @api_client.config.client_side_validation && !opts[:'organization_id'].nil? && opts[:'organization_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"organization_id\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'aws_profile'].nil? && opts[:'aws_profile'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"aws_profile\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'aws_region'].nil? && opts[:'aws_region'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"aws_region\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'iam_role_arn'].nil? && opts[:'iam_role_arn'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"iam_role_arn\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'falcon_client_id'].nil? && opts[:'falcon_client_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"falcon_client_id\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'idp_enabled'].nil? && opts[:'idp_enabled'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"idp_enabled\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  pattern = Regexp.new(/.*/)
  if @api_client.config.client_side_validation && !opts[:'tags'].nil? && opts[:'tags'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"tags\"]' when calling D4cRegistration.get_d4_caws_account_scripts_attachment, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-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?
  query_params[:'template'] = opts[:'template'] if !opts[:'template'].nil?
  query_params[:'accounts'] = @api_client.build_collection_param(opts[:'accounts'], :multi) if !opts[:'accounts'].nil?
  query_params[:'behavior_assessment_enabled'] = opts[:'behavior_assessment_enabled'] if !opts[:'behavior_assessment_enabled'].nil?
  query_params[:'sensor_management_enabled'] = opts[:'sensor_management_enabled'] if !opts[:'sensor_management_enabled'].nil?
  query_params[:'dspm_enabled'] = opts[:'dspm_enabled'] if !opts[:'dspm_enabled'].nil?
  query_params[:'dspm_regions'] = @api_client.build_collection_param(opts[:'dspm_regions'], :csv) if !opts[:'dspm_regions'].nil?
  query_params[:'dspm_host_account_id'] = opts[:'dspm_host_account_id'] if !opts[:'dspm_host_account_id'].nil?
  query_params[:'dspm_host_integration_role_name'] = opts[:'dspm_host_integration_role_name'] if !opts[:'dspm_host_integration_role_name'].nil?
  query_params[:'dspm_host_scanner_role_name'] = opts[:'dspm_host_scanner_role_name'] if !opts[:'dspm_host_scanner_role_name'].nil?
  query_params[:'dspm_role'] = opts[:'dspm_role'] if !opts[:'dspm_role'].nil?
  query_params[:'vulnerability_scanning_enabled'] = opts[:'vulnerability_scanning_enabled'] if !opts[:'vulnerability_scanning_enabled'].nil?
  query_params[:'vulnerability_scanning_regions'] = @api_client.build_collection_param(opts[:'vulnerability_scanning_regions'], :csv) if !opts[:'vulnerability_scanning_regions'].nil?
  query_params[:'vulnerability_scanning_host_account_id'] = opts[:'vulnerability_scanning_host_account_id'] if !opts[:'vulnerability_scanning_host_account_id'].nil?
  query_params[:'vulnerability_scanning_host_integration_role_name'] = opts[:'vulnerability_scanning_host_integration_role_name'] if !opts[:'vulnerability_scanning_host_integration_role_name'].nil?
  query_params[:'vulnerability_scanning_host_scanner_role_name'] = opts[:'vulnerability_scanning_host_scanner_role_name'] if !opts[:'vulnerability_scanning_host_scanner_role_name'].nil?
  query_params[:'vulnerability_scanning_role'] = opts[:'vulnerability_scanning_role'] if !opts[:'vulnerability_scanning_role'].nil?
  query_params[:'use_existing_cloudtrail'] = opts[:'use_existing_cloudtrail'] if !opts[:'use_existing_cloudtrail'].nil?
  query_params[:'organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
  query_params[:'organizational_unit_ids'] = @api_client.build_collection_param(opts[:'organizational_unit_ids'], :csv) if !opts[:'organizational_unit_ids'].nil?
  query_params[:'aws_profile'] = opts[:'aws_profile'] if !opts[:'aws_profile'].nil?
  query_params[:'aws_region'] = opts[:'aws_region'] if !opts[:'aws_region'].nil?
  query_params[:'iam_role_arn'] = opts[:'iam_role_arn'] if !opts[:'iam_role_arn'].nil?
  query_params[:'falcon_client_id'] = opts[:'falcon_client_id'] if !opts[:'falcon_client_id'].nil?
  query_params[:'idp_enabled'] = opts[:'idp_enabled'] if !opts[:'idp_enabled'].nil?
  query_params[:'tags'] = opts[:'tags'] if !opts[:'tags'].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 => :"D4cRegistration.get_d4_caws_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: D4cRegistration#get_d4_caws_account_scripts_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_d4_cgcp_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:



958
959
960
961
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 958

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

#get_d4_cgcp_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:



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

def get_d4_cgcp_service_accounts_ext_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_cgcp_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 D4cRegistration.get_d4_cgcp_service_accounts_ext, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-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 => :"D4cRegistration.get_d4_cgcp_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: D4cRegistration#get_d4_cgcp_service_accounts_ext\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

  • :status (String)

    Account status to filter results by.

Returns:



1023
1024
1025
1026
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1023

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

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

  • :status (String)

    Account status to filter results by.

Returns:



1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
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
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1034

def get_d4_cgcp_user_scripts_attachment_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_d4_cgcp_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
  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-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?
  query_params[:'status'] = opts[:'status'] if !opts[:'status'].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 => :"D4cRegistration.get_d4_cgcp_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: D4cRegistration#get_d4_cgcp_user_scripts_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_discover_cloud_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.

  • :limit (Integer)

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

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1098
1099
1100
1101
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1098

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

#get_discover_cloud_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.

  • :limit (Integer)

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

  • :offset (Integer)

    The offset to start retrieving records from

Returns:



1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
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
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1112

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_discover_cloud_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 D4cRegistration.get_discover_cloud_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 D4cRegistration.get_discover_cloud_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 D4cRegistration.get_discover_cloud_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 D4cRegistration.get_discover_cloud_azure_account, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/cloud-connect-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[:'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 => :"D4cRegistration.get_discover_cloud_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: D4cRegistration#get_discover_cloud_azure_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_discover_cloud_azure_tenant_ids(opts = {}) ⇒ RegistrationAzureTenantIDsResponseV1

Return available tenant ids for discover for cloud

Parameters:

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

    the optional parameters

Returns:



1183
1184
1185
1186
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1183

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

#get_discover_cloud_azure_tenant_ids_with_http_info(opts = {}) ⇒ Array<(RegistrationAzureTenantIDsResponseV1, Integer, Hash)>

Return available tenant ids for discover for cloud

Parameters:

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

    the optional parameters

Returns:



1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
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
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1191

def get_discover_cloud_azure_tenant_ids_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_discover_cloud_azure_tenant_ids ...'
  end
  # resource path
  local_var_path = '/cloud-connect-azure/entities/tenant-id/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'])

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

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

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

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

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

#get_discover_cloud_azure_user_scripts(opts = {}) ⇒ RegistrationAzureProvisionGetUserScriptResponseV1

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

Parameters:

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

    the optional parameters

Returns:



1238
1239
1240
1241
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1238

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

#get_discover_cloud_azure_user_scripts_attachment(tenant_id, 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:

  • tenant_id (Array<String>)

    Azure Tenant ID

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

    the optional parameters

Options Hash (opts):

  • :subscription_ids (Array<String>)

    Azure Subscription ID

  • :template (String)

    Template to be rendered

  • :azure_management_group (Boolean)

    Use Azure Management Group

Returns:



1297
1298
1299
1300
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1297

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

#get_discover_cloud_azure_user_scripts_attachment_with_http_info(tenant_id, 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:

  • tenant_id (Array<String>)

    Azure Tenant ID

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

    the optional parameters

Options Hash (opts):

  • :subscription_ids (Array<String>)

    Azure Subscription ID

  • :template (String)

    Template to be rendered

  • :azure_management_group (Boolean)

    Use Azure Management Group

Returns:



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

def get_discover_cloud_azure_user_scripts_attachment_with_http_info(tenant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_discover_cloud_azure_user_scripts_attachment ...'
  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 D4cRegistration.get_discover_cloud_azure_user_scripts_attachment"
  end
  # resource path
  local_var_path = '/cloud-connect-azure/entities/user-scripts-download/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tenant-id'] = @api_client.build_collection_param(tenant_id, :csv)
  query_params[:'subscription_ids'] = @api_client.build_collection_param(opts[:'subscription_ids'], :csv) if !opts[:'subscription_ids'].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 => :"D4cRegistration.get_discover_cloud_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: D4cRegistration#get_discover_cloud_azure_user_scripts_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Parameters:

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

    the optional parameters

Returns:



1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1246

def get_discover_cloud_azure_user_scripts_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.get_discover_cloud_azure_user_scripts ...'
  end
  # resource path
  local_var_path = '/cloud-connect-azure/entities/user-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'])

  # 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 => :"D4cRegistration.get_discover_cloud_azure_user_scripts",
    :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: D4cRegistration#get_discover_cloud_azure_user_scripts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_horizon_d4_c_scripts(opts = {}) ⇒ RegistrationStaticScriptsResponse

Returns static install scripts for Horizon.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :single_account (String)

    Get static script for single account

  • :organization_id (String)

    AWS organization ID

  • :delete (String)
  • :account_type (String)

    Account type (e.g.: commercial,gov) Only applicable when registering AWS commercial account in a Gov environment

Returns:



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

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

#get_horizon_d4_c_scripts_with_http_info(opts = {}) ⇒ Array<(RegistrationStaticScriptsResponse, Integer, Hash)>

Returns static install scripts for Horizon.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :single_account (String)

    Get static script for single account

  • :organization_id (String)

    AWS organization ID

  • :delete (String)
  • :account_type (String)

    Account type (e.g.: commercial,gov) Only applicable when registering AWS commercial account in a Gov environment

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
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1380

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

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

  allowable_values = ["false", "true"]
  if @api_client.config.client_side_validation && opts[:'delete'] && !allowable_values.include?(opts[:'delete'])
    fail ArgumentError, "invalid value for \"delete\", must be one of #{allowable_values}"
  end
  pattern = Regexp.new(/^(true|false)$/)
  if @api_client.config.client_side_validation && !opts[:'delete'].nil? && opts[:'delete'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"delete\"]' when calling D4cRegistration.get_horizon_d4_c_scripts, 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 D4cRegistration.get_horizon_d4_c_scripts, must conform to the pattern #{pattern}."
  end

  # resource path
  local_var_path = '/settings-discover/entities/gen/scripts/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'single_account'] = opts[:'single_account'] if !opts[:'single_account'].nil?
  query_params[:'organization-id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
  query_params[:'delete'] = opts[:'delete'] if !opts[:'delete'].nil?
  query_params[:'account_type'] = opts[:'account_type'] if !opts[:'account_type'].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] || 'RegistrationStaticScriptsResponse'

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

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

#update_d4_cgcp_service_accounts_ext(body, opts = {}) ⇒ RegistrationGCPServiceAccountResponseExtV1

Patches the service account key for external clients.

Parameters:

Returns:



1464
1465
1466
1467
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1464

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

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

Patches the service account key for external clients.

Parameters:

Returns:



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
1518
1519
1520
1521
1522
1523
1524
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1473

def update_d4_cgcp_service_accounts_ext_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.update_d4_cgcp_service_accounts_ext ...'
  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 D4cRegistration.update_d4_cgcp_service_accounts_ext"
  end
  # resource path
  local_var_path = '/cloud-connect-gcp/entities/service-accounts/v1'

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

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

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

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

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

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

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

#update_discover_cloud_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):

  • :object_id (String)

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

  • :tenant_id (String)

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

Returns:



1532
1533
1534
1535
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1532

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

#update_discover_cloud_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):

  • :object_id (String)

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

  • :tenant_id (String)

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

Returns:



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
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
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
# File 'lib/crimson-falcon/api/d4c_registration.rb', line 1543

def (id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_azure_account_client_id, must conform to the pattern #{pattern}."
  end

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

  if @api_client.config.client_side_validation && !opts[:'object_id'].nil? && opts[:'object_id'].to_s.length < 36
    fail ArgumentError, 'invalid value for "opts[:"object_id"]" when calling D4cRegistration.update_discover_cloud_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[:'object_id'].nil? && opts[:'object_id'] !~ pattern
    fail ArgumentError, "invalid value for 'opts[:\"object_id\"]' when calling D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_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 D4cRegistration.update_discover_cloud_azure_account_client_id, must conform to the pattern #{pattern}."
  end

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

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id
  query_params[:'object_id'] = opts[:'object_id'] if !opts[:'object_id'].nil?
  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 => :"D4cRegistration.update_discover_cloud_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: D4cRegistration#update_discover_cloud_azure_account_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end