Class: AWSCDK::DockerVolume
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::DockerVolume
- Defined in:
- docker_volume.rb
Overview
A Docker volume.
Instance Attribute Summary collapse
-
#consistency ⇒ AWSCDK::DockerVolumeConsistency?
readonly
Mount consistency.
-
#container_path ⇒ String
readonly
The path where the file or directory is mounted in the container.
-
#host_path ⇒ String
readonly
The path to the file or directory on the host machine.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(container_path:, host_path:, consistency: nil) ⇒ DockerVolume
constructor
A new instance of DockerVolume.
- #to_jsii ⇒ Object
Constructor Details
#initialize(container_path:, host_path:, consistency: nil) ⇒ DockerVolume
Returns a new instance of DockerVolume.
10 11 12 13 14 15 16 17 |
# File 'docker_volume.rb', line 10 def initialize(container_path:, host_path:, consistency: nil) @container_path = container_path Jsii::Type.check_type(@container_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "containerPath") @host_path = host_path Jsii::Type.check_type(@host_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "hostPath") @consistency = consistency Jsii::Type.check_type(@consistency, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Eb2NrZXJWb2x1bWVDb25zaXN0ZW5jeSJ9")), "consistency") unless @consistency.nil? end |
Instance Attribute Details
#consistency ⇒ AWSCDK::DockerVolumeConsistency? (readonly)
Note:
Default: DockerConsistency.DELEGATED
Mount consistency.
Only applicable for macOS
34 35 36 |
# File 'docker_volume.rb', line 34 def consistency @consistency end |
#container_path ⇒ String (readonly)
The path where the file or directory is mounted in the container.
22 23 24 |
# File 'docker_volume.rb', line 22 def container_path @container_path end |
#host_path ⇒ String (readonly)
The path to the file or directory on the host machine.
26 27 28 |
# File 'docker_volume.rb', line 26 def host_path @host_path end |
Class Method Details
.jsii_properties ⇒ Object
36 37 38 39 40 41 42 |
# File 'docker_volume.rb', line 36 def self.jsii_properties { :container_path => "containerPath", :host_path => "hostPath", :consistency => "consistency", } end |
Instance Method Details
#to_jsii ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'docker_volume.rb', line 44 def to_jsii result = {} result.merge!({ "containerPath" => @container_path, "hostPath" => @host_path, "consistency" => @consistency, }) result.compact end |