Class: AWSCDK::CodeBuild::S3LoggingOptions

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

Overview

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, enabled: nil, encrypted: nil, prefix: nil) ⇒ S3LoggingOptions

Returns a new instance of S3LoggingOptions.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The S3 Bucket to send logs to.

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

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

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

    Encrypt the S3 build log output.

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

    The path prefix for S3 logs.



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

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

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

The S3 Bucket to send logs to.

Returns:



25
26
27
# File 'code_build/s3_logging_options.rb', line 25

def bucket
  @bucket
end

#enabledBoolean? (readonly)

Note:

Default: true

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

Returns:

  • (Boolean, nil)


30
31
32
# File 'code_build/s3_logging_options.rb', line 30

def enabled
  @enabled
end

#encryptedBoolean? (readonly)

Note:

Default: true

Encrypt the S3 build log output.

Returns:

  • (Boolean, nil)


35
36
37
# File 'code_build/s3_logging_options.rb', line 35

def encrypted
  @encrypted
end

#prefixString? (readonly)

Note:

Default: - no prefix

The path prefix for S3 logs.

Returns:

  • (String, nil)


40
41
42
# File 'code_build/s3_logging_options.rb', line 40

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'code_build/s3_logging_options.rb', line 42

def self.jsii_properties
  {
    :bucket => "bucket",
    :enabled => "enabled",
    :encrypted => "encrypted",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'code_build/s3_logging_options.rb', line 51

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