Class: AWSCDK::FileFingerprintOptions

Inherits:
FileCopyOptions
  • Object
show all
Defined in:
file_fingerprint_options.rb

Overview

Options related to calculating source hash.

Direct Known Subclasses

ECRAssets::DockerImageAssetOptions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exclude: nil, follow_symlinks: nil, ignore_mode: nil, extra_hash: nil) ⇒ FileFingerprintOptions

Returns a new instance of FileFingerprintOptions.

Parameters:

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

    File paths matching the patterns will be excluded.

  • follow_symlinks (AWSCDK::SymlinkFollowMode, nil) (defaults to: nil)

    A strategy for how to handle symlinks.

  • ignore_mode (AWSCDK::IgnoreMode, nil) (defaults to: nil)

    The ignore behavior to use for exclude patterns.

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

    Extra information to encode into the fingerprint (e.g. build instructions and other inputs).



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

def initialize(exclude: nil, follow_symlinks: nil, ignore_mode: nil, extra_hash: nil)
  @exclude = exclude
  Jsii::Type.check_type(@exclude, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclude") unless @exclude.nil?
  @follow_symlinks = follow_symlinks
  Jsii::Type.check_type(@follow_symlinks, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TeW1saW5rRm9sbG93TW9kZSJ9")), "followSymlinks") unless @follow_symlinks.nil?
  @ignore_mode = ignore_mode
  Jsii::Type.check_type(@ignore_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JZ25vcmVNb2RlIn0=")), "ignoreMode") unless @ignore_mode.nil?
  @extra_hash = extra_hash
  Jsii::Type.check_type(@extra_hash, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "extraHash") unless @extra_hash.nil?
end

Instance Attribute Details

#excludeArray<String>? (readonly)

Note:

Default: - nothing is excluded

File paths matching the patterns will be excluded.

See ignore_mode to set the matching behavior. Has no effect on Assets bundled using the bundling property.

Returns:

  • (Array<String>, nil)


29
30
31
# File 'file_fingerprint_options.rb', line 29

def exclude
  @exclude
end

#extra_hashString? (readonly)

Note:

Default: - hash is only based on source content

Extra information to encode into the fingerprint (e.g. build instructions and other inputs).

Returns:

  • (String, nil)


44
45
46
# File 'file_fingerprint_options.rb', line 44

def extra_hash
  @extra_hash
end
Note:

Default: SymlinkFollowMode.NEVER

A strategy for how to handle symlinks.

Returns:



34
35
36
# File 'file_fingerprint_options.rb', line 34

def follow_symlinks
  @follow_symlinks
end

#ignore_modeAWSCDK::IgnoreMode? (readonly)

Note:

Default: IgnoreMode.GLOB

The ignore behavior to use for exclude patterns.

Returns:



39
40
41
# File 'file_fingerprint_options.rb', line 39

def ignore_mode
  @ignore_mode
end

Class Method Details

.jsii_propertiesObject



46
47
48
49
50
51
52
53
# File 'file_fingerprint_options.rb', line 46

def self.jsii_properties
  {
    :exclude => "exclude",
    :follow_symlinks => "followSymlinks",
    :ignore_mode => "ignoreMode",
    :extra_hash => "extraHash",
  }
end

Instance Method Details

#to_jsiiObject



55
56
57
58
59
60
61
62
63
64
65
# File 'file_fingerprint_options.rb', line 55

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "exclude" => @exclude,
    "followSymlinks" => @follow_symlinks,
    "ignoreMode" => @ignore_mode,
    "extraHash" => @extra_hash,
  })
  result.compact
end