Class: Falcon::PreventionPoliciesApi
- Inherits:
-
Object
- Object
- Falcon::PreventionPoliciesApi
- Defined in:
- lib/crimson-falcon/api/prevention_policies_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_prevention_policies(body, opts = {}) ⇒ PreventionRespV1
Create Prevention Policies by specifying details about the policy to create.
-
#create_prevention_policies_with_http_info(body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Create Prevention Policies by specifying details about the policy to create.
-
#delete_prevention_policies(ids, opts = {}) ⇒ MsaQueryResponse
Delete a set of Prevention Policies by specifying their IDs.
-
#delete_prevention_policies_with_http_info(ids, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Delete a set of Prevention Policies by specifying their IDs.
-
#get_prevention_policies(ids, opts = {}) ⇒ PreventionRespV1
Retrieve a set of Prevention Policies by specifying their IDs.
-
#get_prevention_policies_with_http_info(ids, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Retrieve a set of Prevention Policies by specifying their IDs.
-
#initialize(api_client = ApiClient.default) ⇒ PreventionPoliciesApi
constructor
A new instance of PreventionPoliciesApi.
-
#perform_prevention_policies_action(action_name, body, opts = {}) ⇒ PreventionRespV1
Perform the specified action on the Prevention Policies specified in the request.
-
#perform_prevention_policies_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Perform the specified action on the Prevention Policies specified in the request.
-
#query_combined_prevention_policies(opts = {}) ⇒ PreventionRespV1
Search for Prevention Policies in your environment by providing an FQL filter and paging details.
-
#query_combined_prevention_policies_with_http_info(opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Search for Prevention Policies in your environment by providing an FQL filter and paging details.
-
#query_combined_prevention_policy_members(opts = {}) ⇒ BasePolicyMembersRespV1
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details.
-
#query_combined_prevention_policy_members_with_http_info(opts = {}) ⇒ Array<(BasePolicyMembersRespV1, Integer, Hash)>
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details.
-
#query_prevention_policies(opts = {}) ⇒ MsaQueryResponse
Search for Prevention Policies in your environment by providing an FQL filter and paging details.
-
#query_prevention_policies_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Search for Prevention Policies in your environment by providing an FQL filter and paging details.
-
#query_prevention_policy_members(opts = {}) ⇒ MsaQueryResponse
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details.
-
#query_prevention_policy_members_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details.
-
#set_prevention_policies_precedence(body, opts = {}) ⇒ MsaQueryResponse
Sets the precedence of Prevention Policies based on the order of IDs specified in the request.
-
#set_prevention_policies_precedence_with_http_info(body, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Sets the precedence of Prevention Policies based on the order of IDs specified in the request.
-
#update_prevention_policies(body, opts = {}) ⇒ PreventionRespV1
Update Prevention Policies by specifying the ID of the policy and details to update.
-
#update_prevention_policies_with_http_info(body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Update Prevention Policies by specifying the ID of the policy and details to update.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PreventionPoliciesApi
Returns a new instance of PreventionPoliciesApi.
36 37 38 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 36 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
34 35 36 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 34 def api_client @api_client end |
Instance Method Details
#create_prevention_policies(body, opts = {}) ⇒ PreventionRespV1
Create Prevention Policies by specifying details about the policy to create
43 44 45 46 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 43 def create_prevention_policies(body, opts = {}) data, _status_code, _headers = create_prevention_policies_with_http_info(body, opts) data end |
#create_prevention_policies_with_http_info(body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Create Prevention Policies by specifying details about the policy to create
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 103 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 52 def create_prevention_policies_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.create_prevention_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 PreventionPoliciesApi.create_prevention_policies" end # resource path local_var_path = '/policy/entities/prevention/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] || 'PreventionRespV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"PreventionPoliciesApi.create_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#create_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_prevention_policies(ids, opts = {}) ⇒ MsaQueryResponse
Delete a set of Prevention Policies by specifying their IDs
109 110 111 112 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 109 def delete_prevention_policies(ids, opts = {}) data, _status_code, _headers = delete_prevention_policies_with_http_info(ids, opts) data end |
#delete_prevention_policies_with_http_info(ids, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Delete a set of Prevention Policies by specifying their IDs
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 118 def delete_prevention_policies_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.delete_prevention_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 PreventionPoliciesApi.delete_prevention_policies" end # resource path local_var_path = '/policy/entities/prevention/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'] = opts.merge( :operation => :"PreventionPoliciesApi.delete_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#delete_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_prevention_policies(ids, opts = {}) ⇒ PreventionRespV1
Retrieve a set of Prevention Policies by specifying their IDs
171 172 173 174 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 171 def get_prevention_policies(ids, opts = {}) data, _status_code, _headers = get_prevention_policies_with_http_info(ids, opts) data end |
#get_prevention_policies_with_http_info(ids, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Retrieve a set of Prevention Policies by specifying their IDs
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 227 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 180 def get_prevention_policies_with_http_info(ids, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.get_prevention_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 PreventionPoliciesApi.get_prevention_policies" end # resource path local_var_path = '/policy/entities/prevention/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] || 'PreventionRespV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"PreventionPoliciesApi.get_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#get_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#perform_prevention_policies_action(action_name, body, opts = {}) ⇒ PreventionRespV1
Perform the specified action on the Prevention Policies specified in the request
234 235 236 237 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 234 def perform_prevention_policies_action(action_name, body, opts = {}) data, _status_code, _headers = perform_prevention_policies_action_with_http_info(action_name, body, opts) data end |
#perform_prevention_policies_action_with_http_info(action_name, body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Perform the specified action on the Prevention Policies specified in the request
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 305 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 244 def perform_prevention_policies_action_with_http_info(action_name, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.perform_prevention_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 PreventionPoliciesApi.perform_prevention_policies_action" end # verify enum value allowable_values = ["add-host-group", "add-rule-group", "disable", "enable", "remove-host-group", "remove-rule-group"] 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 PreventionPoliciesApi.perform_prevention_policies_action" end # resource path local_var_path = '/policy/entities/prevention-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] || 'PreventionRespV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"PreventionPoliciesApi.perform_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#perform_prevention_policies_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#query_combined_prevention_policies(opts = {}) ⇒ PreventionRespV1
Search for Prevention Policies in your environment by providing an FQL filter and paging details. Returns a set of Prevention Policies which match the filter criteria
314 315 316 317 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 314 def query_combined_prevention_policies(opts = {}) data, _status_code, _headers = query_combined_prevention_policies_with_http_info(opts) data end |
#query_combined_prevention_policies_with_http_info(opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Search for Prevention Policies in your environment by providing an FQL filter and paging details. Returns a set of Prevention Policies which match the filter criteria
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 388 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 326 def query_combined_prevention_policies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.query_combined_prevention_policies ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PreventionPoliciesApi.query_combined_prevention_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 PreventionPoliciesApi.query_combined_prevention_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 PreventionPoliciesApi.query_combined_prevention_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/prevention/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] || 'PreventionRespV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"PreventionPoliciesApi.query_combined_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#query_combined_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#query_combined_prevention_policy_members(opts = {}) ⇒ BasePolicyMembersRespV1
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria
398 399 400 401 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 398 def query_combined_prevention_policy_members(opts = {}) data, _status_code, _headers = query_combined_prevention_policy_members_with_http_info(opts) data end |
#query_combined_prevention_policy_members_with_http_info(opts = {}) ⇒ Array<(BasePolicyMembersRespV1, Integer, Hash)>
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details. Returns a set of host details which match the filter criteria
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 470 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 411 def query_combined_prevention_policy_members_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.query_combined_prevention_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 PreventionPoliciesApi.query_combined_prevention_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 PreventionPoliciesApi.query_combined_prevention_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 PreventionPoliciesApi.query_combined_prevention_policy_members, must be greater than or equal to 1.' end # resource path local_var_path = '/policy/combined/prevention-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'] = opts.merge( :operation => :"PreventionPoliciesApi.query_combined_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#query_combined_prevention_policy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#query_prevention_policies(opts = {}) ⇒ MsaQueryResponse
Search for Prevention Policies in your environment by providing an FQL filter and paging details. Returns a set of Prevention Policy IDs which match the filter criteria
479 480 481 482 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 479 def query_prevention_policies(opts = {}) data, _status_code, _headers = query_prevention_policies_with_http_info(opts) data end |
#query_prevention_policies_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Search for Prevention Policies in your environment by providing an FQL filter and paging details. Returns a set of Prevention Policy IDs which match the filter criteria
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 553 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 491 def query_prevention_policies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.query_prevention_policies ...' end if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0 fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling PreventionPoliciesApi.query_prevention_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 PreventionPoliciesApi.query_prevention_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 PreventionPoliciesApi.query_prevention_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/prevention/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'] = opts.merge( :operation => :"PreventionPoliciesApi.query_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#query_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#query_prevention_policy_members(opts = {}) ⇒ MsaQueryResponse
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria
563 564 565 566 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 563 def query_prevention_policy_members(opts = {}) data, _status_code, _headers = query_prevention_policy_members_with_http_info(opts) data end |
#query_prevention_policy_members_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Search for members of a Prevention Policy in your environment by providing an FQL filter and paging details. Returns a set of Agent IDs which match the filter criteria
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 635 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 576 def query_prevention_policy_members_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.query_prevention_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 PreventionPoliciesApi.query_prevention_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 PreventionPoliciesApi.query_prevention_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 PreventionPoliciesApi.query_prevention_policy_members, must be greater than or equal to 1.' end # resource path local_var_path = '/policy/queries/prevention-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'] = opts.merge( :operation => :"PreventionPoliciesApi.query_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#query_prevention_policy_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#set_prevention_policies_precedence(body, opts = {}) ⇒ MsaQueryResponse
Sets the precedence of Prevention 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 for a platform when updating precedence
641 642 643 644 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 641 def set_prevention_policies_precedence(body, opts = {}) data, _status_code, _headers = set_prevention_policies_precedence_with_http_info(body, opts) data end |
#set_prevention_policies_precedence_with_http_info(body, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>
Sets the precedence of Prevention 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 for a platform when updating precedence
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 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 650 def set_prevention_policies_precedence_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.set_prevention_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 PreventionPoliciesApi.set_prevention_policies_precedence" end # resource path local_var_path = '/policy/entities/prevention-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'] = opts.merge( :operation => :"PreventionPoliciesApi.set_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#set_prevention_policies_precedence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_prevention_policies(body, opts = {}) ⇒ PreventionRespV1
Update Prevention Policies by specifying the ID of the policy and details to update
707 708 709 710 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 707 def update_prevention_policies(body, opts = {}) data, _status_code, _headers = update_prevention_policies_with_http_info(body, opts) data end |
#update_prevention_policies_with_http_info(body, opts = {}) ⇒ Array<(PreventionRespV1, Integer, Hash)>
Update Prevention Policies by specifying the ID of the policy and details to update
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 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/crimson-falcon/api/prevention_policies_api.rb', line 716 def update_prevention_policies_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PreventionPoliciesApi.update_prevention_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 PreventionPoliciesApi.update_prevention_policies" end # resource path local_var_path = '/policy/entities/prevention/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] || 'PreventionRespV1' # auth_names auth_names = opts[:debug_auth_names] || ['oauth2'] = opts.merge( :operation => :"PreventionPoliciesApi.update_prevention_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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: PreventionPoliciesApi#update_prevention_policies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |