Class: DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb

Overview

Create a new rule.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SecurityMonitoringRuleCreatePayload

Initializes the object

Parameters:

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

    attributes Model attributes in the form of hash



103
104
105
106
107
108
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
153
154
155
156
157
158
159
160
161
162
163
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 103

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'cases')
    if (value = attributes[:'cases']).is_a?(Array)
      self.cases = value
    end
  end

  if attributes.key?(:'filters')
    if (value = attributes[:'filters']).is_a?(Array)
      self.filters = value
    end
  end

  if attributes.key?(:'has_extended_title')
    self.has_extended_title = attributes[:'has_extended_title']
  end

  if attributes.key?(:'is_enabled')
    self.is_enabled = attributes[:'is_enabled']
  end

  if attributes.key?(:'message')
    self.message = attributes[:'message']
  end

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.key?(:'options')
    self.options = attributes[:'options']
  end

  if attributes.key?(:'queries')
    if (value = attributes[:'queries']).is_a?(Array)
      self.queries = value
    end
  end

  if attributes.key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = value
    end
  end

  if attributes.key?(:'type')
    self.type = attributes[:'type']
  end
end

Instance Attribute Details

#casesObject

Cases for generating signals.



27
28
29
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 27

def cases
  @cases
end

#filtersObject

Additional queries to filter matched events before they are processed.



30
31
32
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 30

def filters
  @filters
end

#has_extended_titleObject

Whether the notifications include the triggering group-by values in their title.



33
34
35
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 33

def has_extended_title
  @has_extended_title
end

#is_enabledObject

Whether the rule is enabled.



36
37
38
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 36

def is_enabled
  @is_enabled
end

#messageObject

Message for generated signals.



39
40
41
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 39

def message
  @message
end

#nameObject

The name of the rule.



42
43
44
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 42

def name
  @name
end

#optionsObject

Returns the value of attribute options.



44
45
46
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 44

def options
  @options
end

#queriesObject

Queries for selecting logs which are part of the rule.



47
48
49
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 47

def queries
  @queries
end

#tagsObject

Tags for generated signals.



50
51
52
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 50

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



52
53
54
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb', line 52

def type
  @type
end