Class: AWSCDK::Batch::EmptyDirVolumeOptions

Inherits:
EKSVolumeOptions
  • Object
show all
Defined in:
batch/empty_dir_volume_options.rb

Overview

Options for a Kubernetes EmptyDir volume.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, mount_path: nil, readonly: nil, medium: nil, size_limit: nil) ⇒ EmptyDirVolumeOptions

Returns a new instance of EmptyDirVolumeOptions.

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.

  • medium (AWSCDK::Batch::EmptyDirMediumType, nil) (defaults to: nil)

    The storage type to use for this Volume.

  • size_limit (AWSCDK::Size, nil) (defaults to: nil)

    The maximum size for this Volume.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'batch/empty_dir_volume_options.rb', line 14

def initialize(name:, mount_path: nil, readonly: nil, medium: nil, size_limit: 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?
  @medium = medium
  Jsii::Type.check_type(@medium, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRW1wdHlEaXJNZWRpdW1UeXBlIn0=")), "medium") unless @medium.nil?
  @size_limit = size_limit
  Jsii::Type.check_type(@size_limit, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "sizeLimit") unless @size_limit.nil?
end

Instance Attribute Details

#mediumAWSCDK::Batch::EmptyDirMediumType? (readonly)

Note:

Default: EmptyDirMediumType.DISK

The storage type to use for this Volume.



50
51
52
# File 'batch/empty_dir_volume_options.rb', line 50

def medium
  @medium
end

#mount_pathString? (readonly)

Note:

Default: - the volume is not mounted

The path on the container where the volume is mounted.

Returns:

  • (String, nil)


38
39
40
# File 'batch/empty_dir_volume_options.rb', line 38

def mount_path
  @mount_path
end

#nameString (readonly)

The name of this volume.

The name must be a valid DNS subdomain name.



33
34
35
# File 'batch/empty_dir_volume_options.rb', line 33

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)


45
46
47
# File 'batch/empty_dir_volume_options.rb', line 45

def readonly
  @readonly
end

#size_limitAWSCDK::Size? (readonly)

Note:

Default: - no size limit

The maximum size for this Volume.

Returns:



55
56
57
# File 'batch/empty_dir_volume_options.rb', line 55

def size_limit
  @size_limit
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'batch/empty_dir_volume_options.rb', line 57

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

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
78
# File 'batch/empty_dir_volume_options.rb', line 67

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