Class: AWSCDK::CodeBuild::CloudWatchLoggingOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
code_build/cloud_watch_logging_options.rb

Overview

Information about logs built to a CloudWatch Log Group for a build project.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: nil, log_group: nil, prefix: nil) ⇒ CloudWatchLoggingOptions

Returns a new instance of CloudWatchLoggingOptions.

Parameters:

  • enabled (Boolean, nil) (defaults to: nil)

    The current status of the logs in Amazon CloudWatch Logs for a build project.

  • log_group (AWSCDK::Logs::ILogGroup, nil) (defaults to: nil)

    The Log Group to send logs to.

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

    The prefix of the stream name of the Amazon CloudWatch Logs.



10
11
12
13
14
15
16
17
# File 'code_build/cloud_watch_logging_options.rb', line 10

def initialize(enabled: nil, log_group: nil, prefix: nil)
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "enabled") unless @enabled.nil?
  @log_group = log_group
  Jsii::Type.check_type(@log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5JTG9nR3JvdXAifQ==")), "logGroup") unless @log_group.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#enabledBoolean? (readonly)

Note:

Default: true

The current status of the logs in Amazon CloudWatch Logs for a build project.

Returns:

  • (Boolean, nil)


23
24
25
# File 'code_build/cloud_watch_logging_options.rb', line 23

def enabled
  @enabled
end

#log_groupAWSCDK::Logs::ILogGroup? (readonly)

Note:

Default: - no log group specified

The Log Group to send logs to.

Returns:



28
29
30
# File 'code_build/cloud_watch_logging_options.rb', line 28

def log_group
  @log_group
end

#prefixString? (readonly)

Note:

Default: - no prefix

The prefix of the stream name of the Amazon CloudWatch Logs.

Returns:

  • (String, nil)


33
34
35
# File 'code_build/cloud_watch_logging_options.rb', line 33

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'code_build/cloud_watch_logging_options.rb', line 35

def self.jsii_properties
  {
    :enabled => "enabled",
    :log_group => "logGroup",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'code_build/cloud_watch_logging_options.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "enabled" => @enabled,
    "logGroup" => @log_group,
    "prefix" => @prefix,
  })
  result.compact
end