Class: AWSCDK::IoT::CfnSecurityProfile::BehaviorProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_security_profile.rb

Overview

A Device Defender security profile behavior.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, criteria: nil, export_metric: nil, metric: nil, metric_dimension: nil, suppress_alerts: nil) ⇒ BehaviorProperty

Returns a new instance of BehaviorProperty.

Parameters:



791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'io_t/cfn_security_profile.rb', line 791

def initialize(name:, criteria: nil, export_metric: nil, metric: nil, metric_dimension: nil, suppress_alerts: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @criteria = criteria.is_a?(Hash) ? ::AWSCDK::IoT::CfnSecurityProfile::BehaviorCriteriaProperty.new(**criteria.transform_keys(&:to_sym)) : criteria
  Jsii::Type.check_type(@criteria, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuU2VjdXJpdHlQcm9maWxlLkJlaGF2aW9yQ3JpdGVyaWFQcm9wZXJ0eSJ9XX19")), "criteria") unless @criteria.nil?
  @export_metric = export_metric
  Jsii::Type.check_type(@export_metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "exportMetric") unless @export_metric.nil?
  @metric = metric
  Jsii::Type.check_type(@metric, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metric") unless @metric.nil?
  @metric_dimension = metric_dimension.is_a?(Hash) ? ::AWSCDK::IoT::CfnSecurityProfile::MetricDimensionProperty.new(**metric_dimension.transform_keys(&:to_sym)) : metric_dimension
  Jsii::Type.check_type(@metric_dimension, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuU2VjdXJpdHlQcm9maWxlLk1ldHJpY0RpbWVuc2lvblByb3BlcnR5In1dfX0=")), "metricDimension") unless @metric_dimension.nil?
  @suppress_alerts = suppress_alerts
  Jsii::Type.check_type(@suppress_alerts, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "suppressAlerts") unless @suppress_alerts.nil?
end

Instance Attribute Details

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

The criteria that determine if a device is behaving normally in regard to the metric .

In the AWS IoT console, you can choose to be sent an alert through Amazon SNS when AWS IoT Device Defender detects that a device is behaving anomalously.



817
818
819
# File 'io_t/cfn_security_profile.rb', line 817

def criteria
  @criteria
end

#export_metricBoolean, ... (readonly)

Value indicates exporting metrics related to the behavior when it is true.



822
823
824
# File 'io_t/cfn_security_profile.rb', line 822

def export_metric
  @export_metric
end

#metricString? (readonly)

What is measured by the behavior.



827
828
829
# File 'io_t/cfn_security_profile.rb', line 827

def metric
  @metric
end

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

The dimension of the metric.



832
833
834
# File 'io_t/cfn_security_profile.rb', line 832

def metric_dimension
  @metric_dimension
end

#nameString (readonly)

The name you've given to the behavior.



810
811
812
# File 'io_t/cfn_security_profile.rb', line 810

def name
  @name
end

#suppress_alertsBoolean, ... (readonly)

The alert status.

If you set the value to true , alerts will be suppressed.



839
840
841
# File 'io_t/cfn_security_profile.rb', line 839

def suppress_alerts
  @suppress_alerts
end

Class Method Details

.jsii_propertiesObject



841
842
843
844
845
846
847
848
849
850
# File 'io_t/cfn_security_profile.rb', line 841

def self.jsii_properties
  {
    :name => "name",
    :criteria => "criteria",
    :export_metric => "exportMetric",
    :metric => "metric",
    :metric_dimension => "metricDimension",
    :suppress_alerts => "suppressAlerts",
  }
end

Instance Method Details

#to_jsiiObject



852
853
854
855
856
857
858
859
860
861
862
863
# File 'io_t/cfn_security_profile.rb', line 852

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "criteria" => @criteria,
    "exportMetric" => @export_metric,
    "metric" => @metric,
    "metricDimension" => @metric_dimension,
    "suppressAlerts" => @suppress_alerts,
  })
  result.compact
end