Class: AWSCDK::IoT::CfnLogging::EventConfigurationProperty

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

Overview

Configuration for event-based logging that specifies which event types to log and their logging settings.

Used for account-level logging overrides.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_type:, log_destination: nil, log_level: nil) ⇒ EventConfigurationProperty

Returns a new instance of EventConfigurationProperty.

Parameters:

  • event_type (String)

    The type of event to log.

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

    CloudWatch Log Group for event-based logging.

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

    The logging level for the specified event type.



540
541
542
543
544
545
546
547
# File 'io_t/cfn_logging.rb', line 540

def initialize(event_type:, log_destination: nil, log_level: nil)
  @event_type = event_type
  Jsii::Type.check_type(@event_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventType")
  @log_destination = log_destination
  Jsii::Type.check_type(@log_destination, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logDestination") unless @log_destination.nil?
  @log_level = log_level
  Jsii::Type.check_type(@log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logLevel") unless @log_level.nil?
end

Instance Attribute Details

#event_typeString (readonly)

The type of event to log.

These include event types like Connect, Publish, and Disconnect.



555
556
557
# File 'io_t/cfn_logging.rb', line 555

def event_type
  @event_type
end

#log_destinationString? (readonly)

CloudWatch Log Group for event-based logging.

Specifies where log events should be sent. The log destination for event-based logging overrides default Log Group for the specified event type and applies to all resources associated with that event.



562
563
564
# File 'io_t/cfn_logging.rb', line 562

def log_destination
  @log_destination
end

#log_levelString? (readonly)

The logging level for the specified event type.

Determines the verbosity of log messages generated for this event type.



569
570
571
# File 'io_t/cfn_logging.rb', line 569

def log_level
  @log_level
end

Class Method Details

.jsii_propertiesObject



571
572
573
574
575
576
577
# File 'io_t/cfn_logging.rb', line 571

def self.jsii_properties
  {
    :event_type => "eventType",
    :log_destination => "logDestination",
    :log_level => "logLevel",
  }
end

Instance Method Details

#to_jsiiObject



579
580
581
582
583
584
585
586
587
# File 'io_t/cfn_logging.rb', line 579

def to_jsii
  result = {}
  result.merge!({
    "eventType" => @event_type,
    "logDestination" => @log_destination,
    "logLevel" => @log_level,
  })
  result.compact
end