Class: AWSCDK::ECS::ContainerMountPoint

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

Overview

Defines the mount point details for attaching a volume to a container.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path:, read_only:) ⇒ ContainerMountPoint

Returns a new instance of ContainerMountPoint.

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.



9
10
11
12
13
14
# File 'ecs/container_mount_point.rb', line 9

def initialize(container_path:, read_only:)
  @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")
end

Instance Attribute Details

#container_pathString (readonly)

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

Returns:

  • (String)


19
20
21
# File 'ecs/container_mount_point.rb', line 19

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)


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

def read_only
  @read_only
end

Class Method Details

.jsii_propertiesObject



28
29
30
31
32
33
# File 'ecs/container_mount_point.rb', line 28

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

Instance Method Details

#to_jsiiObject



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

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