Interface DockerVolumeConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
DockerVolumeConfiguration.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-29T11:15:39.161Z")
@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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forDockerVolumeConfigurationstatic final classAn implementation forDockerVolumeConfiguration -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default BooleanSpecifies whether the Docker volume should be created if it does not already exist.The Docker volume driver to use.A map of Docker driver-specific options passed through.Custom metadata to add to your Docker volume.getScope()The scope for the Docker volume that determines its lifecycle.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getDriver
The Docker volume driver to use. -
getScope
The scope for the Docker volume that determines its lifecycle. -
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
A map of Docker driver-specific options passed through.Default: No options
-
getLabels
Custom metadata to add to your Docker volume.Default: No labels
-
builder
- Returns:
- a
DockerVolumeConfiguration.BuilderofDockerVolumeConfiguration
-