Interface CfnTaskDefinition.VolumeProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnTaskDefinition.VolumeProperty.Jsii$Proxy
Enclosing class:
CfnTaskDefinition

@Stability(Stable) public static interface CfnTaskDefinition.VolumeProperty extends software.amazon.jsii.JsiiSerializable
The Volume property specifies a data volume used in a task definition.

For tasks that use a Docker volume, specify a DockerVolumeConfiguration . For tasks that use a bind mount host volume, specify a host and optional sourcePath . For more information about host and optional sourcePath , see Volumes and Using Data Volumes in Tasks .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ecs.*;
 VolumeProperty volumeProperty = VolumeProperty.builder()
         .dockerVolumeConfiguration(DockerVolumeConfigurationProperty.builder()
                 .autoprovision(false)
                 .driver("driver")
                 .driverOpts(Map.of(
                         "driverOptsKey", "driverOpts"))
                 .labels(Map.of(
                         "labelsKey", "labels"))
                 .scope("scope")
                 .build())
         .efsVolumeConfiguration(EFSVolumeConfigurationProperty.builder()
                 .filesystemId("filesystemId")
                 // the properties below are optional
                 .authorizationConfig(AuthorizationConfigProperty.builder()
                         .accessPointId("accessPointId")
                         .iam("iam")
                         .build())
                 .rootDirectory("rootDirectory")
                 .transitEncryption("transitEncryption")
                 .transitEncryptionPort(123)
                 .build())
         .host(HostVolumePropertiesProperty.builder()
                 .sourcePath("sourcePath")
                 .build())
         .name("name")
         .build();
 

See Also: