Class: DeepSecurity::HostFilter

Inherits:
TransportObject show all
Defined in:
lib/deepsecurity/transport_objects/host_filter.rb

Overview

Used as search criteria to limit the scope of objects returned by computer-related attributes, such as by a Group, a Security Profile, or a specific computer. The event retrieval- related methods will require a HostFilterTransport that is empty to search for all events, or with specific properties populated to limit the scope of the search. For example, setting the HostFilterTransport securityProfileID property to the ID of a Security Profile will limit any event retrieval method calls to events that pertain to computers with the specific Security Profile assigned.

Constant Summary

Constants inherited from SavonHelper::MappingObject

SavonHelper::MappingObject::BLACK_LIST

Instance Attribute Summary collapse

Attributes inherited from SavonHelper::MappingObject

#interface

Attributes included from SavonHelper::DSL

#alias_accessor

High-Level SOAP Wrapper collapse

Methods inherited from TransportObject

#manager

Methods inherited from SavonHelper::CachingObject

all_cache_aspects, #cachable?, #cache, cache_aspects, cache_by_aspect, cache_key, #cache_key, from_savon, #store_in_cache

Methods inherited from SavonHelper::MappingObject

all_type_mappings, defined_attributes, from_savon, has_attribute_chain, #initialize, #to_json, #to_s, #to_savon, type_mappings

Methods included from SavonHelper::DSL

#array_boolean_accessor, #array_datetime_accessor, #array_double_accessor, #array_enum_accessor, #array_float__accessor, #array_integer_accessor, #array_ip_address_accessor, #array_object_accessor, #array_string_accessor, #attr_boolean_accessor, #attr_datetime_accessor, #attr_double_accessor, #attr_enum_accessor, #attr_float_accessor, #attr_integer_accessor, #attr_ip_address_accessor, #attr_object_accessor, #attr_string_accessor, #hint_object_accessor

Constructor Details

This class inherits a constructor from SavonHelper::MappingObject

Instance Attribute Details

#hostGroupIDint

HostGroupTransport ID to filter computers by

Returns:

  • (int)


10
11
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 10

attr_integer_accessor :hostGroupID,
"HostGroupTransport ID to filter computers by"

#hostIDint

HostTransport ID to filter computers by

Returns:

  • (int)


12
13
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 12

attr_integer_accessor :hostID,
"HostTransport ID to filter computers by"

#securityProfileIDint

SecurityProfileTransport ID to filter computers by

Returns:

  • (int)


14
15
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 14

attr_integer_accessor :securityProfileID,
"SecurityProfileTransport ID to filter computers by"

#typeEnumHostFilterType

EnumHostFilterType to filter computers by

Returns:



16
17
18
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 16

attr_enum_accessor :type,
EnumHostFilterType,
"EnumHostFilterType to filter computers by"

Class Method Details

.all_hostsHostFilter

Return a new instance for all hosts.

Returns:



24
25
26
27
28
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 24

def self.all_hosts
  instance = self.new()
  instance.type = :all_hosts
  instance
end

.hosts_in_group(host_group_id) ⇒ HostFilter

Return a new instance for hosts in the group defined by the given host_group_id.

Parameters:

  • host_group_id (Integer)

Returns:



33
34
35
36
37
38
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 33

def self.hosts_in_group(host_group_id)
  instance = self.new()
  instance.type = :hosts_in_group
  instance.hostGroupID = host_group_id
  instance
end

.hosts_in_group_and_all_subgroups(host_group_id) ⇒ HostFilter

Return a new instance for hosts in the group and their subgroups defined by the given host_group_id.

Parameters:

  • host_group_id (Integer)

Returns:



53
54
55
56
57
58
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 53

def self.hosts_in_group_and_all_subgroups(host_group_id)
  instance = self.new()
  instance.type = :hosts_in_group_and_all_subgroups
  instance.hostGroupID = host_group_id
  instance
end

.hosts_using_security_profile(security_profile_id) ⇒ HostFilter

Return a new instance for hosts in the security profile defined by the given security_profile_id.

Parameters:

  • security_profile_id (Integer)

Returns:



43
44
45
46
47
48
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 43

def self.hosts_using_security_profile(security_profile_id)
  instance = self.new()
  instance.type = :hosts_using_security_profile
  instance.securityProfileID = security_profile_id
  instance
end

.my_hostsHostFilter

Return a new instance for "my" hosts.

Returns:



72
73
74
75
76
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 72

def self.my_hosts
  instance = self.new()
  instance.type = :my_hosts
  instance
end

.specific_host(host_id) ⇒ HostFilter

Return a new instance for hosts defined by the given host_id.

Parameters:

  • host_id (Integer)

Returns:



63
64
65
66
67
68
# File 'lib/deepsecurity/transport_objects/host_filter.rb', line 63

def self.specific_host(host_id)
  instance = self.new()
  instance.type = :specific_host
  instance.hostID = host_id
  instance
end