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 data volume configuration for tasks launched using this task definition.

Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a name and one of either configuredAtLaunch , dockerVolumeConfiguration , efsVolumeConfiguration , fsxWindowsFileServerVolumeConfiguration , or host . If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see 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()
         .configuredAtLaunch(false)
         .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())
         .fSxWindowsFileServerVolumeConfiguration(FSxWindowsFileServerVolumeConfigurationProperty.builder()
                 .fileSystemId("fileSystemId")
                 .rootDirectory("rootDirectory")
                 // the properties below are optional
                 .authorizationConfig(FSxAuthorizationConfigProperty.builder()
                         .credentialsParameter("credentialsParameter")
                         .domain("domain")
                         .build())
                 .build())
         .host(HostVolumePropertiesProperty.builder()
                 .sourcePath("sourcePath")
                 .build())
         .name("name")
         .build();
 

See Also: