Class: AWSCDK::Batch::HostVolumeOptions
- Inherits:
-
ECSVolumeOptions
- Object
- ECSVolumeOptions
- AWSCDK::Batch::HostVolumeOptions
- Defined in:
- batch/host_volume_options.rb
Overview
Options for configuring an ECS HostVolume.
Instance Attribute Summary collapse
-
#container_path ⇒ String
readonly
the path on the container where this volume is mounted.
-
#host_path ⇒ String?
readonly
The path on the host machine this container will have access to.
-
#name ⇒ String
readonly
the name of this volume.
-
#readonly ⇒ Boolean?
readonly
if set, the container will have readonly access to the volume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container_path:, name:, readonly: nil, host_path: nil) ⇒ HostVolumeOptions
constructor
A new instance of HostVolumeOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(container_path:, name:, readonly: nil, host_path: nil) ⇒ HostVolumeOptions
Returns a new instance of HostVolumeOptions.
11 12 13 14 15 16 17 18 19 20 |
# File 'batch/host_volume_options.rb', line 11 def initialize(container_path:, name:, readonly: nil, host_path: 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? @host_path = host_path Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostPath") unless @host_path.nil? end |
Instance Attribute Details
#container_path ⇒ String (readonly)
the path on the container where this volume is mounted.
25 26 27 |
# File 'batch/host_volume_options.rb', line 25 def container_path @container_path end |
#host_path ⇒ String? (readonly)
Note:
Default: - Docker will choose the host path. The data may not persist after the containers that use it stop running.
The path on the host machine this container will have access to.
39 40 41 |
# File 'batch/host_volume_options.rb', line 39 def host_path @host_path end |
#name ⇒ String (readonly)
the name of this volume.
29 30 31 |
# File 'batch/host_volume_options.rb', line 29 def name @name end |
#readonly ⇒ Boolean? (readonly)
Note:
Default: false
if set, the container will have readonly access to the volume.
34 35 36 |
# File 'batch/host_volume_options.rb', line 34 def readonly @readonly end |
Class Method Details
.jsii_properties ⇒ Object
41 42 43 44 45 46 47 48 |
# File 'batch/host_volume_options.rb', line 41 def self.jsii_properties { :container_path => "containerPath", :name => "name", :readonly => "readonly", :host_path => "hostPath", } end |
Instance Method Details
#to_jsii ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'batch/host_volume_options.rb', line 50 def to_jsii result = {} result.merge!(super) result.merge!({ "containerPath" => @container_path, "name" => @name, "readonly" => @readonly, "hostPath" => @host_path, }) result.compact end |