Class: AWSCDK::Batch::EFSVolume

Inherits:
ECSVolume
  • Object
show all
Defined in:
batch/efs_volume.rb

Overview

A Volume that uses an AWS Elastic File System (EFS);

this volume can grow and shrink as needed

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ EFSVolume

Returns a new instance of EFSVolume.

Parameters:



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

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

Class Method Details

.is_efs_volume(x) ⇒ Boolean

Returns true if x is an EfsVolume, false otherwise.

Parameters:

  • x (Object)

Returns:

  • (Boolean)


35
36
37
38
# File 'batch/efs_volume.rb', line 35

def self.is_efs_volume(x)
  Jsii::Type.check_type(x, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "x")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.EfsVolume", "isEfsVolume", [x])
end

.jsii_overridable_methodsObject



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'batch/efs_volume.rb', line 17

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 },
    :file_system => { kind: :property, name: "fileSystem", is_optional: false },
    :access_point_id => { kind: :property, name: "accessPointId", is_optional: true },
    :enable_transit_encryption => { kind: :property, name: "enableTransitEncryption", is_optional: true },
    :root_directory => { kind: :property, name: "rootDirectory", is_optional: true },
    :transit_encryption_port => { kind: :property, name: "transitEncryptionPort", is_optional: true },
    :use_job_role => { kind: :property, name: "useJobRole", is_optional: true },
  }
end

Instance Method Details

#access_point_idString?

Note:

Default: - no accessPointId

The Amazon EFS access point ID to use.

If an access point is specified, root_directory must either be omitted or set to / which enforces the path set on the EFS access point. If an access point is used, enable_transit_encryption must be true.



78
79
80
# File 'batch/efs_volume.rb', line 78

def access_point_id()
  jsii_get_property("accessPointId")
end

#container_pathString

The path on the container that this volume will be mounted to.

Returns:

  • (String)


43
44
45
# File 'batch/efs_volume.rb', line 43

def container_path()
  jsii_get_property("containerPath")
end

#enable_transit_encryptionBoolean?

Note:

Default: false

Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.



87
88
89
# File 'batch/efs_volume.rb', line 87

def enable_transit_encryption()
  jsii_get_property("enableTransitEncryption")
end

#file_systemAWSCDK::EFS::IFileSystem

The EFS File System that supports this volume.



65
66
67
# File 'batch/efs_volume.rb', line 65

def file_system()
  jsii_get_property("fileSystem")
end

#nameString

The name of this volume.

Returns:

  • (String)


50
51
52
# File 'batch/efs_volume.rb', line 50

def name()
  jsii_get_property("name")
end

#readonlyBoolean?

Note:

Default: false

Whether or not the container has readonly access to this volume.

Returns:

  • (Boolean, nil)


58
59
60
# File 'batch/efs_volume.rb', line 58

def readonly()
  jsii_get_property("readonly")
end

#root_directoryString?

Note:

Default: - root of the EFS File System

The directory within the Amazon EFS file system to mount as the root directory inside the host.

If this parameter is omitted, the root of the Amazon EFS volume is used instead. Specifying / has the same effect as omitting this parameter. The maximum length is 4,096 characters.

Returns:

  • (String, nil)


99
100
101
# File 'batch/efs_volume.rb', line 99

def root_directory()
  jsii_get_property("rootDirectory")
end

#transit_encryption_portNumeric?

Note:

Default: - chosen by the EFS Mount Helper

The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.

The value must be between 0 and 65,535.



110
111
112
# File 'batch/efs_volume.rb', line 110

def transit_encryption_port()
  jsii_get_property("transitEncryptionPort")
end

#use_job_roleBoolean?

Note:

Default: false

Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.

If specified, enable_transit_encryption must be true.



121
122
123
# File 'batch/efs_volume.rb', line 121

def use_job_role()
  jsii_get_property("useJobRole")
end