diff --git a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/AppConfigTest.java b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/AppConfigTest.java index 086f90e88b..27314069af 100644 --- a/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/AppConfigTest.java +++ b/compatibility-tests/sdk-test-java/src/test/java/com/floci/test/AppConfigTest.java @@ -342,17 +342,63 @@ class AppConfigTest { .deploymentDurationInMinutes(0) .growthFactor(100f) .finalBakeTimeInMinutes(0) + .tags(Map.of("owner", "Alice")) .build()).id(); String arn = "arn:aws:appconfig:us-east-1:000000000000:deploymentstrategy/" + tagStrategyId; + try { + assertTagRoundTrip(arn); + } finally { + try { + appConfig.deleteDeploymentStrategy(DeleteDeploymentStrategyRequest.builder() + .deploymentStrategyId(tagStrategyId).build()); + } catch (Exception ignored) { + // Best-effort cleanup: a failed delete must not hide the assertion that failed above it. + } + } + } + @Test + @Order(60) + @DisplayName("TagResource / ListTagsForResource / UntagResource - configuration profile, create-time Tags kept") + void tagConfigurationProfileViaSdk() { + String tagAppId = appConfig.createApplication(CreateApplicationRequest.builder() + .name("tag-roundtrip-profile-app") + .build()).id(); + try { + String profileId = appConfig.createConfigurationProfile(CreateConfigurationProfileRequest.builder() + .applicationId(tagAppId) + .name("tag-roundtrip-profile") + .locationUri("hosted") + .tags(Map.of("owner", "Alice")) + .build()).id(); + assertTagRoundTrip("arn:aws:appconfig:us-east-1:000000000000:application/" + tagAppId + + "/configurationprofile/" + profileId); + appConfig.deleteConfigurationProfile(DeleteConfigurationProfileRequest.builder() + .applicationId(tagAppId).configurationProfileId(profileId).build()); + } finally { + try { + appConfig.deleteApplication(DeleteApplicationRequest.builder() + .applicationId(tagAppId).build()); + } catch (Exception ignored) { + // Best-effort cleanup: a failed delete must not hide the assertion that failed above it. + } + } + } + + /** The resource {@code arn} names was created with owner=Alice: a tag is added, then one removed. */ + private void assertTagRoundTrip(String arn) { + assertThat(appConfig.listTagsForResource(ListTagsForResourceRequest.builder().resourceArn(arn).build()).tags()) + .containsExactlyEntriesOf(Map.of("owner", "Alice")); appConfig.tagResource(TagResourceRequest.builder() .resourceArn(arn) .tags(Map.of("env", "prod")) .build()); - - ListTagsForResourceResponse listed = appConfig.listTagsForResource( - ListTagsForResourceRequest.builder().resourceArn(arn).build()); - assertThat(listed.tags()).isNotNull(); + appConfig.untagResource(UntagResourceRequest.builder() + .resourceArn(arn) + .tagKeys("owner") + .build()); + assertThat(appConfig.listTagsForResource(ListTagsForResourceRequest.builder().resourceArn(arn).build()).tags()) + .containsExactlyEntriesOf(Map.of("env", "prod")); } @Test diff --git a/src/main/java/io/floci/aws/services/appconfig/AppConfigController.java b/src/main/java/io/floci/aws/services/appconfig/AppConfigController.java index cac6890434..4226fb3abb 100644 --- a/src/main/java/io/floci/aws/services/appconfig/AppConfigController.java +++ b/src/main/java/io/floci/aws/services/appconfig/AppConfigController.java @@ -137,13 +137,13 @@ public class AppConfigController { @SuppressWarnings("unchecked") Map request = objectMapper.readValue(body, Map.class); ConfigurationProfile profile = service.createConfigurationProfile(appId, request); - return Response.status(201).entity(profile).build(); + return Response.status(201).entity(withoutTags(profile)).build(); } @GET @Path("/applications/{appId}/configurationprofiles/{profileId}") public Response getConfigurationProfile(@PathParam("appId") String appId, @PathParam("profileId") String profileId) { - return Response.ok(service.getConfigurationProfile(appId, profileId)).build(); + return Response.ok(withoutTags(service.getConfigurationProfile(appId, profileId))).build(); } @GET @@ -154,7 +154,7 @@ public class AppConfigController { @Context UriInfo uriInfo) { PaginatedResult page = service.listConfigurationProfilesPage(appId, parseListMaxResults(maxResults, uriInfo), rawNextToken(nextToken, uriInfo)); - return listResponse(page.items(), page.nextToken()); + return listResponse(page.items().stream().map(this::withoutTags).toList(), page.nextToken()); } @DELETE @@ -227,13 +227,13 @@ public class AppConfigController { @SuppressWarnings("unchecked") Map request = objectMapper.readValue(body, Map.class); DeploymentStrategy strategy = service.createDeploymentStrategy(request); - return Response.status(201).entity(strategy).build(); + return Response.status(201).entity(withoutTags(strategy)).build(); } @GET @Path("/deploymentstrategies/{id}") public Response getDeploymentStrategy(@PathParam("id") String id) { - return Response.ok(service.getDeploymentStrategy(id)).build(); + return Response.ok(withoutTags(service.getDeploymentStrategy(id))).build(); } @GET @@ -243,7 +243,7 @@ public class AppConfigController { @Context UriInfo uriInfo) { PaginatedResult page = service.listDeploymentStrategiesPage( parseListMaxResults(maxResults, uriInfo), rawNextToken(nextToken, uriInfo)); - return listResponse(page.items(), page.nextToken()); + return listResponse(page.items().stream().map(this::withoutTags).toList(), page.nextToken()); } // AWS's own API model spells this path "deployementstrategies" (extra "e") - every other diff --git a/src/main/java/io/floci/aws/services/appconfig/AppConfigService.java b/src/main/java/io/floci/aws/services/appconfig/AppConfigService.java index 26684d173f..58172f28c8 100644 --- a/src/main/java/io/floci/aws/services/appconfig/AppConfigService.java +++ b/src/main/java/io/floci/aws/services/appconfig/AppConfigService.java @@ -45,8 +45,8 @@ public class AppConfigService { private final RegionScopedStorage applicationStore; private final RegionScopedStorage environmentStore; - private final StorageBackend profileStore; - private final StorageBackend strategyStore; + private final RegionScopedStorage profileStore; + private final RegionScopedStorage strategyStore; private final StorageBackend versionStore; private final StorageBackend deploymentStore; private final StorageBackend activeConfigStore; // envId::profileId -> versionNumber @@ -57,6 +57,7 @@ public class AppConfigService { private static final int MAX_MONITORS = 5; private static final int MAX_ARN_LENGTH = 2048; private static final String APPLICATION_RESOURCE = "application/"; + private static final String STRATEGY_RESOURCE = "deploymentstrategy/"; private static final Pattern ROLE_ARN = Pattern.compile("arn:" + AwsArnUtils.PARTITION_REGEX + ":iam::\\d{12}:role/.*"); @Inject @@ -299,6 +300,7 @@ public class AppConfigService { public ConfigurationProfile createConfigurationProfile(String applicationIdentifier, Map request) { String appId = resolveApplication(applicationIdentifier).getId(); + Map tags = requestTags(request); ConfigurationProfile profile = new ConfigurationProfile(); profile.setId(shortId(7)); profile.setApplicationId(appId); @@ -307,6 +309,7 @@ public class AppConfigService { profile.setLocationUri((String) request.get("LocationUri")); String type = (String) request.get("Type"); profile.setType(type == null && "hosted".equals(profile.getLocationUri()) ? "AWS.Freeform" : type); + profile.getTags().putAll(tags); profileStore.put(profile.getId(), profile); return profile; } @@ -490,6 +493,7 @@ public class AppConfigService { // ──────────────────────────── Deployment Strategy ──────────────────────────── public DeploymentStrategy createDeploymentStrategy(Map request) { + Map tags = requestTags(request); DeploymentStrategy strategy = new DeploymentStrategy(); strategy.setId(shortId(7)); strategy.setName((String) request.get("Name")); @@ -499,6 +503,7 @@ public class AppConfigService { strategy.setFinalBakeTimeInMinutes((Integer) request.getOrDefault("FinalBakeTimeInMinutes", 0)); strategy.setGrowthType((String) request.getOrDefault("GrowthType", "LINEAR")); strategy.setReplicateTo((String) request.getOrDefault("ReplicateTo", "NONE")); + strategy.getTags().putAll(tags); strategyStore.put(strategy.getId(), strategy); return strategy; } @@ -916,8 +921,9 @@ public class AppConfigService { } /** - * The tags of the application or environment {@code arn} names by its ids, read in the ARN's account and Region, - * which IAM gives a condition on a resource's tags; empty for any other resource, or for one it does not hold. + * The tags of the application, environment, configuration profile or deployment strategy {@code arn} names by its + * ids, read in the ARN's account and Region, which IAM gives a condition on a resource's tags; empty for any other + * resource, or for one it does not hold. */ public Map storedTags(String arn) { if (!AwsArnUtils.isArnFor(arn, "appconfig")) { @@ -926,10 +932,25 @@ public class AppConfigService { AwsArnUtils.Arn parsed = AwsArnUtils.parse(arn); String id = parsed.resource().startsWith(APPLICATION_RESOURCE) ? parsed.resource().substring(APPLICATION_RESOURCE.length()) : ""; + if (parsed.resource().startsWith(STRATEGY_RESOURCE)) { + String strategyId = parsed.resource().substring(STRATEGY_RESOURCE.length()); + return strategyStore.readInAccount(parsed.accountId(), parsed.region(), strategyId) + .filter(strategy -> strategyId.equals(strategy.getId())) + .map(DeploymentStrategy::getTags) + .orElse(Map.of()); + } String[] environmentPath = id.split("/", -1); if (environmentPath.length == 3 && "environment".equals(environmentPath[1])) { return storedEnvironmentTags(parsed, environmentPath[0], environmentPath[2]); } + if (environmentPath.length == 3 && "configurationprofile".equals(environmentPath[1])) { + String appId = environmentPath[0]; + String profileId = environmentPath[2]; + return profileStore.readInAccount(parsed.accountId(), parsed.region(), profileId) + .filter(profile -> profileId.equals(profile.getId()) && appId.equals(profile.getApplicationId())) + .map(ConfigurationProfile::getTags) + .orElse(Map.of()); + } if (id.isEmpty() || id.contains("/")) { return Map.of(); } @@ -974,6 +995,57 @@ public class AppConfigService { environmentStore.put(env.getId(), env); } + public Map getConfigurationProfileTags(String appId, String profileId) { + return getConfigurationProfile(appId, profileId).getTags(); + } + + public synchronized void tagConfigurationProfile(String appId, String profileId, Map tags) { + ConfigurationProfile profile = copy(getConfigurationProfile(appId, profileId)); + profile.getTags().putAll(tags); + profileStore.put(profile.getId(), profile); + } + + public synchronized void untagConfigurationProfile(String appId, String profileId, List tagKeys) { + ConfigurationProfile profile = copy(getConfigurationProfile(appId, profileId)); + tagKeys.forEach(profile.getTags()::remove); + profileStore.put(profile.getId(), profile); + } + + /** A stored deployment strategy's tags; a predefined strategy holds none. */ + public Map getDeploymentStrategyTags(String id) { + return strategyStore.get(id).map(DeploymentStrategy::getTags).orElseGet(() -> { + getDeploymentStrategy(id); + return Map.of(); + }); + } + + /** Tags a stored deployment strategy. A predefined one is AWS's own, so Floci keeps no tags for it. */ + public synchronized void tagDeploymentStrategy(String id, Map tags) { + DeploymentStrategy strategy = storedDeploymentStrategy(id); + if (strategy != null) { + strategy.getTags().putAll(tags); + strategyStore.put(strategy.getId(), strategy); + } + } + + public synchronized void untagDeploymentStrategy(String id, List tagKeys) { + DeploymentStrategy strategy = storedDeploymentStrategy(id); + if (strategy != null) { + tagKeys.forEach(strategy.getTags()::remove); + strategyStore.put(strategy.getId(), strategy); + } + } + + /** A copy of the stored strategy {@code id} to change, null for a predefined one; unknown ids are not found. */ + private DeploymentStrategy storedDeploymentStrategy(String id) { + Optional stored = strategyStore.get(id); + if (stored.isEmpty()) { + getDeploymentStrategy(id); + return null; + } + return copy(stored.get()); + } + /** * Sets the tags of the application whose ID is exactly {@code applicationId} to {@code tags}, * removing any other key, as a CloudFormation create or update of {@code Tags} does; {@code tags} diff --git a/src/main/java/io/floci/aws/services/appconfig/AppConfigTagHandler.java b/src/main/java/io/floci/aws/services/appconfig/AppConfigTagHandler.java index d88617c38b..90dfcbb545 100644 --- a/src/main/java/io/floci/aws/services/appconfig/AppConfigTagHandler.java +++ b/src/main/java/io/floci/aws/services/appconfig/AppConfigTagHandler.java @@ -53,6 +53,8 @@ public class AppConfigTagHandler implements TagHandler { return switch (ref.type()) { case "application" -> service.getApplicationTags(ref.id()); case "environment" -> service.getEnvironmentTags(ref.applicationId(), ref.id()); + case "configurationprofile" -> service.getConfigurationProfileTags(ref.applicationId(), ref.id()); + case "deploymentstrategy" -> service.getDeploymentStrategyTags(ref.id()); default -> Map.of(); }; } @@ -60,20 +62,24 @@ public class AppConfigTagHandler implements TagHandler { @Override public void tagResource(String region, String arn, Map tags) { ResourceRef ref = parseArn(arn); - if ("application".equals(ref.type())) { - service.tagApplication(ref.id(), tags); - } else if ("environment".equals(ref.type())) { - service.tagEnvironment(ref.applicationId(), ref.id(), tags); + switch (ref.type()) { + case "application" -> service.tagApplication(ref.id(), tags); + case "environment" -> service.tagEnvironment(ref.applicationId(), ref.id(), tags); + case "configurationprofile" -> service.tagConfigurationProfile(ref.applicationId(), ref.id(), tags); + case "deploymentstrategy" -> service.tagDeploymentStrategy(ref.id(), tags); + default -> { } } } @Override public void untagResource(String region, String arn, List tagKeys) { ResourceRef ref = parseArn(arn); - if ("application".equals(ref.type())) { - service.untagApplication(ref.id(), tagKeys); - } else if ("environment".equals(ref.type())) { - service.untagEnvironment(ref.applicationId(), ref.id(), tagKeys); + switch (ref.type()) { + case "application" -> service.untagApplication(ref.id(), tagKeys); + case "environment" -> service.untagEnvironment(ref.applicationId(), ref.id(), tagKeys); + case "configurationprofile" -> service.untagConfigurationProfile(ref.applicationId(), ref.id(), tagKeys); + case "deploymentstrategy" -> service.untagDeploymentStrategy(ref.id(), tagKeys); + default -> { } } } diff --git a/src/main/java/io/floci/aws/services/appconfig/model/ConfigurationProfile.java b/src/main/java/io/floci/aws/services/appconfig/model/ConfigurationProfile.java index b29df854ec..7f6177221f 100644 --- a/src/main/java/io/floci/aws/services/appconfig/model/ConfigurationProfile.java +++ b/src/main/java/io/floci/aws/services/appconfig/model/ConfigurationProfile.java @@ -4,6 +4,9 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; +import java.util.HashMap; +import java.util.Map; + @RegisterForReflection @JsonIgnoreProperties(ignoreUnknown = true) public class ConfigurationProfile { @@ -19,6 +22,7 @@ public class ConfigurationProfile { private String locationUri; @JsonProperty("Type") private String type; // AWS.AppConfig.FeatureFlags, AWS.Freeform + private Map tags = new HashMap<>(); public ConfigurationProfile() {} @@ -39,4 +43,7 @@ public class ConfigurationProfile { public String getType() { return type; } public void setType(String type) { this.type = type; } + + public Map getTags() { return tags; } + public void setTags(Map tags) { this.tags = tags != null ? tags : new HashMap<>(); } } diff --git a/src/main/java/io/floci/aws/services/appconfig/model/DeploymentStrategy.java b/src/main/java/io/floci/aws/services/appconfig/model/DeploymentStrategy.java index b1b8ee9929..fd73c5829b 100644 --- a/src/main/java/io/floci/aws/services/appconfig/model/DeploymentStrategy.java +++ b/src/main/java/io/floci/aws/services/appconfig/model/DeploymentStrategy.java @@ -4,6 +4,9 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import io.quarkus.runtime.annotations.RegisterForReflection; +import java.util.HashMap; +import java.util.Map; + @RegisterForReflection @JsonIgnoreProperties(ignoreUnknown = true) public class DeploymentStrategy { @@ -23,6 +26,7 @@ public class DeploymentStrategy { private String growthType; // LINEAR, EXPONENTIAL @JsonProperty("ReplicateTo") private String replicateTo; // NONE, SSM_DOCUMENT + private Map tags = new HashMap<>(); public DeploymentStrategy() {} @@ -49,4 +53,7 @@ public class DeploymentStrategy { public String getReplicateTo() { return replicateTo; } public void setReplicateTo(String replicateTo) { this.replicateTo = replicateTo; } + + public Map getTags() { return tags; } + public void setTags(Map tags) { this.tags = tags != null ? tags : new HashMap<>(); } } diff --git a/src/test/java/io/floci/aws/services/appconfig/AppConfigIntegrationTest.java b/src/test/java/io/floci/aws/services/appconfig/AppConfigIntegrationTest.java index b32c1219ce..9f26ac45e1 100644 --- a/src/test/java/io/floci/aws/services/appconfig/AppConfigIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/appconfig/AppConfigIntegrationTest.java @@ -13,6 +13,7 @@ import org.junit.jupiter.api.TestMethodOrder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.util.Map; import static io.restassured.RestAssured.given; import static org.hamcrest.Matchers.*; @@ -549,8 +550,9 @@ class AppConfigIntegrationTest { // deploymentstrategy/extension/extensionassociation are real, taggable AppConfig resource // types per the API. Unlike environment/deployment above, their ARNs don't nest under // application/..., so they need their own top-level branch in AppConfigTagHandler#parseArn. - // Regression coverage for that ARN-shape acceptance. Floci stores tags for applications and - // environments only, so tagging these is accepted and not stored, and only 200-not-400 is asserted. + // Regression coverage for that ARN-shape acceptance, so only 200-not-400 is asserted here. Floci + // does not implement extensions, so their tags are accepted and not stored; deployment strategy + // tags are stored (aDeploymentStrategyKeepsItsTags). @Test @Order(24) void listTagsForDeploymentStrategyArnIsAcceptedNotRejected() { @@ -1414,6 +1416,69 @@ class AppConfigIntegrationTest { .body("Tags.Team", equalTo("a")); } + /** A configuration profile keeps its create-time Tags and those TagResource adds, and answers leave them out. */ + @Test @Order(67) + void aConfigurationProfileKeepsItsTags() { + String taggedProfileId = given() + .contentType(ContentType.JSON) + .body("{\"Name\": \"tagged-profile\", \"LocationUri\": \"hosted\", \"Tags\": {\"Team\": \"a\"}}") + .when().post("/applications/" + appId + "/configurationprofiles") + .then().statusCode(201) + .body("$", not(hasKey("tags"))) + .extract().path("Id"); + given().when().get("/applications/" + appId + "/configurationprofiles/" + taggedProfileId) + .then().statusCode(200) + .body("$", not(hasKey("tags"))); + given().when().get("/applications/" + appId + "/configurationprofiles") + .then().statusCode(200) + .body("Items.find { it.Id == '" + taggedProfileId + "' }", not(hasKey("tags"))); + + assertTagsRoundTrip("arn:aws:appconfig:us-east-1:000000000000:application/" + appId + + "/configurationprofile/" + taggedProfileId); + + given().when().delete("/applications/" + appId + "/configurationprofiles/" + taggedProfileId) + .then().statusCode(204); + } + + /** A deployment strategy keeps its create-time Tags and those TagResource adds, and answers leave them out. */ + @Test @Order(68) + void aDeploymentStrategyKeepsItsTags() { + String taggedStrategyId = given() + .contentType(ContentType.JSON) + .body("{\"Name\": \"tagged-strategy\", \"DeploymentDurationInMinutes\": 0, " + + "\"GrowthFactor\": 100, \"ReplicateTo\": \"NONE\", \"Tags\": {\"Team\": \"a\"}}") + .when().post("/deploymentstrategies") + .then().statusCode(201) + .body("$", not(hasKey("tags"))) + .extract().path("Id"); + given().when().get("/deploymentstrategies/" + taggedStrategyId) + .then().statusCode(200) + .body("$", not(hasKey("tags"))); + given().when().get("/deploymentstrategies") + .then().statusCode(200) + .body("Items.find { it.Id == '" + taggedStrategyId + "' }", not(hasKey("tags"))); + + assertTagsRoundTrip("arn:aws:appconfig:us-east-1:000000000000:deploymentstrategy/" + taggedStrategyId); + + given().when().delete("/deployementstrategies/" + taggedStrategyId).then().statusCode(204); + } + + /** The resource {@code arn} names was created with Team=a: TagResource adds a tag, UntagResource removes one. */ + private static void assertTagsRoundTrip(String arn) { + given().urlEncodingEnabled(false).when().get(tagsPath(arn)) + .then().statusCode(200) + .body("Tags", equalTo(Map.of("Team", "a"))); + given().urlEncodingEnabled(false).contentType(ContentType.JSON) + .body("{\"Tags\": {\"env\": \"local\"}}") + .when().post(tagsPath(arn)) + .then().statusCode(204); + given().urlEncodingEnabled(false).when().delete(tagsPath(arn) + "?tagKeys=Team") + .then().statusCode(204); + given().urlEncodingEnabled(false).when().get(tagsPath(arn)) + .then().statusCode(200) + .body("Tags", equalTo(Map.of("env", "local"))); + } + /** The modeled {@code /tags/{ResourceArn}} for an ARN, encoded as one path segment as an SDK sends it. */ private static String tagsPath(String arn) { return "/tags/" + URLEncoder.encode(arn, StandardCharsets.UTF_8); diff --git a/src/test/java/io/floci/aws/services/appconfig/AppConfigStoredTagsServiceTest.java b/src/test/java/io/floci/aws/services/appconfig/AppConfigStoredTagsServiceTest.java index 71b65fced8..52faa3ce12 100644 --- a/src/test/java/io/floci/aws/services/appconfig/AppConfigStoredTagsServiceTest.java +++ b/src/test/java/io/floci/aws/services/appconfig/AppConfigStoredTagsServiceTest.java @@ -47,4 +47,32 @@ class AppConfigStoredTagsServiceTest { assertEquals(Map.of(), service.storedTags(environment.replace(ACCOUNT, "111111111111"))); assertEquals(Map.of(), service.storedTags(environment.replace(REGION, "us-west-2"))); } + + @Test + void storedTagsReadTheConfigurationProfileTheArnNamesInItsApplicationAccountAndRegion() { + String appId = service.createApplication(Map.of("Name", "app")).getId(); + String otherAppId = service.createApplication(Map.of("Name", "other")).getId(); + String profileId = service.createConfigurationProfile(appId, Map.of("Name", "profile", + "LocationUri", "hosted", "Tags", Map.of("Protected", "true"))).getId(); + String profile = "arn:aws:appconfig:" + REGION + ":" + ACCOUNT + ":application/" + appId + + "/configurationprofile/" + profileId; + + assertEquals(Map.of("Protected", "true"), service.storedTags(profile)); + assertEquals(Map.of(), service.storedTags(profile.replace(appId, otherAppId))); + assertEquals(Map.of(), service.storedTags(profile.replace(ACCOUNT, "111111111111"))); + assertEquals(Map.of(), service.storedTags(profile.replace(REGION, "us-west-2"))); + } + + @Test + void storedTagsReadTheDeploymentStrategyTheArnNamesInItsAccountAndRegion() { + String strategyId = service.createDeploymentStrategy(Map.of("Name", "strategy", + "Tags", Map.of("Protected", "true"))).getId(); + String strategy = "arn:aws:appconfig:" + REGION + ":" + ACCOUNT + ":deploymentstrategy/" + strategyId; + + assertEquals(Map.of("Protected", "true"), service.storedTags(strategy)); + assertEquals(Map.of(), service.storedTags(strategy.replace(ACCOUNT, "111111111111"))); + assertEquals(Map.of(), service.storedTags(strategy.replace(REGION, "us-west-2"))); + assertEquals(Map.of(), service.storedTags("arn:aws:appconfig:" + REGION + ":" + ACCOUNT + + ":deploymentstrategy/AppConfig.AllAtOnce")); + } }