From 739a22ab325db0491af9cc227e7aded09c0048d2 Mon Sep 17 00:00:00 2001 From: Priamo Germosen <6233424+pgermosen@users.noreply.github.com> Date: Sun, 22 Nov 2026 20:28:28 -0400 Subject: [PATCH] feat(iam): read KMS from the generated tables, its permissions from the developer guide (#9221) KMS is read from iam-request-resources.json now, and ResourceArnBuilder's KMS branch and the enforcement filter's call around the table are gone, leaving dynamodb and iam in HAND_BUILT. What botocore and the Service Reference do not say comes from the KMS documentation, vendored by fetch_kms_api_permissions.py into tools/aws/sources/kms-api-permissions.json and read under PERMISSION_SOURCES: the developer guide's permissions table, the API reference's sentence that Decrypt and ReEncrypt read their key from the ciphertext's metadata, and the guide's key identifier formats. - ReEncrypt is checked as kms:ReEncryptFrom on its source key, or the ciphertext's key without one, and kms:ReEncryptTo on its destination key, ReplicateKey as kms:ReplicateKey and kms:CreateKey. An operation checked as several actions records them (actions, action), which RequestResources.checkedAs reads and the filter checks. - CreateAlias, UpdateAlias and DeleteAlias are checked on the alias and the keys the table names, the alias's current key through the alias. - Decrypt with no KeyId is checked on the ciphertext's key. - KmsStoredResourceArns finds a key in any state, uses only an enabled one for a forwarded request, reaches the key of an alias, a grant or a ciphertext, and gives a key's tags. --- Makefile | 4 +- docs/services/kms.md | 10 +- .../aws/core/common/IamEnforcementFilter.java | 34 +- .../core/common/RequestResourceMembers.java | 31 +- .../aws/core/common/RequestResources.java | 36 +- .../aws/core/common/StoredResourceArns.java | 13 +- .../aws/services/iam/ResourceArnBuilder.java | 332 +------ .../io/floci/aws/services/kms/KmsService.java | 9 + .../services/kms/KmsStoredResourceArns.java | 48 +- .../resources/aws/iam-request-resources.json | 64 +- .../common/RequestResourceMembersTest.java | 38 + .../KmsKeyArnEnforcementIntegrationTest.java | 154 ++- .../services/iam/ResourceArnBuilderTest.java | 353 ++----- .../aws/services/kms/KmsKeyOfAccountTest.java | 50 +- tools/aws/fetch_kms_api_permissions.py | 237 +++++ tools/aws/regen_iam_request_resources.py | 294 +++++- tools/aws/sources/kms-api-permissions.json | 930 ++++++++++++++++++ tools/aws/test_fetch_kms_api_permissions.py | 117 +++ tools/aws/test_regen_iam_request_resources.py | 131 +++ 19 files changed, 2256 insertions(+), 629 deletions(-) create mode 100644 tools/aws/fetch_kms_api_permissions.py create mode 100644 tools/aws/sources/kms-api-permissions.json create mode 100644 tools/aws/test_fetch_kms_api_permissions.py diff --git a/Makefile b/Makefile index 5b0126e09e..e40e2593bc 100644 --- a/Makefile +++ b/Makefile @@ -627,7 +627,9 @@ IAM_REQUEST_RESOURCES_PATHS := src/main/resources/aws/iam-request-resources.json tools/aws/fetch_athena_glue_ddl_permissions.py tools/aws/test_fetch_athena_glue_ddl_permissions.py \ tools/aws/regen_iam_authorized_actions.py tools/aws/sources/s3-required-actions.json \ tools/aws/sources/apigateway-arn-formats.json tools/aws/fetch_apigateway_arn_formats.py \ - tools/aws/test_fetch_apigateway_arn_formats.py src/main/resources/aws/iam-authorized-actions.json + tools/aws/test_fetch_apigateway_arn_formats.py src/main/resources/aws/iam-authorized-actions.json \ + tools/aws/sources/kms-api-permissions.json tools/aws/fetch_kms_api_permissions.py \ + tools/aws/test_fetch_kms_api_permissions.py iam-data-verify: ## CI gate (online): every vendored IAM file must still match AWS; CHANGED="" checks only the ones they cover @# Every check runs even when an earlier one fails, so one file's drift cannot hide another's diff --git a/docs/services/kms.md b/docs/services/kms.md index 614215a744..9068e8e01f 100644 --- a/docs/services/kms.md +++ b/docs/services/kms.md @@ -250,9 +250,15 @@ Grant lifecycle operations (`CreateGrant`, `ListGrants`, `ListRetirableGrants`, ## IAM Enforcement -With `FLOCI_SERVICES_IAM_ENFORCEMENT_ENABLED=true`, an operation that names a key is evaluated against that key's ARN, as on AWS. A `KeyId` given as a key id, an alias name, an alias ARN or a key ARN resolves to the key it names, so a policy scoped to one key ARN allows that key and no other, and a `Deny` scoped to one fires for that key. A `Decrypt` that names no `KeyId` is evaluated against the key that encrypted its `CiphertextBlob`. +With `FLOCI_SERVICES_IAM_ENFORCEMENT_ENABLED=true`, a KMS request is checked as AWS checks it, read from the generated tables like other services' requests. An operation that names a key is evaluated against that key's ARN. A `KeyId` given as a key id, an alias name, an alias ARN or a key ARN resolves to the key it names, whatever the key's state, so a policy scoped to one key ARN allows that key and no other, and a `Deny` scoped to one fires for that key. A key KMS holds none of is checked on its id in the request's partition. A `Decrypt` that names no `KeyId` is evaluated against the key that encrypted its `CiphertextBlob`, as the [API reference](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) says KMS reads it from the ciphertext's metadata. A request whose ciphertext names no key KMS holds is checked on `*`. -`CreateAlias`, `UpdateAlias` and `DeleteAlias` are evaluated against the alias ARN and the key it points at, `UpdateAlias` also against the key it will point at, the two resource types the Service Authorization Reference lists for them. `ReEncrypt` is evaluated against both keys it acts on, under the single `kms:ReEncrypt` action: the source its `SourceKeyId` names, or when it names none the key that encrypted its `CiphertextBlob` (never a `KeyId`, which the operation does not read), and the destination its `DestinationKeyId` names. AWS authorizes the two halves separately as `kms:ReEncryptFrom` and `kms:ReEncryptTo`, which Floci does not split yet. The grant operations name the key the grant they act on belongs to: a `RetireGrant` carrying a `GrantToken` the key that grant belongs to, since the handler finds the grant by the token alone, and a `RetireGrant` or `RevokeGrant` identifying its grant by `KeyId` and `GrantId` the key it names together with the key that grant belongs to. A request nothing resolves keeps the permissive `key/*` pattern, and the operation then fails with its own error. `CreateKey`, `GenerateRandom`, `ListKeys`, `ListAliases` and `ListRetirableGrants` name no key resource and are evaluated against `*`, the resource a policy must name for them on AWS too. +Where an operation acts on several resources, the developer guide's [permissions table](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) says which: + +- `ReEncrypt` is checked as `kms:ReEncryptFrom` on the key it decrypts with, its `SourceKeyId` or else the key that encrypted its `CiphertextBlob`, and as `kms:ReEncryptTo` on its `DestinationKeyId`. There is no `kms:ReEncrypt` permission; `kms:ReEncrypt*` grants both. +- `CreateAlias` is checked on the alias and the key it associates, `UpdateAlias` on the alias, the key it will point at and the key it points at now, and `DeleteAlias` on the alias and the key it points at. An alias name, `alias/ExampleAlias`, is the alias ARN's resource: `arn:aws:kms:::alias/ExampleAlias`. +- `ReplicateKey` is checked as `kms:ReplicateKey` on the primary key and as `kms:CreateKey`. + +`RevokeGrant`, `RetireGrant` and `ListGrants` are evaluated against the key their `KeyId` names and the key the grant their `GrantId` names is on. A `RetireGrant` that names its grant by `GrantToken` alone names no key and is checked on `*`. `CreateKey`, `GenerateRandom`, `ListKeys`, `ListAliases`, `ListRetirableGrants` and the custom key store operations name no key resource and are evaluated against `*`, as on AWS. The `aws:ResourceTag/` condition key holds the tags of the key a request is checked on. A key's policy is evaluated as its resource policy. An explicit `Deny` in it refuses the request, and an `Allow` naming the caller grants it. A key in another account needs both its key policy and the caller's own policies to allow the request. An `Allow` naming only the account, as the default key policy's does, leaves the decision to the account's IAM policies. Floci deviates from AWS here: a same-account identity policy grants access even when the key policy does not name the account, while AWS requires the key policy to allow it. diff --git a/src/main/java/io/floci/aws/core/common/IamEnforcementFilter.java b/src/main/java/io/floci/aws/core/common/IamEnforcementFilter.java index 0656aa1a8f..cb19f64067 100644 --- a/src/main/java/io/floci/aws/core/common/IamEnforcementFilter.java +++ b/src/main/java/io/floci/aws/core/common/IamEnforcementFilter.java @@ -519,7 +519,7 @@ public class IamEnforcementFilter implements ContainerRequestFilter { } List resources = resolveResourceArns(credentialScope, - targetResources(credentialScope, action, resolvedOperation.operation(), ctx, region, accountId)); + targetResources(credentialScope, resolvedOperation.operation(), ctx, region, accountId)); Optional presignedScope = iamService.presignedScope(akid); if (presignedScope.isPresent()) { @@ -612,8 +612,24 @@ public class IamEnforcementFilter implements ContainerRequestFilter { } return; } - if (abortIfDenied(ctx, caller, principal, action, credentialScope, resources, targetContexts, - region, accountId, akid)) { + // An operation AWS authorizes by several actions (KMS's ReEncrypt, by kms:ReEncryptFrom on the key it decrypts + // with and kms:ReEncryptTo on the one it encrypts with) is checked as each on the resources the table gives + // it, with that action's condition keys, and not as the operation's own. + Map> checkedAs = arnBuilder.checkedAs(credentialScope, resolvedOperation.operation(), ctx, + region, accountId, requestPartition()); + for (Map.Entry> checked : checkedAs.entrySet()) { + Map> resolved = + conditionContextResolver.resolve(credentialScope, checked.getKey(), ctx); + Map> checkedContext = resolved == null ? new HashMap<>() : new HashMap<>(resolved); + callerArns.ifPresent(arns -> arns.putPrincipalKeys(checkedContext)); + if (abortIfDenied(ctx, caller, principal, checked.getKey(), action, credentialScope, + resolveResourceArns(credentialScope, checked.getValue()), List.of(checkedContext), region, + accountId, akid)) { + return; + } + } + if (checkedAs.isEmpty() && abortIfDenied(ctx, caller, principal, action, credentialScope, resources, + targetContexts, region, accountId, akid)) { return; } if (abortIfRolePassDenied(ctx, caller, principal, callerArns.orElse(null), action, credentialScope, @@ -1787,15 +1803,11 @@ public class IamEnforcementFilter implements ContainerRequestFilter { } /** - * KMS targets depend on the serving operation and the request's partition, and the targets of a namespace the - * table of request resources reads on {@code operation}, the one the request is dispatched as (see - * {@link RequestResources}). + * The targets of a request, which the table of request resources reads on {@code operation}, the one the request + * is dispatched as, for a namespace it reads (see {@link RequestResources}). */ - private List targetResources(String credentialScope, String action, String operation, - ContainerRequestContext ctx, String region, String accountId) { - if ("kms".equals(credentialScope)) { - return arnBuilder.buildKmsResources(action, ctx, region, accountId, requestPartition()); - } + private List targetResources(String credentialScope, String operation, ContainerRequestContext ctx, + String region, String accountId) { // ARNs the table renders take the request's partition, which a Region Floci does not know cannot be mapped to. return arnBuilder.buildResources(credentialScope, operation, ctx, region, accountId, requestPartition()); } diff --git a/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java b/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java index 2e6498f941..995226ea51 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java +++ b/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java @@ -2,10 +2,12 @@ package io.floci.aws.core.common; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; +import java.util.Collections; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; @@ -340,7 +342,10 @@ final class RequestResourceMembers { * client ({@code locatedApart}), whose vendored route tells a request's client. Each operation's {@code forwarded} * requests are those its service makes to another as the caller, and its {@code statements} those it makes as the * caller to run each statement its request may carry. An {@code unread} operation names what it acts on in a body - * the reader does not read. + * the reader does not read. An operation AWS authorizes by several actions, none of its own name, has its + * resources under the one each is checked as ({@code checkedAs}, in the order the file gives the actions: KMS's + * ReEncrypt, {@code kms:ReEncryptFrom} on its source key and {@code kms:ReEncryptTo} on its destination key), and + * none in {@code operations}. */ record Table(Map> operations, Map> types, Map> creates, Map> makes, @@ -351,7 +356,8 @@ final class RequestResourceMembers { Map>> resourceKeys, Set namespaces, Set handBuilt, Set notCovered, Set otherNamespaces, Map> forwarded, Map>> statements, - Map>> locatedApart, Set unread) { + Map>> locatedApart, Set unread, + Map>> checkedAs) { } private static final class Holder { @@ -454,6 +460,7 @@ final class RequestResourceMembers { }); Map>> resourceKeys = resourceKeys(document, formats); Map> entries = new LinkedHashMap<>(); + Map>> checkedAs = new LinkedHashMap<>(); Map> actsOn = new LinkedHashMap<>(); Map> creates = new LinkedHashMap<>(); Map> makes = new LinkedHashMap<>(); @@ -471,10 +478,26 @@ final class RequestResourceMembers { + ", of no namespace it reads"); } List resources = new ArrayList<>(); + // An operation checked as several actions has each resource checked as one of them. + Map> byAction = new LinkedHashMap<>(); + operation.getValue().path("actions").propertyStream() + .forEach(action -> byAction.put(action.getKey(), new ArrayList<>())); for (JsonNode resource : operation.getValue().path("resources")) { - resources.add(resource(operation.getKey(), resource, formats.getOrDefault(namespace, Map.of()))); + String action = resource.path("action").asText(null); + if (byAction.isEmpty() != (action == null) || action != null && !byAction.containsKey(action)) { + throw new IllegalStateException(RESOURCE_NAME + " checks a resource of " + operation.getKey() + + " as " + action + ", none of the actions it records for the operation"); + } + (action == null ? resources : byAction.get(action)).add(resource(operation.getKey(), + action == null ? resource : ((ObjectNode) resource.deepCopy()).without("action"), + formats.getOrDefault(namespace, Map.of()))); } entries.put(operation.getKey(), List.copyOf(resources)); + if (!byAction.isEmpty()) { + Map> actions = new LinkedHashMap<>(); + byAction.forEach((action, named) -> actions.put(action, List.copyOf(named))); + checkedAs.put(operation.getKey(), Collections.unmodifiableMap(actions)); + } List types = operation.getValue().path("types").valueStream().map(JsonNode::asText).toList(); actsOn.put(operation.getKey(), types); List made = new ArrayList<>(); @@ -606,7 +629,7 @@ final class RequestResourceMembers { names(document.path("handBuilt")), Set.copyOf(document.path("notCovered").propertyStream().map(Map.Entry::getKey).toList()), names(document.path("otherNamespaces")), Map.copyOf(forwarded), statements(document, formats), - Map.copyOf(locatedApart), Set.copyOf(unread)); + Map.copyOf(locatedApart), Set.copyOf(unread), Map.copyOf(checkedAs)); } /** diff --git a/src/main/java/io/floci/aws/core/common/RequestResources.java b/src/main/java/io/floci/aws/core/common/RequestResources.java index 8038bf1b24..9190610dac 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResources.java +++ b/src/main/java/io/floci/aws/core/common/RequestResources.java @@ -9,9 +9,11 @@ import jakarta.ws.rs.container.ContainerRequestContext; import jakarta.ws.rs.core.MultivaluedMap; import java.util.ArrayList; +import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Locale; @@ -200,6 +202,35 @@ public final class RequestResources { : named(operation, resources, formats(table, operation), form, body, partition, region, accountId, stored); } + /** + * The actions an operation AWS authorizes by several actions, none of its own name, is checked as instead of its + * own, each with the ARNs of the resources the request names that it is checked on, as {@link #of} reads them: + * KMS's ReEncrypt, {@code kms:ReEncryptFrom} on its source key and {@code kms:ReEncryptTo} on its destination key. + * An action the request names no resource of is checked on {@code *}. Empty for every other operation, which is + * checked as its own action on what {@link #of} gives. + */ + public static Map> checkedAs(String operation, ContainerRequestContext ctx, String partition, + String region, String accountId, StoredResourceArns stored, + Map labels) { + RequestResourceMembers.Table table = RequestResourceMembers.table(); + Map> actions = !readable(table, operation) ? null + : table.checkedAs().get(operation); + if (actions == null) { + return Map.of(); + } + Map sent = IamConditionContextResolver.formParameters(ctx); + JsonNode body = sent.isEmpty() ? located(table, operation, PassedRoles.jsonBody(ctx), ctx, labels) : null; + Map form = ec2Query(table, operation, located(table, operation, sent, ctx, labels)); + Map> checked = new LinkedHashMap<>(); + actions.forEach((action, resources) -> { + List read = served(resources, ctx); + List arns = read.isEmpty() ? List.of() : named(operation, read, formats(table, operation), form, + body, partition, region, accountId, stored); + checked.put(action, arns.isEmpty() ? List.of("*") : arns); + }); + return Collections.unmodifiableMap(checked); + } + /** * The ARNs of the resources a JSON request body names, for a call that is not an HTTP request of its own, as a * state machine's task to its integrated service: as {@link #of} reads the same request, whatever endpoint it @@ -235,7 +266,8 @@ public final class RequestResources { * resources the request is checked on: for each of {@code resources} of the type whose record holds what the * action acts on, the resource that record's member names, as the action's service finds it in the account and * Region of the ARN, the caller's ({@code find}) or another's ({@code findInAccount}), or the value itself, not - * held, when it finds none. None for a resource whose service records nothing there (a snapshot under AWS's own + * held, when it finds none or one it does not act on for such a request ({@link StoredResourceArns#usable}: a + * disabled key). None for a resource whose service records nothing there (a snapshot under AWS's own * key records no key of the account's), or one whose policy lets every principal of its account have the service * act on it ({@link StoredResourceArns#grantsItsAccountThroughServices}: an AWS managed key). {@code held} is the * operation's service, and {@code services} gives the action's. @@ -268,7 +300,7 @@ public final class RequestResources { Optional target = arn.accountId().equals(accountId) ? service.find(use.type(), List.of(named.get()), arn.region()) : service.findInAccount(use.type(), List.of(named.get()), arn.accountId(), arn.region()); - if (target.isEmpty()) { + if (target.isEmpty() || !service.usable(target.get())) { found.add(new Forwarded(use.action(), named.get(), use.viaService(), use.endpoint(), false)); } else if (!service.grantsItsAccountThroughServices(target.get())) { found.add(new Forwarded(use.action(), target.get(), use.viaService(), use.endpoint(), true)); diff --git a/src/main/java/io/floci/aws/core/common/StoredResourceArns.java b/src/main/java/io/floci/aws/core/common/StoredResourceArns.java index 627393e01d..80d9deec9b 100644 --- a/src/main/java/io/floci/aws/core/common/StoredResourceArns.java +++ b/src/main/java/io/floci/aws/core/common/StoredResourceArns.java @@ -23,7 +23,9 @@ import java.util.Optional; *

Implemented by the service that owns such resources or whose requests name them (EventBridge, for its * connections and API destinations; Application Auto Scaling, for its scalable targets and their tags; Redshift * Data, for the Redshift Serverless workgroups it runs statements on and the targets of its sessions; Payment - * Cryptography, for the key an alias names and the tags of a key; EMR, for the clusters of its instance groups and a + * Cryptography, for the key an alias names and the tags of a key; KMS, for the key an id, an alias or an + * ARN names, the key an alias points at, a grant is on or a ciphertext was encrypted under, and the tags of a key; + * EMR, for the clusters of its instance groups and a * tag call's resource and the tags of a cluster or a session; IAM Identity Center, for the accounts its permission * sets are provisioned to and the tags of an instance, * a permission set, an application or a trusted token issuer; Resource Explorer, for its default view and the tags @@ -137,6 +139,15 @@ public interface StoredResourceArns { return copy; } + /** + * Whether the service acts on the resource {@code arn} names, one {@link #find} gave, for a request another service + * forwards as the caller: false for a KMS key disabled or pending deletion, which KMS refuses such a request with, + * as for a resource it does not hold. True for any other. + */ + default boolean usable(String arn) { + return true; + } + /** * Whether the resource {@code arn} names, one {@link #find} gave, lets every principal of its account have a * service act on it through that service, as the key policy AWS writes for an AWS managed KMS key does: a request diff --git a/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java b/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java index e3f00b82c3..ed80ca6704 100644 --- a/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java +++ b/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java @@ -2,9 +2,7 @@ package io.floci.aws.services.iam; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.MissingNode; import io.floci.aws.core.common.AwsArnUtils; -import io.floci.aws.core.common.AwsException; import io.floci.aws.core.common.AwsQueryServiceResolver; import io.floci.aws.core.common.AwsRegions; import io.floci.aws.core.common.RequestPathLabels; @@ -12,7 +10,6 @@ import io.floci.aws.core.common.RequestResources; import io.floci.aws.core.common.ServicePrincipals; import io.floci.aws.core.common.SigV4CredentialScope; import io.floci.aws.core.common.StoredResourceArns; -import io.floci.aws.services.kms.KmsService; import jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Instance; import jakarta.inject.Inject; @@ -57,8 +54,6 @@ public class ResourceArnBuilder { * which IamService itself does not depend on, and a direct injection would close that loop. */ private final Instance iamService; - /** Looked up lazily for the same reason, to resolve a key named by an id, an alias or an ARN to its stored ARN. */ - private final Instance kmsService; /** * Looked up lazily for the same reason, to read the ARN a resource the request-resources table names by a name * its service follows with a minted id, or by members its minted ARN does not hold, is stored under. @@ -72,25 +67,17 @@ public class ResourceArnBuilder { @Inject public ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService, - Instance kmsService, Instance storedResourceArns, Instance requestPathLabels) { this.objectMapper = objectMapper; this.iamService = iamService; - this.kmsService = kmsService; this.storedResourceArns = storedResourceArns; this.requestPathLabels = requestPathLabels; } public ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService, - Instance kmsService, Instance storedResourceArns) { - this(objectMapper, iamService, kmsService, storedResourceArns, null); - } - - public ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService, - Instance kmsService) { - this(objectMapper, iamService, kmsService, null); + this(objectMapper, iamService, storedResourceArns, null); } ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService) { @@ -98,11 +85,11 @@ public class ResourceArnBuilder { } public ResourceArnBuilder() { - this(new ObjectMapper(), null, null); + this(new ObjectMapper(), null); } public ResourceArnBuilder(ObjectMapper objectMapper) { - this(objectMapper, null, null); + this(objectMapper, null); } public String build(String credentialScope, ContainerRequestContext ctx, @@ -157,17 +144,41 @@ public class ResourceArnBuilder { if (operation == null || !operation.startsWith(credentialScope + ":")) { return List.of("*"); } + List named = RequestResources.of(operation, ctx, partition, region, accountId, + storedResourceArns(credentialScope), labels(credentialScope, ctx)); + return named.isEmpty() ? List.of("*") : named; + } + + /** + * The actions an operation AWS authorizes by several actions is checked as instead of its own, each with the + * resources the request names that it is checked on (see {@link RequestResources#checkedAs}), read as + * {@link #buildResources} reads the others: KMS's ReEncrypt, {@code kms:ReEncryptFrom} on its source key and + * {@code kms:ReEncryptTo} on its destination key. Empty for every other operation. + */ + public Map> checkedAs(String credentialScope, String operation, ContainerRequestContext ctx, + String region, String accountId, String partition) { + if (credentialScope == null || operation == null || !operation.startsWith(credentialScope + ":") + || !RequestResources.reads(operation)) { + return Map.of(); + } + return RequestResources.checkedAs(operation, ctx, partition, region, accountId, + storedResourceArns(credentialScope), labels(credentialScope, ctx)); + } + + /** + * The labels of the request's path, as the route it was routed by gives them, each read as the namespace's + * {@link RequestPathLabels} reads it where it reads one otherwise. + */ + private Map labels(String credentialScope, ContainerRequestContext ctx) { Map labels = IamActionRegistry.pathLabels(credentialScope, ctx); RequestPathLabels read = requestPathLabels(credentialScope); Map otherwise = read == null ? Map.of() : read.labels(ctx, labels); - if (!otherwise.isEmpty()) { - Map merged = new HashMap<>(labels); - merged.putAll(otherwise); - labels = Map.copyOf(merged); + if (otherwise.isEmpty()) { + return labels; } - List named = RequestResources.of(operation, ctx, partition, region, accountId, - storedResourceArns(credentialScope), labels); - return named.isEmpty() ? List.of("*") : named; + Map merged = new HashMap<>(labels); + merged.putAll(otherwise); + return Map.copyOf(merged); } /** The registered reader of the namespace's path labels; null when there is none. */ @@ -929,281 +940,6 @@ public class ResourceArnBuilder { return AwsArnUtils.Arn.of("dynamodb", region, accountId, "table/" + tableName).toString(); } - // ── KMS ────────────────────────────────────────────────────────────────────── - - /** - * The resources a KMS request is evaluated against, as the KMS permissions reference gives - * them (Developer Guide, "AWS KMS permissions"). A key-scoped operation, which is every - * crypto operation and every key-management one Floci dispatches, is evaluated against the - * key its {@code KeyId} names, resolving an alias name or an alias ARN to the key it points - * at exactly as the handler resolves it. {@code Decrypt} names its key in an optional - * {@code KeyId}; without one the key is the one that encrypted the {@code CiphertextBlob}, - * read out of the blob the same way the handler reads it. - * - *

{@code CreateKey}, {@code GenerateRandom}, {@code ListKeys}, {@code ListAliases} and - * {@code ListRetirableGrants} apply to no particular resource, so they stay at {@code *}, - * the element the reference itself requires a policy to name for them. The alias operations - * name their resources the way the alias permissions page gives them: {@code CreateAlias} - * the alias and the key, {@code UpdateAlias} the alias, the key it points at and the key it - * will point at, and {@code DeleteAlias} the alias and the key it points at. - * - *

{@code ReEncrypt} is a stopgap here: AWS authorizes it as {@code kms:ReEncryptFrom} on - * the source key and {@code kms:ReEncryptTo} on the destination, while this evaluates the - * single {@code kms:ReEncrypt} action against both keys, so a policy naming either action - * AWS publishes still binds to nothing. The source is the key its optional - * {@code SourceKeyId} names and otherwise the key that encrypted the - * {@code CiphertextBlob}, never a {@code KeyId} member, which the handler does not read on - * {@code ReEncrypt}. - * - *

The grant operations name the key the grant they act on belongs to, the way the handler - * resolves it: a {@code RetireGrant} carrying a {@code GrantToken} the key the grant it - * names belongs to, a {@code RetireGrant} or a {@code RevokeGrant} identifying its grant by - * {@code KeyId} and {@code GrantId} the key it names together with the key that grant - * belongs to. They coincide for a request naming a grant on its own key; naming both closes - * the pair that names one key while retiring or revoking another key's grant. - * - *

A request nothing resolves names every key the account holds, which the permissive - * {@code key/*} pattern a policy may scope to still matches; the operation then fails in the - * handler with its own {@code NotFoundException}. - */ - public List buildKmsResources(String action, ContainerRequestContext ctx, - String region, String accountId, String partition) { - JsonNode body = readJsonBody(ctx); - if (body == null) { - body = MissingNode.getInstance(); - } - return switch (action) { - case "kms:CreateKey", "kms:GenerateRandom", "kms:ListKeys", "kms:ListAliases", - "kms:ListRetirableGrants" -> List.of("*"); - case "kms:CreateAlias" -> createAliasTargets(body, region, accountId, partition); - case "kms:UpdateAlias" -> updateAliasTargets(body, region, accountId, partition); - case "kms:DeleteAlias" -> deleteAliasTargets(body, region, accountId, partition); - case "kms:Decrypt" -> List.of(decryptTarget(body, region, accountId, partition)); - case "kms:ReEncrypt" -> reEncryptTargets(body, region, accountId, partition); - case "kms:RetireGrant" -> retireGrantTargets(body, region, accountId, partition); - case "kms:RevokeGrant" -> revokeGrantTargets(body, region, accountId, partition); - default -> List.of(keyTarget(body, "KeyId", region, accountId, partition)); - }; - } - - /** The key a request names in {@code member}, or every key the account holds when it names none. */ - private String keyTarget(JsonNode body, String member, String region, String accountId, - String partition) { - String keyId = body.path(member).asText(null); - return keyId == null || keyId.isBlank() - ? keyWildcard(region, accountId, partition) - : keyArn(keyId, region, accountId, partition); - } - - /** - * The key ARN a request's identifier names: the stored key's own ARN when the account holds - * it, in the partition it was created in; a key ARN the account holds nothing of as given, - * which is the caller's own naming of the key the operation will refuse; and a bare key id - * minted in the request's partition, the partition the create mints in. An alias that - * resolves to nothing names every key, since the operation then fails before a policy - * matters. - */ - private String keyArn(String keyIdOrAliasOrArn, String region, String accountId, String partition) { - if (kmsService != null) { - Optional stored = kmsService.get().findKeyArn(keyIdOrAliasOrArn, region); - if (stored.isPresent()) { - return stored.get(); - } - } - if (AwsArnUtils.isArnFor(keyIdOrAliasOrArn, "kms")) { - return keyIdOrAliasOrArn; - } - if (keyIdOrAliasOrArn.startsWith("alias/") || keyIdOrAliasOrArn.contains(":alias/")) { - return keyWildcard(region, accountId, partition); - } - return new AwsArnUtils.Arn(partition, "kms", region, accountId, - "key/" + keyIdOrAliasOrArn).toString(); - } - - /** - * The key a {@code Decrypt} names: the optional {@code KeyId} when the request carries one, - * and otherwise the key that encrypted the {@code CiphertextBlob}, which is the key the - * service decrypts with and answers. - */ - private String decryptTarget(JsonNode body, String region, String accountId, String partition) { - String keyId = body.path("KeyId").asText(null); - if (keyId != null && !keyId.isBlank()) { - return keyArn(keyId, region, accountId, partition); - } - return ciphertextKeyTarget(body, region, accountId, partition); - } - - /** - * The key that encrypted the request's {@code CiphertextBlob}, read out of the blob the - * same way the handler reads it, or every key the account holds when the blob names none - * the account holds. - */ - private String ciphertextKeyTarget(JsonNode body, String region, String accountId, String partition) { - JsonNode ciphertext = body.path("CiphertextBlob"); - if (kmsService != null && !ciphertext.isMissingNode() && !ciphertext.isNull()) { - if (!ciphertext.isTextual() && !ciphertext.isBinary()) { - return keyWildcard(region, accountId, partition); - } - byte[] blob; - try { - blob = ciphertext.binaryValue(); - } catch (IOException e) { - return keyWildcard(region, accountId, partition); - } - String keyArn = blob == null ? null : kmsService.get().decryptToKeyArn(blob, region); - if (keyArn != null) { - return keyArn; - } - } - return keyWildcard(region, accountId, partition); - } - - /** - * Both keys a {@code ReEncrypt} acts on: the source its optional {@code SourceKeyId} names - * and otherwise the key that encrypted the {@code CiphertextBlob}, which is the key the - * service decrypts with, and the destination its {@code DestinationKeyId} names. The - * handler never reads a {@code KeyId} on {@code ReEncrypt}, so neither does this. The - * filter authorizes a request once per resource, so the caller has to be allowed on both. - */ - private List reEncryptTargets(JsonNode body, String region, String accountId, - String partition) { - Set keys = new LinkedHashSet<>(); - String sourceKeyId = body.path("SourceKeyId").asText(null); - keys.add(sourceKeyId == null || sourceKeyId.isBlank() - ? ciphertextKeyTarget(body, region, accountId, partition) - : keyArn(sourceKeyId, region, accountId, partition)); - keys.add(keyTarget(body, "DestinationKeyId", region, accountId, partition)); - return new ArrayList<>(keys); - } - - /** - * The key a {@code RetireGrant} acts on, as the handler resolves it: the key the grant its - * {@code GrantToken} names belongs to, since the handler finds the grant by the token - * alone and only cross-verifies the other members against it, and for a request identifying - * its grant by {@code KeyId} and {@code GrantId} the key it names together with the key - * that grant belongs to, which the pair identifies for the handler. A token naming no - * grant the account holds keeps the permissive fallback; the handler refuses the request - * with its own {@code NotFoundException}. - */ - private List retireGrantTargets(JsonNode body, String region, String accountId, - String partition) { - String grantToken = body.path("GrantToken").asText(null); - if (grantToken != null && !grantToken.isBlank()) { - String grantKey = grantKeyArn(grantToken, body.path("GrantId").asText(null), region); - return grantKey == null - ? List.of(keyWildcard(region, accountId, partition)) - : List.of(grantKey); - } - Set resources = new LinkedHashSet<>(); - resources.add(keyTarget(body, "KeyId", region, accountId, partition)); - String grantKey = grantKeyArn(grantToken, body.path("GrantId").asText(null), region); - if (grantKey != null) { - resources.add(grantKey); - } - return new ArrayList<>(resources); - } - - /** - * The keys a {@code RevokeGrant} acts on: the key its {@code KeyId} names, which the - * handler resolves, and the key the grant its {@code GrantId} names belongs to, which the - * handler deletes. They coincide for a request naming a grant on its own key, and naming - * both closes the pair that names one key while revoking another key's grant. The - * handler never reads a {@code GrantToken} on {@code RevokeGrant}, so the grant resolves - * by its {@code GrantId} alone. - */ - private List revokeGrantTargets(JsonNode body, String region, String accountId, - String partition) { - Set resources = new LinkedHashSet<>(); - resources.add(keyTarget(body, "KeyId", region, accountId, partition)); - String grantKey = grantKeyArn(null, body.path("GrantId").asText(null), region); - if (grantKey != null) { - resources.add(grantKey); - } - return new ArrayList<>(resources); - } - - /** The stored ARN of the key the request's grant belongs to, or null when none resolves. */ - private String grantKeyArn(String grantToken, String grantId, String region) { - if (kmsService == null) { - return null; - } - return kmsService.get() - .findGrantKeyArn(grantToken, grantId, region) - .orElse(null); - } - - /** - * The alias and the key a {@code CreateAlias} names, as the alias permissions page requires - * the caller to hold {@code kms:CreateAlias} on both. - */ - private List createAliasTargets(JsonNode body, String region, String accountId, - String partition) { - Set resources = new LinkedHashSet<>(); - String aliasArn = aliasArn(body.path("AliasName").asText(null), region, accountId, partition); - if (aliasArn != null) { - resources.add(aliasArn); - } - resources.add(keyTarget(body, "TargetKeyId", region, accountId, partition)); - return new ArrayList<>(resources); - } - - /** - * The three resources an {@code UpdateAlias} acts on, as the alias permissions page lists - * them: the alias, the key it points at and the key it will point at. - */ - private List updateAliasTargets(JsonNode body, String region, String accountId, - String partition) { - Set resources = new LinkedHashSet<>(); - addAliasAndItsKey(resources, body, region, accountId, partition); - resources.add(keyTarget(body, "TargetKeyId", region, accountId, partition)); - return new ArrayList<>(resources); - } - - /** - * The alias and the key it points at, the two resources a {@code DeleteAlias} acts on. A - * request naming no alias AWS would accept the name of names nothing to authorize against - * but the wildcard, and the handler refuses it. - */ - private List deleteAliasTargets(JsonNode body, String region, String accountId, - String partition) { - Set resources = new LinkedHashSet<>(); - addAliasAndItsKey(resources, body, region, accountId, partition); - return resources.isEmpty() ? List.of("*") : new ArrayList<>(resources); - } - - /** - * The alias the request's {@code AliasName} names, and the key that alias points at when it - * resolves to one. Nothing is added for a name that is missing or that AWS would refuse. - */ - private void addAliasAndItsKey(Set resources, JsonNode body, String region, - String accountId, String partition) { - String aliasName = body.path("AliasName").asText(null); - String aliasArn = aliasArn(aliasName, region, accountId, partition); - if (aliasArn == null) { - return; - } - resources.add(aliasArn); - if (kmsService != null) { - String keyArn = kmsService.get().findKeyArn(aliasName, region).orElse(null); - if (keyArn != null) { - resources.add(keyArn); - } - } - } - - /** The alias's ARN, or null when the request names no alias AWS would accept the name of. */ - private static String aliasArn(String aliasName, String region, String accountId, String partition) { - if (aliasName == null || !aliasName.startsWith("alias/")) { - return null; - } - return new AwsArnUtils.Arn(partition, "kms", region, accountId, aliasName).toString(); - } - - /** Every key the account holds in the region, the pattern a permissive policy still matches. */ - private static String keyWildcard(String region, String accountId, String partition) { - return new AwsArnUtils.Arn(partition, "kms", region, accountId, "key/*").toString(); - } - // ── Helpers ────────────────────────────────────────────────────────────────── /** The request's JSON or CBOR body, buffered so the handler still reads it, or null when it has none. */ diff --git a/src/main/java/io/floci/aws/services/kms/KmsService.java b/src/main/java/io/floci/aws/services/kms/KmsService.java index 76d6e3c711..18b01ff3fb 100644 --- a/src/main/java/io/floci/aws/services/kms/KmsService.java +++ b/src/main/java/io/floci/aws/services/kms/KmsService.java @@ -2411,6 +2411,15 @@ public class KmsService implements ResourceProvider { : Optional.empty(); } + /** + * The tags of the key {@code keyArn} names, read in the account and Region of the ARN, whoever is calling; none + * when that account holds no such key, or for an alias. + */ + public Map findKeyTags(String keyArn) { + return keyAt(keyArn).map(KmsKey::getTags).filter(Objects::nonNull) + .>map(LinkedHashMap::new).orElse(Map.of()); + } + /** * The key policy of the key {@code keyArn} names, read in the account and Region of the ARN, whoever is calling, * which IAM evaluates as the key's resource policy; empty when that account holds no such key, or for an alias. diff --git a/src/main/java/io/floci/aws/services/kms/KmsStoredResourceArns.java b/src/main/java/io/floci/aws/services/kms/KmsStoredResourceArns.java index 5f394cd2b0..17d8069fed 100644 --- a/src/main/java/io/floci/aws/services/kms/KmsStoredResourceArns.java +++ b/src/main/java/io/floci/aws/services/kms/KmsStoredResourceArns.java @@ -5,14 +5,16 @@ import io.floci.aws.core.common.StoredResourceArns; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; +import java.util.Base64; import java.util.List; +import java.util.Map; import java.util.Optional; /** - * Finds the key a KMS key id, alias or ARN names, for a request another service forwards to KMS as the caller on a - * key its own resource records (a snapshot's): the key's stored ARN, in the caller's account or in the one that - * resource is in, when KMS would use it; none for a key disabled or pending deletion, which KMS refuses such a - * request with. + * Finds what KMS holds for the request-resources table: the key a key id, alias or ARN names, whatever its state, in + * the caller's account or in the one an ARN names, which a request naming it acts on; the key an alias points at, the + * key a grant is on and the key a ciphertext was encrypted under, which a request naming the alias, the grant or the + * ciphertext reaches; and the tags of a key. */ @ApplicationScoped public class KmsStoredResourceArns implements StoredResourceArns { @@ -39,13 +41,49 @@ public class KmsStoredResourceArns implements StoredResourceArns { @Override public Optional findInAccount(String type, List names, String account, String region) { return "key".equals(type) && names.size() == 1 - ? kms.findKeyArnOfAccount(names.getFirst(), account, region).filter(kms::isEnabledKey) + ? kms.findKeyArnOfAccount(names.getFirst(), account, region) : Optional.empty(); } + /** Whether KMS uses the key for a request another service forwards: enabled, not disabled or pending deletion. */ + @Override + public boolean usable(String arn) { + return kms.isEnabledKey(arn); + } + /** Whether the key is one AWS manages, whose policy lets every principal of its account use it through a service. */ @Override public boolean grantsItsAccountThroughServices(String arn) { return kms.isAwsManagedKey(arn); } + + /** + * The key the caller's alias an {@code AliasName} names points at, the key the grant a {@code GrantId} names is + * on, or the key the {@code CiphertextBlob} was encrypted under, which KMS reads out of the blob's metadata; none + * when the caller holds no such alias, grant or key, or the blob is none KMS made. + */ + @Override + public List through(String member, String value, String region) { + Optional key = switch (member) { + case "AliasName" -> kms.findKeyArn(value, region); + case "GrantId" -> kms.findGrantKeyArn(null, value, region); + case "CiphertextBlob" -> ciphertextKey(value, region); + default -> Optional.empty(); + }; + return key.stream().toList(); + } + + @Override + public Map storedTags(String arn) { + return StoredResourceArns.withEmptyValues(kms.findKeyTags(arn)); + } + + /** The key a base64 ciphertext blob was encrypted under, as KMS reads it out of the blob to decrypt it. */ + private Optional ciphertextKey(String blob, String region) { + try { + return Optional.ofNullable(kms.decryptToKeyArn(Base64.getDecoder().decode(blob), region)); + } catch (IllegalArgumentException e) { + return Optional.empty(); + } + } } diff --git a/src/main/resources/aws/iam-request-resources.json b/src/main/resources/aws/iam-request-resources.json index b841341f0b..bd78964c00 100644 --- a/src/main/resources/aws/iam-request-resources.json +++ b/src/main/resources/aws/iam-request-resources.json @@ -1,12 +1,12 @@ { "_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.9 (local/aws/botocore)", "retrieved": "2026-11-22", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."}, - "namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]}, - "handBuilt": ["dynamodb", "iam", "kms"], + "namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]}, + "handBuilt": ["dynamodb", "iam"], "notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup::autoScalingGroupName/`, while Floci mints `autoScalingGroup:`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/_, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment//`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "memorydb": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds-data": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "route53resolver": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sagemaker": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the path", "ses": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "signin": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "swf": "not read yet: the Service Reference gives a domain's ARN no Region, `swf:::/domain/`, while the SWF Developer Guide gives it as arn:aws:swf:Region:AccountID:/domain/DomainName, as Floci mints it; reading it needs that format corrected", "transcribe": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "transfer": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "verifiedpermissions": "not read yet: a policyStoreId may name its store by an alias, `policy-store-alias/`, which AWS authorizes as the action on the store the alias points to and GetPolicyStoreAlias on the alias, and an aliasName carries the `policy-store-alias/` its format already gives; reading it needs both", "wafv2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint"}, "otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"], - "arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}", "PrivateBasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}+${DomainIdentifier}/basepathmappings/${BasePath}", "PrivateBasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}+${DomainIdentifier}/basepathmappings", "PrivateDomainName": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnames/${DomainName}+${DomainIdentifier}", "ProductPage": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}/productpages/${ProductPageId}", "ProductRestEndpointPage": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}/productrestendpointpages/${ProductRestEndpointPageId}", "RequestValidator": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/requestvalidators/${RequestValidatorId}", "RequestValidators": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/requestvalidators", "Resource": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}", "Resources": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources", "RestApi": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}", "RestApis": "arn:${Partition}:apigateway:${Region}::/restapis", "Route": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}", "RouteRequestParameter": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/requestparameters/${RequestParameterKey}", "RouteResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/routeresponses/${RouteResponseId}", "RouteResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/routeresponses", "RouteSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/routesettings/${RouteKey}", "Routes": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes", "RoutingRule": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnames/${DomainName}/routingrules/${RoutingRuleId}", "Sdk": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/stages/${StageName}/sdks/${SdkType}", "Stage": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}", "Stages": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages", "Tags": "arn:${Partition}:apigateway:${Region}::/tags/${UrlEncodedResourceARN}", "Template": "arn:${Partition}:apigateway:${Region}::/restapis/models/${ModelName}/template", "UsagePlan": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}", "UsagePlanKey": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}/keys/${Id}", "UsagePlanKeys": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}/keys", "UsagePlans": "arn:${Partition}:apigateway:${Region}::/usageplans", "VpcLink": "arn:${Partition}:apigateway:${Region}::/vpclinks/${VpcLinkId}", "VpcLinks": "arn:${Partition}:apigateway:${Region}::/vpclinks"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "aps": {"anomalydetector": "arn:${Partition}:aps:${Region}:${Account}:anomalydetector/${WorkspaceId}/${AnomalyDetectorId}", "cluster": "arn:${Partition}:eks:${Region}:${Account}:cluster/${ClusterName}", "rulegroupsnamespace": "arn:${Partition}:aps:${Region}:${Account}:rulegroupsnamespace/${WorkspaceId}/${Namespace}", "scraper": "arn:${Partition}:aps:${Region}:${Account}:scraper/${ScraperId}", "workspace": "arn:${Partition}:aps:${Region}:${Account}:workspace/${WorkspaceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "bedrock": {"advanced-prompt-optimization-job": "arn:${Partition}:bedrock:${Region}:${Account}:advanced-prompt-optimization-job/${ResourceId}", "agent": "arn:${Partition}:bedrock:${Region}:${Account}:agent/${AgentId}", "agent-alias": "arn:${Partition}:bedrock:${Region}:${Account}:agent-alias/${AgentId}/${AgentAliasId}", "application-inference-profile": "arn:${Partition}:bedrock:${Region}:${Account}:application-inference-profile/${ResourceId}", "async-invoke": "arn:${Partition}:bedrock:${Region}:${Account}:async-invoke/${ResourceId}", "automated-reasoning-policy": "arn:${Partition}:bedrock:${Region}:${Account}:automated-reasoning-policy/${AutomatedReasoningPolicyId}", "automated-reasoning-policy-version": "arn:${Partition}:bedrock:${Region}:${Account}:automated-reasoning-policy/${AutomatedReasoningPolicyId}:${AutomatedReasoningPolicyVersion}", "bedrock-marketplace-model-endpoint": "arn:${Partition}:bedrock:${Region}:${Account}:marketplace/model-endpoint/all-access", "blueprint": "arn:${Partition}:bedrock:${Region}:${Account}:blueprint/${BlueprintId}", "blueprint-optimization-invocation": "arn:${Partition}:bedrock:${Region}:${Account}:blueprint-optimization-invocation/${ResourceId}", "custom-model": "arn:${Partition}:bedrock:${Region}:${Account}:custom-model/${ResourceId}", "custom-model-deployment": "arn:${Partition}:bedrock:${Region}:${Account}:custom-model-deployment/${ResourceId}", "data-automation-invocation-job": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-invocation/${JobId}", "data-automation-library": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-library/${DataAutomationLibraryId}", "data-automation-library-ingestion-job": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-library-ingestion-job/${IngestionJobId}", "data-automation-profile": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-profile/${ProfileId}", "data-automation-project": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-project/${ProjectId}", "default-prompt-router": "arn:${Partition}:bedrock:${Region}:${Account}:default-prompt-router/${ResourceId}", "evaluation-job": "arn:${Partition}:bedrock:${Region}:${Account}:evaluation-job/${ResourceId}", "flow": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}", "flow-alias": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}/alias/${FlowAliasId}", "flow-execution": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}/alias/${FlowAliasId}/execution/${FlowExecutionId}", "foundation-model": "arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}", "guardrail": "arn:${Partition}:bedrock:${Region}:${Account}:guardrail/${GuardrailId}", "guardrail-profile": "arn:${Partition}:bedrock:${Region}:${Account}:guardrail-profile/${ResourceId}", "imported-model": "arn:${Partition}:bedrock:${Region}:${Account}:imported-model/${ResourceId}", "inference-profile": "arn:${Partition}:bedrock:${Region}:${Account}:inference-profile/${ResourceId}", "knowledge-base": "arn:${Partition}:bedrock:${Region}:${Account}:knowledge-base/${KnowledgeBaseId}", "model-copy-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-copy-job/${ResourceId}", "model-customization-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-customization-job/${ResourceId}", "model-evaluation-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-evaluation-job/${ResourceId}", "model-import-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-import-job/${ResourceId}", "model-invocation-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-invocation-job/${JobIdentifier}", "project": "arn:${Partition}:bedrock:${Region}:${Account}:project/${ResourceId}", "prompt": "arn:${Partition}:bedrock:${Region}:${Account}:prompt/${PromptId}", "prompt-router": "arn:${Partition}:bedrock:${Region}:${Account}:prompt-router/${ResourceId}", "prompt-version": "arn:${Partition}:bedrock:${Region}:${Account}:prompt/${PromptId}:${PromptVersion}", "provisioned-model": "arn:${Partition}:bedrock:${Region}:${Account}:provisioned-model/${ResourceId}", "retrieval-instruction": "arn:${Partition}:bedrock:${Region}:${Account}:retrieval-instruction/${RetrievalInstructionId}", "session": "arn:${Partition}:bedrock:${Region}:${Account}:session/${SessionId}", "system-tool": "arn:${Partition}:bedrock::${Account}:system-tool/${ResourceId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId}", "fleet": "arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId}", "project": "arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName}", "report": "arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId}", "report-group": "arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName}", "sandbox": "arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "controlcatalog": {"common-control": "arn:${Partition}:controlcatalog:::common-control/${CommonControlId}", "control": "arn:${Partition}:controlcatalog:::control/${ControlId}", "domain": "arn:${Partition}:controlcatalog:::domain/${DomainId}", "objective": "arn:${Partition}:controlcatalog:::objective/${ObjectiveId}"}, "controltower": {"Baseline": "arn:${Partition}:controltower:${Region}::baseline/${BaselineId}", "EnabledBaseline": "arn:${Partition}:controltower:${Region}:${Account}:enabledbaseline/${EnabledBaselineId}", "EnabledControl": "arn:${Partition}:controltower:${Region}:${Account}:enabledcontrol/${EnabledControlId}", "LandingZone": "arn:${Partition}:controltower:${Region}:${Account}:landingzone/${LandingZoneId}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "datasync": {"agent": "arn:${Partition}:datasync:${Region}:${Account}:agent/${AgentId}", "discoveryjob": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}/job/${DiscoveryJobId}", "location": "arn:${Partition}:datasync:${Region}:${Account}:location/${LocationId}", "storagesystem": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}", "task": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}", "taskexecution": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}/execution/${ExecutionId}"}, "dsql": {"Cluster": "arn:${Partition}:dsql:${Region}:${Account}:cluster/${Identifier}", "Stream": "arn:${Partition}:dsql:${Region}:${Account}:cluster/${ClusterId}/stream/${StreamId}"}, "dynamodb": {"backup": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/backup/${BackupName}", "bulk-operation": "arn:${Partition}:dynamodb:${Region}:${Account}:bulk-operation/${BulkOperationId}", "export": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/export/${ExportName}", "global-table": "arn:${Partition}:dynamodb::${Account}:global-table/${GlobalTableName}", "import": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/import/${ImportName}", "index": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/index/${IndexName}", "stream": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/stream/${StreamLabel}", "table": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}"}, "ec2": {"application-status-check": "arn:${Partition}:ec2:${Region}:${Account}:application-status-check/${ApplicationStatusCheckId}", "capacity-block": "arn:${Partition}:ec2:${Region}:${Account}:capacity-block/${CapacityBlockId}", "capacity-manager-data-export": "arn:${Partition}:ec2:${Region}:${Account}:capacity-manager-data-export/${CapacityManagerDataExportId}", "capacity-reservation": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId}", "capacity-reservation-cancellation-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-cancellation-quote/${CapacityReservationCancellationQuoteId}", "capacity-reservation-fleet": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-fleet/${CapacityReservationFleetId}", "capacity-reservation-modification-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-modification-quote/${CapacityReservationModificationQuoteId}", "carrier-gateway": "arn:${Partition}:ec2:${Region}:${Account}:carrier-gateway/${CarrierGatewayId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}", "client-vpn-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:client-vpn-endpoint/${ClientVpnEndpointId}", "coip-pool": "arn:${Partition}:ec2:${Region}:${Account}:coip-pool/${Ipv4PoolCoipId}", "customer-gateway": "arn:${Partition}:ec2:${Region}:${Account}:customer-gateway/${CustomerGatewayId}", "declarative-policies-report": "arn:${Partition}:ec2:${Region}:${Account}:declarative-policies-report/${DeclarativePoliciesReportId}", "dedicated-host": "arn:${Partition}:ec2:${Region}:${Account}:dedicated-host/${DedicatedHostId}", "dhcp-options": "arn:${Partition}:ec2:${Region}:${Account}:dhcp-options/${DhcpOptionsId}", "egress-only-internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:egress-only-internet-gateway/${EgressOnlyInternetGatewayId}", "elastic-gpu": "arn:${Partition}:ec2:${Region}:${Account}:elastic-gpu/${ElasticGpuId}", "elastic-inference": "arn:${Partition}:elastic-inference:${Region}:${Account}:elastic-inference-accelerator/${AcceleratorId}", "elastic-ip": "arn:${Partition}:ec2:${Region}:${Account}:elastic-ip/${AllocationId}", "export-image-task": "arn:${Partition}:ec2:${Region}:${Account}:export-image-task/${ExportImageTaskId}", "export-instance-task": "arn:${Partition}:ec2:${Region}:${Account}:export-instance-task/${ExportTaskId}", "fleet": "arn:${Partition}:ec2:${Region}:${Account}:fleet/${FleetId}", "fpga-image": "arn:${Partition}:ec2:${Region}:${Account}:fpga-image/${FpgaImageId}", "group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}", "host-reservation": "arn:${Partition}:ec2:${Region}:${Account}:host-reservation/${HostReservationId}", "image": "arn:${Partition}:ec2:${Region}::image/${ImageId}", "image-usage-report": "arn:${Partition}:ec2:${Region}:${Account}:image-usage-report/${ImageUsageReportId}", "import-image-task": "arn:${Partition}:ec2:${Region}:${Account}:import-image-task/${ImportImageTaskId}", "import-snapshot-task": "arn:${Partition}:ec2:${Region}:${Account}:import-snapshot-task/${ImportSnapshotTaskId}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId}", "instance-event-window": "arn:${Partition}:ec2:${Region}:${Account}:instance-event-window/${InstanceEventWindowId}", "internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:internet-gateway/${InternetGatewayId}", "ipam": "arn:${Partition}:ec2::${Account}:ipam/${IpamId}", "ipam-external-resource-verification-token": "arn:${Partition}:ec2::${Account}:ipam-external-resource-verification-token/${IpamExternalResourceVerificationTokenId}", "ipam-internet-registry-association": "arn:${Partition}:ec2::${Account}:ipam-internet-registry-association/${IpamInternetRegistryAssociationId}", "ipam-policy": "arn:${Partition}:ec2::${Account}:ipam-policy/${IpamPolicyId}", "ipam-pool": "arn:${Partition}:ec2::${Account}:ipam-pool/${IpamPoolId}", "ipam-pool-allocation": "arn:${Partition}:ec2:${Region}:${Account}:ipam-pool-allocation/${IpamPoolAllocationId}", "ipam-prefix-list-resolver": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver/${IpamPrefixListResolverId}", "ipam-prefix-list-resolver-target": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver-target/${IpamPrefixListResolverTargetId}", "ipam-resource-discovery": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery/${IpamResourceDiscoveryId}", "ipam-resource-discovery-association": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery-association/${IpamResourceDiscoveryAssociationId}", "ipam-scope": "arn:${Partition}:ec2::${Account}:ipam-scope/${IpamScopeId}", "ipv4pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv4pool-ec2/${Ipv4PoolEc2Id}", "ipv6pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv6pool-ec2/${Ipv6PoolEc2Id}", "key-pair": "arn:${Partition}:ec2:${Region}:${Account}:key-pair/${KeyPairName}", "launch-template": "arn:${Partition}:ec2:${Region}:${Account}:launch-template/${LaunchTemplateId}", "license-configuration": "arn:${Partition}:license-manager:${Region}:${Account}:license-configuration:${LicenseConfigurationId}", "local-gateway": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway/${LocalGatewayId}", "local-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table/${LocalGatewayRoutetableId}", "local-gateway-route-table-virtual-interface-group-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-virtual-interface-group-association/${LocalGatewayRouteTableVirtualInterfaceGroupAssociationId}", "local-gateway-route-table-vpc-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-vpc-association/${LocalGatewayRouteTableVpcAssociationId}", "local-gateway-virtual-interface": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface/${LocalGatewayVirtualInterfaceId}", "local-gateway-virtual-interface-group": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface-group/${LocalGatewayVirtualInterfaceGroupId}", "mac-modification-task": "arn:${Partition}:ec2:${Region}:${Account}:mac-modification-task/${MacModificationTaskId}", "natgateway": "arn:${Partition}:ec2:${Region}:${Account}:natgateway/${NatGatewayId}", "network-acl": "arn:${Partition}:ec2:${Region}:${Account}:network-acl/${NaclId}", "network-insights-access-scope": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope/${NetworkInsightsAccessScopeId}", "network-insights-access-scope-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope-analysis/${NetworkInsightsAccessScopeAnalysisId}", "network-insights-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-analysis/${NetworkInsightsAnalysisId}", "network-insights-path": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-path/${NetworkInsightsPathId}", "network-interface": "arn:${Partition}:ec2:${Region}:${Account}:network-interface/${NetworkInterfaceId}", "outpost-lag": "arn:${Partition}:ec2:${Region}:${Account}:outpost-lag/${OutpostLagId}", "placement-group": "arn:${Partition}:ec2:${Region}:${Account}:placement-group/${PlacementGroupName}", "prefix-list": "arn:${Partition}:ec2:${Region}:${Account}:prefix-list/${PrefixListId}", "replace-root-volume-task": "arn:${Partition}:ec2:${Region}:${Account}:replace-root-volume-task/${ReplaceRootVolumeTaskId}", "reserved-instances": "arn:${Partition}:ec2:${Region}:${Account}:reserved-instances/${ReservationId}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "route-server": "arn:${Partition}:ec2:${Region}:${Account}:route-server/${RouteServerId}", "route-server-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:route-server-endpoint/${RouteServerEndpointId}", "route-server-peer": "arn:${Partition}:ec2:${Region}:${Account}:route-server-peer/${RouteServerPeerId}", "route-table": "arn:${Partition}:ec2:${Region}:${Account}:route-table/${RouteTableId}", "secondary-interface": "arn:${Partition}:ec2:${Region}:${Account}:secondary-interface/${SecondaryInterfaceId}", "secondary-network": "arn:${Partition}:ec2:${Region}:${Account}:secondary-network/${SecondaryNetworkId}", "secondary-subnet": "arn:${Partition}:ec2:${Region}:${Account}:secondary-subnet/${SecondarySubnetId}", "security-group": "arn:${Partition}:ec2:${Region}:${Account}:security-group/${SecurityGroupId}", "security-group-rule": "arn:${Partition}:ec2:${Region}:${Account}:security-group-rule/${SecurityGroupRuleId}", "snapshot": "arn:${Partition}:ec2:${Region}::snapshot/${SnapshotId}", "spot-fleet-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-fleet-request/${SpotFleetRequestId}", "spot-instances-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-instances-request/${SpotInstanceRequestId}", "subnet": "arn:${Partition}:ec2:${Region}:${Account}:subnet/${SubnetId}", "subnet-cidr-reservation": "arn:${Partition}:ec2:${Region}:${Account}:subnet-cidr-reservation/${SubnetCidrReservationId}", "traffic-mirror-filter": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter/${TrafficMirrorFilterId}", "traffic-mirror-filter-rule": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter-rule/${TrafficMirrorFilterRuleId}", "traffic-mirror-session": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-session/${TrafficMirrorSessionId}", "traffic-mirror-target": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-target/${TrafficMirrorTargetId}", "transit-gateway": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway/${TransitGatewayId}", "transit-gateway-attachment": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-attachment/${TransitGatewayAttachmentId}", "transit-gateway-connect-peer": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-connect-peer/${TransitGatewayConnectPeerId}", "transit-gateway-metering-policy": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-metering-policy/${TransitGatewayMeteringPolicyId}", "transit-gateway-multicast-domain": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-multicast-domain/${TransitGatewayMulticastDomainId}", "transit-gateway-policy-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-policy-table/${TransitGatewayPolicyTableId}", "transit-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table/${TransitGatewayRouteTableId}", "transit-gateway-route-table-announcement": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table-announcement/${TransitGatewayRouteTableAnnouncementId}", "verified-access-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint/${VerifiedAccessEndpointId}", "verified-access-endpoint-target": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint-target/${VerifiedAccessEndpointTargetId}", "verified-access-group": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-group/${VerifiedAccessGroupId}", "verified-access-instance": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-instance/${VerifiedAccessInstanceId}", "verified-access-policy": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-policy/${VerifiedAccessPolicyId}", "verified-access-trust-provider": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-trust-provider/${VerifiedAccessTrustProviderId}", "volume": "arn:${Partition}:ec2:${Region}:${Account}:volume/${VolumeId}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}", "vpc-block-public-access-exclusion": "arn:${Partition}:ec2:${Region}:${Account}:vpc-block-public-access-exclusion/${VpcBlockPublicAccessExclusionId}", "vpc-encryption-control": "arn:${Partition}:ec2:${Region}:${Account}:vpc-encryption-control/${VpcEncryptionControlId}", "vpc-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint/${VpcEndpointId}", "vpc-endpoint-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-connection/${VpcEndpointConnectionId}", "vpc-endpoint-service": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service/${VpcEndpointServiceId}", "vpc-endpoint-service-permission": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service-permission/${VpcEndpointServicePermissionId}", "vpc-flow-log": "arn:${Partition}:ec2:${Region}:${Account}:vpc-flow-log/${VpcFlowLogId}", "vpc-peering-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-peering-connection/${VpcPeeringConnectionId}", "vpn-concentrator": "arn:${Partition}:ec2:${Region}:${Account}:vpn-concentrator/${VpnConcentratorId}", "vpn-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection/${VpnConnectionId}", "vpn-connection-device-type": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection-device-type/${VpnConnectionDeviceTypeId}", "vpn-gateway": "arn:${Partition}:ec2:${Region}:${Account}:vpn-gateway/${VpnGatewayId}"}, "ec2-instance-connect": {"instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "ecs": {"capacity-provider": "arn:${Partition}:ecs:${Region}:${Account}:capacity-provider/${CapacityProviderName}", "cluster": "arn:${Partition}:ecs:${Region}:${Account}:cluster/${ClusterName}", "container-instance": "arn:${Partition}:ecs:${Region}:${Account}:container-instance/${ClusterName}/${ContainerInstanceId}", "daemon": "arn:${Partition}:ecs:${Region}:${Account}:daemon/${ClusterName}/${DaemonName}", "daemon-deployment": "arn:${Partition}:ecs:${Region}:${Account}:daemon-deployment/${ClusterName}/${DaemonName}/${DaemonDeploymentId}", "daemon-revision": "arn:${Partition}:ecs:${Region}:${Account}:daemon-revision/${ClusterName}/${DaemonName}/${DaemonRevisionId}", "daemon-task-definition": "arn:${Partition}:ecs:${Region}:${Account}:daemon-task-definition/${DaemonTaskDefinitionFamilyName}:${DaemonTaskDefinitionRevisionNumber}", "gateway": "arn:${Partition}:ecs:${Region}:${Account}:gateway/${GatewayName}/${GatewayId}", "gateway-route": "arn:${Partition}:ecs:${Region}:${Account}:gateway-route/${GatewayName}/${GatewayId}/${RouteId}", "service": "arn:${Partition}:ecs:${Region}:${Account}:service/${ClusterName}/${ServiceName}", "service-deployment": "arn:${Partition}:ecs:${Region}:${Account}:service-deployment/${ClusterName}/${ServiceName}/${ServiceDeploymentId}", "service-revision": "arn:${Partition}:ecs:${Region}:${Account}:service-revision/${ClusterName}/${ServiceName}/${ServiceRevisionId}", "task": "arn:${Partition}:ecs:${Region}:${Account}:task/${ClusterName}/${TaskId}", "task-definition": "arn:${Partition}:ecs:${Region}:${Account}:task-definition/${TaskDefinitionFamilyName}:${TaskDefinitionRevisionNumber}", "task-set": "arn:${Partition}:ecs:${Region}:${Account}:task-set/${ClusterName}/${ServiceName}/${TaskSetId}"}, "eks": {"access-entry": "arn:${Partition}:eks:${Region}:${Account}:access-entry/${ClusterName}/${IamIdentityType}/${IamIdentityAccountID}/${IamIdentityName}/${UUID}", "access-policy": "arn:${Partition}:eks::aws:cluster-access-policy/${AccessPolicyName}", "addon": "arn:${Partition}:eks:${Region}:${Account}:addon/${ClusterName}/${AddonName}/${UUID}", "capability": "arn:${Partition}:eks:${Region}:${Account}:capability/${ClusterName}/${CapabilityType}/${CapabilityName}/${UUID}", "cluster": "arn:${Partition}:eks:${Region}:${Account}:cluster/${ClusterName}", "dashboard": "arn:${Partition}:eks:${Region}:${Account}:dashboard/${DashboardName}", "eks-anywhere-subscription": "arn:${Partition}:eks:${Region}:${Account}:eks-anywhere-subscription/${UUID}", "fargateprofile": "arn:${Partition}:eks:${Region}:${Account}:fargateprofile/${ClusterName}/${FargateProfileName}/${UUID}", "identityproviderconfig": "arn:${Partition}:eks:${Region}:${Account}:identityproviderconfig/${ClusterName}/${IdentityProviderType}/${IdentityProviderConfigName}/${UUID}", "nodegroup": "arn:${Partition}:eks:${Region}:${Account}:nodegroup/${ClusterName}/${NodegroupName}/${UUID}", "podidentityassociation": "arn:${Partition}:eks:${Region}:${Account}:podidentityassociation/${ClusterName}/${UUID}"}, "elasticloadbalancing": {"listener-rule/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener-rule/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/gwy": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/gwy/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "loadbalancer": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/${LoadBalancerName}", "loadbalancer/app/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/gwy/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/gwy/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/net/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/net/${LoadBalancerName}/${LoadBalancerId}", "targetgroup": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:targetgroup/${TargetGroupName}/${TargetGroupId}", "truststore": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:truststore/${TrustStoreName}/${TrustStoreId}"}, "elasticmapreduce": {"cluster": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:cluster/${ClusterId}", "editor": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:editor/${EditorId}", "notebook-execution": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:notebook-execution/${NotebookExecutionId}", "session": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:cluster/${ClusterId}/session/${SessionId}", "studio": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:studio/${StudioId}"}, "emr-containers": {"jobRun": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}/jobruns/${JobRunId}", "jobTemplate": "arn:${Partition}:emr-containers:${Region}:${Account}:/jobtemplates/${JobTemplateId}", "managedEndpoint": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}/endpoints/${EndpointId}", "securityConfiguration": "arn:${Partition}:emr-containers:${Region}:${Account}:/securityconfigurations/${SecurityConfigurationId}", "virtualCluster": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}"}, "emr-serverless": {"application": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}", "jobRun": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/jobruns/${JobRunId}", "session": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/sessions/${SessionId}"}, "es": {"application": "arn:${Partition}:opensearch:${Region}:${Account}:application/${AppId}", "datasource": "arn:${Partition}:opensearch:${Region}:${Account}:datasource/${DataSourceName}", "domain": "arn:${Partition}:es:${Region}:${Account}:domain/${DomainName}", "es_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/es.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService", "opensearchservice_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/opensearchservice.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService"}, "events": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "api-destination": "arn:${Partition}:events:${Region}:${Account}:api-destination/${ApiDestinationName}", "archive": "arn:${Partition}:events:${Region}:${Account}:archive/${ArchiveName}", "connection": "arn:${Partition}:events:${Region}:${Account}:connection/${ConnectionName}", "create-snapshot": "arn:${Partition}:events:${Region}:${Account}:target/create-snapshot", "endpoint": "arn:${Partition}:events:${Region}:${Account}:endpoint/${EndpointName}", "event-bus": "arn:${Partition}:events:${Region}:${Account}:event-bus/${EventBusName}", "event-busv2": "arn:${Partition}:events:${Region}:${Account}:event-busv2/${EventBusName}/${OpaqueId}", "event-source": "arn:${Partition}:events:${Region}::event-source/${EventSourceName}", "event-sourcev2": "arn:${Partition}:events:${Region}:${Account}:event-sourcev2/${SourceType}/${EventSourceName}/${OpaqueId}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "reboot-instance": "arn:${Partition}:events:${Region}:${Account}:target/reboot-instance", "replay": "arn:${Partition}:events:${Region}:${Account}:replay/${ReplayName}", "rule-on-custom-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}", "rule-on-default-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}", "stop-instance": "arn:${Partition}:events:${Region}:${Account}:target/stop-instance", "subscriber": "arn:${Partition}:events:${Region}:${Account}:subscriber/${SubscriberName}/${OpaqueId}", "terminate-instance": "arn:${Partition}:events:${Region}:${Account}:target/terminate-instance"}, "firehose": {"deliverystream": "arn:${Partition}:firehose:${Region}:${Account}:deliverystream/${DeliveryStreamName}"}, "fis": {"action": "arn:${Partition}:fis:${Region}:${Account}:action/${Id}", "experiment": "arn:${Partition}:fis:${Region}:${Account}:experiment/${Id}", "experiment-template": "arn:${Partition}:fis:${Region}:${Account}:experiment-template/${Id}", "safety-lever": "arn:${Partition}:fis:${Region}:${Account}:safety-lever/${Id}"}, "globalaccelerator": {"accelerator": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}", "attachment": "arn:${Partition}:globalaccelerator::${Account}:attachment/${ResourceId}", "endpointgroup": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}/endpoint-group/${EndpointGroupId}", "listener": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}"}, "glue": {"blueprint": "arn:${Partition}:glue:${Region}:${Account}:blueprint/${BlueprintName}", "catalog": "arn:${Partition}:glue:${Region}:${Account}:catalog/${CatalogName}", "completion": "arn:${Partition}:glue:${Region}:${Account}:completion/${CompletionId}", "connection": "arn:${Partition}:glue:${Region}:${Account}:connection/${ConnectionName}", "connectionType": "arn:${Partition}:glue:${Region}:${Account}:connectionType:${ConnectionTypeName}", "crawler": "arn:${Partition}:glue:${Region}:${Account}:crawler/${CrawlerName}", "customEntityType": "arn:${Partition}:glue:${Region}:${Account}:customEntityType/${CustomEntityTypeId}", "dataQualityEvaluationConfig": "arn:${Partition}:glue:${Region}:${Account}:dataQualityEvaluationConfig/${EvaluationConfigName}", "dataQualityRuleset": "arn:${Partition}:glue:${Region}:${Account}:dataQualityRuleset/${RulesetName}", "database": "arn:${Partition}:glue:${Region}:${Account}:database/${DatabaseName}", "devendpoint": "arn:${Partition}:glue:${Region}:${Account}:devEndpoint/${DevEndpointName}", "integration": "arn:${Partition}:glue:${Region}:${Account}:integration:${IntegrationId}", "integrationResourceProperty": "arn:${Partition}:glue:${Region}:${Account}:integrationresourceproperty/${ResourceType}/${ResourceName}", "job": "arn:${Partition}:glue:${Region}:${Account}:job/${JobName}", "mlTransform": "arn:${Partition}:glue:${Region}:${Account}:mlTransform/${TransformId}", "registry": "arn:${Partition}:glue:${Region}:${Account}:registry/${RegistryName}", "rootcatalog": "arn:${Partition}:glue:${Region}:${Account}:catalog", "schema": "arn:${Partition}:glue:${Region}:${Account}:schema/${SchemaName}", "session": "arn:${Partition}:glue:${Region}:${Account}:session/${SessionId}", "table": "arn:${Partition}:glue:${Region}:${Account}:table/${DatabaseName}/${TableName}", "tableversion": "arn:${Partition}:glue:${Region}:${Account}:tableVersion/${DatabaseName}/${TableName}/${TableVersionName}", "trigger": "arn:${Partition}:glue:${Region}:${Account}:trigger/${TriggerName}", "usageProfile": "arn:${Partition}:glue:${Region}:${Account}:usageProfile/${UsageProfileId}", "userdefinedfunction": "arn:${Partition}:glue:${Region}:${Account}:userDefinedFunction/${DatabaseName}/${UserDefinedFunctionName}", "workflow": "arn:${Partition}:glue:${Region}:${Account}:workflow/${WorkflowName}"}, "guardduty": {"customdetectionrule": "arn:${Partition}:guardduty::aws:detection-rule/custom/${RuleId}", "customdetectionruleassociation": "arn:${Partition}:guardduty:${Region}:${Account}:detection-rule/custom/${RuleId}/association/${AssociationId}", "detector": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}", "filter": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/filter/${FilterName}", "ipset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/ipset/${IPSetId}", "malwareprotectionplan": "arn:${Partition}:guardduty:${Region}:${Account}:malware-protection-plan/${MalwareProtectionPlanId}", "publishingDestination": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/publishingdestination/${PublishingDestinationId}", "threatentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatentityset/${ThreatEntitySetId}", "threatintelset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatintelset/${ThreatIntelSetId}", "trustedentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/trustedentityset/${TrustedEntitySetId}"}, "inspector2": {"CIS Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/cis-configuration/${CISScanConfigurationId}", "Code Security Integration": "arn:${Partition}:inspector2:${Region}:${Account}:codesecurity-integration/${CodeSecurityIntegrationId}", "Code Security Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/codesecurity-configuration/${CodeSecurityScanConfigurationId}", "Connector": "arn:${Partition}:inspector2:${Region}:${Account}:connector/${ConnectorId}", "Filter": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/filter/${FilterId}", "Finding": "arn:${Partition}:inspector2:${Region}:${Account}:finding/${FindingId}"}, "kinesis": {"channel": "arn:${Partition}:kinesis:${Region}:${Account}:channel/${ChannelId}", "consumer": "arn:${Partition}:kinesis:${Region}:${Account}:${StreamType}/${StreamName}/consumer/${ConsumerName}:${ConsumerCreationTimpstamp}", "kmsKey": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "queue": "arn:${Partition}:kinesis:${Region}:${Account}:queue/${QueueId}", "stream": "arn:${Partition}:kinesis:${Region}:${Account}:stream/${StreamName}"}, "kinesisanalytics": {"application": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:application/${ApplicationName}", "snapshot": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:snapshot/${SnapshotName}"}, "lambda": {"capacityProvider": "arn:${Partition}:lambda:${Region}:${Account}:capacity-provider:${CapacityProviderName}", "code signing config": "arn:${Partition}:lambda:${Region}:${Account}:code-signing-config:${CodeSigningConfigId}", "durable execution": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Version}/durable-execution/${ExecutionName}/${ExecutionId}", "eventSourceMapping": "arn:${Partition}:lambda:${Region}:${Account}:event-source-mapping:${UUID}", "function": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}", "function alias": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Alias}", "function version": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Version}", "layer": "arn:${Partition}:lambda:${Region}:${Account}:layer:${LayerName}", "layerVersion": "arn:${Partition}:lambda:${Region}:${Account}:layer:${LayerName}:${LayerVersion}", "microvmImage": "arn:${Partition}:lambda:${Region}:${Account}:microvm-image:${MicrovmImageName}", "networkConnector": "arn:${Partition}:lambda:${Region}:${Account}:network-connector:${NetworkConnectorId}", "runtime": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}", "runtimeAlias": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}/alias/${Name}", "runtimeVersion": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}/version/${Name}", "webFunction": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}", "webFunctionEndpoint": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}/endpoint/${EndpointName}", "webFunctionRevision": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}/revision/${RevisionId}"}, "logs": {"anomaly-detector": "arn:${Partition}:logs:${Region}:${Account}:anomaly-detector:${DetectorId}", "delivery": "arn:${Partition}:logs:${Region}:${Account}:delivery:${DeliveryName}", "delivery-destination": "arn:${Partition}:logs:${Region}:${Account}:delivery-destination:${DeliveryDestinationName}", "delivery-source": "arn:${Partition}:logs:${Region}:${Account}:delivery-source:${DeliverySourceName}", "destination": "arn:${Partition}:logs:${Region}:${Account}:destination:${DestinationName}", "log-group": "arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}", "log-stream": "arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}", "lookup-table": "arn:${Partition}:logs:${Region}:${Account}:lookup-table:${LookupTableName}", "scheduled-query": "arn:${Partition}:logs:${Region}:${Account}:scheduled-query:${ScheduledQueryId}"}, "macie2": {"AllowList": "arn:${Partition}:macie2:${Region}:${Account}:allow-list/${ResourceId}", "ClassificationJob": "arn:${Partition}:macie2:${Region}:${Account}:classification-job/${ResourceId}", "CustomDataIdentifier": "arn:${Partition}:macie2:${Region}:${Account}:custom-data-identifier/${ResourceId}", "FindingsFilter": "arn:${Partition}:macie2:${Region}:${Account}:findings-filter/${ResourceId}", "Member": "arn:${Partition}:macie2:${Region}:${Account}:member/${ResourceId}"}, "oam": {"Link": "arn:${Partition}:oam:${Region}:${Account}:link/${ResourceId}", "Sink": "arn:${Partition}:oam:${Region}:${Account}:sink/${ResourceId}"}, "payment-cryptography": {"alias": "arn:${Partition}:payment-cryptography:${Region}:${Account}:alias/${Alias}", "approval-team": "arn:${Partition}:mpa:${Region}:${Account}:approval-team/${ApprovalTeamId}", "key": "arn:${Partition}:payment-cryptography:${Region}:${Account}:key/${KeyId}"}, "pipes": {"pipe": "arn:${Partition}:pipes:${Region}:${Account}:pipe/${Name}"}, "quicksight": {"accessControlApplication": "arn:${Partition}:quicksight:${Region}:${Account}:access-control-application/${ResourceId}", "account": "arn:${Partition}:quicksight:${Region}:${Account}:account/${ResourceId}", "actionconnector": "arn:${Partition}:quicksight:${Region}:${Account}:action-connector/${ResourceId}", "agent": "arn:${Partition}:quicksight:${Region}:${Account}:agent/${ResourceId}", "analysis": "arn:${Partition}:quicksight:${Region}:${Account}:analysis/${ResourceId}", "app": "arn:${Partition}:quicksight:${Region}:${Account}:app/${ResourceId}", "approvalPolicy": "arn:${Partition}:quicksight:${Region}:${Account}:approval-policy/${ResourceId}", "assetBundleExportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-export-job/${ResourceId}", "assetBundleImportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-import-job/${ResourceId}", "assignment": "arn:${Partition}:quicksight::${Account}:assignment/${ResourceId}", "automation": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${ResourceId}", "automationGroup": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${ResourceId}", "automationJob": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${AutomationId}/job/${ResourceId}", "brand": "arn:${Partition}:quicksight:${Region}:${Account}:brand/${ResourceId}", "customization": "arn:${Partition}:quicksight:${Region}:${Account}:customization/${ResourceId}", "custompermissions": "arn:${Partition}:quicksight:${Region}:${Account}:custompermissions/${ResourceId}", "dashboard": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${ResourceId}", "dashboardSnapshotJob": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${DashboardId}/snapshot-job/${ResourceId}", "dataset": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${ResourceId}", "datasource": "arn:${Partition}:quicksight:${Region}:${Account}:datasource/${ResourceId}", "dlpSetting": "arn:${Partition}:quicksight:${Region}:${Account}:dlpsetting/${ResourceId}", "emailCustomizationTemplate": "arn:${Partition}:quicksight:${Region}:${Account}:email-customization-template/${ResourceId}", "extension": "arn:${Partition}:quicksight:${Region}:${Account}:extension/${ResourceId}", "extensionaccess": "arn:${Partition}:quicksight:${Region}:${Account}:extension-access/${ResourceId}", "flow": "arn:${Partition}:quicksight:${Region}:${Account}:flow/${ResourceId}", "folder": "arn:${Partition}:quicksight:${Region}:${Account}:folder/${ResourceId}", "group": "arn:${Partition}:quicksight:${Region}:${Account}:group/${ResourceId}", "inboundConnector": "arn:${Partition}:quicksight:${Region}:${Account}:inbound-connector/${ResourceId}", "ingestion": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/ingestion/${ResourceId}", "knowledgeBase": "arn:${Partition}:quicksight:${Region}:${Account}:knowledge-base/${ResourceId}", "limitsProfile": "arn:${Partition}:quicksight:${Region}:${Account}:limits-profile/${ResourceId}", "namespace": "arn:${Partition}:quicksight:${Region}:${Account}:namespace/${ResourceId}", "oauthClientApplication": "arn:${Partition}:quicksight:${Region}:${Account}:oauthClientApplication/${ResourceId}", "refreshschedule": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/refresh-schedule/${ResourceId}", "space": "arn:${Partition}:quicksight:${Region}:${Account}:space/${ResourceId}", "template": "arn:${Partition}:quicksight:${Region}:${Account}:template/${ResourceId}", "theme": "arn:${Partition}:quicksight:${Region}:${Account}:theme/${ResourceId}", "topic": "arn:${Partition}:quicksight:${Region}:${Account}:topic/${ResourceId}", "user": "arn:${Partition}:quicksight:${Region}:${Account}:user/${ResourceId}", "vpcconnection": "arn:${Partition}:quicksight:${Region}:${Account}:vpcConnection/${ResourceId}"}, "ram": {"customer-managed-permission": "arn:${Partition}:ram:${Region}:${Account}:permission/${ResourcePath}", "permission": "arn:${Partition}:ram::aws:permission/${ResourcePath}", "resource-share": "arn:${Partition}:ram:${Region}:${Account}:resource-share/${ResourcePath}", "resource-share-invitation": "arn:${Partition}:ram:${Region}:${Account}:resource-share-invitation/${ResourcePath}"}, "rds": {"auto-backup": "arn:${Partition}:rds:${Region}:${Account}:auto-backup:${DbInstanceAutomatedBackupId}", "cev": "arn:${Partition}:rds:${Region}:${Account}:cev:${Engine}/${EngineVersion}/${CustomDbEngineVersionId}", "cluster": "arn:${Partition}:rds:${Region}:${Account}:cluster:${DbClusterInstanceName}", "cluster-auto-backup": "arn:${Partition}:rds:${Region}:${Account}:cluster-auto-backup:${DbClusterAutomatedBackupId}", "cluster-endpoint": "arn:${Partition}:rds:${Region}:${Account}:cluster-endpoint:${DbClusterEndpoint}", "cluster-pg": "arn:${Partition}:rds:${Region}:${Account}:cluster-pg:${ClusterParameterGroupName}", "cluster-snapshot": "arn:${Partition}:rds:${Region}:${Account}:cluster-snapshot:${ClusterSnapshotName}", "db": "arn:${Partition}:rds:${Region}:${Account}:db:${DbInstanceName}", "db-capacity-reservation": "arn:${Partition}:rds:${Region}:${Account}:db-capacity-reservation:${DBCapacityReservationIdentifier}", "deployment": "arn:${Partition}:rds:${Region}:${Account}:deployment:${BlueGreenDeploymentIdentifier}", "es": "arn:${Partition}:rds:${Region}:${Account}:es:${SubscriptionName}", "global-cluster": "arn:${Partition}:rds::${Account}:global-cluster:${GlobalCluster}", "integration": "arn:${Partition}:rds:${Region}:${Account}:integration:${IntegrationIdentifier}", "og": "arn:${Partition}:rds:${Region}:${Account}:og:${OptionGroupName}", "pg": "arn:${Partition}:rds:${Region}:${Account}:pg:${ParameterGroupName}", "proxy": "arn:${Partition}:rds:${Region}:${Account}:db-proxy:${DbProxyId}", "proxy-endpoint": "arn:${Partition}:rds:${Region}:${Account}:db-proxy-endpoint:${DbProxyEndpointId}", "ri": "arn:${Partition}:rds:${Region}:${Account}:ri:${ReservedDbInstanceName}", "secgrp": "arn:${Partition}:rds:${Region}:${Account}:secgrp:${SecurityGroupName}", "shardgrp": "arn:${Partition}:rds:${Region}:${Account}:shard-group:${DbShardGroupResourceId}", "snapshot": "arn:${Partition}:rds:${Region}:${Account}:snapshot:${SnapshotName}", "snapshot-tenant-database": "arn:${Partition}:rds:${Region}:${Account}:snapshot-tenant-database:${SnapshotName}:${TenantResourceId}", "subgrp": "arn:${Partition}:rds:${Region}:${Account}:subgrp:${SubnetGroupName}", "target-group": "arn:${Partition}:rds:${Region}:${Account}:target-group:${TargetGroupId}", "tenant-database": "arn:${Partition}:rds:${Region}:${Account}:tenant-database:${TenantResourceId}"}, "redshift": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "datashare": "arn:${Partition}:redshift:${Region}:${Account}:datashare:${ProducerClusterNamespace}/${DataShareName}", "dbgroup": "arn:${Partition}:redshift:${Region}:${Account}:dbgroup:${ClusterName}/${DbGroup}", "dbname": "arn:${Partition}:redshift:${Region}:${Account}:dbname:${ClusterName}/${DbName}", "dbuser": "arn:${Partition}:redshift:${Region}:${Account}:dbuser:${ClusterName}/${DbUser}", "eventsubscription": "arn:${Partition}:redshift:${Region}:${Account}:eventsubscription:${EventSubscriptionName}", "hsmclientcertificate": "arn:${Partition}:redshift:${Region}:${Account}:hsmclientcertificate:${HSMClientCertificateId}", "hsmconfiguration": "arn:${Partition}:redshift:${Region}:${Account}:hsmconfiguration:${HSMConfigurationId}", "integration": "arn:${Partition}:redshift:${Region}:${Account}:integration:${IntegrationIdentifier}", "namespace": "arn:${Partition}:redshift:${Region}:${Account}:namespace:${ClusterNamespace}", "parametergroup": "arn:${Partition}:redshift:${Region}:${Account}:parametergroup:${ParameterGroupName}", "qev2idcapplication": "arn:${Partition}:redshift:${Region}:${Account}:qev2idcapplication:${Qev2IdcApplicationId}", "redshiftidcapplication": "arn:${Partition}:redshift:${Region}:${Account}:redshiftidcapplication:${RedshiftIdcApplicationId}", "securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroup:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ec2SecurityGroupId}", "securitygroupingress-cidr": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/cidrip/${IpRange}", "securitygroupingress-ec2securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ece2SecuritygroupId}", "snapshot": "arn:${Partition}:redshift:${Region}:${Account}:snapshot:${ClusterName}/${SnapshotName}", "snapshotcopygrant": "arn:${Partition}:redshift:${Region}:${Account}:snapshotcopygrant:${SnapshotCopyGrantName}", "snapshotschedule": "arn:${Partition}:redshift:${Region}:${Account}:snapshotschedule:${ScheduleIdentifier}", "subnetgroup": "arn:${Partition}:redshift:${Region}:${Account}:subnetgroup:${SubnetGroupName}", "usagelimit": "arn:${Partition}:redshift:${Region}:${Account}:usagelimit:${UsageLimitId}"}, "redshift-data": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "redshift-serverless": {"endpointAccess": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managedvpcendpoint/${EndpointAccessId}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupName}", "namespace": "arn:${Partition}:redshift-serverless:${Region}:${Account}:namespace/${NamespaceId}", "recoveryPoint": "arn:${Partition}:redshift-serverless:${Region}:${Account}:recoverypoint/${RecoveryPointId}", "snapshot": "arn:${Partition}:redshift-serverless:${Region}:${Account}:snapshot/${SnapshotId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "rekognition": {"collection": "arn:${Partition}:rekognition:${Region}:${Account}:collection/${CollectionId}", "dataset": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/dataset/${DatasetType}/${CreationTimestamp}", "project": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/${CreationTimestamp}", "projectversion": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/version/${VersionName}/${CreationTimestamp}", "streamprocessor": "arn:${Partition}:rekognition:${Region}:${Account}:streamprocessor/${StreamprocessorId}"}, "resource-explorer-2": {"index": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:index/${IndexUuid}", "managed-view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:managed-view/${ManagedViewName}/${ManagedViewUuid}", "view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:view/${ViewName}/${ViewUuid}"}, "resource-groups": {"group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}", "tagSyncTask": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}/tag-sync-task/${TaskId}"}, "route53": {"change": "arn:${Partition}:route53:::change/${Id}", "cidrcollection": "arn:${Partition}:route53:::cidrcollection/${Id}", "delegationset": "arn:${Partition}:route53:::delegationset/${Id}", "healthcheck": "arn:${Partition}:route53:::healthcheck/${Id}", "healthchecksource": "arn:${Partition}:route53:::healthchecksource/${Id}", "hostedzone": "arn:${Partition}:route53:::hostedzone/${Id}", "queryloggingconfig": "arn:${Partition}:route53:::queryloggingconfig/${Id}", "trafficpolicy": "arn:${Partition}:route53:::trafficpolicy/${Id}", "trafficpolicyinstance": "arn:${Partition}:route53:::trafficpolicyinstance/${Id}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}"}, "s3": {"accessgrant": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default/grant/${Token}", "accessgrantsinstance": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default", "accessgrantslocation": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default/location/${Token}", "accesspoint": "arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}", "accesspointobject": "arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}/object/${ObjectName}", "bucket": "arn:${Partition}:s3:::${BucketName}", "job": "arn:${Partition}:s3:${Region}:${Account}:job/${JobId}", "multiregionaccesspoint": "arn:${Partition}:s3::${Account}:accesspoint/${AccessPointAlias}", "multiregionaccesspointrequestarn": "arn:${Partition}:s3:us-west-2:${Account}:async-request/mrap/${Operation}/${Token}", "object": "arn:${Partition}:s3:::${BucketName}/${ObjectName}", "objectlambdaaccesspoint": "arn:${Partition}:s3-object-lambda:${Region}:${Account}:accesspoint/${AccessPointName}", "storagelensconfiguration": "arn:${Partition}:s3:${Region}:${Account}:storage-lens/${ConfigId}", "storagelensgroup": "arn:${Partition}:s3:${Region}:${Account}:storage-lens-group/${Name}"}, "s3tables": {"Table": "arn:${Partition}:s3tables:${Region}:${Account}:bucket/${TableBucketName}/table/${TableID}", "TableBucket": "arn:${Partition}:s3tables:${Region}:${Account}:bucket/${TableBucketName}"}, "s3vectors": {"Index": "arn:${Partition}:s3vectors:${Region}:${Account}:bucket/${BucketName}/index/${IndexName}", "VectorBucket": "arn:${Partition}:s3vectors:${Region}:${Account}:bucket/${BucketName}"}, "scheduler": {"schedule": "arn:${Partition}:scheduler:${Region}:${Account}:schedule/${GroupName}/${ScheduleName}", "schedule-group": "arn:${Partition}:scheduler:${Region}:${Account}:schedule-group/${GroupName}"}, "secretsmanager": {"Secret": "arn:${Partition}:secretsmanager:${Region}:${Account}:secret:${SecretId}"}, "securityhub": {"aggregatorv2": "arn:${Partition}:securityhub:${Region}:${Account}:aggregatorv2/${AggregatorV2Id}", "automation-rule": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rule/${AutomationRuleId}", "automation-rulev2": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rulev2/${AutomationRuleV2Id}", "configuration-policy": "arn:${Partition}:securityhub:${Region}:${Account}:configuration-policy/${ConfigurationPolicyId}", "connector": "arn:${Partition}:securityhub:${Region}:${Account}:connector/${ConnectorId}", "connectorv2": "arn:${Partition}:securityhub:${Region}:${Account}:connectorv2/${ConnectorV2Id}", "finding-aggregator": "arn:${Partition}:securityhub:${Region}:${Account}:finding-aggregator/${FindingAggregatorId}", "hub": "arn:${Partition}:securityhub:${Region}:${Account}:hub/default", "hubv2": "arn:${Partition}:securityhub:${Region}:${Account}:hubv2/${HubV2Id}", "product": "arn:${Partition}:securityhub:${Region}:${Account}:product/${Company}/${ProductId}"}, "servicediscovery": {"namespace": "arn:${Partition}:servicediscovery:${Region}:${Account}:namespace/${NamespaceId}", "service": "arn:${Partition}:servicediscovery:${Region}:${Account}:service/${ServiceId}"}, "servicequotas": {"quota": "arn:${Partition}:servicequotas:${Region}:${Account}:${ServiceCode}/${QuotaCode}"}, "signer": {"signing-job": "arn:${Partition}:signer:${Region}:${Account}:/signing-jobs/${JobId}", "signing-profile": "arn:${Partition}:signer:${Region}:${Account}:/signing-profiles/${ProfileName}"}, "sns": {"topic": "arn:${Partition}:sns:${Region}:${Account}:${TopicName}"}, "sqs": {"queue": "arn:${Partition}:sqs:${Region}:${Account}:${QueueName}"}, "ssm": {"association": "arn:${Partition}:ssm:${Region}:${Account}:association/${AssociationId}", "automation-definition": "arn:${Partition}:ssm:${Region}:${Account}:automation-definition/${AutomationDefinitionName}:${VersionId}", "automation-execution": "arn:${Partition}:ssm:${Region}:${Account}:automation-execution/${AutomationExecutionId}", "bucket": "arn:${Partition}:s3:::${BucketName}", "cloud-connector": "arn:${Partition}:ssm:${Region}:${Account}:cloud-connector/${CloudConnectorId}", "document": "arn:${Partition}:ssm:${Region}:${Account}:document/${DocumentName}", "iam-role": "arn:${Partition}:iam::${Account}:role/${RoleName}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "maintenancewindow": "arn:${Partition}:ssm:${Region}:${Account}:maintenancewindow/${ResourceId}", "managed-instance": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance/${InstanceId}", "managed-instance-inventory": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance-inventory/${InstanceId}", "opsitem": "arn:${Partition}:ssm:${Region}:${Account}:opsitem/${ResourceId}", "opsitemgroup": "arn:${Partition}:ssm:${Region}:${Account}:opsitemgroup/default", "opsmetadata": "arn:${Partition}:ssm:${Region}:${Account}:opsmetadata/${ResourceId}", "parameter": "arn:${Partition}:ssm:${Region}:${Account}:parameter/${ParameterNameWithoutLeadingSlash}", "patchbaseline": "arn:${Partition}:ssm:${Region}:${Account}:patchbaseline/${PatchBaselineIdResourceId}", "resourcedatasync": "arn:${Partition}:ssm:${Region}:${Account}:resource-data-sync/${SyncName}", "servicesetting": "arn:${Partition}:ssm:${Region}:${Account}:servicesetting/${ResourceId}", "session": "arn:${Partition}:ssm:${Region}:${Account}:session/${SessionId}", "task": "arn:${Partition}:ecs:${Region}:${Account}:task/${TaskId}", "windowtarget": "arn:${Partition}:ssm:${Region}:${Account}:windowtarget/${WindowTargetId}", "windowtask": "arn:${Partition}:ssm:${Region}:${Account}:windowtask/${WindowTaskId}"}, "sso": {"Account": "arn:${Partition}:sso:::account/${AccountId}", "Application": "arn:${Partition}:sso::${Account}:application/${InstanceId}/${ApplicationId}", "ApplicationProvider": "arn:${Partition}:sso::aws:applicationProvider/${ApplicationProviderId}", "Instance": "arn:${Partition}:sso:::instance/${InstanceId}", "PermissionSet": "arn:${Partition}:sso:::permissionSet/${InstanceId}/${PermissionSetId}", "TrustedTokenIssuer": "arn:${Partition}:sso::${Account}:trustedTokenIssuer/${InstanceId}/${TrustedTokenIssuerId}"}, "states": {"activity": "arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}", "execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}:${ExecutionId}", "express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}:${ExecutionId}:${ExpressId}", "labelled execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}/${MapRunLabel}:${ExecutionId}", "labelled express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}/${MapRunLabel}:${ExecutionId}:${ExpressId}", "maprun": "arn:${Partition}:states:${Region}:${Account}:mapRun:${StateMachineName}/${MapRunLabel}:${MapRunId}", "statemachine": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}", "statemachinealias": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineAliasName}", "statemachineversion": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineVersionId}"}, "sts": {"context-provider": "arn:${Partition}:iam::aws:contextProvider/${ContextProviderName}", "federated-user": "arn:${Partition}:sts::${Account}:federated-user/${FederatedUserName}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "root-user": "arn:${Partition}:iam::${Account}:root", "self-session": "arn:${Partition}:sts::${Account}:self"}, "textract": {"adapter": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}", "adapterversion": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}/versions/${AdapterVersion}", "blueprint": "arn:${Partition}:textract:${Region}:${Account}:blueprint/${BlueprintId}", "job": "arn:${Partition}:textract:${Region}:${Account}:job/${JobId}", "project": "arn:${Partition}:textract:${Region}:${Account}:project/${ProjectId}"}, "timestream-influxdb": {"db-backup": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-backup/${DbBackupId}", "db-cluster": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-cluster/${DbClusterId}", "db-instance": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-instance/${DbInstanceIdentifier}", "db-parameter-group": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-parameter-group/${DbParameterGroupIdentifier}"}, "translate": {"parallel-data": "arn:${Partition}:translate:${Region}:${Account}:parallel-data/${ResourceName}", "terminology": "arn:${Partition}:translate:${Region}:${Account}:terminology/${ResourceName}"}, "xray": {"group": "arn:${Partition}:xray:${Region}:${Account}:group/${GroupName}/${Id}", "sampling-rule": "arn:${Partition}:xray:${Region}:${Account}:sampling-rule/${SamplingRuleName}"}}, + "arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}", "PrivateBasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}+${DomainIdentifier}/basepathmappings/${BasePath}", "PrivateBasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}+${DomainIdentifier}/basepathmappings", "PrivateDomainName": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnames/${DomainName}+${DomainIdentifier}", "ProductPage": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}/productpages/${ProductPageId}", "ProductRestEndpointPage": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/${PortalProductId}/productrestendpointpages/${ProductRestEndpointPageId}", "RequestValidator": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/requestvalidators/${RequestValidatorId}", "RequestValidators": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/requestvalidators", "Resource": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}", "Resources": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources", "RestApi": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}", "RestApis": "arn:${Partition}:apigateway:${Region}::/restapis", "Route": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}", "RouteRequestParameter": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/requestparameters/${RequestParameterKey}", "RouteResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/routeresponses/${RouteResponseId}", "RouteResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes/${RouteId}/routeresponses", "RouteSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/routesettings/${RouteKey}", "Routes": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/routes", "RoutingRule": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnames/${DomainName}/routingrules/${RoutingRuleId}", "Sdk": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/stages/${StageName}/sdks/${SdkType}", "Stage": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}", "Stages": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages", "Tags": "arn:${Partition}:apigateway:${Region}::/tags/${UrlEncodedResourceARN}", "Template": "arn:${Partition}:apigateway:${Region}::/restapis/models/${ModelName}/template", "UsagePlan": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}", "UsagePlanKey": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}/keys/${Id}", "UsagePlanKeys": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsagePlanId}/keys", "UsagePlans": "arn:${Partition}:apigateway:${Region}::/usageplans", "VpcLink": "arn:${Partition}:apigateway:${Region}::/vpclinks/${VpcLinkId}", "VpcLinks": "arn:${Partition}:apigateway:${Region}::/vpclinks"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "aps": {"anomalydetector": "arn:${Partition}:aps:${Region}:${Account}:anomalydetector/${WorkspaceId}/${AnomalyDetectorId}", "cluster": "arn:${Partition}:eks:${Region}:${Account}:cluster/${ClusterName}", "rulegroupsnamespace": "arn:${Partition}:aps:${Region}:${Account}:rulegroupsnamespace/${WorkspaceId}/${Namespace}", "scraper": "arn:${Partition}:aps:${Region}:${Account}:scraper/${ScraperId}", "workspace": "arn:${Partition}:aps:${Region}:${Account}:workspace/${WorkspaceId}"}, "athena": {"capacity-reservation": "arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName}", "datacatalog": "arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName}", "session": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "bedrock": {"advanced-prompt-optimization-job": "arn:${Partition}:bedrock:${Region}:${Account}:advanced-prompt-optimization-job/${ResourceId}", "agent": "arn:${Partition}:bedrock:${Region}:${Account}:agent/${AgentId}", "agent-alias": "arn:${Partition}:bedrock:${Region}:${Account}:agent-alias/${AgentId}/${AgentAliasId}", "application-inference-profile": "arn:${Partition}:bedrock:${Region}:${Account}:application-inference-profile/${ResourceId}", "async-invoke": "arn:${Partition}:bedrock:${Region}:${Account}:async-invoke/${ResourceId}", "automated-reasoning-policy": "arn:${Partition}:bedrock:${Region}:${Account}:automated-reasoning-policy/${AutomatedReasoningPolicyId}", "automated-reasoning-policy-version": "arn:${Partition}:bedrock:${Region}:${Account}:automated-reasoning-policy/${AutomatedReasoningPolicyId}:${AutomatedReasoningPolicyVersion}", "bedrock-marketplace-model-endpoint": "arn:${Partition}:bedrock:${Region}:${Account}:marketplace/model-endpoint/all-access", "blueprint": "arn:${Partition}:bedrock:${Region}:${Account}:blueprint/${BlueprintId}", "blueprint-optimization-invocation": "arn:${Partition}:bedrock:${Region}:${Account}:blueprint-optimization-invocation/${ResourceId}", "custom-model": "arn:${Partition}:bedrock:${Region}:${Account}:custom-model/${ResourceId}", "custom-model-deployment": "arn:${Partition}:bedrock:${Region}:${Account}:custom-model-deployment/${ResourceId}", "data-automation-invocation-job": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-invocation/${JobId}", "data-automation-library": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-library/${DataAutomationLibraryId}", "data-automation-library-ingestion-job": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-library-ingestion-job/${IngestionJobId}", "data-automation-profile": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-profile/${ProfileId}", "data-automation-project": "arn:${Partition}:bedrock:${Region}:${Account}:data-automation-project/${ProjectId}", "default-prompt-router": "arn:${Partition}:bedrock:${Region}:${Account}:default-prompt-router/${ResourceId}", "evaluation-job": "arn:${Partition}:bedrock:${Region}:${Account}:evaluation-job/${ResourceId}", "flow": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}", "flow-alias": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}/alias/${FlowAliasId}", "flow-execution": "arn:${Partition}:bedrock:${Region}:${Account}:flow/${FlowId}/alias/${FlowAliasId}/execution/${FlowExecutionId}", "foundation-model": "arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}", "guardrail": "arn:${Partition}:bedrock:${Region}:${Account}:guardrail/${GuardrailId}", "guardrail-profile": "arn:${Partition}:bedrock:${Region}:${Account}:guardrail-profile/${ResourceId}", "imported-model": "arn:${Partition}:bedrock:${Region}:${Account}:imported-model/${ResourceId}", "inference-profile": "arn:${Partition}:bedrock:${Region}:${Account}:inference-profile/${ResourceId}", "knowledge-base": "arn:${Partition}:bedrock:${Region}:${Account}:knowledge-base/${KnowledgeBaseId}", "model-copy-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-copy-job/${ResourceId}", "model-customization-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-customization-job/${ResourceId}", "model-evaluation-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-evaluation-job/${ResourceId}", "model-import-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-import-job/${ResourceId}", "model-invocation-job": "arn:${Partition}:bedrock:${Region}:${Account}:model-invocation-job/${JobIdentifier}", "project": "arn:${Partition}:bedrock:${Region}:${Account}:project/${ResourceId}", "prompt": "arn:${Partition}:bedrock:${Region}:${Account}:prompt/${PromptId}", "prompt-router": "arn:${Partition}:bedrock:${Region}:${Account}:prompt-router/${ResourceId}", "prompt-version": "arn:${Partition}:bedrock:${Region}:${Account}:prompt/${PromptId}:${PromptVersion}", "provisioned-model": "arn:${Partition}:bedrock:${Region}:${Account}:provisioned-model/${ResourceId}", "retrieval-instruction": "arn:${Partition}:bedrock:${Region}:${Account}:retrieval-instruction/${RetrievalInstructionId}", "session": "arn:${Partition}:bedrock:${Region}:${Account}:session/${SessionId}", "system-tool": "arn:${Partition}:bedrock::${Account}:system-tool/${ResourceId}"}, "budgets": {"budget": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}", "budgetAction": "arn:${Partition}:budgets::${Account}:budget/${BudgetName}/action/${ActionId}"}, "ce": {"anomalymonitor": "arn:${Partition}:ce::${Account}:anomalymonitor/${Identifier}", "anomalysubscription": "arn:${Partition}:ce::${Account}:anomalysubscription/${Identifier}", "billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "costcategory": "arn:${Partition}:ce::${Account}:costcategory/${Identifier}"}, "cloudformation": {"changeset": "arn:${Partition}:cloudformation:${Region}:${Account}:changeSet/${ChangeSetName}/${Id}", "generatedtemplate": "arn:${Partition}:cloudformation:${Region}:${Account}:generatedTemplate/${Id}", "resourcescan": "arn:${Partition}:cloudformation:${Region}:${Account}:resourceScan/${Id}", "stack": "arn:${Partition}:cloudformation:${Region}:${Account}:stack/${StackName}/${Id}", "stackset": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset/${StackSetName}:${Id}", "stackset-target": "arn:${Partition}:cloudformation:${Region}:${Account}:stackset-target/${StackSetTarget}", "type": "arn:${Partition}:cloudformation:${Region}:${Account}:type/resource/${Type}", "typeHook": "arn:${Partition}:cloudformation:${Region}:${Account}:type/hook/${Type}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId}", "fleet": "arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId}", "project": "arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName}", "report": "arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId}", "report-group": "arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName}", "sandbox": "arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "controlcatalog": {"common-control": "arn:${Partition}:controlcatalog:::common-control/${CommonControlId}", "control": "arn:${Partition}:controlcatalog:::control/${ControlId}", "domain": "arn:${Partition}:controlcatalog:::domain/${DomainId}", "objective": "arn:${Partition}:controlcatalog:::objective/${ObjectiveId}"}, "controltower": {"Baseline": "arn:${Partition}:controltower:${Region}::baseline/${BaselineId}", "EnabledBaseline": "arn:${Partition}:controltower:${Region}:${Account}:enabledbaseline/${EnabledBaselineId}", "EnabledControl": "arn:${Partition}:controltower:${Region}:${Account}:enabledcontrol/${EnabledControlId}", "LandingZone": "arn:${Partition}:controltower:${Region}:${Account}:landingzone/${LandingZoneId}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "datasync": {"agent": "arn:${Partition}:datasync:${Region}:${Account}:agent/${AgentId}", "discoveryjob": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}/job/${DiscoveryJobId}", "location": "arn:${Partition}:datasync:${Region}:${Account}:location/${LocationId}", "storagesystem": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}", "task": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}", "taskexecution": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}/execution/${ExecutionId}"}, "dsql": {"Cluster": "arn:${Partition}:dsql:${Region}:${Account}:cluster/${Identifier}", "Stream": "arn:${Partition}:dsql:${Region}:${Account}:cluster/${ClusterId}/stream/${StreamId}"}, "dynamodb": {"backup": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/backup/${BackupName}", "bulk-operation": "arn:${Partition}:dynamodb:${Region}:${Account}:bulk-operation/${BulkOperationId}", "export": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/export/${ExportName}", "global-table": "arn:${Partition}:dynamodb::${Account}:global-table/${GlobalTableName}", "import": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/import/${ImportName}", "index": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/index/${IndexName}", "stream": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/stream/${StreamLabel}", "table": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}"}, "ec2": {"application-status-check": "arn:${Partition}:ec2:${Region}:${Account}:application-status-check/${ApplicationStatusCheckId}", "capacity-block": "arn:${Partition}:ec2:${Region}:${Account}:capacity-block/${CapacityBlockId}", "capacity-manager-data-export": "arn:${Partition}:ec2:${Region}:${Account}:capacity-manager-data-export/${CapacityManagerDataExportId}", "capacity-reservation": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId}", "capacity-reservation-cancellation-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-cancellation-quote/${CapacityReservationCancellationQuoteId}", "capacity-reservation-fleet": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-fleet/${CapacityReservationFleetId}", "capacity-reservation-modification-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-modification-quote/${CapacityReservationModificationQuoteId}", "carrier-gateway": "arn:${Partition}:ec2:${Region}:${Account}:carrier-gateway/${CarrierGatewayId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}", "client-vpn-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:client-vpn-endpoint/${ClientVpnEndpointId}", "coip-pool": "arn:${Partition}:ec2:${Region}:${Account}:coip-pool/${Ipv4PoolCoipId}", "customer-gateway": "arn:${Partition}:ec2:${Region}:${Account}:customer-gateway/${CustomerGatewayId}", "declarative-policies-report": "arn:${Partition}:ec2:${Region}:${Account}:declarative-policies-report/${DeclarativePoliciesReportId}", "dedicated-host": "arn:${Partition}:ec2:${Region}:${Account}:dedicated-host/${DedicatedHostId}", "dhcp-options": "arn:${Partition}:ec2:${Region}:${Account}:dhcp-options/${DhcpOptionsId}", "egress-only-internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:egress-only-internet-gateway/${EgressOnlyInternetGatewayId}", "elastic-gpu": "arn:${Partition}:ec2:${Region}:${Account}:elastic-gpu/${ElasticGpuId}", "elastic-inference": "arn:${Partition}:elastic-inference:${Region}:${Account}:elastic-inference-accelerator/${AcceleratorId}", "elastic-ip": "arn:${Partition}:ec2:${Region}:${Account}:elastic-ip/${AllocationId}", "export-image-task": "arn:${Partition}:ec2:${Region}:${Account}:export-image-task/${ExportImageTaskId}", "export-instance-task": "arn:${Partition}:ec2:${Region}:${Account}:export-instance-task/${ExportTaskId}", "fleet": "arn:${Partition}:ec2:${Region}:${Account}:fleet/${FleetId}", "fpga-image": "arn:${Partition}:ec2:${Region}:${Account}:fpga-image/${FpgaImageId}", "group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}", "host-reservation": "arn:${Partition}:ec2:${Region}:${Account}:host-reservation/${HostReservationId}", "image": "arn:${Partition}:ec2:${Region}::image/${ImageId}", "image-usage-report": "arn:${Partition}:ec2:${Region}:${Account}:image-usage-report/${ImageUsageReportId}", "import-image-task": "arn:${Partition}:ec2:${Region}:${Account}:import-image-task/${ImportImageTaskId}", "import-snapshot-task": "arn:${Partition}:ec2:${Region}:${Account}:import-snapshot-task/${ImportSnapshotTaskId}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId}", "instance-event-window": "arn:${Partition}:ec2:${Region}:${Account}:instance-event-window/${InstanceEventWindowId}", "internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:internet-gateway/${InternetGatewayId}", "ipam": "arn:${Partition}:ec2::${Account}:ipam/${IpamId}", "ipam-external-resource-verification-token": "arn:${Partition}:ec2::${Account}:ipam-external-resource-verification-token/${IpamExternalResourceVerificationTokenId}", "ipam-internet-registry-association": "arn:${Partition}:ec2::${Account}:ipam-internet-registry-association/${IpamInternetRegistryAssociationId}", "ipam-policy": "arn:${Partition}:ec2::${Account}:ipam-policy/${IpamPolicyId}", "ipam-pool": "arn:${Partition}:ec2::${Account}:ipam-pool/${IpamPoolId}", "ipam-pool-allocation": "arn:${Partition}:ec2:${Region}:${Account}:ipam-pool-allocation/${IpamPoolAllocationId}", "ipam-prefix-list-resolver": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver/${IpamPrefixListResolverId}", "ipam-prefix-list-resolver-target": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver-target/${IpamPrefixListResolverTargetId}", "ipam-resource-discovery": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery/${IpamResourceDiscoveryId}", "ipam-resource-discovery-association": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery-association/${IpamResourceDiscoveryAssociationId}", "ipam-scope": "arn:${Partition}:ec2::${Account}:ipam-scope/${IpamScopeId}", "ipv4pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv4pool-ec2/${Ipv4PoolEc2Id}", "ipv6pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv6pool-ec2/${Ipv6PoolEc2Id}", "key-pair": "arn:${Partition}:ec2:${Region}:${Account}:key-pair/${KeyPairName}", "launch-template": "arn:${Partition}:ec2:${Region}:${Account}:launch-template/${LaunchTemplateId}", "license-configuration": "arn:${Partition}:license-manager:${Region}:${Account}:license-configuration:${LicenseConfigurationId}", "local-gateway": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway/${LocalGatewayId}", "local-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table/${LocalGatewayRoutetableId}", "local-gateway-route-table-virtual-interface-group-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-virtual-interface-group-association/${LocalGatewayRouteTableVirtualInterfaceGroupAssociationId}", "local-gateway-route-table-vpc-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-vpc-association/${LocalGatewayRouteTableVpcAssociationId}", "local-gateway-virtual-interface": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface/${LocalGatewayVirtualInterfaceId}", "local-gateway-virtual-interface-group": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface-group/${LocalGatewayVirtualInterfaceGroupId}", "mac-modification-task": "arn:${Partition}:ec2:${Region}:${Account}:mac-modification-task/${MacModificationTaskId}", "natgateway": "arn:${Partition}:ec2:${Region}:${Account}:natgateway/${NatGatewayId}", "network-acl": "arn:${Partition}:ec2:${Region}:${Account}:network-acl/${NaclId}", "network-insights-access-scope": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope/${NetworkInsightsAccessScopeId}", "network-insights-access-scope-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope-analysis/${NetworkInsightsAccessScopeAnalysisId}", "network-insights-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-analysis/${NetworkInsightsAnalysisId}", "network-insights-path": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-path/${NetworkInsightsPathId}", "network-interface": "arn:${Partition}:ec2:${Region}:${Account}:network-interface/${NetworkInterfaceId}", "outpost-lag": "arn:${Partition}:ec2:${Region}:${Account}:outpost-lag/${OutpostLagId}", "placement-group": "arn:${Partition}:ec2:${Region}:${Account}:placement-group/${PlacementGroupName}", "prefix-list": "arn:${Partition}:ec2:${Region}:${Account}:prefix-list/${PrefixListId}", "replace-root-volume-task": "arn:${Partition}:ec2:${Region}:${Account}:replace-root-volume-task/${ReplaceRootVolumeTaskId}", "reserved-instances": "arn:${Partition}:ec2:${Region}:${Account}:reserved-instances/${ReservationId}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "route-server": "arn:${Partition}:ec2:${Region}:${Account}:route-server/${RouteServerId}", "route-server-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:route-server-endpoint/${RouteServerEndpointId}", "route-server-peer": "arn:${Partition}:ec2:${Region}:${Account}:route-server-peer/${RouteServerPeerId}", "route-table": "arn:${Partition}:ec2:${Region}:${Account}:route-table/${RouteTableId}", "secondary-interface": "arn:${Partition}:ec2:${Region}:${Account}:secondary-interface/${SecondaryInterfaceId}", "secondary-network": "arn:${Partition}:ec2:${Region}:${Account}:secondary-network/${SecondaryNetworkId}", "secondary-subnet": "arn:${Partition}:ec2:${Region}:${Account}:secondary-subnet/${SecondarySubnetId}", "security-group": "arn:${Partition}:ec2:${Region}:${Account}:security-group/${SecurityGroupId}", "security-group-rule": "arn:${Partition}:ec2:${Region}:${Account}:security-group-rule/${SecurityGroupRuleId}", "snapshot": "arn:${Partition}:ec2:${Region}::snapshot/${SnapshotId}", "spot-fleet-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-fleet-request/${SpotFleetRequestId}", "spot-instances-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-instances-request/${SpotInstanceRequestId}", "subnet": "arn:${Partition}:ec2:${Region}:${Account}:subnet/${SubnetId}", "subnet-cidr-reservation": "arn:${Partition}:ec2:${Region}:${Account}:subnet-cidr-reservation/${SubnetCidrReservationId}", "traffic-mirror-filter": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter/${TrafficMirrorFilterId}", "traffic-mirror-filter-rule": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter-rule/${TrafficMirrorFilterRuleId}", "traffic-mirror-session": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-session/${TrafficMirrorSessionId}", "traffic-mirror-target": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-target/${TrafficMirrorTargetId}", "transit-gateway": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway/${TransitGatewayId}", "transit-gateway-attachment": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-attachment/${TransitGatewayAttachmentId}", "transit-gateway-connect-peer": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-connect-peer/${TransitGatewayConnectPeerId}", "transit-gateway-metering-policy": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-metering-policy/${TransitGatewayMeteringPolicyId}", "transit-gateway-multicast-domain": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-multicast-domain/${TransitGatewayMulticastDomainId}", "transit-gateway-policy-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-policy-table/${TransitGatewayPolicyTableId}", "transit-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table/${TransitGatewayRouteTableId}", "transit-gateway-route-table-announcement": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table-announcement/${TransitGatewayRouteTableAnnouncementId}", "verified-access-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint/${VerifiedAccessEndpointId}", "verified-access-endpoint-target": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint-target/${VerifiedAccessEndpointTargetId}", "verified-access-group": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-group/${VerifiedAccessGroupId}", "verified-access-instance": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-instance/${VerifiedAccessInstanceId}", "verified-access-policy": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-policy/${VerifiedAccessPolicyId}", "verified-access-trust-provider": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-trust-provider/${VerifiedAccessTrustProviderId}", "volume": "arn:${Partition}:ec2:${Region}:${Account}:volume/${VolumeId}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}", "vpc-block-public-access-exclusion": "arn:${Partition}:ec2:${Region}:${Account}:vpc-block-public-access-exclusion/${VpcBlockPublicAccessExclusionId}", "vpc-encryption-control": "arn:${Partition}:ec2:${Region}:${Account}:vpc-encryption-control/${VpcEncryptionControlId}", "vpc-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint/${VpcEndpointId}", "vpc-endpoint-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-connection/${VpcEndpointConnectionId}", "vpc-endpoint-service": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service/${VpcEndpointServiceId}", "vpc-endpoint-service-permission": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service-permission/${VpcEndpointServicePermissionId}", "vpc-flow-log": "arn:${Partition}:ec2:${Region}:${Account}:vpc-flow-log/${VpcFlowLogId}", "vpc-peering-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-peering-connection/${VpcPeeringConnectionId}", "vpn-concentrator": "arn:${Partition}:ec2:${Region}:${Account}:vpn-concentrator/${VpnConcentratorId}", "vpn-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection/${VpnConnectionId}", "vpn-connection-device-type": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection-device-type/${VpnConnectionDeviceTypeId}", "vpn-gateway": "arn:${Partition}:ec2:${Region}:${Account}:vpn-gateway/${VpnGatewayId}"}, "ec2-instance-connect": {"instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "ecs": {"capacity-provider": "arn:${Partition}:ecs:${Region}:${Account}:capacity-provider/${CapacityProviderName}", "cluster": "arn:${Partition}:ecs:${Region}:${Account}:cluster/${ClusterName}", "container-instance": "arn:${Partition}:ecs:${Region}:${Account}:container-instance/${ClusterName}/${ContainerInstanceId}", "daemon": "arn:${Partition}:ecs:${Region}:${Account}:daemon/${ClusterName}/${DaemonName}", "daemon-deployment": "arn:${Partition}:ecs:${Region}:${Account}:daemon-deployment/${ClusterName}/${DaemonName}/${DaemonDeploymentId}", "daemon-revision": "arn:${Partition}:ecs:${Region}:${Account}:daemon-revision/${ClusterName}/${DaemonName}/${DaemonRevisionId}", "daemon-task-definition": "arn:${Partition}:ecs:${Region}:${Account}:daemon-task-definition/${DaemonTaskDefinitionFamilyName}:${DaemonTaskDefinitionRevisionNumber}", "gateway": "arn:${Partition}:ecs:${Region}:${Account}:gateway/${GatewayName}/${GatewayId}", "gateway-route": "arn:${Partition}:ecs:${Region}:${Account}:gateway-route/${GatewayName}/${GatewayId}/${RouteId}", "service": "arn:${Partition}:ecs:${Region}:${Account}:service/${ClusterName}/${ServiceName}", "service-deployment": "arn:${Partition}:ecs:${Region}:${Account}:service-deployment/${ClusterName}/${ServiceName}/${ServiceDeploymentId}", "service-revision": "arn:${Partition}:ecs:${Region}:${Account}:service-revision/${ClusterName}/${ServiceName}/${ServiceRevisionId}", "task": "arn:${Partition}:ecs:${Region}:${Account}:task/${ClusterName}/${TaskId}", "task-definition": "arn:${Partition}:ecs:${Region}:${Account}:task-definition/${TaskDefinitionFamilyName}:${TaskDefinitionRevisionNumber}", "task-set": "arn:${Partition}:ecs:${Region}:${Account}:task-set/${ClusterName}/${ServiceName}/${TaskSetId}"}, "eks": {"access-entry": "arn:${Partition}:eks:${Region}:${Account}:access-entry/${ClusterName}/${IamIdentityType}/${IamIdentityAccountID}/${IamIdentityName}/${UUID}", "access-policy": "arn:${Partition}:eks::aws:cluster-access-policy/${AccessPolicyName}", "addon": "arn:${Partition}:eks:${Region}:${Account}:addon/${ClusterName}/${AddonName}/${UUID}", "capability": "arn:${Partition}:eks:${Region}:${Account}:capability/${ClusterName}/${CapabilityType}/${CapabilityName}/${UUID}", "cluster": "arn:${Partition}:eks:${Region}:${Account}:cluster/${ClusterName}", "dashboard": "arn:${Partition}:eks:${Region}:${Account}:dashboard/${DashboardName}", "eks-anywhere-subscription": "arn:${Partition}:eks:${Region}:${Account}:eks-anywhere-subscription/${UUID}", "fargateprofile": "arn:${Partition}:eks:${Region}:${Account}:fargateprofile/${ClusterName}/${FargateProfileName}/${UUID}", "identityproviderconfig": "arn:${Partition}:eks:${Region}:${Account}:identityproviderconfig/${ClusterName}/${IdentityProviderType}/${IdentityProviderConfigName}/${UUID}", "nodegroup": "arn:${Partition}:eks:${Region}:${Account}:nodegroup/${ClusterName}/${NodegroupName}/${UUID}", "podidentityassociation": "arn:${Partition}:eks:${Region}:${Account}:podidentityassociation/${ClusterName}/${UUID}"}, "elasticloadbalancing": {"listener-rule/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener-rule/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener-rule/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}/${ListenerRuleId}", "listener/app": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/app/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/gwy": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/gwy/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "listener/net": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:listener/net/${LoadBalancerName}/${LoadBalancerId}/${ListenerId}", "loadbalancer": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/${LoadBalancerName}", "loadbalancer/app/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/gwy/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/gwy/${LoadBalancerName}/${LoadBalancerId}", "loadbalancer/net/": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/net/${LoadBalancerName}/${LoadBalancerId}", "targetgroup": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:targetgroup/${TargetGroupName}/${TargetGroupId}", "truststore": "arn:${Partition}:elasticloadbalancing:${Region}:${Account}:truststore/${TrustStoreName}/${TrustStoreId}"}, "elasticmapreduce": {"cluster": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:cluster/${ClusterId}", "editor": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:editor/${EditorId}", "notebook-execution": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:notebook-execution/${NotebookExecutionId}", "session": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:cluster/${ClusterId}/session/${SessionId}", "studio": "arn:${Partition}:elasticmapreduce:${Region}:${Account}:studio/${StudioId}"}, "emr-containers": {"jobRun": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}/jobruns/${JobRunId}", "jobTemplate": "arn:${Partition}:emr-containers:${Region}:${Account}:/jobtemplates/${JobTemplateId}", "managedEndpoint": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}/endpoints/${EndpointId}", "securityConfiguration": "arn:${Partition}:emr-containers:${Region}:${Account}:/securityconfigurations/${SecurityConfigurationId}", "virtualCluster": "arn:${Partition}:emr-containers:${Region}:${Account}:/virtualclusters/${VirtualClusterId}"}, "emr-serverless": {"application": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}", "jobRun": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/jobruns/${JobRunId}", "session": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/sessions/${SessionId}"}, "es": {"application": "arn:${Partition}:opensearch:${Region}:${Account}:application/${AppId}", "datasource": "arn:${Partition}:opensearch:${Region}:${Account}:datasource/${DataSourceName}", "domain": "arn:${Partition}:es:${Region}:${Account}:domain/${DomainName}", "es_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/es.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService", "opensearchservice_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/opensearchservice.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService"}, "events": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "api-destination": "arn:${Partition}:events:${Region}:${Account}:api-destination/${ApiDestinationName}", "archive": "arn:${Partition}:events:${Region}:${Account}:archive/${ArchiveName}", "connection": "arn:${Partition}:events:${Region}:${Account}:connection/${ConnectionName}", "create-snapshot": "arn:${Partition}:events:${Region}:${Account}:target/create-snapshot", "endpoint": "arn:${Partition}:events:${Region}:${Account}:endpoint/${EndpointName}", "event-bus": "arn:${Partition}:events:${Region}:${Account}:event-bus/${EventBusName}", "event-busv2": "arn:${Partition}:events:${Region}:${Account}:event-busv2/${EventBusName}/${OpaqueId}", "event-source": "arn:${Partition}:events:${Region}::event-source/${EventSourceName}", "event-sourcev2": "arn:${Partition}:events:${Region}:${Account}:event-sourcev2/${SourceType}/${EventSourceName}/${OpaqueId}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "reboot-instance": "arn:${Partition}:events:${Region}:${Account}:target/reboot-instance", "replay": "arn:${Partition}:events:${Region}:${Account}:replay/${ReplayName}", "rule-on-custom-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}", "rule-on-default-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}", "stop-instance": "arn:${Partition}:events:${Region}:${Account}:target/stop-instance", "subscriber": "arn:${Partition}:events:${Region}:${Account}:subscriber/${SubscriberName}/${OpaqueId}", "terminate-instance": "arn:${Partition}:events:${Region}:${Account}:target/terminate-instance"}, "firehose": {"deliverystream": "arn:${Partition}:firehose:${Region}:${Account}:deliverystream/${DeliveryStreamName}"}, "fis": {"action": "arn:${Partition}:fis:${Region}:${Account}:action/${Id}", "experiment": "arn:${Partition}:fis:${Region}:${Account}:experiment/${Id}", "experiment-template": "arn:${Partition}:fis:${Region}:${Account}:experiment-template/${Id}", "safety-lever": "arn:${Partition}:fis:${Region}:${Account}:safety-lever/${Id}"}, "globalaccelerator": {"accelerator": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}", "attachment": "arn:${Partition}:globalaccelerator::${Account}:attachment/${ResourceId}", "endpointgroup": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}/endpoint-group/${EndpointGroupId}", "listener": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}"}, "glue": {"blueprint": "arn:${Partition}:glue:${Region}:${Account}:blueprint/${BlueprintName}", "catalog": "arn:${Partition}:glue:${Region}:${Account}:catalog/${CatalogName}", "completion": "arn:${Partition}:glue:${Region}:${Account}:completion/${CompletionId}", "connection": "arn:${Partition}:glue:${Region}:${Account}:connection/${ConnectionName}", "connectionType": "arn:${Partition}:glue:${Region}:${Account}:connectionType:${ConnectionTypeName}", "crawler": "arn:${Partition}:glue:${Region}:${Account}:crawler/${CrawlerName}", "customEntityType": "arn:${Partition}:glue:${Region}:${Account}:customEntityType/${CustomEntityTypeId}", "dataQualityEvaluationConfig": "arn:${Partition}:glue:${Region}:${Account}:dataQualityEvaluationConfig/${EvaluationConfigName}", "dataQualityRuleset": "arn:${Partition}:glue:${Region}:${Account}:dataQualityRuleset/${RulesetName}", "database": "arn:${Partition}:glue:${Region}:${Account}:database/${DatabaseName}", "devendpoint": "arn:${Partition}:glue:${Region}:${Account}:devEndpoint/${DevEndpointName}", "integration": "arn:${Partition}:glue:${Region}:${Account}:integration:${IntegrationId}", "integrationResourceProperty": "arn:${Partition}:glue:${Region}:${Account}:integrationresourceproperty/${ResourceType}/${ResourceName}", "job": "arn:${Partition}:glue:${Region}:${Account}:job/${JobName}", "mlTransform": "arn:${Partition}:glue:${Region}:${Account}:mlTransform/${TransformId}", "registry": "arn:${Partition}:glue:${Region}:${Account}:registry/${RegistryName}", "rootcatalog": "arn:${Partition}:glue:${Region}:${Account}:catalog", "schema": "arn:${Partition}:glue:${Region}:${Account}:schema/${SchemaName}", "session": "arn:${Partition}:glue:${Region}:${Account}:session/${SessionId}", "table": "arn:${Partition}:glue:${Region}:${Account}:table/${DatabaseName}/${TableName}", "tableversion": "arn:${Partition}:glue:${Region}:${Account}:tableVersion/${DatabaseName}/${TableName}/${TableVersionName}", "trigger": "arn:${Partition}:glue:${Region}:${Account}:trigger/${TriggerName}", "usageProfile": "arn:${Partition}:glue:${Region}:${Account}:usageProfile/${UsageProfileId}", "userdefinedfunction": "arn:${Partition}:glue:${Region}:${Account}:userDefinedFunction/${DatabaseName}/${UserDefinedFunctionName}", "workflow": "arn:${Partition}:glue:${Region}:${Account}:workflow/${WorkflowName}"}, "guardduty": {"customdetectionrule": "arn:${Partition}:guardduty::aws:detection-rule/custom/${RuleId}", "customdetectionruleassociation": "arn:${Partition}:guardduty:${Region}:${Account}:detection-rule/custom/${RuleId}/association/${AssociationId}", "detector": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}", "filter": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/filter/${FilterName}", "ipset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/ipset/${IPSetId}", "malwareprotectionplan": "arn:${Partition}:guardduty:${Region}:${Account}:malware-protection-plan/${MalwareProtectionPlanId}", "publishingDestination": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/publishingdestination/${PublishingDestinationId}", "threatentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatentityset/${ThreatEntitySetId}", "threatintelset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatintelset/${ThreatIntelSetId}", "trustedentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/trustedentityset/${TrustedEntitySetId}"}, "inspector2": {"CIS Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/cis-configuration/${CISScanConfigurationId}", "Code Security Integration": "arn:${Partition}:inspector2:${Region}:${Account}:codesecurity-integration/${CodeSecurityIntegrationId}", "Code Security Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/codesecurity-configuration/${CodeSecurityScanConfigurationId}", "Connector": "arn:${Partition}:inspector2:${Region}:${Account}:connector/${ConnectorId}", "Filter": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/filter/${FilterId}", "Finding": "arn:${Partition}:inspector2:${Region}:${Account}:finding/${FindingId}"}, "kinesis": {"channel": "arn:${Partition}:kinesis:${Region}:${Account}:channel/${ChannelId}", "consumer": "arn:${Partition}:kinesis:${Region}:${Account}:${StreamType}/${StreamName}/consumer/${ConsumerName}:${ConsumerCreationTimpstamp}", "kmsKey": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "queue": "arn:${Partition}:kinesis:${Region}:${Account}:queue/${QueueId}", "stream": "arn:${Partition}:kinesis:${Region}:${Account}:stream/${StreamName}"}, "kinesisanalytics": {"application": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:application/${ApplicationName}", "snapshot": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:snapshot/${SnapshotName}"}, "kms": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}"}, "lambda": {"capacityProvider": "arn:${Partition}:lambda:${Region}:${Account}:capacity-provider:${CapacityProviderName}", "code signing config": "arn:${Partition}:lambda:${Region}:${Account}:code-signing-config:${CodeSigningConfigId}", "durable execution": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Version}/durable-execution/${ExecutionName}/${ExecutionId}", "eventSourceMapping": "arn:${Partition}:lambda:${Region}:${Account}:event-source-mapping:${UUID}", "function": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}", "function alias": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Alias}", "function version": "arn:${Partition}:lambda:${Region}:${Account}:function:${FunctionName}:${Version}", "layer": "arn:${Partition}:lambda:${Region}:${Account}:layer:${LayerName}", "layerVersion": "arn:${Partition}:lambda:${Region}:${Account}:layer:${LayerName}:${LayerVersion}", "microvmImage": "arn:${Partition}:lambda:${Region}:${Account}:microvm-image:${MicrovmImageName}", "networkConnector": "arn:${Partition}:lambda:${Region}:${Account}:network-connector:${NetworkConnectorId}", "runtime": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}", "runtimeAlias": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}/alias/${Name}", "runtimeVersion": "arn:${Partition}:lambda:${Region}:${Account}:runtime/${RuntimeName}/version/${Name}", "webFunction": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}", "webFunctionEndpoint": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}/endpoint/${EndpointName}", "webFunctionRevision": "arn:${Partition}:lambda:${Region}:${Account}:web-function/${FunctionName}/revision/${RevisionId}"}, "logs": {"anomaly-detector": "arn:${Partition}:logs:${Region}:${Account}:anomaly-detector:${DetectorId}", "delivery": "arn:${Partition}:logs:${Region}:${Account}:delivery:${DeliveryName}", "delivery-destination": "arn:${Partition}:logs:${Region}:${Account}:delivery-destination:${DeliveryDestinationName}", "delivery-source": "arn:${Partition}:logs:${Region}:${Account}:delivery-source:${DeliverySourceName}", "destination": "arn:${Partition}:logs:${Region}:${Account}:destination:${DestinationName}", "log-group": "arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}", "log-stream": "arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}", "lookup-table": "arn:${Partition}:logs:${Region}:${Account}:lookup-table:${LookupTableName}", "scheduled-query": "arn:${Partition}:logs:${Region}:${Account}:scheduled-query:${ScheduledQueryId}"}, "macie2": {"AllowList": "arn:${Partition}:macie2:${Region}:${Account}:allow-list/${ResourceId}", "ClassificationJob": "arn:${Partition}:macie2:${Region}:${Account}:classification-job/${ResourceId}", "CustomDataIdentifier": "arn:${Partition}:macie2:${Region}:${Account}:custom-data-identifier/${ResourceId}", "FindingsFilter": "arn:${Partition}:macie2:${Region}:${Account}:findings-filter/${ResourceId}", "Member": "arn:${Partition}:macie2:${Region}:${Account}:member/${ResourceId}"}, "oam": {"Link": "arn:${Partition}:oam:${Region}:${Account}:link/${ResourceId}", "Sink": "arn:${Partition}:oam:${Region}:${Account}:sink/${ResourceId}"}, "payment-cryptography": {"alias": "arn:${Partition}:payment-cryptography:${Region}:${Account}:alias/${Alias}", "approval-team": "arn:${Partition}:mpa:${Region}:${Account}:approval-team/${ApprovalTeamId}", "key": "arn:${Partition}:payment-cryptography:${Region}:${Account}:key/${KeyId}"}, "pipes": {"pipe": "arn:${Partition}:pipes:${Region}:${Account}:pipe/${Name}"}, "quicksight": {"accessControlApplication": "arn:${Partition}:quicksight:${Region}:${Account}:access-control-application/${ResourceId}", "account": "arn:${Partition}:quicksight:${Region}:${Account}:account/${ResourceId}", "actionconnector": "arn:${Partition}:quicksight:${Region}:${Account}:action-connector/${ResourceId}", "agent": "arn:${Partition}:quicksight:${Region}:${Account}:agent/${ResourceId}", "analysis": "arn:${Partition}:quicksight:${Region}:${Account}:analysis/${ResourceId}", "app": "arn:${Partition}:quicksight:${Region}:${Account}:app/${ResourceId}", "approvalPolicy": "arn:${Partition}:quicksight:${Region}:${Account}:approval-policy/${ResourceId}", "assetBundleExportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-export-job/${ResourceId}", "assetBundleImportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-import-job/${ResourceId}", "assignment": "arn:${Partition}:quicksight::${Account}:assignment/${ResourceId}", "automation": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${ResourceId}", "automationGroup": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${ResourceId}", "automationJob": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${AutomationId}/job/${ResourceId}", "brand": "arn:${Partition}:quicksight:${Region}:${Account}:brand/${ResourceId}", "customization": "arn:${Partition}:quicksight:${Region}:${Account}:customization/${ResourceId}", "custompermissions": "arn:${Partition}:quicksight:${Region}:${Account}:custompermissions/${ResourceId}", "dashboard": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${ResourceId}", "dashboardSnapshotJob": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${DashboardId}/snapshot-job/${ResourceId}", "dataset": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${ResourceId}", "datasource": "arn:${Partition}:quicksight:${Region}:${Account}:datasource/${ResourceId}", "dlpSetting": "arn:${Partition}:quicksight:${Region}:${Account}:dlpsetting/${ResourceId}", "emailCustomizationTemplate": "arn:${Partition}:quicksight:${Region}:${Account}:email-customization-template/${ResourceId}", "extension": "arn:${Partition}:quicksight:${Region}:${Account}:extension/${ResourceId}", "extensionaccess": "arn:${Partition}:quicksight:${Region}:${Account}:extension-access/${ResourceId}", "flow": "arn:${Partition}:quicksight:${Region}:${Account}:flow/${ResourceId}", "folder": "arn:${Partition}:quicksight:${Region}:${Account}:folder/${ResourceId}", "group": "arn:${Partition}:quicksight:${Region}:${Account}:group/${ResourceId}", "inboundConnector": "arn:${Partition}:quicksight:${Region}:${Account}:inbound-connector/${ResourceId}", "ingestion": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/ingestion/${ResourceId}", "knowledgeBase": "arn:${Partition}:quicksight:${Region}:${Account}:knowledge-base/${ResourceId}", "limitsProfile": "arn:${Partition}:quicksight:${Region}:${Account}:limits-profile/${ResourceId}", "namespace": "arn:${Partition}:quicksight:${Region}:${Account}:namespace/${ResourceId}", "oauthClientApplication": "arn:${Partition}:quicksight:${Region}:${Account}:oauthClientApplication/${ResourceId}", "refreshschedule": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/refresh-schedule/${ResourceId}", "space": "arn:${Partition}:quicksight:${Region}:${Account}:space/${ResourceId}", "template": "arn:${Partition}:quicksight:${Region}:${Account}:template/${ResourceId}", "theme": "arn:${Partition}:quicksight:${Region}:${Account}:theme/${ResourceId}", "topic": "arn:${Partition}:quicksight:${Region}:${Account}:topic/${ResourceId}", "user": "arn:${Partition}:quicksight:${Region}:${Account}:user/${ResourceId}", "vpcconnection": "arn:${Partition}:quicksight:${Region}:${Account}:vpcConnection/${ResourceId}"}, "ram": {"customer-managed-permission": "arn:${Partition}:ram:${Region}:${Account}:permission/${ResourcePath}", "permission": "arn:${Partition}:ram::aws:permission/${ResourcePath}", "resource-share": "arn:${Partition}:ram:${Region}:${Account}:resource-share/${ResourcePath}", "resource-share-invitation": "arn:${Partition}:ram:${Region}:${Account}:resource-share-invitation/${ResourcePath}"}, "rds": {"auto-backup": "arn:${Partition}:rds:${Region}:${Account}:auto-backup:${DbInstanceAutomatedBackupId}", "cev": "arn:${Partition}:rds:${Region}:${Account}:cev:${Engine}/${EngineVersion}/${CustomDbEngineVersionId}", "cluster": "arn:${Partition}:rds:${Region}:${Account}:cluster:${DbClusterInstanceName}", "cluster-auto-backup": "arn:${Partition}:rds:${Region}:${Account}:cluster-auto-backup:${DbClusterAutomatedBackupId}", "cluster-endpoint": "arn:${Partition}:rds:${Region}:${Account}:cluster-endpoint:${DbClusterEndpoint}", "cluster-pg": "arn:${Partition}:rds:${Region}:${Account}:cluster-pg:${ClusterParameterGroupName}", "cluster-snapshot": "arn:${Partition}:rds:${Region}:${Account}:cluster-snapshot:${ClusterSnapshotName}", "db": "arn:${Partition}:rds:${Region}:${Account}:db:${DbInstanceName}", "db-capacity-reservation": "arn:${Partition}:rds:${Region}:${Account}:db-capacity-reservation:${DBCapacityReservationIdentifier}", "deployment": "arn:${Partition}:rds:${Region}:${Account}:deployment:${BlueGreenDeploymentIdentifier}", "es": "arn:${Partition}:rds:${Region}:${Account}:es:${SubscriptionName}", "global-cluster": "arn:${Partition}:rds::${Account}:global-cluster:${GlobalCluster}", "integration": "arn:${Partition}:rds:${Region}:${Account}:integration:${IntegrationIdentifier}", "og": "arn:${Partition}:rds:${Region}:${Account}:og:${OptionGroupName}", "pg": "arn:${Partition}:rds:${Region}:${Account}:pg:${ParameterGroupName}", "proxy": "arn:${Partition}:rds:${Region}:${Account}:db-proxy:${DbProxyId}", "proxy-endpoint": "arn:${Partition}:rds:${Region}:${Account}:db-proxy-endpoint:${DbProxyEndpointId}", "ri": "arn:${Partition}:rds:${Region}:${Account}:ri:${ReservedDbInstanceName}", "secgrp": "arn:${Partition}:rds:${Region}:${Account}:secgrp:${SecurityGroupName}", "shardgrp": "arn:${Partition}:rds:${Region}:${Account}:shard-group:${DbShardGroupResourceId}", "snapshot": "arn:${Partition}:rds:${Region}:${Account}:snapshot:${SnapshotName}", "snapshot-tenant-database": "arn:${Partition}:rds:${Region}:${Account}:snapshot-tenant-database:${SnapshotName}:${TenantResourceId}", "subgrp": "arn:${Partition}:rds:${Region}:${Account}:subgrp:${SubnetGroupName}", "target-group": "arn:${Partition}:rds:${Region}:${Account}:target-group:${TargetGroupId}", "tenant-database": "arn:${Partition}:rds:${Region}:${Account}:tenant-database:${TenantResourceId}"}, "redshift": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "datashare": "arn:${Partition}:redshift:${Region}:${Account}:datashare:${ProducerClusterNamespace}/${DataShareName}", "dbgroup": "arn:${Partition}:redshift:${Region}:${Account}:dbgroup:${ClusterName}/${DbGroup}", "dbname": "arn:${Partition}:redshift:${Region}:${Account}:dbname:${ClusterName}/${DbName}", "dbuser": "arn:${Partition}:redshift:${Region}:${Account}:dbuser:${ClusterName}/${DbUser}", "eventsubscription": "arn:${Partition}:redshift:${Region}:${Account}:eventsubscription:${EventSubscriptionName}", "hsmclientcertificate": "arn:${Partition}:redshift:${Region}:${Account}:hsmclientcertificate:${HSMClientCertificateId}", "hsmconfiguration": "arn:${Partition}:redshift:${Region}:${Account}:hsmconfiguration:${HSMConfigurationId}", "integration": "arn:${Partition}:redshift:${Region}:${Account}:integration:${IntegrationIdentifier}", "namespace": "arn:${Partition}:redshift:${Region}:${Account}:namespace:${ClusterNamespace}", "parametergroup": "arn:${Partition}:redshift:${Region}:${Account}:parametergroup:${ParameterGroupName}", "qev2idcapplication": "arn:${Partition}:redshift:${Region}:${Account}:qev2idcapplication:${Qev2IdcApplicationId}", "redshiftidcapplication": "arn:${Partition}:redshift:${Region}:${Account}:redshiftidcapplication:${RedshiftIdcApplicationId}", "securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroup:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ec2SecurityGroupId}", "securitygroupingress-cidr": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/cidrip/${IpRange}", "securitygroupingress-ec2securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ece2SecuritygroupId}", "snapshot": "arn:${Partition}:redshift:${Region}:${Account}:snapshot:${ClusterName}/${SnapshotName}", "snapshotcopygrant": "arn:${Partition}:redshift:${Region}:${Account}:snapshotcopygrant:${SnapshotCopyGrantName}", "snapshotschedule": "arn:${Partition}:redshift:${Region}:${Account}:snapshotschedule:${ScheduleIdentifier}", "subnetgroup": "arn:${Partition}:redshift:${Region}:${Account}:subnetgroup:${SubnetGroupName}", "usagelimit": "arn:${Partition}:redshift:${Region}:${Account}:usagelimit:${UsageLimitId}"}, "redshift-data": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "redshift-serverless": {"endpointAccess": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managedvpcendpoint/${EndpointAccessId}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupName}", "namespace": "arn:${Partition}:redshift-serverless:${Region}:${Account}:namespace/${NamespaceId}", "recoveryPoint": "arn:${Partition}:redshift-serverless:${Region}:${Account}:recoverypoint/${RecoveryPointId}", "snapshot": "arn:${Partition}:redshift-serverless:${Region}:${Account}:snapshot/${SnapshotId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "rekognition": {"collection": "arn:${Partition}:rekognition:${Region}:${Account}:collection/${CollectionId}", "dataset": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/dataset/${DatasetType}/${CreationTimestamp}", "project": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/${CreationTimestamp}", "projectversion": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/version/${VersionName}/${CreationTimestamp}", "streamprocessor": "arn:${Partition}:rekognition:${Region}:${Account}:streamprocessor/${StreamprocessorId}"}, "resource-explorer-2": {"index": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:index/${IndexUuid}", "managed-view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:managed-view/${ManagedViewName}/${ManagedViewUuid}", "view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:view/${ViewName}/${ViewUuid}"}, "resource-groups": {"group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}", "tagSyncTask": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}/tag-sync-task/${TaskId}"}, "route53": {"change": "arn:${Partition}:route53:::change/${Id}", "cidrcollection": "arn:${Partition}:route53:::cidrcollection/${Id}", "delegationset": "arn:${Partition}:route53:::delegationset/${Id}", "healthcheck": "arn:${Partition}:route53:::healthcheck/${Id}", "healthchecksource": "arn:${Partition}:route53:::healthchecksource/${Id}", "hostedzone": "arn:${Partition}:route53:::hostedzone/${Id}", "queryloggingconfig": "arn:${Partition}:route53:::queryloggingconfig/${Id}", "trafficpolicy": "arn:${Partition}:route53:::trafficpolicy/${Id}", "trafficpolicyinstance": "arn:${Partition}:route53:::trafficpolicyinstance/${Id}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}"}, "s3": {"accessgrant": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default/grant/${Token}", "accessgrantsinstance": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default", "accessgrantslocation": "arn:${Partition}:s3:${Region}:${Account}:access-grants/default/location/${Token}", "accesspoint": "arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}", "accesspointobject": "arn:${Partition}:s3:${Region}:${Account}:accesspoint/${AccessPointName}/object/${ObjectName}", "bucket": "arn:${Partition}:s3:::${BucketName}", "job": "arn:${Partition}:s3:${Region}:${Account}:job/${JobId}", "multiregionaccesspoint": "arn:${Partition}:s3::${Account}:accesspoint/${AccessPointAlias}", "multiregionaccesspointrequestarn": "arn:${Partition}:s3:us-west-2:${Account}:async-request/mrap/${Operation}/${Token}", "object": "arn:${Partition}:s3:::${BucketName}/${ObjectName}", "objectlambdaaccesspoint": "arn:${Partition}:s3-object-lambda:${Region}:${Account}:accesspoint/${AccessPointName}", "storagelensconfiguration": "arn:${Partition}:s3:${Region}:${Account}:storage-lens/${ConfigId}", "storagelensgroup": "arn:${Partition}:s3:${Region}:${Account}:storage-lens-group/${Name}"}, "s3tables": {"Table": "arn:${Partition}:s3tables:${Region}:${Account}:bucket/${TableBucketName}/table/${TableID}", "TableBucket": "arn:${Partition}:s3tables:${Region}:${Account}:bucket/${TableBucketName}"}, "s3vectors": {"Index": "arn:${Partition}:s3vectors:${Region}:${Account}:bucket/${BucketName}/index/${IndexName}", "VectorBucket": "arn:${Partition}:s3vectors:${Region}:${Account}:bucket/${BucketName}"}, "scheduler": {"schedule": "arn:${Partition}:scheduler:${Region}:${Account}:schedule/${GroupName}/${ScheduleName}", "schedule-group": "arn:${Partition}:scheduler:${Region}:${Account}:schedule-group/${GroupName}"}, "secretsmanager": {"Secret": "arn:${Partition}:secretsmanager:${Region}:${Account}:secret:${SecretId}"}, "securityhub": {"aggregatorv2": "arn:${Partition}:securityhub:${Region}:${Account}:aggregatorv2/${AggregatorV2Id}", "automation-rule": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rule/${AutomationRuleId}", "automation-rulev2": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rulev2/${AutomationRuleV2Id}", "configuration-policy": "arn:${Partition}:securityhub:${Region}:${Account}:configuration-policy/${ConfigurationPolicyId}", "connector": "arn:${Partition}:securityhub:${Region}:${Account}:connector/${ConnectorId}", "connectorv2": "arn:${Partition}:securityhub:${Region}:${Account}:connectorv2/${ConnectorV2Id}", "finding-aggregator": "arn:${Partition}:securityhub:${Region}:${Account}:finding-aggregator/${FindingAggregatorId}", "hub": "arn:${Partition}:securityhub:${Region}:${Account}:hub/default", "hubv2": "arn:${Partition}:securityhub:${Region}:${Account}:hubv2/${HubV2Id}", "product": "arn:${Partition}:securityhub:${Region}:${Account}:product/${Company}/${ProductId}"}, "servicediscovery": {"namespace": "arn:${Partition}:servicediscovery:${Region}:${Account}:namespace/${NamespaceId}", "service": "arn:${Partition}:servicediscovery:${Region}:${Account}:service/${ServiceId}"}, "servicequotas": {"quota": "arn:${Partition}:servicequotas:${Region}:${Account}:${ServiceCode}/${QuotaCode}"}, "signer": {"signing-job": "arn:${Partition}:signer:${Region}:${Account}:/signing-jobs/${JobId}", "signing-profile": "arn:${Partition}:signer:${Region}:${Account}:/signing-profiles/${ProfileName}"}, "sns": {"topic": "arn:${Partition}:sns:${Region}:${Account}:${TopicName}"}, "sqs": {"queue": "arn:${Partition}:sqs:${Region}:${Account}:${QueueName}"}, "ssm": {"association": "arn:${Partition}:ssm:${Region}:${Account}:association/${AssociationId}", "automation-definition": "arn:${Partition}:ssm:${Region}:${Account}:automation-definition/${AutomationDefinitionName}:${VersionId}", "automation-execution": "arn:${Partition}:ssm:${Region}:${Account}:automation-execution/${AutomationExecutionId}", "bucket": "arn:${Partition}:s3:::${BucketName}", "cloud-connector": "arn:${Partition}:ssm:${Region}:${Account}:cloud-connector/${CloudConnectorId}", "document": "arn:${Partition}:ssm:${Region}:${Account}:document/${DocumentName}", "iam-role": "arn:${Partition}:iam::${Account}:role/${RoleName}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "maintenancewindow": "arn:${Partition}:ssm:${Region}:${Account}:maintenancewindow/${ResourceId}", "managed-instance": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance/${InstanceId}", "managed-instance-inventory": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance-inventory/${InstanceId}", "opsitem": "arn:${Partition}:ssm:${Region}:${Account}:opsitem/${ResourceId}", "opsitemgroup": "arn:${Partition}:ssm:${Region}:${Account}:opsitemgroup/default", "opsmetadata": "arn:${Partition}:ssm:${Region}:${Account}:opsmetadata/${ResourceId}", "parameter": "arn:${Partition}:ssm:${Region}:${Account}:parameter/${ParameterNameWithoutLeadingSlash}", "patchbaseline": "arn:${Partition}:ssm:${Region}:${Account}:patchbaseline/${PatchBaselineIdResourceId}", "resourcedatasync": "arn:${Partition}:ssm:${Region}:${Account}:resource-data-sync/${SyncName}", "servicesetting": "arn:${Partition}:ssm:${Region}:${Account}:servicesetting/${ResourceId}", "session": "arn:${Partition}:ssm:${Region}:${Account}:session/${SessionId}", "task": "arn:${Partition}:ecs:${Region}:${Account}:task/${TaskId}", "windowtarget": "arn:${Partition}:ssm:${Region}:${Account}:windowtarget/${WindowTargetId}", "windowtask": "arn:${Partition}:ssm:${Region}:${Account}:windowtask/${WindowTaskId}"}, "sso": {"Account": "arn:${Partition}:sso:::account/${AccountId}", "Application": "arn:${Partition}:sso::${Account}:application/${InstanceId}/${ApplicationId}", "ApplicationProvider": "arn:${Partition}:sso::aws:applicationProvider/${ApplicationProviderId}", "Instance": "arn:${Partition}:sso:::instance/${InstanceId}", "PermissionSet": "arn:${Partition}:sso:::permissionSet/${InstanceId}/${PermissionSetId}", "TrustedTokenIssuer": "arn:${Partition}:sso::${Account}:trustedTokenIssuer/${InstanceId}/${TrustedTokenIssuerId}"}, "states": {"activity": "arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}", "execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}:${ExecutionId}", "express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}:${ExecutionId}:${ExpressId}", "labelled execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}/${MapRunLabel}:${ExecutionId}", "labelled express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}/${MapRunLabel}:${ExecutionId}:${ExpressId}", "maprun": "arn:${Partition}:states:${Region}:${Account}:mapRun:${StateMachineName}/${MapRunLabel}:${MapRunId}", "statemachine": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}", "statemachinealias": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineAliasName}", "statemachineversion": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineVersionId}"}, "sts": {"context-provider": "arn:${Partition}:iam::aws:contextProvider/${ContextProviderName}", "federated-user": "arn:${Partition}:sts::${Account}:federated-user/${FederatedUserName}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "root-user": "arn:${Partition}:iam::${Account}:root", "self-session": "arn:${Partition}:sts::${Account}:self"}, "textract": {"adapter": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}", "adapterversion": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}/versions/${AdapterVersion}", "blueprint": "arn:${Partition}:textract:${Region}:${Account}:blueprint/${BlueprintId}", "job": "arn:${Partition}:textract:${Region}:${Account}:job/${JobId}", "project": "arn:${Partition}:textract:${Region}:${Account}:project/${ProjectId}"}, "timestream-influxdb": {"db-backup": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-backup/${DbBackupId}", "db-cluster": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-cluster/${DbClusterId}", "db-instance": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-instance/${DbInstanceIdentifier}", "db-parameter-group": "arn:${Partition}:timestream-influxdb:${Region}:${Account}:db-parameter-group/${DbParameterGroupIdentifier}"}, "translate": {"parallel-data": "arn:${Partition}:translate:${Region}:${Account}:parallel-data/${ResourceName}", "terminology": "arn:${Partition}:translate:${Region}:${Account}:terminology/${ResourceName}"}, "xray": {"group": "arn:${Partition}:xray:${Region}:${Account}:group/${GroupName}/${Id}", "sampling-rule": "arn:${Partition}:xray:${Region}:${Account}:sampling-rule/${SamplingRuleName}"}}, "pathFormats": {"apigateway": {"/restapis/{restapi_id}/models/{model_name}/default_template (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/models/${ModelName}/default_template", "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/authorizers", "/restapis/{restapi_id}/stages/{stage_name}/cache/data (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/data", "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/exports/${ExportType}", "/sdktypes (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes", "/sdktypes/{sdktype_id} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes/${SdktypeId}", "/usageplans/{usageplanId}/keys/{keyId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/keys/${KeyId}/usage", "/usageplans/{usageplanId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/usage", "Authorizer (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers/${Id}", "Authorizers (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers", "Deployment (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments/${Id}", "Deployments (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments", "Integration (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration", "IntegrationResponse (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration/responses/${StatusCode}", "Model (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models/${ModelName}", "Models (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models", "Stage (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}", "Stages (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages"}}, - "resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job": ["aws:ResourceTag/"], "model-import-job": ["aws:ResourceTag/"], "model-invocation-job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "prompt": ["aws:ResourceTag/"], "prompt-router": ["aws:ResourceTag/"], "prompt-version": ["aws:ResourceTag/"], "provisioned-model": ["aws:ResourceTag/"], "retrieval-instruction": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dsql": {"Cluster": ["aws:ResourceTag/"], "Stream": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-scope": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipv4pool-ec2": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipv6pool-ec2": ["aws:ResourceTag/", "ec2:ResourceTag/"], "key-pair": ["aws:ResourceTag/", "ec2:ResourceTag/"], "launch-template": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table-virtual-interface-group-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table-vpc-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-virtual-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-virtual-interface-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "mac-modification-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "natgateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-acl": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-access-scope": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-access-scope-analysis": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-analysis": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-path": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "outpost-lag": ["aws:ResourceTag/", "ec2:ResourceTag/"], "placement-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "prefix-list": ["aws:ResourceTag/", "ec2:ResourceTag/"], "replace-root-volume-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "reserved-instances": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server-peer": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-network": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-subnet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "security-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "security-group-rule": ["aws:ResourceTag/", "ec2:ResourceTag/"], "snapshot": ["aws:ResourceTag/", "ec2:ResourceTag/"], "spot-fleet-request": ["aws:ResourceTag/", "ec2:ResourceTag/"], "spot-instances-request": ["aws:ResourceTag/", "ec2:ResourceTag/"], "subnet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "subnet-cidr-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-filter": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-filter-rule": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-session": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-attachment": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-connect-peer": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-metering-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-multicast-domain": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-policy-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-route-table-announcement": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-endpoint-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-trust-provider": ["aws:ResourceTag/", "ec2:ResourceTag/"], "volume": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-block-public-access-exclusion": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-encryption-control": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-service": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-service-permission": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-flow-log": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-peering-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-concentrator": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"]}, "ec2-instance-connect": {"instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"]}, "ecr": {"repository": ["aws:ResourceTag/", "ecr:ResourceTag/"]}, "ecs": {"capacity-provider": ["aws:ResourceTag/", "ecs:ResourceTag/"], "cluster": ["aws:ResourceTag/", "ecs:ResourceTag/"], "container-instance": ["aws:ResourceTag/", "ecs:ResourceTag/"], "daemon": ["aws:ResourceTag/"], "daemon-deployment": ["aws:ResourceTag/"], "daemon-revision": ["aws:ResourceTag/"], "daemon-task-definition": ["aws:ResourceTag/"], "gateway": ["aws:ResourceTag/"], "gateway-route": ["aws:ResourceTag/"], "service": ["aws:ResourceTag/", "ecs:ResourceTag/"], "service-deployment": ["aws:ResourceTag/"], "service-revision": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/", "ecs:ResourceTag/"], "task-definition": ["aws:ResourceTag/", "ecs:ResourceTag/"], "task-set": ["aws:ResourceTag/", "ecs:ResourceTag/"]}, "eks": {"access-entry": ["aws:ResourceTag/"], "addon": ["aws:ResourceTag/"], "capability": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eks-anywhere-subscription": ["aws:ResourceTag/"], "fargateprofile": ["aws:ResourceTag/"], "identityproviderconfig": ["aws:ResourceTag/"], "nodegroup": ["aws:ResourceTag/"], "podidentityassociation": ["aws:ResourceTag/"]}, "elasticloadbalancing": {"listener-rule/app": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener-rule/net": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/app": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/gwy": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/net": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/app/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/gwy/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/net/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "targetgroup": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "truststore": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"]}, "elasticmapreduce": {"cluster": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "editor": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "notebook-execution": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "session": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "studio": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"]}, "emr-containers": {"jobRun": ["aws:ResourceTag/"], "jobTemplate": ["aws:ResourceTag/"], "managedEndpoint": ["aws:ResourceTag/"], "securityConfiguration": ["aws:ResourceTag/"], "virtualCluster": ["aws:ResourceTag/"]}, "emr-serverless": {"application": ["aws:ResourceTag/"], "jobRun": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "es": {"application": ["aws:ResourceTag/"], "datasource": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "es_role": ["aws:ResourceTag/"], "opensearchservice_role": ["aws:ResourceTag/"]}, "events": {"event-bus": ["aws:ResourceTag/"], "event-busv2": ["aws:ResourceTag/"], "event-sourcev2": ["aws:ResourceTag/"], "rule-on-custom-event-bus": ["aws:ResourceTag/"], "rule-on-default-event-bus": ["aws:ResourceTag/"], "subscriber": ["aws:ResourceTag/"]}, "firehose": {"deliverystream": ["aws:ResourceTag/"]}, "fis": {"action": ["aws:ResourceTag/"], "experiment": ["aws:ResourceTag/"], "experiment-template": ["aws:ResourceTag/"]}, "globalaccelerator": {"accelerator": ["aws:ResourceTag/"], "attachment": ["aws:ResourceTag/"], "endpointgroup": ["aws:ResourceTag/"], "listener": ["aws:ResourceTag/"]}, "glue": {"blueprint": ["aws:ResourceTag/"], "catalog": ["aws:ResourceTag/"], "connection": ["aws:ResourceTag/"], "connectionType": ["aws:ResourceTag/"], "crawler": ["aws:ResourceTag/"], "customEntityType": ["aws:ResourceTag/"], "dataQualityEvaluationConfig": ["aws:ResourceTag/"], "dataQualityRuleset": ["aws:ResourceTag/"], "database": ["aws:ResourceTag/"], "devendpoint": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "integrationResourceProperty": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "mlTransform": ["aws:ResourceTag/"], "registry": ["aws:ResourceTag/"], "schema": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"], "tableversion": ["aws:ResourceTag/"], "trigger": ["aws:ResourceTag/"], "usageProfile": ["aws:ResourceTag/"], "userdefinedfunction": ["aws:ResourceTag/"], "workflow": ["aws:ResourceTag/"]}, "guardduty": {"customdetectionruleassociation": ["aws:ResourceTag/"], "detector": ["aws:ResourceTag/"], "filter": ["aws:ResourceTag/"], "ipset": ["aws:ResourceTag/"], "malwareprotectionplan": ["aws:ResourceTag/"], "publishingDestination": ["aws:ResourceTag/"], "threatentityset": ["aws:ResourceTag/"], "threatintelset": ["aws:ResourceTag/"], "trustedentityset": ["aws:ResourceTag/"]}, "inspector2": {"CIS Scan Configuration": ["aws:ResourceTag/"], "Code Security Integration": ["aws:ResourceTag/"], "Code Security Scan Configuration": ["aws:ResourceTag/"], "Connector": ["aws:ResourceTag/"], "Filter": ["aws:ResourceTag/"]}, "kinesis": {"channel": ["aws:ResourceTag/"], "consumer": ["aws:ResourceTag/"], "kmsKey": ["aws:ResourceTag/"], "queue": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"]}, "kinesisanalytics": {"application": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"]}, "lambda": {"capacityProvider": ["aws:ResourceTag/"], "code signing config": ["aws:ResourceTag/"], "durable execution": ["aws:ResourceTag/"], "eventSourceMapping": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "function alias": ["aws:ResourceTag/"], "function version": ["aws:ResourceTag/"], "microvmImage": ["aws:ResourceTag/"], "networkConnector": ["aws:ResourceTag/"], "runtime": ["aws:ResourceTag/"], "runtimeAlias": ["aws:ResourceTag/"], "runtimeVersion": ["aws:ResourceTag/"], "webFunction": ["aws:ResourceTag/"], "webFunctionEndpoint": ["aws:ResourceTag/"], "webFunctionRevision": ["aws:ResourceTag/"]}, "logs": {"anomaly-detector": ["aws:ResourceTag/"], "delivery": ["aws:ResourceTag/"], "delivery-destination": ["aws:ResourceTag/"], "delivery-source": ["aws:ResourceTag/"], "destination": ["aws:ResourceTag/"], "log-group": ["aws:ResourceTag/"], "log-stream": ["aws:ResourceTag/"], "lookup-table": ["aws:ResourceTag/"], "scheduled-query": ["aws:ResourceTag/"]}, "macie2": {"AllowList": ["aws:ResourceTag/"], "ClassificationJob": ["aws:ResourceTag/"], "CustomDataIdentifier": ["aws:ResourceTag/"], "FindingsFilter": ["aws:ResourceTag/"], "Member": ["aws:ResourceTag/"]}, "oam": {"Link": ["aws:ResourceTag/"], "Sink": ["aws:ResourceTag/"]}, "payment-cryptography": {"approval-team": ["aws:ResourceTag/"], "key": ["aws:ResourceTag/"]}, "pipes": {"pipe": ["aws:ResourceTag/"]}, "quicksight": {"accessControlApplication": ["aws:ResourceTag/"], "actionconnector": ["aws:ResourceTag/"], "analysis": ["aws:ResourceTag/"], "app": ["aws:ResourceTag/"], "brand": ["aws:ResourceTag/"], "customization": ["aws:ResourceTag/"], "custompermissions": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "dashboardSnapshotJob": ["aws:ResourceTag/"], "dataset": ["aws:ResourceTag/"], "datasource": ["aws:ResourceTag/"], "dlpSetting": ["aws:ResourceTag/"], "emailCustomizationTemplate": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "folder": ["aws:ResourceTag/"], "inboundConnector": ["aws:ResourceTag/"], "ingestion": ["aws:ResourceTag/"], "knowledgeBase": ["aws:ResourceTag/"], "namespace": ["aws:ResourceTag/"], "oauthClientApplication": ["aws:ResourceTag/"], "template": ["aws:ResourceTag/"], "theme": ["aws:ResourceTag/"], "topic": ["aws:ResourceTag/"], "user": ["aws:ResourceTag/"], "vpcconnection": ["aws:ResourceTag/"]}, "ram": {"customer-managed-permission": ["aws:ResourceTag/", "ram:ResourceTag/"], "resource-share": ["aws:ResourceTag/", "ram:ResourceTag/"]}, "rds": {"auto-backup": ["aws:ResourceTag/"], "cev": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/", "rds:cluster-tag/"], "cluster-auto-backup": ["aws:ResourceTag/"], "cluster-endpoint": ["aws:ResourceTag/"], "cluster-pg": ["aws:ResourceTag/", "rds:cluster-pg-tag/"], "cluster-snapshot": ["aws:ResourceTag/", "rds:cluster-snapshot-tag/"], "db": ["aws:ResourceTag/", "rds:db-tag/"], "db-capacity-reservation": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "es": ["aws:ResourceTag/", "rds:es-tag/"], "global-cluster": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "og": ["aws:ResourceTag/", "rds:og-tag/"], "pg": ["aws:ResourceTag/", "rds:pg-tag/"], "proxy": ["aws:ResourceTag/"], "proxy-endpoint": ["aws:ResourceTag/"], "ri": ["aws:ResourceTag/", "rds:ri-tag/"], "secgrp": ["aws:ResourceTag/", "rds:secgrp-tag/"], "shardgrp": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/", "rds:snapshot-tag/"], "snapshot-tenant-database": ["aws:ResourceTag/"], "subgrp": ["aws:ResourceTag/", "rds:subgrp-tag/"], "target-group": ["aws:ResourceTag/"], "tenant-database": ["aws:ResourceTag/"]}, "redshift": {"cluster": ["aws:ResourceTag/"], "datashare": ["aws:ResourceTag/"], "eventsubscription": ["aws:ResourceTag/"], "hsmclientcertificate": ["aws:ResourceTag/"], "hsmconfiguration": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "parametergroup": ["aws:ResourceTag/"], "securitygroup": ["aws:ResourceTag/"], "securitygroupingress-cidr": ["aws:ResourceTag/"], "securitygroupingress-ec2securitygroup": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"], "snapshotcopygrant": ["aws:ResourceTag/"], "snapshotschedule": ["aws:ResourceTag/"], "subnetgroup": ["aws:ResourceTag/"], "usagelimit": ["aws:ResourceTag/"]}, "redshift-data": {"cluster": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "redshift-serverless": {"namespace": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "rekognition": {"collection": ["aws:ResourceTag/"], "dataset": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "projectversion": ["aws:ResourceTag/"], "streamprocessor": ["aws:ResourceTag/"]}, "resource-explorer-2": {"index": ["aws:ResourceTag/"], "view": ["aws:ResourceTag/"]}, "resource-groups": {"group": ["aws:ResourceTag/"], "tagSyncTask": ["aws:ResourceTag/"]}, "route53": {"healthchecksource": ["aws:ResourceTag/"]}, "s3": {"accessgrant": ["aws:ResourceTag/"], "accessgrantsinstance": ["aws:ResourceTag/"], "accessgrantslocation": ["aws:ResourceTag/"], "accesspoint": ["aws:ResourceTag/"], "accesspointobject": ["aws:ResourceTag/"], "bucket": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "object": ["aws:ResourceTag/"], "storagelensconfiguration": ["aws:ResourceTag/"], "storagelensgroup": ["aws:ResourceTag/"]}, "s3tables": {"Table": ["aws:ResourceTag/"], "TableBucket": ["aws:ResourceTag/"]}, "s3vectors": {"Index": ["aws:ResourceTag/"], "VectorBucket": ["aws:ResourceTag/"]}, "scheduler": {"schedule-group": ["aws:ResourceTag/"]}, "secretsmanager": {"Secret": ["aws:ResourceTag/", "secretsmanager:ResourceTag/"]}, "securityhub": {"aggregatorv2": ["aws:ResourceTag/"], "automation-rule": ["aws:ResourceTag/"], "automation-rulev2": ["aws:ResourceTag/"], "configuration-policy": ["aws:ResourceTag/"], "connector": ["aws:ResourceTag/"], "connectorv2": ["aws:ResourceTag/"], "hub": ["aws:ResourceTag/"], "hubv2": ["aws:ResourceTag/"]}, "servicediscovery": {"namespace": ["aws:ResourceTag/"], "service": ["aws:ResourceTag/"]}, "signer": {"signing-profile": ["aws:ResourceTag/"]}, "sns": {"topic": ["aws:ResourceTag/"]}, "sqs": {"queue": ["aws:ResourceTag/"]}, "ssm": {"association": ["aws:ResourceTag/"], "automation-execution": ["aws:ResourceTag/", "ssm:resourceTag/"], "cloud-connector": ["aws:ResourceTag/"], "document": ["aws:ResourceTag/", "ssm:resourceTag/"], "instance": ["aws:ResourceTag/", "ssm:resourceTag/"], "maintenancewindow": ["aws:ResourceTag/", "ssm:resourceTag/"], "managed-instance": ["aws:ResourceTag/", "ssm:resourceTag/"], "opsitem": ["aws:ResourceTag/"], "opsmetadata": ["aws:ResourceTag/", "ssm:resourceTag/"], "parameter": ["aws:ResourceTag/", "ssm:resourceTag/"], "patchbaseline": ["aws:ResourceTag/", "ssm:resourceTag/"], "task": ["aws:ResourceTag/"], "windowtarget": ["aws:ResourceTag/", "ssm:resourceTag/"], "windowtask": ["aws:ResourceTag/", "ssm:resourceTag/"]}, "sso": {"Application": ["aws:ResourceTag/"], "Instance": ["aws:ResourceTag/"], "PermissionSet": ["aws:ResourceTag/"], "TrustedTokenIssuer": ["aws:ResourceTag/"]}, "states": {"activity": ["aws:ResourceTag/"], "execution": ["aws:ResourceTag/"], "statemachine": ["aws:ResourceTag/"], "statemachinealias": ["aws:ResourceTag/"], "statemachineversion": ["aws:ResourceTag/"]}, "sts": {"role": ["aws:ResourceTag/", "iam:ResourceTag/"]}, "textract": {"adapter": ["aws:ResourceTag/"], "adapterversion": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"]}, "timestream-influxdb": {"db-backup": ["aws:ResourceTag/"], "db-cluster": ["aws:ResourceTag/"], "db-instance": ["aws:ResourceTag/"], "db-parameter-group": ["aws:ResourceTag/"]}, "translate": {"parallel-data": ["aws:ResourceTag/"], "terminology": ["aws:ResourceTag/"]}, "xray": {"group": ["aws:ResourceTag/"], "sampling-rule": ["aws:ResourceTag/"]}}, + "resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job": ["aws:ResourceTag/"], "model-import-job": ["aws:ResourceTag/"], "model-invocation-job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "prompt": ["aws:ResourceTag/"], "prompt-router": ["aws:ResourceTag/"], "prompt-version": ["aws:ResourceTag/"], "provisioned-model": ["aws:ResourceTag/"], "retrieval-instruction": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/"], "budgetAction": ["aws:ResourceTag/"]}, "ce": {"anomalymonitor": ["aws:ResourceTag/"], "anomalysubscription": ["aws:ResourceTag/"], "billingview": ["aws:ResourceTag/"], "costcategory": ["aws:ResourceTag/"]}, "cloudformation": {"changeset": ["aws:ResourceTag/"], "stack": ["aws:ResourceTag/"], "stackset": ["aws:ResourceTag/"]}, "cloudfront": {"anycast-ip-list": ["aws:ResourceTag/"], "connection-function": ["aws:ResourceTag/"], "connection-group": ["aws:ResourceTag/"], "distribution": ["aws:ResourceTag/"], "distribution-tenant": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "key-value-store": ["aws:ResourceTag/"], "streaming-distribution": ["aws:ResourceTag/"], "trust-store": ["aws:ResourceTag/"], "vpcorigin": ["aws:ResourceTag/"]}, "cloudtrail": {"channel": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eventdatastore": ["aws:ResourceTag/"], "trail": ["aws:ResourceTag/"]}, "codebuild": {"project": ["aws:ResourceTag/"], "report-group": ["aws:ResourceTag/"]}, "codepipeline": {"action": ["aws:ResourceTag/"], "actiontype": ["aws:ResourceTag/"], "pipeline": ["aws:ResourceTag/"], "stage": ["aws:ResourceTag/"], "webhook": ["aws:ResourceTag/"]}, "cognito-identity": {"identitypool": ["aws:ResourceTag/"]}, "cognito-idp": {"userpool": ["aws:ResourceTag/"]}, "controltower": {"EnabledBaseline": ["aws:ResourceTag/"], "EnabledControl": ["aws:ResourceTag/"], "LandingZone": ["aws:ResourceTag/"]}, "datasync": {"agent": ["aws:ResourceTag/"], "discoveryjob": ["aws:ResourceTag/"], "location": ["aws:ResourceTag/"], "storagesystem": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/"], "taskexecution": ["aws:ResourceTag/"]}, "dsql": {"Cluster": ["aws:ResourceTag/"], "Stream": ["aws:ResourceTag/"]}, "dynamodb": {"index": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"]}, "ec2": {"application-status-check": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-block": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-manager-data-export": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-cancellation-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "capacity-reservation-modification-quote": ["aws:ResourceTag/", "ec2:ResourceTag/"], "carrier-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "client-vpn-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "coip-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "customer-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "declarative-policies-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dedicated-host": ["aws:ResourceTag/", "ec2:ResourceTag/"], "dhcp-options": ["aws:ResourceTag/", "ec2:ResourceTag/"], "egress-only-internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-gpu": ["aws:ResourceTag/", "ec2:ResourceTag/"], "elastic-ip": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "export-instance-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fleet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "fpga-image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "host-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image": ["aws:ResourceTag/", "ec2:ResourceTag/"], "image-usage-report": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-image-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "import-snapshot-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-event-window": ["aws:ResourceTag/", "ec2:ResourceTag/"], "internet-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-external-resource-verification-token": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-internet-registry-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-pool-allocation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-prefix-list-resolver-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-resource-discovery-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipam-scope": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipv4pool-ec2": ["aws:ResourceTag/", "ec2:ResourceTag/"], "ipv6pool-ec2": ["aws:ResourceTag/", "ec2:ResourceTag/"], "key-pair": ["aws:ResourceTag/", "ec2:ResourceTag/"], "launch-template": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table-virtual-interface-group-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-route-table-vpc-association": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-virtual-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "local-gateway-virtual-interface-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "mac-modification-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "natgateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-acl": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-access-scope": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-access-scope-analysis": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-analysis": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-insights-path": ["aws:ResourceTag/", "ec2:ResourceTag/"], "network-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "outpost-lag": ["aws:ResourceTag/", "ec2:ResourceTag/"], "placement-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "prefix-list": ["aws:ResourceTag/", "ec2:ResourceTag/"], "replace-root-volume-task": ["aws:ResourceTag/", "ec2:ResourceTag/"], "reserved-instances": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-server-peer": ["aws:ResourceTag/", "ec2:ResourceTag/"], "route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-interface": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-network": ["aws:ResourceTag/", "ec2:ResourceTag/"], "secondary-subnet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "security-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "security-group-rule": ["aws:ResourceTag/", "ec2:ResourceTag/"], "snapshot": ["aws:ResourceTag/", "ec2:ResourceTag/"], "spot-fleet-request": ["aws:ResourceTag/", "ec2:ResourceTag/"], "spot-instances-request": ["aws:ResourceTag/", "ec2:ResourceTag/"], "subnet": ["aws:ResourceTag/", "ec2:ResourceTag/"], "subnet-cidr-reservation": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-filter": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-filter-rule": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-session": ["aws:ResourceTag/", "ec2:ResourceTag/"], "traffic-mirror-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-attachment": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-connect-peer": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-metering-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-multicast-domain": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-policy-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-route-table": ["aws:ResourceTag/", "ec2:ResourceTag/"], "transit-gateway-route-table-announcement": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-endpoint-target": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-group": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-policy": ["aws:ResourceTag/", "ec2:ResourceTag/"], "verified-access-trust-provider": ["aws:ResourceTag/", "ec2:ResourceTag/"], "volume": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-block-public-access-exclusion": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-encryption-control": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-service": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-endpoint-service-permission": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-flow-log": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpc-peering-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-concentrator": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-connection": ["aws:ResourceTag/", "ec2:ResourceTag/"], "vpn-gateway": ["aws:ResourceTag/", "ec2:ResourceTag/"]}, "ec2-instance-connect": {"instance": ["aws:ResourceTag/", "ec2:ResourceTag/"], "instance-connect-endpoint": ["aws:ResourceTag/", "ec2:ResourceTag/"]}, "ecr": {"repository": ["aws:ResourceTag/", "ecr:ResourceTag/"]}, "ecs": {"capacity-provider": ["aws:ResourceTag/", "ecs:ResourceTag/"], "cluster": ["aws:ResourceTag/", "ecs:ResourceTag/"], "container-instance": ["aws:ResourceTag/", "ecs:ResourceTag/"], "daemon": ["aws:ResourceTag/"], "daemon-deployment": ["aws:ResourceTag/"], "daemon-revision": ["aws:ResourceTag/"], "daemon-task-definition": ["aws:ResourceTag/"], "gateway": ["aws:ResourceTag/"], "gateway-route": ["aws:ResourceTag/"], "service": ["aws:ResourceTag/", "ecs:ResourceTag/"], "service-deployment": ["aws:ResourceTag/"], "service-revision": ["aws:ResourceTag/"], "task": ["aws:ResourceTag/", "ecs:ResourceTag/"], "task-definition": ["aws:ResourceTag/", "ecs:ResourceTag/"], "task-set": ["aws:ResourceTag/", "ecs:ResourceTag/"]}, "eks": {"access-entry": ["aws:ResourceTag/"], "addon": ["aws:ResourceTag/"], "capability": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "eks-anywhere-subscription": ["aws:ResourceTag/"], "fargateprofile": ["aws:ResourceTag/"], "identityproviderconfig": ["aws:ResourceTag/"], "nodegroup": ["aws:ResourceTag/"], "podidentityassociation": ["aws:ResourceTag/"]}, "elasticloadbalancing": {"listener-rule/app": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener-rule/net": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/app": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/gwy": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "listener/net": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/app/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/gwy/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "loadbalancer/net/": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "targetgroup": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"], "truststore": ["aws:ResourceTag/", "elasticloadbalancing:ResourceTag/"]}, "elasticmapreduce": {"cluster": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "editor": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "notebook-execution": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "session": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"], "studio": ["aws:ResourceTag/", "elasticmapreduce:ResourceTag/"]}, "emr-containers": {"jobRun": ["aws:ResourceTag/"], "jobTemplate": ["aws:ResourceTag/"], "managedEndpoint": ["aws:ResourceTag/"], "securityConfiguration": ["aws:ResourceTag/"], "virtualCluster": ["aws:ResourceTag/"]}, "emr-serverless": {"application": ["aws:ResourceTag/"], "jobRun": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "es": {"application": ["aws:ResourceTag/"], "datasource": ["aws:ResourceTag/"], "domain": ["aws:ResourceTag/"], "es_role": ["aws:ResourceTag/"], "opensearchservice_role": ["aws:ResourceTag/"]}, "events": {"event-bus": ["aws:ResourceTag/"], "event-busv2": ["aws:ResourceTag/"], "event-sourcev2": ["aws:ResourceTag/"], "rule-on-custom-event-bus": ["aws:ResourceTag/"], "rule-on-default-event-bus": ["aws:ResourceTag/"], "subscriber": ["aws:ResourceTag/"]}, "firehose": {"deliverystream": ["aws:ResourceTag/"]}, "fis": {"action": ["aws:ResourceTag/"], "experiment": ["aws:ResourceTag/"], "experiment-template": ["aws:ResourceTag/"]}, "globalaccelerator": {"accelerator": ["aws:ResourceTag/"], "attachment": ["aws:ResourceTag/"], "endpointgroup": ["aws:ResourceTag/"], "listener": ["aws:ResourceTag/"]}, "glue": {"blueprint": ["aws:ResourceTag/"], "catalog": ["aws:ResourceTag/"], "connection": ["aws:ResourceTag/"], "connectionType": ["aws:ResourceTag/"], "crawler": ["aws:ResourceTag/"], "customEntityType": ["aws:ResourceTag/"], "dataQualityEvaluationConfig": ["aws:ResourceTag/"], "dataQualityRuleset": ["aws:ResourceTag/"], "database": ["aws:ResourceTag/"], "devendpoint": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "integrationResourceProperty": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "mlTransform": ["aws:ResourceTag/"], "registry": ["aws:ResourceTag/"], "schema": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "table": ["aws:ResourceTag/"], "tableversion": ["aws:ResourceTag/"], "trigger": ["aws:ResourceTag/"], "usageProfile": ["aws:ResourceTag/"], "userdefinedfunction": ["aws:ResourceTag/"], "workflow": ["aws:ResourceTag/"]}, "guardduty": {"customdetectionruleassociation": ["aws:ResourceTag/"], "detector": ["aws:ResourceTag/"], "filter": ["aws:ResourceTag/"], "ipset": ["aws:ResourceTag/"], "malwareprotectionplan": ["aws:ResourceTag/"], "publishingDestination": ["aws:ResourceTag/"], "threatentityset": ["aws:ResourceTag/"], "threatintelset": ["aws:ResourceTag/"], "trustedentityset": ["aws:ResourceTag/"]}, "inspector2": {"CIS Scan Configuration": ["aws:ResourceTag/"], "Code Security Integration": ["aws:ResourceTag/"], "Code Security Scan Configuration": ["aws:ResourceTag/"], "Connector": ["aws:ResourceTag/"], "Filter": ["aws:ResourceTag/"]}, "kinesis": {"channel": ["aws:ResourceTag/"], "consumer": ["aws:ResourceTag/"], "kmsKey": ["aws:ResourceTag/"], "queue": ["aws:ResourceTag/"], "stream": ["aws:ResourceTag/"]}, "kinesisanalytics": {"application": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"]}, "kms": {"key": ["aws:ResourceTag/"]}, "lambda": {"capacityProvider": ["aws:ResourceTag/"], "code signing config": ["aws:ResourceTag/"], "durable execution": ["aws:ResourceTag/"], "eventSourceMapping": ["aws:ResourceTag/"], "function": ["aws:ResourceTag/"], "function alias": ["aws:ResourceTag/"], "function version": ["aws:ResourceTag/"], "microvmImage": ["aws:ResourceTag/"], "networkConnector": ["aws:ResourceTag/"], "runtime": ["aws:ResourceTag/"], "runtimeAlias": ["aws:ResourceTag/"], "runtimeVersion": ["aws:ResourceTag/"], "webFunction": ["aws:ResourceTag/"], "webFunctionEndpoint": ["aws:ResourceTag/"], "webFunctionRevision": ["aws:ResourceTag/"]}, "logs": {"anomaly-detector": ["aws:ResourceTag/"], "delivery": ["aws:ResourceTag/"], "delivery-destination": ["aws:ResourceTag/"], "delivery-source": ["aws:ResourceTag/"], "destination": ["aws:ResourceTag/"], "log-group": ["aws:ResourceTag/"], "log-stream": ["aws:ResourceTag/"], "lookup-table": ["aws:ResourceTag/"], "scheduled-query": ["aws:ResourceTag/"]}, "macie2": {"AllowList": ["aws:ResourceTag/"], "ClassificationJob": ["aws:ResourceTag/"], "CustomDataIdentifier": ["aws:ResourceTag/"], "FindingsFilter": ["aws:ResourceTag/"], "Member": ["aws:ResourceTag/"]}, "oam": {"Link": ["aws:ResourceTag/"], "Sink": ["aws:ResourceTag/"]}, "payment-cryptography": {"approval-team": ["aws:ResourceTag/"], "key": ["aws:ResourceTag/"]}, "pipes": {"pipe": ["aws:ResourceTag/"]}, "quicksight": {"accessControlApplication": ["aws:ResourceTag/"], "actionconnector": ["aws:ResourceTag/"], "analysis": ["aws:ResourceTag/"], "app": ["aws:ResourceTag/"], "brand": ["aws:ResourceTag/"], "customization": ["aws:ResourceTag/"], "custompermissions": ["aws:ResourceTag/"], "dashboard": ["aws:ResourceTag/"], "dashboardSnapshotJob": ["aws:ResourceTag/"], "dataset": ["aws:ResourceTag/"], "datasource": ["aws:ResourceTag/"], "dlpSetting": ["aws:ResourceTag/"], "emailCustomizationTemplate": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "folder": ["aws:ResourceTag/"], "inboundConnector": ["aws:ResourceTag/"], "ingestion": ["aws:ResourceTag/"], "knowledgeBase": ["aws:ResourceTag/"], "namespace": ["aws:ResourceTag/"], "oauthClientApplication": ["aws:ResourceTag/"], "template": ["aws:ResourceTag/"], "theme": ["aws:ResourceTag/"], "topic": ["aws:ResourceTag/"], "user": ["aws:ResourceTag/"], "vpcconnection": ["aws:ResourceTag/"]}, "ram": {"customer-managed-permission": ["aws:ResourceTag/", "ram:ResourceTag/"], "resource-share": ["aws:ResourceTag/", "ram:ResourceTag/"]}, "rds": {"auto-backup": ["aws:ResourceTag/"], "cev": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/", "rds:cluster-tag/"], "cluster-auto-backup": ["aws:ResourceTag/"], "cluster-endpoint": ["aws:ResourceTag/"], "cluster-pg": ["aws:ResourceTag/", "rds:cluster-pg-tag/"], "cluster-snapshot": ["aws:ResourceTag/", "rds:cluster-snapshot-tag/"], "db": ["aws:ResourceTag/", "rds:db-tag/"], "db-capacity-reservation": ["aws:ResourceTag/"], "deployment": ["aws:ResourceTag/"], "es": ["aws:ResourceTag/", "rds:es-tag/"], "global-cluster": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "og": ["aws:ResourceTag/", "rds:og-tag/"], "pg": ["aws:ResourceTag/", "rds:pg-tag/"], "proxy": ["aws:ResourceTag/"], "proxy-endpoint": ["aws:ResourceTag/"], "ri": ["aws:ResourceTag/", "rds:ri-tag/"], "secgrp": ["aws:ResourceTag/", "rds:secgrp-tag/"], "shardgrp": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/", "rds:snapshot-tag/"], "snapshot-tenant-database": ["aws:ResourceTag/"], "subgrp": ["aws:ResourceTag/", "rds:subgrp-tag/"], "target-group": ["aws:ResourceTag/"], "tenant-database": ["aws:ResourceTag/"]}, "redshift": {"cluster": ["aws:ResourceTag/"], "datashare": ["aws:ResourceTag/"], "eventsubscription": ["aws:ResourceTag/"], "hsmclientcertificate": ["aws:ResourceTag/"], "hsmconfiguration": ["aws:ResourceTag/"], "integration": ["aws:ResourceTag/"], "parametergroup": ["aws:ResourceTag/"], "securitygroup": ["aws:ResourceTag/"], "securitygroupingress-cidr": ["aws:ResourceTag/"], "securitygroupingress-ec2securitygroup": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"], "snapshotcopygrant": ["aws:ResourceTag/"], "snapshotschedule": ["aws:ResourceTag/"], "subnetgroup": ["aws:ResourceTag/"], "usagelimit": ["aws:ResourceTag/"]}, "redshift-data": {"cluster": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "redshift-serverless": {"namespace": ["aws:ResourceTag/"], "recoveryPoint": ["aws:ResourceTag/"], "snapshot": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "rekognition": {"collection": ["aws:ResourceTag/"], "dataset": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "projectversion": ["aws:ResourceTag/"], "streamprocessor": ["aws:ResourceTag/"]}, "resource-explorer-2": {"index": ["aws:ResourceTag/"], "view": ["aws:ResourceTag/"]}, "resource-groups": {"group": ["aws:ResourceTag/"], "tagSyncTask": ["aws:ResourceTag/"]}, "route53": {"healthchecksource": ["aws:ResourceTag/"]}, "s3": {"accessgrant": ["aws:ResourceTag/"], "accessgrantsinstance": ["aws:ResourceTag/"], "accessgrantslocation": ["aws:ResourceTag/"], "accesspoint": ["aws:ResourceTag/"], "accesspointobject": ["aws:ResourceTag/"], "bucket": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "object": ["aws:ResourceTag/"], "storagelensconfiguration": ["aws:ResourceTag/"], "storagelensgroup": ["aws:ResourceTag/"]}, "s3tables": {"Table": ["aws:ResourceTag/"], "TableBucket": ["aws:ResourceTag/"]}, "s3vectors": {"Index": ["aws:ResourceTag/"], "VectorBucket": ["aws:ResourceTag/"]}, "scheduler": {"schedule-group": ["aws:ResourceTag/"]}, "secretsmanager": {"Secret": ["aws:ResourceTag/", "secretsmanager:ResourceTag/"]}, "securityhub": {"aggregatorv2": ["aws:ResourceTag/"], "automation-rule": ["aws:ResourceTag/"], "automation-rulev2": ["aws:ResourceTag/"], "configuration-policy": ["aws:ResourceTag/"], "connector": ["aws:ResourceTag/"], "connectorv2": ["aws:ResourceTag/"], "hub": ["aws:ResourceTag/"], "hubv2": ["aws:ResourceTag/"]}, "servicediscovery": {"namespace": ["aws:ResourceTag/"], "service": ["aws:ResourceTag/"]}, "signer": {"signing-profile": ["aws:ResourceTag/"]}, "sns": {"topic": ["aws:ResourceTag/"]}, "sqs": {"queue": ["aws:ResourceTag/"]}, "ssm": {"association": ["aws:ResourceTag/"], "automation-execution": ["aws:ResourceTag/", "ssm:resourceTag/"], "cloud-connector": ["aws:ResourceTag/"], "document": ["aws:ResourceTag/", "ssm:resourceTag/"], "instance": ["aws:ResourceTag/", "ssm:resourceTag/"], "maintenancewindow": ["aws:ResourceTag/", "ssm:resourceTag/"], "managed-instance": ["aws:ResourceTag/", "ssm:resourceTag/"], "opsitem": ["aws:ResourceTag/"], "opsmetadata": ["aws:ResourceTag/", "ssm:resourceTag/"], "parameter": ["aws:ResourceTag/", "ssm:resourceTag/"], "patchbaseline": ["aws:ResourceTag/", "ssm:resourceTag/"], "task": ["aws:ResourceTag/"], "windowtarget": ["aws:ResourceTag/", "ssm:resourceTag/"], "windowtask": ["aws:ResourceTag/", "ssm:resourceTag/"]}, "sso": {"Application": ["aws:ResourceTag/"], "Instance": ["aws:ResourceTag/"], "PermissionSet": ["aws:ResourceTag/"], "TrustedTokenIssuer": ["aws:ResourceTag/"]}, "states": {"activity": ["aws:ResourceTag/"], "execution": ["aws:ResourceTag/"], "statemachine": ["aws:ResourceTag/"], "statemachinealias": ["aws:ResourceTag/"], "statemachineversion": ["aws:ResourceTag/"]}, "sts": {"role": ["aws:ResourceTag/", "iam:ResourceTag/"]}, "textract": {"adapter": ["aws:ResourceTag/"], "adapterversion": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"]}, "timestream-influxdb": {"db-backup": ["aws:ResourceTag/"], "db-cluster": ["aws:ResourceTag/"], "db-instance": ["aws:ResourceTag/"], "db-parameter-group": ["aws:ResourceTag/"]}, "translate": {"parallel-data": ["aws:ResourceTag/"], "terminology": ["aws:ResourceTag/"]}, "xray": {"group": ["aws:ResourceTag/"], "sampling-rule": ["aws:ResourceTag/"]}}, "resourceKeys": {"ec2": {"capacity-reservation": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:CapacityReservationFleet": {"member": "CapacityReservationFleetId", "arn": "capacity-reservation-fleet"}, "ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:EndDateType": {"member": "EndDateType"}, "ec2:EphemeralStorage": {"member": "EphemeralStorage"}, "ec2:InstanceMatchCriteria": {"member": "InstanceMatchCriteria"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:Tenancy": {"member": "Tenancy"}}, "carrier-gateway": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "dhcp-options": {"ec2:DhcpOptionsID": {"member": "DhcpOptionsId"}}, "fpga-image": {"ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}}, "image": {"ec2:ImageID": {"member": "ImageId"}, "ec2:ImageType": {"member": "ImageType"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "instance": {"ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:InstanceID": {"member": "InstanceId"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "internet-gateway": {"ec2:InternetGatewayID": {"member": "InternetGatewayId"}}, "launch-template": {"ec2:LaunchTemplate": {"member": "LaunchTemplateId", "arn": "launch-template"}}, "network-acl": {"ec2:NetworkAclID": {"member": "NetworkAclId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "network-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:NetworkInterfaceID": {"member": "NetworkInterfaceId"}, "ec2:Subnet": {"member": "SubnetId", "arn": "subnet"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "reserved-instances": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:InstanceType": {"member": "InstanceType"}}, "route-table": {"ec2:RouteTableID": {"member": "RouteTableId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "secondary-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}}, "security-group": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "snapshot": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:SnapshotID": {"member": "SnapshotId"}, "ec2:VolumeSize": {"member": "VolumeSize"}}, "subnet": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:SubnetID": {"member": "SubnetId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "transit-gateway": {"ec2:transitGatewayId": {"member": "TransitGatewayId"}}, "transit-gateway-attachment": {"ec2:transitGatewayAttachmentId": {"member": "TransitGatewayAttachmentId"}}, "transit-gateway-connect-peer": {"ec2:transitGatewayConnectPeerId": {"member": "TransitGatewayConnectPeerId"}}, "transit-gateway-metering-policy": {"ec2:transitGatewayMeteringPolicyId": {"member": "TransitGatewayMeteringPolicyId"}}, "transit-gateway-multicast-domain": {"ec2:transitGatewayMulticastDomainId": {"member": "TransitGatewayMulticastDomainId"}}, "transit-gateway-policy-table": {"ec2:transitGatewayPolicyTableId": {"member": "TransitGatewayPolicyTableId"}}, "transit-gateway-route-table": {"ec2:transitGatewayRouteTableId": {"member": "TransitGatewayRouteTableId"}}, "transit-gateway-route-table-announcement": {"ec2:transitGatewayRouteTableAnnouncementId": {"member": "TransitGatewayRouteTableAnnouncementId"}}, "volume": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:KmsKeyId": {"member": "KmsKeyId"}, "ec2:VolumeID": {"member": "VolumeId"}, "ec2:VolumeInitializationRate": {"member": "VolumeInitializationRate"}, "ec2:VolumeType": {"member": "VolumeType"}}, "vpc": {"ec2:VpcID": {"member": "VpcId"}}, "vpc-peering-connection": {"ec2:VpcPeeringConnectionID": {"member": "VpcPeeringConnectionId"}}}}, "unqualified": {"ssm": ["parameter"], "states": ["statemachine"]}, "mintedIds": {"events": ["api-destination", "connection"]}, @@ -3687,6 +3687,62 @@ "kinesisanalytics:UntagResource": {"action": "kinesisanalytics:UntagResource", "types": ["application", "snapshot"], "resources": [{"types": ["application", "snapshot"], "arn": "ResourceARN"}]}, "kinesisanalytics:UpdateApplication": {"action": "kinesisanalytics:UpdateApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]}, "kinesisanalytics:UpdateApplicationMaintenanceConfiguration": {"action": "kinesisanalytics:UpdateApplicationMaintenanceConfiguration", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]}, + "kms:CancelKeyDeletion": {"action": "kms:CancelKeyDeletion", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ConnectCustomKeyStore": {"action": "kms:ConnectCustomKeyStore", "types": [], "resources": []}, + "kms:CreateAlias": {"action": "kms:CreateAlias", "types": ["alias", "key"], "resources": [{"type": "alias", "fill": {"Alias": "AliasName"}, "partialArn": true}, {"type": "key", "fill": {"KeyId": "TargetKeyId"}}]}, + "kms:CreateCustomKeyStore": {"action": "kms:CreateCustomKeyStore", "types": [], "resources": []}, + "kms:CreateGrant": {"action": "kms:CreateGrant", "types": ["key"], "resources": [{"types": ["key"], "arn": "Constraints.SourceArn"}, {"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:CreateKey": {"action": "kms:CreateKey", "types": [], "resources": [], "makes": [{"type": "key", "fill": {}}]}, + "kms:Decapsulate": {"action": "kms:Decapsulate", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:Decrypt": {"action": "kms:Decrypt", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}, {"types": ["key"], "through": "CiphertextBlob", "when": {"KeyId": [null]}}]}, + "kms:DeleteAlias": {"action": "kms:DeleteAlias", "types": ["alias", "key"], "resources": [{"type": "alias", "fill": {"Alias": "AliasName"}, "partialArn": true}, {"types": ["key"], "through": "AliasName"}]}, + "kms:DeleteCustomKeyStore": {"action": "kms:DeleteCustomKeyStore", "types": [], "resources": []}, + "kms:DeleteImportedKeyMaterial": {"action": "kms:DeleteImportedKeyMaterial", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:DeriveSharedSecret": {"action": "kms:DeriveSharedSecret", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:DescribeCustomKeyStores": {"action": "kms:DescribeCustomKeyStores", "types": [], "resources": []}, + "kms:DescribeKey": {"action": "kms:DescribeKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:DisableKey": {"action": "kms:DisableKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:DisableKeyRotation": {"action": "kms:DisableKeyRotation", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:DisconnectCustomKeyStore": {"action": "kms:DisconnectCustomKeyStore", "types": [], "resources": []}, + "kms:EnableKey": {"action": "kms:EnableKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:EnableKeyRotation": {"action": "kms:EnableKeyRotation", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:Encapsulate": {"action": "kms:Encapsulate", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:Encrypt": {"action": "kms:Encrypt", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateDataKey": {"action": "kms:GenerateDataKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateDataKeyPair": {"action": "kms:GenerateDataKeyPair", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateDataKeyPairWithoutPlaintext": {"action": "kms:GenerateDataKeyPairWithoutPlaintext", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateDataKeyWithoutPlaintext": {"action": "kms:GenerateDataKeyWithoutPlaintext", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateMac": {"action": "kms:GenerateMac", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GenerateRandom": {"action": "kms:GenerateRandom", "types": [], "resources": []}, + "kms:GetKeyLastUsage": {"action": "kms:GetKeyLastUsage", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GetKeyPolicy": {"action": "kms:GetKeyPolicy", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GetKeyRotationStatus": {"action": "kms:GetKeyRotationStatus", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GetParametersForImport": {"action": "kms:GetParametersForImport", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:GetPublicKey": {"action": "kms:GetPublicKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ImportKeyMaterial": {"action": "kms:ImportKeyMaterial", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ListAliases": {"action": "kms:ListAliases", "types": [], "resources": []}, + "kms:ListGrants": {"action": "kms:ListGrants", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}, {"types": ["key"], "through": "GrantId"}]}, + "kms:ListKeyPolicies": {"action": "kms:ListKeyPolicies", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ListKeyRotations": {"action": "kms:ListKeyRotations", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ListKeys": {"action": "kms:ListKeys", "types": [], "resources": []}, + "kms:ListResourceTags": {"action": "kms:ListResourceTags", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ListRetirableGrants": {"action": "kms:ListRetirableGrants", "types": [], "resources": []}, + "kms:PutKeyPolicy": {"action": "kms:PutKeyPolicy", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ReEncrypt": {"action": "kms:ReEncrypt", "types": [], "actions": {"kms:ReEncryptFrom": ["key"], "kms:ReEncryptTo": ["key"]}, "resources": [{"type": "key", "fill": {"KeyId": "SourceKeyId"}, "action": "kms:ReEncryptFrom"}, {"type": "key", "fill": {"KeyId": "DestinationKeyId"}, "action": "kms:ReEncryptTo"}, {"types": ["key"], "through": "CiphertextBlob", "when": {"SourceKeyId": [null]}, "action": "kms:ReEncryptFrom"}]}, + "kms:ReplicateKey": {"action": "kms:ReplicateKey", "types": ["key"], "actions": {"kms:ReplicateKey": ["key"], "kms:CreateKey": []}, "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}, "action": "kms:ReplicateKey"}]}, + "kms:RetireGrant": {"action": "kms:RetireGrant", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}, {"types": ["key"], "through": "GrantId"}]}, + "kms:RevokeGrant": {"action": "kms:RevokeGrant", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}, {"types": ["key"], "through": "GrantId"}]}, + "kms:RotateKeyOnDemand": {"action": "kms:RotateKeyOnDemand", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:ScheduleKeyDeletion": {"action": "kms:ScheduleKeyDeletion", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:Sign": {"action": "kms:Sign", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:TagResource": {"action": "kms:TagResource", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:UntagResource": {"action": "kms:UntagResource", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:UpdateAlias": {"action": "kms:UpdateAlias", "types": ["alias", "key"], "resources": [{"type": "alias", "fill": {"Alias": "AliasName"}, "partialArn": true}, {"type": "key", "fill": {"KeyId": "TargetKeyId"}}, {"types": ["key"], "through": "AliasName"}]}, + "kms:UpdateCustomKeyStore": {"action": "kms:UpdateCustomKeyStore", "types": [], "resources": []}, + "kms:UpdateKeyDescription": {"action": "kms:UpdateKeyDescription", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:UpdatePrimaryRegion": {"action": "kms:UpdatePrimaryRegion", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:Verify": {"action": "kms:Verify", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, + "kms:VerifyMac": {"action": "kms:VerifyMac", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyId"}}]}, "lambda:AddEventSource": {"action": "lambda:AddEventSource", "types": [], "resources": []}, "lambda:AddLayerVersionPermission": {"action": "lambda:AddLayerVersionPermission", "types": ["layerVersion"], "resources": [{"type": "layerVersion", "fill": {"LayerName": "LayerName", "LayerVersion": "VersionNumber"}, "arnOf": {"LayerName": "layer"}}], "located": {"LayerName": "{LayerName}", "VersionNumber": "{VersionNumber}"}}, "lambda:AddPermission": {"action": "lambda:AddPermission", "types": ["function"], "resources": [{"types": ["function"], "arn": "SourceArn"}, {"type": "function", "fill": {"FunctionName": "FunctionName"}, "partialArn": true}], "located": {"FunctionName": "{FunctionName}"}}, diff --git a/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java b/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java index 192a1ced0d..31d26a552b 100644 --- a/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java +++ b/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java @@ -189,6 +189,44 @@ class RequestResourceMembersTest { assertThrows(IllegalStateException.class, () -> parse(clash.toString())); } + @Test + void anOperationCheckedAsSeveralActionsHasEachResourceUnderItsAction() throws Exception { + // KMS's ReEncrypt is authorized by kms:ReEncryptFrom on its source key and kms:ReEncryptTo on its destination. + ObjectNode document = (ObjectNode) MAPPER.readTree(""" + { + "namespaces": {"example": ["example"]}, + "arnFormats": {"example": {"key": "arn:${Partition}:example:${Region}:${Account}:key/${KeyId}"}}, + "operations": { + "example:ReEncrypt": { + "actions": {"example:ReEncryptFrom": ["key"], "example:ReEncryptTo": ["key"]}, + "resources": [ + {"type": "key", "fill": {"KeyId": "SourceKeyId"}, "action": "example:ReEncryptFrom"}, + {"types": ["key"], "through": "CiphertextBlob", "when": {"SourceKeyId": [null]}, + "action": "example:ReEncryptFrom"}, + {"type": "key", "fill": {"KeyId": "DestinationKeyId"}, "action": "example:ReEncryptTo"} + ] + } + } + } + """); + RequestResourceMembers.Table table = parse(document.toString()); + assertEquals(List.of(), table.operations().get("example:ReEncrypt")); + Map> checkedAs = table.checkedAs().get("example:ReEncrypt"); + assertEquals(List.of("example:ReEncryptFrom", "example:ReEncryptTo"), List.copyOf(checkedAs.keySet())); + assertEquals(2, checkedAs.get("example:ReEncryptFrom").size()); + assertEquals(new Member("CiphertextBlob", false), checkedAs.get("example:ReEncryptFrom").get(1).through()); + assertEquals(Map.of("KeyId", new Member("DestinationKeyId", false)), + checkedAs.get("example:ReEncryptTo").getFirst().fill()); + ObjectNode unrecorded = document.deepCopy(); + ((ObjectNode) unrecorded.path("operations").path("example:ReEncrypt").path("resources").path(0)) + .put("action", "example:ReEncrypt"); + assertThrows(IllegalStateException.class, () -> parse(unrecorded.toString())); + ObjectNode unchecked = document.deepCopy(); + ((ObjectNode) unchecked.path("operations").path("example:ReEncrypt").path("resources").path(2)) + .remove("action"); + assertThrows(IllegalStateException.class, () -> parse(unchecked.toString())); + } + @Test void theTableReadsItsNamespacesAndGivesEachTypeItNamesAnArnFormat() { RequestResourceMembers.Table table = RequestResourceMembers.table(); diff --git a/src/test/java/io/floci/aws/services/iam/KmsKeyArnEnforcementIntegrationTest.java b/src/test/java/io/floci/aws/services/iam/KmsKeyArnEnforcementIntegrationTest.java index 39bb492113..2f6a50fa99 100644 --- a/src/test/java/io/floci/aws/services/iam/KmsKeyArnEnforcementIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/iam/KmsKeyArnEnforcementIntegrationTest.java @@ -20,6 +20,7 @@ import java.util.UUID; import static io.floci.aws.testing.EnforcementFixtures.auth; import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; /** @@ -32,11 +33,12 @@ import static org.hamcrest.Matchers.equalTo; * and a Deny scoped to one key ARN fires for that key: the gap issue #6256 describes, where * every KMS call was evaluated against {@code key/*}. * - *

The same mirror rule covers the members a handler reads that a plain {@code KeyId} does - * not name: a {@code ReEncrypt} that names no {@code SourceKeyId} is authorized against the key - * that encrypted its {@code CiphertextBlob}, never against a {@code KeyId} it carries, which - * the handler ignores, and a token-only {@code RetireGrant} against the key its grant belongs - * to, which is the key the handler retires the grant under. + *

The developer guide's permissions table gives the rest: {@code ReEncrypt} is checked as + * {@code kms:ReEncryptFrom} on the key it decrypts with, its {@code SourceKeyId} or else the key + * that encrypted its {@code CiphertextBlob}, and {@code kms:ReEncryptTo} on the key it encrypts + * with; {@code CreateAlias} on the alias and the key, {@code UpdateAlias} on the alias, the new + * key and the key the alias points at now, {@code DeleteAlias} on the alias and its key; and + * {@code ReplicateKey} as {@code kms:ReplicateKey} on the key and {@code kms:CreateKey}. */ @QuarkusTest @TestProfile(IamEnforcementProfile.class) @@ -144,23 +146,28 @@ class KmsKeyArnEnforcementIntegrationTest { } @Test - void aDecryptNamingNoKeyTheStoreHoldsFallsBackToEveryKeyAndTheHandlerRefusesIt() { - Session session = assumeRoleWith(""" + void aDecryptWhoseCiphertextNamesNoKeyIsCheckedOnStar() { + Session onKeys = assumeRoleWith(""" {"Version":"2012-10-17","Statement":[ {"Effect":"Allow","Action":"kms:Decrypt","Resource":"%s*"}]}""" .formatted(KEY_ARN_PREFIX)); + Session onEverything = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":"kms:Decrypt","Resource":"*"}]}"""); - // A ciphertext no stored key answers to names every key, so a wildcard policy still - // matches it and the handler, not enforcement, refuses it. - keyCall(session, "Decrypt", "{\"CiphertextBlob\": \"AAAA\"}") + // A ciphertext no stored key answers to names no key, so the request is checked on *, which a policy + // granting every resource covers and the handler then refuses. + keyCall(onKeys, "Decrypt", "{\"CiphertextBlob\": \"AAAA\"}") + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(onEverything, "Decrypt", "{\"CiphertextBlob\": \"AAAA\"}") .then().statusCode(400).body("__type", equalTo("InvalidCiphertextException")); } /** * A caller allowed on one key submits ciphertext another, denied key encrypted and - * carries a KeyId naming the allowed one, which the handler never reads. The source the - * request is authorized against is the key that encrypted the ciphertext, so the denied - * key's data does not come out re-encrypted under the allowed one. + * carries a KeyId naming the allowed one, which the handler never reads. The source + * {@code kms:ReEncryptFrom} is checked on is the key that encrypted the ciphertext, so the + * denied key's data does not come out re-encrypted under the allowed one. */ @Test void aReEncryptIsAuthorizedAgainstTheKeyThatEncryptedTheCiphertextNotAKeyIdItCarries() { @@ -172,8 +179,8 @@ class KmsKeyArnEnforcementIntegrationTest { .then().statusCode(200).extract().path("CiphertextBlob"); Session session = assumeRoleWith(""" {"Version":"2012-10-17","Statement":[ - {"Effect":"Allow","Action":"kms:ReEncrypt","Resource":"%s*"}, - {"Effect":"Deny","Action":"kms:ReEncrypt","Resource":"%s"}]}""" + {"Effect":"Allow","Action":"kms:ReEncrypt*","Resource":"%s*"}, + {"Effect":"Deny","Action":"kms:ReEncryptFrom","Resource":"%s"}]}""" .formatted(KEY_ARN_PREFIX, deniedArn)); keyCall(session, "ReEncrypt", @@ -189,43 +196,114 @@ class KmsKeyArnEnforcementIntegrationTest { } /** - * A token-only RetireGrant is authorized against the key the token's grant belongs to, the - * key the handler finds the grant under, so a policy allowing retirement on that key alone - * permits it and one allowing another key does not. + * ReEncrypt is checked as the two actions AWS authorizes it by, each on its own key: a + * caller allowed to re-encrypt from one key and to another may move data only that way, a + * policy naming neither is refused, and no permission named {@code kms:ReEncrypt} exists to + * grant it. */ @Test - void aTokenOnlyRetireGrantIsAuthorizedAgainstTheKeyItsGrantBelongsTo() { - String keyArn = createKey(); - String otherArn = createKey(); - Grant grant = createGrantOn(keyArn); - Session onTheGrantsKey = assumeRoleWith(grantOperationOn("kms:RetireGrant", keyArn)); - Session onAnotherKey = assumeRoleWith(grantOperationOn("kms:RetireGrant", otherArn)); + void aReEncryptNeedsReEncryptFromOnItsSourceAndReEncryptToOnItsDestination() { + String sourceArn = createKey(); + String destinationArn = createKey(); + String ciphertext = accountCall("Encrypt", encryptBody(sourceArn)) + .then().statusCode(200).extract().path("CiphertextBlob"); + String reEncrypt = "{\"CiphertextBlob\": \"" + ciphertext + "\", \"SourceKeyId\": \"" + sourceArn + + "\", \"DestinationKeyId\": \"" + destinationArn + "\"}"; + Session oneWay = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":"kms:ReEncryptFrom","Resource":"%s"}, + {"Effect":"Allow","Action":"kms:ReEncryptTo","Resource":"%s"}]}""" + .formatted(sourceArn, destinationArn)); + Session backwards = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":"kms:ReEncryptFrom","Resource":"%s"}, + {"Effect":"Allow","Action":"kms:ReEncryptTo","Resource":"%s"}]}""" + .formatted(destinationArn, sourceArn)); + Session byItsName = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":"kms:ReEncrypt","Resource":"*"}]}"""); - keyCall(onAnotherKey, "RetireGrant", "{\"GrantToken\": \"" + grant.token() + "\"}") + keyCall(backwards, "ReEncrypt", reEncrypt) .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); - keyCall(onTheGrantsKey, "RetireGrant", "{\"GrantToken\": \"" + grant.token() + "\"}") - .then().statusCode(200); - accountCall("ListGrants", "{\"KeyId\": \"" + keyArn + "\"}") - .then().statusCode(200).body("Grants.size()", equalTo(0)); + keyCall(byItsName, "ReEncrypt", reEncrypt) + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(oneWay, "ReEncrypt", reEncrypt) + .then().statusCode(200).body("KeyId", equalTo(destinationArn)).body("SourceKeyId", equalTo(sourceArn)); } - /** A wildcard allow with a Deny on the grant's key still fires for a token-only RetireGrant. */ + /** + * A RetireGrant naming its grant by its token alone names no key the table reads, so it is + * checked on {@code *}: a policy granting retirement on every resource allows it, one scoped + * to the grant's key does not. + */ @Test - void aDenyOnTheGrantsKeyFiresForATokenOnlyRetireGrant() { + void aTokenOnlyRetireGrantIsCheckedOnStar() { String keyArn = createKey(); - Grant grant = createGrantOn(keyArn); - Session session = assumeRoleWith(""" - {"Version":"2012-10-17","Statement":[ - {"Effect":"Allow","Action":"kms:RetireGrant","Resource":"%s*"}, - {"Effect":"Deny","Action":"kms:RetireGrant","Resource":"%s"}]}""" - .formatted(KEY_ARN_PREFIX, keyArn)); + Grant refused = createGrantOn(keyArn); + Grant retired = createGrantOn(keyArn); + Session onTheGrantsKey = assumeRoleWith(grantOperationOn("kms:RetireGrant", keyArn)); + Session onEverything = assumeRoleWith(grantOperationOn("kms:RetireGrant", "*")); - keyCall(session, "RetireGrant", "{\"GrantToken\": \"" + grant.token() + "\"}") + keyCall(onTheGrantsKey, "RetireGrant", "{\"GrantToken\": \"" + refused.token() + "\"}") .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(onEverything, "RetireGrant", "{\"GrantToken\": \"" + retired.token() + "\"}") + .then().statusCode(200); accountCall("ListGrants", "{\"KeyId\": \"" + keyArn + "\"}") .then().statusCode(200).body("Grants.size()", equalTo(1)); } + /** + * The alias calls need their action on the alias and on each key the permissions table + * names: CreateAlias on the key it associates, UpdateAlias on the new key and on the key the + * alias points at now, DeleteAlias on the key the alias points at. + */ + @Test + void theAliasCallsNeedTheirActionOnTheAliasAndItsKeys() { + String currentArn = createKey(); + String newArn = createKey(); + String aliasName = "alias/" + UUID.randomUUID().toString().substring(0, 8); + String aliasArn = ALIAS_ARN_PREFIX + aliasName.substring("alias/".length()); + String create = "{\"AliasName\": \"" + aliasName + "\", \"TargetKeyId\": \"" + currentArn + "\"}"; + Session aliasOnly = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":["kms:CreateAlias","kms:UpdateAlias","kms:DeleteAlias"], + "Resource":"%s"}]}""".formatted(aliasArn)); + Session withKeys = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":["kms:CreateAlias","kms:UpdateAlias","kms:DeleteAlias"], + "Resource":["%s","%s"]}]}""".formatted(aliasArn, currentArn)); + Session withBothKeys = assumeRoleWith(""" + {"Version":"2012-10-17","Statement":[ + {"Effect":"Allow","Action":["kms:UpdateAlias"],"Resource":["%s","%s","%s"]}]}""" + .formatted(aliasArn, currentArn, newArn)); + + keyCall(aliasOnly, "CreateAlias", create) + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(withKeys, "CreateAlias", create).then().statusCode(200); + cleanup.register(() -> accountCall("DeleteAlias", "{\"AliasName\": \"" + aliasName + "\"}")); + String update = "{\"AliasName\": \"" + aliasName + "\", \"TargetKeyId\": \"" + newArn + "\"}"; + keyCall(withKeys, "UpdateAlias", update) + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(withBothKeys, "UpdateAlias", update).then().statusCode(200); + keyCall(withKeys, "DeleteAlias", "{\"AliasName\": \"" + aliasName + "\"}") + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")); + keyCall(withBothKeys, "UpdateAlias", + "{\"AliasName\": \"" + aliasName + "\", \"TargetKeyId\": \"" + currentArn + "\"}") + .then().statusCode(200); + keyCall(withKeys, "DeleteAlias", "{\"AliasName\": \"" + aliasName + "\"}").then().statusCode(200); + } + + /** ReplicateKey also needs kms:CreateKey, which the permissions table lists beside kms:ReplicateKey. */ + @Test + void aReplicateKeyNeedsCreateKeyBesideReplicateKey() { + String keyArn = createKey(); + Session session = assumeRoleWith(grantOperationOn("kms:ReplicateKey", keyArn)); + + keyCall(session, "ReplicateKey", "{\"KeyId\": \"" + keyArn + "\", \"ReplicaRegion\": \"us-west-2\"}") + .then().statusCode(400).body("__type", equalTo("AccessDeniedException")) + .body("message", containsString("kms:CreateKey")); + } + /** * A RevokeGrant naming one key while the grant belongs to another is denied: the request is * authorized against both, so the pair cannot revoke a grant the named key does not hold. diff --git a/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java b/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java index 1b9e7a1df9..2b0c4f118d 100644 --- a/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java +++ b/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java @@ -24,6 +24,7 @@ import io.floci.aws.services.iam.model.IamUser; import io.floci.aws.services.iam.model.InstanceProfile; import io.floci.aws.services.iam.model.ServerCertificate; import io.floci.aws.services.kms.KmsService; +import io.floci.aws.services.kms.KmsStoredResourceArns; import io.floci.aws.services.lambda.LambdaStoredResourceArns; import io.floci.aws.services.lambdamicrovms.LambdaMicrovmsService; import io.floci.aws.services.s3.S3RequestPathLabels; @@ -1462,12 +1463,16 @@ class ResourceArnBuilderTest { private static final String KMS_OTHER_KEY_ARN = "arn:aws:kms:us-east-1:000000000000:key/5678efab-34cd-12ab-90ef-1234567890ab"; private static final String KMS_ALIAS_ARN = "arn:aws:kms:us-east-1:000000000000:alias/app"; - /** A builder reading {@code kms}, for a key named by an id, an alias or an ARN. */ + /** A builder reading {@code kms} as KMS's stored ARNs answer from it, in the caller's account. */ private static ResourceArnBuilder backedBy(KmsService kms) { - @SuppressWarnings("unchecked") - Instance instance = mock(Instance.class); - when(instance.get()).thenReturn(kms); - return new ResourceArnBuilder(new ObjectMapper(), null, instance); + RegionResolver regions = mock(RegionResolver.class); + when(regions.getAccountId()).thenReturn(ACCOUNT); + return reading(new KmsStoredResourceArns(kms, regions)); + } + + /** The resources a KMS request is checked on, as the table reads {@code operation}. */ + private List kms(ResourceArnBuilder builder, String operation) { + return builder.buildResources("kms", "kms:" + operation, ctx, "us-east-1", ACCOUNT, "aws"); } /** A builder reading the stored ARNs of a namespace, for every request of that namespace. */ @@ -1475,7 +1480,7 @@ class ResourceArnBuilderTest { @SuppressWarnings("unchecked") Instance instance = mock(Instance.class); when(instance.iterator()).thenAnswer(invocation -> List.of(stored).iterator()); - return new ResourceArnBuilder(new ObjectMapper(), null, null, instance); + return new ResourceArnBuilder(new ObjectMapper(), null, instance); } /** The finder of the stored ARNs of a namespace, answering one name of one type with one ARN. */ @@ -1494,308 +1499,162 @@ class ResourceArnBuilderTest { } /** - * The gap issue 6256 describes. KMS is a JSON protocol on {@code /} with the key in the body, - * so reading a {@code /keys/} path segment named nothing and every call was evaluated - * against {@code key/*}: an {@code Allow} scoped to one key ARN never matched, and a - * {@code Deny} scoped to one never fired. A key-scoped operation is now evaluated against the - * key its request names. + * The gap issue 6256 describes. KMS is a JSON protocol on {@code /} with the key in the body, so reading a + * {@code /keys/} path segment named nothing and every call was evaluated against {@code key/*}. A key-scoped + * operation is checked on the key its request names, an alias name or ARN resolved to the key it points at, in + * whatever state, as KMS's handler resolves it. */ @Test - void kmsNamesTheKeyAKeyScopedOperationActsOn() { + void aKmsKeyScopedOperationIsCheckedOnTheKeyItsRequestNames() { KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(kms.findKeyArn(KMS_KEY_ID, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount(KMS_KEY_ID, ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount("alias/app", ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount(KMS_ALIAS_ARN, ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); ResourceArnBuilder backed = backedBy(kms); - for (String action : List.of("kms:Encrypt", "kms:Decrypt", "kms:GenerateDataKey", - "kms:GenerateDataKeyWithoutPlaintext", "kms:DescribeKey", "kms:GetPublicKey", - "kms:ScheduleKeyDeletion", "kms:CancelKeyDeletion", "kms:CreateGrant", "kms:ListGrants", - "kms:RevokeGrant", "kms:Sign", "kms:Verify", "kms:GenerateMac", "kms:VerifyMac", - "kms:TagResource", "kms:UntagResource", "kms:ListResourceTags", "kms:GetKeyPolicy", - "kms:PutKeyPolicy", "kms:ListKeyPolicies", "kms:UpdateKeyDescription", - "kms:EnableKey", "kms:DisableKey", "kms:EnableKeyRotation", "kms:DisableKeyRotation", - "kms:GetKeyRotationStatus", "kms:RotateKeyOnDemand", "kms:GetParametersForImport", - "kms:ImportKeyMaterial", "kms:DeleteImportedKeyMaterial", "kms:ReplicateKey", - "kms:RetireGrant")) { + for (String operation : List.of("Encrypt", "Decrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", + "DescribeKey", "GetPublicKey", "ScheduleKeyDeletion", "CancelKeyDeletion", "CreateGrant", "ListGrants", + "Sign", "Verify", "GenerateMac", "VerifyMac", "TagResource", "UntagResource", "ListResourceTags", + "GetKeyPolicy", "PutKeyPolicy", "ListKeyPolicies", "UpdateKeyDescription", "EnableKey", "DisableKey", + "EnableKeyRotation", "DisableKeyRotation", "GetKeyRotationStatus", "RotateKeyOnDemand", + "GetParametersForImport", "ImportKeyMaterial", "DeleteImportedKeyMaterial", "RevokeGrant")) { setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources(action, ctx, "us-east-1", ACCOUNT, "aws"), action); + assertEquals(List.of(KMS_KEY_ARN), kms(backed, operation), operation); + } + for (String named : List.of("alias/app", KMS_ALIAS_ARN, KMS_KEY_ARN)) { + setJsonBody("{\"KeyId\":\"" + named + "\",\"Plaintext\":\"aGk=\"}"); + assertEquals(List.of(KMS_KEY_ARN), kms(backed, "Encrypt"), named); } } - private static final String PC_KEY_ARN = - "arn:aws:payment-cryptography:us-east-1:000000000000:key/abc123"; - - /** - * A key named by an alias is authorized against the key it points at, as the handler resolves - * it. Otherwise an {@code Allow} scoped to {@code key/*} passes while an {@code Deny} scoped - * to the key the alias names is missed, and the caller reads or deletes a key it was denied. - */ + /** A key KMS holds none of is checked on its id in the request's partition, as KMS mints a key there. */ @Test - void paymentCryptographyResolvesAnAliasToTheKeyItPointsAt() { - ResourceArnBuilder reading = reading(stored("payment-cryptography", "key", "alias/team/card-key", PC_KEY_ARN)); - - // The route its resources are read from is the one the request's path matches, so the - // request names its method and its URI. - when(ctx.getMethod()).thenReturn("POST"); - when(uriInfo.getRequestUri()).thenReturn(URI.create("http://localhost:4566/")); - when(uriInfo.getBaseUri()).thenReturn(URI.create("http://localhost:4566/")); - setJsonBody("{\"KeyIdentifier\":\"alias/team/card-key\"}"); - assertEquals(List.of(PC_KEY_ARN), - reading.buildResources("payment-cryptography", "payment-cryptography:GetKey", ctx, - "us-east-1", ACCOUNT, "aws")); - } - - /** A key named by an alias is authorized against the key it points at, as the handler resolves it. */ - @Test - void kmsResolvesAnAliasToTheKeyItPointsAt() { + void aKmsKeyNoneHoldsIsCheckedOnItsIdInTheRequestsPartition() { KmsService kms = mock(KmsService.class); - when(kms.findKeyArn("alias/app", "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - when(kms.findKeyArn(KMS_ALIAS_ARN, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - ResourceArnBuilder backed = backedBy(kms); - - setJsonBody("{\"KeyId\":\"alias/app\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); - setJsonBody("{\"KeyId\":\"" + KMS_ALIAS_ARN + "\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); - } - - /** - * The operations the KMS permissions reference gives no resource, which it also requires a - * policy to name {@code *} for, stay at the wildcard; a key-scoped operation that names no - * key keeps the permissive fallback rather than being refused here, since the handler - * refuses it with its own error. - */ - @Test - void kmsLeavesTheActionsThatNameNoKeyAtTheirOwnResources() { - ResourceArnBuilder backed = backedBy(mock(KmsService.class)); - for (String action : List.of("kms:CreateKey", "kms:GenerateRandom", "kms:ListKeys", - "kms:ListAliases", "kms:ListRetirableGrants")) { - setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of("*"), - backed.buildKmsResources(action, ctx, "us-east-1", ACCOUNT, "aws"), action); - } - setJsonBody("{}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:RetireGrant", ctx, "us-east-1", ACCOUNT, "aws")); - assertEquals(List.of("arn:aws-cn:kms:cn-north-1:000000000000:key/*"), - backed.buildKmsResources("kms:RetireGrant", ctx, "cn-north-1", ACCOUNT, "aws-cn")); - } - - /** - * A request with no body at all keeps the action's own resources: the operations the reference - * gives no resource stay at {@code *}, and a key-scoped one falls back to every key the - * account holds rather than being refused here. - */ - @Test - void kmsKeepsEachActionsOwnResourcesForARequestWithNoBody() { - ResourceArnBuilder backed = backedBy(mock(KmsService.class)); - assertEquals(List.of("*"), - backed.buildKmsResources("kms:CreateKey", ctx, "us-east-1", ACCOUNT, "aws")); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); - } - - /** - * A key ARN the account holds nothing of is kept as the caller spelled it, a bare key id is - * minted in the request's partition, and an alias that resolves to nothing names every key: - * the operation fails before a policy matters. - */ - @Test - void kmsMintsKeyArnsInTheRequestPartitionAndFallsBackForTheUnresolvable() { - KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - ResourceArnBuilder backed = backedBy(kms); - - setJsonBody("{\"KeyId\":\"" + KMS_KEY_ARN + "\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); - + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\"}"); assertEquals(List.of("arn:aws-cn:kms:cn-north-1:000000000000:key/" + KMS_KEY_ID), - backed.buildKmsResources("kms:Encrypt", ctx, "cn-north-1", ACCOUNT, "aws-cn")); - - setJsonBody("{\"KeyId\":\"alias/gone\"}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); + backedBy(kms).buildResources("kms", "kms:Encrypt", ctx, "cn-north-1", ACCOUNT, "aws-cn")); } /** - * A {@code Decrypt} names its key in an optional {@code KeyId}; without one the key is the - * one that encrypted the {@code CiphertextBlob}, read the same way the handler reads it. + * The calls whose actions the Service Reference gives no resource type, the custom key store ones among them, + * are checked on {@code *}, as AWS checks them. */ @Test - void kmsDecryptResolvesTheKeyFromTheCiphertextItNames() { + void theKmsCallsThatNameNoKeyAreCheckedOnStar() { + ResourceArnBuilder backed = backedBy(mock(KmsService.class)); + setJsonBody("{\"CustomKeyStoreId\":\"cks-1234567890abcdef0\"}"); + for (String operation : List.of("CreateKey", "GenerateRandom", "ListKeys", "ListAliases", + "ListRetirableGrants", "ConnectCustomKeyStore", "DescribeCustomKeyStores", "DeleteCustomKeyStore")) { + assertEquals(List.of("*"), kms(backed, operation), operation); + } + } + + /** + * A Decrypt naming no key is checked on the key its ciphertext was encrypted under, which the API reference says + * KMS reads from the blob's metadata; one naming a key on that key; one whose blob names none KMS holds on + * {@code *}. + */ + @Test + void decryptIsCheckedOnTheKeyOfItsCiphertextWhenItNamesNone() { byte[] blob = "ciphertext".getBytes(StandardCharsets.UTF_8); String encoded = Base64.getEncoder().encodeToString(blob); KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount("alias/app", ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); when(kms.decryptToKeyArn(blob, "us-east-1")).thenReturn(KMS_KEY_ARN); ResourceArnBuilder backed = backedBy(kms); setJsonBody("{\"CiphertextBlob\":\"" + encoded + "\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - when(kms.findKeyArn("alias/app", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); - setJsonBody("{\"KeyId\":\"alias/app\",\"CiphertextBlob\":\"" + encoded + "\"}"); - assertEquals(List.of(KMS_OTHER_KEY_ARN), - backed.buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - KmsService unresolvable = mock(KmsService.class); - when(unresolvable.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(unresolvable.decryptToKeyArn(any(), any())).thenReturn(null); - setJsonBody("{\"CiphertextBlob\":\"" + encoded + "\"}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backedBy(unresolvable).buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"CiphertextBlob\":629}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"CiphertextBlob\":{\"KeyId\":\"x\"}}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"CiphertextBlob\":[\"aGk=\"]}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:Decrypt", ctx, "us-east-1", ACCOUNT, "aws")); + assertEquals(List.of(KMS_KEY_ARN), kms(backed, "Decrypt")); + setJsonBody("{\"CiphertextBlob\":\"" + encoded + "\",\"KeyId\":\"alias/app\"}"); + assertEquals(List.of(KMS_OTHER_KEY_ARN), kms(backed, "Decrypt")); + setJsonBody("{\"CiphertextBlob\":\"not base64!\"}"); + assertEquals(List.of("*"), kms(backed, "Decrypt")); } /** - * The alias operations name their resources as the alias permissions page gives them: - * {@code CreateAlias} the alias and the key, {@code UpdateAlias} the alias, the key it points - * at and the key it will point at, and {@code DeleteAlias} the alias and the key it points - * at. A request naming no alias AWS would accept the name of names nothing. + * The alias calls are checked on the alias and the keys the developer guide's permissions table names: CreateAlias + * the key it associates, UpdateAlias the newly and the currently associated key, DeleteAlias the key its alias is + * associated with. */ @Test - void kmsAliasOperationsNameTheAliasAndTheKeysTheyTouch() { + void theKmsAliasCallsAreCheckedOnTheAliasAndItsKeys() { KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(kms.findKeyArn(KMS_KEY_ID, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount(KMS_KEY_ID, ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); when(kms.findKeyArn("alias/app", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); ResourceArnBuilder backed = backedBy(kms); setJsonBody("{\"AliasName\":\"alias/app\",\"TargetKeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of(KMS_ALIAS_ARN, KMS_KEY_ARN), - backed.buildKmsResources("kms:CreateAlias", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"AliasName\":\"alias/app\",\"TargetKeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of(KMS_ALIAS_ARN, KMS_OTHER_KEY_ARN, KMS_KEY_ARN), - backed.buildKmsResources("kms:UpdateAlias", ctx, "us-east-1", ACCOUNT, "aws")); - - // A retarget onto the key the alias already points at names that key once. - when(kms.findKeyArn("alias/app", "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - setJsonBody("{\"AliasName\":\"alias/app\",\"TargetKeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of(KMS_ALIAS_ARN, KMS_KEY_ARN), - backed.buildKmsResources("kms:UpdateAlias", ctx, "us-east-1", ACCOUNT, "aws")); - - when(kms.findKeyArn("alias/app", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); + assertEquals(List.of(KMS_ALIAS_ARN, KMS_KEY_ARN), kms(backed, "CreateAlias")); + assertEquals(List.of(KMS_ALIAS_ARN, KMS_KEY_ARN, KMS_OTHER_KEY_ARN), kms(backed, "UpdateAlias")); setJsonBody("{\"AliasName\":\"alias/app\"}"); - assertEquals(List.of(KMS_ALIAS_ARN, KMS_OTHER_KEY_ARN), - backed.buildKmsResources("kms:DeleteAlias", ctx, "us-east-1", ACCOUNT, "aws")); - - // A name AWS would refuse contributes no alias resource, and a request naming no alias - // at all names nothing but the wildcard. - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - setJsonBody("{\"AliasName\":\"app\",\"TargetKeyId\":\"" + KMS_KEY_ID + "\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:CreateAlias", ctx, "us-east-1", ACCOUNT, "aws")); - setJsonBody("{}"); - assertEquals(List.of("*"), - backed.buildKmsResources("kms:DeleteAlias", ctx, "us-east-1", ACCOUNT, "aws")); + assertEquals(List.of(KMS_ALIAS_ARN, KMS_OTHER_KEY_ARN), kms(backed, "DeleteAlias")); } /** - * A {@code ReEncrypt} acts on two keys, and the filter authorizes a request once per - * resource, so both are named: the source the ciphertext or its optional {@code SourceKeyId} - * resolves to, and the destination its {@code DestinationKeyId} names. + * ReEncrypt is checked as the two actions the permissions table gives it, never as its own name: + * {@code kms:ReEncryptFrom} on the key it decrypts with (its {@code SourceKeyId}, or else the key of its + * ciphertext) and {@code kms:ReEncryptTo} on the key it encrypts with. */ @Test - void kmsReEncryptNamesBothKeysItActsOn() { + void reEncryptIsCheckedAsReEncryptFromOnItsSourceAndReEncryptToOnItsDestination() { byte[] blob = "ciphertext".getBytes(StandardCharsets.UTF_8); String encoded = Base64.getEncoder().encodeToString(blob); KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(kms.decryptToKeyArn(blob, "us-east-1")).thenReturn(KMS_KEY_ARN); - when(kms.findKeyArn("alias/destination", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount("alias/source", ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); + when(kms.findKeyArnOfAccount("alias/destination", ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.decryptToKeyArn(blob, "us-east-1")).thenReturn(KMS_OTHER_KEY_ARN); ResourceArnBuilder backed = backedBy(kms); setJsonBody("{\"CiphertextBlob\":\"" + encoded + "\",\"DestinationKeyId\":\"alias/destination\"}"); - assertEquals(List.of(KMS_KEY_ARN, KMS_OTHER_KEY_ARN), - backed.buildKmsResources("kms:ReEncrypt", ctx, "us-east-1", ACCOUNT, "aws")); - - when(kms.findKeyArn("alias/source", "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - setJsonBody("{\"SourceKeyId\":\"alias/source\",\"DestinationKeyId\":\"alias/destination\"}"); - assertEquals(List.of(KMS_KEY_ARN, KMS_OTHER_KEY_ARN), - backed.buildKmsResources("kms:ReEncrypt", ctx, "us-east-1", ACCOUNT, "aws")); + assertEquals(Map.of("kms:ReEncryptFrom", List.of(KMS_OTHER_KEY_ARN), "kms:ReEncryptTo", List.of(KMS_KEY_ARN)), + backed.checkedAs("kms", "kms:ReEncrypt", ctx, "us-east-1", ACCOUNT, "aws")); + setJsonBody("{\"CiphertextBlob\":\"" + encoded + "\",\"SourceKeyId\":\"alias/source\"," + + "\"DestinationKeyId\":\"alias/destination\"}"); + assertEquals(List.of("kms:ReEncryptFrom", "kms:ReEncryptTo"), + List.copyOf(backed.checkedAs("kms", "kms:ReEncrypt", ctx, "us-east-1", ACCOUNT, "aws").keySet())); + assertEquals(List.of("*"), kms(backed, "ReEncrypt")); + assertEquals(Map.of(), backed.checkedAs("kms", "kms:Encrypt", ctx, "us-east-1", ACCOUNT, "aws")); } /** - * A {@code ReEncrypt} never reads a {@code KeyId}: its source is the key that encrypted the - * ciphertext when the request names no {@code SourceKeyId}, so a {@code KeyId} naming - * another key cannot choose the key the request is authorized against. A caller allowed - * on the claimed key only could otherwise submit another key's ciphertext and have it - * re-encrypted under the allowed one. + * ReplicateKey is checked as the two permissions the table gives it: {@code kms:ReplicateKey} on the primary key + * and {@code kms:CreateKey} on no resource. */ @Test - void kmsReEncryptNamesTheSourceTheHandlerDecryptsWithNotAKeyId() { - byte[] blob = "ciphertext".getBytes(StandardCharsets.UTF_8); - String encoded = Base64.getEncoder().encodeToString(blob); + void replicateKeyIsCheckedAsReplicateKeyOnItsKeyAndCreateKeyOnStar() { KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(kms.decryptToKeyArn(blob, "us-east-1")).thenReturn(KMS_KEY_ARN); - when(kms.findKeyArn("alias/claimed", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); - ResourceArnBuilder backed = backedBy(kms); - - setJsonBody("{\"CiphertextBlob\":\"" + encoded - + "\",\"KeyId\":\"alias/claimed\",\"DestinationKeyId\":\"" + KMS_OTHER_KEY_ARN + "\"}"); - assertEquals(List.of(KMS_KEY_ARN, KMS_OTHER_KEY_ARN), - backed.buildKmsResources("kms:ReEncrypt", ctx, "us-east-1", ACCOUNT, "aws")); + when(kms.findKeyArnOfAccount(KMS_KEY_ID, ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\",\"ReplicaRegion\":\"us-west-2\"}"); + assertEquals(Map.of("kms:ReplicateKey", List.of(KMS_KEY_ARN), "kms:CreateKey", List.of("*")), + backedBy(kms).checkedAs("kms", "kms:ReplicateKey", ctx, "us-east-1", ACCOUNT, "aws")); } /** - * A grant operation names the key the grant it acts on belongs to: a token-only - * {@code RetireGrant} the key the token's grant belongs to, since the handler finds the - * grant by the token alone, and a {@code RetireGrant} or a {@code RevokeGrant} identifying - * its grant by {@code KeyId} and {@code GrantId} the key it names together with that grant's - * key. A token naming no grant the account holds keeps the permissive fallback. + * The grant calls are checked on the key they name and on the key the grant their {@code GrantId} names is on, + * which closes naming one key while revoking another key's grant. A RetireGrant naming its grant by token alone + * names neither, as botocore's record of a grant holds no token: it is checked on {@code *}. */ @Test - void kmsGrantOperationsNameTheKeyTheGrantTheyActOnBelongsTo() { + void theKmsGrantCallsAreCheckedOnTheirKeyAndTheKeyOfTheirGrant() { KmsService kms = mock(KmsService.class); - when(kms.findKeyArn(any(), any())).thenReturn(Optional.empty()); - when(kms.findKeyArn(KMS_KEY_ID, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - when(kms.findKeyArn("other-key", "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); - when(kms.findGrantKeyArn("grant-token", null, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount(any(), any(), any())).thenReturn(Optional.empty()); + when(kms.findKeyArnOfAccount(KMS_KEY_ID, ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); + when(kms.findKeyArnOfAccount("other-key", ACCOUNT, "us-east-1")).thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); when(kms.findGrantKeyArn(null, "grant-id", "us-east-1")).thenReturn(Optional.of(KMS_KEY_ARN)); - when(kms.findGrantKeyArn("unknown-token", null, "us-east-1")).thenReturn(Optional.empty()); ResourceArnBuilder backed = backedBy(kms); - setJsonBody("{\"GrantToken\":\"grant-token\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:RetireGrant", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"GrantToken\":\"unknown-token\"}"); - assertEquals(List.of("arn:aws:kms:us-east-1:000000000000:key/*"), - backed.buildKmsResources("kms:RetireGrant", ctx, "us-east-1", ACCOUNT, "aws")); - - setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\",\"GrantId\":\"grant-id\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:RetireGrant", ctx, "us-east-1", ACCOUNT, "aws")); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:RevokeGrant", ctx, "us-east-1", ACCOUNT, "aws")); - setJsonBody("{\"KeyId\":\"other-key\",\"GrantId\":\"grant-id\"}"); - assertEquals(List.of(KMS_OTHER_KEY_ARN, KMS_KEY_ARN), - backed.buildKmsResources("kms:RevokeGrant", ctx, "us-east-1", ACCOUNT, "aws")); - - when(kms.findGrantKeyArn("grant-token", "grant-id", "us-east-1")) - .thenReturn(Optional.of(KMS_OTHER_KEY_ARN)); - setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\",\"GrantId\":\"grant-id\",\"GrantToken\":\"grant-token\"}"); - assertEquals(List.of(KMS_KEY_ARN), - backed.buildKmsResources("kms:RevokeGrant", ctx, "us-east-1", ACCOUNT, "aws")); + assertEquals(List.of(KMS_OTHER_KEY_ARN, KMS_KEY_ARN), kms(backed, "RevokeGrant")); + assertEquals(List.of(KMS_OTHER_KEY_ARN, KMS_KEY_ARN), kms(backed, "RetireGrant")); + setJsonBody("{\"KeyId\":\"" + KMS_KEY_ID + "\",\"GrantId\":\"grant-id\"}"); + assertEquals(List.of(KMS_KEY_ARN), kms(backed, "RevokeGrant")); + setJsonBody("{\"GrantToken\":\"grant-token\"}"); + assertEquals(List.of("*"), kms(backed, "RetireGrant")); } // ── SSM ────────────────────────────────────────────────────────────────────── @@ -1971,7 +1830,7 @@ class ResourceArnBuilderTest { Instance labels = mock(Instance.class); when(labels.isUnsatisfied()).thenReturn(false); when(labels.iterator()).thenAnswer(invocation -> List.of(s3Keys).iterator()); - return new ResourceArnBuilder(new ObjectMapper(), null, null, null, labels); + return new ResourceArnBuilder(new ObjectMapper(), null, null, labels); } /** A current request whose path is {@code sentPath}, the path the server received. */ diff --git a/src/test/java/io/floci/aws/services/kms/KmsKeyOfAccountTest.java b/src/test/java/io/floci/aws/services/kms/KmsKeyOfAccountTest.java index 3ed4f7b8c8..612cac4ff5 100644 --- a/src/test/java/io/floci/aws/services/kms/KmsKeyOfAccountTest.java +++ b/src/test/java/io/floci/aws/services/kms/KmsKeyOfAccountTest.java @@ -9,7 +9,10 @@ import io.floci.aws.services.kms.model.KmsKey; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import java.nio.charset.StandardCharsets; +import java.util.Base64; import java.util.List; +import java.util.Map; import java.util.Optional; import static org.hamcrest.MatcherAssert.assertThat; @@ -96,18 +99,51 @@ class KmsKeyOfAccountTest { assertFalse(stored.grantsItsAccountThroughServices(key.getArn())); } - /** A key KMS would refuse a decrypt with, disabled or pending deletion, is none a forwarded request finds. */ + /** + * A request naming an alias, a grant or a ciphertext reaches the key the alias points at, the grant is on or the + * ciphertext was encrypted under; a value naming none reaches nothing. + */ @Test - void theStoredResourceArnsFindNoKeyKmsWouldNotUse() { + void theStoredResourceArnsReachTheKeyOfAnAliasAGrantOrACiphertext() { + KmsStoredResourceArns stored = new KmsStoredResourceArns(owners, new RegionResolver(REGION, OWNER)); + String grantId = owners.createGrant(key.getKeyId(), "arn:aws:iam::" + OWNER + ":user/grantee", + List.of("Encrypt"), REGION).getGrantId(); + String ciphertext = Base64.getEncoder().encodeToString( + owners.encrypt(key.getKeyId(), "plaintext".getBytes(StandardCharsets.UTF_8), REGION)); + + assertEquals(List.of(key.getArn()), stored.through("AliasName", "alias/snapshots", REGION)); + assertEquals(List.of(key.getArn()), stored.through("GrantId", grantId, REGION)); + assertEquals(List.of(key.getArn()), stored.through("CiphertextBlob", ciphertext, REGION)); + assertEquals(List.of(), stored.through("AliasName", "alias/none", REGION)); + assertEquals(List.of(), stored.through("CiphertextBlob", "not base64!", REGION)); + assertEquals(List.of(), stored.through("KeyId", key.getKeyId(), REGION)); + } + + /** The tags of the key an ARN names, a tag without a value as an empty one; none for an alias. */ + @Test + void theStoredResourceArnsGiveTheTagsOfAKey() { + KmsStoredResourceArns stored = new KmsStoredResourceArns(owners, new RegionResolver(REGION, OWNER)); + KmsKey tagged = owners.createKey("tagged key", null, Map.of("team", "blue"), REGION); + assertEquals(Map.of("team", "blue"), stored.storedTags(tagged.getArn())); + assertEquals(Map.of(), stored.storedTags("arn:aws:kms:" + REGION + ":" + OWNER + ":alias/snapshots")); + } + + /** + * A key disabled or pending deletion is still the key a request naming it acts on, but none KMS uses for a request + * another service forwards, which KMS refuses with it. + */ + @Test + void theStoredResourceArnsFindAKeyInAnyStateAndUseOnlyAnEnabledOne() { KmsStoredResourceArns stored = new KmsStoredResourceArns(owners, new RegionResolver(REGION, OWNER)); owners.disableKey(key.getKeyId(), REGION); - assertEquals(Optional.empty(), stored.find("key", List.of(key.getKeyId()), REGION)); - owners.enableKey(key.getKeyId(), REGION); assertEquals(Optional.of(key.getArn()), stored.find("key", List.of(key.getKeyId()), REGION)); + assertEquals(Optional.of(key.getArn()), stored.find("key", List.of("alias/snapshots"), REGION)); + assertFalse(stored.usable(key.getArn())); + owners.enableKey(key.getKeyId(), REGION); + assertTrue(stored.usable(key.getArn())); owners.scheduleKeyDeletion(key.getKeyId(), 7, REGION); - assertEquals(Optional.empty(), stored.find("key", List.of(key.getKeyId()), REGION)); - // Its lookup still finds it: only a request KMS would serve with it is refused. - assertEquals(Optional.of(key.getArn()), owners.findKeyArnOfAccount(key.getKeyId(), OWNER, REGION)); + assertEquals(Optional.of(key.getArn()), stored.find("key", List.of(key.getKeyId()), REGION)); + assertFalse(stored.usable(key.getArn())); } /** diff --git a/tools/aws/fetch_kms_api_permissions.py b/tools/aws/fetch_kms_api_permissions.py new file mode 100644 index 0000000000..5dfb0ef84e --- /dev/null +++ b/tools/aws/fetch_kms_api_permissions.py @@ -0,0 +1,237 @@ +#!/usr/bin/env python3 +"""Vendor what the AWS KMS developer guide and API reference say each KMS operation needs permission for into +tools/aws/sources/kms-api-permissions.json, a source of the IAM tables. + +The developer guide's "AWS KMS permissions" table gives, for each API operation, the actions it is authorized by and +the resources each is checked on, in words where there are several: + + ReEncrypt: To use this operation, the caller needs permission on two KMS keys: + kms:ReEncryptFrom on the KMS key used to decrypt + kms:ReEncryptTo on the KMS key used to encrypt + + UpdateAlias: To use this operation, the caller needs kms:UpdateAlias permission on three resources: + The alias + The currently associated KMS key + The newly associated KMS key + + https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html + +The Service Reference lists `alias` and `key` for the alias actions and ReEncrypt's two actions, but not which of them +each resource of a request is, nor which key ReEncrypt checks each action on; botocore does not say it as data +either. The API reference of an operation whose request may leave its key out says where KMS reads it from then, as +Decrypt's `KeyId` does: + + If you used a symmetric encryption KMS key, AWS KMS can get the KMS key from metadata that it adds to the + symmetric ciphertext blob. + + https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html + +and its "Key identifiers" give the format of each identifier a request may give, an alias name being the alias ARN's +resource, while the Service Reference's `alias` format, `alias/${Alias}`, leaves the request's `alias/` to its variable: + + Alias ARN: The format of an alias ARN is as follows: arn::kms:::alias/ + Alias name: In the AWS KMS API, alias names always begin with alias/. The format of an alias name is as follows: + alias/ + + https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html + +This script copies each operation of the table as it stands (the actions it names, its description, the resources +its list names, and the policy type and resources column of each row it spans) and, from the API reference page it links +to, each request parameter's sentence saying KMS gets a resource from metadata, and each key identifier's format, each +variable written `{name}`. Nothing in the output is written by hand, and the generator reads it against botocore's +requests. + +Run from anywhere in the repo: + python3 tools/aws/fetch_kms_api_permissions.py # rewrite the vendored file from the pages + python3 tools/aws/fetch_kms_api_permissions.py --verify # online: the file still says what the pages do +""" +from __future__ import annotations + +import argparse +import html +import json +import re +import sys +import urllib.parse +import urllib.request +from concurrent.futures import ThreadPoolExecutor +from datetime import datetime, timezone +from pathlib import Path + +PERMISSIONS_PAGE = "https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html" +CONCEPTS_PAGE = "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html" +REPO_ROOT = Path(__file__).resolve().parents[2] +OUTPUT = REPO_ROOT / "tools/aws/sources/kms-api-permissions.json" + +# An action the table names, alone in its paragraph under the operation. +ACTION_RE = re.compile(r"^[a-z0-9-]+:[A-Za-z0-9]+$") +# A sentence of a request parameter saying KMS reads a resource out of another parameter's metadata. +FROM_METADATA_RE = re.compile(r"\bcan get the [^.]* from metadata that it adds to\b") +# A request parameter of an API reference page and its description. +PARAMETER_RE = re.compile( + r'

.*?
\s*
(?P.*?)
', re.S) +# A key identifier of the concepts page, its term and its description. +IDENTIFIER_RE = re.compile(r'
(?P.*?)
\s*
(?P.*?)
', re.S) +# The format an identifier's description gives, after the sentence saying it does. +FORMAT_RE = re.compile(r'

(?P[^<]*\bformat of [^<]*\bis as follows:)

\s*]*>(?P.*?)', + re.S) +HEADINGS = ("Actions and permissions", "Policy type", "Cross-account use", "Resources (for IAM policies)") +# The table has a row for each of the fifty-odd operations; far fewer means its layout changed under the parser. +MINIMUM_ROWS = 40 +FETCH_WORKERS = 8 + + +def text(fragment: str) -> str: + """A fragment of the page as text, spaces collapsed.""" + return re.sub(r"\s+", " ", html.unescape(re.sub(r"<[^>]+>", " ", fragment))).strip() + + +def read_permissions(page: str) -> list[dict]: + """Each operation of the permissions table: the API reference page it links to, the actions it names, its + description's paragraphs, the items of its list, and each policy type and resources column it gives, one for each + row its first cell spans (CreateAlias's IAM policy for the alias and key policy for the KMS key).""" + tables = re.findall(r"", page, re.S) + if len(tables) != 1: + raise ValueError(f"{PERMISSIONS_PAGE} has {len(tables)} tables, not the one table of permissions: its layout " + f"changed") + rows = re.findall(r"(.*?)", tables[0], re.S) + headings = [text(cell) for cell in re.findall(r"]*>(.*?)", rows[0], re.S)] if rows else [] + if tuple(headings[:len(HEADINGS)]) != HEADINGS: + raise ValueError(f"{PERMISSIONS_PAGE}'s table is headed {headings}, not {list(HEADINGS)}: its layout changed") + found = [] + spanned = 0 + for row in rows[1:]: + cells = re.findall(r"]*>(.*?)", row, re.S) + if spanned: + # A row the operation's first cell spans gives another policy type and resources column of it. + spanned -= 1 + found[-1]["policies"].append({"policyType": text(cells[0]), "resources": text(cells[2])}) + continue + if len(cells) < len(HEADINGS): + continue + link = re.search(r'(?P[A-Za-z0-9]+)', cells[0]) + if link is None: + raise ValueError(f"{PERMISSIONS_PAGE} has a row naming no operation: its layout changed") + span = re.match(r']*\browspan="(\d+)"', re.search(r"]*>", row).group(0)) + spanned = int(span.group(1)) - 1 if span else 0 + items = [text(item) for item in re.findall(r"]*>(.*?)", cells[0], re.S)] + outside = re.sub(r"", "", cells[0], flags=re.S) + # The operation's link stands in a paragraph of its own, or before the first one. + paragraphs = [text(paragraph) for paragraph in re.findall(r"

(.*?)

", outside, re.S) + if text(paragraph) != link.group("operation")] + found.append({ + "operation": link.group("operation"), + "apiReference": urllib.parse.urljoin(PERMISSIONS_PAGE, link.group("href")), + "actions": [paragraph for paragraph in paragraphs if ACTION_RE.match(paragraph)], + "description": [paragraph for paragraph in paragraphs if not ACTION_RE.match(paragraph)], + "items": items, + "policies": [{"policyType": text(cells[1]), "resources": text(cells[3])}], + }) + return found + + +def marked(fragment: str) -> str: + """A fragment as text, each variable the page marks (`<alias-name>`) written + `{name}`, the page's copy button left out.""" + fragment = re.sub(r'
.*?
', "", fragment, flags=re.S) + return text(re.sub(r'(.*?)', + lambda match: "{" + text(match.group(1)).strip("<>") + "}", fragment, flags=re.S)) + + +def read_identifiers(page: str) -> list[dict]: + """Each key identifier of the concepts page that gives its format, with the sentence giving it and the format.""" + found = [] + for match in IDENTIFIER_RE.finditer(page): + given = FORMAT_RE.search(match.group("body")) + if given: + found.append({"identifier": text(match.group("term")), "sentence": text(given.group("lead")), + "format": marked(given.group("format"))}) + if not {"Alias name", "Alias ARN"} <= {identifier["identifier"] for identifier in found}: + raise ValueError(f"{CONCEPTS_PAGE} gives no alias name and alias ARN formats: its layout changed") + return found + + +def read_from_metadata(page: str) -> list[dict]: + """Each request parameter of an API reference page whose description says KMS gets a resource from metadata, + with that sentence.""" + found = [] + for match in PARAMETER_RE.finditer(page): + for paragraph in re.findall(r"

(.*?)

", match.group("body"), re.S): + for sentence in re.split(r"(?<=\.)\s+", text(paragraph)): + if FROM_METADATA_RE.search(sentence): + found.append({"operation": match.group("operation"), "parameter": match.group("parameter"), + "sentence": sentence}) + return found + + +def build(permissions_page: str, reference_pages: dict[str, str], concepts_page: str) -> dict: + permissions = read_permissions(permissions_page) + if len(permissions) < MINIMUM_ROWS: + raise ValueError(f"{PERMISSIONS_PAGE} gives {len(permissions)} rows: its layout changed") + from_metadata = [found for row in permissions for found in read_from_metadata(reference_pages[row["apiReference"]])] + return { + "_source": { + "pages": [PERMISSIONS_PAGE, CONCEPTS_PAGE], + "fetcher": str(Path(__file__).resolve().relative_to(REPO_ROOT)), + "retrieved": datetime.now(timezone.utc).strftime("%Y-%m-%d"), + "note": "Each operation of the developer guide's permissions table, copied as it stands (the API " + "reference page it links to, the actions it names, its description, the items of its list, and " + "the policy type and resources column of each row it spans), and each request parameter " + "sentence of those API reference pages saying KMS gets a resource from metadata, and each key " + "identifier the concepts page gives a format of, each variable written {name}.", + }, + "permissions": permissions, + "fromMetadata": from_metadata, + "identifiers": read_identifiers(concepts_page), + } + + +def fetch_url(url: str) -> str: + request = urllib.request.Request(url, headers={"User-Agent": "floci-tools"}) + with urllib.request.urlopen(request, timeout=60) as response: + return response.read().decode("utf-8") + + +def fetch_all(fetch=fetch_url) -> tuple[str, dict[str, str], str]: + """The permissions page, the API reference page of each operation its table links to, and the concepts page.""" + permissions_page = fetch(PERMISSIONS_PAGE) + links = sorted({row["apiReference"] for row in read_permissions(permissions_page)}) + with ThreadPoolExecutor(max_workers=FETCH_WORKERS) as pool: + return permissions_page, dict(zip(links, pool.map(fetch, links))), fetch(CONCEPTS_PAGE) + + +def stale(vendored: dict, permissions_page: str, reference_pages: dict[str, str], concepts_page: str) -> bool: + """Whether the pages now give something other than the vendored file, its date aside.""" + built = build(permissions_page, reference_pages, concepts_page) + return any(vendored.get(key) != built[key] for key in built if key != "_source") + + +def main(argv: list[str] | None = None, fetch=fetch_url) -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("--verify", action="store_true", help="online: the vendored file matches the pages") + args = parser.parse_args(argv) + try: + pages = fetch_all(fetch) + except OSError as e: + print(f"error: could not read the AWS KMS documentation ({e})", file=sys.stderr) + return 2 + if args.verify: + vendored = json.loads(OUTPUT.read_text(encoding="utf-8")) + if stale(vendored, *pages): + print(f"error: {OUTPUT.relative_to(REPO_ROOT)} no longer says what {PERMISSIONS_PAGE}, the API " + f"reference pages it links to and {CONCEPTS_PAGE} do: run tools/aws/fetch_kms_api_permissions.py " + f"and then make iam-request-resources-sync", file=sys.stderr) + return 1 + print(f"{OUTPUT.relative_to(REPO_ROOT)} matches {PERMISSIONS_PAGE}, the API reference pages it links to and " + f"{CONCEPTS_PAGE}") + return 0 + built = build(*pages) + OUTPUT.write_text(json.dumps(built, indent=2) + "\n", encoding="utf-8") + print(f"wrote {OUTPUT.relative_to(REPO_ROOT)} ({len(built['permissions'])} operations, " + f"{len(built['fromMetadata'])} parameters read from metadata, " + f"{len(built['identifiers'])} identifier formats)") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/aws/regen_iam_request_resources.py b/tools/aws/regen_iam_request_resources.py index e68712a92d..7695a01e69 100644 --- a/tools/aws/regen_iam_request_resources.py +++ b/tools/aws/regen_iam_request_resources.py @@ -219,6 +219,19 @@ filling its variables, and on the guide's ARN format with that path where no pub every published path a route matches is that route's own, the `/v2` of an HTTP or WebSocket API's left out. `pathFormats` records the formats of those the reference gives no type, which `--check` derives again from the vendored pages and botocore, and `--verify` checks the vendored pages against the live ones. +Where a KMS operation acts on several resources, or on one its request leaves out, which neither botocore nor the +Service Reference says, they come from one more source, granted for that namespace alone: the developer guide's +permissions table, the API reference pages it links to and the guide's key identifiers, which their own script vendors +as they stand (`PERMISSION_SOURCES`). Each resource a row of the table lists is checked as the action it names, of the +type it names by its name, on the member the rules read that type from or holding the botocore shape the service's +records hold the type's variable in, the one documented as used for what the row says where it says it, and else +through the record of another resource the row lists (`permission_resources`): ReEncrypt as `kms:ReEncryptFrom` on its +`SourceKeyId` and `kms:ReEncryptTo` on its `DestinationKeyId`, UpdateAlias also on the key its alias points at now. An +operation the table checks as several actions records them (`actions`, each with the types the reference gives it) and +each resource the one it is checked as (`action`); an action on no resource is checked on `*`. A parameter whose API +reference says KMS reads its resource out of another's metadata names it through that one when the request leaves it +out (`with_from_metadata`: Decrypt's `KeyId`, `CiphertextBlob`), and a type the key identifiers give a name of that is +another identifier's ARN's resource is named by that resource whole (`named_resources`, `partialArn`: `alias/`). A qualified type the reference gives an action, one whose format is another type's and one more `:${...}` (Lambda's `function alias` and `function version`), which no member fills alone, is named by that type's member and the request's one member documented as naming the qualified types ("The version number or alias name"): Lambda's @@ -286,6 +299,7 @@ from pathlib import Path import fetch_apigateway_arn_formats import fetch_athena_glue_ddl_permissions +import fetch_kms_api_permissions from regen_iam_authorized_actions import (ROUTES as ROUTES_FILE, authorized_actions, fetch_references, load_s3_required, s3_query_parameters, s3_version_choices, vendored_sections) @@ -317,10 +331,10 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a "servicequotas", "ssm", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray", "securityhub", "guardduty", "secretsmanager", "scheduler", "lambda", "cloudformation", "glue", "sqs", "sns", "kinesis", "pipes", "dsql", "sts", "eks", "resource-groups", "logs", - "ec2-instance-connect", "s3", "bedrock", "apigateway") + "ec2-instance-connect", "s3", "bedrock", "apigateway", "kms") # The namespaces whose resources ResourceArnBuilder builds itself. -HAND_BUILT = ("dynamodb", "iam", "kms") +HAND_BUILT = ("dynamodb", "iam") # --------------------------------------------------------------------------------------------------------------------- # MEASURED: what AWS was measured to check where neither botocore nor the Service Reference says it. @@ -410,7 +424,8 @@ MEASURED: dict[str, tuple[list[dict], str]] = { # STATEMENT_SOURCES: the statements an operation's request carries that its service runs against another service as # the caller, and the vendored page each one's permissions come from. # -# This is one of the file's two sources besides botocore and the Service Reference (`PATH_SOURCES` is the other), +# This is one of the file's sources besides botocore and the Service Reference (`PATH_SOURCES` and +# `PERMISSION_SOURCES` are the others), # granted for Athena's DDL statements alone: it is not a place for any other table. Its file is written by its own # script from AWS's documentation, unchanged # (tools/aws/fetch_athena_glue_ddl_permissions.py, with a prompt beside the file for rebuilding it when the page's @@ -436,6 +451,35 @@ UNPARTITIONED_RE = re.compile(r"does not have partitions, do not include partiti PATH_SOURCES: dict[str, Path] = { "apigateway": REPO_ROOT / "tools/aws/sources/apigateway-arn-formats.json", } + +# --------------------------------------------------------------------------------------------------------------------- +# PERMISSION_SOURCES: the namespaces whose documentation says which resources an operation's actions are each checked +# on where a request names several, and where the service reads a resource the request leaves out, and the vendored +# pages that say so. +# +# Granted for KMS alone, whose developer guide's permissions table says it ("kms:ReEncryptFrom on the KMS key used to +# decrypt", "kms:ReEncryptTo on the KMS key used to encrypt"; UpdateAlias "on three resources: The alias, The currently +# associated KMS key, The newly associated KMS key") and whose API reference says Decrypt's key may come from its +# ciphertext ("AWS KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob"), and whose +# key identifiers give an alias name as the alias ARN's resource ("alias/"). Its file is written by its own +# script from those pages, unchanged (tools/aws/fetch_kms_api_permissions.py), and the generator only reads it +# (`permission_resources`, `with_from_metadata`, `named_resources`): nothing about an operation is stated here. +# --------------------------------------------------------------------------------------------------------------------- +PERMISSION_SOURCES: dict[str, Path] = { + "kms": REPO_ROOT / "tools/aws/sources/kms-api-permissions.json", +} +# A resource a permissions row's list names, after the action it is checked as when it names one: "kms:ReEncryptFrom +# on the KMS key used to decrypt", "The alias (in an IAM policy)"; an action checked on no resource names none ("in an +# IAM policy in the replica Region"). +PERMISSION_ITEM_RE = re.compile(r"^(?:(?P[a-z0-9-]+:[A-Za-z0-9]+)\s+)?(?P.*)$") +NAMED_RESOURCE_RE = re.compile(r"^(?:on\s+)?the\s+(?P.+?)(?:\s*\([^)]*\))?\s*$", re.I) +# What a resource is used for, as the row says ("the KMS key used to decrypt") and botocore's member documents it ("the +# KMS key that KMS will use to decrypt the ciphertext"). +USED_TO_RE = re.compile(r"\buse(?:d)? to (?P[a-z]+)\b") +# The member a resource left out is read from, as a parameter's sentence names it ("from metadata that it adds to the +# symmetric ciphertext blob"). +FROM_METADATA_RE = re.compile(r"\bcan get the (?P[A-Za-z ]+?) from metadata that it adds to the " + r"(?P[A-Za-z ]+?)\.?$") # What the route of an operation is checked as, where it is not the operation's own name: the authorized-actions file # `regen_iam_authorized_actions.py` writes, whose `authorizedByMethod` and `authorizedByModel` IamAuthorizedActions # reads. @@ -2369,7 +2413,8 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d routed: list[dict] | None = None) -> dict: """What the file says for one operation, `forwarded` being what the file records of each action a `MEASURED` entry names, and `routed` the resources its routes name where AWS authorizes them as their method (`routed_resources`), - which are then its resources.""" + which are then its resources. `upstream` gives, for a namespace with vendored permissions, the resource types of + the actions they may name (`actions`).""" types = upstream["types"] or [] members = request_members(models, operation.split(":", 1)[1]) patterns = string_patterns(models, operation.split(":", 1)[1]) @@ -2381,17 +2426,32 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d targets = id_targets(operation, types, formats, models, known) if namespace_of(operation) in ID_TARGETS else None if targets is not None: return {"action": upstream["action"], "types": types, "resources": [], "targets": targets} + actions = None if routed is not None: resources = routed else: resources = by_client(operation, models, lambda read: read_resources(operation, types, formats, read), formats) resources = with_documented_creation(resources, operation, types, formats, models) resources = with_made(resources, operation, formats) + source = load_permission_source(namespace_of(operation)) + if source is not None: + name = operation.split(":", 1)[1] + row = next((found for found in source["permissions"] if found["operation"] == name), None) + resources, actions = permission_resources(operation, upstream["action"], resources, row, + {upstream["action"]: types, **(upstream.get("actions") or {})}, + formats, models) + resources = with_from_metadata(resources, operation, + [found for found in source["fromMetadata"] if found["operation"] == name], + models) + named = named_resources(source["identifiers"], formats) + resources = [dict(resource, partialArn=True) if resource.get("type") in named + and len(resource.get("fill") or {}) == 1 else resource for resource in resources] uses = MEASURED.get(operation, (None, ""))[0] # An entry naming only another action AWS checks gives the operation no resources of its own. if uses is not None and not (uses and all("action" in use for use in uses)): resources = measured_resources(operation, types, formats, resources) - entry = {"action": upstream["action"], "types": types, "resources": resources} + entry = {"action": upstream["action"], "types": types, **({"actions": actions} if actions else {}), + "resources": resources} unread = body_only_identifiers(types, formats, resources, models, operation.split(":", 1)[1]) if unread: entry["unread"] = unread @@ -2851,6 +2911,170 @@ def namespace_routed(operations: dict[str, dict], formats: dict[str, dict[str, s return resources, needed +def load_permission_source(namespace: str) -> dict | None: + """The namespace's vendored permission source (`PERMISSION_SOURCES`), or None for a namespace it is not granted.""" + path = PERMISSION_SOURCES.get(namespace) + return None if path is None else json.loads(path.read_text(encoding="utf-8")) + + +def _named_kind(operation: str, phrase: str, kinds: list[str]) -> str: + """The one of `kinds` a vendored phrase names by its name, a word of it ("KMS key used to decrypt" names `key`).""" + words = {word.lower() for word in re.findall(r"[A-Za-z]+", phrase)} + named = [kind for kind in kinds if kind.lower() in words] + if len(named) != 1: + raise ValueError(f"{operation}: the vendored permissions name '{phrase}', which names {named or 'none'} of the " + f"types {kinds} the Service Reference gives its action") + return named[0] + + +def _request_shapes(models: dict[str, dict], operation: str) -> dict[str, str]: + """The botocore shape each top-level member of the operation's request holds, in the request's order.""" + found: dict[str, str] = {} + for model in models.values(): + spec = model["operations"].get(operation) + if spec and "input" in spec: + for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items(): + found.setdefault(name, member["shape"]) + return found + + +def _held_shapes(models: dict[str, dict], member: str) -> set[str]: + """The botocore shapes the service's structures hold a member of that name in (KMS's `KeyId`, a `KeyIdType`).""" + return {held["shape"] for model in models.values() for shape in model["shapes"].values() + if shape.get("type") == "structure" for name, held in shape.get("members", {}).items() if name == member} + + +def permission_resources(operation: str, checked_as: str, resources: list[dict], row: dict | None, + known: dict[str, list[str]], formats: dict[str, str], + models: dict[str, dict]) -> tuple[list[dict], dict | None]: + """The resources of an operation whose namespace's vendored permissions (`PERMISSION_SOURCES`) list those its + actions are each checked on, and those actions when the list names others than `checked_as`, the one the operation + is checked as otherwise, each with the + resource types the Service Reference gives it (`known`); the resources as they are and none when its row lists + none. Each item of the row's list is a resource of the type it names by its name, checked as the action it names + or else the row's one action, or no resource when it names none ("kms:CreateKey in an IAM policy in the replica + Region": that action on `*`). The members that may name a type are those the rules read it from and those holding + the botocore shape the service's records hold the type's variable in (`TargetKeyId`, `SourceKeyId` and + `DestinationKeyId` hold the `KeyIdType` of a key's `KeyId`): an item saying what its resource is used for takes the + member botocore documents as used for that, or for its re- form ("the KMS key used to decrypt", ReEncrypt's + `SourceKeyId`, "the KMS key that KMS will use to decrypt the ciphertext"; "used to encrypt", its + `DestinationKeyId`, "the KMS key that is used to reencrypt the data"), any other the next of them in the request's + order, and one no member is left for is reached through the member of another of the row's resources whose botocore + record holds a member of such a shape (UpdateAlias's currently associated key, through its `AliasName`: + `AliasListEntry` holds `AliasName` and `TargetKeyId`), which the reader asks the service for. They replace what the + rules read of the types the list names; an operation checked as several actions is checked on its list's resources + alone, each as its action (`action`).""" + if row is None or not row["items"]: + return resources, None + name = operation.split(":", 1)[1] + items = [] + for item in row["items"]: + match = PERMISSION_ITEM_RE.match(item) + action = match.group("action") or (row["actions"][0] if len(row["actions"]) == 1 else None) + if action not in known: + raise ValueError(f"{operation}: the vendored permissions check '{item}' as {action}, which the Service " + f"Reference does not have") + named = NAMED_RESOURCE_RE.match(match.group("rest")) + phrase = named.group("phrase") if named else None + items.append((action, None if phrase is None else _named_kind(operation, phrase, known[action]), phrase)) + actions = list(dict.fromkeys([*row["actions"], *(action for action, _, _ in items)])) + several = set(actions) != {checked_as} + shapes = _request_shapes(models, name) + docs = {member: _lead(_member_documentation(models, name, member)) for member in shapes} + named_kinds = {kind for _, kind, _ in items if kind} + taken: list[str] = [] + rows: list[dict] = [] + for action, kind, phrase in items: + if kind is None: + continue + variables = [v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES] + held = _held_shapes(models, variables[0]) if len(variables) == 1 else set() + candidates = list(dict.fromkeys( + [path for resource in resources if resource.get("type") == kind and len(resource.get("fill") or {}) == 1 + for path in resource["fill"].values()] + + [member for member, shape in shapes.items() if shape in held])) + free = [member for member in candidates if member not in taken] + used = USED_TO_RE.search(phrase.lower()) + if used: + verb = used.group("verb") + free = [member for member in free if (found := USED_TO_RE.search(docs[member])) + and found.group("verb") in (verb, "re" + verb)] + if len(free) != 1: + raise ValueError(f"{operation}: the vendored permissions name '{phrase}', which {len(free)} members " + f"of the request are documented as used for") + resource: dict | None = None + if free: + taken.append(free[0]) + resource = {"type": kind, "fill": {variables[0]: free[0]}} + else: + # Reached through another resource of the row whose record holds the type: an alias's key. + inputs = {spec["input"]["shape"] for model in models.values() for spec in model["operations"].values() + if "input" in spec} + for other in rows: + member = next(iter(other.get("fill", {}).values()), None) + if other.get("type") != kind and member and any( + record_name not in inputs and record.get("type") == "structure" + and member in record.get("members", {}) + and any(held_member["shape"] in held for held_member in record["members"].values()) + for model in models.values() for record_name, record in model["shapes"].items()): + resource = {"types": [kind], "through": member} + break + if resource is None: + raise ValueError(f"{operation}: the vendored permissions name '{phrase}', which no member of the request " + f"names or reaches") + rows.append(dict(resource, action=action) if several else resource) + if not several: + return [resource for resource in resources if not set(_kinds(resource)) & named_kinds] + rows, None + return rows, {action: known[action] for action in actions} + + +def with_from_metadata(resources: list[dict], operation: str, sentences: list[dict], + models: dict[str, dict]) -> list[dict]: + """The resources, and the type a member names that the vendored permissions (`PERMISSION_SOURCES`) say its service + gets from metadata another member holds when the request leaves it out ("If you used a symmetric encryption KMS + key, AWS KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob", of Decrypt's + `KeyId` and ReEncrypt's `SourceKeyId`), named then through that other member, the member the sentence's last words + name (`CiphertextBlob`), which the reader asks the service for. A resource checked as an action of its own keeps + it.""" + name = operation.split(":", 1)[1] + given = list(_request_shapes(models, name)) + found = list(resources) + for sentence in sentences: + match = FROM_METADATA_RE.search(sentence["sentence"]) + words = match.group("phrase").split() if match else [] + holder = next((joined for start in range(len(words)) + if (joined := "".join(word[:1].upper() + word[1:] for word in words[start:])) in given), None) + if holder is None or sentence["parameter"] not in given: + raise ValueError(f"{operation}: the vendored sentence of its {sentence['parameter']} names no member of " + f"the request a resource is read from: '{sentence['sentence']}'") + for resource in resources: + fill = resource.get("fill") or {} + if list(fill.values()) != [sentence["parameter"]] or "type" not in resource: + continue + _named_kind(operation, match.group("thing"), [resource["type"]]) + through = {"types": [resource["type"]], "through": holder, "when": {sentence["parameter"]: [None]}} + found.append(dict(through, action=resource["action"]) if "action" in resource else through) + return found + + +def named_resources(identifiers: list[dict], formats: dict[str, str]) -> set[str]: + """The types the vendored permissions (`PERMISSION_SOURCES`) give an identifier of that is another's ARN's resource + ("alias/{alias-name}", the resource of "arn:{partition}:kms:{region}:{account-id}:alias/{alias-name}"): a type + whose format's resource is that identifier's literal and one variable (`alias/${Alias}`). A member naming one gives + that resource whole, `alias/ExampleAlias`, which the reader completes as the ARN (`partialArn`), not the + variable's value alone.""" + arns = [identifier["format"] for identifier in identifiers if identifier["format"].startswith("arn:")] + found: set[str] = set() + for identifier in identifiers: + name = identifier["format"] + literal = name.split("{", 1)[0] + if not literal or name.startswith("arn:") or not any(arn.split(":", 5)[5:] == [name] for arn in arns): + continue + found |= {kind for kind, arn in formats.items() if ONE_VARIABLE_RE.match(_resource(arn)) + and _resource(arn).split("${", 1)[0] == literal} + return found + + def read_resources(operation: str, types: list[str], formats: dict[str, str], models: dict[str, dict]) -> list[dict]: """The resources the rules read from the request of the clients given.""" name = operation.split(":", 1)[1] @@ -3642,12 +3866,19 @@ def build(documents: list[dict], provenance: str, data: Path, botocore: str) -> sources = load_statement_sources() statement_types = statement_actions(documents, sources) routed, path_formats = namespace_routed(covered, formats, namespaces, data) + # The actions a namespace's vendored permissions may name, with their resource types. + permission_actions = {document["Name"]: {f"{document['Name']}:{action['Name']}": + [resource["Name"] for resource in action.get("Resources") or []] + for action in document.get("Actions", [])} + for document in documents if document["Name"] in PERMISSION_SOURCES} operations = {} prefixes = {namespace: namespace_id_prefixes(namespace, load_models(data, set(namespaces[namespace])), load_examples(data, set(namespaces[namespace]))) for namespace in ID_TARGETS if namespace in namespaces} for operation, value in sorted(covered.items()): models = load_models(data, set(namespaces[namespace_of(operation)])) + if namespace_of(operation) in permission_actions: + value = {**value, "actions": permission_actions[namespace_of(operation)]} operations[operation] = entry_for(operation, value, {**formats.get(namespace_of(operation), {}), **path_formats.get(namespace_of(operation), {})}, models, prefixes.get(namespace_of(operation)), forwarded, routed.get(operation)) @@ -3973,8 +4204,8 @@ def validate(document: dict) -> list[str]: problems.append(f"{operation!r} is not an operation of a namespace the file reads") continue if not isinstance(entry, dict) or not {"action", "types", "resources"} <= set(entry) <= { - "action", "types", "resources", "creates", "makes", "located", "locatedApart", "targets", "forwarded", - "ec2Query", "unread"}: + "action", "types", "actions", "resources", "creates", "makes", "located", "locatedApart", "targets", + "forwarded", "ec2Query", "unread"}: problems.append(f"{operation} is not an action, its types and its resources") continue if not isinstance(entry["action"], str) or not OPERATION_RE.match(entry["action"]) \ @@ -3984,14 +4215,32 @@ def validate(document: dict) -> list[str]: if not isinstance(types, list) or not all(isinstance(kind, str) for kind in types): problems.append(f"{operation} has no list of resource types") continue + several = entry.get("actions") + if several is not None and (namespace not in PERMISSION_SOURCES or not isinstance(several, dict) + or len(several) < 2 or not all( + isinstance(action, str) and OPERATION_RE.match(action) and namespace_of(action) == namespace + and isinstance(kinds, list) + and all(isinstance(kind, str) and kind in formats.get(namespace, {}) for kind in kinds) + for action, kinds in several.items())): + problems.append(f"{operation} is checked as {several!r}, which are not several actions of a namespace with " + f"vendored permissions, with their resource types") + continue for resource in entry["resources"] if isinstance(entry["resources"], list) else [None]: + # A resource of an operation checked as several actions is checked as one of them, on that one's types. + acting = set(types) + if several is not None: + if not isinstance(resource, dict) or resource.get("action") not in several: + problems.append(f"{operation} names {resource!r} as none of the actions it is checked as") + continue + acting = set(several[resource["action"]]) + resource = {key: value for key, value in resource.items() if key != "action"} # Only a measured entry names a type the reference omits for the action; MEASURED's admission checks # (see `measured_resources`) say when it may. measured = set(_kinds(resource)) if isinstance(resource, dict) and operation in MEASURED else set() # A route authorized by its method names the type of its path, which its action may not list (`--check` # says whether it is the one its path is). routed = set(formats.get(namespace, {})) if namespace in PATH_SOURCES else set() - problems += _resource_problems(operation, resource, set(types) | measured | routed, + problems += _resource_problems(operation, resource, acting | measured | routed, formats.get(namespace, {})) for created in entry.get("creates", []) if isinstance(entry.get("creates", []), list) else [None]: problems += _created_problems(operation, created, set(types), formats.get(namespace, {})) @@ -4259,7 +4508,8 @@ def derive(document: dict, data: Path) -> list[str]: for operation, entry in document["operations"].items(): namespace = namespace_of(operation) models = load_models(data, set(document["namespaces"][namespace])) - expected = entry_for(operation, {"action": entry["action"], "types": entry["types"]}, + expected = entry_for(operation, {"action": entry["action"], "types": entry["types"], + **({"actions": entry["actions"]} if "actions" in entry else {})}, {**document["arnFormats"].get(namespace, {}), **path_formats.get(namespace, {})}, models, prefixes.get(namespace), document["forwardedActions"], routed.get(operation)) if expected != entry: @@ -4324,6 +4574,30 @@ def verify_path_sources() -> list[str]: return untrue +def verify_permission_sources() -> list[str]: + """A vendored permission source whose pages AWS has changed.""" + untrue: list[str] = [] + for namespace, path in sorted(PERMISSION_SOURCES.items()): + source = json.loads(path.read_text(encoding="utf-8")) + try: + changed = fetch_kms_api_permissions.stale(source, *fetch_kms_api_permissions.fetch_all()) + except (OSError, ValueError) as e: + raise OSError(f"could not read {' and '.join(source['_source']['pages'])} ({e})") from e + if changed: + untrue.append(f"{' and '.join(source['_source']['pages'])} and the API reference pages they link to no " + f"longer give what {path.name} holds for {namespace}: run {source['_source']['fetcher']}") + return untrue + + +def verify_permission_actions(vendored: dict, documents: list[dict]) -> list[str]: + """An operation checked as several actions whose actions the Service Reference no longer gives those types.""" + actions = {f"{document['Name']}:{action['Name']}": [resource["Name"] for resource in action.get("Resources") or []] + for document in documents for action in document.get("Actions", [])} + return [f"AWS gives {action} the resource types {actions.get(action)}, not {kinds} as {operation} records" + for operation, entry in sorted(vendored["operations"].items()) + for action, kinds in (entry.get("actions") or {}).items() if actions.get(action) != kinds] + + def verify_against(vendored: dict, upstream: dict[str, dict], formats: dict[str, dict[str, str]]) -> tuple[list[str], list[str]]: """What the file claims and AWS does not, and the operations AWS has added since.""" untrue: list[str] = [] @@ -4398,9 +4672,11 @@ def main(argv: list[str] | None = None) -> int: document["namespaces"]): untrue.append("resourceKeys differ from AWS Service Reference and botocore") untrue += verify_forwarded(document, documents) + untrue += verify_permission_actions(document, documents) try: untrue += verify_statements(document, documents) untrue += verify_path_sources() + untrue += verify_permission_sources() except OSError as e: print(f"error: {e}", file=sys.stderr) return 2 diff --git a/tools/aws/sources/kms-api-permissions.json b/tools/aws/sources/kms-api-permissions.json new file mode 100644 index 0000000000..5571e39202 --- /dev/null +++ b/tools/aws/sources/kms-api-permissions.json @@ -0,0 +1,930 @@ +{ + "_source": { + "pages": [ + "https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html", + "https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html" + ], + "fetcher": "tools/aws/fetch_kms_api_permissions.py", + "retrieved": "2026-11-22", + "note": "Each operation of the developer guide's permissions table, copied as it stands (the API reference page it links to, the actions it names, its description, the items of its list, and the policy type and resources column of each row it spans), and each request parameter sentence of those API reference pages saying KMS gets a resource from metadata, and each key identifier the concepts page gives a format of, each variable written {name}." + }, + "permissions": [ + { + "operation": "CancelKeyDeletion", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_CancelKeyDeletion.html", + "actions": [ + "kms:CancelKeyDeletion" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ConnectCustomKeyStore", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ConnectCustomKeyStore.html", + "actions": [ + "kms:ConnectCustomKeyStore" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "CreateAlias", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateAlias.html", + "actions": [ + "kms:CreateAlias" + ], + "description": [ + "To use this operation, the caller needs kms:CreateAlias permission on two resources:", + "For details, see Controlling access to aliases ." + ], + "items": [ + "The alias (in an IAM policy)", + "The KMS key (in a key policy)" + ], + "policies": [ + { + "policyType": "IAM policy (for the alias)", + "resources": "Alias" + }, + { + "policyType": "Key policy (for the KMS key)", + "resources": "KMS key" + } + ] + }, + { + "operation": "CreateCustomKeyStore", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateCustomKeyStore.html", + "actions": [ + "kms:CreateCustomKeyStore" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "CreateGrant", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html", + "actions": [ + "kms:CreateGrant" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "CreateKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html", + "actions": [ + "kms:CreateKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "Decapsulate", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Decapsulate.html", + "actions": [ + "kms:Decapsulate" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "Decrypt", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html", + "actions": [ + "kms:Decrypt" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DeleteAlias", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DeleteAlias.html", + "actions": [ + "kms:DeleteAlias" + ], + "description": [ + "To use this operation, the caller needs kms:DeleteAlias permission on two resources:", + "For details, see Controlling access to aliases ." + ], + "items": [ + "The alias (in an IAM policy)", + "The KMS key (in a key policy)" + ], + "policies": [ + { + "policyType": "IAM policy (for the alias)", + "resources": "Alias" + }, + { + "policyType": "Key policy (for the KMS key)", + "resources": "KMS key" + } + ] + }, + { + "operation": "DeleteCustomKeyStore", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DeleteCustomKeyStore.html", + "actions": [ + "kms:DeleteCustomKeyStore" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "DeleteImportedKeyMaterial", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DeleteImportedKeyMaterial.html", + "actions": [ + "kms:DeleteImportedKeyMaterial" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DeriveSharedSecret", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DeriveSharedSecret.html", + "actions": [ + "kms:DeriveSharedSecret" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DescribeCustomKeyStores", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeCustomKeyStores.html", + "actions": [ + "kms:DescribeCustomKeyStores" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "DescribeKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html", + "actions": [ + "kms:DescribeKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DisableKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKey.html", + "actions": [ + "kms:DisableKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DisableKeyRotation", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DisableKeyRotation.html", + "actions": [ + "kms:DisableKeyRotation" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "DisconnectCustomKeyStore", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_DisconnectCustomKeyStore.html", + "actions": [ + "kms:DisconnectCustomKeyStore" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "EnableKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html", + "actions": [ + "kms:EnableKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "EnableKeyRotation", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKeyRotation.html", + "actions": [ + "kms:EnableKeyRotation" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "Encapsulate", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Encapsulate.html", + "actions": [ + "kms:Encapsulate" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "Encrypt", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html", + "actions": [ + "kms:Encrypt" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GenerateDataKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html", + "actions": [ + "kms:GenerateDataKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GenerateDataKeyPair", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPair.html", + "actions": [ + "kms:GenerateDataKeyPair" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key Generates an asymmetric data key pair that is protected by a symmetric encryption KMS key." + } + ] + }, + { + "operation": "GenerateDataKeyPairWithoutPlaintext", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPairWithoutPlaintext.html", + "actions": [ + "kms:GenerateDataKeyPairWithoutPlaintext" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key Generates an asymmetric data key pair that is protected by a symmetric encryption KMS key." + } + ] + }, + { + "operation": "GenerateDataKeyWithoutPlaintext", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html", + "actions": [ + "kms:GenerateDataKeyWithoutPlaintext" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GenerateMac", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateMac.html", + "actions": [ + "kms:GenerateMac" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GenerateRandom", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateRandom.html", + "actions": [ + "kms:GenerateRandom" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "GetKeyLastUsage", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyLastUsage.html", + "actions": [ + "kms:GetKeyLastUsage" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GetKeyPolicy", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyPolicy.html", + "actions": [ + "kms:GetKeyPolicy" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GetKeyRotationStatus", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GetKeyRotationStatus.html", + "actions": [ + "kms:GetKeyRotationStatus" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GetParametersForImport", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GetParametersForImport.html", + "actions": [ + "kms:GetParametersForImport" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "GetPublicKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html", + "actions": [ + "kms:GetPublicKey" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ImportKeyMaterial", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ImportKeyMaterial.html", + "actions": [ + "kms:ImportKeyMaterial" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ListAliases", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListAliases.html", + "actions": [ + "kms:ListAliases" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "ListGrants", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListGrants.html", + "actions": [ + "kms:ListGrants" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ListKeyPolicies", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeyPolicies.html", + "actions": [ + "kms:ListKeyPolicies" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ListKeyRotations", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeyRotations.html", + "actions": [ + "kms:ListKeyRotations" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ListKeys", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListKeys.html", + "actions": [ + "kms:ListKeys" + ], + "description": [ + "You can use the same permission to list the KMS keys that other AWS accounts shared with you through AWS Resource Access Manager (AWS RAM) (the ResourceOwners parameter). For more information about identifying KMS keys that are shared with you, see Identifying a shared KMS key ." + ], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "ListResourceTags", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListResourceTags.html", + "actions": [ + "kms:ListResourceTags" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ListRetirableGrants", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ListRetirableGrants.html", + "actions": [ + "kms:ListRetirableGrants" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "PutKeyPolicy", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html", + "actions": [ + "kms:PutKeyPolicy" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ReEncrypt", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ReEncrypt.html", + "actions": [ + "kms:ReEncryptFrom", + "kms:ReEncryptTo" + ], + "description": [ + "To use this operation, the caller needs permission on two KMS keys:" + ], + "items": [ + "kms:ReEncryptFrom on the KMS key used to decrypt", + "kms:ReEncryptTo on the KMS key used to encrypt" + ], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ReplicateKey", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ReplicateKey.html", + "actions": [ + "kms:ReplicateKey" + ], + "description": [ + "To use this operation, the caller needs the following permissions:" + ], + "items": [ + "kms:ReplicateKey on the multi-Region primary key", + "kms:CreateKey in an IAM policy in the replica Region" + ], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "RetireGrant", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_RetireGrant.html", + "actions": [ + "kms:RetireGrant" + ], + "description": [ + "Permission to retire a grant is determined primarily by the grant. A policy alone cannot allow access to this operation. For more information, see Retiring and revoking grants ." + ], + "items": [], + "policies": [ + { + "policyType": "IAM policy (This permission is not effective in a key policy.)", + "resources": "KMS key" + } + ] + }, + { + "operation": "RevokeGrant", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_RevokeGrant.html", + "actions": [ + "kms:RevokeGrant" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "RotateKeyOnDemand", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_RotateKeyOnDemand.html", + "actions": [ + "kms:RotateKeyOnDemand" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "ScheduleKeyDeletion", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html", + "actions": [ + "kms:ScheduleKeyDeletion" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "Sign", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html", + "actions": [ + "kms:Sign" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "TagResource", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_TagResource.html", + "actions": [ + "kms:TagResource" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "UntagResource", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_UntagResource.html", + "actions": [ + "kms:UntagResource" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "UpdateAlias", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateAlias.html", + "actions": [ + "kms:UpdateAlias" + ], + "description": [ + "To use this operation, the caller needs kms:UpdateAlias permission on three resources:", + "For details, see Controlling access to aliases ." + ], + "items": [ + "The alias", + "The currently associated KMS key", + "The newly associated KMS key" + ], + "policies": [ + { + "policyType": "IAM policy (for the alias)", + "resources": "Alias" + }, + { + "policyType": "Key policy (for the KMS keys)", + "resources": "KMS key" + } + ] + }, + { + "operation": "UpdateCustomKeyStore", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateCustomKeyStore.html", + "actions": [ + "kms:UpdateCustomKeyStore" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "IAM policy", + "resources": "*" + } + ] + }, + { + "operation": "UpdateKeyDescription", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_UpdateKeyDescription.html", + "actions": [ + "kms:UpdateKeyDescription" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "UpdatePrimaryRegion", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_UpdatePrimaryRegion.html", + "actions": [ + "kms:UpdatePrimaryRegion" + ], + "description": [ + "To use this operation, the caller needs kms:UpdatePrimaryRegion permission on both the multi-Region primary key that will become a replica key and the multi-Region replica key that will become the primary key." + ], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "Verify", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_Verify.html", + "actions": [ + "kms:Verify" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + }, + { + "operation": "VerifyMac", + "apiReference": "https://docs.aws.amazon.com/kms/latest/APIReference/API_VerifyMac.html", + "actions": [ + "kms:VerifyMac" + ], + "description": [], + "items": [], + "policies": [ + { + "policyType": "Key policy", + "resources": "KMS key" + } + ] + } + ], + "fromMetadata": [ + { + "operation": "Decrypt", + "parameter": "KeyId", + "sentence": "If you used a symmetric encryption KMS key, AWS KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob." + }, + { + "operation": "ReEncrypt", + "parameter": "SourceKeyId", + "sentence": "If you used a symmetric encryption KMS key, AWS KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob." + } + ], + "identifiers": [ + { + "identifier": "Key ARN", + "sentence": "The format of a key ARN is as follows:", + "format": "arn:{partition}:kms:{region}:{account-id}:key/{key-id}" + }, + { + "identifier": "Alias ARN", + "sentence": "The format of an alias ARN is as follows:", + "format": "arn:{partition}:kms:{region}:{account-id}:alias/{alias-name}" + }, + { + "identifier": "Alias name", + "sentence": "The format of an alias name is as follows:", + "format": "alias/{alias-name}" + } + ] +} diff --git a/tools/aws/test_fetch_kms_api_permissions.py b/tools/aws/test_fetch_kms_api_permissions.py new file mode 100644 index 0000000000..436328cfc1 --- /dev/null +++ b/tools/aws/test_fetch_kms_api_permissions.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python3 +"""Tests for fetch_kms_api_permissions.py, on pages in the AWS KMS developer guide's and API reference's markup.""" +from __future__ import annotations + +import json + +import pytest + +import fetch_kms_api_permissions as f + +API = "https://docs.aws.amazon.com/kms/latest/APIReference/" +HEAD = ('Actions and permissionsPolicy typeCross-account use' + 'Resources (for IAM policies)AWS KMS condition keys') +DECRYPT = ('

Decrypt

' + '

kms:Decrypt

Key policy

' + '

Yes

KMS key

' + '

kms:EncryptionAlgorithm

') +RE_ENCRYPT = ('

ReEncrypt

' + '

kms:ReEncryptFrom

kms:ReEncryptTo

' + '

To use this operation, the caller needs permission on two KMS keys:

' + '
  • kms:ReEncryptFrom on the KMS ' + 'key used to decrypt

  • kms:ReEncryptTo on the ' + 'KMS key used to encrypt

Key policy

' + '

Yes

KMS key

None

' + '') +# An operation whose first cell spans two rows, the second giving the key policy's type and resources. +CREATE_ALIAS = ('CreateAlias' + '

kms:CreateAlias

To use this operation, the caller needs ' + 'kms:CreateAlias permission on two resources:

' + '
  • The alias (in an IAM policy)

  • ' + '
  • The KMS key (in a key policy)

' + '

IAM policy (for the alias)

No

' + '

Alias

None

' + '

Key policy (for the KMS key)

No

' + '

KMS key

kms:CallerAccount

') +KEY_ID = ('
KeyId
' + '

Specifies the KMS key that AWS KMS uses to decrypt the ciphertext.

This parameter is required only ' + 'when the ciphertext was encrypted under an asymmetric KMS key. If you used a symmetric encryption KMS key, ' + 'AWS KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob. However, it is ' + 'always recommended as a best practice.

') +BLOB = ('
CiphertextBlob
' + '

Ciphertext to be decrypted. The blob includes metadata.

') +CONCEPTS = ('
Alias ARN

The alias ARN is the ' + 'Amazon Resource Name (ARN) of an AWS KMS alias.

The format of an alias ARN is as follows:

' + '
' + '
arn:<partition>:kms:' + '<region>:<account-id>:alias/' + '<alias-name>
' + '
Key ID

A key ID uniquely identifies ' + 'a KMS key.

' + '
Alias name

In the AWS KMS API, ' + 'alias names always begin with alias/.

The format of an alias name is as ' + 'follows:

alias/<alias-name>' + '
') + + +def permissions_page(*rows: str, times: int = 1) -> str: + return "" + HEAD + "".join(rows) * times + "
" + + +def test_each_operation_of_the_table_is_copied_with_its_actions_list_and_policies(): + rows = f.read_permissions(permissions_page(DECRYPT, RE_ENCRYPT, CREATE_ALIAS)) + assert rows == [ + {"operation": "Decrypt", "apiReference": API + "API_Decrypt.html", "actions": ["kms:Decrypt"], + "description": [], "items": [], "policies": [{"policyType": "Key policy", "resources": "KMS key"}]}, + {"operation": "ReEncrypt", "apiReference": API + "API_ReEncrypt.html", + "actions": ["kms:ReEncryptFrom", "kms:ReEncryptTo"], + "description": ["To use this operation, the caller needs permission on two KMS keys:"], + "items": ["kms:ReEncryptFrom on the KMS key used to decrypt", + "kms:ReEncryptTo on the KMS key used to encrypt"], + "policies": [{"policyType": "Key policy", "resources": "KMS key"}]}, + {"operation": "CreateAlias", "apiReference": API + "API_CreateAlias.html", "actions": ["kms:CreateAlias"], + "description": ["To use this operation, the caller needs kms:CreateAlias permission on two resources:"], + "items": ["The alias (in an IAM policy)", "The KMS key (in a key policy)"], + "policies": [{"policyType": "IAM policy (for the alias)", "resources": "Alias"}, + {"policyType": "Key policy (for the KMS key)", "resources": "KMS key"}]}, + ] + + +def test_a_page_whose_table_changed_its_layout_is_refused(): + with pytest.raises(ValueError, match="tables"): + f.read_permissions("") + with pytest.raises(ValueError, match="headed"): + f.read_permissions("" + DECRYPT + "
Operation
") + with pytest.raises(ValueError, match="naming no operation"): + f.read_permissions(permissions_page(DECRYPT.replace('Decrypt', + "Decrypt"))) + + +def test_a_parameter_saying_kms_reads_its_resource_from_metadata_is_copied_with_that_sentence(): + assert f.read_from_metadata("
" + BLOB + KEY_ID + "
") == [ + {"operation": "Decrypt", "parameter": "KeyId", + "sentence": "If you used a symmetric encryption KMS key, AWS KMS can get the KMS key from metadata that it " + "adds to the symmetric ciphertext blob."}] + + +def test_each_key_identifier_giving_a_format_is_copied_with_its_variables_marked(): + assert f.read_identifiers(CONCEPTS) == [ + {"identifier": "Alias ARN", "sentence": "The format of an alias ARN is as follows:", + "format": "arn:{partition}:kms:{region}:{account-id}:alias/{alias-name}"}, + {"identifier": "Alias name", "sentence": "The format of an alias name is as follows:", + "format": "alias/{alias-name}"}] + with pytest.raises(ValueError, match="alias name and alias ARN"): + f.read_identifiers("
") + + +def test_the_file_is_stale_when_a_page_says_something_else(monkeypatch): + monkeypatch.setattr(f, "MINIMUM_ROWS", 1) + pages = (permissions_page(DECRYPT), {API + "API_Decrypt.html": "
" + KEY_ID + "
"}, CONCEPTS) + vendored = f.build(*pages) + assert vendored["fromMetadata"][0]["parameter"] == "KeyId" + assert not f.stale(json.loads(json.dumps(vendored)), *pages) + assert f.stale(vendored, pages[0], {API + "API_Decrypt.html": "
" + BLOB + "
"}, CONCEPTS) + with pytest.raises(ValueError, match="rows"): + monkeypatch.setattr(f, "MINIMUM_ROWS", 40) + f.build(*pages) diff --git a/tools/aws/test_regen_iam_request_resources.py b/tools/aws/test_regen_iam_request_resources.py index 78515d3ec3..e643656e4e 100644 --- a/tools/aws/test_regen_iam_request_resources.py +++ b/tools/aws/test_regen_iam_request_resources.py @@ -376,6 +376,7 @@ def isolated(monkeypatch): monkeypatch.setattr(r, "MEASURED", {}) monkeypatch.setattr(r, "STATEMENT_SOURCES", {}) monkeypatch.setattr(r, "PATH_SOURCES", {}) + monkeypatch.setattr(r, "PERMISSION_SOURCES", {}) return monkeypatch @@ -2943,3 +2944,133 @@ def test_nested_record_id_finds_only_containing_and_adjacent_resource_types(): members("AttachmentId", "OtherAttachmentId"), models) == [] shapes["DescribeInterfaceResponse"] = shapes.pop("Interface") assert r.with_nested_record_find([], list(formats), formats, members("AttachmentId"), models) == [] + + +# --------------------------------------------------------------------------- # +# PERMISSION_SOURCES: the vendored KMS permissions +# --------------------------------------------------------------------------- # +KEYS_FORMATS = {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", + "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}"} +KEYS_ACTIONS = {"kms:ReEncryptFrom": ["key"], "kms:ReEncryptTo": ["key"], "kms:UpdateAlias": ["alias", "key"], + "kms:DeleteAlias": ["alias", "key"], "kms:ReplicateKey": ["key"], "kms:CreateKey": []} + + +def keys_model() -> dict: + """A model shaped as KMS's: ReEncrypt naming its keys by `SourceKeyId` and `DestinationKeyId`, documented as the + keys it decrypts and reencrypts with, the alias calls naming an alias whose record holds its `TargetKeyId`.""" + def request(members: dict, required: list[str]) -> dict: + return {"type": "structure", "members": members, "required": required} + shapes = { + "KeyIdType": {"type": "string"}, "AliasNameType": {"type": "string"}, "CiphertextType": {"type": "blob"}, + "RegionType": {"type": "string"}, + "ReEncryptRequest": request({ + "CiphertextBlob": {"shape": "CiphertextType"}, + "SourceKeyId": {"shape": "KeyIdType", "documentation": "

Specifies the KMS key that KMS will use to " + "decrypt the ciphertext before it is re-encrypted." + "

"}, + "DestinationKeyId": {"shape": "KeyIdType", "documentation": "

A unique identifier for the KMS key that " + "is used to reencrypt the data.

"}}, + ["DestinationKeyId"]), + "UpdateAliasRequest": request({"AliasName": {"shape": "AliasNameType"}, + "TargetKeyId": {"shape": "KeyIdType"}}, ["AliasName", "TargetKeyId"]), + "DeleteAliasRequest": request({"AliasName": {"shape": "AliasNameType"}}, ["AliasName"]), + "ReplicateKeyRequest": request({"KeyId": {"shape": "KeyIdType"}, "ReplicaRegion": {"shape": "RegionType"}}, + ["KeyId", "ReplicaRegion"]), + "KeyMetadata": {"type": "structure", "members": {"KeyId": {"shape": "KeyIdType"}}}, + "AliasListEntry": {"type": "structure", "members": {"AliasName": {"shape": "AliasNameType"}, + "TargetKeyId": {"shape": "KeyIdType"}}}, + } + operations = {name: {"name": name, "input": {"shape": f"{name}Request"}} + for name in ("ReEncrypt", "UpdateAlias", "DeleteAlias", "ReplicateKey")} + return {"metadata": {"protocol": "json", "endpointPrefix": "kms"}, "operations": operations, "shapes": shapes} + + +def keys_row(operation: str, actions: list[str], items: list[str]) -> dict: + return {"operation": operation, "apiReference": f"https://example.com/API_{operation}.html", "actions": actions, + "description": [], "items": items, "policies": [{"policyType": "Key policy", "resources": "KMS key"}]} + + +def test_vendored_permissions_check_each_resource_they_list_as_the_action_they_name(): + models = {"kms": keys_model()} + row = keys_row("ReEncrypt", ["kms:ReEncryptFrom", "kms:ReEncryptTo"], + ["kms:ReEncryptFrom on the KMS key used to decrypt", + "kms:ReEncryptTo on the KMS key used to encrypt"]) + resources, actions = r.permission_resources("kms:ReEncrypt", "kms:ReEncrypt", [], row, KEYS_ACTIONS, + KEYS_FORMATS, models) + assert actions == {"kms:ReEncryptFrom": ["key"], "kms:ReEncryptTo": ["key"]} + assert resources == [{"type": "key", "fill": {"KeyId": "SourceKeyId"}, "action": "kms:ReEncryptFrom"}, + {"type": "key", "fill": {"KeyId": "DestinationKeyId"}, "action": "kms:ReEncryptTo"}] + sentence = {"operation": "ReEncrypt", "parameter": "SourceKeyId", + "sentence": "If you used a symmetric encryption KMS key, AWS KMS can get the KMS key from metadata " + "that it adds to the symmetric ciphertext blob."} + assert r.with_from_metadata(resources, "kms:ReEncrypt", [sentence], models)[2:] == [ + {"types": ["key"], "through": "CiphertextBlob", "when": {"SourceKeyId": [None]}, "action": "kms:ReEncryptFrom"}] + + +def test_a_listed_resource_no_member_names_is_reached_through_the_record_of_another_it_lists(): + models = {"kms": keys_model()} + alias = {"type": "alias", "fill": {"Alias": "AliasName"}} + row = keys_row("UpdateAlias", ["kms:UpdateAlias"], + ["The alias", "The currently associated KMS key", "The newly associated KMS key"]) + assert r.permission_resources("kms:UpdateAlias", "kms:UpdateAlias", [alias], row, KEYS_ACTIONS, KEYS_FORMATS, + models) == ( + [alias, {"type": "key", "fill": {"KeyId": "TargetKeyId"}}, {"types": ["key"], "through": "AliasName"}], None) + row = keys_row("DeleteAlias", ["kms:DeleteAlias"], + ["The alias (in an IAM policy)", "The KMS key (in a key policy)"]) + assert r.permission_resources("kms:DeleteAlias", "kms:DeleteAlias", [alias], row, KEYS_ACTIONS, KEYS_FORMATS, + models) == ([alias, {"types": ["key"], "through": "AliasName"}], None) + + +def test_a_listed_action_on_no_resource_is_one_the_operation_is_checked_as(): + row = keys_row("ReplicateKey", ["kms:ReplicateKey"], + ["kms:ReplicateKey on the multi-Region primary key", "kms:CreateKey in an IAM policy in the replica " + "Region"]) + assert r.permission_resources("kms:ReplicateKey", "kms:ReplicateKey", [], row, KEYS_ACTIONS, KEYS_FORMATS, + {"kms": keys_model()}) == ( + [{"type": "key", "fill": {"KeyId": "KeyId"}, "action": "kms:ReplicateKey"}], + {"kms:ReplicateKey": ["key"], "kms:CreateKey": []}) + + +def test_vendored_permissions_the_metadata_does_not_bear_out_are_refused(): + models = {"kms": keys_model()} + unknown = keys_row("ReEncrypt", [], ["kms:ReEncryptAll on the KMS key used to decrypt"]) + with pytest.raises(ValueError, match="does not have"): + r.permission_resources("kms:ReEncrypt", "kms:ReEncrypt", [], unknown, KEYS_ACTIONS, KEYS_FORMATS, models) + undocumented = keys_row("ReEncrypt", ["kms:ReEncryptFrom"], ["kms:ReEncryptFrom on the KMS key used to sign"]) + with pytest.raises(ValueError, match="documented as used for"): + r.permission_resources("kms:ReEncrypt", "kms:ReEncrypt", [], undocumented, KEYS_ACTIONS, KEYS_FORMATS, models) + sentence = {"operation": "ReEncrypt", "parameter": "SourceKeyId", + "sentence": "AWS KMS can get the KMS key from metadata that it adds to the envelope."} + with pytest.raises(ValueError, match="names no member"): + r.with_from_metadata([], "kms:ReEncrypt", [sentence], models) + assert r.permission_resources("kms:Encrypt", "kms:Encrypt", [{"type": "key", "fill": {"KeyId": "KeyId"}}], + keys_row("Encrypt", ["kms:Encrypt"], []), KEYS_ACTIONS, KEYS_FORMATS, models) == ( + [{"type": "key", "fill": {"KeyId": "KeyId"}}], None) + + +def test_an_identifier_given_as_another_arns_resource_names_its_type_by_that_resource(): + identifiers = [{"identifier": "Key ARN", "sentence": "", "format": "arn:{partition}:kms:{region}:{account-id}:key/" + "{key-id}"}, + {"identifier": "Alias ARN", "sentence": "", + "format": "arn:{partition}:kms:{region}:{account-id}:alias/{alias-name}"}, + {"identifier": "Alias name", "sentence": "", "format": "alias/{alias-name}"}] + assert r.named_resources(identifiers, KEYS_FORMATS) == {"alias"} + assert r.named_resources(identifiers[:2], KEYS_FORMATS) == set() + + +def test_an_operation_checked_as_several_actions_checks_each_resource_as_one_of_them(isolated): + isolated.setattr(r, "PERMISSION_SOURCES", {"svc": Path("svc.json")}) + document = good_document() + document["arnFormats"]["svc"]["key"] = "arn:${Partition}:svc:${Region}:${Account}:key/${KeyId}" + entry = {"action": "svc:ReEncrypt", "types": [], + "actions": {"svc:ReEncryptFrom": ["key"], "svc:ReEncryptTo": ["key"]}, + "resources": [{"type": "key", "fill": {"KeyId": "SourceKeyId"}, "action": "svc:ReEncryptFrom"}, + {"type": "key", "fill": {"KeyId": "DestinationKeyId"}, "action": "svc:ReEncryptTo"}]} + document["operations"] = dict(sorted({**document["operations"], "svc:ReEncrypt": entry}.items())) + assert r.validate(document) == [] + unchecked = dict(entry, resources=[{"type": "key", "fill": {"KeyId": "SourceKeyId"}}]) + document["operations"]["svc:ReEncrypt"] = unchecked + assert any("none of the actions" in problem for problem in r.validate(document)) + isolated.setattr(r, "PERMISSION_SOURCES", {}) + document["operations"]["svc:ReEncrypt"] = entry + assert any("vendored permissions" in problem for problem in r.validate(document))