Class: AWSCDK::ECS::Tmpfs

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
ecs/tmpfs.rb

Overview

The details of a tmpfs mount for a container.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path:, size:, mount_options: nil) ⇒ Tmpfs

Returns a new instance of Tmpfs.

Parameters:

  • container_path (String)

    The absolute file path where the tmpfs volume is to be mounted.

  • size (Numeric)

    The size (in MiB) of the tmpfs volume.

  • mount_options (Array<AWSCDK::ECS::TmpfsMountOption>, nil) (defaults to: nil)

    The list of tmpfs volume mount options.



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

def initialize(container_path:, size:, mount_options: nil)
  @container_path = container_path
  Jsii::Type.check_type(@container_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerPath")
  @size = size
  Jsii::Type.check_type(@size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "size")
  @mount_options = mount_options
  Jsii::Type.check_type(@mount_options, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lY3MuVG1wZnNNb3VudE9wdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "mountOptions") unless @mount_options.nil?
end

Instance Attribute Details

#container_pathString (readonly)

The absolute file path where the tmpfs volume is to be mounted.

Returns:

  • (String)


22
23
24
# File 'ecs/tmpfs.rb', line 22

def container_path
  @container_path
end

#mount_optionsArray<AWSCDK::ECS::TmpfsMountOption>? (readonly)

The list of tmpfs volume mount options.

For more information, see TmpfsMountOptions.

Returns:



33
34
35
# File 'ecs/tmpfs.rb', line 33

def mount_options
  @mount_options
end

#sizeNumeric (readonly)

The size (in MiB) of the tmpfs volume.

Returns:

  • (Numeric)


26
27
28
# File 'ecs/tmpfs.rb', line 26

def size
  @size
end

Class Method Details

.jsii_propertiesObject



35
36
37
38
39
40
41
# File 'ecs/tmpfs.rb', line 35

def self.jsii_properties
  {
    :container_path => "containerPath",
    :size => "size",
    :mount_options => "mountOptions",
  }
end

Instance Method Details

#to_jsiiObject



43
44
45
46
47
48
49
50
51
# File 'ecs/tmpfs.rb', line 43

def to_jsii
  result = {}
  result.merge!({
    "containerPath" => @container_path,
    "size" => @size,
    "mountOptions" => @mount_options,
  })
  result.compact
end