Class: AWSCDK::Batch::EFSVolume
- Inherits:
-
ECSVolume
- Object
- ECSVolume
- AWSCDK::Batch::EFSVolume
- 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
-
.is_efs_volume(x) ⇒ Boolean
Returns true if x is an EfsVolume, false otherwise.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#access_point_id ⇒ String?
The Amazon EFS access point ID to use.
-
#container_path ⇒ String
The path on the container that this volume will be mounted to.
-
#enable_transit_encryption ⇒ Boolean?
Enables encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.
-
#file_system ⇒ AWSCDK::EFS::IFileSystem
The EFS File System that supports this volume.
-
#initialize(options) ⇒ EFSVolume
constructor
A new instance of EFSVolume.
-
#name ⇒ String
The name of this volume.
-
#readonly ⇒ Boolean?
Whether or not the container has readonly access to this volume.
-
#root_directory ⇒ String?
The directory within the Amazon EFS file system to mount as the root directory inside the host.
-
#transit_encryption_port ⇒ Numeric?
The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.
-
#use_job_role ⇒ Boolean?
Whether or not to use the AWS Batch job IAM role defined in a job definition when mounting the Amazon EFS file system.
Constructor Details
#initialize(options) ⇒ EFSVolume
Returns a new instance of EFSVolume.
11 12 13 14 15 |
# File 'batch/efs_volume.rb', line 11 def initialize() = .is_a?(Hash) ? ::AWSCDK::Batch::EFSVolumeOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guRWZzVm9sdW1lT3B0aW9ucyJ9")), "options") Jsii::Object.instance_method(:initialize).bind(self).call() end |
Class Method Details
.is_efs_volume(x) ⇒ Boolean
Returns true if x is an EfsVolume, false otherwise.
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_methods ⇒ Object
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_id ⇒ String?
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_path ⇒ String
The path on the container that this volume will be mounted to.
43 44 45 |
# File 'batch/efs_volume.rb', line 43 def container_path() jsii_get_property("containerPath") end |
#enable_transit_encryption ⇒ Boolean?
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_system ⇒ AWSCDK::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 |
#name ⇒ String
The name of this volume.
50 51 52 |
# File 'batch/efs_volume.rb', line 50 def name() jsii_get_property("name") end |
#readonly ⇒ Boolean?
Default: false
Whether or not the container has readonly access to this volume.
58 59 60 |
# File 'batch/efs_volume.rb', line 58 def readonly() jsii_get_property("readonly") end |
#root_directory ⇒ String?
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.
99 100 101 |
# File 'batch/efs_volume.rb', line 99 def root_directory() jsii_get_property("rootDirectory") end |
#transit_encryption_port ⇒ Numeric?
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_role ⇒ Boolean?
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 |