`. `GetDataIntegration`,
+`UpdateDataIntegration` and `DeleteDataIntegration` accept either the id or that ARN.
+
+`EventBridgeBus`, `EventFilter.Source`, `Description` and `Tags` round-trip through
+`GetEventIntegration`, which is what `aws_appintegrations_event_integration` reads.
+Note that `CreateDataIntegration` takes the schedule under `ScheduleConfig` and reads
+it back as `ScheduleConfiguration`, matching the AWS model.
+
+`UpdateEventIntegration` and `UpdateDataIntegration` change only the members present in
+the request body. An omitted `Description` or `Name` keeps its stored value.
+
+`ListEventIntegrationAssociations` returns an empty list for an existing integration
+and `ResourceNotFoundException` for a missing one. Associations are created by the
+consuming service (Amazon Connect and friends) when it binds a client to the
+integration. Floci has no path that creates one, so an empty list is the true state
+rather than a placeholder.
+
+## Not implemented
+
+These return a clean `UnknownOperationException` rather than a stub success:
+
+- `CreateDataIntegrationAssociation`, `UpdateDataIntegrationAssociation` and
+ `ListDataIntegrationAssociations`. An association binds a data integration to a live
+ client execution, which the emulator has no way to model.
+- `CreateApplication`, `GetApplication`, `UpdateApplication`, `DeleteApplication`,
+ `ListApplications` and `ListApplicationAssociations`. The third-party application
+ surface is not yet modelled.
+
+## Configuration
+
+| Variable | Default | Description |
+|---|---|---|
+| `FLOCI_SERVICES_APPINTEGRATIONS_ENABLED` | `true` | Enable or disable the service |
+
+## Examples
+
+```bash
+export AWS_ENDPOINT_URL=http://localhost:4566
+
+aws appintegrations create-event-integration \
+ --name my-integration \
+ --event-bridge-bus my-bus \
+ --event-filter Source=aws.partner/example.com/1234
+
+aws appintegrations get-event-integration --name my-integration
+
+aws appintegrations create-data-integration \
+ --name my-data-integration \
+ --kms-key arn:aws:kms:us-east-1:000000000000:key/abc \
+ --source-uri "Salesforce://AppFlow/test"
+
+aws appintegrations list-data-integrations
+
+aws appintegrations delete-event-integration --name my-integration
+```
diff --git a/docs/services/index.md b/docs/services/index.md
index e84125c31c..62ed2aaa09 100644
--- a/docs/services/index.md
+++ b/docs/services/index.md
@@ -57,6 +57,7 @@ Operation counts are exact. For dispatch-table services (Query and JSON 1.1) eac
| [Security Hub](securityhub.md) | `/organization/*`, `/accounts`, `/findingAggregator/*`, `/configurationPolicy*`, `/tags/*` | REST JSON | 22 |
| [Amazon Detective](detective.md) | `/orgs/*`, `/graphs/list`, `/graph/*` | REST JSON | 8 |
| [Amazon Connect](connect.md) | `/instance`, `/instance/{instanceId}/*`, `/tags/*` | REST JSON | 15 |
+| [Amazon AppIntegrations](appintegrations.md) | `/eventIntegrations/*`, `/dataIntegrations/*`, `/tags/*` | REST JSON | 14 |
| [ElastiCache](elasticache.md) | `POST /` with `Action=` param + TCP proxy | Query + RESP | 8 |
| [MemoryDB](memorydb.md) | `POST /` + `X-Amz-Target: AmazonMemoryDB.*` + TCP proxy | JSON 1.1 + RESP | 7 |
| [RDS](rds.md) | `POST /` with `Action=` param + TCP proxy | Query + wire | 14 |
diff --git a/mkdocs.yml b/mkdocs.yml
index 18ae4bb89a..336bd312ef 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -158,6 +158,7 @@ nav:
- Managed Prometheus (AMP): services/managed-prometheus.md
- GuardDuty: services/guardduty.md
- Connect: services/connect.md
+ - AppIntegrations: services/appintegrations.md
- ACM: services/acm.md
- ECS: services/ecs.md
- ECR: services/ecr.md
diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
index 57eb92d804..3b11cf1bcf 100644
--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
@@ -739,6 +739,7 @@ public interface EmulatorConfig {
ControlCatalogServiceConfig controlcatalog();
ControlTowerServiceConfig controltower();
ConnectServiceConfig connect();
+ AppIntegrationsServiceConfig appintegrations();
CognitoIdentityServiceConfig cognitoidentity();
GlobalAcceleratorServiceConfig globalaccelerator();
@@ -755,6 +756,11 @@ public interface EmulatorConfig {
boolean enabled();
}
+ interface AppIntegrationsServiceConfig {
+ @WithDefault("true")
+ boolean enabled();
+ }
+
interface CognitoIdentityServiceConfig {
@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.java
index 7e3d041498..666b14cb2b 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
@@ -607,6 +607,12 @@ public class ResolvedServiceCatalog {
protocols(ServiceProtocol.REST_JSON),
Set.of(), Set.of("connect"), Set.of(),
Set.of(io.github.hectorvent.floci.services.connect.ConnectController.class)),
+ descriptor("app-integrations", "appintegrations",
+ config.services().appintegrations().enabled(), true,
+ "appintegrations", config.storage().mode(), 5000L, null, ServiceProtocol.REST_JSON,
+ protocols(ServiceProtocol.REST_JSON),
+ Set.of(), Set.of("app-integrations"), Set.of(),
+ Set.of(io.github.hectorvent.floci.services.appintegrations.AppIntegrationsController.class)),
descriptor("cognito-identity", "cognitoidentity",
config.services().cognitoidentity().enabled(), true,
"cognitoidentity", config.storage().mode(), 5000L, null, ServiceProtocol.JSON,
diff --git a/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsController.java b/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsController.java
new file mode 100644
index 0000000000..39c052be16
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsController.java
@@ -0,0 +1,265 @@
+package io.github.hectorvent.floci.services.appintegrations;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ArrayNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import io.github.hectorvent.floci.core.common.JsonErrorResponseUtils;
+import io.github.hectorvent.floci.core.common.RegionResolver;
+import io.github.hectorvent.floci.services.appintegrations.model.DataIntegration;
+import io.github.hectorvent.floci.services.appintegrations.model.EventIntegration;
+import jakarta.inject.Inject;
+import jakarta.ws.rs.Consumes;
+import jakarta.ws.rs.DELETE;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.PATCH;
+import jakarta.ws.rs.POST;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.PathParam;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.WebApplicationException;
+import jakarta.ws.rs.core.Context;
+import jakarta.ws.rs.core.HttpHeaders;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+
+/**
+ * Amazon AppIntegrations REST-JSON controller (API version 2020-07-29).
+ *
+ * Tag operations live on the shared {@code /tags/{resourceArn}} path and are served by
+ * {@code SharedTagsController} through {@link AppIntegrationsService}'s {@code TagHandler}.
+ * Only the operations declared below are served; anything else falls through to the
+ * emulator's not-found handling rather than a stub success.
+ */
+@Path("/")
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class AppIntegrationsController {
+
+ private final AppIntegrationsService appIntegrationsService;
+ private final RegionResolver regionResolver;
+ private final ObjectMapper objectMapper;
+
+ @Inject
+ public AppIntegrationsController(AppIntegrationsService appIntegrationsService,
+ RegionResolver regionResolver, ObjectMapper objectMapper) {
+ this.appIntegrationsService = appIntegrationsService;
+ this.regionResolver = regionResolver;
+ this.objectMapper = objectMapper;
+ }
+
+ @POST
+ @Path("/eventIntegrations")
+ public Response createEventIntegration(@Context HttpHeaders headers, String body) {
+ String region = regionResolver.resolveRegion(headers);
+ JsonNode request = readTree(body);
+ EventIntegration integration = appIntegrationsService.createEventIntegration(
+ textOrNull(request, "Name"),
+ textOrNull(request, "Description"),
+ request.get("EventFilter"),
+ textOrNull(request, "EventBridgeBus"),
+ parseTags(request.get("Tags")),
+ region);
+
+ ObjectNode response = objectMapper.createObjectNode();
+ response.put("EventIntegrationArn", integration.getEventIntegrationArn());
+ return Response.ok(response).build();
+ }
+
+ @GET
+ @Path("/eventIntegrations/{name}")
+ public Response getEventIntegration(@PathParam("name") String name, @Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ EventIntegration integration = appIntegrationsService.getEventIntegration(name, region);
+ return Response.ok(eventIntegrationNode(integration)).build();
+ }
+
+ @PATCH
+ @Path("/eventIntegrations/{name}")
+ public Response updateEventIntegration(@PathParam("name") String name,
+ @Context HttpHeaders headers, String body) {
+ String region = regionResolver.resolveRegion(headers);
+ JsonNode request = readTree(body);
+ appIntegrationsService.updateEventIntegration(name, optionalText(request, "Description"), region);
+ return Response.ok(objectMapper.createObjectNode()).build();
+ }
+
+ @DELETE
+ @Path("/eventIntegrations/{name}")
+ public Response deleteEventIntegration(@PathParam("name") String name, @Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ appIntegrationsService.deleteEventIntegration(name, region);
+ return Response.ok(objectMapper.createObjectNode()).build();
+ }
+
+ @GET
+ @Path("/eventIntegrations")
+ public Response listEventIntegrations(@Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ ObjectNode response = objectMapper.createObjectNode();
+ ArrayNode integrations = response.putArray("EventIntegrations");
+ for (EventIntegration integration : appIntegrationsService.listEventIntegrations(region)) {
+ integrations.add(eventIntegrationNode(integration));
+ }
+ return Response.ok(response).build();
+ }
+
+ /**
+ * Associations are created by the consuming service (Amazon Connect and friends)
+ * when it binds a client to the integration. Floci has no path that creates one, so
+ * an existing integration always reports an empty list; a missing one still raises
+ * ResourceNotFoundException.
+ */
+ @GET
+ @Path("/eventIntegrations/{name}/associations")
+ public Response listEventIntegrationAssociations(@PathParam("name") String name,
+ @Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ appIntegrationsService.getEventIntegration(name, region);
+ ObjectNode response = objectMapper.createObjectNode();
+ response.putArray("EventIntegrationAssociations");
+ return Response.ok(response).build();
+ }
+
+ @POST
+ @Path("/dataIntegrations")
+ public Response createDataIntegration(@Context HttpHeaders headers, String body) {
+ String region = regionResolver.resolveRegion(headers);
+ JsonNode request = readTree(body);
+ DataIntegration integration = appIntegrationsService.createDataIntegration(
+ textOrNull(request, "Name"),
+ textOrNull(request, "Description"),
+ textOrNull(request, "KmsKey"),
+ textOrNull(request, "SourceURI"),
+ request.get("ScheduleConfig"),
+ request.get("FileConfiguration"),
+ request.get("ObjectConfiguration"),
+ parseTags(request.get("Tags")),
+ region);
+
+ ObjectNode response = dataIntegrationNode(integration);
+ String clientToken = textOrNull(request, "ClientToken");
+ if (clientToken != null) {
+ response.put("ClientToken", clientToken);
+ }
+ return Response.ok(response).build();
+ }
+
+ @GET
+ @Path("/dataIntegrations/{identifier}")
+ public Response getDataIntegration(@PathParam("identifier") String identifier,
+ @Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ DataIntegration integration = appIntegrationsService.getDataIntegration(identifier, region);
+ return Response.ok(dataIntegrationNode(integration)).build();
+ }
+
+ @PATCH
+ @Path("/dataIntegrations/{identifier}")
+ public Response updateDataIntegration(@PathParam("identifier") String identifier,
+ @Context HttpHeaders headers, String body) {
+ String region = regionResolver.resolveRegion(headers);
+ JsonNode request = readTree(body);
+ appIntegrationsService.updateDataIntegration(identifier, optionalText(request, "Name"),
+ optionalText(request, "Description"), region);
+ return Response.ok(objectMapper.createObjectNode()).build();
+ }
+
+ @DELETE
+ @Path("/dataIntegrations/{identifier}")
+ public Response deleteDataIntegration(@PathParam("identifier") String identifier,
+ @Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ appIntegrationsService.deleteDataIntegration(identifier, region);
+ return Response.ok(objectMapper.createObjectNode()).build();
+ }
+
+ @GET
+ @Path("/dataIntegrations")
+ public Response listDataIntegrations(@Context HttpHeaders headers) {
+ String region = regionResolver.resolveRegion(headers);
+ ObjectNode response = objectMapper.createObjectNode();
+ ArrayNode integrations = response.putArray("DataIntegrations");
+ for (DataIntegration integration : appIntegrationsService.listDataIntegrations(region)) {
+ ObjectNode summary = integrations.addObject();
+ summary.put("Arn", integration.getArn());
+ summary.put("Name", integration.getName());
+ if (integration.getSourceUri() != null) {
+ summary.put("SourceURI", integration.getSourceUri());
+ }
+ }
+ return Response.ok(response).build();
+ }
+
+ private ObjectNode eventIntegrationNode(EventIntegration integration) {
+ ObjectNode node = objectMapper.createObjectNode();
+ node.put("Name", integration.getName());
+ if (integration.getDescription() != null) {
+ node.put("Description", integration.getDescription());
+ }
+ node.put("EventIntegrationArn", integration.getEventIntegrationArn());
+ node.put("EventBridgeBus", integration.getEventBridgeBus());
+ node.putObject("EventFilter").put("Source", integration.getEventFilterSource());
+ node.set("Tags", objectMapper.valueToTree(
+ integration.getTags() != null ? integration.getTags() : Map.of()));
+ return node;
+ }
+
+ private ObjectNode dataIntegrationNode(DataIntegration integration) {
+ ObjectNode node = objectMapper.createObjectNode();
+ node.put("Arn", integration.getArn());
+ node.put("Id", integration.getId());
+ node.put("Name", integration.getName());
+ if (integration.getDescription() != null) {
+ node.put("Description", integration.getDescription());
+ }
+ node.put("KmsKey", integration.getKmsKey());
+ if (integration.getSourceUri() != null) {
+ node.put("SourceURI", integration.getSourceUri());
+ }
+ setIfPresent(node, "ScheduleConfiguration", integration.getScheduleConfiguration());
+ setIfPresent(node, "FileConfiguration", integration.getFileConfiguration());
+ setIfPresent(node, "ObjectConfiguration", integration.getObjectConfiguration());
+ node.set("Tags", objectMapper.valueToTree(
+ integration.getTags() != null ? integration.getTags() : Map.of()));
+ return node;
+ }
+
+ private void setIfPresent(ObjectNode node, String field, JsonNode value) {
+ if (value != null && !value.isNull()) {
+ node.set(field, value);
+ }
+ }
+
+ private JsonNode readTree(String body) {
+ try {
+ return objectMapper.readTree(body == null || body.isBlank() ? "{}" : body);
+ } catch (Exception e) {
+ throw new WebApplicationException(JsonErrorResponseUtils.createSerializationErrorResponse());
+ }
+ }
+
+ private String textOrNull(JsonNode node, String field) {
+ return optionalText(node, field).orElse(null);
+ }
+
+ private Optional optionalText(JsonNode node, String field) {
+ JsonNode value = node.get(field);
+ if (value == null || value.isNull()) {
+ return Optional.empty();
+ }
+ return Optional.of(value.asText());
+ }
+
+ private Map parseTags(JsonNode tagsNode) {
+ Map tags = new HashMap<>();
+ if (tagsNode != null && tagsNode.isObject()) {
+ tagsNode.fields().forEachRemaining(e -> tags.put(e.getKey(), e.getValue().asText()));
+ }
+ return tags;
+ }
+}
diff --git a/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsService.java b/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsService.java
new file mode 100644
index 0000000000..390b68dd33
--- /dev/null
+++ b/src/main/java/io/github/hectorvent/floci/services/appintegrations/AppIntegrationsService.java
@@ -0,0 +1,282 @@
+package io.github.hectorvent.floci.services.appintegrations;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import io.github.hectorvent.floci.core.common.AwsArnUtils;
+import io.github.hectorvent.floci.core.common.AwsException;
+import io.github.hectorvent.floci.core.common.RegionResolver;
+import io.github.hectorvent.floci.core.common.TagHandler;
+import io.github.hectorvent.floci.core.storage.StorageBackend;
+import io.github.hectorvent.floci.core.storage.StorageFactory;
+import io.github.hectorvent.floci.services.appintegrations.model.DataIntegration;
+import io.github.hectorvent.floci.services.appintegrations.model.EventIntegration;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.inject.Inject;
+import org.jboss.logging.Logger;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.UUID;
+
+/**
+ * Amazon AppIntegrations (signing name {@code app-integrations}, API version 2020-07-29).
+ * Event integrations are addressed by name, data integrations by generated id; both accept
+ * their own ARN wherever the API takes an identifier.
+ */
+@ApplicationScoped
+public class AppIntegrationsService implements TagHandler {
+
+ private static final Logger LOG = Logger.getLogger(AppIntegrationsService.class);
+
+ static final String SERVICE = "app-integrations";
+ private static final String EVENT_INTEGRATION_RESOURCE = "event-integration";
+ private static final String DATA_INTEGRATION_RESOURCE = "data-integration";
+
+ private final StorageBackend eventIntegrations;
+ private final StorageBackend dataIntegrations;
+ private final RegionResolver regionResolver;
+
+ @Inject
+ public AppIntegrationsService(StorageFactory storageFactory, RegionResolver regionResolver) {
+ this.eventIntegrations = storageFactory.create("appintegrations",
+ "appintegrations-event-integrations.json",
+ new TypeReference