Class: AWSCDK::Cognito::CfnLogDeliveryConfiguration::LogConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_log_delivery_configuration.rb

Overview

The configuration of user event logs to an external AWS service like Amazon Data Firehose, Amazon S3, or Amazon CloudWatch Logs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cloud_watch_logs_configuration: nil, event_source: nil, firehose_configuration: nil, log_level: nil, s3_configuration: nil) ⇒ LogConfigurationProperty

Returns a new instance of LogConfigurationProperty.

Parameters:



589
590
591
592
593
594
595
596
597
598
599
600
# File 'cognito/cfn_log_delivery_configuration.rb', line 589

def initialize(cloud_watch_logs_configuration: nil, event_source: nil, firehose_configuration: nil, log_level: nil, s3_configuration: nil)
  @cloud_watch_logs_configuration = cloud_watch_logs_configuration.is_a?(Hash) ? ::AWSCDK::Cognito::CfnLogDeliveryConfiguration::CloudWatchLogsConfigurationProperty.new(**cloud_watch_logs_configuration.transform_keys(&:to_sym)) : cloud_watch_logs_configuration
  Jsii::Type.check_type(@cloud_watch_logs_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmbkxvZ0RlbGl2ZXJ5Q29uZmlndXJhdGlvbi5DbG91ZFdhdGNoTG9nc0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "cloudWatchLogsConfiguration") unless @cloud_watch_logs_configuration.nil?
  @event_source = event_source
  Jsii::Type.check_type(@event_source, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eventSource") unless @event_source.nil?
  @firehose_configuration = firehose_configuration.is_a?(Hash) ? ::AWSCDK::Cognito::CfnLogDeliveryConfiguration::FirehoseConfigurationProperty.new(**firehose_configuration.transform_keys(&:to_sym)) : firehose_configuration
  Jsii::Type.check_type(@firehose_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmbkxvZ0RlbGl2ZXJ5Q29uZmlndXJhdGlvbi5GaXJlaG9zZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "firehoseConfiguration") unless @firehose_configuration.nil?
  @log_level = log_level
  Jsii::Type.check_type(@log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logLevel") unless @log_level.nil?
  @s3_configuration = s3_configuration.is_a?(Hash) ? ::AWSCDK::Cognito::CfnLogDeliveryConfiguration::S3ConfigurationProperty.new(**s3_configuration.transform_keys(&:to_sym)) : s3_configuration
  Jsii::Type.check_type(@s3_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLkNmbkxvZ0RlbGl2ZXJ5Q29uZmlndXJhdGlvbi5TM0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "s3Configuration") unless @s3_configuration.nil?
end

Instance Attribute Details

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

Configuration for the CloudWatch log group destination of user pool detailed activity logging, or of user activity log export with advanced security features.



606
607
608
# File 'cognito/cfn_log_delivery_configuration.rb', line 606

def cloud_watch_logs_configuration
  @cloud_watch_logs_configuration
end

#event_sourceString? (readonly)

The source of events that your user pool sends for logging.

To send error-level logs about user notification activity, set to user_notification . To send info-level logs about threat-protection user activity in user pools with the Plus feature plan, set to user_auth_events .



613
614
615
# File 'cognito/cfn_log_delivery_configuration.rb', line 613

def event_source
  @event_source
end

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

Configuration for the Amazon Data Firehose stream destination of user activity log export with threat protection.



618
619
620
# File 'cognito/cfn_log_delivery_configuration.rb', line 618

def firehose_configuration
  @firehose_configuration
end

#log_levelString? (readonly)

The errorlevel selection of logs that a user pool sends for detailed activity logging.

To send user_notification activity with information about message delivery , choose ERROR with CloudWatchLogsConfiguration . To send user_auth_events activity with user logs from threat protection with the Plus feature plan, choose INFO with one of CloudWatchLogsConfiguration , FirehoseConfiguration , or S3Configuration .



625
626
627
# File 'cognito/cfn_log_delivery_configuration.rb', line 625

def log_level
  @log_level
end

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

Configuration for the Amazon S3 bucket destination of user activity log export with threat protection.



630
631
632
# File 'cognito/cfn_log_delivery_configuration.rb', line 630

def s3_configuration
  @s3_configuration
end

Class Method Details

.jsii_propertiesObject



632
633
634
635
636
637
638
639
640
# File 'cognito/cfn_log_delivery_configuration.rb', line 632

def self.jsii_properties
  {
    :cloud_watch_logs_configuration => "cloudWatchLogsConfiguration",
    :event_source => "eventSource",
    :firehose_configuration => "firehoseConfiguration",
    :log_level => "logLevel",
    :s3_configuration => "s3Configuration",
  }
end

Instance Method Details

#to_jsiiObject



642
643
644
645
646
647
648
649
650
651
652
# File 'cognito/cfn_log_delivery_configuration.rb', line 642

def to_jsii
  result = {}
  result.merge!({
    "cloudWatchLogsConfiguration" => @cloud_watch_logs_configuration,
    "eventSource" => @event_source,
    "firehoseConfiguration" => @firehose_configuration,
    "logLevel" => @log_level,
    "s3Configuration" => @s3_configuration,
  })
  result.compact
end