Class: Falcon::UnidentifiedContainers

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UnidentifiedContainers

Returns a new instance of UnidentifiedContainers.



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

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)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - `assessed_images_count` - `cid` - `cloud_account_id` - `cloud_name` - `cloud_region` - `cluster_id` - `cluster_name` - `containers_impacted_count` - `detections_count` - `image_assessment_detections_count` - `last_seen` - `namespace` - `node_name` - `severity` - `unassessed_images_count` - `visible_to_k8s`

Returns:



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

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)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;assessed_images_count&#x60; - &#x60;cid&#x60; - &#x60;cloud_account_id&#x60; - &#x60;cloud_name&#x60; - &#x60;cloud_region&#x60; - &#x60;cluster_id&#x60; - &#x60;cluster_name&#x60; - &#x60;containers_impacted_count&#x60; - &#x60;detections_count&#x60; - &#x60;image_assessment_detections_count&#x60; - &#x60;last_seen&#x60; - &#x60;namespace&#x60; - &#x60;node_name&#x60; - &#x60;severity&#x60; - &#x60;unassessed_images_count&#x60; - &#x60;visible_to_k8s&#x60;

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

def read_unidentified_containers_by_date_range_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainers.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 => :"UnidentifiedContainers.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: UnidentifiedContainers#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)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;assessed_images_count&#x60; - &#x60;cid&#x60; - &#x60;cloud_account_id&#x60; - &#x60;cloud_name&#x60; - &#x60;cloud_region&#x60; - &#x60;cluster_id&#x60; - &#x60;cluster_name&#x60; - &#x60;containers_impacted_count&#x60; - &#x60;detections_count&#x60; - &#x60;image_assessment_detections_count&#x60; - &#x60;last_seen&#x60; - &#x60;namespace&#x60; - &#x60;node_name&#x60; - &#x60;severity&#x60; - &#x60;unassessed_images_count&#x60; - &#x60;visible_to_k8s&#x60;

Returns:



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

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)

    Search Unidentified Containers using a query in Falcon Query Language (FQL). Supported filter fields: - &#x60;assessed_images_count&#x60; - &#x60;cid&#x60; - &#x60;cloud_account_id&#x60; - &#x60;cloud_name&#x60; - &#x60;cloud_region&#x60; - &#x60;cluster_id&#x60; - &#x60;cluster_name&#x60; - &#x60;containers_impacted_count&#x60; - &#x60;detections_count&#x60; - &#x60;image_assessment_detections_count&#x60; - &#x60;last_seen&#x60; - &#x60;namespace&#x60; - &#x60;node_name&#x60; - &#x60;severity&#x60; - &#x60;unassessed_images_count&#x60; - &#x60;visible_to_k8s&#x60;

Returns:



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

def read_unidentified_containers_count_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainers.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 => :"UnidentifiedContainers.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: UnidentifiedContainers#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 filter fields: - &#x60;assessed_images_count&#x60; - &#x60;cid&#x60; - &#x60;cloud_account_id&#x60; - &#x60;cloud_name&#x60; - &#x60;cloud_region&#x60; - &#x60;cluster_id&#x60; - &#x60;cluster_name&#x60; - &#x60;containers_impacted_count&#x60; - &#x60;detections_count&#x60; - &#x60;image_assessment_detections_count&#x60; - &#x60;last_seen&#x60; - &#x60;namespace&#x60; - &#x60;node_name&#x60; - &#x60;severity&#x60; - &#x60;unassessed_images_count&#x60; - &#x60;visible_to_k8s&#x60;

  • :sort (String)

    The fields to sort the records on.

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. Maximum limit: 100. (default to 100)

  • :offset (Integer)

    The offset from where to begin. Maximum offset &#x3D; 10000 - limit.

Returns:



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

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 filter fields: - &#x60;assessed_images_count&#x60; - &#x60;cid&#x60; - &#x60;cloud_account_id&#x60; - &#x60;cloud_name&#x60; - &#x60;cloud_region&#x60; - &#x60;cluster_id&#x60; - &#x60;cluster_name&#x60; - &#x60;containers_impacted_count&#x60; - &#x60;detections_count&#x60; - &#x60;image_assessment_detections_count&#x60; - &#x60;last_seen&#x60; - &#x60;namespace&#x60; - &#x60;node_name&#x60; - &#x60;severity&#x60; - &#x60;unassessed_images_count&#x60; - &#x60;visible_to_k8s&#x60;

  • :sort (String)

    The fields to sort the records on.

  • :limit (Integer)

    The upper-bound on the number of records to retrieve. Maximum limit: 100. (default to 100)

  • :offset (Integer)

    The offset from where to begin. Maximum offset &#x3D; 10000 - limit.

Returns:



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

def search_and_read_unidentified_containers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UnidentifiedContainers.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[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?

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