Class: Falcon::FalconContainerImage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ FalconContainerImage

Returns a new instance of FalconContainerImage.



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

def api_client
  @api_client
end

Instance Method Details

#create_registry_entities(body, opts = {}) ⇒ DomainExternalRegistryResponse

Create a registry entity using the provided details

Parameters:

Returns:



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

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

#create_registry_entities_with_http_info(body, opts = {}) ⇒ Array<(DomainExternalRegistryResponse, Integer, Hash)>

Create a registry entity using the provided details

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

def create_registry_entities_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.create_registry_entities ...'
  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 FalconContainerImage.create_registry_entities"
  end
  # resource path
  local_var_path = '/container-security/entities/registries/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] || 'DomainExternalRegistryResponse'

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

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

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

#delete_registry_entities(ids, opts = {}) ⇒ DomainExternalRegistryListResponse

Delete the registry entity identified by the entity UUID

Parameters:

  • ids (String)

    Registry entity UUID

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

    the optional parameters

Returns:



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

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

#delete_registry_entities_with_http_info(ids, opts = {}) ⇒ Array<(DomainExternalRegistryListResponse, Integer, Hash)>

Delete the registry entity identified by the entity UUID

Parameters:

  • ids (String)

    Registry entity UUID

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

    the optional 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
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 117

def delete_registry_entities_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.delete_registry_entities ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling FalconContainerImage.delete_registry_entities"
  end
  # resource path
  local_var_path = '/container-security/entities/registries/v1'

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

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

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

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

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

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

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

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

#download_export_file(id, opts = {}) ⇒ Array<Integer>

Download an export file

Parameters:

  • id (String)

    Export job ID.

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

    the optional parameters

Returns:

  • (Array<Integer>)


170
171
172
173
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 170

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

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

Download an export file

Parameters:

  • id (String)

    Export job ID.

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

    the optional parameters

Returns:

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

    Array<Integer> data, response status code and response headers



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

def download_export_file_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.download_export_file ...'
  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 FalconContainerImage.download_export_file"
  end
  # resource path
  local_var_path = '/container-security/entities/exports/files/v1'

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

  # 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] || 'Array<Integer>'

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

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

#get_report_by_reference(opts = {}) ⇒ CoreEntitiesResponse

Get image assessment scan report by image reference (v2)

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :registry (String)

    Registry

  • :repository (String)

    Repository

  • :tag (String)

    Tag

  • :image_id (String)

    Image ID

  • :digest (String)

    Digest

  • :architecture (String)

    Platform architecture to filter multi-arch images (e.g. amd64, arm64)

  • :report_format (String)

    Specify image-assessment scan report format. Supported formats: - &#x60;cyclonedx-json&#x60; - &#x60;json&#x60; - &#x60;sarif&#x60; (default to ‘json’)

Returns:



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

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

#get_report_by_reference_with_http_info(opts = {}) ⇒ Array<(CoreEntitiesResponse, Integer, Hash)>

Get image assessment scan report by image reference (v2)

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :registry (String)

    Registry

  • :repository (String)

    Repository

  • :tag (String)

    Tag

  • :image_id (String)

    Image ID

  • :digest (String)

    Digest

  • :architecture (String)

    Platform architecture to filter multi-arch images (e.g. amd64, arm64)

  • :report_format (String)

    Specify image-assessment scan report format. Supported formats: - &#x60;cyclonedx-json&#x60; - &#x60;json&#x60; - &#x60;sarif&#x60; (default to ‘json’)

Returns:

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

    CoreEntitiesResponse data, response status code and response headers



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

def get_report_by_reference_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.get_report_by_reference ...'
  end
  # resource path
  local_var_path = '/image-assessment/entities/reports/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'registry'] = opts[:'registry'] if !opts[:'registry'].nil?
  query_params[:'repository'] = opts[:'repository'] if !opts[:'repository'].nil?
  query_params[:'tag'] = opts[:'tag'] if !opts[:'tag'].nil?
  query_params[:'image_id'] = opts[:'image_id'] if !opts[:'image_id'].nil?
  query_params[:'digest'] = opts[:'digest'] if !opts[:'digest'].nil?
  query_params[:'architecture'] = opts[:'architecture'] if !opts[:'architecture'].nil?
  query_params[:'report_format'] = opts[:'report_format'] if !opts[:'report_format'].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] || 'CoreEntitiesResponse'

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

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

