Class: AWSCDK::AppSync::LogConfig

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_sync/log_config.rb

Overview

Logging configuration for AppSync.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exclude_verbose_content: nil, field_log_level: nil, retention: nil, role: nil) ⇒ LogConfig

Returns a new instance of LogConfig.

Parameters:



11
12
13
14
15
16
17
18
19
20
# File 'app_sync/log_config.rb', line 11

def initialize(exclude_verbose_content: nil, field_log_level: nil, retention: nil, role: nil)
  @exclude_verbose_content = exclude_verbose_content
  Jsii::Type.check_type(@exclude_verbose_content, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "excludeVerboseContent") unless @exclude_verbose_content.nil?
  @field_log_level = field_log_level
  Jsii::Type.check_type(@field_log_level, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBwc3luYy5GaWVsZExvZ0xldmVsIn0=")), "fieldLogLevel") unless @field_log_level.nil?
  @retention = retention
  Jsii::Type.check_type(@retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5SZXRlbnRpb25EYXlzIn0=")), "retention") unless @retention.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifQ==")), "role") unless @role.nil?
end

Instance Attribute Details

#exclude_verbose_contentBoolean, ... (readonly)

Note:

Default: false

exclude verbose content.

Returns:



26
27
28
# File 'app_sync/log_config.rb', line 26

def exclude_verbose_content
  @exclude_verbose_content
end

#field_log_levelAWSCDK::AppSync::FieldLogLevel? (readonly)

Note:

Default: - Use AppSync default

log level for fields.



31
32
33
# File 'app_sync/log_config.rb', line 31

def field_log_level
  @field_log_level
end

#retentionAWSCDK::Logs::RetentionDays? (readonly)

Note:

Default: RetentionDays.INFINITE

The number of days log events are kept in CloudWatch Logs.

By default AppSync keeps the logs infinitely. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to INFINITE

Returns:



40
41
42
# File 'app_sync/log_config.rb', line 40

def retention
  @retention
end

#roleAWSCDK::Interfaces::AWSIAM::IRoleRef? (readonly)

Note:

Default: - None

The role for CloudWatch Logs.



45
46
47
# File 'app_sync/log_config.rb', line 45

def role
  @role
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'app_sync/log_config.rb', line 47

def self.jsii_properties
  {
    :exclude_verbose_content => "excludeVerboseContent",
    :field_log_level => "fieldLogLevel",
    :retention => "retention",
    :role => "role",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'app_sync/log_config.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "excludeVerboseContent" => @exclude_verbose_content,
    "fieldLogLevel" => @field_log_level,
    "retention" => @retention,
    "role" => @role,
  })
  result.compact
end