interface VolumeProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ECS.CfnDaemonTaskDefinition.VolumeProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#CfnDaemonTaskDefinition_VolumeProperty |
Java | software.amazon.awscdk.services.ecs.CfnDaemonTaskDefinition.VolumeProperty |
Python | aws_cdk.aws_ecs.CfnDaemonTaskDefinition.VolumeProperty |
TypeScript | aws-cdk-lib » aws_ecs » CfnDaemonTaskDefinition » VolumeProperty |
The data volume configuration for tasks launched using this task definition.
Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a name and one of either configuredAtLaunch, dockerVolumeConfiguration, efsVolumeConfiguration, fsxWindowsFileServerVolumeConfiguration, or host. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see Using data volumes in tasks.
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 volumeProperty: ecs.CfnDaemonTaskDefinition.VolumeProperty = {
host: {
sourcePath: 'sourcePath',
},
name: 'name',
};
Properties
| Name | Type | Description |
|---|---|---|
| host? | IResolvable | Host | Details on a container instance bind mount host volume. |
| name? | string | The name of the volume. |
host?
Type:
IResolvable | Host
(optional)
Details on a container instance bind mount host volume.
name?
Type:
string
(optional)
The name of the volume.
Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.
When using a volume configured at launch, the name is required and must also be specified as the volume name in the ServiceVolumeConfiguration or TaskVolumeConfiguration parameter when creating your service or standalone task.
For all other types of volumes, this name is referenced in the sourceVolume parameter of the mountPoints object in the container definition.
When a volume is using the efsVolumeConfiguration, the name is required.

.NET
Go
Java
Python
TypeScript