Class: AWSCDK::Batch::ECSVolumeOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/ecs_volume_options.rb

Overview

Options to configure an EcsVolume.

Direct Known Subclasses

EFSVolumeOptions, HostVolumeOptions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container_path:, name:, readonly: nil) ⇒ ECSVolumeOptions

Returns a new instance of ECSVolumeOptions.

Parameters:

  • container_path (String)

    the path on the container where this volume is mounted.

  • name (String)

    the name of this volume.

  • readonly (Boolean, nil) (defaults to: nil)

    if set, the container will have readonly access to the volume.



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

def initialize(container_path:, name:, readonly: nil)
  @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")
  @readonly = readonly
  Jsii::Type.check_type(@readonly, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readonly") unless @readonly.nil?
end

Instance Attribute Details

#container_pathString (readonly)

the path on the container where this volume is mounted.

Returns:

  • (String)


22
23
24
# File 'batch/ecs_volume_options.rb', line 22

def container_path
  @container_path
end

#nameString (readonly)

the name of this volume.

Returns:

  • (String)


26
27
28
# File 'batch/ecs_volume_options.rb', line 26

def name
  @name
end

#readonlyBoolean? (readonly)

Note:

Default: false

if set, the container will have readonly access to the volume.

Returns:

  • (Boolean, nil)


31
32
33
# File 'batch/ecs_volume_options.rb', line 31

def readonly
  @readonly
end

Class Method Details

.jsii_propertiesObject



33
34
35
36
37
38
39
# File 'batch/ecs_volume_options.rb', line 33

def self.jsii_properties
  {
    :container_path => "containerPath",
    :name => "name",
    :readonly => "readonly",
  }
end

Instance Method Details

#to_jsiiObject



41
42
43
44
45
46
47
48
49
# File 'batch/ecs_volume_options.rb', line 41

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