mirror of
https://github.com/floci-io/floci.git
synced 2026-11-27 07:39:24 -05:00
fix(config): keep recording strategy, exclusions and recording mode on configuration recorders (#7178)
This commit is contained in:
1 parent
c8dec86997
commit
c024c8342c
10 files changed
+169
-7
No files matched your search
+2
-1
@@ -686,7 +686,8 @@ public class AwsConfigService {
|
||||
|
||||
public void putConfigurationRecorder(String region, ConfigurationRecorder recorder) {
|
||||
String name = (recorder.name() == null || recorder.name().isEmpty()) ? "default" : recorder.name();
|
||||
ConfigurationRecorder stored = new ConfigurationRecorder(name, recorder.roleARN(), recorder.recordingGroup());
|
||||
ConfigurationRecorder stored = new ConfigurationRecorder(name, recorder.roleARN(), recorder.recordingGroup(),
|
||||
recorder.recordingMode());
|
||||
configurationRecorders.put(region, stored);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -11,5 +11,6 @@ import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
public record ConfigurationRecorder(
|
||||
@JsonProperty("name") String name,
|
||||
@JsonProperty("roleARN") String roleARN,
|
||||
@JsonProperty("recordingGroup") RecordingGroup recordingGroup) {
|
||||
@JsonProperty("recordingGroup") RecordingGroup recordingGroup,
|
||||
@JsonProperty("recordingMode") RecordingMode recordingMode) {
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package io.github.hectorvent.floci.services.configservice.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record ExclusionByResourceTypes(@JsonProperty("resourceTypes") List<String> resourceTypes) {
|
||||
}
|
||||
+3
-1
@@ -13,5 +13,7 @@ import java.util.List;
|
||||
public record RecordingGroup(
|
||||
@JsonProperty("allSupported") Boolean allSupported,
|
||||
@JsonProperty("includeGlobalResourceTypes") Boolean includeGlobalResourceTypes,
|
||||
@JsonProperty("resourceTypes") List<String> resourceTypes) {
|
||||
@JsonProperty("resourceTypes") List<String> resourceTypes,
|
||||
@JsonProperty("exclusionByResourceTypes") ExclusionByResourceTypes exclusionByResourceTypes,
|
||||
@JsonProperty("recordingStrategy") RecordingStrategy recordingStrategy) {
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package io.github.hectorvent.floci.services.configservice.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record RecordingMode(
|
||||
@JsonProperty("recordingFrequency") String recordingFrequency,
|
||||
@JsonProperty("recordingModeOverrides") List<RecordingModeOverride> recordingModeOverrides) {
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package io.github.hectorvent.floci.services.configservice.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record RecordingModeOverride(
|
||||
@JsonProperty("description") String description,
|
||||
@JsonProperty("resourceTypes") List<String> resourceTypes,
|
||||
@JsonProperty("recordingFrequency") String recordingFrequency) {
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package io.github.hectorvent.floci.services.configservice.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.quarkus.runtime.annotations.RegisterForReflection;
|
||||
|
||||
@RegisterForReflection
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public record RecordingStrategy(@JsonProperty("useOnly") String useOnly) {
|
||||
}
|
||||
Reference in new issue
Block a user