Class: Falcon::ContentUpdatePolicies

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ContentUpdatePolicies

Returns a new instance of ContentUpdatePolicies.



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

def api_client
  @api_client
end

Instance Method Details

#create_content_update_policies(body, opts = {}) ⇒ ContentUpdateRespV1

Create Content Update Policies by specifying details about the policy to create

Parameters:

Returns:



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

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

#create_content_update_policies_with_http_info(body, opts = {}) ⇒ Array<(ContentUpdateRespV1, Integer, Hash)>

Create Content Update Policies by specifying details about the policy to create

Parameters:

Returns:

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

    ContentUpdateRespV1 data, response status code and response headers



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

def create_content_update_policies_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.create_content_update_policies ...'
  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 ContentUpdatePolicies.create_content_update_policies"
  end
  # resource path
  local_var_path = '/policy/entities/content-update/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] || 'ContentUpdateRespV1'

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

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

#delete_content_update_policies(ids, opts = {}) ⇒ MsaQueryResponse

Delete a set of Content Update Policies by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Content Update Policies to delete

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

    the optional parameters

Returns:



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

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

#delete_content_update_policies_with_http_info(ids, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Delete a set of Content Update Policies by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Content Update Policies to delete

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



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

def delete_content_update_policies_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.delete_content_update_policies ...'
  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 ContentUpdatePolicies.delete_content_update_policies"
  end
  # resource path
  local_var_path = '/policy/entities/content-update/v1'

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

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

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

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

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

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

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

#get_content_update_policies(ids, opts = {}) ⇒ ContentUpdateRespV1

Retrieve a set of Content Update Policies by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Content Update Policies to return

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

    the optional parameters

Returns:



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

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

#get_content_update_policies_with_http_info(ids, opts = {}) ⇒ Array<(ContentUpdateRespV1, Integer, Hash)>

Retrieve a set of Content Update Policies by specifying their IDs

Parameters:

  • ids (Array<String>)

    The IDs of the Content Update Policies to return

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

    the optional parameters

Returns:

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

    ContentUpdateRespV1 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/content_update_policies.rb', line 179

def get_content_update_policies_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.get_content_update_policies ...'
  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 ContentUpdatePolicies.get_content_update_policies"
  end
  # resource path
  local_var_path = '/policy/entities/content-update/v1'

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

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

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

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

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

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

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

#perform_content_update_policies_action(action_name, body, opts = {}) ⇒ ContentUpdateRespV1

Perform the specified action on the Content Update Policies specified in the request

Parameters:

  • action_name (String)

    The action to perform

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

    the optional parameters

Returns:



233
234
235
236
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 233

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

#perform_content_update_policies_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(ContentUpdateRespV1, Integer, Hash)>

Perform the specified action on the Content Update Policies specified in the request

Parameters:

  • action_name (String)

    The action to perform

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

    the optional parameters

Returns:

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

    ContentUpdateRespV1 data, response status code and response headers



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

def perform_content_update_policies_action_with_http_info(action_name, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.perform_content_update_policies_action ...'
  end
  # verify the required parameter 'action_name' is set
  if @api_client.config.client_side_validation && action_name.nil?
    fail ArgumentError, "Missing the required parameter 'action_name' when calling ContentUpdatePolicies.perform_content_update_policies_action"
  end
  # verify enum value
  allowable_values = ["add-host-group", "disable", "enable", "override-allow", "override-pause", "override-revert", "remove-host-group", "remove-pinned-content-version", "set-pinned-content-version"]
  if @api_client.config.client_side_validation && !allowable_values.include?(action_name)
    fail ArgumentError, "invalid value for \"action_name\", must be one of #{allowable_values}"
  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 ContentUpdatePolicies.perform_content_update_policies_action"
  end
  # resource path
  local_var_path = '/policy/entities/content-update-actions/v1'

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

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

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

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

#query_combined_content_update_policies(opts = {}) ⇒ ContentUpdateRespV1

Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



313
314
315
316
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 313

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

#query_combined_content_update_policies_with_http_info(opts = {}) ⇒ Array<(ContentUpdateRespV1, Integer, Hash)>

Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policies which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    ContentUpdateRespV1 data, response status code and response headers



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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 325

def query_combined_content_update_policies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_combined_content_update_policies ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be smaller than or equal to 5000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policies, must be greater than or equal to 1.'
  end

  allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "enabled.asc", "enabled.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc", "platform_name.asc", "platform_name.desc", "precedence.asc", "precedence.desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/policy/combined/content-update/v1'

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

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

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

#query_combined_content_update_policy_members(opts = {}) ⇒ BasePolicyMembersRespV1

Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Content Update Policy to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



397
398
399
400
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 397

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

#query_combined_content_update_policy_members_with_http_info(opts = {}) ⇒ Array<(BasePolicyMembersRespV1, Integer, Hash)>

Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Content Update Policy to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    BasePolicyMembersRespV1 data, response status code and response headers



410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 410

def query_combined_content_update_policy_members_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_combined_content_update_policy_members ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be smaller than or equal to 5000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_combined_content_update_policy_members, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/policy/combined/content-update-members/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'BasePolicyMembersRespV1'

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

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

#query_content_update_policies(opts = {}) ⇒ MsaQueryResponse

Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



478
479
480
481
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 478

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

#query_content_update_policies_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Search for Content Update Policies in your environment by providing an FQL filter and paging details. Returns a set of Content Update Policy IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    MsaQueryResponse data, response status code and response headers



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

def query_content_update_policies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_content_update_policies ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_content_update_policies, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policies, must be smaller than or equal to 5000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policies, must be greater than or equal to 1.'
  end

  allowable_values = ["created_by.asc", "created_by.desc", "created_timestamp.asc", "created_timestamp.desc", "enabled.asc", "enabled.desc", "modified_by.asc", "modified_by.desc", "modified_timestamp.asc", "modified_timestamp.desc", "name.asc", "name.desc", "platform_name.asc", "platform_name.desc", "precedence.asc", "precedence.desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/policy/queries/content-update/v1'

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

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

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

#query_content_update_policy_members(opts = {}) ⇒ MsaQueryResponse

Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Content Update Policy to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:



562
563
564
565
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 562

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

#query_content_update_policy_members_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Search for members of a Content Update Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    The ID of the Content Update Policy to search for members of

  • :filter (String)

    The filter expression that should be used to limit the results

  • :offset (Integer)

    The offset to start retrieving records from

  • :limit (Integer)

    The maximum records to return. [1-5000]

  • :sort (String)

    The property to sort by

Returns:

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

    MsaQueryResponse data, response status code and response headers



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

def query_content_update_policy_members_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_content_update_policy_members ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 5000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be smaller than or equal to 5000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ContentUpdatePolicies.query_content_update_policy_members, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/policy/queries/content-update-members/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].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] || 'MsaQueryResponse'

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

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

