Class: AWSCDK::CodeBuild::LoggingOptions

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

Overview

Information about logs for the build project.

A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cloud_watch: nil, s3: nil) ⇒ LoggingOptions

Returns a new instance of LoggingOptions.

Parameters:



11
12
13
14
15
16
# File 'code_build/logging_options.rb', line 11

def initialize(cloud_watch: nil, s3: nil)
  @cloud_watch = cloud_watch.is_a?(Hash) ? ::AWSCDK::CodeBuild::CloudWatchLoggingOptions.new(**cloud_watch.transform_keys(&:to_sym)) : cloud_watch
  Jsii::Type.check_type(@cloud_watch, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkNsb3VkV2F0Y2hMb2dnaW5nT3B0aW9ucyJ9")), "cloudWatch") unless @cloud_watch.nil?
  @s3 = s3.is_a?(Hash) ? ::AWSCDK::CodeBuild::S3LoggingOptions.new(**s3.transform_keys(&:to_sym)) : s3
  Jsii::Type.check_type(@s3, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLlMzTG9nZ2luZ09wdGlvbnMifQ==")), "s3") unless @s3.nil?
end

Instance Attribute Details

#cloud_watchAWSCDK::CodeBuild::CloudWatchLoggingOptions? (readonly)

Note:

Default: - enabled

Information about Amazon CloudWatch Logs for a build project.



22
23
24
# File 'code_build/logging_options.rb', line 22

def cloud_watch
  @cloud_watch
end

#s3AWSCDK::CodeBuild::S3LoggingOptions? (readonly)

Note:

Default: - disabled

Information about logs built to an S3 bucket for a build project.



27
28
29
# File 'code_build/logging_options.rb', line 27

def s3
  @s3
end

Class Method Details

.jsii_propertiesObject



29
30
31
32
33
34
# File 'code_build/logging_options.rb', line 29

def self.jsii_properties
  {
    :cloud_watch => "cloudWatch",
    :s3 => "s3",
  }
end

Instance Method Details

#to_jsiiObject



36
37
38
39
40
41
42
43
# File 'code_build/logging_options.rb', line 36

def to_jsii
  result = {}
  result.merge!({
    "cloudWatch" => @cloud_watch,
    "s3" => @s3,
  })
  result.compact
end