Class: AWSCDK::Inspectorv2::CfnFilterProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
inspectorv2/cfn_filter_props.rb

Overview

Properties for defining a CfnFilter.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filter_action:, filter_criteria:, name:, description: nil, tags: nil) ⇒ CfnFilterProps

Returns a new instance of CfnFilterProps.

Parameters:

  • filter_action (String)

    The action that is to be applied to the findings that match the filter.

  • filter_criteria (AWSCDK::IResolvable, AWSCDK::Inspectorv2::CfnFilter::FilterCriteriaProperty)

    Details on the filter criteria associated with this filter.

  • name (String)

    The name of the filter.

  • description (String, nil) (defaults to: nil)

    A description of the filter.

  • tags (Hash{String => String}, nil) (defaults to: nil)

    The tags attached to the filter.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'inspectorv2/cfn_filter_props.rb', line 14

def initialize(filter_action:, filter_criteria:, name:, description: nil, tags: nil)
  @filter_action = filter_action
  Jsii::Type.check_type(@filter_action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filterAction")
  @filter_criteria = filter_criteria.is_a?(Hash) ? ::AWSCDK::Inspectorv2::CfnFilter::FilterCriteriaProperty.new(**filter_criteria.transform_keys(&:to_sym)) : filter_criteria
  Jsii::Type.check_type(@filter_criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pbnNwZWN0b3J2Mi5DZm5GaWx0ZXIuRmlsdGVyQ3JpdGVyaWFQcm9wZXJ0eSJ9XX19")), "filterCriteria")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description of the filter.



46
47
48
# File 'inspectorv2/cfn_filter_props.rb', line 46

def description
  @description
end

#filter_actionString (readonly)

The action that is to be applied to the findings that match the filter.



31
32
33
# File 'inspectorv2/cfn_filter_props.rb', line 31

def filter_action
  @filter_action
end

#filter_criteriaAWSCDK::IResolvable, AWSCDK::Inspectorv2::CfnFilter::FilterCriteriaProperty (readonly)

Details on the filter criteria associated with this filter.



36
37
38
# File 'inspectorv2/cfn_filter_props.rb', line 36

def filter_criteria
  @filter_criteria
end

#nameString (readonly)

The name of the filter.



41
42
43
# File 'inspectorv2/cfn_filter_props.rb', line 41

def name
  @name
end

#tagsHash{String => String}? (readonly)

The tags attached to the filter.



51
52
53
# File 'inspectorv2/cfn_filter_props.rb', line 51

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



53
54
55
56
57
58
59
60
61
# File 'inspectorv2/cfn_filter_props.rb', line 53

def self.jsii_properties
  {
    :filter_action => "filterAction",
    :filter_criteria => "filterCriteria",
    :name => "name",
    :description => "description",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



63
64
65
66
67
68
69
70
71
72
73
# File 'inspectorv2/cfn_filter_props.rb', line 63

def to_jsii
  result = {}
  result.merge!({
    "filterAction" => @filter_action,
    "filterCriteria" => @filter_criteria,
    "name" => @name,
    "description" => @description,
    "tags" => @tags,
  })
  result.compact
end