Class: AWSCDK::FraudDetector::CfnDetectorProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
fraud_detector/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(detector_id:, event_type:, rules:, associated_models: nil, description: nil, detector_version_status: nil, rule_execution_mode: nil, tags: nil) ⇒ CfnDetectorProps

Returns a new instance of CfnDetectorProps.

Parameters:



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'fraud_detector/cfn_detector_props.rb', line 17

def initialize(detector_id:, event_type:, rules:, associated_models: nil, description: nil, detector_version_status: nil, rule_execution_mode: nil, tags: nil)
  @detector_id = detector_id
  Jsii::Type.check_type(@detector_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorId")
  @event_type = event_type.is_a?(Hash) ? ::AWSCDK::FraudDetector::CfnDetector::EventTypeProperty.new(**event_type.transform_keys(&:to_sym)) : event_type
  Jsii::Type.check_type(@event_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19mcmF1ZGRldGVjdG9yLkNmbkRldGVjdG9yLkV2ZW50VHlwZVByb3BlcnR5In1dfX0=")), "eventType")
  @rules = rules
  Jsii::Type.check_type(@rules, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZnJhdWRkZXRlY3Rvci5DZm5EZXRlY3Rvci5SdWxlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "rules")
  @associated_models = associated_models
  Jsii::Type.check_type(@associated_models, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZnJhdWRkZXRlY3Rvci5DZm5EZXRlY3Rvci5Nb2RlbFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "associatedModels") unless @associated_models.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @detector_version_status = detector_version_status
  Jsii::Type.check_type(@detector_version_status, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorVersionStatus") unless @detector_version_status.nil?
  @rule_execution_mode = rule_execution_mode
  Jsii::Type.check_type(@rule_execution_mode, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleExecutionMode") unless @rule_execution_mode.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

The models to associate with this detector.

You must provide the ARNs of all the models you want to associate.



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

def associated_models
  @associated_models
end

#descriptionString? (readonly)

The detector description.



62
63
64
# File 'fraud_detector/cfn_detector_props.rb', line 62

def description
  @description
end

#detector_idString (readonly)

The name of the detector.



40
41
42
# File 'fraud_detector/cfn_detector_props.rb', line 40

def detector_id
  @detector_id
end

#detector_version_statusString? (readonly)

The status of the detector version.

If a value is not provided for this property, AWS CloudFormation assumes DRAFT status.

Valid values: ACTIVE | DRAFT



71
72
73
# File 'fraud_detector/cfn_detector_props.rb', line 71

def detector_version_status
  @detector_version_status
end

#event_typeAWSCDK::IResolvable, AWSCDK::FraudDetector::CfnDetector::EventTypeProperty (readonly)

The event type associated with this detector.



45
46
47
# File 'fraud_detector/cfn_detector_props.rb', line 45

def event_type
  @event_type
end

#rule_execution_modeString? (readonly)

The rule execution mode for the rules included in the detector version.

Valid values: FIRST_MATCHED | ALL_MATCHED Default value: FIRST_MATCHED

You can define and edit the rule mode at the detector version level, when it is in draft status.

If you specify FIRST_MATCHED , Amazon Fraud Detector evaluates rules sequentially, first to last, stopping at the first matched rule. Amazon Fraud dectector then provides the outcomes for that single rule.

If you specifiy ALL_MATCHED , Amazon Fraud Detector evaluates all rules and returns the outcomes for all matched rules.



84
85
86
# File 'fraud_detector/cfn_detector_props.rb', line 84

def rule_execution_mode
  @rule_execution_mode
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



91
92
93
# File 'fraud_detector/cfn_detector_props.rb', line 91

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



93
94
95
96
97
98
99
100
101
102
103
104
# File 'fraud_detector/cfn_detector_props.rb', line 93

def self.jsii_properties
  {
    :detector_id => "detectorId",
    :event_type => "eventType",
    :rules => "rules",
    :associated_models => "associatedModels",
    :description => "description",
    :detector_version_status => "detectorVersionStatus",
    :rule_execution_mode => "ruleExecutionMode",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'fraud_detector/cfn_detector_props.rb', line 106

def to_jsii
  result = {}
  result.merge!({
    "detectorId" => @detector_id,
    "eventType" => @event_type,
    "rules" => @rules,
    "associatedModels" => @associated_models,
    "description" => @description,
    "detectorVersionStatus" => @detector_version_status,
    "ruleExecutionMode" => @rule_execution_mode,
    "tags" => @tags,
  })
  result.compact
end