Class: CDK8sPlus25::PathMapping

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
path_mapping.rb

Overview

Maps a string key to a path within a volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:, mode: nil) ⇒ PathMapping

Returns a new instance of PathMapping.

Parameters:

  • path (String)

    The relative path of the file to map the key to.

  • mode (Numeric, nil) (defaults to: nil)

    Optional: mode bits to use on this file, must be a value between 0 and 0777.



9
10
11
12
13
14
# File 'path_mapping.rb', line 9

def initialize(path:, mode: nil)
  @path = path
  Jsii::Type.check_type(@path, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "path")
  @mode = mode
  Jsii::Type.check_type(@mode, "eyJwcmltaXRpdmUiOiJudW1iZXIifQ==", "mode") unless @mode.nil?
end

Instance Attribute Details

#modeNumeric? (readonly)

Optional: mode bits to use on this file, must be a value between 0 and 0777.

If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

Returns:

  • (Numeric, nil)


31
32
33
# File 'path_mapping.rb', line 31

def mode
  @mode
end

#pathString (readonly)

The relative path of the file to map the key to.

May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.

Returns:

  • (String)


23
24
25
# File 'path_mapping.rb', line 23

def path
  @path
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
# File 'path_mapping.rb', line 33

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

Instance Method Details

#to_jsiiObject



40
41
42
43
44
45
46
47
# File 'path_mapping.rb', line 40

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