Class: AWSCDK::Batch::EKSVolume

Inherits:
Jsii::Object
  • Object
show all
Defined in:
batch/eks_volume.rb

Overview

A Volume that can be mounted to a container supported by EKS.

Direct Known Subclasses

EmptyDirVolume, HostPathVolume, SecretPathVolume

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ EKSVolume

Returns a new instance of EKSVolume.

Parameters:



9
10
11
12
13
# File 'batch/eks_volume.rb', line 9

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

Class Method Details

.empty_dir(options) ⇒ AWSCDK::Batch::EmptyDirVolume

Creates a Kubernetes EmptyDir volume.



28
29
30
31
32
# File 'batch/eks_volume.rb', line 28

def self.empty_dir(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Batch::EmptyDirVolumeOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRW1wdHlEaXJWb2x1bWVPcHRpb25zIn0=")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EksVolume", "emptyDir", [options])
end

.host_path(options) ⇒ AWSCDK::Batch::HostPathVolume

Creates a Kubernetes HostPath volume.



39
40
41
42
43
# File 'batch/eks_volume.rb', line 39

def self.host_path(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::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EksVolume", "hostPath", [options])
end

.jsii_overridable_methodsObject



15
16
17
18
19
20
21
# File 'batch/eks_volume.rb', line 15

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 },
  }
end

.secret(options) ⇒ AWSCDK::Batch::SecretPathVolume

Creates a Kubernetes Secret volume.



50
51
52
53
54
# File 'batch/eks_volume.rb', line 50

def self.secret(options)
  options = options.is_a?(Hash) ? ::AWSCDK::Batch::SecretPathVolumeOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guU2VjcmV0UGF0aFZvbHVtZU9wdGlvbnMifQ==")), "options")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EksVolume", "secret", [options])
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)


70
71
72
# File 'batch/eks_volume.rb', line 70

def container_path()
  jsii_get_property("containerPath")
end

#nameString

The name of this volume.

The name must be a valid DNS subdomain name.



62
63
64
# File 'batch/eks_volume.rb', line 62

def name()
  jsii_get_property("name")
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)


80
81
82
# File 'batch/eks_volume.rb', line 80

def readonly()
  jsii_get_property("readonly")
end