Class: AWSCDK::Batch::HostVolume
- Inherits:
-
ECSVolume
- Object
- ECSVolume
- AWSCDK::Batch::HostVolume
- Defined in:
- batch/host_volume.rb
Overview
Creates a Host volume.
This volume will persist on the host at the specified host_path.
If the host_path is not specified, Docker will choose the host path. In this case,
the data may not persist after the containers that use it stop running.
Class Method Summary collapse
-
.is_host_volume(x) ⇒ Boolean
returns
trueifxis aHostVolume,falseotherwise. - .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#container_path ⇒ String
The path on the container that this volume will be mounted to.
-
#host_path ⇒ String?
The path on the host machine this container will have access to.
-
#initialize(options) ⇒ HostVolume
constructor
A new instance of HostVolume.
-
#name ⇒ String
The name of this volume.
-
#readonly ⇒ Boolean?
Whether or not the container has readonly access to this volume.
Constructor Details
#initialize(options) ⇒ HostVolume
Returns a new instance of HostVolume.
13 14 15 16 17 |
# File 'batch/host_volume.rb', line 13 def initialize() = .is_a?(Hash) ? ::AWSCDK::Batch::HostVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSG9zdFZvbHVtZU9wdGlvbnMifQ==")), "options") Jsii::Object.instance_method(:initialize).bind(self).call() end |
Class Method Details
.is_host_volume(x) ⇒ Boolean
returns true if x is a HostVolume, false otherwise.
32 33 34 35 |
# File 'batch/host_volume.rb', line 32 def self.is_host_volume(x) Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.HostVolume", "isHostVolume", [x]) end |
.jsii_overridable_methods ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'batch/host_volume.rb', line 19 def self.jsii_overridable_methods { :container_path => { kind: :property, name: "containerPath", is_optional: false }, :name => { kind: :property, name: "name", is_optional: false }, :readonly => { kind: :property, name: "readonly", is_optional: true }, :host_path => { kind: :property, name: "hostPath", is_optional: true }, } end |
Instance Method Details
#container_path ⇒ String
The path on the container that this volume will be mounted to.
40 41 42 |
# File 'batch/host_volume.rb', line 40 def container_path() jsii_get_property("containerPath") end |
#host_path ⇒ String?
The path on the host machine this container will have access to.
62 63 64 |
# File 'batch/host_volume.rb', line 62 def host_path() jsii_get_property("hostPath") end |
#name ⇒ String
The name of this volume.
47 48 49 |
# File 'batch/host_volume.rb', line 47 def name() jsii_get_property("name") end |
#readonly ⇒ Boolean?
Default: false
Whether or not the container has readonly access to this volume.
55 56 57 |
# File 'batch/host_volume.rb', line 55 def readonly() jsii_get_property("readonly") end |