Class: AWSCDK::GuardDuty::CfnDetectorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
guard_duty/cfn_detector_props.rb

Overview

Properties for defining a CfnDetector.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enable:, data_sources: nil, features: nil, finding_publishing_frequency: nil, tags: nil) ⇒ CfnDetectorProps

Returns a new instance of CfnDetectorProps.

Parameters:



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

def initialize(enable:, data_sources: nil, features: nil, finding_publishing_frequency: nil, tags: nil)
  @enable = enable
  Jsii::Type.check_type(@enable, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enable")
  @data_sources = data_sources.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnDetector::CFNDataSourceConfigurationsProperty.new(**data_sources.transform_keys(&:to_sym)) : data_sources
  Jsii::Type.check_type(@data_sources, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuRGV0ZWN0b3IuQ0ZORGF0YVNvdXJjZUNvbmZpZ3VyYXRpb25zUHJvcGVydHkifV19fQ==")), "dataSources") unless @data_sources.nil?
  @features = features
  Jsii::Type.check_type(@features, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZ3VhcmRkdXR5LkNmbkRldGVjdG9yLkNGTkZlYXR1cmVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "features") unless @features.nil?
  @finding_publishing_frequency = finding_publishing_frequency
  Jsii::Type.check_type(@finding_publishing_frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "findingPublishingFrequency") unless @finding_publishing_frequency.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnDetector::TagItemProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuRGV0ZWN0b3IuVGFnSXRlbVByb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

#data_sourcesAWSCDK::IResolvable, ... (readonly)

Describes which data sources will be enabled for the detector.



36
37
38
# File 'guard_duty/cfn_detector_props.rb', line 36

def data_sources
  @data_sources
end

#enableBoolean, AWSCDK::IResolvable (readonly)

Specifies whether the detector is to be enabled on creation.



31
32
33
# File 'guard_duty/cfn_detector_props.rb', line 31

def enable
  @enable
end

#featuresAWSCDK::IResolvable, ... (readonly)

A list of features that will be configured for the detector.



41
42
43
# File 'guard_duty/cfn_detector_props.rb', line 41

def features
  @features
end

#finding_publishing_frequencyString? (readonly)

Specifies how frequently updated findings are exported.



46
47
48
# File 'guard_duty/cfn_detector_props.rb', line 46

def finding_publishing_frequency
  @finding_publishing_frequency
end

#tagsArray<AWSCDK::GuardDuty::CfnDetector::TagItemProperty>? (readonly)

Specifies tags added to a new detector resource.

Each tag consists of a key and an optional value, both of which you define.

Currently, support is available only for creating and deleting a tag. No support exists for updating the tags.

For more information, see Tag .



57
58
59
# File 'guard_duty/cfn_detector_props.rb', line 57

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'guard_duty/cfn_detector_props.rb', line 59

def self.jsii_properties
  {
    :enable => "enable",
    :data_sources => "dataSources",
    :features => "features",
    :finding_publishing_frequency => "findingPublishingFrequency",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
79
# File 'guard_duty/cfn_detector_props.rb', line 69

def to_jsii
  result = {}
  result.merge!({
    "enable" => @enable,
    "dataSources" => @data_sources,
    "features" => @features,
    "findingPublishingFrequency" => @finding_publishing_frequency,
    "tags" => @tags,
  })
  result.compact
end