DockerVolumeConfiguration
- class aws_cdk.aws_ecs.DockerVolumeConfiguration(*, driver, scope, autoprovision=None, driver_opts=None, labels=None)
Bases:
object
The configuration for a Docker volume.
Docker volumes are only supported when you are using the EC2 launch type.
- Parameters:
driver (
str
) – The Docker volume driver to use.scope (
Scope
) – The scope for the Docker volume that determines its lifecycle.autoprovision (
Optional
[bool
]) – 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: falsedriver_opts (
Optional
[Mapping
[str
,str
]]) – A map of Docker driver-specific options passed through. Default: No optionslabels (
Optional
[Mapping
[str
,str
]]) – Custom metadata to add to your Docker volume. Default: No labels
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ecs as ecs docker_volume_configuration = ecs.DockerVolumeConfiguration( driver="driver", scope=ecs.Scope.TASK, # the properties below are optional autoprovision=False, driver_opts={ "driver_opts_key": "driverOpts" }, labels={ "labels_key": "labels" } )
Attributes
- autoprovision
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
- driver
The Docker volume driver to use.
- driver_opts
A map of Docker driver-specific options passed through.
- Default:
No options
- labels
Custom metadata to add to your Docker volume.
- Default:
No labels
- scope
The scope for the Docker volume that determines its lifecycle.