aws-cdk-lib.aws_ecs.DockerVolumeConfiguration

interface DockerVolumeConfiguration

LanguageType name
.NETAmazon.CDK.AWS.ECS.DockerVolumeConfiguration
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsecs#DockerVolumeConfiguration
Javasoftware.amazon.awscdk.services.ecs.DockerVolumeConfiguration
Pythonaws_cdk.aws_ecs.DockerVolumeConfiguration
TypeScript (source)aws-cdk-lib » aws_ecs » DockerVolumeConfiguration

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 { 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

NameTypeDescription
driverstringThe Docker volume driver to use.
scopeScopeThe scope for the Docker volume that determines its lifecycle.
autoprovision?booleanSpecifies whether the Docker volume should be created if it does not already exist.
driverOpts?{ [string]: string }A map of Docker driver-specific options passed through.
labels?{ [string]: string }Custom metadata to add to your Docker volume.

driver

Type: string

The Docker volume driver to use.


scope

Type: Scope

The scope for the Docker volume that determines its lifecycle.


autoprovision?

Type: boolean (optional, default: 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.


driverOpts?

Type: { [string]: string } (optional, default: No options)

A map of Docker driver-specific options passed through.


labels?

Type: { [string]: string } (optional, default: No labels)

Custom metadata to add to your Docker volume.