#get_report_by_scan_id(uuid, opts = {}) ⇒ CoreEntitiesResponse

Get image assessment scan report by scan UUID (v2)

Parameters:

  • uuid (String)

    Scan UUID

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

    the optional parameters

Options Hash (opts):

  • :report_format (String)

    Specify image-assessment scan report format. Supported formats: - &#x60;cyclonedx-json&#x60; - &#x60;json&#x60; - &#x60;sarif&#x60; (default to ‘json’)

Returns:



309
310
311
312
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 309

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

#get_report_by_scan_id_with_http_info(uuid, opts = {}) ⇒ Array<(CoreEntitiesResponse, Integer, Hash)>

Get image assessment scan report by scan UUID (v2)

Parameters:

  • uuid (String)

    Scan UUID

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

    the optional parameters

Options Hash (opts):

  • :report_format (String)

    Specify image-assessment scan report format. Supported formats: - &#x60;cyclonedx-json&#x60; - &#x60;json&#x60; - &#x60;sarif&#x60; (default to ‘json’)

Returns:

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

    CoreEntitiesResponse data, response status code and response headers



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
362
363
364
365
366
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 319

def get_report_by_scan_id_with_http_info(uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.get_report_by_scan_id ...'
  end
  # verify the required parameter 'uuid' is set
  if @api_client.config.client_side_validation && uuid.nil?
    fail ArgumentError, "Missing the required parameter 'uuid' when calling FalconContainerImage.get_report_by_scan_id"
  end
  # resource path
  local_var_path = '/image-assessment/entities/reports/v2/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s))

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

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

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

#head_image_scan_inventory(opts = {}) ⇒ nil

Get headers for POST request for image scan inventory

Parameters:

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

    the optional parameters

Returns:

  • (nil)


371
372
373
374
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 371

def head_image_scan_inventory(opts = {})
  head_image_scan_inventory_with_http_info(opts)
  nil
end

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

Get headers for POST request for image scan inventory

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def head_image_scan_inventory_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.head_image_scan_inventory ...'
  end
  # resource path
  local_var_path = '/image-assessment/entities/image-inventory/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]

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

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

#launch_export_job(body, opts = {}) ⇒ ExportsLaunchExportResponse

Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource

Parameters:

  • body (ExportsLaunchExportRequest)

    Supported resources: - &#x60;assets.clusters&#x60; - &#x60;assets.containers&#x60; - &#x60;assets.deployments&#x60; - &#x60;assets.images&#x60; - &#x60;assets.namespaces&#x60; - &#x60;assets.nodes&#x60; - &#x60;assets.pods&#x60; - &#x60;images.images-assessment-detections-expanded&#x60; - &#x60;images.images-assessment-expanded&#x60; - &#x60;images.images-assessment-vulnerabilities-expanded&#x60; - &#x60;images.images-assessment&#x60; - &#x60;images.images-detections&#x60; - &#x60;images.packages&#x60; - &#x60;images.vulnerabilities&#x60; - &#x60;investigate.container-alerts&#x60; - &#x60;investigate.drift-indicators&#x60; - &#x60;investigate.kubernetes-ioms&#x60; - &#x60;investigate.runtime-detections&#x60; - &#x60;investigate.unidentified-containers&#x60; - &#x60;policies.exclusions&#x60;

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

    the optional parameters

Returns:



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

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

#launch_export_job_with_http_info(body, opts = {}) ⇒ Array<(ExportsLaunchExportResponse, Integer, Hash)>

Launch an export job of a Container Security resource. Maximum of 1 job in progress per resource

Parameters:

  • body (ExportsLaunchExportRequest)

    Supported resources: - &#x60;assets.clusters&#x60; - &#x60;assets.containers&#x60; - &#x60;assets.deployments&#x60; - &#x60;assets.images&#x60; - &#x60;assets.namespaces&#x60; - &#x60;assets.nodes&#x60; - &#x60;assets.pods&#x60; - &#x60;images.images-assessment-detections-expanded&#x60; - &#x60;images.images-assessment-expanded&#x60; - &#x60;images.images-assessment-vulnerabilities-expanded&#x60; - &#x60;images.images-assessment&#x60; - &#x60;images.images-detections&#x60; - &#x60;images.packages&#x60; - &#x60;images.vulnerabilities&#x60; - &#x60;investigate.container-alerts&#x60; - &#x60;investigate.drift-indicators&#x60; - &#x60;investigate.kubernetes-ioms&#x60; - &#x60;investigate.runtime-detections&#x60; - &#x60;investigate.unidentified-containers&#x60; - &#x60;policies.exclusions&#x60;

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

    the optional parameters

Returns:

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

    ExportsLaunchExportResponse data, response status code and response headers



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
479
480
481
482
483
484
485
486
487
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 436

def launch_export_job_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.launch_export_job ...'
  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 FalconContainerImage.launch_export_job"
  end
  # resource path
  local_var_path = '/container-security/entities/exports/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] || 'ExportsLaunchExportResponse'

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

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

#policy_checks(repository, tag, opts = {}) ⇒ ApiPolicyEntitiesResponse

Check image prevention policies

Parameters:

  • repository (String)

    Repository

  • tag (String)

    Tag

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

    the optional parameters

Options Hash (opts):

  • :registry (String)

    Registry

  • :architecture (String)

    Architecture e.g. &#39;amd64&#39;, &#39;arm64&#39;…

Returns:



496
497
498
499
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 496

def policy_checks(repository, tag, opts = {})
  data, _status_code, _headers = policy_checks_with_http_info(repository, tag, opts)
  data
end

#policy_checks_with_http_info(repository, tag, opts = {}) ⇒ Array<(ApiPolicyEntitiesResponse, Integer, Hash)>

Check image prevention policies

Parameters:

  • repository (String)

    Repository

  • tag (String)

    Tag

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

    the optional parameters

Options Hash (opts):

  • :registry (String)

    Registry

  • :architecture (String)

    Architecture e.g. &#39;amd64&#39;, &#39;arm64&#39;…

Returns:

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

    ApiPolicyEntitiesResponse data, response status code and response headers



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
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 508

def policy_checks_with_http_info(repository, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.policy_checks ...'
  end
  # verify the required parameter 'repository' is set
  if @api_client.config.client_side_validation && repository.nil?
    fail ArgumentError, "Missing the required parameter 'repository' when calling FalconContainerImage.policy_checks"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling FalconContainerImage.policy_checks"
  end
  # resource path
  local_var_path = '/image-assessment/entities/policy-checks/v2'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'repository'] = repository
  query_params[:'tag'] = tag
  query_params[:'registry'] = opts[:'registry'] if !opts[:'registry'].nil?
  query_params[:'architecture'] = opts[:'architecture'] if !opts[:'architecture'].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] || 'ApiPolicyEntitiesResponse'

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

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