#query_pinnable_content_versions(category, opts = {}) ⇒ MsaspecQueryResponse

Search for content versions available for pinning given the category.

Parameters:

  • category (String)

    Content category

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

    the optional parameters

Options Hash (opts):

  • :sort (String)

    value to sort returned content versions by. Allowed sort values are deployed_timestamp.(asc|desc) defaulting to deployed_timestamp.desc (default to ‘deployed_timestamp.desc’)

Returns:



641
642
643
644
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 641

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

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

Search for content versions available for pinning given the category.

Parameters:

  • category (String)

    Content category

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

    the optional parameters

Options Hash (opts):

  • :sort (String)

    value to sort returned content versions by. Allowed sort values are deployed_timestamp.(asc|desc) defaulting to deployed_timestamp.desc (default to ‘deployed_timestamp.desc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



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
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 651

def query_pinnable_content_versions_with_http_info(category, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.query_pinnable_content_versions ...'
  end
  # verify the required parameter 'category' is set
  if @api_client.config.client_side_validation && category.nil?
    fail ArgumentError, "Missing the required parameter 'category' when calling ContentUpdatePolicies.query_pinnable_content_versions"
  end
  # verify enum value
  allowable_values = ["rapid_response_al_bl_listing", "sensor_operations", "system_critical", "vulnerability_management"]
  if @api_client.config.client_side_validation && !allowable_values.include?(category)
    fail ArgumentError, "invalid value for \"category\", must be one of #{allowable_values}"
  end
  allowable_values = ["deployed_timestamp.asc", "deployed_timestamp.desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/policy/queries/content-update-pin-versions/v1'

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

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

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

#set_content_update_policies_precedence(body, opts = {}) ⇒ MsaQueryResponse

Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence

Parameters:

Returns:



714
715
716
717
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 714

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

#set_content_update_policies_precedence_with_http_info(body, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Sets the precedence of Content Update Policies based on the order of IDs specified in the request. The first ID specified will have the highest precedence and the last ID specified will have the lowest. You must specify all non-Default Policies when updating precedence

Parameters:

Returns:

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

    MsaQueryResponse data, response status code and response headers



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
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 723

def set_content_update_policies_precedence_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.set_content_update_policies_precedence ...'
  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 ContentUpdatePolicies.set_content_update_policies_precedence"
  end
  # resource path
  local_var_path = '/policy/entities/content-update-precedence/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] || 'MsaQueryResponse'

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

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

#update_content_update_policies(body, opts = {}) ⇒ ContentUpdateRespV1

Update Content Update Policies by specifying the ID of the policy and details to update

Parameters:

Returns:



780
781
782
783
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 780

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

#update_content_update_policies_with_http_info(body, opts = {}) ⇒ Array<(ContentUpdateRespV1, Integer, Hash)>

Update Content Update Policies by specifying the ID of the policy and details to update

Parameters:

Returns:

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

    ContentUpdateRespV1 data, response status code and response headers



789
790
791
792
793
794
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
# File 'lib/crimson-falcon/api/content_update_policies.rb', line 789

def update_content_update_policies_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ContentUpdatePolicies.update_content_update_policies ...'
  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 ContentUpdatePolicies.update_content_update_policies"
  end
  # resource path
  local_var_path = '/policy/entities/content-update/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] || 'ContentUpdateRespV1'

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

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