Class DockerVolumeConfiguration
The configuration for a Docker volume.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class DockerVolumeConfiguration : Object, IDockerVolumeConfiguration
Syntax (vb)
Public Class DockerVolumeConfiguration
Inherits Object
Implements IDockerVolumeConfiguration
Remarks
Docker volumes are only supported when you are using the EC2 launch type.
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;
var dockerVolumeConfiguration = new DockerVolumeConfiguration {
Driver = "driver",
Scope = Scope.TASK,
// the properties below are optional
Autoprovision = false,
DriverOpts = new Dictionary<string, string> {
{ "driverOptsKey", "driverOpts" }
},
Labels = new Dictionary<string, string> {
{ "labelsKey", "labels" }
}
};
Synopsis
Constructors
DockerVolumeConfiguration() |
Properties
Autoprovision | Specifies whether the Docker volume should be created if it does not already exist. |
Driver | The Docker volume driver to use. |
DriverOpts | A map of Docker driver-specific options passed through. |
Labels | Custom metadata to add to your Docker volume. |
Scope | The scope for the Docker volume that determines its lifecycle. |
Constructors
DockerVolumeConfiguration()
public DockerVolumeConfiguration()
Properties
Autoprovision
Specifies whether the Docker volume should be created if it does not already exist.
public Nullable<bool> Autoprovision { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If true is specified, the Docker volume will be created for you.
Default: false
Driver
The Docker volume driver to use.
public string Driver { get; set; }
Property Value
System.String
DriverOpts
A map of Docker driver-specific options passed through.
public IDictionary<string, string> DriverOpts { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: No options
Labels
Custom metadata to add to your Docker volume.
public IDictionary<string, string> Labels { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Default: No labels
Scope
The scope for the Docker volume that determines its lifecycle.
public Scope Scope { get; set; }
Property Value