Class: AWSCDK::Batch::EmptyDirVolumeOptions
- Inherits:
-
EKSVolumeOptions
- Object
- EKSVolumeOptions
- AWSCDK::Batch::EmptyDirVolumeOptions
- Defined in:
- batch/empty_dir_volume_options.rb
Overview
Options for a Kubernetes EmptyDir volume.
Instance Attribute Summary collapse
-
#medium ⇒ AWSCDK::Batch::EmptyDirMediumType?
readonly
The storage type to use for this Volume.
-
#mount_path ⇒ String?
readonly
The path on the container where the volume is mounted.
-
#name ⇒ String
readonly
The name of this volume.
-
#readonly ⇒ Boolean?
readonly
If specified, the container has readonly access to the volume.
-
#size_limit ⇒ AWSCDK::Size?
readonly
The maximum size for this Volume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, mount_path: nil, readonly: nil, medium: nil, size_limit: nil) ⇒ EmptyDirVolumeOptions
constructor
A new instance of EmptyDirVolumeOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, mount_path: nil, readonly: nil, medium: nil, size_limit: nil) ⇒ EmptyDirVolumeOptions
Returns a new instance of EmptyDirVolumeOptions.
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
#medium ⇒ AWSCDK::Batch::EmptyDirMediumType? (readonly)
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_path ⇒ String? (readonly)
Default: - the volume is not mounted
The path on the container where the volume is mounted.
38 39 40 |
# File 'batch/empty_dir_volume_options.rb', line 38 def mount_path @mount_path end |
#name ⇒ String (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 |
#readonly ⇒ Boolean? (readonly)
Default: false
If specified, the container has readonly access to the volume.
Otherwise, the container has read/write access.
45 46 47 |
# File 'batch/empty_dir_volume_options.rb', line 45 def readonly @readonly end |
#size_limit ⇒ AWSCDK::Size? (readonly)
Default: - no size limit
The maximum size for this Volume.
55 56 57 |
# File 'batch/empty_dir_volume_options.rb', line 55 def size_limit @size_limit end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |