Class: AWSCDK::Batch::HostPathVolumeOptions
- Inherits:
-
EKSVolumeOptions
- Object
- EKSVolumeOptions
- AWSCDK::Batch::HostPathVolumeOptions
- Defined in:
- batch/host_path_volume_options.rb
Overview
Options for a kubernetes HostPath volume.
Instance Attribute Summary collapse
-
#host_path ⇒ String
readonly
The path of the file or directory on the host to mount into containers on the pod.
-
#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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, mount_path: nil, readonly: nil, host_path:) ⇒ HostPathVolumeOptions
constructor
A new instance of HostPathVolumeOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(name:, mount_path: nil, readonly: nil, host_path:) ⇒ HostPathVolumeOptions
Returns a new instance of HostPathVolumeOptions.
13 14 15 16 17 18 19 20 21 22 |
# File 'batch/host_path_volume_options.rb', line 13 def initialize(name:, mount_path: nil, readonly: nil, host_path:) @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? @host_path = host_path Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostPath") end |
Instance Attribute Details
#host_path ⇒ String (readonly)
The path of the file or directory on the host to mount into containers on the pod.
Note: HothPath Volumes present many security risks, and should be avoided when possible.
49 50 51 |
# File 'batch/host_path_volume_options.rb', line 49 def host_path @host_path end |
#mount_path ⇒ String? (readonly)
Default: - the volume is not mounted
The path on the container where the volume is mounted.
35 36 37 |
# File 'batch/host_path_volume_options.rb', line 35 def mount_path @mount_path end |
#name ⇒ String (readonly)
The name of this volume.
The name must be a valid DNS subdomain name.
30 31 32 |
# File 'batch/host_path_volume_options.rb', line 30 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.
42 43 44 |
# File 'batch/host_path_volume_options.rb', line 42 def readonly @readonly end |
Class Method Details
.jsii_properties ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'batch/host_path_volume_options.rb', line 51 def self.jsii_properties { :name => "name", :mount_path => "mountPath", :readonly => "readonly", :host_path => "hostPath", } end |
Instance Method Details
#to_jsii ⇒ Object
60 61 62 63 64 65 66 67 68 69 70 |
# File 'batch/host_path_volume_options.rb', line 60 def to_jsii result = {} result.merge!(super) result.merge!({ "name" => @name, "mountPath" => @mount_path, "readonly" => @readonly, "hostPath" => @host_path, }) result.compact end |