Class: AWSCDK::CloudAssemblySchema::FileSource

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_assembly_schema/file_source.rb

Overview

Describe the source of a file asset.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(executable: nil, packaging: nil, path: nil) ⇒ FileSource

Returns a new instance of FileSource.

Parameters:

  • executable (Array<String>, nil) (defaults to: nil)

    External command which will produce the file asset to upload.

  • packaging (AWSCDK::CloudAssemblySchema::FileAssetPackaging, nil) (defaults to: nil)

    Packaging method.

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

    The filesystem object to upload.



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

def initialize(executable: nil, packaging: nil, path: nil)
  @executable = executable
  Jsii::Type.check_type(@executable, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "executable") unless @executable.nil?
  @packaging = packaging
  Jsii::Type.check_type(@packaging, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5jbG91ZF9hc3NlbWJseV9zY2hlbWEuRmlsZUFzc2V0UGFja2FnaW5nIn0=")), "packaging") unless @packaging.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
end

Instance Attribute Details

#executableArray<String>? (readonly)

Note:

Default: - Exactly one of executable and path is required.

External command which will produce the file asset to upload.

Returns:

  • (Array<String>, nil)


23
24
25
# File 'cloud_assembly_schema/file_source.rb', line 23

def executable
  @executable
end

#packagingAWSCDK::CloudAssemblySchema::FileAssetPackaging? (readonly)

Note:

Default: FILE

Packaging method.

Only allowed when path is specified.



30
31
32
# File 'cloud_assembly_schema/file_source.rb', line 30

def packaging
  @packaging
end

#pathString? (readonly)

Note:

Default: - Exactly one of executable and path is required.

The filesystem object to upload.

This path is relative to the asset manifest location.

Returns:

  • (String, nil)


37
38
39
# File 'cloud_assembly_schema/file_source.rb', line 37

def path
  @path
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'cloud_assembly_schema/file_source.rb', line 39

def self.jsii_properties
  {
    :executable => "executable",
    :packaging => "packaging",
    :path => "path",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'cloud_assembly_schema/file_source.rb', line 47

def to_jsii
  result = {}
  result.merge!({
    "executable" => @executable,
    "packaging" => @packaging,
    "path" => @path,
  })
  result.compact
end