Class: AWSCDK::CodeBuild::S3SourceProps

Inherits:
SourceProps
  • Object
show all
Defined in:
code_build/s3_source_props.rb

Overview

Construction properties for S3Source.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier: nil, bucket:, path:, version: nil) ⇒ S3SourceProps

Returns a new instance of S3SourceProps.

Parameters:

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

    The source identifier.

  • bucket (AWSCDK::S3::IBucket)
  • path (String)
  • version (String, nil) (defaults to: nil)

    The version ID of the object that represents the build input ZIP file to use.



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

def initialize(identifier: nil, bucket:, path:, version: nil)
  @identifier = identifier
  Jsii::Type.check_type(@identifier, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "identifier") unless @identifier.nil?
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path")
  @version = version
  Jsii::Type.check_type(@version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "version") unless @version.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

Returns:



29
30
31
# File 'code_build/s3_source_props.rb', line 29

def bucket
  @bucket
end

#identifierString? (readonly)

The source identifier.

This property is required on secondary sources.

Returns:

  • (String, nil)


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

def identifier
  @identifier
end

#pathString (readonly)

Returns:

  • (String)


31
32
33
# File 'code_build/s3_source_props.rb', line 31

def path
  @path
end

#versionString? (readonly)

Note:

Default: latest

The version ID of the object that represents the build input ZIP file to use.

Returns:

  • (String, nil)


36
37
38
# File 'code_build/s3_source_props.rb', line 36

def version
  @version
end

Class Method Details

.jsii_propertiesObject



38
39
40
41
42
43
44
45
# File 'code_build/s3_source_props.rb', line 38

def self.jsii_properties
  {
    :identifier => "identifier",
    :bucket => "bucket",
    :path => "path",
    :version => "version",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
56
57
# File 'code_build/s3_source_props.rb', line 47

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "identifier" => @identifier,
    "bucket" => @bucket,
    "path" => @path,
    "version" => @version,
  })
  result.compact
end