Show / Hide Table of Contents

Class EfsVolume

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

Inheritance
object
EcsVolume
EfsVolume
Inherited Members
EcsVolume.Efs(IEfsVolumeOptions)
EcsVolume.Host(IHostVolumeOptions)
EcsVolume.ContainerPath
EcsVolume.Name
EcsVolume.Readonly
Namespace: Amazon.CDK.AWS.Batch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class EfsVolume : EcsVolume
Syntax (vb)
Public Class EfsVolume Inherits EcsVolume
Remarks

this volume can grow and shrink as needed

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.Batch;
             using Amazon.CDK.AWS.EFS;

             FileSystem fileSystem;

             var efsVolume = new EfsVolume(new EfsVolumeOptions {
                 ContainerPath = "containerPath",
                 FileSystem = fileSystem,
                 Name = "name",

                 // the properties below are optional
                 AccessPointId = "accessPointId",
                 EnableTransitEncryption = false,
                 Readonly = false,
                 RootDirectory = "rootDirectory",
                 TransitEncryptionPort = 123,
                 UseJobRole = false
             });

Synopsis

Constructors

EfsVolume(IEfsVolumeOptions)

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

Properties

AccessPointId

The Amazon EFS access point ID to use.

EnableTransitEncryption

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

FileSystem

The EFS File System that supports this volume.

RootDirectory

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

TransitEncryptionPort

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

UseJobRole

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

Methods

IsEfsVolume(object)

Returns true if x is an EfsVolume, false otherwise.

Constructors

EfsVolume(IEfsVolumeOptions)

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

public EfsVolume(IEfsVolumeOptions options)
Parameters
options IEfsVolumeOptions
Remarks

this volume can grow and shrink as needed

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.Batch;
             using Amazon.CDK.AWS.EFS;

             FileSystem fileSystem;

             var efsVolume = new EfsVolume(new EfsVolumeOptions {
                 ContainerPath = "containerPath",
                 FileSystem = fileSystem,
                 Name = "name",

                 // the properties below are optional
                 AccessPointId = "accessPointId",
                 EnableTransitEncryption = false,
                 Readonly = false,
                 RootDirectory = "rootDirectory",
                 TransitEncryptionPort = 123,
                 UseJobRole = false
             });

Properties

AccessPointId

The Amazon EFS access point ID to use.

public virtual string? AccessPointId { get; }
Property Value

string

Remarks

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

Default: - no accessPointId

See: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html

EnableTransitEncryption

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

public virtual bool? EnableTransitEncryption { get; }
Property Value

bool?

Remarks

Default: false

See: https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html

FileSystem

The EFS File System that supports this volume.

public virtual IFileSystem FileSystem { get; }
Property Value

IFileSystem

Remarks

this volume can grow and shrink as needed

ExampleMetadata: fixture=_generated

RootDirectory

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

public virtual string? RootDirectory { get; }
Property Value

string

Remarks

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.

Default: - root of the EFS File System

TransitEncryptionPort

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

public virtual double? TransitEncryptionPort { get; }
Property Value

double?

Remarks

The value must be between 0 and 65,535.

Default: - chosen by the EFS Mount Helper

See: https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html

UseJobRole

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

public virtual bool? UseJobRole { get; }
Property Value

bool?

Remarks

If specified, enableTransitEncryption must be true.

Default: false

See: https://docs.aws.amazon.com/batch/latest/userguide/efs-volumes.html#efs-volume-accesspoints

Methods

IsEfsVolume(object)

Returns true if x is an EfsVolume, false otherwise.

public static bool IsEfsVolume(object x)
Parameters
x object
Returns

bool

Remarks

this volume can grow and shrink as needed

ExampleMetadata: fixture=_generated

Back to top Generated by DocFX