Class: AWSCDK::Batch::EKSVolumeOptions

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

Overview

Options to configure an EksVolume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, mount_path: nil, readonly: nil) ⇒ EKSVolumeOptions

Returns a new instance of EKSVolumeOptions.

Parameters:

  • name (String)

    The name of this volume.

  • mount_path (String, nil) (defaults to: nil)

    The path on the container where the volume is mounted.

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

    If specified, the container has readonly access to the volume.



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

def initialize(name:, mount_path: nil, readonly: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @mount_path = mount_path
  Jsii::Type.check_type(@mount_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mountPath") unless @mount_path.nil?
  @readonly = readonly
  Jsii::Type.check_type(@readonly, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "readonly") unless @readonly.nil?
end

Instance Attribute Details

#mount_pathString? (readonly)

Note:

Default: - the volume is not mounted

The path on the container where the volume is mounted.

Returns:

  • (String, nil)


30
31
32
# File 'batch/eks_volume_options.rb', line 30

def mount_path
  @mount_path
end

#nameString (readonly)

The name of this volume.

The name must be a valid DNS subdomain name.



25
26
27
# File 'batch/eks_volume_options.rb', line 25

def name
  @name
end

#readonlyBoolean? (readonly)

Note:

Default: false

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

Returns:

  • (Boolean, nil)


37
38
39
# File 'batch/eks_volume_options.rb', line 37

def readonly
  @readonly
end

Class Method Details

.jsii_propertiesObject



39
40
41
42
43
44
45
# File 'batch/eks_volume_options.rb', line 39

def self.jsii_properties
  {
    :name => "name",
    :mount_path => "mountPath",
    :readonly => "readonly",
  }
end

Instance Method Details

#to_jsiiObject



47
48
49
50
51
52
53
54
55
# File 'batch/eks_volume_options.rb', line 47

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