DockerVolumeConfiguration Struct
The configuration for a Docker volume.
Docker volumes are only supported when you are using the EC2 launch type.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const dockerVolumeConfiguration: ecs.DockerVolumeConfiguration = {
driver: 'driver',
scope: ecs.Scope.TASK,
// the properties below are optional
autoprovision: false,
driverOpts: {
driverOptsKey: 'driverOpts',
},
labels: {
labelsKey: 'labels',
},
};
Properties
autoprovisionoptionalbooleanautoprovisionoptionalboolautoprovisionoptionalBooleanAutoprovisionoptionalboolAutoprovisionoptional*bool= false#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.
The Docker volume driver to use.
driverOptsoptional{ [key: string]: string }driver_optsoptionaltyping.Mapping[str, str]driverOptsoptionalMap<String, String>DriverOptsoptionalIDictionary<string, string>DriverOptsoptional*map[string]*string#A map of Docker driver-specific options passed through.
Default: No options
labelsoptional{ [key: string]: string }labelsoptionaltyping.Mapping[str, str]labelsoptionalMap<String, String>LabelsoptionalIDictionary<string, string>Labelsoptional*map[string]*string#Custom metadata to add to your Docker volume.
Default: No labels