Light, fluffy, and always free - The AWS Local Emulator alternative
feat(efs): add Elastic File System (file systems, mount targets, access points) (#2371)
NAMAN JAIN943b4c1b456c
diff --git a/compatibility-tests/sdk-test-java/pom.xml b/compatibility-tests/sdk-test-java/pom.xmlindex c1423503c6..ba62dd2efb 100644--- a/compatibility-tests/sdk-test-java/pom.xml+++ b/compatibility-tests/sdk-test-java/pom.xml@@ -462,6 +462,11 @@<version>1.1.10.8</version><scope>test</scope></dependency>+ <!-- EFS client -->+ <dependency>+ <groupId>software.amazon.awssdk</groupId>+ <artifactId>efs</artifactId>+ </dependency></dependencies><build>diff --git a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.javaindex 1c5505333d..68389f7289 100644--- a/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java+++ b/compatibility-tests/sdk-test-java/src/main/java/com/floci/test/TestFixtures.java@@ -58,6 +58,7 @@ import software.amazon.awssdk.services.apigatewayv2.ApiGatewayV2Client;import software.amazon.awssdk.services.elasticache.ElastiCacheClient;import software.amazon.awssdk.services.elasticbeanstalk.ElasticBeanstalkClient;import software.amazon.awssdk.services.acm.AcmClient;+import software.amazon.awssdk.services.efs.EfsClient;import software.amazon.awssdk.services.ec2.Ec2Client;import software.amazon.awssdk.services.ecr.EcrClient;import software.amazon.awssdk.services.bedrockagentcore.BedrockAgentCoreClient;@@ -985,4 +986,12 @@ public final class TestFixtures {.credentialsProvider(CREDENTIALS).build();}++ public static EfsClient efsClient() {+ return EfsClient.builder()+ .endpointOverride(ENDPOINT)+ .region(REGION)+ .credentialsProvider(CREDENTIALS)+ .build();+ }}diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/EfsTest.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/EfsTest.javanew file mode 100644index 0000000000..a87df2432f--- /dev/null+++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/EfsTest.java@@ -0,0 +1,84 @@+package com.floci.test;++import org.junit.jupiter.api.*;+import software.amazon.awssdk.services.efs.EfsClient;+import software.amazon.awssdk.services.efs.model.*;++import static org.assertj.core.api.Assertions.*;++@DisplayName("EFS Elastic File System")+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)+class EfsTest {++ private static EfsClient efs;++ @BeforeAll+ static void setup() {+ efs = TestFixtures.efsClient();+ }++ @AfterAll+ static void cleanup() {+ if (efs != null) {+ efs.close();+ }+ }++ @Test+ @Order(1)+ void createWithElasticThroughputMode() {+ String token = TestFixtures.uniqueName("efs-");+ CreateFileSystemResponse response = efs.createFileSystem(r -> r+ .creationToken(token)+ .throughputMode(ThroughputMode.ELASTIC)+ );++ assertThat(response.throughputMode()).isEqualTo(ThroughputMode.ELASTIC);+ assertThat(response.fileSystemId()).startsWith("fs-");+ }++ @Test+ @Order(2)+ void duplicateCreationTokenThrowsFileSystemAlreadyExists() {+ String token = TestFixtures.uniqueName("efs-dup-");++ CreateFileSystemResponse response1 = efs.createFileSystem(r -> r.creationToken(token));+ String fsId = response1.fileSystemId();++ FileSystemAlreadyExistsException ex = catchThrowableOfType(+ () -> efs.createFileSystem(r -> r.creationToken(token).throughputMode(ThroughputMode.PROVISIONED)),+ FileSystemAlreadyExistsException.class+ );++ assertThat(ex).isNotNull();+ assertThat(ex.fileSystemId()).isEqualTo(fsId);+ }++ @Test+ @Order(3)+ void duplicateClientTokenThrowsAccessPointAlreadyExists() {+ String fsToken = TestFixtures.uniqueName("efs-ap-");+ CreateFileSystemResponse fsResponse = efs.createFileSystem(r -> r.creationToken(fsToken));+ String fsId = fsResponse.fileSystemId();++ String clientToken = TestFixtures.uniqueName("ap-dup-");++ CreateAccessPointResponse apResponse1 = efs.createAccessPoint(r -> r+ .fileSystemId(fsId)+ .clientToken(clientToken)+ );+ String apId = apResponse1.accessPointId();++ AccessPointAlreadyExistsException ex = catchThrowableOfType(+ () -> efs.createAccessPoint(r -> r+ .fileSystemId(fsId)+ .clientToken(clientToken)+ .tags(software.amazon.awssdk.services.efs.model.Tag.builder().key("foo").value("bar").build())+ ),+ AccessPointAlreadyExistsException.class+ );++ assertThat(ex).isNotNull();+ assertThat(ex.accessPointId()).isEqualTo(apId);+ }+}diff --git a/docs/configuration/advanced/application-yml.md b/docs/configuration/advanced/application-yml.mdindex 0834e20350..a3d94387c4 100644--- a/docs/configuration/advanced/application-yml.md+++ b/docs/configuration/advanced/application-yml.md@@ -233,6 +233,9 @@ floci:ec2:enabled: true+ efs:+ enabled: true+ecs:enabled: truemock: false # true = tasks go to RUNNING without Docker (useful for CI)diff --git a/docs/services/efs.md b/docs/services/efs.mdnew file mode 100644index 0000000000..6c7f03c276--- /dev/null+++ b/docs/services/efs.md@@ -0,0 +1,43 @@+# Elastic File System (EFS)++**Protocol:** REST JSON+**Endpoint:** `http://localhost:4566/2015-02-01/...`++The EFS emulator provides a metadata control plane for file systems, mount targets, access points, and policies across the `2015-02-01` API.++## Supported Operations++<!-- floci:actions:start -->+| Action | Description |+| --- | --- |+| `CreateFileSystem` | - |+| `DescribeFileSystems` | - |+| `UpdateFileSystem` | - |+| `DeleteFileSystem` | - |+| `CreateTags` | - |+| `DescribeTags` | - |+| `DeleteTags` | - |+| `TagResource` | - |+| `UntagResource` | - |+| `ListTagsForResource` | - |+| `CreateMountTarget` | - |+| `DescribeMountTargets` | - |+| `DeleteMountTarget` | - |+| `DescribeMountTargetSecurityGroups` | - |+| `ModifyMountTargetSecurityGroups` | - |+| `CreateAccessPoint` | - |+| `DescribeAccessPoints` | - |+| `DeleteAccessPoint` | - |+| `PutFileSystemPolicy` | - |+| `DescribeFileSystemPolicy` | - |+| `DeleteFileSystemPolicy` | - |+| `PutBackupPolicy` | - |+| `DescribeBackupPolicy` | - |+| `PutLifecycleConfiguration` | - |+| `DescribeLifecycleConfiguration` | - |+<!-- floci:actions:end -->++## Limitations+- **Metadata Only**: Floci provides an EFS API simulation (the control plane) so you can provision file systems for your ECS tasks and Lambda functions. It does not provide an actual NFSv4.1 data plane endpoint. Reading or writing files via standard file-system mounts will fail.+- **Lifecycle Evaluation**: Lifecycle policies are saved but no background worker evaluates them to move data across storage classes. Transition fields will remain static.+- **Backup**: Backup policies are recorded, but Floci does not currently interface with the AWS Backup emulator to generate real snapshot resources.diff --git a/docs/services/index.md b/docs/services/index.mdindex 6e19f86f7e..168c30c34d 100644--- a/docs/services/index.md+++ b/docs/services/index.md@@ -58,6 +58,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac| [EMR Serverless](emr-serverless.md) | `/applications/*` | REST JSON | 7 || [Data Firehose](firehose.md) | `POST /` + `X-Amz-Target: Firehose_20150804.*` | JSON 1.1 | 6 || [ECS](ecs.md) | `POST /` + `X-Amz-Target: AmazonEC2ContainerServiceV20141113.*` | JSON 1.1 | 58 |+| [EFS](efs.md) | `/2015-02-01/...` | REST JSON | 17 || [EC2](ec2.md) | `POST /` with `Action=` param | EC2 Query | 78 || [Lightsail](lightsail.md) | `POST /` + `X-Amz-Target: Lightsail_20161128.*` | JSON 1.1 | 79 local responses; 161 recognized actions || [ACM](acm.md) | `POST /` + `X-Amz-Target: CertificateManager.*` | JSON 1.1 | 12 |diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.javaindex 813b118328..eb75dc2ac0 100644--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java@@ -285,6 +285,7 @@ public interface EmulatorConfig {RumStorageConfig rum();GuardDutyStorageConfig guardduty();EmrServerlessStorageConfig emrserverless();+ EfsStorageConfig efs();}interface SsmStorageConfig {@@ -528,6 +529,13 @@ public interface EmulatorConfig {long flushIntervalMs();}+ interface EfsStorageConfig {+ Optional<String> mode();++ @WithDefault("5000")+ long flushIntervalMs();+ }+interface CodeDeployStorageConfig {Optional<String> mode();@@ -638,6 +646,7 @@ public interface EmulatorConfig {RumServiceConfig rum();GuardDutyServiceConfig guardduty();EmrServerlessServiceConfig emrserverless();+ EfsServiceConfig efs();}interface IotServiceConfig {@@ -681,6 +690,11 @@ public interface EmulatorConfig {boolean enabled();}+ interface EfsServiceConfig {+ @WithDefault("true")+ boolean enabled();+ }+interface LightsailServiceConfig {@WithDefault("true")boolean enabled();diff --git a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.javaindex 65162ed85b..a39063d457 100644--- a/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java+++ b/src/main/java/io/github/hectorvent/floci/core/common/ResolvedServiceCatalog.java@@ -33,6 +33,7 @@ import io.github.hectorvent.floci.services.guardduty.GuardDutyController;import io.github.hectorvent.floci.services.rum.RumController;import io.github.hectorvent.floci.services.s3vectors.S3VectorsController;import io.github.hectorvent.floci.services.s3tables.S3TablesController;+import io.github.hectorvent.floci.services.efs.EfsController;import jakarta.enterprise.context.ApplicationScoped;import jakarta.inject.Inject;@@ -490,7 +491,13 @@ public class ResolvedServiceCatalog {storageMode(config.storage().services().guardduty().mode(), config.storage().mode()),config.storage().services().guardduty().flushIntervalMs(), null, ServiceProtocol.REST_JSON,protocols(ServiceProtocol.REST_JSON),- Set.of(), Set.of("guardduty"), Set.of(), Set.of(GuardDutyController.class))+ Set.of(), Set.of("guardduty"), Set.of(), Set.of(GuardDutyController.class)),+ descriptor("efs", "efs", config.services().efs().enabled(), true,+ "efs",+ storageMode(config.storage().services().efs().mode(), config.storage().mode()),+ config.storage().services().efs().flushIntervalMs(), null, ServiceProtocol.REST_JSON,+ protocols(ServiceProtocol.REST_JSON),+ Set.of(), Set.of("elasticfilesystem"), Set.of(), Set.of(EfsController.class))));}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/EfsController.java b/src/main/java/io/github/hectorvent/floci/services/efs/EfsController.javanew file mode 100644index 0000000000..b6a32f138f--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/EfsController.java@@ -0,0 +1,282 @@+package io.github.hectorvent.floci.services.efs;++import io.github.hectorvent.floci.core.common.RegionResolver;+import io.github.hectorvent.floci.services.efs.model.*;+import jakarta.inject.Inject;+import jakarta.ws.rs.Consumes;+import jakarta.ws.rs.DELETE;+import jakarta.ws.rs.GET;+import jakarta.ws.rs.POST;+import jakarta.ws.rs.PUT;+import jakarta.ws.rs.Path;+import jakarta.ws.rs.PathParam;+import jakarta.ws.rs.Produces;+import jakarta.ws.rs.core.Context;+import jakarta.ws.rs.core.HttpHeaders;+import jakarta.ws.rs.core.MediaType;+import jakarta.ws.rs.core.Response;++@Path("/2015-02-01")+@Produces(MediaType.APPLICATION_JSON)+@Consumes(MediaType.APPLICATION_JSON)+public class EfsController {++ private final EfsService efsService;+ private final RegionResolver regionResolver;++ @Inject+ public EfsController(EfsService efsService, RegionResolver regionResolver) {+ this.efsService = efsService;+ this.regionResolver = regionResolver;+ }++ // --- File Systems ---++ @POST+ @Path("/file-systems")+ public Response createFileSystem(@Context HttpHeaders headers, CreateFileSystemRequest request) {+ String region = regionResolver.resolveRegion(headers);+ FileSystem fs = efsService.createFileSystem(request, region);+ return Response.status(201).entity(fs).build();+ }++ @GET+ @Path("/file-systems")+ public Response describeFileSystems(@Context HttpHeaders headers, @jakarta.ws.rs.BeanParam DescribeFileSystemsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ DescribeFileSystemsResponse response = efsService.describeFileSystems(region, request);+ return Response.ok(response).build();+ }++ @PUT+ @Path("/file-systems/{FileSystemId}")+ public Response updateFileSystem(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, UpdateFileSystemRequest request) {+ String region = regionResolver.resolveRegion(headers);+ FileSystem fs = efsService.updateFileSystem(region, fileSystemId, request);+ return Response.status(202).entity(fs).build();+ }++ @DELETE+ @Path("/file-systems/{FileSystemId}")+ public Response deleteFileSystem(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId) {+ String region = regionResolver.resolveRegion(headers);+ efsService.deleteFileSystem(region, fileSystemId);+ return Response.noContent().build();+ }++ // --- Tags ---++ @POST+ @Path("/create-tags/{FileSystemId}")+ public Response createTags(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, CreateTagsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.createTags(region, fileSystemId, request);+ return Response.noContent().build();+ }++ @GET+ @Path("/tags/{FileSystemId}")+ public Response describeTags(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, @jakarta.ws.rs.BeanParam DescribeTagsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ FileSystem fs = efsService.getFileSystem(region, fileSystemId);++ java.util.List<Tag> tags = fs.getTags() != null ? fs.getTags() : new java.util.ArrayList<>();+ int maxItems = request.getMaxItems() != null ? request.getMaxItems() : 100;+ int startIndex = 0;+ if (request.getMarker() != null && !request.getMarker().isEmpty()) {+ for (int i = 0; i < tags.size(); i++) {+ if (tags.get(i).getKey().equals(request.getMarker())) {+ startIndex = i + 1;+ break;+ }+ }+ }++ java.util.List<Tag> paginated = new java.util.ArrayList<>();+ String nextMarker = null;+ for (int i = startIndex; i < tags.size(); i++) {+ if (paginated.size() >= maxItems) {+ nextMarker = tags.get(i - 1).getKey();+ break;+ }+ paginated.add(tags.get(i));+ }++ DescribeTagsResponse res = new DescribeTagsResponse();+ res.setTags(paginated);+ res.setMarker(request.getMarker());+ res.setNextMarker(nextMarker);+ return Response.ok(res).build();+ }++ @POST+ @Path("/delete-tags/{FileSystemId}")+ public Response deleteTags(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, DeleteTagsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.deleteTags(region, fileSystemId, request);+ return Response.noContent().build();+ }++ @POST+ @Path("/resource-tags/{ResourceId}")+ public Response tagResource(@Context HttpHeaders headers, @PathParam("ResourceId") String resourceId, TagResourceRequest request) {+ String region = regionResolver.resolveRegion(headers);+ request.setResourceId(resourceId);+ efsService.tagResource(region, request);+ return Response.ok().build();+ }++ @DELETE+ @Path("/resource-tags/{ResourceId}")+ public Response untagResource(@Context HttpHeaders headers, @PathParam("ResourceId") String resourceId, @jakarta.ws.rs.BeanParam UntagResourceRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.untagResource(region, resourceId, request.getTagKeys());+ return Response.ok().build();+ }++ @GET+ @Path("/resource-tags/{ResourceId}")+ public Response listTagsForResource(@Context HttpHeaders headers, @PathParam("ResourceId") String resourceId) {+ String region = regionResolver.resolveRegion(headers);+ return Response.ok(efsService.listTagsForResource(region, resourceId)).build();+ }++ // --- Mount Targets ---++ @POST+ @Path("/mount-targets")+ public Response createMountTarget(@Context HttpHeaders headers, CreateMountTargetRequest request) {+ String region = regionResolver.resolveRegion(headers);+ MountTarget mt = efsService.createMountTarget(request, region);+ return Response.status(200).entity(mt).build();+ }++ @GET+ @Path("/mount-targets")+ public Response describeMountTargets(@Context HttpHeaders headers, @jakarta.ws.rs.BeanParam DescribeMountTargetsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ DescribeMountTargetsResponse response = efsService.describeMountTargets(region, request);+ return Response.ok(response).build();+ }++ @DELETE+ @Path("/mount-targets/{MountTargetId}")+ public Response deleteMountTarget(@Context HttpHeaders headers, @PathParam("MountTargetId") String mountTargetId) {+ String region = regionResolver.resolveRegion(headers);+ efsService.deleteMountTarget(region, mountTargetId);+ return Response.noContent().build();+ }++ @GET+ @Path("/mount-targets/{MountTargetId}/security-groups")+ public Response describeMountTargetSecurityGroups(@Context HttpHeaders headers, @PathParam("MountTargetId") String mountTargetId) {+ String region = regionResolver.resolveRegion(headers);+ return Response.ok(efsService.describeMountTargetSecurityGroups(region, mountTargetId)).build();+ }++ @PUT+ @Path("/mount-targets/{MountTargetId}/security-groups")+ public Response modifyMountTargetSecurityGroups(@Context HttpHeaders headers, @PathParam("MountTargetId") String mountTargetId, ModifyMountTargetSecurityGroupsRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.modifyMountTargetSecurityGroups(region, mountTargetId, request);+ return Response.noContent().build();+ }++ // --- Access Points ---++ @POST+ @Path("/access-points")+ public Response createAccessPoint(@Context HttpHeaders headers, CreateAccessPointRequest request) {+ String region = regionResolver.resolveRegion(headers);+ AccessPointDescription ap = efsService.createAccessPoint(region, request);+ return Response.status(200).entity(ap).build();+ }++ @GET+ @Path("/access-points")+ public Response describeAccessPoints(@Context HttpHeaders headers, @jakarta.ws.rs.QueryParam("FileSystemId") String fileSystemId, @jakarta.ws.rs.QueryParam("AccessPointId") String accessPointId) {+ String region = regionResolver.resolveRegion(headers);+ DescribeAccessPointsResponse res = new DescribeAccessPointsResponse();+ res.setAccessPoints(efsService.describeAccessPoints(region, fileSystemId, accessPointId));+ return Response.ok(res).build();+ }++ @DELETE+ @Path("/access-points/{AccessPointId}")+ public Response deleteAccessPoint(@Context HttpHeaders headers, @PathParam("AccessPointId") String accessPointId) {+ String region = regionResolver.resolveRegion(headers);+ efsService.deleteAccessPoint(region, accessPointId);+ return Response.noContent().build();+ }++ // --- Policies ---++ @PUT+ @Path("/file-systems/{FileSystemId}/policy")+ public Response putFileSystemPolicy(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, PutFileSystemPolicyRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.putFileSystemPolicy(region, fileSystemId, request.getPolicy());+ PutFileSystemPolicyResponse res = new PutFileSystemPolicyResponse();+ res.setFileSystemId(fileSystemId);+ res.setPolicy(request.getPolicy());+ return Response.ok(res).build();+ }++ @GET+ @Path("/file-systems/{FileSystemId}/policy")+ public Response describeFileSystemPolicy(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId) {+ String region = regionResolver.resolveRegion(headers);+ String policy = efsService.getFileSystemPolicy(region, fileSystemId);+ DescribeFileSystemPolicyResponse res = new DescribeFileSystemPolicyResponse();+ res.setFileSystemId(fileSystemId);+ res.setPolicy(policy);+ return Response.ok(res).build();+ }++ @DELETE+ @Path("/file-systems/{FileSystemId}/policy")+ public Response deleteFileSystemPolicy(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId) {+ String region = regionResolver.resolveRegion(headers);+ efsService.deleteFileSystemPolicy(region, fileSystemId);+ return Response.ok().build();+ }++ @PUT+ @Path("/file-systems/{FileSystemId}/backup-policy")+ public Response putBackupPolicy(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, PutBackupPolicyRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.putBackupPolicy(region, fileSystemId, request.getBackupPolicy());+ PutBackupPolicyResponse res = new PutBackupPolicyResponse();+ res.setBackupPolicy(request.getBackupPolicy());+ return Response.ok(res).build();+ }++ @GET+ @Path("/file-systems/{FileSystemId}/backup-policy")+ public Response describeBackupPolicy(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId) {+ String region = regionResolver.resolveRegion(headers);+ BackupPolicy policy = efsService.getBackupPolicy(region, fileSystemId);+ PutBackupPolicyResponse res = new PutBackupPolicyResponse();+ res.setBackupPolicy(policy);+ return Response.ok(res).build();+ }++ @PUT+ @Path("/file-systems/{FileSystemId}/lifecycle-configuration")+ public Response putLifecycleConfiguration(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId, PutLifecycleConfigurationRequest request) {+ String region = regionResolver.resolveRegion(headers);+ efsService.putLifecycleConfiguration(region, fileSystemId, request.getLifecyclePolicies());+ PutLifecycleConfigurationResponse res = new PutLifecycleConfigurationResponse();+ res.setLifecyclePolicies(request.getLifecyclePolicies());+ return Response.ok(res).build();+ }++ @GET+ @Path("/file-systems/{FileSystemId}/lifecycle-configuration")+ public Response describeLifecycleConfiguration(@Context HttpHeaders headers, @PathParam("FileSystemId") String fileSystemId) {+ String region = regionResolver.resolveRegion(headers);+ PutLifecycleConfigurationResponse res = new PutLifecycleConfigurationResponse();+ res.setLifecyclePolicies(efsService.getLifecycleConfiguration(region, fileSystemId));+ return Response.ok(res).build();+ }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/EfsException.java b/src/main/java/io/github/hectorvent/floci/services/efs/EfsException.javanew file mode 100644index 0000000000..d849107c84--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/EfsException.java@@ -0,0 +1,51 @@+package io.github.hectorvent.floci.services.efs;++import io.github.hectorvent.floci.core.common.AwsException;+import jakarta.ws.rs.core.Response.Status;++public class EfsException extends AwsException {++ public EfsException(Status status, String errorCode, String message) {+ super(errorCode, message, status.getStatusCode());+ }++ public EfsException(Status status, String errorCode, String message, java.util.Map<String, Object> extendedData) {+ super(errorCode, message, status.getStatusCode(), extendedData);+ }++ public static EfsException fileSystemAlreadyExists(String token, String fileSystemId) {+ return new EfsException(Status.CONFLICT, "FileSystemAlreadyExists", "File system with creation token " + token + " already exists.", java.util.Map.of("FileSystemId", fileSystemId));+ }++ public static EfsException fileSystemNotFound(String fileSystemId) {+ return new EfsException(Status.NOT_FOUND, "FileSystemNotFound", "File system " + fileSystemId + " does not exist.");+ }++ public static EfsException fileSystemInUse(String fileSystemId) {+ return new EfsException(Status.CONFLICT, "FileSystemInUse", "File system " + fileSystemId + " is in use.");+ }++ public static EfsException mountTargetNotFound(String mountTargetId) {+ return new EfsException(Status.NOT_FOUND, "MountTargetNotFound", "Mount target " + mountTargetId + " does not exist.");+ }++ public static EfsException mountTargetConflict(String message) {+ return new EfsException(Status.CONFLICT, "MountTargetConflict", message);+ }++ public static EfsException accessPointAlreadyExists(String token, String accessPointId) {+ return new EfsException(Status.CONFLICT, "AccessPointAlreadyExists", "Access point with client token " + token + " already exists.", java.util.Map.of("AccessPointId", accessPointId));+ }++ public static EfsException accessPointNotFound(String accessPointId) {+ return new EfsException(Status.NOT_FOUND, "AccessPointNotFound", "Access point " + accessPointId + " does not exist.");+ }++ public static EfsException policyNotFound(String fileSystemId) {+ return new EfsException(Status.NOT_FOUND, "PolicyNotFound", "Policy for file system " + fileSystemId + " does not exist.");+ }++ public static EfsException badRequest(String message) {+ return new EfsException(Status.BAD_REQUEST, "BadRequest", message);+ }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/EfsService.java b/src/main/java/io/github/hectorvent/floci/services/efs/EfsService.javanew file mode 100644index 0000000000..2aadda1578--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/EfsService.java@@ -0,0 +1,597 @@+package io.github.hectorvent.floci.services.efs;++import io.github.hectorvent.floci.core.storage.StorageBackend;+import io.github.hectorvent.floci.core.storage.StorageFactory;+import io.github.hectorvent.floci.core.common.Resettable;+import io.github.hectorvent.floci.services.efs.model.*;+import jakarta.enterprise.context.ApplicationScoped;+import jakarta.inject.Inject;+import io.github.hectorvent.floci.core.common.RegionResolver;++import java.time.Instant;+import java.util.ArrayList;+import java.util.Comparator;+import java.util.Date;+import java.util.List;+import java.util.UUID;+import java.util.stream.Collectors;+import java.util.concurrent.ConcurrentHashMap;++import org.jboss.logging.Logger;++@ApplicationScoped+public class EfsService implements Resettable {++ private static final Logger LOG = Logger.getLogger(EfsService.class);++ private final StorageBackend<String, FileSystem> fileSystemStore;+ private final StorageBackend<String, MountTarget> mountTargetStore;+ private final StorageBackend<String, AccessPointDescription> accessPointStore;+ private final StorageBackend<String, String> fileSystemPolicyStore;+ private final StorageBackend<String, BackupPolicy> backupPolicyStore;+ private final StorageBackend<String, List<LifecyclePolicy>> lifecycleConfigurationStore;+ private final ConcurrentHashMap<String, Object> syncLocks = new ConcurrentHashMap<>();+ private final RegionResolver regionResolver;++ private Object lockFor(String key) {+ return syncLocks.computeIfAbsent(key, k -> new Object());+ }++ @Inject+ public EfsService(StorageFactory storageFactory, RegionResolver regionResolver) {+ this.regionResolver = regionResolver;+ this.fileSystemStore = storageFactory.create("efs", "efs-filesystems.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, FileSystem>>() {});+ this.mountTargetStore = storageFactory.create("efs", "efs-mounttargets.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, MountTarget>>() {});+ this.accessPointStore = storageFactory.create("efs", "efs-accesspoints.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, AccessPointDescription>>() {});+ this.fileSystemPolicyStore = storageFactory.create("efs", "efs-policies.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, String>>() {});+ this.backupPolicyStore = storageFactory.create("efs", "efs-backuppolicies.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, BackupPolicy>>() {});+ this.lifecycleConfigurationStore = storageFactory.create("efs", "efs-lifecycle.json",+ new com.fasterxml.jackson.core.type.TypeReference<java.util.Map<String, List<LifecyclePolicy>>>() {});+ }++ @Override+ public void clear() {+ fileSystemStore.clear();+ mountTargetStore.clear();+ accessPointStore.clear();+ fileSystemPolicyStore.clear();+ backupPolicyStore.clear();+ lifecycleConfigurationStore.clear();+ syncLocks.clear();+ }++ // --- File Systems ---++ public FileSystem createFileSystem(CreateFileSystemRequest request, String region) {+ String token = request.getCreationToken() != null ? request.getCreationToken() : UUID.randomUUID().toString();++ synchronized (lockFor(region + "::create::" + token)) {+ for (FileSystem existing : fileSystemStore.scan(k -> k.startsWith(region + "::"))) {+ if (token.equals(existing.getCreationToken())) {+ throw EfsException.fileSystemAlreadyExists(existing.getCreationToken(), existing.getFileSystemId());+ }+ }++ String fsId = "fs-" + UUID.randomUUID().toString().replace("-", "").substring(0, 17);+ String regionKey = regionKey(region, fsId);++ FileSystem fs = new FileSystem();+ fs.setFileSystemId(fsId);+ fs.setCreationToken(token);+ fs.setCreationTime(Instant.now().getEpochSecond());+ fs.setLifeCycleState(LifeCycleState.available.name());+ fs.setFileSystemArn(regionResolver.buildArn("elasticfilesystem", region, "file-system/" + fsId));+ fs.setOwnerId(regionResolver.getAccountId());+ fs.setNumberOfMountTargets(0);+ fs.setPerformanceMode(request.getPerformanceMode() != null ? request.getPerformanceMode().name() : "generalPurpose");+ fs.setThroughputMode(request.getThroughputMode() != null ? request.getThroughputMode().name() : "bursting");+ if ("PROVISIONED".equalsIgnoreCase(fs.getThroughputMode()) && request.getProvisionedThroughputInMibps() != null) {+ fs.setProvisionedThroughputInMibps(request.getProvisionedThroughputInMibps());+ }+ fs.setEncrypted(request.getEncrypted() != null ? request.getEncrypted() : false);+ fs.setKmsKeyId(request.getKmsKeyId());+ if (request.getAvailabilityZoneName() != null) {+ fs.setAvailabilityZoneName(request.getAvailabilityZoneName());+ fs.setAvailabilityZoneId(generateAzId(request.getAvailabilityZoneName()));+ }++ if (request.getTags() != null) {+ fs.setTags(new ArrayList<>(request.getTags()));+ } else {+ fs.setTags(new ArrayList<>());+ }++ FileSystemSize size = new FileSystemSize();+ size.setValue(0L);+ size.setValueInIA(0L);+ size.setValueInStandard(0L);+ fs.setSizeInBytes(size);++ fileSystemStore.put(regionKey, fs);++ BackupPolicy bp = new BackupPolicy();+ bp.setStatus(request.getBackup() != null && !request.getBackup() ? "DISABLED" : "ENABLED");+ backupPolicyStore.put(regionKey, bp);++ return fs;+ }+ }++ public DescribeFileSystemsResponse describeFileSystems(String region, DescribeFileSystemsRequest request) {+ List<FileSystem> results = fileSystemStore.scan(k -> k.startsWith(region + "::")).stream()+ .filter(fs -> request.getFileSystemId() == null+ || request.getFileSystemId().equals(fs.getFileSystemId()))+ .filter(fs -> request.getCreationToken() == null+ || request.getCreationToken().equals(fs.getCreationToken()))+ .map(fs -> {+ if (fs.getTags() != null) {+ fs.getTags().stream().filter(t -> "Name".equals(t.getKey())).findFirst().ifPresent(tag -> {+ fs.setName(tag.getValue());+ });+ }+ return fs;+ })+ .sorted(Comparator.comparing(FileSystem::getFileSystemId))+ .collect(Collectors.toList());++ if (results.isEmpty()) {+ if (request.getFileSystemId() != null) {+ throw EfsException.fileSystemNotFound(request.getFileSystemId());+ }+ if (request.getCreationToken() != null) {+ throw EfsException.fileSystemNotFound(request.getCreationToken());+ }+ }++ int maxItems = request.getMaxItems() != null ? request.getMaxItems() : 100;+ int startIndex = 0;+ if (request.getMarker() != null && !request.getMarker().isEmpty()) {+ for (int i = 0; i < results.size(); i++) {+ if (results.get(i).getFileSystemId().equals(request.getMarker())) {+ startIndex = i + 1;+ break;+ }+ }+ }++ List<FileSystem> paginated = new ArrayList<>();+ String nextMarker = null;+ for (int i = startIndex; i < results.size(); i++) {+ if (paginated.size() >= maxItems) {+ nextMarker = results.get(i - 1).getFileSystemId();+ break;+ }+ paginated.add(results.get(i));+ }++ DescribeFileSystemsResponse response = new DescribeFileSystemsResponse();+ response.setFileSystems(paginated);+ response.setMarker(request.getMarker());+ response.setNextMarker(nextMarker);+ return response;+ }++ public FileSystem getFileSystem(String region, String fileSystemId) {+ FileSystem fs = fileSystemStore.get(regionKey(region, fileSystemId)).orElse(null);+ if (fs == null) {+ throw EfsException.fileSystemNotFound(fileSystemId);+ }+ return fs;+ }++ public FileSystem updateFileSystem(String region, String fileSystemId, UpdateFileSystemRequest request) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ FileSystem fs = getFileSystem(region, fileSystemId);+ if (request.getThroughputMode() != null) {+ String mode = request.getThroughputMode().name();+ fs.setThroughputMode(mode);+ if (!"PROVISIONED".equalsIgnoreCase(mode)) {+ fs.setProvisionedThroughputInMibps(null);+ }+ }+ if (request.getProvisionedThroughputInMibps() != null) {+ if (!"PROVISIONED".equalsIgnoreCase(fs.getThroughputMode())) {+ throw EfsException.badRequest("ProvisionedThroughputInMibps is only valid with PROVISIONED throughput mode.");+ }+ fs.setProvisionedThroughputInMibps(request.getProvisionedThroughputInMibps());+ }+ fileSystemStore.put(regionKey(region, fileSystemId), fs);+ return fs;+ }+ }++ public void deleteFileSystem(String region, String fileSystemId) {+ String key = regionKey(region, fileSystemId);+ synchronized (lockFor(key)) {+ if (fileSystemStore.get(key).isEmpty()) {+ throw EfsException.fileSystemNotFound(fileSystemId);+ }++ DescribeMountTargetsRequest descReq = new DescribeMountTargetsRequest();+ descReq.setFileSystemId(fileSystemId);+ List<MountTarget> mountTargets = describeMountTargets(region, descReq).getMountTargets();+ if (!mountTargets.isEmpty()) {+ throw EfsException.fileSystemInUse(fileSystemId);+ }++ // Clean up access points+ List<AccessPointDescription> accessPoints = describeAccessPoints(region, fileSystemId, null);+ for (AccessPointDescription ap : accessPoints) {+ accessPointStore.delete(regionKey(region, ap.getAccessPointId()));+ }++ // Clean up policies+ fileSystemPolicyStore.delete(key);+ backupPolicyStore.delete(key);+ lifecycleConfigurationStore.delete(key);++ fileSystemStore.delete(key);+ }+ }++ // --- Tags ---++ public void createTags(String region, String fileSystemId, CreateTagsRequest request) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ FileSystem fs = getFileSystem(region, fileSystemId);+ List<Tag> existing = fs.getTags();+ if (request.getTags() != null) {+ for (Tag newTag : request.getTags()) {+ existing.removeIf(t -> t.getKey().equals(newTag.getKey()));+ existing.add(newTag);+ }+ }+ fileSystemStore.put(regionKey(region, fileSystemId), fs);+ }+ }++ public void deleteTags(String region, String fileSystemId, DeleteTagsRequest request) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ FileSystem fs = getFileSystem(region, fileSystemId);+ if (request.getTagKeys() != null) {+ fs.getTags().removeIf(t -> request.getTagKeys().contains(t.getKey()));+ }+ fileSystemStore.put(regionKey(region, fileSystemId), fs);+ }+ }++ public void tagResource(String region, TagResourceRequest request) {+ synchronized (lockFor(regionKey(region, request.getResourceId()))) {+ List<Tag> existing = getResourceTags(region, request.getResourceId());+ if (request.getTags() != null) {+ for (Tag newTag : request.getTags()) {+ existing.removeIf(t -> t.getKey().equals(newTag.getKey()));+ existing.add(newTag);+ }+ }+ saveResourceTags(region, request.getResourceId(), existing);+ }+ }++ public void untagResource(String region, String resourceId, List<String> tagKeys) {+ synchronized (lockFor(regionKey(region, resourceId))) {+ List<Tag> existing = getResourceTags(region, resourceId);+ if (tagKeys != null) {+ existing.removeIf(t -> tagKeys.contains(t.getKey()));+ }+ saveResourceTags(region, resourceId, existing);+ }+ }++ public ListTagsForResourceResponse listTagsForResource(String region, String resourceId) {+ List<Tag> tags = getResourceTags(region, resourceId);+ ListTagsForResourceResponse res = new ListTagsForResourceResponse();+ res.setTags(tags);+ return res;+ }++ private List<Tag> getResourceTags(String region, String resourceId) {+ if (resourceId.startsWith("fs-")) {+ return getFileSystem(region, resourceId).getTags();+ } else if (resourceId.startsWith("fsap-")) {+ AccessPointDescription ap = accessPointStore.get(regionKey(region, resourceId)).orElse(null);+ if (ap == null) throw EfsException.accessPointNotFound(resourceId);+ if (ap.getTags() == null) ap.setTags(new ArrayList<>());+ return ap.getTags();+ } else if (resourceId.startsWith("fsmt-")) {+ MountTarget mt = mountTargetStore.get(regionKey(region, resourceId)).orElse(null);+ if (mt == null) throw EfsException.mountTargetNotFound(resourceId);+ // Mount targets don't natively have tags in the emulator currently, so we'll just ignore for now or return empty.+ return new ArrayList<>();+ }+ throw EfsException.badRequest("Invalid resource ID: " + resourceId);+ }++ private void saveResourceTags(String region, String resourceId, List<Tag> tags) {+ if (resourceId.startsWith("fs-")) {+ FileSystem fs = getFileSystem(region, resourceId);+ fs.setTags(tags);+ fileSystemStore.put(regionKey(region, resourceId), fs);+ } else if (resourceId.startsWith("fsap-")) {+ AccessPointDescription ap = accessPointStore.get(regionKey(region, resourceId)).orElse(null);+ if (ap != null) {+ ap.setTags(tags);+ accessPointStore.put(regionKey(region, resourceId), ap);+ }+ }+ }++ // --- Mount Targets ---++ public MountTarget createMountTarget(CreateMountTargetRequest request, String region) {+ synchronized (lockFor(regionKey(region, request.getFileSystemId()))) {+ FileSystem fs = getFileSystem(region, request.getFileSystemId());++ for (MountTarget existing : mountTargetStore.scan(k -> k.startsWith(region + "::"))) {+ if (existing.getFileSystemId().equals(request.getFileSystemId())) {+ if (existing.getSubnetId().equals(request.getSubnetId())) {+ throw EfsException.mountTargetConflict("Mount target already exists in this subnet");+ }+ }+ }++ String mtId = "fsmt-" + UUID.randomUUID().toString().replace("-", "").substring(0, 17);++ MountTarget mt = new MountTarget();+ mt.setMountTargetId(mtId);+ mt.setFileSystemId(request.getFileSystemId());+ mt.setSubnetId(request.getSubnetId());+ mt.setIpAddress(request.getIpAddress() != null ? request.getIpAddress() : "10.0.0.10");+ mt.setLifeCycleState(LifeCycleState.available);+ mt.setVpcId("vpc-12345678");+ mt.setAvailabilityZoneName(region + "a");+ mt.setAvailabilityZoneId(generateAzId(region + "a"));+ mt.setNetworkInterfaceId("eni-" + UUID.randomUUID().toString().replace("-", "").substring(0, 17));+ if (request.getSecurityGroups() != null) {+ mt.setSecurityGroups(new ArrayList<>(request.getSecurityGroups()));+ } else {+ mt.setSecurityGroups(new ArrayList<>());+ }++ fs.setNumberOfMountTargets(fs.getNumberOfMountTargets() + 1);+ fileSystemStore.put(regionKey(region, fs.getFileSystemId()), fs);++ mountTargetStore.put(regionKey(region, mtId), mt);+ return mt;+ }+ }++ public DescribeMountTargetsResponse describeMountTargets(String region, DescribeMountTargetsRequest request) {+ if (request.getFileSystemId() == null && request.getMountTargetId() == null && request.getAccessPointId() == null) {+ throw EfsException.badRequest("One of FileSystemId, MountTargetId, or AccessPointId must be specified.");+ }++ List<MountTarget> results = mountTargetStore.scan(k -> k.startsWith(region + "::")).stream()+ .filter(mt -> request.getFileSystemId() == null || mt.getFileSystemId().equals(request.getFileSystemId()))+ .filter(mt -> request.getMountTargetId() == null || mt.getMountTargetId().equals(request.getMountTargetId()))+ .sorted(Comparator.comparing(MountTarget::getMountTargetId))+ .collect(Collectors.toList());++ // If accessPointId is specified, we would need to filter by access point file system ID,+ // but EFS AccessPoints resolve to a FileSystemId first.+ if (request.getAccessPointId() != null) {+ AccessPointDescription ap = accessPointStore.get(regionKey(region, request.getAccessPointId())).orElse(null);+ if (ap != null) {+ results = results.stream().filter(mt -> mt.getFileSystemId().equals(ap.getFileSystemId())).collect(Collectors.toList());+ } else {+ results = new ArrayList<>();+ }+ }++ int maxItems = request.getMaxItems() != null ? request.getMaxItems() : 1000;+ int startIndex = 0;+ if (request.getMarker() != null && !request.getMarker().isEmpty()) {+ for (int i = 0; i < results.size(); i++) {+ if (results.get(i).getMountTargetId().equals(request.getMarker())) {+ startIndex = i + 1;+ break;+ }+ }+ }++ List<MountTarget> paginated = new ArrayList<>();+ String nextMarker = null;+ for (int i = startIndex; i < results.size(); i++) {+ if (paginated.size() >= maxItems) {+ nextMarker = results.get(i - 1).getMountTargetId();+ break;+ }+ paginated.add(results.get(i));+ }++ DescribeMountTargetsResponse response = new DescribeMountTargetsResponse();+ response.setMountTargets(paginated);+ response.setMarker(request.getMarker());+ response.setNextMarker(nextMarker);+ return response;+ }++ public void deleteMountTarget(String region, String mountTargetId) {+ String key = regionKey(region, mountTargetId);+ synchronized (lockFor(key)) {+ MountTarget mt = mountTargetStore.get(key).orElse(null);+ if (mt == null) {+ throw EfsException.mountTargetNotFound(mountTargetId);+ }++ try {+ synchronized (lockFor(regionKey(region, mt.getFileSystemId()))) {+ FileSystem fs = getFileSystem(region, mt.getFileSystemId());+ fs.setNumberOfMountTargets(Math.max(0, fs.getNumberOfMountTargets() - 1));+ fileSystemStore.put(regionKey(region, fs.getFileSystemId()), fs);+ mountTargetStore.delete(key);+ }+ } catch (EfsException e) {+ LOG.debug("File system " + mt.getFileSystemId() + " already deleted, skipping parent count update during mount target deletion");+ mountTargetStore.delete(key);+ }+ }+ }++ public DescribeMountTargetSecurityGroupsResponse describeMountTargetSecurityGroups(String region, String mountTargetId) {+ MountTarget mt = mountTargetStore.get(regionKey(region, mountTargetId)).orElse(null);+ if (mt == null) {+ throw EfsException.mountTargetNotFound(mountTargetId);+ }+ DescribeMountTargetSecurityGroupsResponse res = new DescribeMountTargetSecurityGroupsResponse();+ res.setSecurityGroups(mt.getSecurityGroups());+ return res;+ }++ public void modifyMountTargetSecurityGroups(String region, String mountTargetId, ModifyMountTargetSecurityGroupsRequest request) {+ synchronized (lockFor(regionKey(region, mountTargetId))) {+ MountTarget mt = mountTargetStore.get(regionKey(region, mountTargetId)).orElse(null);+ if (mt == null) {+ throw EfsException.mountTargetNotFound(mountTargetId);+ }+ if (request.getSecurityGroups() != null) {+ mt.setSecurityGroups(new ArrayList<>(request.getSecurityGroups()));+ }+ mountTargetStore.put(regionKey(region, mountTargetId), mt);+ }+ }++ // --- Access Points ---++ public AccessPointDescription createAccessPoint(String region, CreateAccessPointRequest request) {+ String token = request.getClientToken() != null ? request.getClientToken() : UUID.randomUUID().toString();+ synchronized (lockFor(regionKey(region, "ap-token::" + token))) {+ synchronized (lockFor(regionKey(region, request.getFileSystemId()))) {+ // Validate file system exists+ getFileSystem(region, request.getFileSystemId());++ for (AccessPointDescription existing : accessPointStore.scan(k -> k.startsWith(region + "::"))) {+ if (token.equals(existing.getClientToken())) {+ throw EfsException.accessPointAlreadyExists(existing.getClientToken(), existing.getAccessPointId());+ }+ }++ String apId = "fsap-" + UUID.randomUUID().toString().replace("-", "").substring(0, 17);++ AccessPointDescription ap = new AccessPointDescription();+ ap.setAccessPointId(apId);+ ap.setAccessPointArn(regionResolver.buildArn("elasticfilesystem", region, "access-point/" + apId));+ ap.setClientToken(token);+ ap.setFileSystemId(request.getFileSystemId());+ ap.setPosixUser(request.getPosixUser());+ ap.setRootDirectory(request.getRootDirectory());+ if (request.getTags() != null) {+ ap.setTags(new ArrayList<>(request.getTags()));+ ap.getTags().stream().filter(t -> "Name".equals(t.getKey())).findFirst().ifPresent(tag -> {+ ap.setName(tag.getValue());+ });+ }+ ap.setLifeCycleState(LifeCycleState.available);+ ap.setOwnerId(regionResolver.getAccountId());++ accessPointStore.put(regionKey(region, apId), ap);+ return ap;+ }+ }+ }++ public List<AccessPointDescription> describeAccessPoints(String region, String fileSystemId, String accessPointId) {+ return accessPointStore.scan(k -> k.startsWith(region + "::")).stream()+ .filter(ap -> fileSystemId == null || ap.getFileSystemId().equals(fileSystemId))+ .filter(ap -> accessPointId == null || ap.getAccessPointId().equals(accessPointId))+ .map(ap -> {+ if (ap.getTags() != null) {+ ap.getTags().stream().filter(t -> "Name".equals(t.getKey())).findFirst().ifPresent(tag -> {+ ap.setName(tag.getValue());+ });+ }+ return ap;+ })+ .collect(Collectors.toList());+ }++ public void deleteAccessPoint(String region, String accessPointId) {+ String key = regionKey(region, accessPointId);+ AccessPointDescription ap = accessPointStore.get(key).orElse(null);+ if (ap == null) {+ throw EfsException.accessPointNotFound(accessPointId);+ }+ accessPointStore.delete(key);+ }++ // --- Policies ---++ public void putFileSystemPolicy(String region, String fileSystemId, String policy) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ getFileSystem(region, fileSystemId); // check exists+ fileSystemPolicyStore.put(regionKey(region, fileSystemId), policy);+ }+ }++ public String getFileSystemPolicy(String region, String fileSystemId) {+ getFileSystem(region, fileSystemId);+ String policy = fileSystemPolicyStore.get(regionKey(region, fileSystemId)).orElse(null);+ if (policy == null) {+ throw EfsException.policyNotFound(fileSystemId);+ }+ return policy;+ }++ public void deleteFileSystemPolicy(String region, String fileSystemId) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ getFileSystem(region, fileSystemId);+ fileSystemPolicyStore.delete(regionKey(region, fileSystemId));+ }+ }++ public void putBackupPolicy(String region, String fileSystemId, BackupPolicy policy) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ getFileSystem(region, fileSystemId);+ backupPolicyStore.put(regionKey(region, fileSystemId), policy);+ }+ }++ public BackupPolicy getBackupPolicy(String region, String fileSystemId) {+ getFileSystem(region, fileSystemId);+ BackupPolicy policy = backupPolicyStore.get(regionKey(region, fileSystemId)).orElse(null);+ if (policy == null) {+ policy = new BackupPolicy();+ policy.setStatus("DISABLED");+ }+ return policy;+ }++ public void putLifecycleConfiguration(String region, String fileSystemId, List<LifecyclePolicy> policies) {+ synchronized (lockFor(regionKey(region, fileSystemId))) {+ getFileSystem(region, fileSystemId);+ lifecycleConfigurationStore.put(regionKey(region, fileSystemId), new ArrayList<>(policies));+ }+ }++ public List<LifecyclePolicy> getLifecycleConfiguration(String region, String fileSystemId) {+ getFileSystem(region, fileSystemId);+ List<LifecyclePolicy> policies = lifecycleConfigurationStore.get(regionKey(region, fileSystemId)).orElse(null);+ return policies == null ? new ArrayList<>() : policies;+ }++ private String regionKey(String region, String id) {+ return region + "::" + id;+ }++ private String generateAzId(String azName) {+ if (azName == null || azName.length() < 2) return azName + "-id";+ String region = azName.substring(0, azName.length() - 1);+ char letter = azName.charAt(azName.length() - 1);+ int num = (letter >= 'a' && letter <= 'z') ? (letter - 'a' + 1) : 1;++ String shortCode = region;+ String[] parts = region.split("-");+ if (parts.length == 3) {+ String mid = parts[1].replace("north", "n").replace("south", "s")+ .replace("east", "e").replace("west", "w")+ .replace("central", "c");+ shortCode = parts[0] + mid + parts[2];+ }+ return shortCode + "-az" + num;+ }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/AccessPointDescription.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/AccessPointDescription.javanew file mode 100644index 0000000000..e1b3121e61--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/AccessPointDescription.java@@ -0,0 +1,104 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class AccessPointDescription {++ private String accessPointArn;+ private String accessPointId;+ private String clientToken;+ private String fileSystemId;+ private LifeCycleState lifeCycleState;+ private String name;+ private String ownerId;+ private PosixUser posixUser;+ private RootDirectory rootDirectory;+ private List<Tag> tags;++ public String getAccessPointArn() {+ return accessPointArn;+ }++ public void setAccessPointArn(String accessPointArn) {+ this.accessPointArn = accessPointArn;+ }++ public String getAccessPointId() {+ return accessPointId;+ }++ public void setAccessPointId(String accessPointId) {+ this.accessPointId = accessPointId;+ }++ public String getClientToken() {+ return clientToken;+ }++ public void setClientToken(String clientToken) {+ this.clientToken = clientToken;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public LifeCycleState getLifeCycleState() {+ return lifeCycleState;+ }++ public void setLifeCycleState(LifeCycleState lifeCycleState) {+ this.lifeCycleState = lifeCycleState;+ }++ public String getName() {+ return name;+ }++ public void setName(String name) {+ this.name = name;+ }++ public String getOwnerId() {+ return ownerId;+ }++ public void setOwnerId(String ownerId) {+ this.ownerId = ownerId;+ }++ public PosixUser getPosixUser() {+ return posixUser;+ }++ public void setPosixUser(PosixUser posixUser) {+ this.posixUser = posixUser;+ }++ public RootDirectory getRootDirectory() {+ return rootDirectory;+ }++ public void setRootDirectory(RootDirectory rootDirectory) {+ this.rootDirectory = rootDirectory;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/BackupPolicy.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/BackupPolicy.javanew file mode 100644index 0000000000..8a2a3dedd1--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/BackupPolicy.java@@ -0,0 +1,14 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class BackupPolicy {+ private String status;+ public String getStatus() { return status; }+ public void setStatus(String status) { this.status = status; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateAccessPointRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateAccessPointRequest.javanew file mode 100644index 0000000000..7abb9e883c--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateAccessPointRequest.java@@ -0,0 +1,59 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class CreateAccessPointRequest {++ private String clientToken;+ private String fileSystemId;+ private PosixUser posixUser;+ private RootDirectory rootDirectory;+ private List<Tag> tags;++ public String getClientToken() {+ return clientToken;+ }++ public void setClientToken(String clientToken) {+ this.clientToken = clientToken;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public PosixUser getPosixUser() {+ return posixUser;+ }++ public void setPosixUser(PosixUser posixUser) {+ this.posixUser = posixUser;+ }++ public RootDirectory getRootDirectory() {+ return rootDirectory;+ }++ public void setRootDirectory(RootDirectory rootDirectory) {+ this.rootDirectory = rootDirectory;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateFileSystemRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateFileSystemRequest.javanew file mode 100644index 0000000000..6d8f0fa331--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateFileSystemRequest.java@@ -0,0 +1,94 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;+import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class CreateFileSystemRequest {++ private String availabilityZoneName;+ private Boolean backup;+ private String creationToken;+ private Boolean encrypted;+ private String kmsKeyId;+ private PerformanceMode performanceMode;+ private Double provisionedThroughputInMibps;+ private List<Tag> tags;+ private ThroughputMode throughputMode;++ public String getAvailabilityZoneName() {+ return availabilityZoneName;+ }++ public void setAvailabilityZoneName(String availabilityZoneName) {+ this.availabilityZoneName = availabilityZoneName;+ }++ public Boolean getBackup() {+ return backup;+ }++ public void setBackup(Boolean backup) {+ this.backup = backup;+ }++ public String getCreationToken() {+ return creationToken;+ }++ public void setCreationToken(String creationToken) {+ this.creationToken = creationToken;+ }++ public Boolean getEncrypted() {+ return encrypted;+ }++ public void setEncrypted(Boolean encrypted) {+ this.encrypted = encrypted;+ }++ public String getKmsKeyId() {+ return kmsKeyId;+ }++ public void setKmsKeyId(String kmsKeyId) {+ this.kmsKeyId = kmsKeyId;+ }++ public PerformanceMode getPerformanceMode() {+ return performanceMode;+ }++ public void setPerformanceMode(PerformanceMode performanceMode) {+ this.performanceMode = performanceMode;+ }++ public Double getProvisionedThroughputInMibps() {+ return provisionedThroughputInMibps;+ }++ public void setProvisionedThroughputInMibps(Double provisionedThroughputInMibps) {+ this.provisionedThroughputInMibps = provisionedThroughputInMibps;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }++ public ThroughputMode getThroughputMode() {+ return throughputMode;+ }++ public void setThroughputMode(ThroughputMode throughputMode) {+ this.throughputMode = throughputMode;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateMountTargetRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateMountTargetRequest.javanew file mode 100644index 0000000000..88ee8b8038--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateMountTargetRequest.java@@ -0,0 +1,68 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class CreateMountTargetRequest {++ private String fileSystemId;+ private String ipAddress;+ private IpAddressType ipAddressType;+ private String ipv6Address;+ private List<String> securityGroups;+ private String subnetId;++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public String getIpAddress() {+ return ipAddress;+ }++ public void setIpAddress(String ipAddress) {+ this.ipAddress = ipAddress;+ }++ public IpAddressType getIpAddressType() {+ return ipAddressType;+ }++ public void setIpAddressType(IpAddressType ipAddressType) {+ this.ipAddressType = ipAddressType;+ }++ public String getIpv6Address() {+ return ipv6Address;+ }++ public void setIpv6Address(String ipv6Address) {+ this.ipv6Address = ipv6Address;+ }++ public List<String> getSecurityGroups() {+ return securityGroups;+ }++ public void setSecurityGroups(List<String> securityGroups) {+ this.securityGroups = securityGroups;+ }++ public String getSubnetId() {+ return subnetId;+ }++ public void setSubnetId(String subnetId) {+ this.subnetId = subnetId;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateTagsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateTagsRequest.javanew file mode 100644index 0000000000..bcec5f7567--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreateTagsRequest.java@@ -0,0 +1,32 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class CreateTagsRequest {++ private String fileSystemId;+ private List<Tag> tags;++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/CreationInfo.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreationInfo.javanew file mode 100644index 0000000000..2d47a75122--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/CreationInfo.java@@ -0,0 +1,39 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class CreationInfo {++ private Long ownerGid;+ private Long ownerUid;+ private String permissions;++ public Long getOwnerGid() {+ return ownerGid;+ }++ public void setOwnerGid(Long ownerGid) {+ this.ownerGid = ownerGid;+ }++ public Long getOwnerUid() {+ return ownerUid;+ }++ public void setOwnerUid(Long ownerUid) {+ this.ownerUid = ownerUid;+ }++ public String getPermissions() {+ return permissions;+ }++ public void setPermissions(String permissions) {+ this.permissions = permissions;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DeleteTagsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DeleteTagsRequest.javanew file mode 100644index 0000000000..e9d0445824--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DeleteTagsRequest.java@@ -0,0 +1,32 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DeleteTagsRequest {++ private String fileSystemId;+ private List<String> tagKeys;++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public List<String> getTagKeys() {+ return tagKeys;+ }++ public void setTagKeys(List<String> tagKeys) {+ this.tagKeys = tagKeys;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeAccessPointsResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeAccessPointsResponse.javanew file mode 100644index 0000000000..b9bc05ab30--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeAccessPointsResponse.java@@ -0,0 +1,18 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;+import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeAccessPointsResponse {+ private List<AccessPointDescription> accessPoints;+ private String nextToken;+ public List<AccessPointDescription> getAccessPoints() { return accessPoints; }+ public void setAccessPoints(List<AccessPointDescription> accessPoints) { this.accessPoints = accessPoints; }+ public String getNextToken() { return nextToken; }+ public void setNextToken(String nextToken) { this.nextToken = nextToken; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemPolicyResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemPolicyResponse.javanew file mode 100644index 0000000000..1eb9f1aa7d--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemPolicyResponse.java@@ -0,0 +1,17 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeFileSystemPolicyResponse {+ private String fileSystemId;+ private String policy;+ public String getFileSystemId() { return fileSystemId; }+ public void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; }+ public String getPolicy() { return policy; }+ public void setPolicy(String policy) { this.policy = policy; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsRequest.javanew file mode 100644index 0000000000..678b4e67e1--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsRequest.java@@ -0,0 +1,57 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++import jakarta.ws.rs.QueryParam;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeFileSystemsRequest {++ @QueryParam("CreationToken")+ private String creationToken;++ @QueryParam("FileSystemId")+ private String fileSystemId;++ @QueryParam("Marker")+ private String marker;++ @QueryParam("MaxItems")+ private Integer maxItems;++ public String getCreationToken() {+ return creationToken;+ }++ public void setCreationToken(String creationToken) {+ this.creationToken = creationToken;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public Integer getMaxItems() {+ return maxItems;+ }++ public void setMaxItems(Integer maxItems) {+ this.maxItems = maxItems;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsResponse.javanew file mode 100644index 0000000000..e02d023bd0--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeFileSystemsResponse.java@@ -0,0 +1,40 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;+import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeFileSystemsResponse {++ private List<FileSystem> fileSystems;+ private String marker;+ private String nextMarker;++ public List<FileSystem> getFileSystems() {+ return fileSystems;+ }++ public void setFileSystems(List<FileSystem> fileSystems) {+ this.fileSystems = fileSystems;+ }++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public String getNextMarker() {+ return nextMarker;+ }++ public void setNextMarker(String nextMarker) {+ this.nextMarker = nextMarker;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsRequest.javanew file mode 100644index 0000000000..338d4a5ab5--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsRequest.java@@ -0,0 +1,21 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeMountTargetSecurityGroupsRequest {++ private String mountTargetId;++ public String getMountTargetId() {+ return mountTargetId;+ }++ public void setMountTargetId(String mountTargetId) {+ this.mountTargetId = mountTargetId;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsResponse.javanew file mode 100644index 0000000000..05536ea051--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetSecurityGroupsResponse.java@@ -0,0 +1,23 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeMountTargetSecurityGroupsResponse {++ private List<String> securityGroups;++ public List<String> getSecurityGroups() {+ return securityGroups;+ }++ public void setSecurityGroups(List<String> securityGroups) {+ this.securityGroups = securityGroups;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsRequest.javanew file mode 100644index 0000000000..e5a6883917--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsRequest.java@@ -0,0 +1,68 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++import jakarta.ws.rs.QueryParam;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeMountTargetsRequest {++ @QueryParam("AccessPointId")+ private String accessPointId;++ @QueryParam("FileSystemId")+ private String fileSystemId;++ @QueryParam("Marker")+ private String marker;++ @QueryParam("MaxItems")+ private Integer maxItems;++ @QueryParam("MountTargetId")+ private String mountTargetId;++ public String getAccessPointId() {+ return accessPointId;+ }++ public void setAccessPointId(String accessPointId) {+ this.accessPointId = accessPointId;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public Integer getMaxItems() {+ return maxItems;+ }++ public void setMaxItems(Integer maxItems) {+ this.maxItems = maxItems;+ }++ public String getMountTargetId() {+ return mountTargetId;+ }++ public void setMountTargetId(String mountTargetId) {+ this.mountTargetId = mountTargetId;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsResponse.javanew file mode 100644index 0000000000..44bfe5d0f5--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeMountTargetsResponse.java@@ -0,0 +1,41 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeMountTargetsResponse {++ private String marker;+ private List<MountTarget> mountTargets;+ private String nextMarker;++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public List<MountTarget> getMountTargets() {+ return mountTargets;+ }++ public void setMountTargets(List<MountTarget> mountTargets) {+ this.mountTargets = mountTargets;+ }++ public String getNextMarker() {+ return nextMarker;+ }++ public void setNextMarker(String nextMarker) {+ this.nextMarker = nextMarker;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsRequest.javanew file mode 100644index 0000000000..caff7332f7--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsRequest.java@@ -0,0 +1,41 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeTagsRequest {++ private String fileSystemId;+ @jakarta.ws.rs.QueryParam("Marker")+ private String marker;+ @jakarta.ws.rs.QueryParam("MaxItems")+ private Integer maxItems;++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public Integer getMaxItems() {+ return maxItems;+ }++ public void setMaxItems(Integer maxItems) {+ this.maxItems = maxItems;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsResponse.javanew file mode 100644index 0000000000..77be13d901--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/DescribeTagsResponse.java@@ -0,0 +1,41 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class DescribeTagsResponse {++ private String marker;+ private String nextMarker;+ private List<Tag> tags;++ public String getMarker() {+ return marker;+ }++ public void setMarker(String marker) {+ this.marker = marker;+ }++ public String getNextMarker() {+ return nextMarker;+ }++ public void setNextMarker(String nextMarker) {+ this.nextMarker = nextMarker;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystem.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystem.javanew file mode 100644index 0000000000..0c49fec5c9--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystem.java@@ -0,0 +1,178 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class FileSystem {++ private String availabilityZoneId;+ private String availabilityZoneName;+ private Long creationTime;+ private String creationToken;+ private Boolean encrypted;+ private String fileSystemArn;+ private String fileSystemId;+ private FileSystemProtectionDescription fileSystemProtection;+ private String kmsKeyId;+ private String lifeCycleState;+ private String name;+ private Integer numberOfMountTargets;+ private String ownerId;+ private String performanceMode;+ private Double provisionedThroughputInMibps;+ private FileSystemSize sizeInBytes;+ private List<Tag> tags;+ private String throughputMode;++++ public String getAvailabilityZoneId() {+ return availabilityZoneId;+ }++ public void setAvailabilityZoneId(String availabilityZoneId) {+ this.availabilityZoneId = availabilityZoneId;+ }++ public String getAvailabilityZoneName() {+ return availabilityZoneName;+ }++ public void setAvailabilityZoneName(String availabilityZoneName) {+ this.availabilityZoneName = availabilityZoneName;+ }++ public Long getCreationTime() {+ return creationTime;+ }++ public void setCreationTime(Long creationTime) {+ this.creationTime = creationTime;+ }++ public String getCreationToken() {+ return creationToken;+ }++ public void setCreationToken(String creationToken) {+ this.creationToken = creationToken;+ }++ public Boolean getEncrypted() {+ return encrypted;+ }++ public void setEncrypted(Boolean encrypted) {+ this.encrypted = encrypted;+ }++ public String getFileSystemArn() {+ return fileSystemArn;+ }++ public void setFileSystemArn(String fileSystemArn) {+ this.fileSystemArn = fileSystemArn;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public FileSystemProtectionDescription getFileSystemProtectionDescription() {+ return fileSystemProtection;+ }++ public void setFileSystemProtectionDescription(FileSystemProtectionDescription fileSystemProtection) {+ this.fileSystemProtection = fileSystemProtection;+ }++ public String getKmsKeyId() {+ return kmsKeyId;+ }++ public void setKmsKeyId(String kmsKeyId) {+ this.kmsKeyId = kmsKeyId;+ }++ public String getLifeCycleState() {+ return lifeCycleState;+ }++ public void setLifeCycleState(String lifeCycleState) {+ this.lifeCycleState = lifeCycleState;+ }++ public String getName() {+ return name;+ }++ public void setName(String name) {+ this.name = name;+ }++ public Integer getNumberOfMountTargets() {+ return numberOfMountTargets;+ }++ public void setNumberOfMountTargets(Integer numberOfMountTargets) {+ this.numberOfMountTargets = numberOfMountTargets;+ }++ public String getOwnerId() {+ return ownerId;+ }++ public void setOwnerId(String ownerId) {+ this.ownerId = ownerId;+ }++ public String getPerformanceMode() {+ return performanceMode;+ }++ public void setPerformanceMode(String performanceMode) {+ this.performanceMode = performanceMode;+ }++ public Double getProvisionedThroughputInMibps() {+ return provisionedThroughputInMibps;+ }++ public void setProvisionedThroughputInMibps(Double provisionedThroughputInMibps) {+ this.provisionedThroughputInMibps = provisionedThroughputInMibps;+ }++ public FileSystemSize getSizeInBytes() {+ return sizeInBytes;+ }++ public void setSizeInBytes(FileSystemSize sizeInBytes) {+ this.sizeInBytes = sizeInBytes;+ }++ public List<Tag> getTags() {+ return tags;+ }++ public void setTags(List<Tag> tags) {+ this.tags = tags;+ }++ public String getThroughputMode() {+ return throughputMode;+ }++ public void setThroughputMode(String throughputMode) {+ this.throughputMode = throughputMode;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemProtectionDescription.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemProtectionDescription.javanew file mode 100644index 0000000000..82d9f6dc0b--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemProtectionDescription.java@@ -0,0 +1,22 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class FileSystemProtectionDescription {++ private ReplicationOverwriteProtection replicationOverwriteProtection;++ public ReplicationOverwriteProtection getReplicationOverwriteProtection() {+ return replicationOverwriteProtection;+ }++ public void setReplicationOverwriteProtection(+ ReplicationOverwriteProtection replicationOverwriteProtection) {+ this.replicationOverwriteProtection = replicationOverwriteProtection;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemSize.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemSize.javanew file mode 100644index 0000000000..d3f8da7236--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/FileSystemSize.java@@ -0,0 +1,57 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class FileSystemSize {++ private Long timestamp;+ private Long value;+ private Long valueInArchive;+ private Long valueInIA;+ private Long valueInStandard;++ public Long getTimestamp() {+ return timestamp;+ }++ public void setTimestamp(Long timestamp) {+ this.timestamp = timestamp;+ }++ public Long getValue() {+ return value;+ }++ public void setValue(Long value) {+ this.value = value;+ }++ public Long getValueInArchive() {+ return valueInArchive;+ }++ public void setValueInArchive(Long valueInArchive) {+ this.valueInArchive = valueInArchive;+ }++ public Long getValueInIA() {+ return valueInIA;+ }++ public void setValueInIA(Long valueInIA) {+ this.valueInIA = valueInIA;+ }++ public Long getValueInStandard() {+ return valueInStandard;+ }++ public void setValueInStandard(Long valueInStandard) {+ this.valueInStandard = valueInStandard;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/IpAddressType.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/IpAddressType.javanew file mode 100644index 0000000000..538b89e0ad--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/IpAddressType.java@@ -0,0 +1,10 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;+@RegisterForReflection+public enum IpAddressType {++ IPV4_ONLY,+ IPV6_ONLY,+ DUAL_STACK+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/LifeCycleState.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/LifeCycleState.javanew file mode 100644index 0000000000..8f956c6fe1--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/LifeCycleState.java@@ -0,0 +1,13 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflection+public enum LifeCycleState {+ creating,+ available,+ updating,+ deleting,+ deleted,+ error+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/LifecyclePolicy.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/LifecyclePolicy.javanew file mode 100644index 0000000000..bfc3dde347--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/LifecyclePolicy.java@@ -0,0 +1,20 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class LifecyclePolicy {+ private String transitionToIA;+ private String transitionToPrimaryStorageClass;+ private String transitionToArchive;+ public String getTransitionToIA() { return transitionToIA; }+ public void setTransitionToIA(String transitionToIA) { this.transitionToIA = transitionToIA; }+ public String getTransitionToPrimaryStorageClass() { return transitionToPrimaryStorageClass; }+ public void setTransitionToPrimaryStorageClass(String transitionToPrimaryStorageClass) { this.transitionToPrimaryStorageClass = transitionToPrimaryStorageClass; }+ public String getTransitionToArchive() { return transitionToArchive; }+ public void setTransitionToArchive(String transitionToArchive) { this.transitionToArchive = transitionToArchive; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/ListTagsForResourceResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/ListTagsForResourceResponse.javanew file mode 100644index 0000000000..dfc5c6639c--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/ListTagsForResourceResponse.java@@ -0,0 +1,19 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;+import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;+import java.util.List;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class ListTagsForResourceResponse {+ private List<Tag> tags;+ private String nextToken;++ public List<Tag> getTags() { return tags; }+ public void setTags(List<Tag> tags) { this.tags = tags; }++ public String getNextToken() { return nextToken; }+ public void setNextToken(String nextToken) { this.nextToken = nextToken; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/ModifyMountTargetSecurityGroupsRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/ModifyMountTargetSecurityGroupsRequest.javanew file mode 100644index 0000000000..37045de775--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/ModifyMountTargetSecurityGroupsRequest.java@@ -0,0 +1,32 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class ModifyMountTargetSecurityGroupsRequest {++ private String mountTargetId;+ private List<String> securityGroups;++ public String getMountTargetId() {+ return mountTargetId;+ }++ public void setMountTargetId(String mountTargetId) {+ this.mountTargetId = mountTargetId;+ }++ public List<String> getSecurityGroups() {+ return securityGroups;+ }++ public void setSecurityGroups(List<String> securityGroups) {+ this.securityGroups = securityGroups;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/MountTarget.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/MountTarget.javanew file mode 100644index 0000000000..22763248b5--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/MountTarget.java@@ -0,0 +1,131 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class MountTarget {++ private String availabilityZoneId;+ private String availabilityZoneName;+ private String fileSystemId;+ private String ipAddress;+ private IpAddressType ipAddressType;+ private String ipv6Address;+ private LifeCycleState lifeCycleState;+ private String mountTargetId;+ private String networkInterfaceId;+ private String ownerId;+ private List<String> securityGroups;+ private String subnetId;+ private String vpcId;++ public String getAvailabilityZoneId() {+ return availabilityZoneId;+ }++ public void setAvailabilityZoneId(String availabilityZoneId) {+ this.availabilityZoneId = availabilityZoneId;+ }++ public String getAvailabilityZoneName() {+ return availabilityZoneName;+ }++ public void setAvailabilityZoneName(String availabilityZoneName) {+ this.availabilityZoneName = availabilityZoneName;+ }++ public String getFileSystemId() {+ return fileSystemId;+ }++ public void setFileSystemId(String fileSystemId) {+ this.fileSystemId = fileSystemId;+ }++ public String getIpAddress() {+ return ipAddress;+ }++ public void setIpAddress(String ipAddress) {+ this.ipAddress = ipAddress;+ }++ public IpAddressType getIpAddressType() {+ return ipAddressType;+ }++ public void setIpAddressType(IpAddressType ipAddressType) {+ this.ipAddressType = ipAddressType;+ }++ public String getIpv6Address() {+ return ipv6Address;+ }++ public void setIpv6Address(String ipv6Address) {+ this.ipv6Address = ipv6Address;+ }++ public LifeCycleState getLifeCycleState() {+ return lifeCycleState;+ }++ public void setLifeCycleState(LifeCycleState lifeCycleState) {+ this.lifeCycleState = lifeCycleState;+ }++ public String getMountTargetId() {+ return mountTargetId;+ }++ public void setMountTargetId(String mountTargetId) {+ this.mountTargetId = mountTargetId;+ }++ public String getNetworkInterfaceId() {+ return networkInterfaceId;+ }++ public void setNetworkInterfaceId(String networkInterfaceId) {+ this.networkInterfaceId = networkInterfaceId;+ }++ public String getOwnerId() {+ return ownerId;+ }++ public void setOwnerId(String ownerId) {+ this.ownerId = ownerId;+ }++ public List<String> getSecurityGroups() {+ return securityGroups;+ }++ public void setSecurityGroups(List<String> securityGroups) {+ this.securityGroups = securityGroups;+ }++ public String getSubnetId() {+ return subnetId;+ }++ public void setSubnetId(String subnetId) {+ this.subnetId = subnetId;+ }++ public String getVpcId() {+ return vpcId;+ }++ public void setVpcId(String vpcId) {+ this.vpcId = vpcId;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PerformanceMode.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PerformanceMode.javanew file mode 100644index 0000000000..6726a9b0c9--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PerformanceMode.java@@ -0,0 +1,9 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflection+public enum PerformanceMode {+ generalPurpose,+ maxIO+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PosixUser.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PosixUser.javanew file mode 100644index 0000000000..182988a4af--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PosixUser.java@@ -0,0 +1,41 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PosixUser {++ private Long gid;+ private List<Long> secondaryGids;+ private Long uid;++ public Long getGid() {+ return gid;+ }++ public void setGid(Long gid) {+ this.gid = gid;+ }++ public List<Long> getSecondaryGids() {+ return secondaryGids;+ }++ public void setSecondaryGids(List<Long> secondaryGids) {+ this.secondaryGids = secondaryGids;+ }++ public Long getUid() {+ return uid;+ }++ public void setUid(Long uid) {+ this.uid = uid;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyRequest.javanew file mode 100644index 0000000000..fe7f36c832--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyRequest.java@@ -0,0 +1,17 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutBackupPolicyRequest {+ private String fileSystemId;+ private BackupPolicy backupPolicy;+ public String getFileSystemId() { return fileSystemId; }+ public void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; }+ public BackupPolicy getBackupPolicy() { return backupPolicy; }+ public void setBackupPolicy(BackupPolicy backupPolicy) { this.backupPolicy = backupPolicy; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyResponse.javanew file mode 100644index 0000000000..8b171a143f--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutBackupPolicyResponse.java@@ -0,0 +1,14 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutBackupPolicyResponse {+ private BackupPolicy backupPolicy;+ public BackupPolicy getBackupPolicy() { return backupPolicy; }+ public void setBackupPolicy(BackupPolicy backupPolicy) { this.backupPolicy = backupPolicy; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyRequest.javanew file mode 100644index 0000000000..1bd2d4f63a--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyRequest.java@@ -0,0 +1,20 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutFileSystemPolicyRequest {+ private String fileSystemId;+ private String policy;+ private Boolean bypassPolicyLockoutSafetyCheck;+ public String getFileSystemId() { return fileSystemId; }+ public void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; }+ public String getPolicy() { return policy; }+ public void setPolicy(String policy) { this.policy = policy; }+ public Boolean getBypassPolicyLockoutSafetyCheck() { return bypassPolicyLockoutSafetyCheck; }+ public void setBypassPolicyLockoutSafetyCheck(Boolean bypassPolicyLockoutSafetyCheck) { this.bypassPolicyLockoutSafetyCheck = bypassPolicyLockoutSafetyCheck; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyResponse.javanew file mode 100644index 0000000000..7627061adf--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutFileSystemPolicyResponse.java@@ -0,0 +1,17 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutFileSystemPolicyResponse {+ private String fileSystemId;+ private String policy;+ public String getFileSystemId() { return fileSystemId; }+ public void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; }+ public String getPolicy() { return policy; }+ public void setPolicy(String policy) { this.policy = policy; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationRequest.javanew file mode 100644index 0000000000..9ec1ef3b6d--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationRequest.java@@ -0,0 +1,18 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;+import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutLifecycleConfigurationRequest {+ private String fileSystemId;+ private List<LifecyclePolicy> lifecyclePolicies;+ public String getFileSystemId() { return fileSystemId; }+ public void setFileSystemId(String fileSystemId) { this.fileSystemId = fileSystemId; }+ public List<LifecyclePolicy> getLifecyclePolicies() { return lifecyclePolicies; }+ public void setLifecyclePolicies(List<LifecyclePolicy> lifecyclePolicies) { this.lifecyclePolicies = lifecyclePolicies; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationResponse.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationResponse.javanew file mode 100644index 0000000000..2a9a8cfeea--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/PutLifecycleConfigurationResponse.java@@ -0,0 +1,15 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;+import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class PutLifecycleConfigurationResponse {+ private List<LifecyclePolicy> lifecyclePolicies;+ public List<LifecyclePolicy> getLifecyclePolicies() { return lifecyclePolicies; }+ public void setLifecyclePolicies(List<LifecyclePolicy> lifecyclePolicies) { this.lifecyclePolicies = lifecyclePolicies; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/ReplicationOverwriteProtection.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/ReplicationOverwriteProtection.javanew file mode 100644index 0000000000..e9b1713be7--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/ReplicationOverwriteProtection.java@@ -0,0 +1,10 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflection+public enum ReplicationOverwriteProtection {+ ENABLED,+ DISABLED,+ REPLICATING+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/RootDirectory.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/RootDirectory.javanew file mode 100644index 0000000000..e9b0b11cc1--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/RootDirectory.java@@ -0,0 +1,30 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class RootDirectory {++ private CreationInfo creationInfo;+ private String path;++ public CreationInfo getCreationInfo() {+ return creationInfo;+ }++ public void setCreationInfo(CreationInfo creationInfo) {+ this.creationInfo = creationInfo;+ }++ public String getPath() {+ return path;+ }++ public void setPath(String path) {+ this.path = path;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/Tag.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/Tag.javanew file mode 100644index 0000000000..bc7a122257--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/Tag.java@@ -0,0 +1,44 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class Tag {++ private String key;+ private String value;++ public String getKey() {+ return key;+ }++ public void setKey(String key) {+ this.key = key;+ }++ public String getValue() {+ return value;+ }++ public void setValue(String value) {+ this.value = value;+ }++ @Override+ public boolean equals(Object o) {+ if (this == o) return true;+ if (o == null || getClass() != o.getClass()) return false;+ Tag tag = (Tag) o;+ return java.util.Objects.equals(key, tag.key) &&+ java.util.Objects.equals(value, tag.value);+ }++ @Override+ public int hashCode() {+ return java.util.Objects.hash(key, value);+ }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/TagResourceRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/TagResourceRequest.javanew file mode 100644index 0000000000..0f7e131c9e--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/TagResourceRequest.java@@ -0,0 +1,19 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;+import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;+import java.util.List;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class TagResourceRequest {+ private String resourceId;+ private List<Tag> tags;++ public String getResourceId() { return resourceId; }+ public void setResourceId(String resourceId) { this.resourceId = resourceId; }++ public List<Tag> getTags() { return tags; }+ public void setTags(List<Tag> tags) { this.tags = tags; }+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/ThroughputMode.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/ThroughputMode.javanew file mode 100644index 0000000000..a6a541eae3--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/ThroughputMode.java@@ -0,0 +1,10 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++@RegisterForReflection+public enum ThroughputMode {+ bursting,+ provisioned,+ elastic+}diff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/UntagResourceRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/UntagResourceRequest.javanew file mode 100644index 0000000000..17c8ed510b--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/UntagResourceRequest.java@@ -0,0 +1,34 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import java.util.List;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class UntagResourceRequest {++ private String resourceId;++ @jakarta.ws.rs.QueryParam("tagKeys")+ private List<String> tagKeys;++ public String getResourceId() {+ return resourceId;+ }++ public void setResourceId(String resourceId) {+ this.resourceId = resourceId;+ }++ public List<String> getTagKeys() {+ return tagKeys;+ }++ public void setTagKeys(List<String> tagKeys) {+ this.tagKeys = tagKeys;+ }+}\ No newline at end of filediff --git a/src/main/java/io/github/hectorvent/floci/services/efs/model/UpdateFileSystemRequest.java b/src/main/java/io/github/hectorvent/floci/services/efs/model/UpdateFileSystemRequest.javanew file mode 100644index 0000000000..aa6e53a60e--- /dev/null+++ b/src/main/java/io/github/hectorvent/floci/services/efs/model/UpdateFileSystemRequest.java@@ -0,0 +1,30 @@+package io.github.hectorvent.floci.services.efs.model;++import io.quarkus.runtime.annotations.RegisterForReflection;++import com.fasterxml.jackson.databind.annotation.JsonNaming;+import com.fasterxml.jackson.databind.PropertyNamingStrategies;++@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class)+@RegisterForReflection+public class UpdateFileSystemRequest {++ private Double provisionedThroughputInMibps;+ private ThroughputMode throughputMode;++ public Double getProvisionedThroughputInMibps() {+ return provisionedThroughputInMibps;+ }++ public void setProvisionedThroughputInMibps(Double provisionedThroughputInMibps) {+ this.provisionedThroughputInMibps = provisionedThroughputInMibps;+ }++ public ThroughputMode getThroughputMode() {+ return throughputMode;+ }++ public void setThroughputMode(ThroughputMode throughputMode) {+ this.throughputMode = throughputMode;+ }+}\ No newline at end of filediff --git a/src/main/resources/application.yml b/src/main/resources/application.ymlindex f4ddf567f2..514d3f4427 100644--- a/src/main/resources/application.yml+++ b/src/main/resources/application.yml@@ -530,6 +530,8 @@ floci:enabled: truecloudhsmv2:enabled: true+ efs:+ enabled: trueorganizations:enabled: truerum:diff --git a/src/test/java/io/github/hectorvent/floci/services/efs/EfsIntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/efs/EfsIntegrationTest.javanew file mode 100644index 0000000000..c45d175b64--- /dev/null+++ b/src/test/java/io/github/hectorvent/floci/services/efs/EfsIntegrationTest.java@@ -0,0 +1,233 @@+package io.github.hectorvent.floci.services.efs;++import io.github.hectorvent.floci.testing.RestAssuredJsonUtils;+import io.quarkus.test.junit.QuarkusTest;+import org.junit.jupiter.api.BeforeAll;+import org.junit.jupiter.api.MethodOrderer;+import org.junit.jupiter.api.Order;+import org.junit.jupiter.api.Test;+import org.junit.jupiter.api.TestInstance;+import org.junit.jupiter.api.TestMethodOrder;++import static io.restassured.RestAssured.given;+import static org.hamcrest.Matchers.*;++@QuarkusTest+@TestMethodOrder(MethodOrderer.OrderAnnotation.class)+@TestInstance(TestInstance.Lifecycle.PER_CLASS)+class EfsIntegrationTest {++ private String fileSystemId;+ private String mountTargetId;+ private String accessPointId;++ @BeforeAll+ static void configureRestAssured() {+ RestAssuredJsonUtils.configureAwsContentTypes();+ }++ @Test+ @Order(1)+ void createFileSystem() {+ fileSystemId = given()+ .contentType("application/json")+ .body("""+ {+ "CreationToken": "my-token",+ "PerformanceMode": "generalPurpose",+ "Encrypted": true,+ "Tags": [{"Key": "Name", "Value": "MyFS"}]+ }+ """)+ .when()+ .post("/2015-02-01/file-systems")+ .then()+ .statusCode(201)+ .body("FileSystemId", startsWith("fs-"))+ .body("Encrypted", equalTo(true))+ .body("NumberOfMountTargets", equalTo(0))+ .body("Tags[0].Value", equalTo("MyFS"))+ .extract().jsonPath().getString("FileSystemId");+ }++ @Test+ @Order(2)+ void describeFileSystemsByFileSystemId() {+ given()+ .queryParam("FileSystemId", fileSystemId)+ .when()+ .get("/2015-02-01/file-systems")+ .then()+ .statusCode(200)+ .body("FileSystems.size()", equalTo(1))+ .body("FileSystems[0].FileSystemId", equalTo(fileSystemId));+ }++ @Test+ @Order(3)+ void updateFileSystem() {+ given()+ .contentType("application/json")+ .body("""+ {+ "ThroughputMode": "provisioned",+ "ProvisionedThroughputInMibps": 50.0+ }+ """)+ .when()+ .put("/2015-02-01/file-systems/" + fileSystemId)+ .then()+ .statusCode(202)+ .body("ProvisionedThroughputInMibps", equalTo(50.0f));+ }++ @Test+ @Order(4)+ void createMountTarget() {+ mountTargetId = given()+ .contentType("application/json")+ .body("""+ {+ "FileSystemId": "%s",+ "SubnetId": "subnet-12345",+ "SecurityGroups": ["sg-11111"]+ }+ """.formatted(fileSystemId))+ .when()+ .post("/2015-02-01/mount-targets")+ .then()+ .statusCode(200)+ .body("MountTargetId", startsWith("fsmt-"))+ .body("FileSystemId", equalTo(fileSystemId))+ .body("SubnetId", equalTo("subnet-12345"))+ .extract().jsonPath().getString("MountTargetId");+ }++ @Test+ @Order(5)+ void describeMountTargets() {+ given()+ .contentType("application/json")+ .queryParam("FileSystemId", fileSystemId)+ .when()+ .get("/2015-02-01/mount-targets")+ .then()+ .statusCode(200)+ .body("MountTargets.MountTargetId", hasItem(mountTargetId));+ }++ @Test+ @Order(6)+ void modifyMountTargetSecurityGroups() {+ given()+ .contentType("application/json")+ .body("""+ {+ "SecurityGroups": ["sg-22222"]+ }+ """)+ .when()+ .put("/2015-02-01/mount-targets/" + mountTargetId + "/security-groups")+ .then()+ .statusCode(204);++ given()+ .contentType("application/json")+ .when()+ .get("/2015-02-01/mount-targets/" + mountTargetId + "/security-groups")+ .then()+ .statusCode(200)+ .body("SecurityGroups", hasItem("sg-22222"));+ }++ @Test+ @Order(7)+ void createAccessPoint() {+ accessPointId = given()+ .contentType("application/json")+ .body("""+ {+ "ClientToken": "ap-token",+ "FileSystemId": "%s"+ }+ """.formatted(fileSystemId))+ .when()+ .post("/2015-02-01/access-points")+ .then()+ .statusCode(200)+ .body("AccessPointId", startsWith("fsap-"))+ .body("FileSystemId", equalTo(fileSystemId))+ .extract().jsonPath().getString("AccessPointId");+ }++ @Test+ @Order(8)+ void describeAccessPoints() {+ given()+ .contentType("application/json")+ .queryParam("FileSystemId", fileSystemId)+ .when()+ .get("/2015-02-01/access-points")+ .then()+ .statusCode(200)+ .body("AccessPoints.AccessPointId", hasItem(accessPointId));+ }++ @Test+ @Order(9)+ void manageFileSystemPolicy() {+ given()+ .contentType("application/json")+ .body("""+ {+ "Policy": "{\\"Statement\\": []}"+ }+ """)+ .when()+ .put("/2015-02-01/file-systems/" + fileSystemId + "/policy")+ .then()+ .statusCode(200)+ .body("Policy", equalTo("{\"Statement\": []}"));++ given()+ .contentType("application/json")+ .when()+ .get("/2015-02-01/file-systems/" + fileSystemId + "/policy")+ .then()+ .statusCode(200)+ .body("Policy", equalTo("{\"Statement\": []}"));+ }++ @Test+ @Order(10)+ void deleteResources() {+ given()+ .contentType("application/json")+ .when()+ .delete("/2015-02-01/access-points/" + accessPointId)+ .then()+ .statusCode(204);++ given()+ .contentType("application/json")+ .when()+ .delete("/2015-02-01/mount-targets/" + mountTargetId)+ .then()+ .statusCode(204);++ given()+ .contentType("application/json")+ .when()+ .delete("/2015-02-01/file-systems/" + fileSystemId)+ .then()+ .statusCode(204);++ given()+ .contentType("application/json")+ .when()+ .get("/2015-02-01/file-systems")+ .then()+ .statusCode(200)+ .body("FileSystems.FileSystemId", not(hasItem(fileSystemId)));+ }+}diff --git a/src/test/resources/application.yml b/src/test/resources/application.ymlindex 3a66e44315..e33dd7e230 100644--- a/src/test/resources/application.yml+++ b/src/test/resources/application.yml@@ -324,6 +324,8 @@ floci:enabled: truecloudhsmv2:enabled: true+ efs:+ enabled: trueorganizations:enabled: truerum:diff --git a/tools/docs/services.yaml b/tools/docs/services.yamlindex 6a7a1e1a78..dae9b815b8 100644--- a/tools/docs/services.yaml+++ b/tools/docs/services.yaml@@ -38,6 +38,10 @@ services:doc: docs/services/docdb.mdsources:- { path: src/main/java/io/github/hectorvent/floci/services/docdb/DocDbQueryHandler.java, mode: switch }+ - service: efs+ doc: docs/services/efs.md+ sources:+ - { path: src/main/java/io/github/hectorvent/floci/services/efs/EfsController.java, mode: rest }- service: organizationsdoc: docs/services/organizations.mdsources: