Class: AWSCDK::Batch::HostPathVolume
- Inherits:
-
EKSVolume
- Object
- EKSVolume
- AWSCDK::Batch::HostPathVolume
- Defined in:
- batch/host_path_volume.rb
Overview
A Kubernetes HostPath volume.
Class Method Summary collapse
-
.is_host_path_volume(x) ⇒ Boolean
returns
trueifxis a HostPathVolume,falseotherwise. - .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#container_path ⇒ String?
The path on the container where the container is mounted.
-
#initialize(options) ⇒ HostPathVolume
constructor
A new instance of HostPathVolume.
-
#name ⇒ String
The name of this volume.
-
#path ⇒ String
The path of the file or directory on the host to mount into containers on the pod.
-
#readonly ⇒ Boolean?
If specified, the container has readonly access to the volume.
Constructor Details
#initialize(options) ⇒ HostPathVolume
Returns a new instance of HostPathVolume.
11 12 13 14 15 |
# File 'batch/host_path_volume.rb', line 11 def initialize() = .is_a?(Hash) ? ::AWSCDK::Batch::HostPathVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSG9zdFBhdGhWb2x1bWVPcHRpb25zIn0=")), "options") Jsii::Object.instance_method(:initialize).bind(self).call() end |
Class Method Details
.is_host_path_volume(x) ⇒ Boolean
returns true if x is a HostPathVolume, false otherwise.
30 31 32 33 |
# File 'batch/host_path_volume.rb', line 30 def self.is_host_path_volume(x) Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.HostPathVolume", "isHostPathVolume", [x]) end |
.jsii_overridable_methods ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'batch/host_path_volume.rb', line 17 def self.jsii_overridable_methods { :name => { kind: :property, name: "name", is_optional: false }, :container_path => { kind: :property, name: "containerPath", is_optional: true }, :readonly => { kind: :property, name: "readonly", is_optional: true }, :path => { kind: :property, name: "path", is_optional: false }, } end |
Instance Method Details
#container_path ⇒ String?
Default: - the container is not mounted
The path on the container where the container is mounted.
49 50 51 |
# File 'batch/host_path_volume.rb', line 49 def container_path() jsii_get_property("containerPath") end |
#name ⇒ String
The name of this volume.
The name must be a valid DNS subdomain name.
41 42 43 |
# File 'batch/host_path_volume.rb', line 41 def name() jsii_get_property("name") end |
#path ⇒ String
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.
69 70 71 |
# File 'batch/host_path_volume.rb', line 69 def path() jsii_get_property("path") end |
#readonly ⇒ Boolean?
Default: false
If specified, the container has readonly access to the volume.
Otherwise, the container has read/write access.
59 60 61 |
# File 'batch/host_path_volume.rb', line 59 def readonly() jsii_get_property("readonly") end |