mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
feat(cloudtrail): support empty lookup events (#1603)
* feat(cloudtrail): support empty lookup events * fix(cloudtrail): keep lookup events handler signature consistent
This commit is contained in:
1 parent
eb9a9706aa
commit
2cca03bf25
2 files changed
+27
No files matched your search
+7
@@ -35,6 +35,7 @@ public class CloudTrailJsonHandler {
|
||||
case "DeleteTrail" -> deleteTrail(request, region);
|
||||
case "GetTrailStatus" -> getTrailStatus(request, region);
|
||||
case "PutEventSelectors" -> putEventSelectors(request, region);
|
||||
case "LookupEvents" -> lookupEvents(request, region);
|
||||
default -> throw new AwsException("UnsupportedOperation",
|
||||
"Operation " + action + " is not supported.", 400);
|
||||
};
|
||||
@@ -102,6 +103,12 @@ public class CloudTrailJsonHandler {
|
||||
return Response.ok(mapper.createObjectNode()).build();
|
||||
}
|
||||
|
||||
private Response lookupEvents(JsonNode request, String region) {
|
||||
ObjectNode response = mapper.createObjectNode();
|
||||
response.putArray("Events");
|
||||
return Response.ok(response).build();
|
||||
}
|
||||
|
||||
private ObjectNode trailNode(CloudTrailTrail trail) {
|
||||
ObjectNode node = mapper.createObjectNode();
|
||||
node.put("Name", trail.getName());
|
||||
|
||||
Reference in new issue
Block a user