Class: AWSCDK::Batch::HostPathVolume

Inherits:
EKSVolume
  • Object
show all
Defined in:
batch/host_path_volume.rb

Overview

A Kubernetes HostPath volume.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ HostPathVolume

Returns a new instance of HostPathVolume.

Parameters:



11
12
13
14
15
# File 'batch/host_path_volume.rb', line 11

def initialize(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Batch::HostPathVolumeOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSG9zdFBhdGhWb2x1bWVPcHRpb25zIn0=")), "options")
  Jsii::Object.instance_method(:initialize).bind(self).call(options)
end

Class Method Details

.is_host_path_volume(x) ⇒ Boolean

returns true if x is a HostPathVolume, false otherwise.

Parameters:

  • x (Object)

Returns:

  • (Boolean)


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_methodsObject



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_pathString?

Note:

Default: - the container is not mounted

The path on the container where the container is mounted.

Returns:

  • (String, nil)


49
50
51
# File 'batch/host_path_volume.rb', line 49

def container_path()
  jsii_get_property("containerPath")
end

#nameString

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

#pathString

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

#readonlyBoolean?

Note:

Default: false

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.

Returns:

  • (Boolean, nil)


59
60
61
# File 'batch/host_path_volume.rb', line 59

def readonly()
  jsii_get_property("readonly")
end