Interface DockerVolumeConfiguration

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
DockerVolumeConfiguration.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:16.427Z") @Stability(Stable) public interface DockerVolumeConfiguration extends software.amazon.jsii.JsiiSerializable
The configuration for a Docker volume.

Docker volumes are only supported when you are using the EC2 launch type.

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.*;
 DockerVolumeConfiguration dockerVolumeConfiguration = DockerVolumeConfiguration.builder()
         .driver("driver")
         .scope(Scope.TASK)
         // the properties below are optional
         .autoprovision(false)
         .driverOpts(Map.of(
                 "driverOptsKey", "driverOpts"))
         .labels(Map.of(
                 "labelsKey", "labels"))
         .build();
 
  • Method Details

    • getDriver

      @Stability(Stable) @NotNull String getDriver()
      The Docker volume driver to use.
    • getScope

      @Stability(Stable) @NotNull Scope getScope()
      The scope for the Docker volume that determines its lifecycle.
    • getAutoprovision

      @Stability(Stable) @Nullable default Boolean getAutoprovision()
      Specifies whether the Docker volume should be created if it does not already exist.

      If true is specified, the Docker volume will be created for you.

      Default: false

    • getDriverOpts

      @Stability(Stable) @Nullable default Map<String,String> getDriverOpts()
      A map of Docker driver-specific options passed through.

      Default: No options

    • getLabels

      @Stability(Stable) @Nullable default Map<String,String> getLabels()
      Custom metadata to add to your Docker volume.

      Default: No labels

    • builder

      @Stability(Stable) static DockerVolumeConfiguration.Builder builder()
      Returns:
      a DockerVolumeConfiguration.Builder of DockerVolumeConfiguration