Interface ServiceManagedVolumeProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ServiceManagedVolumeProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-01-25T00:20:55.096Z")
@Stability(Stable)
public interface ServiceManagedVolumeProps
extends software.amazon.jsii.JsiiSerializable
Represents the Volume configuration for an ECS service.
Example:
Cluster cluster; FargateTaskDefinition taskDefinition = new FargateTaskDefinition(this, "TaskDef"); ContainerDefinition container = taskDefinition.addContainer("web", ContainerDefinitionOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .portMappings(List.of(PortMapping.builder() .containerPort(80) .protocol(Protocol.TCP) .build())) .build()); ServiceManagedVolume volume = ServiceManagedVolume.Builder.create(this, "EBSVolume") .name("ebs1") .managedEBSVolume(ServiceManagedEBSVolumeConfiguration.builder() .size(Size.gibibytes(15)) .volumeType(EbsDeviceVolumeType.GP3) .fileSystemType(FileSystemType.XFS) .tagSpecifications(List.of(EBSTagSpecification.builder() .tags(Map.of( "purpose", "production")) .propagateTags(EbsPropagatedTagSource.SERVICE) .build())) .build()) .build(); volume.mountIn(container, ContainerMountPoint.builder() .containerPath("/var/lib") .readOnly(false) .build()); taskDefinition.addVolume(volume); FargateService service = FargateService.Builder.create(this, "FargateService") .cluster(cluster) .taskDefinition(taskDefinition) .minHealthyPercent(100) .build(); service.addVolume(volume);
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forServiceManagedVolumeProps
static final class
An implementation forServiceManagedVolumeProps
-
Method Summary
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
The name of the volume.This corresponds to the name provided in the ECS TaskDefinition.
-
getManagedEBSVolume
Configuration for an Amazon Elastic Block Store (EBS) volume managed by ECS.Default: - undefined
-
builder
- Returns:
- a
ServiceManagedVolumeProps.Builder
ofServiceManagedVolumeProps
-