#post_image_scan_inventory(body, opts = {}) ⇒ nil

Post image scan inventory

Parameters:

Returns:

  • (nil)


568
569
570
571
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 568

def post_image_scan_inventory(body, opts = {})
  post_image_scan_inventory_with_http_info(body, opts)
  nil
end

#post_image_scan_inventory_with_http_info(body, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Post image scan inventory

Parameters:

Returns:

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

    nil, response status code and response headers



577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 577

def post_image_scan_inventory_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.post_image_scan_inventory ...'
  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 FalconContainerImage.post_image_scan_inventory"
  end
  # resource path
  local_var_path = '/image-assessment/entities/image-inventory/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]

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

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

#query_export_jobs(opts = {}) ⇒ MsaspecQueryResponse

Query export jobs entities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - &#x60;resource&#x60; - &#x60;status&#x60;

Returns:



634
635
636
637
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 634

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

#query_export_jobs_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Query export jobs entities

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter exports using a query in Falcon Query Language (FQL). Only the last 100 jobs are returned. Supported filter fields: - &#x60;resource&#x60; - &#x60;status&#x60;

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



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
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 643

def query_export_jobs_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.query_export_jobs ...'
  end
  # resource path
  local_var_path = '/container-security/queries/exports/v1'

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

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

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

