Class: AWSCDK::ApplicationInsights::CfnApplication::LogProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
application_insights/cfn_application.rb

Overview

The AWS::ApplicationInsights::Application Log property type specifies a log to monitor for the component.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(log_type:, encoding: nil, log_group_name: nil, log_path: nil, pattern_set: nil) ⇒ LogProperty

Returns a new instance of LogProperty.

Parameters:

  • log_type (String)

    The log type decides the log patterns against which Application Insights analyzes the log.

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

    The type of encoding of the logs to be monitored.

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

    The CloudWatch log group name to be associated with the monitored log.

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

    The path of the logs to be monitored.

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

    The log pattern set.



1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
# File 'application_insights/cfn_application.rb', line 1335

def initialize(log_type:, encoding: nil, log_group_name: nil, log_path: nil, pattern_set: nil)
  @log_type = log_type
  Jsii::Type.check_type(@log_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logType")
  @encoding = encoding
  Jsii::Type.check_type(@encoding, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "encoding") unless @encoding.nil?
  @log_group_name = log_group_name
  Jsii::Type.check_type(@log_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logGroupName") unless @log_group_name.nil?
  @log_path = log_path
  Jsii::Type.check_type(@log_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logPath") unless @log_path.nil?
  @pattern_set = pattern_set
  Jsii::Type.check_type(@pattern_set, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "patternSet") unless @pattern_set.nil?
end

Instance Attribute Details

#encodingString? (readonly)

The type of encoding of the logs to be monitored.

The specified encoding should be included in the list of CloudWatch agent supported encodings. If not provided, CloudWatch Application Insights uses the default encoding type for the log type:

  • APPLICATION/DEFAULT : utf-8 encoding
  • SQL_SERVER : utf-16 encoding
  • IIS : ascii encoding


1365
1366
1367
# File 'application_insights/cfn_application.rb', line 1365

def encoding
  @encoding
end

#log_group_nameString? (readonly)

The CloudWatch log group name to be associated with the monitored log.



1370
1371
1372
# File 'application_insights/cfn_application.rb', line 1370

def log_group_name
  @log_group_name
end

#log_pathString? (readonly)

The path of the logs to be monitored.

The log path must be an absolute Windows or Linux system file path. For more information, see CloudWatch Agent Configuration File: Logs Section .



1377
1378
1379
# File 'application_insights/cfn_application.rb', line 1377

def log_path
  @log_path
end

#log_typeString (readonly)

The log type decides the log patterns against which Application Insights analyzes the log.

The log type is selected from the following: SQL_SERVER , MYSQL , MYSQL_SLOW_QUERY , POSTGRESQL , ORACLE_ALERT , ORACLE_LISTENER , IIS , APPLICATION , WINDOWS_EVENTS , WINDOWS_EVENTS_ACTIVE_DIRECTORY , WINDOWS_EVENTS_DNS , WINDOWS_EVENTS_IIS , WINDOWS_EVENTS_SHAREPOINT , SQL_SERVER_ALWAYSON_AVAILABILITY_GROUP , SQL_SERVER_FAILOVER_CLUSTER_INSTANCE , STEP_FUNCTION , API_GATEWAY_ACCESS , API_GATEWAY_EXECUTION , SAP_HANA_LOGS , SAP_HANA_TRACE , SAP_HANA_HIGH_AVAILABILITY , and DEFAULT .



1354
1355
1356
# File 'application_insights/cfn_application.rb', line 1354

def log_type
  @log_type
end

#pattern_setString? (readonly)

The log pattern set.



1382
1383
1384
# File 'application_insights/cfn_application.rb', line 1382

def pattern_set
  @pattern_set
end

Class Method Details

.jsii_propertiesObject



1384
1385
1386
1387
1388
1389
1390
1391
1392
# File 'application_insights/cfn_application.rb', line 1384

def self.jsii_properties
  {
    :log_type => "logType",
    :encoding => "encoding",
    :log_group_name => "logGroupName",
    :log_path => "logPath",
    :pattern_set => "patternSet",
  }
end

Instance Method Details

#to_jsiiObject



1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
# File 'application_insights/cfn_application.rb', line 1394

def to_jsii
  result = {}
  result.merge!({
    "logType" => @log_type,
    "encoding" => @encoding,
    "logGroupName" => @log_group_name,
    "logPath" => @log_path,
    "patternSet" => @pattern_set,
  })
  result.compact
end