Class: AWSCDK::ECS::ScratchSpace

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

Overview

The temporary disk space mounted to the container.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path:, name:, read_only:, source_path:) ⇒ ScratchSpace

Returns a new instance of ScratchSpace.

Parameters:

  • container_path (String)

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

  • name (String)

    The name of the scratch volume to mount.

  • read_only (Boolean)

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

  • source_path (String)


11
12
13
14
15
16
17
18
19
20
# File 'ecs/scratch_space.rb', line 11

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

Instance Attribute Details

#container_pathString (readonly)

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

Returns:

  • (String)


25
26
27
# File 'ecs/scratch_space.rb', line 25

def container_path
  @container_path
end

#nameString (readonly)

The name of the scratch volume to mount.

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

Returns:

  • (String)


31
32
33
# File 'ecs/scratch_space.rb', line 31

def name
  @name
end

#read_onlyBoolean (readonly)

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

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

Returns:

  • (Boolean)


38
39
40
# File 'ecs/scratch_space.rb', line 38

def read_only
  @read_only
end

#source_pathString (readonly)

Returns:

  • (String)


40
41
42
# File 'ecs/scratch_space.rb', line 40

def source_path
  @source_path
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'ecs/scratch_space.rb', line 42

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

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'ecs/scratch_space.rb', line 51

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