Class: AWSCDK::IoTEvents::CfnDetectorModelProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_detector_model_props.rb

Overview

Properties for defining a CfnDetectorModel.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(detector_model_definition:, role_arn:, detector_model_description: nil, detector_model_name: nil, evaluation_method: nil, key: nil, tags: nil) ⇒ CfnDetectorModelProps

Returns a new instance of CfnDetectorModelProps.

Parameters:

  • detector_model_definition (AWSCDK::IResolvable, AWSCDK::IoTEvents::CfnDetectorModel::DetectorModelDefinitionProperty)

    Information that defines how a detector operates.

  • role_arn (String, AWSCDK::Interfaces::AWSIAM::IRoleRef)

    The ARN of the role that grants permission to AWS IoT Events to perform its operations.

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

    A brief description of the detector model.

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

    The name of the detector model.

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

    Information about the order in which events are evaluated and how actions are executed.

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

    The value used to identify a detector instance.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

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



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'io_t_events/cfn_detector_model_props.rb', line 16

def initialize(detector_model_definition:, role_arn:, detector_model_description: nil, detector_model_name: nil, evaluation_method: nil, key: nil, tags: nil)
  @detector_model_definition = detector_model_definition.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::DetectorModelDefinitionProperty.new(**detector_model_definition.transform_keys(&:to_sym)) : detector_model_definition
  Jsii::Type.check_type(@detector_model_definition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5EZXRlY3Rvck1vZGVsRGVmaW5pdGlvblByb3BlcnR5In1dfX0=")), "detectorModelDefinition")
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "roleArn")
  @detector_model_description = detector_model_description
  Jsii::Type.check_type(@detector_model_description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorModelDescription") unless @detector_model_description.nil?
  @detector_model_name = detector_model_name
  Jsii::Type.check_type(@detector_model_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorModelName") unless @detector_model_name.nil?
  @evaluation_method = evaluation_method
  Jsii::Type.check_type(@evaluation_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "evaluationMethod") unless @evaluation_method.nil?
  @key = key
  Jsii::Type.check_type(@key, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "key") unless @key.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

#detector_model_definitionAWSCDK::IResolvable, AWSCDK::IoTEvents::CfnDetectorModel::DetectorModelDefinitionProperty (readonly)

Information that defines how a detector operates.



37
38
39
# File 'io_t_events/cfn_detector_model_props.rb', line 37

def detector_model_definition
  @detector_model_definition
end

#detector_model_descriptionString? (readonly)

A brief description of the detector model.



47
48
49
# File 'io_t_events/cfn_detector_model_props.rb', line 47

def detector_model_description
  @detector_model_description
end

#detector_model_nameString? (readonly)

The name of the detector model.



52
53
54
# File 'io_t_events/cfn_detector_model_props.rb', line 52

def detector_model_name
  @detector_model_name
end

#evaluation_methodString? (readonly)

Information about the order in which events are evaluated and how actions are executed.



57
58
59
# File 'io_t_events/cfn_detector_model_props.rb', line 57

def evaluation_method
  @evaluation_method
end

#keyString? (readonly)

The value used to identify a detector instance.

When a device or system sends input, a new detector instance with a unique key value is created. AWS IoT Events can continue to route input to its corresponding detector instance based on this identifying information.

This parameter uses a JSON-path expression to select the attribute-value pair in the message payload that is used for identification. To route the message to the correct detector instance, the device must send a message payload that contains the same attribute-value.



66
67
68
# File 'io_t_events/cfn_detector_model_props.rb', line 66

def key
  @key
end

#role_arnString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The ARN of the role that grants permission to AWS IoT Events to perform its operations.



42
43
44
# File 'io_t_events/cfn_detector_model_props.rb', line 42

def role_arn
  @role_arn
end

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

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

For more information, see Tag .



73
74
75
# File 'io_t_events/cfn_detector_model_props.rb', line 73

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'io_t_events/cfn_detector_model_props.rb', line 75

def self.jsii_properties
  {
    :detector_model_definition => "detectorModelDefinition",
    :role_arn => "roleArn",
    :detector_model_description => "detectorModelDescription",
    :detector_model_name => "detectorModelName",
    :evaluation_method => "evaluationMethod",
    :key => "key",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'io_t_events/cfn_detector_model_props.rb', line 87

def to_jsii
  result = {}
  result.merge!({
    "detectorModelDefinition" => @detector_model_definition,
    "roleArn" => @role_arn,
    "detectorModelDescription" => @detector_model_description,
    "detectorModelName" => @detector_model_name,
    "evaluationMethod" => @evaluation_method,
    "key" => @key,
    "tags" => @tags,
  })
  result.compact
end