Class: AWSCDK::ECS::VolumeFrom

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

Overview

The details on a data volume from another container in the same task definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(read_only:, source_container:) ⇒ VolumeFrom

Returns a new instance of VolumeFrom.

Parameters:

  • read_only (Boolean)

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

  • source_container (String)

    The name of another container within the same task definition from which to mount volumes.



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

def initialize(read_only:, source_container:)
  @read_only = read_only
  Jsii::Type.check_type(@read_only, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readOnly")
  @source_container = source_container
  Jsii::Type.check_type(@source_container, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceContainer")
end

Instance Attribute Details

#read_onlyBoolean (readonly)

Specifies whether the container has 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)


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

def read_only
  @read_only
end

#source_containerString (readonly)

The name of another container within the same task definition from which to mount volumes.

Returns:

  • (String)


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

def source_container
  @source_container
end

Class Method Details

.jsii_propertiesObject



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

def self.jsii_properties
  {
    :read_only => "readOnly",
    :source_container => "sourceContainer",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "readOnly" => @read_only,
    "sourceContainer" => @source_container,
  })
  result.compact
end