Class: Falcon::UnidentifiedContainersApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UnidentifiedContainersApi

Returns a new instance of UnidentifiedContainersApi.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

#read_unidentified_containers_by_date_range_count(opts = {}) ⇒ ModelsAggregateValuesByFieldResponse

Returns the count of Unidentified Containers over the last 7 days

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

Returns:



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

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

#read_unidentified_containers_by_date_range_count_with_http_info(opts = {}) ⇒ Array<(ModelsAggregateValuesByFieldResponse, Integer, Hash)>

Returns the count of Unidentified Containers over the last 7 days

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

Returns:



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

def read_unidentified_containers_by_date_range_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.read_unidentified_containers_by_date_range_count ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/unidentified-containers/count-by-date/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] || 'ModelsAggregateValuesByFieldResponse'

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

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

#read_unidentified_containers_count(opts = {}) ⇒ UnidentifiedcontainersUnidentifiedContainersCountValue

Returns the total count of Unidentified Containers over a time period

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

Returns:



101
102
103
104
# File 'lib/crimson-falcon/api/unidentified_containers_api.rb', line 101

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

#read_unidentified_containers_count_with_http_info(opts = {}) ⇒ Array<(UnidentifiedcontainersUnidentifiedContainersCountValue, Integer, Hash)>

Returns the total count of Unidentified Containers over a time period

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

Returns:



110
111
112
113
114
115
116
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
# File 'lib/crimson-falcon/api/unidentified_containers_api.rb', line 110

def read_unidentified_containers_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.read_unidentified_containers_count ...'
  end
  # resource path
  local_var_path = '/container-security/aggregates/unidentified-containers/count/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] || 'UnidentifiedcontainersUnidentifiedContainersCountValue'

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

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

#search_and_read_unidentified_containers(opts = {}) ⇒ UnidentifiedcontainersUnidentifiedContainerAPIResponse

Search Unidentified Containers by the provided search criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

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



162
163
164
165
# File 'lib/crimson-falcon/api/unidentified_containers_api.rb', line 162

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

#search_and_read_unidentified_containers_with_http_info(opts = {}) ⇒ Array<(UnidentifiedcontainersUnidentifiedContainerAPIResponse, Integer, Hash)>

Search Unidentified Containers by the provided search criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filters: assessed_images_count,cid,cluster_name,containers_impacted_count,detections_count,image_assessment_detections_count,last_seen,namespace,node_name,severity,unassessed_images_count,visible_to_k8s

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



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

def search_and_read_unidentified_containers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainersApi.search_and_read_unidentified_containers ...'
  end
  # resource path
  local_var_path = '/container-security/combined/unidentified-containers/v1'

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

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

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