Class: AWSCDK::ECS::MountPoint

Inherits:
BaseMountPoint
  • Object
show all
Defined in:
ecs/mount_point.rb

Overview

The details of data volume mount points for a container.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path:, read_only:, source_volume:) ⇒ MountPoint

Returns a new instance of MountPoint.

Parameters:

  • container_path (String)

    The path on the container to mount the host volume at.

  • read_only (Boolean)

    Specifies whether to give the container read-only access to the volume.

  • source_volume (String)

    The name of the volume to mount.



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

def initialize(container_path:, read_only:, source_volume:)
  @container_path = container_path
  Jsii::Type.check_type(@container_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerPath")
  @read_only = read_only
  Jsii::Type.check_type(@read_only, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readOnly")
  @source_volume = source_volume
  Jsii::Type.check_type(@source_volume, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceVolume")
end

Instance Attribute Details

#container_pathString (readonly)

The path on the container to mount the host volume at.

Returns:

  • (String)


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

def container_path
  @container_path
end

#read_onlyBoolean (readonly)

Specifies whether to give the container read-only access to the volume.

If this value is true, the container has read-only access to the volume. If this value is false, then the container can write to the volume.

Returns:

  • (Boolean)


29
30
31
# File 'ecs/mount_point.rb', line 29

def read_only
  @read_only
end

#source_volumeString (readonly)

The name of the volume to mount.

Must be a volume name referenced in the name parameter of task definition volume.

Returns:

  • (String)


35
36
37
# File 'ecs/mount_point.rb', line 35

def source_volume
  @source_volume
end

Class Method Details

.jsii_propertiesObject



37
38
39
40
41
42
43
# File 'ecs/mount_point.rb', line 37

def self.jsii_properties
  {
    :container_path => "containerPath",
    :read_only => "readOnly",
    :source_volume => "sourceVolume",
  }
end

Instance Method Details

#to_jsiiObject



45
46
47
48
49
50
51
52
53
54
# File 'ecs/mount_point.rb', line 45

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "containerPath" => @container_path,
    "readOnly" => @read_only,
    "sourceVolume" => @source_volume,
  })
  result.compact
end