enum FileSystemType
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ECS.FileSystemType |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsecs#FileSystemType |
Java | software.amazon.awscdk.services.ecs.FileSystemType |
Python | aws_cdk.aws_ecs.FileSystemType |
TypeScript (source) | aws-cdk-lib » aws_ecs » FileSystemType |
FileSystemType for Service Managed EBS Volume Configuration.
Example
declare const cluster: ecs.Cluster;
const taskDefinition = new ecs.FargateTaskDefinition(this, 'TaskDef');
const container = taskDefinition.addContainer('web', {
image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
portMappings: [{
containerPort: 80,
protocol: ecs.Protocol.TCP,
}],
});
const volume = new ecs.ServiceManagedVolume(this, 'EBSVolume', {
name: 'ebs1',
managedEBSVolume: {
size: Size.gibibytes(15),
volumeType: ec2.EbsDeviceVolumeType.GP3,
fileSystemType: ecs.FileSystemType.XFS,
tagSpecifications: [{
tags: {
purpose: 'production',
},
propagateTags: ecs.EbsPropagatedTagSource.SERVICE,
}],
},
});
volume.mountIn(container, {
containerPath: '/var/lib',
readOnly: false,
});
taskDefinition.addVolume(volume);
const service = new ecs.FargateService(this, 'FargateService', {
cluster,
taskDefinition,
});
service.addVolume(volume);
Members
Name | Description |
---|---|
EXT3 | ext3 type. |
EXT4 | ext4 type. |
XFS | xfs type. |
EXT3
ext3 type.
EXT4
ext4 type.
XFS
xfs type.