#read_export_jobs(ids, opts = {}) ⇒ ExportsExportsResponse

Read export jobs entities

Parameters:

  • ids (Array<String>)

    Export Job IDs to read. Allowed up to 100 IDs per request.

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

    the optional parameters

Returns:



692
693
694
695
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 692

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

#read_export_jobs_with_http_info(ids, opts = {}) ⇒ Array<(ExportsExportsResponse, Integer, Hash)>

Read export jobs entities

Parameters:

  • ids (Array<String>)

    Export Job IDs to read. Allowed up to 100 IDs per request.

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

    the optional parameters

Returns:

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

    ExportsExportsResponse data, response status code and response headers



701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 701

def read_export_jobs_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.read_export_jobs ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling FalconContainerImage.read_export_jobs"
  end
  # resource path
  local_var_path = '/container-security/entities/exports/v1'

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

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

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

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

#read_registry_entities(opts = {}) ⇒ DomainExternalQueryResponse

Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

  • :sort (String)

    The fields to sort the records on.

Returns:



756
757
758
759
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 756

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

#read_registry_entities_by_uuid(ids, opts = {}) ⇒ DomainExternalRegistryListResponse

Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100

Parameters:

  • ids (String)

    Registry entity UUID

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

    the optional parameters

Returns:



818
819
820
821
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 818

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

#read_registry_entities_by_uuid_with_http_info(ids, opts = {}) ⇒ Array<(DomainExternalRegistryListResponse, Integer, Hash)>

Retrieves a list of registry entities by the provided UUIDs. Maximum page size: 100

Parameters:

  • ids (String)

    Registry entity UUID

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

    the optional parameters

Returns:



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

def read_registry_entities_by_uuid_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.read_registry_entities_by_uuid ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling FalconContainerImage.read_registry_entities_by_uuid"
  end
  # resource path
  local_var_path = '/container-security/entities/registries/v1'

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

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

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

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

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

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

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

#read_registry_entities_with_http_info(opts = {}) ⇒ Array<(DomainExternalQueryResponse, Integer, Hash)>

Retrieves a list of registry entities identified by the customer id. Maximum page size: 5,000

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The upper-bound on the number of records to retrieve.

  • :offset (Integer)

    The offset from where to begin.

  • :sort (String)

    The fields to sort the records on.

Returns:

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

    DomainExternalQueryResponse data, response status code and response headers



767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 767

def read_registry_entities_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.read_registry_entities ...'
  end
  # resource path
  local_var_path = '/container-security/queries/registries/v1'

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

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

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

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

#update_registry_entities(id, body, opts = {}) ⇒ DomainExternalRegistryResponse

Update the registry entity, as identified by the entity UUID, using the provided details

Parameters:

Returns:



881
882
883
884
# File 'lib/crimson-falcon/api/falcon_container_image.rb', line 881

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

#update_registry_entities_with_http_info(id, body, opts = {}) ⇒ Array<(DomainExternalRegistryResponse, Integer, Hash)>

Update the registry entity, as identified by the entity UUID, using the provided details

Parameters:

Returns:



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

def update_registry_entities_with_http_info(id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: FalconContainerImage.update_registry_entities ...'
  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 FalconContainerImage.update_registry_entities"
  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 FalconContainerImage.update_registry_entities"
  end
  # resource path
  local_var_path = '/container-security/entities/registries/v1'

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

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

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

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

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