From a4b2f017132679c063b29a025d8f830ed580dcde Mon Sep 17 00:00:00 2001 From: Priamo Germosen <6233424+pgermosen@users.noreply.github.com> Date: Mon, 23 Nov 2026 08:23:04 -0400 Subject: [PATCH] feat(iam): read IAM from the generated tables, its paths, signing user and renames from the user guide and API reference (#9252) IAM is read from iam-request-resources.json now, and ResourceArnBuilder's IAM branch, the last hand-built namespace, is gone: HAND_BUILT is empty. What botocore and the Service Reference do not say comes from the IAM User Guide's identifiers and the IAM API reference, vendored by fetch_iam_identifiers.py into tools/aws/sources/iam-identifiers.json and read under PERMISSION_SOURCES. - A user, group, role, instance profile or server certificate a request names by its name is checked on the ARN IAM stores it under, path included (IamStoredResourceArns.find), and one IAM does not hold on its name under the root path. - A create is checked on the name its request gives after the Path it gives (path), as the identifiers say the API's creates take one. - UpdateUser, UpdateGroup and UpdateServerCertificate are also checked on the resource under its new name and path (renames), as their API reference says the caller needs permission on both. - The twenty operations whose API reference says they act on the user signing the request when it leaves out UserName, and ChangePassword, are checked on that user (signer), which the new StoredResourceArns.signedBy hook gives for the signing key. - A virtual MFA device is named by its SerialNumber, which the API reference gives as its ARN; the access key, SSH public key and service-specific credential operations name the user owning what they name, and GetServiceLinkedRoleDeletionStatus the role its task deleted (IamStoredResourceArns.through). - MEASURED gives UpdateDelegationRequest, which the Service Reference does not list, the request its DelegationRequestId names, citing its API reference ("that owner gets a default permission to update the delegation request") and the user guide's temporary delegation page. - CreateServiceLinkedRole is checked on role/*, CreateDelegationRequest on delegation-request/* and CreateOpenIDConnectProvider on *, as the table gives them. CreateOpenIDConnectProvider refuses an IdentityCenterInstanceArn that is not the ARN of an IAM Identity Center instance, with InvalidInput. - Bedrock's ListTrustedAccessPrograms is checked as bedrock:CallWithBearerToken, as the Service Reference now authorizes it. --- Makefile | 3 +- docs/services/iam.md | 83 +-- .../core/common/RequestResourceMembers.java | 56 +- .../aws/core/common/RequestResources.java | 100 ++- .../aws/core/common/StoredResourceArns.java | 15 +- .../aws/services/iam/IamActionResources.java | 2 +- .../aws/services/iam/IamQueryHandler.java | 18 + .../io/floci/aws/services/iam/IamService.java | 25 + .../services/iam/IamStoredResourceArns.java | 95 ++- .../aws/services/iam/ResourceArnBuilder.java | 590 +----------------- .../resources/aws/iam-request-resources.json | 193 +++++- .../common/RequestResourceMembersTest.java | 33 +- .../services/iam/IamActionResourcesTest.java | 80 --- ...mOpenIDConnectProviderIntegrationTest.java | 27 + .../iam/IamStoredResourceArnsTest.java | 104 +++ .../services/iam/ResourceArnBuilderTest.java | 255 +++++--- ...nresolvedResourceTypesIntegrationTest.java | 104 --- tools/aws/fetch_iam_identifiers.py | 232 +++++++ tools/aws/regen_iam_request_resources.py | 236 ++++++- tools/aws/sources/iam-identifiers.json | 213 +++++++ tools/aws/test_fetch_iam_identifiers.py | 101 +++ tools/aws/test_regen_iam_request_resources.py | 116 ++++ 22 files changed, 1743 insertions(+), 938 deletions(-) create mode 100644 src/test/java/io/floci/aws/services/iam/IamStoredResourceArnsTest.java delete mode 100644 src/test/java/io/floci/aws/services/iam/UnresolvedResourceTypesIntegrationTest.java create mode 100644 tools/aws/fetch_iam_identifiers.py create mode 100644 tools/aws/sources/iam-identifiers.json create mode 100644 tools/aws/test_fetch_iam_identifiers.py diff --git a/Makefile b/Makefile index 7853fab90f..642ba0efbb 100644 --- a/Makefile +++ b/Makefile @@ -630,7 +630,8 @@ IAM_REQUEST_RESOURCES_PATHS := src/main/resources/aws/iam-request-resources.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 tools/aws/sources/dynamodb-permissions.json \ - tools/aws/fetch_dynamodb_permissions.py tools/aws/test_fetch_dynamodb_permissions.py + tools/aws/fetch_dynamodb_permissions.py tools/aws/test_fetch_dynamodb_permissions.py \ + tools/aws/sources/iam-identifiers.json tools/aws/fetch_iam_identifiers.py tools/aws/test_fetch_iam_identifiers.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/iam.md b/docs/services/iam.md index 8fa04905eb..91f0b21402 100644 --- a/docs/services/iam.md +++ b/docs/services/iam.md @@ -2508,8 +2508,8 @@ requests retain HTTP 403 XML `AccessDenied` responses, except SNS's, which retur `AuthorizationError`, the error every SNS operation lists for a caller denied access, whichever action is denied. The routed protocol determines the status, not just the request's content type. -A request is checked against the resources it names. Floci builds their ARNs itself for S3, -DynamoDB, SSM, KMS, IAM and API Gateway. For Secrets Manager, Elastic Load Balancing, ECR, +A request is checked against the resources it names. For S3, DynamoDB, SSM, KMS, IAM, API Gateway, +Secrets Manager, Elastic Load Balancing, ECR, Step Functions, EventBridge, EventBridge Scheduler, Amazon Cognito user pools and identity pools, Amazon Data Firehose, Cloud Map, ACM, CodePipeline, CodeBuild, Amazon Managed Service for Apache Flink (Kinesis Data Analytics v2), Application Auto Scaling, AWS Budgets, Cost and Usage Reports, Service Quotas, Amazon Textract, Amazon Translate, Amazon Athena, @@ -3372,10 +3372,10 @@ as the GetClusterCredentials API reference lists them. They are checked before t so a denied request gets `AccessDenied` even for a cluster that does not exist. The `dbname` resource that `DbName` needs is not checked. -**IAM's own resources are named.** When enforcement evaluates a request, the target resource comes -from `ResourceArnBuilder`, which builds an ARN for S3, Lambda, DynamoDB, Secrets -Manager, SSM, KMS and IAM. Within IAM the resource type each action is evaluated against is the one -the Service Authorization Reference gives it, so a statement naming a specific user, role, group, +**IAM's own resources are named.** When enforcement evaluates an IAM request, the target resource +comes from the generated request-resources table, as it does for every other service. Within IAM the +resource type each action is evaluated against is the one the Service Authorization Reference gives +it, so a statement naming a specific user, role, group, instance profile, managed policy, MFA device, identity provider or server certificate constrains it: a `Deny` on `arn:aws:iam::123456789012:user/bob` stops `DeleteUser` for Bob and leaves other users alone, and an `Allow` scoped to one role limits `DeleteRole` to it. @@ -3383,17 +3383,19 @@ users alone, and an `Allow` scoped to one role limits `DeleteRole` to it. The resource type is not the parameter the action happens to take. `AddUserToGroup` and `RemoveUserFromGroup` are evaluated against the group, `AddRoleToInstanceProfile` and `RemoveRoleFromInstanceProfile` against the instance profile, and `EnableMFADevice`, -`DeactivateMFADevice` and `ResyncMFADevice` against the user rather than the device. An action -acting on something that already exists is checked against that resource's stored ARN, path and -partition included; a create is checked against an ARN minted from the request's own `Path`, since -reading a stored path would authorize a create into a path the policy does not name. - -When a named role is absent and the operation's generated input shape declares `RoleName` -but no `Path`, the request is checked against `role/` in the request account and partition. -This lets an authorized `GetRole` probe receive `NoSuchEntity` and proceed with creation, and -also applies to other role operations such as `DeleteRole` and `ListRolePolicies`. An injected -`Path` cannot change this ARN. Once the role exists, its stored path and partition apply; -creation still uses the path the request asks for. +`DeactivateMFADevice` and `ResyncMFADevice` against the user rather than the device. The IAM User Guide's +identifiers give a user's, group's, role's, policy's, instance profile's, MFA device's and server +certificate's ARN as its name after its path (`user/division_abc/subdivision_xyz/Jane`), and say the +API's creates take that path. An action on a user, group, role, instance profile or server certificate +that already exists is checked against the ARN IAM stores it under, path and partition included; one IAM +does not hold is checked against its name under the root path (`role/`) in the request's account +and partition, so an authorized `GetRole` probe receives `NoSuchEntity` and can proceed with creation. A +create is checked against the name its request gives after the `Path` it gives, the root path when it +gives none, since reading a stored path would authorize a create into a path the policy does not name. +A `Path` sent to an operation that takes none changes nothing. `UpdateUser`, `UpdateGroup` and +`UpdateServerCertificate` are checked on the resource under its current name and under the new name and +path the request gives, each part it leaves out kept, as their API reference says the caller needs +permission on both; an update that renames and moves nothing names one resource. `ec2:CreateVpc` is evaluated against `vpc/*` in the caller's partition, Region and account, so a VPC-scoped grant can authorize creation with `aws:RequestTag` conditions. When supplied, @@ -3445,29 +3447,32 @@ and stop at the first missing list index. A list a type's ARN variable names, su `InstanceIds`, is the request's targets only when the request names nothing else the action acts on: a launch's `SecurityGroupIds` are read beside its image and subnet, each on its own ARN. -Which type each action takes is vendored, not written out in Java: -`src/main/resources/aws/iam-action-resources.json` is generated by -`tools/aws/regen_iam_action_resources.py` from AWS's Service Reference Information for IAM, and -carries every published action with the resource types it is authorized against, plus the ARN -format of each type. `make iam-action-resources-check` gates its shape offline on every pull -request and `make iam-action-resources-verify` checks every claim in it against AWS weekly, so a -type that drifts from what AWS publishes fails in CI rather than authorizing against the wrong -resource. What stays in Java is the half that is Floci's: the request parameter each type's name -arrives in, the creates, the actions whose request carries an ARN, the four whose request names -the resource some other way, and the resource types that belong only to actions Floci does not -dispatch. `GenerateOrganizationsAccessReport` is one of the four: the reference spells its type as -`access-report/${EntityPath}`, so the Organizations entity path goes into the ARN whole, its -slashes being the organization's tree rather than an IAM path. `IamActionResourcesTest` checks the -one against the other, so a regeneration that introduces a resource type nothing resolves fails a -test naming -it rather than quietly putting that action back on `*`. +Nothing of this is written out in Java. The table gives each IAM operation its action, types and +members from the Service Reference and botocore, as for any other service, and what neither says +comes from the IAM User Guide's identifiers and the IAM API reference, which +`tools/aws/fetch_iam_identifiers.py` vendors into `tools/aws/sources/iam-identifiers.json` as the pages +stand: the ARN syntax with its paths, and each API reference sentence saying what an operation acts on +where its request does not. `GenerateOrganizationsAccessReport` is checked on +`access-report/${EntityPath}` with the Organizations entity path whole, its slashes being the +organization's tree rather than an IAM path. A policy, an identity provider or a role template is +named by the ARN the request carries, and so is a virtual MFA device, whose serial number the API +reference gives as its ARN; a hardware device's serial names nothing. `GetAccessKeyLastUsed` and the +access key, SSH public key and service-specific credential operations are checked on the user that +owns the key or credential they name, in the caller's account, and `GetServiceLinkedRoleDeletionStatus` +on the role its deletion task deleted. Where nothing says it, an operation is checked on what the table +gives: `CreateServiceLinkedRole`, whose role AWS names after the service, on `role/*`; +`CreateDelegationRequest`, whose id IAM mints, on `delegation-request/*`; and `CreateOpenIDConnectProvider` +on `*`. `UpdateDelegationRequest`, which the Service Reference does not list, is checked on the request its +`DelegationRequestId` names, as its API reference says "that owner gets a default permission to update the +delegation request" and the IAM User Guide grants an owner permission to forward "that specific request". +`make iam-request-resources-check` re-derives the table and `make iam-request-resources-verify` checks it and +the vendored pages against AWS. -The nineteen user actions whose `UserName` the model marks optional, `GetUser`, `ListAccessKeys` and -`CreateAccessKey` among them, resolve to the user who signed the request when it is omitted, which -is the user AWS acts on. The access key id in the credential names that identity, the same lookup -`GetAccessKeyLastUsed` makes on a key passed as a parameter, and the user's stored ARN is then the -resource. The wildcard still stands when the signer is not an IAM user: an account's root stand-in -and a session credential have no user record to name. +The operations whose API reference says that, when the request leaves out its `UserName`, they act on +the user whose access key signs it (`GetUser`, `ListAccessKeys` and `CreateAccessKey` among twenty), +and `ChangePassword`, which always does, are checked on that user's stored ARN, path included, or on the +account root's ARN for a key of the root. A session credential names no user, so the request names +nothing and is checked on `*`. What resolves to `*` is what the reference gives no resource type, such as `ListUsers`, `GetAccountSummary` and `SimulateCustomPolicy`. Every other mapped action takes its parameter as a 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 84f2cf3bba..a977d7d088 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java +++ b/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java @@ -75,13 +75,18 @@ final class RequestResourceMembers { private static final Set ARN_KEYS = Set.of("types", "arn", "made", "endpoint"); /** The keys of a resource whose format's variables members fill, or its service finds by them. */ private static final Set FILL_KEYS = Set.of("type", "fill", "when", "unless", "arnOf", "account", "fixed", - "made", "find", "endpoint", "default", "whenDefault", "unlessDefault", "defaults", "partialArn"); + "made", "find", "endpoint", "default", "whenDefault", "unlessDefault", "defaults", "partialArn", "path", + "renames"); + /** The keys a resource whose one variable is a name after its path does not take: it is read no other way. */ + private static final List PATHED_ONLY = List.of("find", "default", "when", "unless", "partialArn"); /** The keys of a resource named through a member naming another of its service's own: it is read no other way. */ private static final Set THROUGH_KEYS = Set.of("types", "through", "when", "endpoint"); /** The keys of a resource a statement the request carries names, which its service parses. */ private static final Set STATEMENT_KEYS = Set.of("types", "statement", "verb", "names"); /** The keys of a resource its service acts on for a request naming none of it: it is read no other way. */ private static final Set DEFAULT_KEYS = Set.of("type", "fill", "when", "default", "endpoint"); + /** The keys of the user who signs a request, which an operation acts on: it is read no other way. */ + private static final Set SIGNER_KEYS = Set.of("types", "signer", "when"); /** * A request selector that holds a string, an array when {@code list}, or map values when {@code map}. @@ -245,14 +250,30 @@ final class RequestResourceMembers { * ({@code 123456789012:function:my-function}) or its Region too, which the reader completes in the request's * partition, and Region where the value leaves that out. A resource a {@code statement} the request carries names * is the one of its types whose every variable the service's parse of the statement names, by the word - * {@code names} gives each variable, when the statement's verb is {@code verb}. + * {@code names} gives each variable, when the statement's verb is {@code verb}. A type whose one variable is a + * name after its path takes the name its one member filling it gives after the path the member {@code path} + * gives (a create's {@code UserName} and {@code Path}: {@code user/}); one a request + * {@code renames} is the resource the member it names gives, as its service holds it, with the name and the path + * the request gives each in place of its own (UpdateUser's {@code UserName}, renamed {@code NewUserName}, moved + * {@code NewPath}). A {@code signer} resource is the user whose access key signs the request, which its service + * gives, {@code when} the request leaves out the members that would name another. */ record Resource(List types, Member arn, Map fill, Map> when, Map> unless, Map arnOf, Member account, Map fixed, boolean made, List find, String endpoint, Member through, boolean byDefault, Map whenDefault, Map unlessDefault, Map defaults, boolean partialArn, Member statement, String verb, - Map names) { + Map names, Member path, Member renames, boolean signer) { + + Resource(List types, Member arn, Map fill, Map> when, + Map> unless, Map arnOf, Member account, + Map fixed, boolean made, List find, String endpoint, Member through, + boolean byDefault, Map whenDefault, Map unlessDefault, + Map defaults, boolean partialArn, Member statement, String verb, + Map names) { + this(types, arn, fill, when, unless, arnOf, account, fixed, made, find, endpoint, through, byDefault, + whenDefault, unlessDefault, defaults, partialArn, statement, verb, names, null, null, false); + } Resource(List types, Member arn, Map fill, Map> when, Map> unless, Map arnOf, Member account, @@ -772,6 +793,9 @@ final class RequestResourceMembers { if (resource.has("statement")) { return statementResource(operation, resource, formats); } + if (resource.has("signer")) { + return signerResource(operation, resource, formats); + } Set keys = resource.has("through") ? THROUGH_KEYS : resource.has("arn") ? ARN_KEYS : FILL_KEYS; List unknown = resource.properties().stream().map(Map.Entry::getKey) .filter(key -> !keys.contains(key)).toList(); @@ -880,9 +904,33 @@ final class RequestResourceMembers { throw new IllegalStateException(RESOURCE_NAME + " reads " + type + " for " + operation + " from a partial ARN " + resource.path("partialArn") + ", not true for a type its members fill"); } + Member path = resource.has("path") ? member(operation, resource.path("path").asText("")) : null; + Member renames = resource.has("renames") ? member(operation, resource.path("renames").asText("")) : null; + if ((path != null || renames != null) && (fill.size() != 1 || (renames != null && path == null) + || (path != null && path.list()) || (renames != null && renames.list()) + || PATHED_ONLY.stream().anyMatch(resource::has))) { + throw new IllegalStateException(RESOURCE_NAME + " reads " + type + " for " + operation + " as a name after " + + "the path " + resource.path("path") + ", no member of one value beside one filling its one " + + "variable, or beside members reading it otherwise"); + } return new Resource(List.of(type), null, Map.copyOf(fill), when, unless, Map.copyOf(arnOf), account, Map.copyOf(fixed), made, List.copyOf(find), endpoint, null, byDefault, whenDefault, unlessDefault, - defaults(operation, type, resource.path("defaults"), fill, formats), partialArn); + defaults(operation, type, resource.path("defaults"), fill, formats), partialArn, null, null, Map.of(), + path, renames, false); + } + + /** The user who signs a request, of one of {@code types}, {@code when} the request gives those members' values. */ + private static Resource signerResource(String operation, JsonNode resource, Map formats) { + List types = resource.path("types").valueStream().map(JsonNode::asText).toList(); + if (types.size() != 1 || !formats.containsKey(types.getFirst()) || !resource.path("signer").isBoolean() + || !resource.path("signer").booleanValue() || resource.properties().stream() + .map(Map.Entry::getKey).anyMatch(key -> !SIGNER_KEYS.contains(key))) { + throw new IllegalStateException(RESOURCE_NAME + " names the user signing a request of " + operation + + " as " + types + ", no one type with a format, or beside members reading it otherwise"); + } + return new Resource(types, null, Map.of(), values(operation, types.getFirst(), resource.path("when")), + Map.of(), Map.of(), null, Map.of(), false, List.of(), null, null, false, Map.of(), Map.of(), Map.of(), + false, null, null, Map.of(), null, null, true); } /** 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 81229b63d7..b412ba7c51 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResources.java +++ b/src/main/java/io/floci/aws/core/common/RequestResources.java @@ -207,7 +207,27 @@ public final class RequestResources { JsonNode body = sent.isEmpty() ? located(table, operation, PassedRoles.jsonBody(ctx), ctx, labels) : null; Map form = ec2Query(table, operation, located(table, operation, sent, ctx, labels)); return resources.isEmpty() ? List.of() - : named(operation, resources, formats(table, operation), form, body, partition, region, accountId, stored); + : named(operation, resources, formats(table, operation), form, body, partition, region, accountId, + stored, signer(resources, ctx, stored)); + } + + /** + * The ARN of the user whose access key signs the request, as {@code stored} gives it, where a resource is that user + * ({@code signer}); null otherwise, and for a key of no user. The key is the one the request's + * {@code Authorization} header gives, or its query's credential where the header gives none, as the enforcement + * filter reads it. + */ + private static String signer(List resources, ContainerRequestContext ctx, + StoredResourceArns stored) { + if (stored == null || resources.stream().noneMatch(RequestResourceMembers.Resource::signer)) { + return null; + } + String authorization = ctx.getHeaderString("Authorization"); + if (authorization == null || authorization.isBlank()) { + authorization = IamEnforcementFilter.requestAuthorization(null, + ctx.getUriInfo() == null ? null : ctx.getUriInfo().getQueryParameters()); + } + return SigV4CredentialScope.accessKeyId(authorization).flatMap(stored::signedBy).orElse(null); } /** @@ -468,11 +488,22 @@ public final class RequestResources { return List.copyOf(arns); } - /** The ARNs of the resources the request names, as {@link #of} reads them. */ + /** The ARNs of the resources the request names, as {@link #of} reads them, none of them the user signing it. */ private static List named(String operation, List resources, Map formats, Map form, JsonNode body, String partition, String region, String accountId, StoredResourceArns stored) { + return named(operation, resources, formats, form, body, partition, region, accountId, stored, null); + } + + /** + * The ARNs of the resources the request names, as {@link #of} reads them, {@code signer} being the user whose key + * signs it, or null for none. + */ + private static List named(String operation, List resources, + Map formats, Map form, + JsonNode body, String partition, String region, String accountId, + StoredResourceArns stored, String signer) { Set arns = new LinkedHashSet<>(); for (RequestResourceMembers.Resource resource : resources) { if (!applies(resource, form, body, formats) || !onDefault(resource, form, body, formats, region, stored)) { @@ -491,6 +522,13 @@ public final class RequestResources { } } else if (resource.statement() != null) { statement(arns, resource, formats, form, body, partition, region, accountId, stored); + } else if (resource.signer()) { + // The user whose key signs the request, as its service stores it; none for a key of no user. + if (signer != null) { + arns.add(signer); + } + } else if (resource.path() != null) { + pathed(arns, resource, formats, form, body, partition, region, accountId, stored); } else if (resource.through() != null) { through(arns, resource, formats, form, body, region, stored); } else if (!resource.find().isEmpty()) { @@ -958,6 +996,64 @@ public final class RequestResources { } } + /** + * The ARN of a resource whose one variable is a name after its path ({@code user/}): the name the + * member filling it gives, after the path its {@code path} member gives, the root {@code /} where it gives none, as + * a create names what it makes; none when the request gives no name. A resource the request {@code renames} is the + * one the member it names gives, as {@code stored} finds it in the caller's account, or under the root path where + * it finds none, with the name and the path the request gives each in place of its own, in that resource's + * partition and account; none when the request names no resource to rename. + */ + private static void pathed(Set arns, RequestResourceMembers.Resource resource, + Map formats, Map form, + JsonNode body, String partition, String region, String accountId, + StoredResourceArns stored) { + String type = resource.types().getFirst(); + RequestResourceMembers.ArnFormat format = formats.get(type); + Map.Entry variable = resource.fill().entrySet().iterator().next(); + String name = firstGiven(form, body, variable.getValue()); + String path = firstGiven(form, body, resource.path()); + if (resource.renames() == null) { + if (name != null) { + arns.add(format.checked(render(format.format(), Map.of(variable.getKey(), underPath(path) + name), + partition, region, accountId))); + } + return; + } + String renamed = firstGiven(form, body, resource.renames()); + if (renamed == null) { + return; + } + String held = (stored == null ? Optional.empty() : stored.find(type, List.of(renamed), region)) + .filter(arn -> format.pattern().matcher(arn).matches()) + .orElseGet(() -> format.checked(render(format.format(), Map.of(variable.getKey(), renamed), partition, + region, accountId))); + AwsArnUtils.Arn source = AwsArnUtils.parse(held); + String own = format.variable(held); + String ownPath = own.endsWith("/" + renamed) ? "/" + own.substring(0, own.length() - renamed.length()) : "/"; + arns.add(format.checked(render(format.format(), Map.of(variable.getKey(), + underPath(path == null ? ownPath : path) + (name == null ? renamed : name)), source.partition(), region, + source.accountId()))); + } + + /** The first value a request gives a member, none for a JSON null or an empty one. */ + private static String firstGiven(Map form, JsonNode body, RequestResourceMembers.Member member) { + return namingNoneWhenNull(form, body, member).stream().filter(value -> !value.isEmpty()).findFirst() + .orElse(null); + } + + /** + * A path as it precedes a name in a variable holding both: without its leading {@code /} and with a trailing one, + * the root {@code /} as nothing ({@code /team/} as {@code team/}). + */ + private static String underPath(String path) { + if (path == null || path.isBlank() || "/".equals(path)) { + return ""; + } + String inner = path.startsWith("/") ? path.substring(1) : path; + return inner.endsWith("/") ? inner : inner + "/"; + } + /** * The value of a member of a {@code partialArn} type as an ARN: one giving its account and resource * ({@code 123456789012:function:my-function}), or its Region too, completed in the request's partition and, where 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 b90fb8f8a7..46b98ee77c 100644 --- a/src/main/java/io/floci/aws/core/common/StoredResourceArns.java +++ b/src/main/java/io/floci/aws/core/common/StoredResourceArns.java @@ -26,7 +26,10 @@ import java.util.Optional; * 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 + * tag call's resource and the tags of a cluster or a session; IAM, for the user, group, role, instance profile or + * server certificate a name names, path included, the user an access key, an SSH public key or a service-specific + * credential belongs to, the role a service-linked role deletion task deleted and the user who signs a request; 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 * of an index or a view; OAM and RAM, for the sinks, invitations and shares of other accounts they act on, OAM for @@ -156,6 +159,16 @@ public interface StoredResourceArns { return Optional.empty(); } + /** + * The ARN of the user whose access key {@code accessKeyId} is, as the service that issued the key stores the user, + * path included, or its account's root user's for a key of the root: the user an operation acting on the user who + * signs it acts on (IAM's {@code GetUser} with no {@code UserName}). Empty for a key of no user, as a role + * session's, which such an operation refuses, and for one the service did not issue. + */ + default Optional signedBy(String accessKeyId) { + return Optional.empty(); + } + /** * 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, diff --git a/src/main/java/io/floci/aws/services/iam/IamActionResources.java b/src/main/java/io/floci/aws/services/iam/IamActionResources.java index 93e50f3eae..3145d7d766 100644 --- a/src/main/java/io/floci/aws/services/iam/IamActionResources.java +++ b/src/main/java/io/floci/aws/services/iam/IamActionResources.java @@ -27,7 +27,7 @@ import java.util.Map; *

{@code make iam-action-resources-check} gates its shape offline and * {@code make iam-action-resources-verify} checks every claim in it against AWS, so a type that * drifts from what AWS publishes fails in CI rather than quietly authorizing against the wrong - * resource. {@link ResourceArnBuilder} is the only consumer. + * resource. {@link SimulatedResourceTemplates} reads it for the templates a simulation names. * *

An action absent from the file is one AWS does not publish, which is different from an action * published with no resource type: the first is a gap, the second is a wildcard on purpose. Both diff --git a/src/main/java/io/floci/aws/services/iam/IamQueryHandler.java b/src/main/java/io/floci/aws/services/iam/IamQueryHandler.java index 2a4e6b9822..72f7acf58d 100644 --- a/src/main/java/io/floci/aws/services/iam/IamQueryHandler.java +++ b/src/main/java/io/floci/aws/services/iam/IamQueryHandler.java @@ -789,6 +789,14 @@ public class IamQueryHandler { } private Response handleCreateOpenIDConnectProvider(MultivaluedMap params) { + // The reference gives IdentityCenterInstanceArn as "The Amazon Resource Name (ARN) of the IAM Identity Center + // instance to associate with the OpenID Connect (OIDC) provider": any other ARN is a value IAM does not take, + // so no provider is made on it, as none is under the name of a provider it might otherwise name. + String identityCenterInstance = getParam(params, "IdentityCenterInstanceArn"); + if (identityCenterInstance != null && !isIdentityCenterInstance(identityCenterInstance)) { + throw new AwsException("InvalidInput", + "IdentityCenterInstanceArn must be the ARN of an IAM Identity Center instance.", 400); + } OpenIDConnectProvider provider = iamService.createOpenIDConnectProvider( getParam(params, "Url"), getMemberList(params, "ClientIDList"), @@ -801,6 +809,16 @@ public class IamQueryHandler { return Response.ok(AwsQueryResponse.envelope("CreateOpenIDConnectProvider", AwsNamespaces.IAM, xml.build())).build(); } + /** Whether {@code arn} is an IAM Identity Center instance's ARN, {@code arn::sso:::instance/}. */ + private static boolean isIdentityCenterInstance(String arn) { + if (!AwsArnUtils.isArn(arn)) { + return false; + } + AwsArnUtils.Arn parsed = AwsArnUtils.parse(arn); + return "sso".equals(parsed.service()) && parsed.resource().startsWith("instance/") + && parsed.resource().length() > "instance/".length(); + } + // The response carries no ARN: AWS echoes back the scheme-less Url, and the caller already // knows the ARN it asked for. private Response handleGetOpenIDConnectProvider(MultivaluedMap params) { diff --git a/src/main/java/io/floci/aws/services/iam/IamService.java b/src/main/java/io/floci/aws/services/iam/IamService.java index 7627964967..29d23c6fd2 100644 --- a/src/main/java/io/floci/aws/services/iam/IamService.java +++ b/src/main/java/io/floci/aws/services/iam/IamService.java @@ -4504,6 +4504,31 @@ public class IamService implements SessionAccountLookup, ResourceProvider { .toList(); } + /** The user an SSH public key of that id belongs to, when one is stored, for callers that must not throw. */ + public Optional findSshPublicKeyOwner(String keyId) { + return keyId == null ? Optional.empty() : sshPublicKeys.get(keyId).map(SshPublicKey::getUserName); + } + + /** The user a service-specific credential of that id belongs to, when one is stored, without throwing. */ + public Optional findServiceSpecificCredentialOwner(String credentialId) { + return credentialId == null ? Optional.empty() + : serviceCredentials.get(credentialId).map(ServiceSpecificCredential::getUserName); + } + + /** + * The ARN of the service-linked role a deletion task of that id deleted, in the request's partition and account: + * the role's path and name as the id {@link #deleteServiceLinkedRole} minted holds them + * ({@code task/aws-service-role///}); empty when no such task is + * held. + */ + public Optional findServiceLinkedRoleDeletionArn(String deletionTaskId) { + if (deletionTaskId == null || serviceLinkedRoleDeletions.get(deletionTaskId).isEmpty()) { + return Optional.empty(); + } + String pathAndName = deletionTaskId.substring("task".length(), deletionTaskId.lastIndexOf('/')); + return Optional.of(regionResolver.buildGlobalArn("iam", "role" + pathAndName)); + } + // Service-specific credentials // ========================================================================= diff --git a/src/main/java/io/floci/aws/services/iam/IamStoredResourceArns.java b/src/main/java/io/floci/aws/services/iam/IamStoredResourceArns.java index c862fbdc5f..4c6162351d 100644 --- a/src/main/java/io/floci/aws/services/iam/IamStoredResourceArns.java +++ b/src/main/java/io/floci/aws/services/iam/IamStoredResourceArns.java @@ -1,7 +1,13 @@ package io.floci.aws.services.iam; import io.floci.aws.core.common.AwsArnUtils; +import io.floci.aws.core.common.RegionResolver; import io.floci.aws.core.common.StoredResourceArns; +import io.floci.aws.services.iam.model.IamGroup; +import io.floci.aws.services.iam.model.IamRole; +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 jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Instance; import jakarta.inject.Inject; @@ -10,24 +16,33 @@ import java.util.List; import java.util.Optional; /** - * What IAM asks of its own resources a request names: what a delegation request records, which is the owner - * the condition key the Service Reference publishes on that type is evaluated against. + * What IAM asks of its own resources a request names: the ARN a user, group, role, instance profile or server + * certificate a name names is stored under, its path included, which the name alone does not carry; the user an access + * key, an SSH public key or a service-specific credential belongs to; the role a service-linked role deletion task + * deleted; the user who signs a request; and what a delegation request records, which is the owner the condition key + * the Service Reference publishes on that type is evaluated against. * - *

The delegation store is reached through {@link DelegationRequestOwnership} rather than directly, as - * {@code IamService} reaches it, so the lookup does not tie IAM's enforcement to the service that holds - * the requests. + *

Both stores are reached lazily, through providers, rather than injected: the enforcement filter that asks is not a + * dependency of {@link IamService}, and the delegation store is reached through {@link DelegationRequestOwnership}, as + * {@code IamService} reaches it, so the lookup does not tie IAM's enforcement to the service that holds the requests. */ @ApplicationScoped public class IamStoredResourceArns implements StoredResourceArns { private static final String DELEGATION_REQUEST = "delegation-request/"; private static final String OWNER = "OwnerId"; + private static final String ROOT = ":root"; private final Instance delegationRequests; + private final Instance iamService; + private final RegionResolver regionResolver; @Inject - public IamStoredResourceArns(Instance delegationRequests) { + public IamStoredResourceArns(Instance delegationRequests, + Instance iamService, RegionResolver regionResolver) { this.delegationRequests = delegationRequests; + this.iamService = iamService; + this.regionResolver = regionResolver; } @Override @@ -35,10 +50,74 @@ public class IamStoredResourceArns implements StoredResourceArns { return "iam"; } - /** IAM's own ARNs carry the names a request gives, so there is no stored ARN to find behind one. */ + /** + * {@inheritDoc} + * + *

The caller's user, group, role, instance profile or server certificate of the one name given, as IAM stores + * it: the path it was created or moved under is part of its ARN ({@code user/team/alice}), which a request naming + * it by its name does not carry. + */ @Override public Optional find(String type, List names, String region) { - return Optional.empty(); + if (names.size() != 1 || iamService.isUnsatisfied()) { + return Optional.empty(); + } + IamService iam = iamService.get(); + String account = regionResolver.getAccountId(); + String name = names.getFirst(); + Optional arn = switch (type) { + case "user" -> iam.findUser(account, name).map(IamUser::getArn); + case "group" -> iam.findGroup(account, name).map(IamGroup::getArn); + case "role" -> iam.findRole(account, name).map(IamRole::getArn); + case "instance-profile" -> iam.findInstanceProfile(account, name).map(InstanceProfile::getArn); + case "server-certificate" -> iam.findServerCertificate(name).map(ServerCertificate::getArn); + default -> Optional.empty(); + }; + return arn.filter(stored -> !stored.isBlank()); + } + + /** + * {@inheritDoc} + * + *

The caller's user an access key ({@code AccessKeyId}), an SSH public key ({@code SSHPublicKeyId}) or a + * service-specific credential ({@code ServiceSpecificCredentialId}) belongs to, and the role a service-linked role + * deletion task ({@code DeletionTaskId}) deleted. An access key is read in the caller's account alone, so another + * account's key names no user of the caller's. + */ + @Override + public List through(String member, String value, String region) { + if (value == null || value.isBlank() || iamService.isUnsatisfied()) { + return List.of(); + } + IamService iam = iamService.get(); + Optional arn = switch (member) { + case "AccessKeyId" -> iam.findAccessKeyOwnerInThisAccount(value) + .flatMap(user -> find("user", List.of(user), region)); + case "SSHPublicKeyId" -> iam.findSshPublicKeyOwner(value) + .flatMap(user -> find("user", List.of(user), region)); + case "ServiceSpecificCredentialId" -> iam.findServiceSpecificCredentialOwner(value) + .flatMap(user -> find("user", List.of(user), region)); + case "DeletionTaskId" -> iam.findServiceLinkedRoleDeletionArn(value); + default -> Optional.empty(); + }; + return arn.stream().toList(); + } + + /** + * {@inheritDoc} + * + *

The stored user an IAM access key belongs to, or the account root's ARN for a key of the root, as the caller + * the key resolves to names it; empty for any other key, such as a role session's. + */ + @Override + public Optional signedBy(String accessKeyId) { + if (accessKeyId == null || iamService.isUnsatisfied()) { + return Optional.empty(); + } + IamService iam = iamService.get(); + Optional user = iam.findUserNameByAccessKeyId(accessKeyId) + .flatMap(name -> find("user", List.of(name), "")); + return user.isPresent() ? user : iam.resolveCallerArn(accessKeyId).filter(arn -> arn.endsWith(ROOT)); } /** 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 87b6bf70ba..3fe93ea9a5 100644 --- a/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java +++ b/src/main/java/io/floci/aws/services/iam/ResourceArnBuilder.java @@ -2,13 +2,9 @@ package io.floci.aws.services.iam; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import io.floci.aws.core.common.AwsArnUtils; -import io.floci.aws.core.common.AwsQueryServiceResolver; import io.floci.aws.core.common.AwsRegions; import io.floci.aws.core.common.RequestPathLabels; 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 jakarta.enterprise.context.ApplicationScoped; import jakarta.enterprise.inject.Instance; @@ -19,10 +15,8 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Optional; /** * Constructs the target resource ARN for a request so the policy evaluator @@ -34,25 +28,12 @@ import java.util.Optional; @ApplicationScoped public class ResourceArnBuilder { - - /** The only scheme IAM accepts on an OIDC provider URL, and the part its ARN drops. */ - private static final String OIDC_URL_SCHEME = "https://"; - - private static final String DELEGATION_REQUEST_RESOURCE = "delegation-request/"; - - /** What a service-linked role deletion task identifier starts with; see its resolver. */ - private static final String DELETION_TASK_PREFIX = "task" + ServiceLinkedRoles.PATH; - - private final ObjectMapper objectMapper; /** - * Looked up lazily through a provider: this builder is constructed by the enforcement filter, - * 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 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. + * Looked up lazily through a provider, 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: this builder is + * constructed by the enforcement filter, which the services themselves do not depend on, and a direct injection + * would close that loop. */ private final Instance storedResourceArns; /** @@ -62,26 +43,19 @@ public class ResourceArnBuilder { private final Instance requestPathLabels; @Inject - public ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService, - Instance storedResourceArns, + public ResourceArnBuilder(ObjectMapper objectMapper, Instance storedResourceArns, Instance requestPathLabels) { this.objectMapper = objectMapper; - this.iamService = iamService; this.storedResourceArns = storedResourceArns; this.requestPathLabels = requestPathLabels; } - public ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService, - Instance storedResourceArns) { - this(objectMapper, iamService, storedResourceArns, null); - } - - ResourceArnBuilder(ObjectMapper objectMapper, Instance iamService) { - this(objectMapper, iamService, null); + public ResourceArnBuilder(ObjectMapper objectMapper, Instance storedResourceArns) { + this(objectMapper, storedResourceArns, null); } public ResourceArnBuilder() { - this(new ObjectMapper(), null); + this(new ObjectMapper()); } public ResourceArnBuilder(ObjectMapper objectMapper) { @@ -110,21 +84,15 @@ public class ResourceArnBuilder { /** * The resources a request is checked against, {@code operation} the one it is dispatched as, as - * {@code :}: a namespace with no branch here is checked on the resources its request - * names for that operation (see {@link RequestResources}), and on {@code *} without one. + * {@code :}: the resources its request names for that operation (see + * {@link RequestResources}), and {@code *} without one. */ public List buildResources(String credentialScope, String operation, ContainerRequestContext ctx, String region, String accountId, String partition) { if (credentialScope == null) { return List.of("*"); } - if (operation != null && operation.startsWith(credentialScope + ":") && RequestResources.reads(operation)) { - return namedResources(credentialScope, operation, ctx, region, accountId, partition); - } - return switch (credentialScope) { - case "iam" -> buildIamArns(ctx, region, accountId); - default -> namedResources(credentialScope, operation, ctx, region, accountId, partition); - }; + return namedResources(credentialScope, operation, ctx, region, accountId, partition); } /** @@ -214,542 +182,6 @@ public class ResourceArnBuilder { return null; } - // ── IAM ───────────────────────────────────────────────────────────────────── - - /** A stored entity's ARN and path, the two things a target ARN is built from. */ - private record StoredEntity(String arn, String path) {} - - /** - * The request parameter carrying the name of the target, per resource type, for an action on a - * resource that already exists. - * - *

Which type an action is authorized against is not decided here: it comes per action from - * {@link IamActionResources}, which vendors AWS's own authorization metadata, because the - * resource an IAM action acts on is not in the request. {@code AddUserToGroup} carries a - * {@code UserName} and a {@code GroupName} and is authorized against the group, - * {@code AddRoleToInstanceProfile} carries a {@code RoleName} and is authorized against the - * instance profile, and the MFA actions that take a {@code SerialNumber} are authorized - * against the user that device belongs to. Keeping the type in vendored data and only the - * parameter here is what lets {@code make iam-action-resources-verify} check the half that is - * AWS's against AWS. - * - *

An action whose type is not in here, and which is not a create or one of the ARN-carrying - * actions, is evaluated against {@code *}. That is right for the types the reference gives - * actions Floci does not dispatch, which {@link #UNRESOLVED_TYPES} names. - */ - static final Map NAME_PARAMETERS = Map.of( - "user", "UserName", - "role", "RoleName", - "group", "GroupName", - "instance-profile", "InstanceProfileName", - "server-certificate", "ServerCertificateName"); - - /** - * The actions that create their target, with the parameter naming it. Their ARN is minted from - * the request rather than read back, since there is no stored record yet, and a create is - * checked against the {@code Path} it asks for, because reading a stored path would authorize - * a create into a path the policy does not name. - * - *

Keyed by action rather than by type because a create spells the name its own way: - * {@code CreateSAMLProvider} takes {@code Name} and {@code CreateOpenIDConnectProvider} takes - * {@code Url}, where the others take the type's usual parameter. The type itself still comes - * from the vendored metadata. - * - *

Package-private, as the other tables here are, so {@code IamActionResourcesTest} can - * work out which resource types this class covers instead of restating them, which is what - * catches both a create AWS gives no single type to mint and a type nothing resolves. - */ - static final Map CREATE_PARAMETERS = Map.of( - "CreateUser", "UserName", - "CreateRole", "RoleName", - "CreateGroup", "GroupName", - "CreateInstanceProfile", "InstanceProfileName", - "UploadServerCertificate", "ServerCertificateName", - "CreatePolicy", "PolicyName", - "CreateVirtualMFADevice", "VirtualMFADeviceName", - "CreateSAMLProvider", "Name", - "CreateOpenIDConnectProvider", "Url"); - - /** - * The resource types AWS gives IAM actions that Floci does not resolve, with why. Every one - * belongs to an action the handler does not dispatch, so there is no request to name a - * resource for. - * - *

Empty since {@code GetRoleTemplateVersion} was dispatched: {@code role-template} was the - * last entry and the action carries its ARN, so the type is resolved through - * {@link #IAM_ARN_PARAMETERS} like any other the request names. The map stays because the next - * action AWS publishes a type for arrives before Floci dispatches it. - * - *

Declared rather than implied so that a type which is neither resolved nor listed here - * fails a test naming it, instead of quietly putting that action back on {@code *}. The - * resolver's fallback for a type it does not know is the permissive answer, so a regeneration - * that introduces one is only visible if something asserts the set. - * - *

Package-private because the reason each entry gives is a claim about the handler, not - * about this class: {@code UnresolvedResourceTypesIntegrationTest} sends each of these actions - * and holds it to answering {@code UnsupportedOperation}. Dispatching one without resolving - * its type would leave it evaluated against {@code *}, which is the fail-open this class - * exists to close. - */ - static final Map UNRESOLVED_TYPES = Map.of(); - - /** - * The IAM actions whose target the request carries as an ARN, and the parameter holding it. - * Passed through rather than rebuilt: the ARN is the caller's own naming of the resource, and - * an action naming one that does not exist fails as {@code NoSuchEntity} regardless of what a - * policy says. - * - *

This is also the answer for every action AWS gives more than one resource type. The four - * that take a principal ARN are authorized against whichever of user, role or group that ARN - * names, and {@code DeleteVirtualMFADevice} against either {@code mfa} or {@code sms-mfa}, so - * the parameter is the resource and there is nothing to choose. - */ - static final Map IAM_ARN_PARAMETERS = iamArnParameters(); - - /** - * The actions resolved by a branch of their own in {@link #buildIamArns}, because what the - * request carries is not an IAM entity's name: a service principal for - * {@code CreateServiceLinkedRole}, an access key id for {@code GetAccessKeyLastUsed}, a - * deletion task id for {@code GetServiceLinkedRoleDeletionStatus}, an Organizations - * entity path for {@code GenerateOrganizationsAccessReport}, whose resource lives in another - * service's tree, and a request id for the six delegation actions that name one. - * - *

The resolver is the value rather than a branch elsewhere, so this cannot become a list - * that says an action is handled while the dispatch has nothing for it. The keys are also what - * {@code IamActionResourcesTest} reads to tell a type one of these covers from a type nothing - * resolves. - */ - // Map.ofEntries rather than Map.of: this map passed ten pairs when the forward action gained - // its resource, and Map.of has no overload beyond ten. - static final Map DERIVED_RESOLVERS = Map.ofEntries( - Map.entry("CreateServiceLinkedRole", ResourceArnBuilder::serviceLinkedRoleArn), - Map.entry("GetAccessKeyLastUsed", - (self, ctx, region, accountId) -> self.accessKeyOwnerArn(ctx, accountId)), - Map.entry("GetServiceLinkedRoleDeletionStatus", ResourceArnBuilder::deletionTaskRoleArn), - Map.entry("GenerateOrganizationsAccessReport", - ResourceArnBuilder::organizationsAccessReportArn), - Map.entry("AssociateDelegationRequest", ResourceArnBuilder::delegationRequestArn), - Map.entry("AcceptDelegationRequest", ResourceArnBuilder::delegationRequestArn), - Map.entry("RejectDelegationRequest", ResourceArnBuilder::delegationRequestArn), - Map.entry("GetDelegationRequest", ResourceArnBuilder::delegationRequestArn), - Map.entry("UpdateDelegationRequest", ResourceArnBuilder::delegationRequestArn), - Map.entry("SendDelegationToken", ResourceArnBuilder::delegationRequestArn), - Map.entry("GetHumanReadableSummary", ResourceArnBuilder::summarizedRequestArn)); - - /** How one of {@link #DERIVED_RESOLVERS} reads its resource out of the request. */ - interface DerivedResolver { - List resolve(ResourceArnBuilder self, ContainerRequestContext ctx, String region, - String accountId); - } - - /** - * The actions that rename or move their target, and the parameter carrying the new name. These - * name two resources, because AWS requires the principal to be allowed on both: UpdateUser's - * reference says the requester "must have appropriate permissions on both the source object - * and the target object", and UpdateGroup's that a principal allowed to update the old group - * but not the new one has the update fail. The filter authorizes a request once per resource, - * so naming both is what enforces it. - */ - private static final Map IAM_RENAME_PARAMETERS = Map.of( - "UpdateUser", "NewUserName", - "UpdateGroup", "NewGroupName", - "UpdateServerCertificate", "NewServerCertificateName"); - - private static Map iamArnParameters() { - Map parameters = new LinkedHashMap<>(); - arnParameter(parameters, "PolicyArn", - "CreatePolicyVersion", "DeletePolicy", "DeletePolicyVersion", "GetPolicy", - "GetPolicyVersion", "ListEntitiesForPolicy", "ListPolicyTags", "ListPolicyVersions", - "SetDefaultPolicyVersion", "TagPolicy", "UntagPolicy"); - arnParameter(parameters, "SerialNumber", - "DeleteVirtualMFADevice", "ListMFADeviceTags", "TagMFADevice", "UntagMFADevice"); - arnParameter(parameters, "SAMLProviderArn", - "DeleteSAMLProvider", "GetSAMLProvider", "ListSAMLProviderTags", "TagSAMLProvider", - "UntagSAMLProvider", "UpdateSAMLProvider"); - arnParameter(parameters, "OpenIDConnectProviderArn", - "AddClientIDToOpenIDConnectProvider", "DeleteOpenIDConnectProvider", - "GetOpenIDConnectProvider", "ListOpenIDConnectProviderTags", - "RemoveClientIDFromOpenIDConnectProvider", "TagOpenIDConnectProvider", - "UntagOpenIDConnectProvider", "UpdateOpenIDConnectProviderThumbprint"); - arnParameter(parameters, "Arn", - "GenerateServiceLastAccessedDetails", "ListPoliciesGrantingServiceAccess"); - arnParameter(parameters, "PolicySourceArn", - "GetContextKeysForPrincipalPolicy", "SimulatePrincipalPolicy"); - // AWS owns role templates, so the ARN names one in the aws account rather than the - // caller's, and it is still the resource the action is authorized against. - arnParameter(parameters, "TemplateArn", "GetRoleTemplateVersion"); - return Map.copyOf(parameters); - } - - private static void arnParameter(Map parameters, String parameter, - String... actions) { - for (String action : actions) { - parameters.put(action, parameter); - } - } - - /** - * The resource ARN an IAM action is evaluated against, so a policy statement naming one user, - * role, group, profile, policy, provider, MFA device or certificate binds to it and to nothing - * else. Everything this cannot name resolves to {@code *}, which is the permissive answer and - * the one AWS gives for the actions that take no resource. - * - *

The operation is resolved through {@link AwsQueryServiceResolver#action(String, String)}, - * so the legacy {@code Operation} parameter names the resource exactly as {@code Action} does. - * Reading {@code Action} alone would let a caller spell the operation the other way and have - * the request evaluated against {@code *}, skipping a deny that names the resource. - * - *

An action that defaults to the calling user when its {@code UserName} is omitted, as - * {@code GetUser} and {@code ChangePassword} do, resolves to that user: the access key id in - * the credential names the identity, and the stored ARN carries its path and partition. The - * wildcard stands only when the signer is not an IAM user, an account's root stand-in and a - * session credential having no user record to name. - */ - private List buildIamArns(ContainerRequestContext ctx, String region, - String accountId) { - String action = AwsQueryServiceResolver.action( - RequestBodyReader.formField(ctx, "Action"), - RequestBodyReader.formField(ctx, "Operation")); - if (action == null) { - return List.of("*"); - } - String arnParameter = IAM_ARN_PARAMETERS.get(action); - if (arnParameter != null) { - // Only an ARN is passed through. A hardware MFA device's SerialNumber is a bare serial - // rather than an ARN, and naming the request after it would produce a resource no - // policy can be written against. - String arn = RequestBodyReader.formField(ctx, arnParameter); - return arn == null || !AwsArnUtils.isArn(arn) ? List.of("*") : List.of(arn); - } - DerivedResolver derived = DERIVED_RESOLVERS.get(action); - if (derived != null) { - return derived.resolve(this, ctx, region, accountId); - } - String createParameter = CREATE_PARAMETERS.get(action); - if (createParameter != null) { - // A create names a resource that does not exist yet, so its ARN is minted from the - // request: the path it asks for, in the partition it is being created in. Reading a - // stored path here would authorize a create under /team/ against the root path. - String created = RequestBodyReader.formField(ctx, createParameter); - List createdTypes = IamActionResources.typesOf(action); - // One type is what there is to mint. A create AWS authorizes against none, or against - // several, has no single ARN to build, so the wildcard stands rather than the request - // failing on it; IamActionResourcesTest is what says so out loud. - if (created == null || created.isBlank() || createdTypes.size() != 1) { - return List.of("*"); - } - return List.of(mintedIamArn(createdTypes.get(0), created, ctx, region, accountId)); - } - // Everything else is an action on a resource that exists, named by name. Which type that - // is comes from AWS's own metadata, and the parameter the name arrives in comes from the - // type: an action AWS gives a type this resolver has no parameter for, or more than one - // type, is left at the wildcard rather than guessed at. - String resourceType = nameableType(action); - if (resourceType == null) { - return List.of("*"); - } - String name = RequestBodyReader.formField(ctx, NAME_PARAMETERS.get(resourceType)); - if (name == null || name.isBlank()) { - // Nineteen user actions make UserName optional, and AWS then acts on the user who - // signed the request, so that user is the resource the request names. Resolving it - // here is what lets a statement scoped to one user reach GetUser, ListAccessKeys and - // the rest when they are called the way the console calls them, with no UserName. - return "user".equals(resourceType) ? signingUserArn(ctx, accountId) : List.of("*"); - } - // Every other action acts on a resource that already exists, so the check uses that - // resource's own stored ARN instead of deriving one again. The stored ARN carries the path - // and, more to the point, the partition the resource was created in: a resource stays in - // its partition, so re-minting from the caller's signing region would name an ARN that no - // resource has and leave a deny on the real one unmatched. - Optional stored = storedIamEntity(resourceType, name, accountId); - if (stored.isEmpty()) { - // Without a stored role or a modelled Path member, the request names only the root path. - if ("role".equals(resourceType) && IamRequestShapes.hasMember(action, "RoleName") - && !IamRequestShapes.hasMember(action, "Path")) { - return List.of(AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, - "role/" + name).toString()); - } - return List.of("*"); - } - String storedArn = stored.get().arn(); - String renameParameter = IAM_RENAME_PARAMETERS.get(action); - if (renameParameter == null) { - return List.of(storedArn); - } - String renamed = renameTargetArn(ctx, stored.get(), resourceType, name, - renameParameter, region, accountId); - return storedArn.equals(renamed) ? List.of(storedArn) : List.of(storedArn, renamed); - } - - /** - * The ARN a rename or a move would produce, built beside the stored ARN so it keeps the - * resource's partition and account. Only the path and the name change, and taking the - * partition from the caller's signing region instead would name a resource in a partition the - * original does not live in. Returns the stored ARN unchanged when the request renames and - * moves nothing. - */ - private String renameTargetArn(ContainerRequestContext ctx, StoredEntity stored, - String resourceType, String name, String renameParameter, - String region, String accountId) { - String newName = RequestBodyReader.formField(ctx, renameParameter); - String newPath = RequestBodyReader.formField(ctx, "NewPath"); - String targetName = newName == null || newName.isBlank() ? name : newName; - String targetPath = newPath == null || newPath.isBlank() - ? normalizeArnPath(stored.path()) - : normalizeArnPath(newPath); - String partition = AwsArnUtils.partitionOrDefault(stored.arn(), - AwsRegions.partitionFor(region)); - String account = AwsArnUtils.accountOrDefault(stored.arn(), accountId); - return AwsArnUtils.Arn.global(partition, "iam", account, - resourceType + targetPath + targetName).toString(); - } - - /** - * The ARN of a resource the request is creating. IAM is global, so it carries no region, and - * it is minted in the request's partition rather than through a blank-region {@code Arn.of}, - * which would silently mean the commercial one. - */ - private String mintedIamArn(String resourceType, String name, ContainerRequestContext ctx, - String region, String accountId) { - String resource = switch (resourceType) { - // A SAML provider's ARN is its bare name and an OIDC provider's is its URL without - // the scheme, as IAM stores it. Neither format has a path, so Path is not read here. - case "saml-provider" -> "saml-provider/" + name; - case "oidc-provider" -> "oidc-provider/" + oidcProviderName(name); - default -> resourceType - + normalizeArnPath(RequestBodyReader.formField(ctx, "Path")) + name; - }; - return AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, resource) - .toString(); - } - - /** - * The delegation request a by-id action names. - * - *

Minted from the request rather than read back: the id is the whole resource name, with no - * path and no partition of its own to recover, and an id naming no request answers - * {@code NoSuchEntity} whatever a policy says. That is the same reasoning the ARN-carrying - * actions use, one step earlier, because this family passes an id where they pass an ARN. - * - *

{@code CreateDelegationRequest} is not here: IAM mints the id, so the request names no - * resource and the wildcard is the honest answer. {@code UpdateDelegationRequest} is here, - * which corrects what this note said before: the customer-side page "Managing Permissions for - * Delegation Requests" lists {@code iam:UpdateDelegationRequest} among the permissions an - * administrator grants, describing it as "Forward a delegation request to an administrator for - * approval", so it is an authorizable action and it names the request its id names, as its - * siblings do. - */ - private List delegationRequestArn(ContainerRequestContext ctx, String region, - String accountId) { - String id = RequestBodyReader.formField(ctx, "DelegationRequestId"); - if (id == null || id.isBlank()) { - return List.of("*"); - } - return List.of(delegationRequestArn(region, accountId, id)); - } - - /** - * The delegation request a summary is asked for, named by the ARN Floci mints rather than - * the one the caller spelled. - * - *

{@code GetHumanReadableSummary} is the one action of this family that takes an ARN, and - * the lookup reads only the request id out of it, deliberately: the id is what resolves a - * request across accounts. So the string as it arrived cannot be what the request is - * authorized against. A caller allowed by a wildcard and denied on one request could - * otherwise respell that request's ARN, under another account or another service, and miss - * the deny while still reading the summary. The id is lifted out and the canonical ARN is - * minted around it instead, which is the same ARN the five by-id actions resolve to. - * - *

A value that is no ARN, or an ARN naming anything but an IAM delegation request, leaves - * the wildcard standing: the service answers {@code NOT_SUPPORTED} or {@code InvalidInput} - * for those without reading a request at all. - */ - private List summarizedRequestArn(ContainerRequestContext ctx, String region, - String accountId) { - return AwsArnUtils - .resourceIfArnFor(RequestBodyReader.formField(ctx, "EntityArn"), "iam") - .filter(resource -> resource.startsWith(DELEGATION_REQUEST_RESOURCE)) - .map(resource -> resource.substring(DELEGATION_REQUEST_RESOURCE.length())) - .filter(id -> !id.isBlank()) - .map(id -> List.of(delegationRequestArn(region, accountId, id))) - .orElseGet(() -> List.of("*")); - } - - /** The ARN a delegation request carries, which is its id under the calling account. */ - private static String delegationRequestArn(String region, String accountId, String id) { - return AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, - DELEGATION_REQUEST_RESOURCE + id).toString(); - } - - /** An OIDC provider URL as its ARN carries it, which is the URL without its scheme. */ - private static String oidcProviderName(String url) { - return url.startsWith(OIDC_URL_SCHEME) ? url.substring(OIDC_URL_SCHEME.length()) : url; - } - - /** - * The role {@code CreateServiceLinkedRole} would create. Its name is not in the request: AWS - * derives it from {@code AWSServiceName}, so the table the create itself reads is read here - * too, and the path is the service-role path carrying the canonical principal. A service with - * no entry names no role, leaving nothing to authorize against but {@code *}. - */ - private List serviceLinkedRoleArn(ContainerRequestContext ctx, String region, - String accountId) { - String serviceName = RequestBodyReader.formField(ctx, "AWSServiceName"); - if (serviceName == null || serviceName.isBlank()) { - return List.of("*"); - } - Optional baseName = ServiceLinkedRoles.roleName(serviceName); - if (baseName.isEmpty()) { - return List.of("*"); - } - String suffix = RequestBodyReader.formField(ctx, "CustomSuffix"); - String roleName = baseName.get() - + (suffix == null || suffix.isBlank() ? "" : "_" + suffix); - String path = ServiceLinkedRoles.PATH + ServicePrincipals.canonical(serviceName) + "/"; - return List.of(AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, - "role" + path + roleName).toString()); - } - - /** - * The role {@code GetServiceLinkedRoleDeletionStatus} asks about. The request names no role, - * but the deletion task does: the action's own reference gives the identifier's format as - * {@code task/aws-service-role///}, which is the - * role's path and name with a prefix in front and a uuid behind, and that is the shape - * {@code DeleteServiceLinkedRole} mints. Derived rather than looked up because by the time - * this action is called the role is gone, so there is no stored ARN left to read. - */ - private List deletionTaskRoleArn(ContainerRequestContext ctx, String region, - String accountId) { - String taskId = RequestBodyReader.formField(ctx, "DeletionTaskId"); - if (taskId == null || !taskId.startsWith(DELETION_TASK_PREFIX)) { - return List.of("*"); - } - int uuidSeparator = taskId.lastIndexOf('/'); - if (uuidSeparator <= DELETION_TASK_PREFIX.length()) { - return List.of("*"); - } - String pathAndName = taskId.substring("task".length(), uuidSeparator); - return List.of(AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, - "role" + pathAndName).toString()); - } - - /** - * The user who owns the access key {@code GetAccessKeyLastUsed} asks about. The action is - * evaluated against a user, which is what the IAM User Guide's own {@code iam:*AccessKey*} - * example scopes to {@code user/${aws:username}}, but the request names only the key, so the - * owner is resolved from it. - */ - private List accessKeyOwnerArn(ContainerRequestContext ctx, String accountId) { - String accessKeyId = RequestBodyReader.formField(ctx, "AccessKeyId"); - if (accessKeyId == null || accessKeyId.isBlank() || iamService == null) { - return List.of("*"); - } - return iamService.get().findAccessKeyOwnerInThisAccount(accessKeyId) - .flatMap(userName -> storedIamEntity("user", userName, accountId)) - .map(stored -> List.of(stored.arn())) - .orElse(List.of("*")); - } - - /** - * The user who signed the request, for the actions whose {@code UserName} is optional. The - * credential's own key names the identity, which is the same lookup - * {@code GetAccessKeyLastUsed} makes on a key the request carries as a parameter. - * - *

The wildcard stands when the signer is not an IAM user: an account's root stand-in and a - * session credential have no user record, and AWS evaluates those against the identity they - * belong to rather than against a user ARN this resolver could mint. - */ - private List signingUserArn(ContainerRequestContext ctx, String accountId) { - if (iamService == null) { - return List.of("*"); - } - Optional accessKeyId = SigV4CredentialScope.accessKeyId(ctx.getHeaderString("Authorization")); - Optional> user = accessKeyId - .flatMap(key -> iamService.get().findUserNameByAccessKeyId(key)) - .flatMap(userName -> storedIamEntity("user", userName, accountId)) - .map(stored -> List.of(stored.arn())); - if (user.isPresent()) { - return user.get(); - } - // A caller that is the account root names the root user, which is what these actions act - // on when they are called with no UserName. AWS's own task policy for auditing root - // credentials is written against arn:aws:iam::*:root, so a privileged session calling - // GetUser or ListAccessKeys has to name that resource rather than the wildcard. - return accessKeyId.flatMap(key -> iamService.get().resolveCallerArn(key)) - .filter(arn -> arn.endsWith(":root")) - .map(List::of) - .orElse(List.of("*")); - } - - /** - * The report {@code GenerateOrganizationsAccessReport} would produce. The reference spells the - * type as {@code access-report/${EntityPath}}, so the resource is the Organizations entity - * path the request carries and there is no IAM {@code Path} to read: the slashes inside it are - * the organization's own tree, not an IAM path. - */ - private List organizationsAccessReportArn(ContainerRequestContext ctx, String region, - String accountId) { - String entityPath = RequestBodyReader.formField(ctx, "EntityPath"); - if (entityPath == null || entityPath.isBlank()) { - return List.of("*"); - } - return List.of(AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId, - "access-report/" + entityPath).toString()); - } - - /** A request's Path as it appears in an ARN: slash-delimited, defaulting to a bare slash. */ - private static String normalizeArnPath(String path) { - if (path == null || path.isBlank()) { - return "/"; - } - String normalized = path.startsWith("/") ? path : "/" + path; - return normalized.endsWith("/") ? normalized : normalized + "/"; - } - - /** - * The resource type an action names by name, or null when there is none to use: AWS gives the - * action no type, gives it more than one, or gives it a type this resolver has no name - * parameter for. More than one type always means the request carries an ARN, which the caller - * handles before reaching here. - */ - private static String nameableType(String action) { - List types = IamActionResources.typesOf(action); - if (types.size() != 1) { - return null; - } - String resourceType = types.get(0); - return NAME_PARAMETERS.containsKey(resourceType) ? resourceType : null; - } - - /** - * The stored resource of that name in this account, carrying its own ARN and path. Empty when - * the account holds none, or when the stored record has no ARN to read: the operation fails as - * {@code NoSuchEntity} either way, and minting an ARN for a resource that is not there would - * only offer a policy something to match. - */ - private Optional storedIamEntity(String resourceType, String name, - String accountId) { - if (iamService == null) { - return Optional.empty(); - } - IamService iam = iamService.get(); - Optional stored = switch (resourceType) { - case "user" -> iam.findUser(accountId, name) - .map(user -> new StoredEntity(user.getArn(), user.getPath())); - case "role" -> iam.findRole(accountId, name) - .map(role -> new StoredEntity(role.getArn(), role.getPath())); - case "group" -> iam.findGroup(accountId, name) - .map(group -> new StoredEntity(group.getArn(), group.getPath())); - case "instance-profile" -> iam.findInstanceProfile(accountId, name) - .map(profile -> new StoredEntity(profile.getArn(), profile.getPath())); - case "server-certificate" -> iam.findServerCertificate(name) - .map(certificate -> new StoredEntity(certificate.getArn(), - certificate.getPath())); - default -> Optional.empty(); - }; - return stored.filter(entity -> entity.arn() != null && !entity.arn().isBlank()); - } - /** * The ARN a shared tagging route acts on, read where its controller reads it: after {@code /tags/} or * {@code /v1/tags/} in the path; on {@code POST /tags}, the body's {@code resourceArn}; and on the other diff --git a/src/main/resources/aws/iam-request-resources.json b/src/main/resources/aws/iam-request-resources.json index 1eed65507a..d289c7f390 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", "dynamodbstreams"], "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": ["iam"], + "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", "dynamodbstreams"], "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"], "iam": ["iam", "iam-toolbox"], "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": [], "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}"}, "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}"}}, + "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}"}, "iam": {"access-report": "arn:${Partition}:iam::${Account}:access-report/${EntityPath}", "assumed-role": "arn:${Partition}:iam::${Account}:assumed-role/${RoleName}/${RoleSessionName}", "delegation-request": "arn:${Partition}:iam::${Account}:delegation-request/${DelegationRequestId}", "federated-user": "arn:${Partition}:iam::${Account}:federated-user/${UserName}", "group": "arn:${Partition}:iam::${Account}:group/${GroupNameWithPath}", "instance-profile": "arn:${Partition}:iam::${Account}:instance-profile/${InstanceProfileNameWithPath}", "mfa": "arn:${Partition}:iam::${Account}:mfa/${MfaTokenIdWithPath}", "oidc-provider": "arn:${Partition}:iam::${Account}:oidc-provider/${OidcProviderName}", "policy": "arn:${Partition}:iam::${Account}:policy/${PolicyNameWithPath}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "role-template": "arn:${Partition}:iam::aws:role-template/${AWSServicePrincipal}/${RoleTemplateName}:${RoleTemplateMajorVersion}", "saml-provider": "arn:${Partition}:iam::${Account}:saml-provider/${SamlProviderName}", "server-certificate": "arn:${Partition}:iam::${Account}:server-certificate/${CertificateNameWithPath}", "sms-mfa": "arn:${Partition}:iam::${Account}:sms-mfa/${MfaTokenIdWithPath}", "user": "arn:${Partition}:iam::${Account}:user/${UserNameWithPath}"}, "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/"]}, "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/"]}}, + "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/"]}, "iam": {"instance-profile": ["aws:ResourceTag/"], "mfa": ["aws:ResourceTag/"], "oidc-provider": ["aws:ResourceTag/"], "policy": ["aws:ResourceTag/"], "role": ["aws:ResourceTag/", "iam:ResourceTag/"], "saml-provider": ["aws:ResourceTag/"], "server-certificate": ["aws:ResourceTag/"], "user": ["aws:ResourceTag/", "iam: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"]}, @@ -703,7 +703,7 @@ "bedrock:ListRetrievalInstructions": {"action": "bedrock:ListRetrievalInstructions", "types": [], "resources": []}, "bedrock:ListSessions": {"action": "bedrock:ListSessions", "types": [], "resources": []}, "bedrock:ListTagsForResource": {"action": "bedrock:ListTagsForResource", "types": ["advanced-prompt-optimization-job", "agent", "agent-alias", "application-inference-profile", "async-invoke", "automated-reasoning-policy", "automated-reasoning-policy-version", "blueprint", "blueprint-optimization-invocation", "custom-model", "custom-model-deployment", "data-automation-invocation-job", "data-automation-library", "data-automation-library-ingestion-job", "data-automation-project", "evaluation-job", "flow", "flow-alias", "guardrail", "imported-model", "knowledge-base", "model-copy-job", "model-customization-job", "model-evaluation-job", "model-import-job", "model-invocation-job", "prompt", "prompt-router", "prompt-version", "provisioned-model", "retrieval-instruction", "session"], "resources": [{"types": ["application-inference-profile", "async-invoke", "automated-reasoning-policy", "automated-reasoning-policy-version", "custom-model", "custom-model-deployment", "evaluation-job", "guardrail", "imported-model", "model-customization-job", "model-evaluation-job", "model-import-job", "model-invocation-job", "prompt-router", "provisioned-model"], "arn": "resourceARN", "endpoint": "bedrock"}, {"types": ["agent", "agent-alias", "flow", "flow-alias", "knowledge-base", "prompt", "prompt-version", "retrieval-instruction"], "arn": "resourceArn", "endpoint": "bedrock-agent"}, {"types": ["session"], "arn": "resourceArn", "endpoint": "bedrock-agent-runtime"}, {"types": ["blueprint", "blueprint-optimization-invocation", "data-automation-library", "data-automation-library-ingestion-job", "data-automation-project"], "arn": "resourceARN", "endpoint": "bedrock-data-automation"}, {"types": ["data-automation-invocation-job"], "arn": "resourceARN", "endpoint": "bedrock-data-automation-runtime"}], "located": {"resourceArn": "{resourceArn}"}}, - "bedrock:ListTrustedAccessPrograms": {"action": "bedrock:ListTrustedAccessPrograms", "types": [], "resources": []}, + "bedrock:ListTrustedAccessPrograms": {"action": "bedrock:CallWithBearerToken", "types": [], "resources": []}, "bedrock:ListVpcConfigurations": {"action": "bedrock:ListVpcConfigurations", "types": [], "resources": []}, "bedrock:OptimizePrompt": {"action": "bedrock:OptimizePrompt", "types": [], "resources": []}, "bedrock:PrepareAgent": {"action": "bedrock:PrepareAgent", "types": ["agent"], "resources": [{"type": "agent", "fill": {"AgentId": "agentId"}}], "located": {"agentId": "{agentId}"}}, @@ -3570,6 +3570,189 @@ "guardduty:UpdateThreatEntitySet": {"action": "guardduty:UpdateThreatEntitySet", "types": ["threatentityset"], "resources": [{"type": "threatentityset", "fill": {"DetectorId": "DetectorId", "ThreatEntitySetId": "ThreatEntitySetId"}}], "located": {"DetectorId": "{DetectorId}", "ThreatEntitySetId": "{ThreatEntitySetId}"}}, "guardduty:UpdateThreatIntelSet": {"action": "guardduty:UpdateThreatIntelSet", "types": ["threatintelset"], "resources": [{"type": "threatintelset", "fill": {"DetectorId": "DetectorId", "ThreatIntelSetId": "ThreatIntelSetId"}}], "located": {"DetectorId": "{DetectorId}", "ThreatIntelSetId": "{ThreatIntelSetId}"}}, "guardduty:UpdateTrustedEntitySet": {"action": "guardduty:UpdateTrustedEntitySet", "types": ["trustedentityset"], "resources": [{"type": "trustedentityset", "fill": {"DetectorId": "DetectorId", "TrustedEntitySetId": "TrustedEntitySetId"}}], "located": {"DetectorId": "{DetectorId}", "TrustedEntitySetId": "{TrustedEntitySetId}"}}, + "iam:AcceptDelegationRequest": {"action": "iam:AcceptDelegationRequest", "types": ["delegation-request"], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:AcquireRole": {"action": "iam:AcquireRole", "types": [], "resources": []}, + "iam:AddClientIDToOpenIDConnectProvider": {"action": "iam:AddClientIDToOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:AddRoleToInstanceProfile": {"action": "iam:AddRoleToInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:AddUserToGroup": {"action": "iam:AddUserToGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:AssociateDelegationRequest": {"action": "iam:AssociateDelegationRequest", "types": ["delegation-request"], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:AttachGroupPolicy": {"action": "iam:AttachGroupPolicy", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:AttachRolePolicy": {"action": "iam:AttachRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:AttachUserPolicy": {"action": "iam:AttachUserPolicy", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ChangePassword": {"action": "iam:ChangePassword", "types": ["user"], "resources": [{"types": ["user"], "signer": true}]}, + "iam:CreateAccessKey": {"action": "iam:CreateAccessKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:CreateAccountAlias": {"action": "iam:CreateAccountAlias", "types": [], "resources": []}, + "iam:CreateDelegationRequest": {"action": "iam:CreateDelegationRequest", "types": ["delegation-request"], "resources": [{"types": ["delegation-request"], "arn": "Permissions.PolicyTemplateArn"}, {"type": "delegation-request", "fill": {}, "account": "OwnerAccountId"}]}, + "iam:CreateGroup": {"action": "iam:CreateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}, "path": "Path"}]}, + "iam:CreateInstanceProfile": {"action": "iam:CreateInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}, "path": "Path"}]}, + "iam:CreateLoginProfile": {"action": "iam:CreateLoginProfile", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:CreateOpenIDConnectProvider": {"action": "iam:CreateOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "IdentityCenterInstanceArn"}]}, + "iam:CreatePolicy": {"action": "iam:CreatePolicy", "types": ["policy"], "resources": [{"type": "policy", "fill": {"PolicyNameWithPath": "PolicyName"}, "path": "Path"}]}, + "iam:CreatePolicyVersion": {"action": "iam:CreatePolicyVersion", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:CreateRole": {"action": "iam:CreateRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}, "path": "Path"}]}, + "iam:CreateSAMLProvider": {"action": "iam:CreateSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "IdentityCenterInstanceArn"}, {"type": "saml-provider", "fill": {"SamlProviderName": "Name"}}]}, + "iam:CreateServiceLinkedRole": {"action": "iam:CreateServiceLinkedRole", "types": ["role"], "resources": [{"type": "role", "fill": {}}]}, + "iam:CreateServiceSpecificCredential": {"action": "iam:CreateServiceSpecificCredential", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:CreateUser": {"action": "iam:CreateUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}, "path": "Path"}]}, + "iam:CreateVirtualMFADevice": {"action": "iam:CreateVirtualMFADevice", "types": ["mfa"], "resources": [{"type": "mfa", "fill": {"MfaTokenIdWithPath": "VirtualMFADeviceName"}, "path": "Path"}]}, + "iam:DeactivateMFADevice": {"action": "iam:DeactivateMFADevice", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:DeleteAccessKey": {"action": "iam:DeleteAccessKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "AccessKeyId"}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:DeleteAccountAlias": {"action": "iam:DeleteAccountAlias", "types": [], "resources": []}, + "iam:DeleteAccountPasswordPolicy": {"action": "iam:DeleteAccountPasswordPolicy", "types": [], "resources": []}, + "iam:DeleteGroup": {"action": "iam:DeleteGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:DeleteGroupPolicy": {"action": "iam:DeleteGroupPolicy", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:DeleteInstanceProfile": {"action": "iam:DeleteInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:DeleteLoginProfile": {"action": "iam:DeleteLoginProfile", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:DeleteOpenIDConnectProvider": {"action": "iam:DeleteOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:DeletePolicy": {"action": "iam:DeletePolicy", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:DeletePolicyVersion": {"action": "iam:DeletePolicyVersion", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:DeleteRole": {"action": "iam:DeleteRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:DeleteRolePermissionsBoundary": {"action": "iam:DeleteRolePermissionsBoundary", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:DeleteRolePolicy": {"action": "iam:DeleteRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:DeleteSAMLProvider": {"action": "iam:DeleteSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:DeleteSSHPublicKey": {"action": "iam:DeleteSSHPublicKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "SSHPublicKeyId"}]}, + "iam:DeleteServerCertificate": {"action": "iam:DeleteServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}]}, + "iam:DeleteServiceLinkedRole": {"action": "iam:DeleteServiceLinkedRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:DeleteServiceSpecificCredential": {"action": "iam:DeleteServiceSpecificCredential", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "ServiceSpecificCredentialId"}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:DeleteSigningCertificate": {"action": "iam:DeleteSigningCertificate", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:DeleteUser": {"action": "iam:DeleteUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:DeleteUserPermissionsBoundary": {"action": "iam:DeleteUserPermissionsBoundary", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:DeleteUserPolicy": {"action": "iam:DeleteUserPolicy", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:DeleteVirtualMFADevice": {"action": "iam:DeleteVirtualMFADevice", "types": ["mfa", "sms-mfa"], "resources": [{"types": ["mfa", "sms-mfa"], "arn": "SerialNumber"}]}, + "iam:DetachGroupPolicy": {"action": "iam:DetachGroupPolicy", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:DetachRolePolicy": {"action": "iam:DetachRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:DetachUserPolicy": {"action": "iam:DetachUserPolicy", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:DisableOrganizationsRootCredentialsManagement": {"action": "iam:DisableOrganizationsRootCredentialsManagement", "types": [], "resources": []}, + "iam:DisableOrganizationsRootSessions": {"action": "iam:DisableOrganizationsRootSessions", "types": [], "resources": []}, + "iam:DisableOutboundWebIdentityFederation": {"action": "iam:DisableOutboundWebIdentityFederation", "types": [], "resources": []}, + "iam:EnableMFADevice": {"action": "iam:EnableMFADevice", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:EnableOrganizationsRootCredentialsManagement": {"action": "iam:EnableOrganizationsRootCredentialsManagement", "types": [], "resources": []}, + "iam:EnableOrganizationsRootSessions": {"action": "iam:EnableOrganizationsRootSessions", "types": [], "resources": []}, + "iam:EnableOutboundWebIdentityFederation": {"action": "iam:EnableOutboundWebIdentityFederation", "types": [], "resources": []}, + "iam:GenerateCredentialReport": {"action": "iam:GenerateCredentialReport", "types": [], "resources": []}, + "iam:GenerateOrganizationsAccessReport": {"action": "iam:GenerateOrganizationsAccessReport", "types": ["access-report"], "resources": [{"type": "access-report", "fill": {"EntityPath": "EntityPath"}}]}, + "iam:GenerateServiceLastAccessedDetails": {"action": "iam:GenerateServiceLastAccessedDetails", "types": ["group", "policy", "role", "user"], "resources": [{"types": ["group", "policy", "role", "user"], "arn": "Arn"}]}, + "iam:GetAccessKeyLastUsed": {"action": "iam:GetAccessKeyLastUsed", "types": ["user"], "resources": [{"types": ["user"], "through": "AccessKeyId"}]}, + "iam:GetAccountAuthorizationDetails": {"action": "iam:GetAccountAuthorizationDetails", "types": [], "resources": []}, + "iam:GetAccountPasswordPolicy": {"action": "iam:GetAccountPasswordPolicy", "types": [], "resources": []}, + "iam:GetAccountProperties": {"action": "iam:GetAccountProperties", "types": [], "resources": []}, + "iam:GetAccountSummary": {"action": "iam:GetAccountSummary", "types": [], "resources": []}, + "iam:GetContextKeysForCustomPolicy": {"action": "iam:GetContextKeysForCustomPolicy", "types": [], "resources": []}, + "iam:GetContextKeysForPrincipalPolicy": {"action": "iam:GetContextKeysForPrincipalPolicy", "types": ["group", "role", "user"], "resources": [{"types": ["group", "role", "user"], "arn": "PolicySourceArn"}]}, + "iam:GetCredentialReport": {"action": "iam:GetCredentialReport", "types": [], "resources": []}, + "iam:GetDelegationRequest": {"action": "iam:GetDelegationRequest", "types": ["delegation-request"], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:GetGroup": {"action": "iam:GetGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:GetGroupPolicy": {"action": "iam:GetGroupPolicy", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:GetHumanReadableSummary": {"action": "iam:GetHumanReadableSummary", "types": ["delegation-request"], "resources": [{"types": ["delegation-request"], "arn": "EntityArn"}]}, + "iam:GetInstanceProfile": {"action": "iam:GetInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:GetLoginProfile": {"action": "iam:GetLoginProfile", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:GetMFADevice": {"action": "iam:GetMFADevice", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:GetOpenIDConnectProvider": {"action": "iam:GetOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:GetOrganizationsAccessReport": {"action": "iam:GetOrganizationsAccessReport", "types": [], "resources": []}, + "iam:GetOutboundWebIdentityFederationInfo": {"action": "iam:GetOutboundWebIdentityFederationInfo", "types": [], "resources": []}, + "iam:GetPolicy": {"action": "iam:GetPolicy", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:GetPolicyVersion": {"action": "iam:GetPolicyVersion", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:GetRequestAuthorizationDetails": {"action": "iam:GetRequestAuthorizationDetails", "types": [], "resources": []}, + "iam:GetRequestAuthorizationPolicy": {"action": "iam:GetRequestAuthorizationPolicy", "types": [], "resources": []}, + "iam:GetRole": {"action": "iam:GetRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:GetRolePolicy": {"action": "iam:GetRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:GetRoleTemplateVersion": {"action": "iam:GetRoleTemplateVersion", "types": ["role-template"], "resources": [{"types": ["role-template"], "arn": "TemplateArn"}]}, + "iam:GetSAMLProvider": {"action": "iam:GetSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:GetSSHPublicKey": {"action": "iam:GetSSHPublicKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "SSHPublicKeyId"}]}, + "iam:GetServerCertificate": {"action": "iam:GetServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}]}, + "iam:GetServiceLastAccessedDetails": {"action": "iam:GetServiceLastAccessedDetails", "types": [], "resources": []}, + "iam:GetServiceLastAccessedDetailsWithEntities": {"action": "iam:GetServiceLastAccessedDetailsWithEntities", "types": [], "resources": []}, + "iam:GetServiceLinkedRoleDeletionStatus": {"action": "iam:GetServiceLinkedRoleDeletionStatus", "types": ["role"], "resources": [{"types": ["role"], "through": "DeletionTaskId"}]}, + "iam:GetUser": {"action": "iam:GetUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:GetUserPolicy": {"action": "iam:GetUserPolicy", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ListAccessKeys": {"action": "iam:ListAccessKeys", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ListAccountAliases": {"action": "iam:ListAccountAliases", "types": [], "resources": []}, + "iam:ListAttachedGroupPolicies": {"action": "iam:ListAttachedGroupPolicies", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:ListAttachedRolePolicies": {"action": "iam:ListAttachedRolePolicies", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:ListAttachedUserPolicies": {"action": "iam:ListAttachedUserPolicies", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ListDelegationRequests": {"action": "iam:ListDelegationRequests", "types": [], "resources": []}, + "iam:ListEntitiesForPolicy": {"action": "iam:ListEntitiesForPolicy", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:ListGroupPolicies": {"action": "iam:ListGroupPolicies", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:ListGroups": {"action": "iam:ListGroups", "types": [], "resources": []}, + "iam:ListGroupsForUser": {"action": "iam:ListGroupsForUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ListInstanceProfileTags": {"action": "iam:ListInstanceProfileTags", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:ListInstanceProfiles": {"action": "iam:ListInstanceProfiles", "types": [], "resources": []}, + "iam:ListInstanceProfilesForRole": {"action": "iam:ListInstanceProfilesForRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:ListMFADeviceTags": {"action": "iam:ListMFADeviceTags", "types": ["mfa"], "resources": [{"types": ["mfa"], "arn": "SerialNumber"}]}, + "iam:ListMFADevices": {"action": "iam:ListMFADevices", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ListOpenIDConnectProviderTags": {"action": "iam:ListOpenIDConnectProviderTags", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:ListOpenIDConnectProviders": {"action": "iam:ListOpenIDConnectProviders", "types": [], "resources": []}, + "iam:ListOrganizationsFeatures": {"action": "iam:ListOrganizationsFeatures", "types": [], "resources": []}, + "iam:ListPolicies": {"action": "iam:ListPolicies", "types": [], "resources": []}, + "iam:ListPoliciesGrantingServiceAccess": {"action": "iam:ListPoliciesGrantingServiceAccess", "types": ["group", "role", "user"], "resources": [{"types": ["group", "role", "user"], "arn": "Arn"}]}, + "iam:ListPolicyTags": {"action": "iam:ListPolicyTags", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:ListPolicyVersions": {"action": "iam:ListPolicyVersions", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:ListRolePolicies": {"action": "iam:ListRolePolicies", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:ListRoleTags": {"action": "iam:ListRoleTags", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:ListRoles": {"action": "iam:ListRoles", "types": [], "resources": []}, + "iam:ListSAMLProviderTags": {"action": "iam:ListSAMLProviderTags", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:ListSAMLProviders": {"action": "iam:ListSAMLProviders", "types": [], "resources": []}, + "iam:ListSSHPublicKeys": {"action": "iam:ListSSHPublicKeys", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ListServerCertificateTags": {"action": "iam:ListServerCertificateTags", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}]}, + "iam:ListServerCertificates": {"action": "iam:ListServerCertificates", "types": [], "resources": []}, + "iam:ListServiceSpecificCredentials": {"action": "iam:ListServiceSpecificCredentials", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ListSigningCertificates": {"action": "iam:ListSigningCertificates", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ListUserPolicies": {"action": "iam:ListUserPolicies", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ListUserTags": {"action": "iam:ListUserTags", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:ListUsers": {"action": "iam:ListUsers", "types": [], "resources": []}, + "iam:ListVirtualMFADevices": {"action": "iam:ListVirtualMFADevices", "types": [], "resources": []}, + "iam:PutAccountProperties": {"action": "iam:PutAccountProperties", "types": [], "resources": []}, + "iam:PutGroupPolicy": {"action": "iam:PutGroupPolicy", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:PutRolePermissionsBoundary": {"action": "iam:PutRolePermissionsBoundary", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:PutRolePolicy": {"action": "iam:PutRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:PutUserPermissionsBoundary": {"action": "iam:PutUserPermissionsBoundary", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:PutUserPolicy": {"action": "iam:PutUserPolicy", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:RejectDelegationRequest": {"action": "iam:RejectDelegationRequest", "types": ["delegation-request"], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:RemoveClientIDFromOpenIDConnectProvider": {"action": "iam:RemoveClientIDFromOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:RemoveRoleFromInstanceProfile": {"action": "iam:RemoveRoleFromInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:RemoveUserFromGroup": {"action": "iam:RemoveUserFromGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}]}, + "iam:ResetServiceSpecificCredential": {"action": "iam:ResetServiceSpecificCredential", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "ServiceSpecificCredentialId"}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:ResyncMFADevice": {"action": "iam:ResyncMFADevice", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:SendDelegationToken": {"action": "iam:SendDelegationToken", "types": ["delegation-request"], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:SetDefaultPolicyVersion": {"action": "iam:SetDefaultPolicyVersion", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:SetSecurityTokenServicePreferences": {"action": "iam:SetSecurityTokenServicePreferences", "types": [], "resources": []}, + "iam:SimulateCustomPolicy": {"action": "iam:SimulateCustomPolicy", "types": [], "resources": []}, + "iam:SimulatePrincipalPolicy": {"action": "iam:SimulatePrincipalPolicy", "types": ["group", "role", "user"], "resources": [{"types": ["group", "role", "user"], "arn": "CallerArn"}, {"types": ["group", "role", "user"], "arn": "PolicyExclusionList[].PolicyArn"}, {"types": ["group", "role", "user"], "arn": "PolicySourceArn"}, {"types": ["group", "role", "user"], "arn": "ResourceArns[]"}]}, + "iam:TagInstanceProfile": {"action": "iam:TagInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:TagMFADevice": {"action": "iam:TagMFADevice", "types": ["mfa"], "resources": [{"types": ["mfa"], "arn": "SerialNumber"}]}, + "iam:TagOpenIDConnectProvider": {"action": "iam:TagOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:TagPolicy": {"action": "iam:TagPolicy", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:TagRole": {"action": "iam:TagRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:TagSAMLProvider": {"action": "iam:TagSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:TagServerCertificate": {"action": "iam:TagServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}]}, + "iam:TagUser": {"action": "iam:TagUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:UntagInstanceProfile": {"action": "iam:UntagInstanceProfile", "types": ["instance-profile"], "resources": [{"type": "instance-profile", "fill": {"InstanceProfileNameWithPath": "InstanceProfileName"}}]}, + "iam:UntagMFADevice": {"action": "iam:UntagMFADevice", "types": ["mfa"], "resources": [{"types": ["mfa"], "arn": "SerialNumber"}]}, + "iam:UntagOpenIDConnectProvider": {"action": "iam:UntagOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:UntagPolicy": {"action": "iam:UntagPolicy", "types": ["policy"], "resources": [{"types": ["policy"], "arn": "PolicyArn"}]}, + "iam:UntagRole": {"action": "iam:UntagRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:UntagSAMLProvider": {"action": "iam:UntagSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:UntagServerCertificate": {"action": "iam:UntagServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}]}, + "iam:UntagUser": {"action": "iam:UntagUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:UpdateAccessKey": {"action": "iam:UpdateAccessKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "AccessKeyId"}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:UpdateAccountPasswordPolicy": {"action": "iam:UpdateAccountPasswordPolicy", "types": [], "resources": []}, + "iam:UpdateAssumeRolePolicy": {"action": "iam:UpdateAssumeRolePolicy", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:UpdateDelegationRequest": {"action": "iam:UpdateDelegationRequest", "types": [], "resources": [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}]}, + "iam:UpdateGroup": {"action": "iam:UpdateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}, {"type": "group", "fill": {"GroupNameWithPath": "NewGroupName"}, "path": "NewPath", "renames": "GroupName"}]}, + "iam:UpdateLoginProfile": {"action": "iam:UpdateLoginProfile", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:UpdateOpenIDConnectProvider": {"action": "iam:UpdateOpenIDConnectProvider", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "IdentityCenterInstanceArn"}, {"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:UpdateOpenIDConnectProviderThumbprint": {"action": "iam:UpdateOpenIDConnectProviderThumbprint", "types": ["oidc-provider"], "resources": [{"types": ["oidc-provider"], "arn": "OpenIDConnectProviderArn"}]}, + "iam:UpdateRole": {"action": "iam:UpdateRole", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:UpdateRoleDescription": {"action": "iam:UpdateRoleDescription", "types": ["role"], "resources": [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}]}, + "iam:UpdateSAMLProvider": {"action": "iam:UpdateSAMLProvider", "types": ["saml-provider"], "resources": [{"types": ["saml-provider"], "arn": "IdentityCenterInstanceArn"}, {"types": ["saml-provider"], "arn": "SAMLProviderArn"}]}, + "iam:UpdateSSHPublicKey": {"action": "iam:UpdateSSHPublicKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "SSHPublicKeyId"}]}, + "iam:UpdateServerCertificate": {"action": "iam:UpdateServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}}, {"type": "server-certificate", "fill": {"CertificateNameWithPath": "NewServerCertificateName"}, "path": "NewPath", "renames": "ServerCertificateName"}]}, + "iam:UpdateServiceSpecificCredential": {"action": "iam:UpdateServiceSpecificCredential", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "through": "ServiceSpecificCredentialId"}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:UpdateSigningCertificate": {"action": "iam:UpdateSigningCertificate", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, + "iam:UpdateUser": {"action": "iam:UpdateUser", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"type": "user", "fill": {"UserNameWithPath": "NewUserName"}, "path": "NewPath", "renames": "UserName"}]}, + "iam:UploadSSHPublicKey": {"action": "iam:UploadSSHPublicKey", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}]}, + "iam:UploadServerCertificate": {"action": "iam:UploadServerCertificate", "types": ["server-certificate"], "resources": [{"type": "server-certificate", "fill": {"CertificateNameWithPath": "ServerCertificateName"}, "path": "Path"}]}, + "iam:UploadSigningCertificate": {"action": "iam:UploadSigningCertificate", "types": ["user"], "resources": [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}, {"types": ["user"], "signer": true, "when": {"UserName": [null]}}]}, "inspector2:AssociateMember": {"action": "inspector2:AssociateMember", "types": [], "resources": []}, "inspector2:BatchAssociateCodeSecurityScanConfiguration": {"action": "inspector2:BatchAssociateCodeSecurityScanConfiguration", "types": [], "resources": []}, "inspector2:BatchDisassociateCodeSecurityScanConfiguration": {"action": "inspector2:BatchDisassociateCodeSecurityScanConfiguration", "types": [], "resources": []}, 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 be29afbc27..6f2cdcf4cf 100644 --- a/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java +++ b/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java @@ -559,7 +559,8 @@ class RequestResourceMembersTest { ArnFormat format = table.formats().get(namespace).get(type); String arn = example(format.format()); String account = resource.account() != null ? "111122223333" : "000000000000"; - String expected = resource.arn() != null || resource.through() != null || resource.byDefault() ? arn + String expected = resource.arn() != null || resource.through() != null || resource.byDefault() + || resource.signer() ? arn : expected(format.format(), resource, account) + (format.minted() ? "/*" : format.mintedSuffix() != null && resource.fill().size() == 1 ? format.mintedSuffix() : ""); @@ -567,7 +568,8 @@ class RequestResourceMembersTest { StringBuilder form = new StringBuilder("Action=" + name); Map values = resource.arn() != null ? Map.of(resource.arn(), arn) : resource.through() != null ? Map.of(resource.through(), "x") - : Stream.concat(resource.fill().values().stream(), resource.find().stream()).distinct() + : Stream.of(resource.fill().values().stream(), resource.find().stream(), + Stream.ofNullable(resource.renames())).flatMap(members -> members).distinct() .collect(Collectors.toMap(m -> m, m -> "x")); Map given = new LinkedHashMap<>(values); if (resource.account() != null) { @@ -599,13 +601,15 @@ class RequestResourceMembersTest { form.append('&').append(parameter).append('=').append(encoded(sent)); }); List named = operation.getValue().stream() - .filter(other -> (other == resource || named(other) || sharesAMember(other, given) + .filter(other -> (other == resource || named(other) && !other.signer() + || signedFor(other, given) || sharesAMember(other, given) || fillsFromTheArn(other, resource, type) || !other.find().isEmpty() && other.find().equals(resource.find()) && other.when().equals(resource.when()) && other.unless().equals(resource.unless())) && (other.endpoint() == null || resource.endpoint() == null || other.endpoint().equals(resource.endpoint()))) .flatMap(other -> other == resource ? inTheRequestsRegionToo(expected, resource).stream() + : other.signer() ? Stream.of(arn) : Stream.of(expected(table.formats().get(namespace).get(other.types().getFirst()) .format(), other, "000000000000", given.keySet()))) .distinct().toList(); @@ -714,6 +718,17 @@ class RequestResourceMembersTest { .map(other -> other.types().getFirst()).findFirst().orElse(resource.types().getFirst()); } + /** + * Whether a request giving these members names the user who signs it: the resource is that user, and every member + * it is named {@code when} is absent from them, as each value list holds absent as {@code ""}. + */ + private static boolean signedFor(Resource resource, Map given) { + Map values = given.entrySet().stream() + .collect(Collectors.toMap(entry -> entry.getKey().name(), Map.Entry::getValue, (a, b) -> a)); + return resource.signer() && resource.when().entrySet().stream() + .allMatch(member -> member.getValue().contains(values.getOrDefault(member.getKey(), ""))); + } + /** Whether every request of its operation names the resource: no member names it and no member's value selects it. */ private static boolean named(Resource resource) { return resource.arn() == null && resource.fill().isEmpty() && resource.find().isEmpty() @@ -721,11 +736,17 @@ class RequestResourceMembersTest { } /** - * A namespace's stored ARNs that find nothing, and give {@code arn} for whatever a request names a resource through - * and, when {@code defaults}, as the resource of any type the service acts on for a request naming none. + * A namespace's stored ARNs that find nothing, and give {@code arn} for whatever a request names a resource + * through, as the user whose key signs a request and, when {@code defaults}, as the resource of any type the + * service acts on for a request naming none. */ private static StoredResourceArns runningOn(String namespace, String arn, boolean defaults) { return new StoredResourceArns() { + @Override + public Optional signedBy(String accessKeyId) { + return Optional.of(arn); + } + @Override public Optional findDefault(String type, String region) { return defaults ? Optional.of(arn) : Optional.empty(); @@ -946,6 +967,8 @@ class RequestResourceMembersTest { when(request.getMethod()).thenReturn("POST"); when(request.getMediaType()).thenReturn(MediaType.valueOf(mediaType)); when(request.getEntityStream()).thenAnswer(invocation -> new ByteArrayInputStream(bytes)); + when(request.getHeaderString("Authorization")) + .thenReturn("AWS4-HMAC-SHA256 Credential=AKIAEXAMPLE/20261123/us-east-1/iam/aws4_request"); return request; } } diff --git a/src/test/java/io/floci/aws/services/iam/IamActionResourcesTest.java b/src/test/java/io/floci/aws/services/iam/IamActionResourcesTest.java index 94f0658639..e6aafe6d4b 100644 --- a/src/test/java/io/floci/aws/services/iam/IamActionResourcesTest.java +++ b/src/test/java/io/floci/aws/services/iam/IamActionResourcesTest.java @@ -7,8 +7,6 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.TreeSet; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -75,84 +73,6 @@ class IamActionResourcesTest { formats.get("user")); } - @Test - void everyCreateIsAuthorizedAgainstExactlyOneResourceType() { - // A create has nothing to read the resource off, so ResourceArnBuilder mints the ARN from - // the type AWS gives the action. One type is what lets it mint without being told which, - // and two would leave it picking. Iterated rather than restated: a create added to the - // resolver that AWS gives no single type falls back to the wildcard, which is the - // permissive answer and a silent one, so this is what says it out loud. - for (String create : ResourceArnBuilder.CREATE_PARAMETERS.keySet()) { - assertEquals(1, IamActionResources.typesOf(create).size(), - create + " is no longer authorized against exactly one resource type, so " - + "there is no single ARN for it to mint: " - + IamActionResources.typesOf(create)); - } - } - - @Test - void anArnSpellsTheResourceTypeInFrontOfTheName() { - // What minting assumes. ResourceArnBuilder builds `:/`, which holds only - // while AWS spells that type's ARN the same way, and the reference publishes the format, - // so the assumption is checked rather than carried. - for (Map.Entry> entry : IamActionResources.arnFormats().entrySet()) { - for (String arnFormat : entry.getValue()) { - assertTrue(arnFormat.contains(":" + entry.getKey() + "/"), - "AWS spells a " + entry.getKey() + " ARN as " + arnFormat - + ", which this resolver's minting does not match"); - } - } - } - - @Test - void everyResourceTypeInUseIsOneTheResolverCoversOrDeclaresUnresolved() { - // Read off the resolver's own tables rather than restated, so a type cannot be waved - // through by adding it to a list in this file. The resolver answers `*` for a type it - // does not know, which is the permissive answer and a silent one. - Set covered = new TreeSet<>(ResourceArnBuilder.NAME_PARAMETERS.keySet()); - covered.addAll(ResourceArnBuilder.UNRESOLVED_TYPES.keySet()); - for (String action : ResourceArnBuilder.IAM_ARN_PARAMETERS.keySet()) { - covered.addAll(IamActionResources.typesOf(action)); - } - for (String action : ResourceArnBuilder.CREATE_PARAMETERS.keySet()) { - covered.addAll(IamActionResources.typesOf(action)); - } - for (String action : ResourceArnBuilder.DERIVED_RESOLVERS.keySet()) { - covered.addAll(IamActionResources.typesOf(action)); - } - for (Map.Entry> entry : IamActionResources.all().entrySet()) { - for (String resourceType : entry.getValue()) { - assertTrue(covered.contains(resourceType), "AWS authorizes " + entry.getKey() - + " against '" + resourceType + "', which ResourceArnBuilder neither " - + "resolves nor lists as unresolved, so the action falls back to *"); - } - } - } - - @Test - void theResourceTypesInUseAreTheOnesTheResolverKnowsAbout() { - // The upstream half of the same question: which types AWS uses at all. The test above - // catches a type nothing resolves; this one catches AWS changing the set, including a - // type disappearing, which leaves a dead entry behind rather than a gap. - Set inUse = new TreeSet<>(); - IamActionResources.all().values().forEach(inUse::addAll); - assertEquals(Set.of( - // Named by a parameter the resolver reads. - "user", "role", "group", "instance-profile", "server-certificate", - // Named by an ARN the request carries, or minted by a create. - "policy", "mfa", "sms-mfa", "saml-provider", "oidc-provider", - // Named by a parameter that is not an IAM entity name. - "access-report", - // Derived from an id the request carries. - "delegation-request", - // Named by an ARN the request carries, in the aws account rather than the - // caller's. - "role-template"), - inUse, - "AWS has changed which resource types IAM actions are authorized against; " - + "teach ResourceArnBuilder the new one or list it as unresolved"); - } - @Test void aMapMissingItsActionsIsABuildDefect() { assertThrows(IllegalStateException.class, () -> parse("{\"resourceArnFormats\":{}}")); diff --git a/src/test/java/io/floci/aws/services/iam/IamOpenIDConnectProviderIntegrationTest.java b/src/test/java/io/floci/aws/services/iam/IamOpenIDConnectProviderIntegrationTest.java index 58239dbc62..4e17e5dadc 100644 --- a/src/test/java/io/floci/aws/services/iam/IamOpenIDConnectProviderIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/iam/IamOpenIDConnectProviderIntegrationTest.java @@ -207,6 +207,33 @@ class IamOpenIDConnectProviderIntegrationTest { .body("ErrorResponse.Error.Code", equalTo("ValidationError")); } + /** + * IdentityCenterInstanceArn names an IAM Identity Center instance; the ARN of a provider there is refused, and no + * provider is made for the request's Url. + */ + @Test + @Order(9) + void anIdentityCenterInstanceArnNamingAnythingElseIsRejected() { + given() + .formParam("Action", "CreateOpenIDConnectProvider") + .formParam("Url", "https://oidc.example.com/id/spoofed") + .formParam("IdentityCenterInstanceArn", providerArn) + .header("Authorization", IAM_CREDENTIAL) + .when() + .post("/") + .then() + .statusCode(400) + .body("ErrorResponse.Error.Code", equalTo("InvalidInput")); + given() + .formParam("Action", "GetOpenIDConnectProvider") + .formParam("OpenIDConnectProviderArn", providerArn.replace(OIDC_HOST, "oidc.example.com/id/spoofed")) + .header("Authorization", IAM_CREDENTIAL) + .when() + .post("/") + .then() + .statusCode(404); + } + @Test @Order(10) void deleteOpenIDConnectProvider() { diff --git a/src/test/java/io/floci/aws/services/iam/IamStoredResourceArnsTest.java b/src/test/java/io/floci/aws/services/iam/IamStoredResourceArnsTest.java new file mode 100644 index 0000000000..613451f293 --- /dev/null +++ b/src/test/java/io/floci/aws/services/iam/IamStoredResourceArnsTest.java @@ -0,0 +1,104 @@ +package io.floci.aws.services.iam; + +import io.floci.aws.core.common.RegionResolver; +import io.floci.aws.core.common.SshPublicKeys; +import io.floci.aws.core.storage.InMemoryStorage; +import io.floci.aws.services.iam.model.IamRole; +import jakarta.enterprise.inject.Instance; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.security.KeyPairGenerator; +import java.security.interfaces.RSAPublicKey; +import java.util.List; +import java.util.Optional; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** + * What IAM gives the request-resources table of its own resources: the ARN a name names, path included, the user a key + * or a credential belongs to, the role a deletion task deleted and the user who signs a request. + */ +class IamStoredResourceArnsTest { + + private static final String ACCOUNT = "000000000000"; + private static final String TRUST_POLICY = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\"," + + "\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}"; + + private IamService iam; + private IamStoredResourceArns stored; + + @BeforeEach + void setUp() { + iam = new IamService( + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new InMemoryStorage<>(), new InMemoryStorage<>(), + new InMemoryStorage<>(), new RegionResolver("us-east-1", ACCOUNT), false, null); + @SuppressWarnings("unchecked") + Instance service = mock(Instance.class); + when(service.get()).thenReturn(iam); + @SuppressWarnings("unchecked") + Instance delegations = mock(Instance.class); + when(delegations.isUnsatisfied()).thenReturn(true); + stored = new IamStoredResourceArns(delegations, service, new RegionResolver("us-east-1", ACCOUNT)); + } + + @Test + void aNameNamesTheArnItIsStoredUnderPathIncluded() { + iam.createUser("bob", "/team/"); + iam.createRole("app", "/service-role/", TRUST_POLICY, null, 0, null); + assertEquals(Optional.of("arn:aws:iam::000000000000:user/team/bob"), stored.find("user", List.of("bob"), "")); + assertEquals(Optional.of("arn:aws:iam::000000000000:role/service-role/app"), + stored.find("role", List.of("app"), "")); + assertEquals(Optional.empty(), stored.find("user", List.of("alice"), "")); + assertEquals(Optional.empty(), stored.find("policy", List.of("bob"), "")); + } + + @Test + void aKeyOrACredentialNamesTheUserItBelongsTo() { + iam.createUser("bob", "/team/"); + String bob = "arn:aws:iam::000000000000:user/team/bob"; + String accessKey = iam.createAccessKey("bob").getAccessKeyId(); + String sshKey = iam.uploadSshPublicKey("bob", SshPublicKeys.toOpenSsh(generated())).getSshPublicKeyId(); + String credential = iam.createServiceSpecificCredential("bob", "codecommit.amazonaws.com", null) + .getServiceSpecificCredentialId(); + assertEquals(List.of(bob), stored.through("AccessKeyId", accessKey, "")); + assertEquals(List.of(bob), stored.through("SSHPublicKeyId", sshKey, "")); + assertEquals(List.of(bob), stored.through("ServiceSpecificCredentialId", credential, "")); + assertEquals(List.of(), stored.through("AccessKeyId", "AKIANOTHELD", "")); + assertEquals(List.of(), stored.through("UserName", "bob", "")); + } + + @Test + void aDeletionTaskNamesTheRoleItDeleted() { + IamRole role = iam.createServiceLinkedRole("es.amazonaws.com", null, null); + String task = iam.deleteServiceLinkedRole(role.getRoleName()); + assertEquals(List.of(role.getArn()), stored.through("DeletionTaskId", task, "")); + assertEquals(List.of(), stored.through("DeletionTaskId", "task/aws-service-role/es.amazonaws.com/x/y", "")); + } + + @Test + void aSigningKeyNamesItsUser() { + iam.createUser("bob", "/team/"); + String accessKey = iam.createAccessKey("bob").getAccessKeyId(); + assertEquals(Optional.of("arn:aws:iam::000000000000:user/team/bob"), stored.signedBy(accessKey)); + assertEquals(Optional.empty(), stored.signedBy("AKIANOTHELD")); + } + + private static RSAPublicKey generated() { + try { + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + return (RSAPublicKey) generator.generateKeyPair().getPublic(); + } catch (Exception e) { + throw new IllegalStateException("could not generate a key", e); + } + } +} 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 10be0183c1..a455b3a7a6 100644 --- a/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java +++ b/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java @@ -87,6 +87,8 @@ class ResourceArnBuilderTest { private UriInfo uriInfo; private MultivaluedMap queryParams; private Map contextProperties; + /** The form {@link #setFormBody} last sent, whose {@code Action} or {@code Operation} is what IAM dispatches. */ + private String sentForm; @ParameterizedTest @CsvSource({"aws,us-east-1", "aws-us-gov,us-gov-west-1", "aws-cn,cn-north-1"}) @@ -124,6 +126,7 @@ class ResourceArnBuilderTest { /** Query-protocol services carry their parameters in a form body, as IAM does. */ private void setFormBody(String form) { + sentForm = form; contextProperties.clear(); byte[] bytes = form.getBytes(StandardCharsets.UTF_8); ByteArrayInputStream in = new ByteArrayInputStream(bytes); @@ -183,18 +186,21 @@ class ResourceArnBuilderTest { stored.setArn(arn); IamService service = mock(IamService.class); when(service.findServerCertificate(name)).thenReturn(Optional.of(stored)); - @SuppressWarnings("unchecked") - Instance instance = mock(Instance.class); - when(instance.get()).thenReturn(service); - return new ResourceArnBuilder(new ObjectMapper(), instance); + return backedBy(service); } - /** A builder reading {@code service}, for the actions that name a resource that exists. */ + /** + * A builder reading {@code service} through IAM's stored ARNs, as the filter's does, for the actions that name a + * resource that exists. + */ private static ResourceArnBuilder backedBy(IamService service) { @SuppressWarnings("unchecked") Instance instance = mock(Instance.class); when(instance.get()).thenReturn(service); - return new ResourceArnBuilder(new ObjectMapper(), instance); + @SuppressWarnings("unchecked") + Instance delegations = mock(Instance.class); + when(delegations.isUnsatisfied()).thenReturn(true); + return reading(new IamStoredResourceArns(delegations, instance, new RegionResolver("us-east-1", ACCOUNT))); } private static IamService storeHolding(String userName, String path, String arn) { @@ -210,7 +216,28 @@ class ResourceArnBuilderTest { /** The ARN the builder gives for the request in {@code form}, with one resource expected. */ private String resourceOf(ResourceArnBuilder resourceArnBuilder, String form) { setFormBody(form); - return resourceArnBuilder.build("iam", ctx, "us-east-1", ACCOUNT); + return iamResource(resourceArnBuilder, "us-east-1", ACCOUNT); + } + + /** The first of {@link #iamResources}, as the filter's single resource. */ + private String iamResource(ResourceArnBuilder resourceArnBuilder, String region, String account) { + return iamResources(resourceArnBuilder, region, account).getFirst(); + } + + /** + * The resources the builder gives the IAM request set up, in the request's partition, for the operation IAM + * dispatches it as: the form's {@code Action}, or its legacy {@code Operation}, or else the query's. + */ + private List iamResources(ResourceArnBuilder resourceArnBuilder, String region, String account) { + String action = queryParams.getFirst("Action"); + for (String parameter : sentForm == null ? new String[0] : sentForm.split("&")) { + if (parameter.startsWith("Action=") || parameter.startsWith("Operation=")) { + action = parameter.substring(parameter.indexOf('=') + 1); + break; + } + } + return resourceArnBuilder.buildResources("iam", "iam:" + action, ctx, region, account, + AwsRegions.partitionFor(region)); } /** @@ -251,22 +278,19 @@ class ResourceArnBuilderTest { @Test void iamNamesTheDelegationRequestABlockOfActionsActsOn() { String id = "dr-0123456789abcdef01234567"; - // The forward is in this block now. AWS's "Managing Permissions for Delegation Requests" - // lists iam:UpdateDelegationRequest among the permissions an administrator grants, as - // "Forward a delegation request to an administrator for approval", so it is authorizable - // and names the request its id names, where this suite used to pin it at the wildcard on - // the belief that AWS published no action for it. + // The forward is one of them: the Service Reference does not list it, and its API reference says "that owner + // gets a default permission to update the delegation request" its DelegationRequestId names. for (String action : List.of("AssociateDelegationRequest", "AcceptDelegationRequest", - "RejectDelegationRequest", "GetDelegationRequest", "UpdateDelegationRequest")) { + "RejectDelegationRequest", "GetDelegationRequest", "SendDelegationToken", "UpdateDelegationRequest")) { assertEquals("arn:aws:iam::000000000000:delegation-request/" + id, resourceOf(builder, "Action=" + action + "&DelegationRequestId=" + id), action); } } @Test - void iamLeavesADelegationRequestItIsAboutToMintAtTheWildcard() { - // IAM assigns the id, so the create names no resource to authorize against. - assertEquals("*", resourceOf(builder, + void iamLeavesTheIdOfADelegationRequestItIsAboutToMintOpen() { + // IAM assigns the id, so the create is checked on a request of any id. + assertEquals("arn:aws:iam::000000000000:delegation-request/*", resourceOf(builder, "Action=CreateDelegationRequest&Description=d&RequestorWorkflowId=w")); } @@ -353,7 +377,7 @@ class ResourceArnBuilderTest { void iamMintsACreateInTheRequestsPartition() { setFormBody("Action=CreateUser&UserName=bob"); assertEquals("arn:aws-cn:iam::000000000000:user/bob", - builder.build("iam", ctx, "cn-north-1", ACCOUNT)); + iamResource(builder, "cn-north-1", ACCOUNT)); } /** @@ -388,17 +412,37 @@ class ResourceArnBuilderTest { } /** - * A SAML provider's ARN is its bare name and an OIDC provider's is its URL without the - * scheme, neither of which carries a path. Minting them the way the pathed types are minted - * would name resources that do not exist. + * {@code SimulatePrincipalPolicy} is checked on each user, role or group its request names by ARN, as the table + * reads every member holding an ARN of a type the action acts on: its {@code PolicySourceArn}, and a + * {@code CallerArn} or {@code ResourceArns} entry naming one too. A resource of another service there names nothing + * of IAM's, so a simulation of S3 objects is checked on its source principal alone. */ @Test - void iamMintsProviderArnsWithoutAPath() { + void iamChecksASimulationOnEachPrincipalItsRequestNames() { + String alice = "arn:aws:iam::000000000000:user/alice"; + String bob = "arn:aws:iam::000000000000:user/bob"; + setFormBody("Action=SimulatePrincipalPolicy&ActionNames.member.1=s3%3AGetObject" + + "&PolicySourceArn=" + URLEncoder.encode(alice, StandardCharsets.UTF_8) + + "&ResourceArns.member.1=" + URLEncoder.encode(bob, StandardCharsets.UTF_8) + + "&ResourceArns.member.2=arn%3Aaws%3As3%3A%3A%3Abucket%2Fkey"); + assertEquals(List.of(alice, bob), iamResources(builder, "us-east-1", ACCOUNT)); + setFormBody("Action=SimulatePrincipalPolicy&ActionNames.member.1=s3%3AGetObject" + + "&PolicySourceArn=" + URLEncoder.encode(alice, StandardCharsets.UTF_8) + + "&ResourceArns.member.1=arn%3Aaws%3As3%3A%3A%3Abucket%2Fkey"); + assertEquals(List.of(alice), iamResources(builder, "us-east-1", ACCOUNT)); + } + + /** + * A SAML provider's ARN is its bare name, which carries no path. An OIDC provider's is its URL without the scheme, + * which no source the table reads says of the request's {@code Url}, so that create names nothing and is checked + * on {@code *}. + */ + @Test + void iamNamesASamlProviderByItsNameAndAnOidcCreateByNothing() { assertEquals("arn:aws:iam::000000000000:saml-provider/corp", resourceOf(builder, "Action=CreateSAMLProvider&Name=corp")); - assertEquals("arn:aws:iam::000000000000:oidc-provider/example.com/app", - resourceOf(builder, "Action=CreateOpenIDConnectProvider" - + "&Url=https%3A%2F%2Fexample.com%2Fapp")); + assertEquals("*", resourceOf(builder, "Action=CreateOpenIDConnectProvider" + + "&Url=https%3A%2F%2Fexample.com%2Fapp")); } /** @@ -411,8 +455,7 @@ class ResourceArnBuilderTest { String userArn = "arn:aws:iam::000000000000:user/bob"; setFormBody("Action=UpdateUser&UserName=bob&NewUserName=robert"); assertEquals(List.of(userArn, "arn:aws:iam::000000000000:user/robert"), - backedBy(storeHolding("bob", "/", userArn)) - .buildResources("iam", ctx, "us-east-1", ACCOUNT)); + iamResources(backedBy(storeHolding("bob", "/", userArn)), "us-east-1", ACCOUNT)); String groupArn = "arn:aws:iam::000000000000:group/managers"; IamGroup group = new IamGroup(); @@ -423,31 +466,17 @@ class ResourceArnBuilderTest { when(store.findGroup(ACCOUNT, "managers")).thenReturn(Optional.of(group)); setFormBody("Action=UpdateGroup&GroupName=managers&NewGroupName=mgrs"); assertEquals(List.of(groupArn, "arn:aws:iam::000000000000:group/mgrs"), - backedBy(store).buildResources("iam", ctx, "us-east-1", ACCOUNT)); + iamResources(backedBy(store), "us-east-1", ACCOUNT)); } /** - * {@code CreateServiceLinkedRole} does not name the role it creates. AWS derives it from - * {@code AWSServiceName}, so the same table the create reads gives the name, and the role - * sits under the service-role path carrying the canonical principal. + * {@code CreateServiceLinkedRole} does not name the role it creates: AWS derives it from {@code AWSServiceName}, + * which no source the table reads says, so the create is checked on a role with its path and name open. */ @Test - void iamNamesTheRoleAServiceLinkedCreateWouldMint() { - assertEquals("arn:aws:iam::000000000000:role/aws-service-role/autoscaling.amazonaws.com/" - + "AWSServiceRoleForAutoScaling", - resourceOf(builder, "Action=CreateServiceLinkedRole" - + "&AWSServiceName=autoscaling.amazonaws.com")); - // A suffix is part of the name AWS mints, so it is part of the resource too. - assertEquals("arn:aws:iam::000000000000:role/aws-service-role/autoscaling.amazonaws.com/" - + "AWSServiceRoleForAutoScaling_fleet", - resourceOf(builder, "Action=CreateServiceLinkedRole" - + "&AWSServiceName=autoscaling.amazonaws.com&CustomSuffix=fleet")); - // A principal the table does not carry keeps the derived name, which is what the create - // mints for it: the two read the same table, so the check cannot name a different role. - assertEquals("arn:aws:iam::000000000000:role/aws-service-role/es.amazonaws.com/" - + "AWSServiceRoleForEs", - resourceOf(builder, - "Action=CreateServiceLinkedRole&AWSServiceName=es.amazonaws.com")); + void iamChecksAServiceLinkedCreateOnAnyRole() { + assertEquals("arn:aws:iam::000000000000:role/*", resourceOf(builder, "Action=CreateServiceLinkedRole" + + "&AWSServiceName=autoscaling.amazonaws.com&CustomSuffix=fleet")); } /** @@ -487,7 +516,7 @@ class ResourceArnBuilderTest { iam.createUser("worker", "/"); setFormBody("Action=GetAccessKeyLastUsed&AccessKeyId=AKIALEGACYEXAMPLE"); - assertEquals(List.of("*"), backedBy(iam).buildResources("iam", ctx, "us-east-1", stranger)); + assertEquals(List.of("*"), iamResources(backedBy(iam), "us-east-1", stranger)); assertTrue(raw.get("AKIALEGACYEXAMPLE").isPresent(), "the lookup must leave the key unmoved"); assertTrue(raw.get(stranger + "/AKIALEGACYEXAMPLE").isEmpty(), "the lookup must not copy the key"); } @@ -503,9 +532,8 @@ class ResourceArnBuilderTest { } /** - * An action whose resource the request does not name stays at {@code *}: the ones the - * reference gives no resource type, and the ones that default to the calling user, whose - * identity is the filter's to supply rather than this builder's. + * An action whose resource the request does not name stays at {@code *}: the ones the reference gives no resource + * type, and the ones acting on the user who signs them, with no stored ARNs to give that user. */ @Test void iamFallsBackToTheWildcardWhenTheRequestNamesNoResource() { @@ -517,22 +545,53 @@ class ResourceArnBuilderTest { } /** - * The deletion task identifier carries the role's path and name, in the format the action's - * reference publishes, which is the only thing left to name: the role itself is already gone - * by the time the status is asked for. + * The role a deletion task deleted, which IAM gives for the task it holds: the role itself is already gone by the + * time the status is asked for. A task IAM does not hold names nothing rather than half a resource. */ @Test void iamNamesTheRoleADeletionTaskIdentifies() { - assertEquals("arn:aws:iam::000000000000:role/aws-service-role/lex.amazonaws.com/" - + "AWSServiceRoleForLexBots", - resourceOf(builder, "Action=GetServiceLinkedRoleDeletionStatus&DeletionTaskId=" - + "task%2Faws-service-role%2Flex.amazonaws.com" - + "%2FAWSServiceRoleForLexBots%2F12345678-1234-1234-1234-123456789012")); - // A malformed identifier names nothing rather than half a resource. - for (String taskId : List.of("task%2Faws-service-role%2F", "nonsense", "task%2Fother%2Fx")) { - assertEquals("*", resourceOf(builder, - "Action=GetServiceLinkedRoleDeletionStatus&DeletionTaskId=" + taskId), taskId); - } + String task = "task/aws-service-role/lex.amazonaws.com/AWSServiceRoleForLexBots/" + + "12345678-1234-1234-1234-123456789012"; + String role = "arn:aws:iam::000000000000:role/aws-service-role/lex.amazonaws.com/AWSServiceRoleForLexBots"; + IamService store = mock(IamService.class); + when(store.findServiceLinkedRoleDeletionArn(task)).thenReturn(Optional.of(role)); + when(store.findServiceLinkedRoleDeletionArn("nonsense")).thenReturn(Optional.empty()); + assertEquals(role, resourceOf(backedBy(store), "Action=GetServiceLinkedRoleDeletionStatus&DeletionTaskId=" + + URLEncoder.encode(task, StandardCharsets.UTF_8))); + assertEquals("*", resourceOf(backedBy(store), + "Action=GetServiceLinkedRoleDeletionStatus&DeletionTaskId=nonsense")); + } + + /** + * An operation acting on the user who signs it when its request names none, as {@code GetUser} with no + * {@code UserName} and {@code ChangePassword} always do, is checked on that user's stored ARN, path included, or on + * the account root's for a key of the root; a role session's key names no user, and its {@code UserName}, given, + * names the user it gives. + */ + @Test + void iamNamesTheUserWhoSignsARequestNamingNone() { + String bob = "arn:aws:iam::000000000000:user/team/bob"; + IamService store = storeHolding("bob", "/team/", bob); + when(store.findUserNameByAccessKeyId("AKIABOB")).thenReturn(Optional.of("bob")); + when(store.resolveCallerArn("AKIAROOT")).thenReturn(Optional.of("arn:aws:iam::000000000000:root")); + when(store.resolveCallerArn("ASIASESSION")) + .thenReturn(Optional.of("arn:aws:sts::000000000000:assumed-role/app/s")); + ResourceArnBuilder stored = backedBy(store); + when(ctx.getHeaderString("Authorization")).thenReturn(signedBy("AKIABOB")); + assertEquals(bob, resourceOf(stored, "Action=GetUser")); + assertEquals(bob, resourceOf(stored, "Action=ChangePassword&OldPassword=a&NewPassword=b")); + assertEquals(bob, resourceOf(stored, "Action=ListAccessKeys")); + assertEquals("arn:aws:iam::000000000000:user/alice", resourceOf(stored, "Action=GetUser&UserName=alice")); + when(ctx.getHeaderString("Authorization")).thenReturn(signedBy("AKIAROOT")); + assertEquals("arn:aws:iam::000000000000:root", resourceOf(stored, "Action=GetUser")); + when(ctx.getHeaderString("Authorization")).thenReturn(signedBy("ASIASESSION")); + assertEquals("*", resourceOf(stored, "Action=GetUser")); + } + + /** A SigV4 {@code Authorization} header signed with {@code accessKeyId}. */ + private static String signedBy(String accessKeyId) { + return "AWS4-HMAC-SHA256 Credential=" + accessKeyId + "/20261123/us-east-1/iam/aws4_request, " + + "SignedHeaders=host, Signature=0"; } /** @@ -575,7 +634,7 @@ class ResourceArnBuilderTest { void iamNamesTheServerCertificateBeingActedOn() { String arn = "arn:aws:iam::000000000000:server-certificate/my-cert"; setFormBody("Action=DeleteServerCertificate&ServerCertificateName=my-cert"); - assertEquals(arn, backedBy("my-cert", arn).build("iam", ctx, "us-east-1", "000000000000")); + assertEquals(arn, iamResource(backedBy("my-cert", arn), "us-east-1", "000000000000")); } @Test @@ -586,11 +645,11 @@ class ResourceArnBuilderTest { "DeleteServerCertificate", "TagServerCertificate", "UntagServerCertificate", "ListServerCertificateTags")) { setFormBody("Action=" + action + "&ServerCertificateName=c1"); - assertEquals(arn, stored.build("iam", ctx, "us-east-1", "000000000000"), action); + assertEquals(arn, iamResource(stored, "us-east-1", "000000000000"), action); } // The upload is the one that mints rather than reads: nothing is stored yet. setFormBody("Action=UploadServerCertificate&ServerCertificateName=c1"); - assertEquals(arn, builder.build("iam", ctx, "us-east-1", "000000000000")); + assertEquals(arn, iamResource(builder, "us-east-1", "000000000000")); } /** @@ -617,7 +676,7 @@ class ResourceArnBuilderTest { for (String region : List.of("us-east-1", "cn-north-1", "us-gov-west-1")) { setFormBody(spelling + "=" + action + "&ServerCertificateName=c1"); assertEquals(storedArn, - stored.build("iam", ctx, region, "000000000000"), + iamResource(stored, region, "000000000000"), action + " named by " + spelling + ", signed in " + region); } } @@ -637,7 +696,7 @@ class ResourceArnBuilderTest { + "&NewServerCertificateName=new"); assertEquals( List.of(stored, "arn:aws:iam::000000000000:server-certificate/new"), - backedBy("old", stored).buildResources("iam", ctx, "us-east-1", "000000000000")); + iamResources(backedBy("old", stored), "us-east-1", "000000000000")); } /** A move renames the path, so the destination path is named the same way. */ @@ -647,7 +706,7 @@ class ResourceArnBuilderTest { setFormBody("Action=UpdateServerCertificate&ServerCertificateName=old&NewPath=/team/"); assertEquals( List.of(stored, "arn:aws:iam::000000000000:server-certificate/team/old"), - backedBy("old", stored).buildResources("iam", ctx, "us-east-1", "000000000000")); + iamResources(backedBy("old", stored), "us-east-1", "000000000000")); } /** @@ -659,7 +718,7 @@ class ResourceArnBuilderTest { String stored = "arn:aws:iam::000000000000:server-certificate/old"; setFormBody("Action=UpdateServerCertificate&ServerCertificateName=old"); assertEquals(List.of(stored), - backedBy("old", stored).buildResources("iam", ctx, "us-east-1", "000000000000")); + iamResources(backedBy("old", stored), "us-east-1", "000000000000")); } /** @@ -674,16 +733,16 @@ class ResourceArnBuilderTest { + "&NewServerCertificateName=new"); assertEquals( List.of(stored, "arn:aws-cn:iam::000000000000:server-certificate/new"), - backedBy("old", stored).buildResources("iam", ctx, "us-east-1", "000000000000")); + iamResources(backedBy("old", stored), "us-east-1", "000000000000")); } @Test void missingGetRoleUsesItsNameButCannotAcceptAnInjectedPath() { setFormBody("Action=GetRole&RoleName=local-storage&Path=/injected/"); assertEquals("arn:aws:iam::000000000000:role/local-storage", - builder.build("iam", ctx, "us-east-1", ACCOUNT)); + iamResource(builder, "us-east-1", ACCOUNT)); assertEquals("arn:aws-us-gov:iam::000000000000:role/local-storage", - builder.build("iam", ctx, "us-gov-west-1", ACCOUNT)); + iamResource(builder, "us-gov-west-1", ACCOUNT)); } @Test @@ -767,14 +826,14 @@ class ResourceArnBuilderTest { queryParams.add("RoleName", "query-decoy"); setFormBody("Operation=GetRole&RoleName=first&RoleName=duplicate&Path=/injected/"); assertEquals("arn:aws:iam::111122223333:role/first", - builder.build("iam", ctx, "us-east-1", "111122223333")); + iamResource(builder, "us-east-1", "111122223333")); for (String action : List.of("DeleteRole", "ListRolePolicies", "TagRole", "UpdateRole")) { setFormBody("Action=" + action + "&RoleName=first&Path=/injected/"); assertEquals("arn:aws:iam::" + ACCOUNT + ":role/first", - builder.build("iam", ctx, "us-east-1", ACCOUNT), action); + iamResource(builder, "us-east-1", ACCOUNT), action); } setFormBody("Action=GetRole"); - assertEquals("*", builder.build("iam", ctx, "us-east-1", ACCOUNT)); + assertEquals("*", iamResource(builder, "us-east-1", ACCOUNT)); } @Test @@ -786,7 +845,7 @@ class ResourceArnBuilderTest { queryParams.add("RoleName", "first"); queryParams.add("RoleName", "duplicate"); queryParams.add("Path", "/injected/"); - assertEquals("arn:aws:iam::000000000000:role/first", builder.build("iam", ctx, "us-east-1", ACCOUNT)); + assertEquals("arn:aws:iam::000000000000:role/first", iamResource(builder, "us-east-1", ACCOUNT)); queryParams.clear(); queryParams.add("Action", "CreateTags"); queryParams.add("ResourceId.1", "i-first"); @@ -797,15 +856,13 @@ class ResourceArnBuilderTest { builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws")); } - /** - * Nothing stored under that name means nothing to name: the operation fails as NoSuchEntity - * regardless, and minting an ARN for an absent resource would hand a policy something to match. - */ + /** A certificate IAM does not hold is named as its name alone names it, under the root path. */ @Test - void iamFallsBackToTheWildcardWhenNoCertificateIsStored() { + void iamNamesACertificateItDoesNotHoldUnderTheRootPath() { setFormBody("Action=DeleteServerCertificate&ServerCertificateName=absent"); - assertEquals("*", backedBy("other", "arn:aws:iam::000000000000:server-certificate/other") - .build("iam", ctx, "us-east-1", "000000000000")); + assertEquals("arn:aws:iam::000000000000:server-certificate/absent", + iamResource(backedBy("other", "arn:aws:iam::000000000000:server-certificate/other"), "us-east-1", + "000000000000")); } /** @@ -817,17 +874,17 @@ class ResourceArnBuilderTest { void iamTakesTheUploadPathFromTheRequest() { setFormBody("Action=UploadServerCertificate&ServerCertificateName=c1&Path=/team/"); assertEquals("arn:aws:iam::000000000000:server-certificate/team/c1", - builder.build("iam", ctx, "us-east-1", "000000000000")); + iamResource(builder, "us-east-1", "000000000000")); // Written without surrounding slashes, it still lands as a path segment. setFormBody("Action=UploadServerCertificate&ServerCertificateName=c1&Path=team"); assertEquals("arn:aws:iam::000000000000:server-certificate/team/c1", - builder.build("iam", ctx, "us-east-1", "000000000000")); + iamResource(builder, "us-east-1", "000000000000")); // Omitted, it is the root path. setFormBody("Action=UploadServerCertificate&ServerCertificateName=c1"); assertEquals("arn:aws:iam::000000000000:server-certificate/c1", - builder.build("iam", ctx, "us-east-1", "000000000000")); + iamResource(builder, "us-east-1", "000000000000")); } /** @@ -838,11 +895,11 @@ class ResourceArnBuilderTest { void iamMintsAnUploadedCertificateArnInTheRequestPartition() { setFormBody("Action=UploadServerCertificate&ServerCertificateName=my-cert"); assertEquals("arn:aws-cn:iam::000000000000:server-certificate/my-cert", - builder.build("iam", ctx, "cn-north-1", "000000000000")); + iamResource(builder, "cn-north-1", "000000000000")); setFormBody("Action=UploadServerCertificate&ServerCertificateName=my-cert"); assertEquals("arn:aws-us-gov:iam::000000000000:server-certificate/my-cert", - builder.build("iam", ctx, "us-gov-west-1", "000000000000")); + iamResource(builder, "us-gov-west-1", "000000000000")); } /** @@ -856,26 +913,20 @@ class ResourceArnBuilderTest { ResourceArnBuilder stored = backedBy("my-cert", arn); setFormBody("Action=DeleteServerCertificate&ServerCertificateName=my-cert"); - assertEquals(arn, stored.build("iam", ctx, "cn-north-1", "000000000000")); + assertEquals(arn, iamResource(stored, "cn-north-1", "000000000000")); setFormBody("Action=DeleteServerCertificate&ServerCertificateName=my-cert"); - assertEquals(arn, stored.build("iam", ctx, "us-gov-west-1", "000000000000")); + assertEquals(arn, iamResource(stored, "us-gov-west-1", "000000000000")); } - /** - * ListServerCertificates names no certificate, and every other IAM action is still unmapped, - * so both resolve to the wildcard rather than to a fabricated ARN. - */ + /** ListServerCertificates names no certificate, nor does a delete leaving its name out: both are on {@code *}. */ @Test void iamFallsBackToTheWildcardWhenNoCertificateIsNamed() { setFormBody("Action=ListServerCertificates&PathPrefix=/team/"); - assertEquals("*", builder.build("iam", ctx, "us-east-1", "000000000000")); - - setFormBody("Action=DeleteUser&UserName=bob"); - assertEquals("*", builder.build("iam", ctx, "us-east-1", "000000000000")); + assertEquals("*", iamResource(builder, "us-east-1", "000000000000")); setFormBody("Action=DeleteServerCertificate"); - assertEquals("*", builder.build("iam", ctx, "us-east-1", "000000000000")); + assertEquals("*", iamResource(builder, "us-east-1", "000000000000")); } private void setJsonBody(String json) { @@ -1448,7 +1499,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, instance); + return new ResourceArnBuilder(new ObjectMapper(), instance); } /** The finder of the stored ARNs of a namespace, answering one name of one type with one ARN. */ @@ -1805,7 +1856,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, labels); + return new ResourceArnBuilder(new ObjectMapper(), 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/iam/UnresolvedResourceTypesIntegrationTest.java b/src/test/java/io/floci/aws/services/iam/UnresolvedResourceTypesIntegrationTest.java deleted file mode 100644 index 2ba26cc44f..0000000000 --- a/src/test/java/io/floci/aws/services/iam/UnresolvedResourceTypesIntegrationTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package io.floci.aws.services.iam; - -import io.quarkus.test.junit.QuarkusTest; -import io.restassured.response.Response; -import org.junit.jupiter.api.Test; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; - -import static io.restassured.RestAssured.given; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertFalse; - -/** - * Holds {@link ResourceArnBuilder}'s declared-unresolved resource types to the reason each one - * gives. Every entry claims its type belongs only to actions the handler does not dispatch, and - * that is a claim about the handler rather than about the builder, so nothing inside the builder - * can check it. - * - *

It matters because the failure is silent and fail-open. Dispatching such an action without - * teaching the resolver its type leaves the action evaluated against {@code *}, so a policy - * statement naming the resource never applies, which is the gap this builder exists to close. - * - *

The map is empty since {@code GetRoleTemplateVersion} was dispatched, so the first test - * holds nothing today and the second holds what emptied it: the type that used to be declared is - * resolved from the ARN the request carries. That one is the regression worth a test, since an - * empty map asserts nothing and dropping the parameter would put the action back on {@code *}. - */ -@QuarkusTest -class UnresolvedResourceTypesIntegrationTest { - - private static final String IAM_AUTH = - "AWS4-HMAC-SHA256 Credential=test/20261010/us-east-1/iam/aws4_request"; - - @Test - void everyTypeDeclaredUnresolvedIsCarriedOnlyByActionsNobodyDispatches() { - for (Map.Entry declared : ResourceArnBuilder.UNRESOLVED_TYPES.entrySet()) { - Set actions = actionsCarrying(declared.getKey()); - assertFalse(actions.isEmpty(), declared.getKey() - + " is declared unresolved but AWS no longer gives it to any action, so the " - + "entry is dead and should go"); - for (String action : actions) { - // The credential scope resolves the service, so this reaches the IAM handler - // whether or not the action is routable by name, and an action the handler does - // not dispatch falls to its default branch. - Response response = given().header("Authorization", IAM_AUTH) - .formParam("Action", action) - .when().post("/"); - // The status is read before the body: a dispatched action may answer with no - // parseable body at all, and the reason for failing is the same either way. - assertEquals(400, response.statusCode(), reason(declared, action)); - assertEquals("UnsupportedOperation", - response.xmlPath().getString("ErrorResponse.Error.Code"), - reason(declared, action)); - } - } - } - - /** - * {@code role-template} was the last declared-unresolved type, and dispatching - * {@code GetRoleTemplateVersion} is what took it out: the action carries the template's ARN, - * so the type resolves like any other the request names. Held over the wire as well as in the - * table, because the action being dispatched is half of the claim. - */ - @Test - void theTypeThatWasDeclaredUnresolvedIsResolvedFromTheArnTheRequestCarries() { - assertEquals("TemplateArn", - ResourceArnBuilder.IAM_ARN_PARAMETERS.get("GetRoleTemplateVersion"), - "GetRoleTemplateVersion no longer resolves its template from the ARN it carries, " - + "so role-template is back to * unless it is declared unresolved again"); - assertEquals(List.of("role-template"), - IamActionResources.typesOf("GetRoleTemplateVersion"), - "AWS has changed which resource type GetRoleTemplateVersion is authorized " - + "against, so the parameter above may name the wrong thing"); - - Response response = given().header("Authorization", IAM_AUTH) - .formParam("Action", "GetRoleTemplateVersion") - .formParam("TemplateArn", "arn:aws:iam::aws:role-template/ec2.amazonaws.com/X:1") - .when().post("/"); - assertEquals(404, response.statusCode(), - "GetRoleTemplateVersion is not dispatched any more, so role-template belongs in " - + "UNRESOLVED_TYPES again rather than being resolved here"); - assertEquals("NoSuchEntity", response.xmlPath().getString("ErrorResponse.Error.Code")); - } - - private static String reason(Map.Entry declared, String action) { - return action + " is dispatched now, so '" + declared.getKey() + "' is no longer a type " - + "only undispatched actions carry (" + declared.getValue() + "). Resolve it in " - + "ResourceArnBuilder rather than leaving it declared, or the action is evaluated " - + "against * and a policy naming the resource never applies"; - } - - private static Set actionsCarrying(String resourceType) { - Set actions = new TreeSet<>(); - for (Map.Entry> entry : IamActionResources.all().entrySet()) { - if (entry.getValue().contains(resourceType)) { - actions.add(entry.getKey()); - } - } - return actions; - } -} diff --git a/tools/aws/fetch_iam_identifiers.py b/tools/aws/fetch_iam_identifiers.py new file mode 100644 index 0000000000..8d23cfda3a --- /dev/null +++ b/tools/aws/fetch_iam_identifiers.py @@ -0,0 +1,232 @@ +#!/usr/bin/env python3 +"""Vendor what the IAM User Guide and the IAM API reference say about the resources IAM's own requests name into +tools/aws/sources/iam-identifiers.json, a source of the IAM tables. + +The Service Reference gives IAM's types ARN formats whose one variable holds a name with its path +(`user/${UserNameWithPath}`), and botocore's requests name a user by its name alone; neither says that the path is the +one the resource was created with, nor that a request leaving its user out acts on the user who signed it, nor that +a rename needs permission on both names. The IAM User Guide's "IAM identifiers" gives the ARNs' syntax and examples: + + arn:aws:iam::account:user/user-name-with-path + arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/Jane + + If you use the IAM API or AWS Command Line Interface (AWS CLI) to create IAM resources, you can add an optional + path. + + https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html + +and the API reference page of each operation says the rest, as GetUser, UpdateGroup and TagMFADevice do: + + If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to + sign the request to this operation. + + The person making the request (the principal), must have permission to change the role group with the old name + and the new name. + + For virtual MFA devices, the serial number is the same as the ARN. + + https://docs.aws.amazon.com/IAM/latest/APIReference/API_Operations.html + +This script copies the identifiers page's ARN syntax and examples, each variable written `{name}`, and its sentences +on paths given through the API, and, from the API reference page of each operation its list of actions links to, each +sentence of the operation's description or of a request parameter saying the operation acts on the user who signs it, +that the caller needs permission on the old and the new name, that a parameter's value is the resource's ARN, or the +format of an identifier. 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_iam_identifiers.py # rewrite the vendored file from the pages + python3 tools/aws/fetch_iam_identifiers.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 + +IDENTIFIERS_PAGE = "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html" +OPERATIONS_PAGE = "https://docs.aws.amazon.com/IAM/latest/APIReference/API_Operations.html" +REPO_ROOT = Path(__file__).resolve().parents[2] +OUTPUT = REPO_ROOT / "tools/aws/sources/iam-identifiers.json" + +# The paragraphs the identifiers page leads its ARN syntax and its examples with. +SYNTAX_LEAD = "Syntax:" +EXAMPLES_LEAD = "Examples:" +# A sentence of the identifiers page on the path a resource takes when the API creates it. +PATH_RE = re.compile(r"\bIAM API\b.*\bcreate IAM resources\b.*\bpath\b") +# A sentence saying the operation acts on the user who signs the request, when it names none or always. +SIGNING_USER_RE = re.compile(r"\bimplicitly based on the AWS access key\b|\bdefaults to the (?:user|principal) making " + r"the request\b|\bassumes the user whose credentials are used to call the operation\b|" + r"\bthe IAM user who is calling this operation\b") +# A sentence saying the caller needs permission on the resource under its old name and under its new one. +BOTH_NAMES_RE = re.compile(r"\bwith the old name and the new name\b|\bon both the source object and the target " + r"object\b") +# A sentence of a request parameter saying its value is the resource's ARN. +SAME_AS_ARN_RE = re.compile(r"\bis the same as the ARN\b") +# A sentence of a request parameter giving the format of the identifier it holds. +FORMAT_RE = re.compile(r"\bin the format [a-z-]+/\S+") +# An operation the actions page lists, by the link to its page. +OPERATION_LINK_RE = re.compile(r'(?P=operation)') +# The description of an API reference page, between its title and its request parameters. +DESCRIPTION_RE = re.compile(r'

]*>.*?

(?P.*?)

\s*\s*\s*(?P\w+)\s*.*?\s*
(?P.*?)' + r'
', re.S) +# The actions page lists every one of IAM's one hundred and eighty-odd operations; far fewer means its layout changed. +MINIMUM_OPERATIONS = 150 +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 sentences(fragment: str) -> list[str]: + """The sentences of each paragraph of a fragment of the page, as text.""" + return [sentence for paragraph in re.findall(r"

(.*?)

", fragment, re.S) + for sentence in re.split(r"(?<=\.)\s+(?=[A-Z])", text(paragraph)) if sentence] + + +def marked(fragment: str) -> list[str]: + """The lines of a code block of the page as text, each variable the page marks + (`user-name-with-path`) written `{name}`, the page's copy button left out.""" + fragment = re.sub(r'
.*?
', "", fragment, flags=re.S) + fragment = re.sub(r'(.*?)', + lambda match: "{" + text(match.group(1)).strip("<>") + "}", fragment, flags=re.S) + return [line.strip() for line in html.unescape(re.sub(r"<[^>]+>", "", fragment)).splitlines() if line.strip()] + + +def code_after(page: str, lead: str) -> list[str]: + """The lines of the first code block after the paragraph saying `lead`.""" + for match in re.finditer(r"

(.*?)

", page, re.S): + if text(match.group(1)) == lead: + block = re.search(r"]*>(.*?)", page[match.end():], re.S) + if block: + return marked(block.group(1)) + raise ValueError(f"{IDENTIFIERS_PAGE} gives no code after '{lead}': its layout changed") + + +def read_arns(page: str) -> dict: + """The identifiers page's ARN syntax and examples, line by line, and its sentences on paths the API gives.""" + syntax = code_after(page, SYNTAX_LEAD) + examples = code_after(page, EXAMPLES_LEAD) + paths = [sentence for sentence in sentences(page) if PATH_RE.search(sentence)] + if not any(line.endswith("-with-path}") for line in syntax) or not paths: + raise ValueError(f"{IDENTIFIERS_PAGE} gives no ARN with a path and no sentence on paths: its layout changed") + return {"page": IDENTIFIERS_PAGE, "syntax": syntax, "examples": examples, "paths": paths} + + +def read_operations(page: str) -> list[str]: + """The operations the actions page lists, by the name its link to each one's page gives.""" + found = list(dict.fromkeys(OPERATION_LINK_RE.findall(page))) + if len(found) < MINIMUM_OPERATIONS: + raise ValueError(f"{OPERATIONS_PAGE} lists {len(found)} operations: its layout changed") + return found + + +def page_of(operation: str) -> str: + return urllib.parse.urljoin(OPERATIONS_PAGE, f"API_{operation}.html") + + +def read_sentences(operation: str, page: str, pattern: re.Pattern, description: bool = True) -> list[dict]: + """Each sentence of an API reference page's description (with no parameter) and of each of its request + parameters that `pattern` finds, in the page's order.""" + found: list[dict] = [] + described = DESCRIPTION_RE.search(page) + if description and described: + found += [{"operation": operation, "parameter": None, "sentence": sentence} + for sentence in sentences(described.group("body")) if pattern.search(sentence)] + parameters = PARAMETERS_RE.search(page) + for match in PARAMETER_RE.finditer(parameters.group(0) if parameters else ""): + found += [{"operation": operation, "parameter": match.group("parameter"), "sentence": sentence} + for sentence in sentences(match.group("body")) if pattern.search(sentence)] + return found + + +def build(identifiers_page: str, operations_page: str, reference_pages: dict[str, str]) -> dict: + operations = read_operations(operations_page) + + def each(pattern: re.Pattern, description: bool = True) -> list[dict]: + return [found for operation in operations + for found in read_sentences(operation, reference_pages[page_of(operation)], pattern, description)] + + return { + "_source": { + "pages": [IDENTIFIERS_PAGE, OPERATIONS_PAGE], + "fetcher": str(Path(__file__).resolve().relative_to(REPO_ROOT)), + "retrieved": datetime.now(timezone.utc).strftime("%Y-%m-%d"), + "note": "The identifiers page's ARN syntax and examples, each variable written {name}, and its sentences " + "on paths given through the API; and each sentence of the description or of a request parameter " + "of the API reference page of each operation the actions page lists that says the operation acts " + "on the user who signs it, that the caller needs permission on the old and the new name, that a " + "parameter's value is the resource's ARN, or the format of an identifier, copied as they stand.", + }, + "arns": read_arns(identifiers_page), + "signingUser": each(SIGNING_USER_RE), + "bothNames": each(BOTH_NAMES_RE), + "sameAsArn": each(SAME_AS_ARN_RE, description=False), + "formats": each(FORMAT_RE, description=False), + } + + +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, str, dict[str, str]]: + """The identifiers page, the actions page, and the API reference page of each operation it lists.""" + operations_page = fetch(OPERATIONS_PAGE) + links = [page_of(operation) for operation in read_operations(operations_page)] + with ThreadPoolExecutor(max_workers=FETCH_WORKERS) as pool: + return fetch(IDENTIFIERS_PAGE), operations_page, dict(zip(links, pool.map(fetch, links))) + + +def stale(vendored: dict, identifiers_page: str, operations_page: str, reference_pages: dict[str, str]) -> bool: + """Whether the pages now give something other than the vendored file, its date aside.""" + built = build(identifiers_page, operations_page, reference_pages) + 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 IAM 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 {IDENTIFIERS_PAGE} and the API " + f"reference pages {OPERATIONS_PAGE} links to do: run tools/aws/fetch_iam_identifiers.py and then " + f"make iam-request-resources-sync", file=sys.stderr) + return 1 + print(f"{OUTPUT.relative_to(REPO_ROOT)} matches {IDENTIFIERS_PAGE} and the API reference pages " + f"{OPERATIONS_PAGE} links to") + 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['arns']['syntax'])} ARN formats, " + f"{len(built['signingUser'])} signing-user sentences, {len(built['bothNames'])} rename sentences, " + f"{len(built['sameAsArn'])} ARN parameters, {len(built['formats'])} 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 89376ec6ca..0c6e15c9fb 100644 --- a/tools/aws/regen_iam_request_resources.py +++ b/tools/aws/regen_iam_request_resources.py @@ -174,9 +174,9 @@ whose name matches an otherwise unfilled ARN variable (optionally ending in `Num `integerVariables` records these numeric identifiers so the reader canonicalizes leading zeroes even when the request gives the whole ARN; string identifiers retain their spelling. What a request names, this file alone says. A service only looks up what it holds where an entry asks it to -(`StoredResourceArns`): the resource the members a `find` gives name, the ones a `through` member reaches, and the +(`StoredResourceArns`): the resource the members a `find` gives name, the ones a `through` member reaches, the resource its handler uses for a member left out (Athena's `primary` workgroup, EventBridge's `default` bus, ECS's -`default` cluster). No service says what an operation acts on. +`default` cluster), and the user whose key signs a request (`signer`). No service says what an operation acts on. `MEASURED` holds what AWS checks where neither botocore nor the Service Reference says it, and nothing else. It is the only part of the file stated by hand, and an entry is admitted only with evidence from AWS @@ -240,6 +240,19 @@ service's parser for (`statement_resources`, `statement`, `verb`, `names`); an o actions (`actions`) and is checked on each element of a list apart. A top-level map keyed by a shape named after a type, held by a member named as the type's one variable elsewhere, names that type by its keys (`with_map_keys`: BatchGetItem's `RequestItems{}`). +IAM's user guide and API reference are granted the same way, its identifiers page and the API reference page of each +operation vendored by their own script. A type the identifiers write with a name and its path +(`user/{user-name-with-path}`) is named by a create by the name its request gives after the path it gives, as the +identifiers say the API's creates take one (`with_paths`, `path`: CreateUser's `UserName` after its `Path`), and by +any other operation by its name, the reader asking the service for the ARN it holds under it, path included. An +operation whose API reference says the caller needs permission on its old and its new name also names the resource +under the name and the path its request moves it to (`with_renames`, `renames`: UpdateGroup's `NewGroupName` and +`NewPath`); one whose API reference says it acts on the user who signs it names that user when its request leaves out +the member that would name another (`with_signing_user`, `signer`: GetUser with no `UserName`, ChangePassword always), +which the reader asks the service that holds the signing key for; a member whose API reference says its value is the +resource's ARN names the resource by it (`with_same_as_arn`: TagMFADevice's `SerialNumber`); and a type the format of a +member's identifier names is named through that member (`with_formats`: GetServiceLinkedRoleDeletionStatus's +`DeletionTaskId`, the role the task deleted). 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 @@ -308,6 +321,7 @@ from pathlib import Path import fetch_apigateway_arn_formats import fetch_athena_glue_ddl_permissions import fetch_dynamodb_permissions +import fetch_iam_identifiers 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, @@ -340,10 +354,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", "kms", "dynamodb") + "ec2-instance-connect", "s3", "bedrock", "apigateway", "kms", "dynamodb", "iam") # The namespaces whose resources ResourceArnBuilder builds itself. -HAND_BUILT = ("iam",) +HAND_BUILT = () # --------------------------------------------------------------------------------------------------------------------- # MEASURED: what AWS was measured to check where neither botocore nor the Service Reference says it. @@ -427,6 +441,20 @@ MEASURED: dict[str, tuple[list[dict], str]] = { for operation in ("SendTaskSuccess", "SendTaskFailure", "SendTaskHeartbeat")}, **{operation: ([{"action": "kms:Decrypt", "of": "snapshot"}], _SNAPSHOT_KEY_EVIDENCE) for operation in ("redshift:RestoreFromClusterSnapshot", "redshift-serverless:RestoreFromSnapshot")}, + "iam:UpdateDelegationRequest": ( + [{"type": "delegation-request", "fill": {"DelegationRequestId": "DelegationRequestId"}}], + "the IAM API reference, 'UpdateDelegationRequest' " + "(https://docs.aws.amazon.com/IAM/latest/APIReference/API_UpdateDelegationRequest.html): 'Once a delegation " + "request has an owner, that owner gets a default permission to update the delegation request', its " + "DelegationRequestId being 'The unique identifier of the delegation request to update'; and the IAM User " + "Guide, 'IAM temporary delegation' " + "(https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-temporary-delegation.html): its permissions " + "table lists 'iam:UpdateDelegationRequest Forward a delegation request to an administrator for approval', and " + "'By default, IAM principals who initiate a delegation request are automatically granted permissions to manage " + "that specific request. They can associate it with their account, view request details, reject a request, " + "forward it to an administrator for approval, release the exchange token to the product provider after admin " + "approval, and list delegation requests that they own'; the Service Reference lists the other delegation " + "request actions on delegation-request and not this one"), } # --------------------------------------------------------------------------------------------------------------------- @@ -477,17 +505,26 @@ PATH_SOURCES: dict[str, Path] = { # read items using PartiQL for DynamoDB, you must have dynamodb:PartiQLSelect permission on the table or index"; # "Permissions for Put, Update, Delete, and Get actions are governed by the permissions used for the underlying # PutItem, UpdateItem, DeleteItem, and GetItem operations"); tools/aws/fetch_dynamodb_permissions.py vendors those -# pages and `item_resources` and `statement_resources` read them. Each file is written by its own script from the -# pages, unchanged, and the generator only reads it: nothing about an operation is stated here. +# pages and `item_resources` and `statement_resources` read them. And granted for IAM: its identifiers give each +# type's ARN with a name and its path ("arn:aws:iam::account:user/user-name-with-path"; "If you use the IAM API or AWS +# Command Line Interface (AWS CLI) to create IAM resources, you can add an optional path") and its API reference what +# an operation acts on where its request does not say ("If you do not specify a user name, IAM determines the user name +# implicitly based on the AWS access key ID used to sign the request to this operation"; "must have permission to +# change the role group with the old name and the new name"); tools/aws/fetch_iam_identifiers.py vendors those pages +# and `with_paths`, `with_renames`, `with_signing_user`, `with_same_as_arn` and `with_formats` read them. Each file is +# written by its own script from the pages, unchanged, and the generator only reads it: nothing about an operation is +# stated here. # --------------------------------------------------------------------------------------------------------------------- PERMISSION_SOURCES: dict[str, Path] = { "kms": REPO_ROOT / "tools/aws/sources/kms-api-permissions.json", "dynamodb": REPO_ROOT / "tools/aws/sources/dynamodb-permissions.json", + "iam": REPO_ROOT / "tools/aws/sources/iam-identifiers.json", } # The script that writes each namespace's permission source, whose pages `verify_permission_sources` reads it against. PERMISSION_FETCHERS = { "kms": fetch_kms_api_permissions, "dynamodb": fetch_dynamodb_permissions, + "iam": fetch_iam_identifiers, } # 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 @@ -2473,6 +2510,17 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d if each: resources = each actions = {action: known[action] for action in dict.fromkeys(row["action"] for row in each)} + if source is not None and "arns" in source: + name = operation.split(":", 1)[1] + + def of_operation(key: str) -> list[dict]: + return [found for found in source[key] if found["operation"] == name] + + resources = with_paths(resources, operation, source["arns"], formats, models) + resources = with_renames(resources, operation, of_operation("bothNames"), source["arns"], formats, models) + resources = with_signing_user(resources, operation, types, of_operation("signingUser"), models) + resources = with_same_as_arn(resources, operation, types, of_operation("sameAsArn"), formats, models) + resources = with_formats(resources, operation, types, of_operation("formats"), models) 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)): @@ -3227,6 +3275,165 @@ def statement_resources(operation: str, source: dict, known: dict[str, list[str] return rows +def _name_words(phrase: str) -> list[str]: + """The words of a phrase or a member's name, lowercased, a name split where its case changes (`UserName`: `user`, + `name`; `VirtualMFADeviceName`: `virtual`, `mfa`, `device`, `name`).""" + return [word.lower() for word in re.findall(r"[A-Z]+(?![a-z])|[A-Z]?[a-z0-9]+", phrase)] + + +def path_types(arns: dict, formats: dict[str, str]) -> dict[str, tuple[list[str], str]]: + """The types whose ARN the vendored identifiers write with a name and its path, each with the words of that name and + the word naming the path: a type whose format's resource is a literal and one variable, as a line of the + identifiers' syntax of its namespace writes it with a variable ending `-with-path` ("arn:aws:iam::{account}:user/ + {user-name-with-path}", the type `user` of `user/${UserNameWithPath}`: `user`, `name` and `path`).""" + found: dict[str, tuple[list[str], str]] = {} + for line in arns.get("syntax", []): + parts = line.split(":", 5) + match = re.fullmatch(r"(?P[^{]*)\{(?P[a-z0-9-]+)-with-(?P[a-z]+)}", parts[5]) \ + if len(parts) == 6 else None + if match is None: + continue + for kind, arn in formats.items(): + resource = _resource(arn) + if arn.split(":")[2] == parts[2] and ONE_VARIABLE_RE.match(resource) \ + and resource.split("${", 1)[0] == match.group("literal"): + found[kind] = (match.group("name").split("-"), match.group("path")) + return found + + +def _named_member(words: list[str], members: list[str]) -> str | None: + """The one member whose name holds every word given (`user`, `name`: `UserName`; `virtual`, `device`, `name`: + `VirtualMFADeviceName`, beside its `mfa`) and is not named after another (`New...`).""" + named = [member for member in members + if set(words) <= set(_name_words(member)) and "new" not in _name_words(member)] + return named[0] if len(named) == 1 else None + + +def with_paths(resources: list[dict], operation: str, arns: dict, formats: dict[str, str], + models: dict[str, dict]) -> list[dict]: + """The resources, a type the vendored identifiers write with a name and its path (`path_types`) taking both from + a request giving its path, as the identifiers say the API's creates do ("If you use the IAM API or AWS Command Line + Interface (AWS CLI) to create IAM resources, you can add an optional path"): its variable is the name the member + holding every word of the name gives (`UserName`), after the path the member named as the path gives (`Path`, + `path`), and is never looked up, the resource being one the request makes. CreateUser's `UserName` and `Path` name + `user/`.""" + if not any(re.search(r"\bcreate\b.*\bpath\b", sentence) for sentence in arns.get("paths", [])): + return resources + members = list(_request_shapes(models, operation.split(":", 1)[1])) + kinds = path_types(arns, formats) + found = [] + for resource in resources: + kind = resource.get("type") + variables = [v for v in VARIABLE_RE.findall(formats.get(kind, "")) if v not in KNOWN_VARIABLES] + if kind not in kinds or len(variables) != 1 or "fill" not in resource \ + or {"find", "default", "when", "unless"} & set(resource): + found.append(resource) + continue + words, path = kinds[kind] + path_member = path[:1].upper() + path[1:] + name = _named_member(words, members) + if path_member not in members or name is None: + found.append(resource) + continue + found.append(dict(resource, fill={variables[0]: name}, path=path_member)) + return found + + +def with_renames(resources: list[dict], operation: str, sentences: list[dict], arns: dict, formats: dict[str, str], + models: dict[str, dict]) -> list[dict]: + """The resources, and the one an operation renames or moves, as its vendored API reference says the caller needs + permission on both ("must have permission to change the role group with the old name and the new name"; "on both + the source object and the target object"): of a type the identifiers write with a name and its path, it is the + resource its request names by the member filling that type's variable (`renames`, UpdateGroup's `GroupName`), with + the name the member of that name after `New` gives (`NewGroupName`) and the path the one named as the path after + `New` does (`NewPath`), each where the request gives it, and the resource's own otherwise.""" + if not sentences: + return resources + members = list(_request_shapes(models, operation.split(":", 1)[1])) + kinds = path_types(arns, formats) + found = list(resources) + for resource in resources: + kind = resource.get("type") + fill = resource.get("fill") or {} + if kind not in kinds or len(fill) != 1 or set(resource) - {"type", "fill"}: + continue + (variable, member), = fill.items() + renamed, moved = "New" + member, "New" + kinds[kind][1][:1].upper() + kinds[kind][1][1:] + if renamed not in members or moved not in members: + raise ValueError(f"{operation}: its vendored API reference says it renames its {kind}, which its request " + f"gives no {renamed} and {moved} of") + found.append({"type": kind, "fill": {variable: renamed}, "path": moved, "renames": member}) + if found == resources: + raise ValueError(f"{operation}: its vendored API reference says it renames a resource its request names no " + f"type of the identifiers' with a path of") + return found + + +def with_signing_user(resources: list[dict], operation: str, types: list[str], sentences: list[dict], + models: dict[str, dict]) -> list[dict]: + """The resources, and the user who signs the request, which the reader asks the service holding the key it is + signed with for (`signer`), as the operation's vendored API reference says it acts on ("If you do not specify a user + name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request to this + operation"; "If this value is not specified, then the operation assumes the user whose credentials are used to + call the operation"; "Changes the password of the IAM user who is calling this operation"): `when` the request + leaves out the member the sentence is of, or that its words name (`UserName`, "user name"), and always where they + name none. The type is the one of the action's the sentences name by a word of theirs.""" + if not sentences: + return resources + members = list(_request_shapes(models, operation.split(":", 1)[1])) + named: set[str | None] = set() + kinds: set[str] = set() + for sentence in sentences: + words = re.findall(r"[A-Za-z]+", sentence["sentence"]) + member = sentence["parameter"] if sentence["parameter"] in members else next( + (joined for start in range(len(words)) for end in range(start + 1, min(start + 3, len(words)) + 1) + if (joined := "".join(word[:1].upper() + word[1:] for word in words[start:end])) in members), None) + named.add(member) + kinds |= {kind for kind in types if kind in set(_name_words(sentence["sentence"]))} + if len(named) != 1 or len(kinds) != 1: + raise ValueError(f"{operation}: its vendored API reference says it acts on the user signing it, when the " + f"request leaves out {sorted(named, key=str)}, of the types {sorted(kinds)}, not one of each") + member = named.pop() + return resources + [{"types": [kinds.pop()], "signer": True, **({"when": {member: [None]}} if member else {})}] + + +def with_same_as_arn(resources: list[dict], operation: str, types: list[str], sentences: list[dict], + formats: dict[str, str], models: dict[str, dict]) -> list[dict]: + """The resources, and those a member names whose vendored API reference says its value is the resource's ARN ("For + virtual MFA devices, the serial number is the same as the ARN", of TagMFADevice's `SerialNumber`), of each type the + action acts on, each ARN read by its format.""" + members = list(_request_shapes(models, operation.split(":", 1)[1])) + found = list(resources) + for sentence in sentences: + if sentence["parameter"] not in members: + raise ValueError(f"{operation}: its vendored API reference says {sentence['parameter']} holds an ARN, " + f"which its request has no member of") + row = {"types": [kind for kind in types if kind in formats], "arn": sentence["parameter"]} + if row["types"] and row not in found: + found.append(row) + return found + + +def with_formats(resources: list[dict], operation: str, types: list[str], sentences: list[dict], + models: dict[str, dict]) -> list[dict]: + """The resources, and the type a member's vendored API reference gives the format of its identifier in, whose + variables are named by words a type the action acts on is named by ("This identifier is returned by the + DeleteServiceLinkedRole operation in the format task/aws-service-role/// + ", of GetServiceLinkedRoleDeletionStatus's `DeletionTaskId`, naming its `role`), named through that + member, which the reader asks the service for, where the rules read no resource of that type.""" + members = list(_request_shapes(models, operation.split(":", 1)[1])) + found = list(resources) + for sentence in sentences: + given = re.search(r"\bin the format (?P\S+)", sentence["sentence"]) + placeholders = {word for name in re.findall(r"<([a-z-]+)>", given.group("format") if given else "") + for word in name.split("-")} + kinds = [kind for kind in types if kind in placeholders + and not any(kind in _kinds(resource) for resource in resources)] + if sentence["parameter"] in members and kinds: + found.append({"types": kinds, "through": sentence["parameter"]}) + 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] @@ -4470,13 +4677,20 @@ def _resource_problems(operation: str, resource: object, types: set[str], format or not FILL_PATH_RE.match(resource["statement"]) or not re.fullmatch(r"[A-Z]+", str(resource["verb"])): return [f"{operation} names {resource!r}, which is no statement member, verb and types its action acts on"] return [] + if isinstance(resource, dict) and "signer" in resource: + kinds = _kinds(resource) + if not {"types", "signer"} <= set(resource) <= {"types", "signer", "when"} or resource["signer"] is not True \ + or len(kinds) != 1 or not all(kind in types and kind in formats for kind in kinds): + return [f"{operation} names {resource!r}, which is no type its action acts on signed for"] + return _conditions_problems(operation, kinds, resource) if not isinstance(resource, dict) or not ({"types", "arn"} <= set(resource) <= {"types", "arn", "made", "endpoint"} or {"types", "through"} <= set(resource) <= {"types", "through", "when", "endpoint"} or {"type", "fill"} <= set(resource) <= {"type", "fill", "when", "unless", "arnOf", "account", "fixed", "made", "find", "endpoint", "default", "whenDefault", "unlessDefault", - "defaults", "partialArn"}): + "defaults", "partialArn", "path", + "renames"}): return [f"{operation} names {resource!r}, which is neither an ARN member nor a type's variables"] for key in ("whenDefault", "unlessDefault"): pair = resource.get(key) @@ -4543,6 +4757,14 @@ def _resource_problems(operation: str, resource: object, types: set[str], format if account is not None and (not isinstance(account, str) or not PATH_RE.match(account) or account.endswith("[]") or "${Account}" not in formats[kinds[0]]): return [f"{operation} takes {kinds[0]}'s account from {account!r}, which is no member or no account of its ARN"] + for key in ("path", "renames"): + if key in resource and (not isinstance(resource[key], str) or not PATH_RE.match(resource[key]) + or resource[key].endswith("[]") or len(fill) != 1 + or set(resource) & {"find", "default", "when", "unless", "partialArn"}): + return [f"{operation} reads {kinds[0]}'s {key} from {resource[key]!r}, which is no member beside the one " + f"filling its variable"] + if "renames" in resource and "path" not in resource: + return [f"{operation} renames {kinds[0]} with no member naming its path"] if resource.get("partialArn", True) is not True or ("partialArn" in resource and not fill): return [f"{operation} reads {kinds[0]} from a partial ARN {resource.get('partialArn')!r}, which is not true for a " f"type filled by its members"] diff --git a/tools/aws/sources/iam-identifiers.json b/tools/aws/sources/iam-identifiers.json new file mode 100644 index 0000000000..f049caec49 --- /dev/null +++ b/tools/aws/sources/iam-identifiers.json @@ -0,0 +1,213 @@ +{ + "_source": { + "pages": [ + "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html", + "https://docs.aws.amazon.com/IAM/latest/APIReference/API_Operations.html" + ], + "fetcher": "tools/aws/fetch_iam_identifiers.py", + "retrieved": "2026-11-23", + "note": "The identifiers page's ARN syntax and examples, each variable written {name}, and its sentences on paths given through the API; and each sentence of the description or of a request parameter of the API reference page of each operation the actions page lists that says the operation acts on the user who signs it, that the caller needs permission on the old and the new name, that a parameter's value is the resource's ARN, or the format of an identifier, copied as they stand." + }, + "arns": { + "page": "https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html", + "syntax": [ + "arn:aws:iam::{account}:root", + "arn:aws:iam::{account}:user/{user-name-with-path}", + "arn:aws:iam::{account}:group/{group-name-with-path}", + "arn:aws:iam::{account}:role/{role-name-with-path}", + "arn:aws:iam::{account}:policy/{policy-name-with-path}", + "arn:aws:iam::{account}:instance-profile/{instance-profile-name-with-path}", + "arn:aws:sts::{account}:federated-user/{user-name}", + "arn:aws:sts::{account}:assumed-role/{role-name}/{role-session-name}", + "arn:aws:sts::{account}:self", + "arn:aws:iam::{account}:mfa/{virtual-device-name-with-path}", + "arn:aws:iam::{account}:u2f/{u2f-token-id}", + "arn:aws:iam::{account}:server-certificate/{certificate-name-with-path}", + "arn:aws:iam::{account}:saml-provider/{provider-name}", + "arn:aws:iam::{account}:oidc-provider/{provider-name}", + "arn:aws:iam::aws:contextProvider/{context-provider-name}" + ], + "examples": [ + "arn:aws:iam::123456789012:root", + "arn:aws:iam::123456789012:user/John", + "arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/Jane", + "arn:aws:iam::123456789012:group/Developers", + "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_A/Developers", + "arn:aws:iam::123456789012:role/S3Access", + "arn:aws:iam::123456789012:role/application_abc/component_xyz/RDSAccess", + "arn:aws:iam::123456789012:role/aws-service-role/access-analyzer.amazonaws.com/AWSServiceRoleForAccessAnalyzer", + "arn:aws:iam::123456789012:role/service-role/QuickSightAction", + "arn:aws:iam::123456789012:policy/UsersManageOwnCredentials", + "arn:aws:iam::123456789012:policy/division_abc/subdivision_xyz/UsersManageOwnCredentials", + "arn:aws:iam::123456789012:instance-profile/Webserver", + "arn:aws:sts::123456789012:federated-user/John", + "arn:aws:sts::123456789012:assumed-role/Accounting-Role/Jane", + "arn:aws:sts::123456789012:self", + "arn:aws:iam::123456789012:mfa/JaneMFA", + "arn:aws:iam::123456789012:u2f/user/John/default (U2F security key)", + "arn:aws:iam::123456789012:server-certificate/ProdServerCert", + "arn:aws:iam::123456789012:server-certificate/division_abc/subdivision_xyz/ProdServerCert", + "arn:aws:iam::123456789012:saml-provider/ADFSProvider", + "arn:aws:iam::123456789012:oidc-provider/GoogleProvider", + "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-west-2.amazonaws.com/id/a1b2c3d4567890abcdefEXAMPLE11111", + "arn:aws:iam::123456789012:oidc-provider/server.example.org", + "arn:aws:iam::aws:contextProvider/IdentityCenter" + ], + "paths": [ + "If you use the IAM API or AWS Command Line Interface (AWS CLI) to create IAM resources, you can add an optional path." + ] + }, + "signingUser": [ + { + "operation": "ChangePassword", + "parameter": null, + "sentence": "Changes the password of the IAM user who is calling this operation." + }, + { + "operation": "CreateAccessKey", + "parameter": null, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request." + }, + { + "operation": "CreateLoginProfile", + "parameter": "UserName", + "sentence": "If no user name is included, it defaults to the principal making the request." + }, + { + "operation": "DeactivateMFADevice", + "parameter": "UserName", + "sentence": "If no user name is included, it defaults to the principal making the request." + }, + { + "operation": "DeleteAccessKey", + "parameter": null, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request." + }, + { + "operation": "DeleteLoginProfile", + "parameter": "UserName", + "sentence": "If no user name is included, it defaults to the principal making the request." + }, + { + "operation": "DeleteServiceSpecificCredential", + "parameter": "UserName", + "sentence": "If this value is not specified, then the operation assumes the user whose credentials are used to call the operation." + }, + { + "operation": "DeleteSigningCertificate", + "parameter": null, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request." + }, + { + "operation": "GetLoginProfile", + "parameter": "UserName", + "sentence": "If no user name is included, it defaults to the principal making the request." + }, + { + "operation": "GetUser", + "parameter": null, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID used to sign the request to this operation." + }, + { + "operation": "GetUser", + "parameter": "UserName", + "sentence": "If it is not included, it defaults to the user making the request." + }, + { + "operation": "ListAccessKeys", + "parameter": null, + "sentence": "If the UserName is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request." + }, + { + "operation": "ListMFADevices", + "parameter": null, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS access key ID signing the request for this operation." + }, + { + "operation": "ListServiceSpecificCredentials", + "parameter": "UserName", + "sentence": "If this value is not specified, then the operation assumes the user whose credentials are used to call the operation." + }, + { + "operation": "ListSigningCertificates", + "parameter": null, + "sentence": "If the UserName field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request for this operation." + }, + { + "operation": "ListSSHPublicKeys", + "parameter": "UserName", + "sentence": "If none is specified, the UserName field is determined implicitly based on the AWS access key used to sign the request." + }, + { + "operation": "ResetServiceSpecificCredential", + "parameter": "UserName", + "sentence": "If this value is not specified, then the operation assumes the user whose credentials are used to call the operation." + }, + { + "operation": "UpdateAccessKey", + "parameter": null, + "sentence": "If the UserName is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request." + }, + { + "operation": "UpdateServiceSpecificCredential", + "parameter": "UserName", + "sentence": "If you do not specify this value, then the operation assumes the user whose credentials are used to call the operation." + }, + { + "operation": "UpdateSigningCertificate", + "parameter": null, + "sentence": "If the UserName field is not specified, the user name is determined implicitly based on the AWS access key ID used to sign the request." + }, + { + "operation": "UploadSigningCertificate", + "parameter": null, + "sentence": "If the UserName is not specified, the IAM user name is determined implicitly based on the AWS access key ID used to sign the request." + } + ], + "bothNames": [ + { + "operation": "UpdateGroup", + "parameter": null, + "sentence": "The person making the request (the principal), must have permission to change the role group with the old name and the new name." + }, + { + "operation": "UpdateServerCertificate", + "parameter": null, + "sentence": "The person making the request (the principal), must have permission to change the server certificate with the old name and the new name." + }, + { + "operation": "UpdateUser", + "parameter": null, + "sentence": "To change a user name, the requester must have appropriate permissions on both the source object and the target object." + } + ], + "sameAsArn": [ + { + "operation": "DeleteVirtualMFADevice", + "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN." + }, + { + "operation": "ListMFADeviceTags", + "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN." + }, + { + "operation": "TagMFADevice", + "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN." + }, + { + "operation": "UntagMFADevice", + "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN." + } + ], + "formats": [ + { + "operation": "GetServiceLinkedRoleDeletionStatus", + "parameter": "DeletionTaskId", + "sentence": "This identifier is returned by the DeleteServiceLinkedRole operation in the format task/aws-service-role/// ." + } + ] +} diff --git a/tools/aws/test_fetch_iam_identifiers.py b/tools/aws/test_fetch_iam_identifiers.py new file mode 100644 index 0000000000..cdef796127 --- /dev/null +++ b/tools/aws/test_fetch_iam_identifiers.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python3 +"""Tests for fetch_iam_identifiers.py, on pages in the IAM User Guide's and the IAM API reference's markup.""" +from __future__ import annotations + +import pytest + +import fetch_iam_identifiers as f + +COPY = '
' +IDENTIFIERS = ( + '

IAM identifiers

If you use the IAM API or AWS Command Line Interface (AWS CLI) to create ' + 'IAM resources, you can add an optional path. You can use a single path.

Syntax:

' + '
'
+    + COPY + 'arn:aws:iam::account:root\n'
+    'arn:aws:iam::account:user/user-name-with-path\n'
+    'arn:aws:iam::account:saml-provider/provider-name'
+    '

Examples:

' + COPY + ''
+    'arn:aws:iam::123456789012:user/John\narn:aws:iam::123456789012:user/division_abc/Jane
') +OPERATIONS = ('

Actions

    ' + "".join( + f'
  • {operation}

  • ' + for operation in ("GetUser", "UpdateGroup", "TagMFADevice", "GetServiceLinkedRoleDeletionStatus", "ListUsers")) + + '
') + + +def reference(operation: str, description: str, parameters: dict[str, str]) -> str: + """An API reference page, its description and each request parameter's paragraphs.""" + return (f'

{operation}

{description}

' + f'

Request Parameters

' + + "".join(f'
{name}

{text}

Type: String

' + for name, text in parameters.items()) + + f'

Response Elements

') + + +PAGES = {f.page_of(operation): page for operation, page in { + "GetUser": reference("GetUser", "Retrieves the user. If you do not specify a user name, IAM determines the user " + "name implicitly based on the AWS access key ID used to sign the request.", + {"UserName": "The name of the user. If it is not included, it defaults to the user making " + "the request."}), + "UpdateGroup": reference("UpdateGroup", "The person making the request (the principal), must have permission to " + "change the role group with the old name and the new name.", + {"GroupName": "The name of the group.", "NewGroupName": "New name for the group."}), + "TagMFADevice": reference("TagMFADevice", "Adds tags.", + {"SerialNumber": "The device. For virtual MFA devices, the serial number is the same as " + "the ARN."}), + "GetServiceLinkedRoleDeletionStatus": reference( + "GetServiceLinkedRoleDeletionStatus", "Retrieves the status.", + {"DeletionTaskId": "The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole " + "operation in the format task/aws-service-role/<service-principal-name>/" + "<role-name>/<task-uuid>."}), + "ListUsers": reference("ListUsers", "Lists the users.", {"PathPrefix": "The path prefix."}), +}.items()} + + +def test_the_identifiers_page_gives_its_arn_syntax_examples_and_paths(): + assert f.read_arns(IDENTIFIERS) == { + "page": f.IDENTIFIERS_PAGE, + "syntax": ["arn:aws:iam::{account}:root", "arn:aws:iam::{account}:user/{user-name-with-path}", + "arn:aws:iam::{account}:saml-provider/{provider-name}"], + "examples": ["arn:aws:iam::123456789012:user/John", "arn:aws:iam::123456789012:user/division_abc/Jane"], + "paths": ["If you use the IAM API or AWS Command Line Interface (AWS CLI) to create IAM resources, you can add " + "an optional path."]} + + +def test_each_api_reference_page_gives_the_sentences_saying_what_it_acts_on(monkeypatch): + monkeypatch.setattr(f, "MINIMUM_OPERATIONS", 1) + built = f.build(IDENTIFIERS, OPERATIONS, PAGES) + assert built["signingUser"] == [ + {"operation": "GetUser", "parameter": None, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the AWS " + "access key ID used to sign the request."}, + {"operation": "GetUser", "parameter": "UserName", + "sentence": "If it is not included, it defaults to the user making the request."}] + assert built["bothNames"] == [ + {"operation": "UpdateGroup", "parameter": None, + "sentence": "The person making the request (the principal), must have permission to change the role group " + "with the old name and the new name."}] + assert built["sameAsArn"] == [ + {"operation": "TagMFADevice", "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN."}] + assert built["formats"] == [ + {"operation": "GetServiceLinkedRoleDeletionStatus", "parameter": "DeletionTaskId", + "sentence": "This identifier is returned by the DeleteServiceLinkedRole operation in the format " + "task/aws-service-role///."}] + + +def test_a_page_whose_layout_changed_is_refused(): + with pytest.raises(ValueError, match="no code after 'Syntax:'"): + f.read_arns("

Nothing here.

") + with pytest.raises(ValueError, match="no ARN with a path"): + f.read_arns(IDENTIFIERS.replace("-with-path", "")) + with pytest.raises(ValueError, match="lists 5 operations"): + f.read_operations(OPERATIONS) + + +def test_the_file_is_stale_when_a_page_says_something_else(monkeypatch): + monkeypatch.setattr(f, "MINIMUM_OPERATIONS", 1) + vendored = f.build(IDENTIFIERS, OPERATIONS, PAGES) + assert not f.stale(vendored, IDENTIFIERS, OPERATIONS, PAGES) + changed = dict(PAGES) + changed[f.page_of("TagMFADevice")] = PAGES[f.page_of("TagMFADevice")].replace("same as the ARN", "device's id") + assert f.stale(vendored, IDENTIFIERS, OPERATIONS, changed) diff --git a/tools/aws/test_regen_iam_request_resources.py b/tools/aws/test_regen_iam_request_resources.py index 2a8a1a2a9c..34a941c958 100644 --- a/tools/aws/test_regen_iam_request_resources.py +++ b/tools/aws/test_regen_iam_request_resources.py @@ -3208,3 +3208,119 @@ def test_a_statement_resource_names_its_member_verb_and_every_variable_of_its_ty for bad in (dict(good, verb="select"), dict(good, names={"TableName": "table"}), dict(good, statement="a.b.c.d"), dict(good, types=["stream"])): assert r._resource_problems("dynamodb:BatchExecuteStatement", bad, {"index", "table"}, TABLES_FORMATS) + + +# --------------------------------------------------------------------------- # +# PERMISSION_SOURCES: the vendored IAM identifiers +# --------------------------------------------------------------------------- # +USERS_FORMATS = {"user": "arn:${Partition}:iam::${Account}:user/${UserNameWithPath}", + "group": "arn:${Partition}:iam::${Account}:group/${GroupNameWithPath}", + "saml-provider": "arn:${Partition}:iam::${Account}:saml-provider/${SamlProviderName}", + "mfa": "arn:${Partition}:iam::${Account}:mfa/${MfaTokenIdWithPath}", + "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}"} +USERS_ARNS = {"syntax": ["arn:aws:iam::{account}:root", "arn:aws:iam::{account}:user/{user-name-with-path}", + "arn:aws:iam::{account}:group/{group-name-with-path}", + "arn:aws:iam::{account}:mfa/{virtual-device-name-with-path}", + "arn:aws:iam::{account}:saml-provider/{provider-name}"], + "paths": ["If you use the IAM API or AWS Command Line Interface (AWS CLI) to create IAM resources, you " + "can add an optional path."]} + + +def iam_model() -> dict: + """A model shaped as IAM's: creates taking a path, a rename, an operation acting on its signer, a device by its + serial number and a deletion task.""" + shapes = {"name": {"type": "string"}} + members = { + "CreateUser": ["Path", "UserName"], "CreateVirtualMFADevice": ["Path", "VirtualMFADeviceName"], + "UpdateGroup": ["GroupName", "NewPath", "NewGroupName"], "UpdateUser": ["UserName", "NewUserName"], + "GetUser": ["UserName"], "ChangePassword": ["OldPassword", "NewPassword"], "TagMFADevice": ["SerialNumber"], + "GetServiceLinkedRoleDeletionStatus": ["DeletionTaskId"], + } + for operation, names in members.items(): + shapes[f"{operation}Request"] = {"type": "structure", "members": {name: {"shape": "name"} for name in names}} + operations = {name: {"name": name, "input": {"shape": f"{name}Request"}} for name in members} + return {"metadata": {"protocol": "query", "endpointPrefix": "iam"}, "operations": operations, "shapes": shapes} + + +def test_the_identifiers_give_the_types_whose_arn_holds_a_name_after_its_path(): + assert r.path_types(USERS_ARNS, USERS_FORMATS) == { + "user": (["user", "name"], "path"), "group": (["group", "name"], "path"), + "mfa": (["virtual", "device", "name"], "path")} + + +def test_a_create_names_what_it_makes_by_its_name_after_its_path(): + models = {"iam": iam_model()} + assert r.with_paths([{"type": "user", "fill": {"UserNameWithPath": "Path"}}], "iam:CreateUser", USERS_ARNS, + USERS_FORMATS, models) == [ + {"type": "user", "fill": {"UserNameWithPath": "UserName"}, "path": "Path"}] + assert r.with_paths([{"type": "mfa", "fill": {"MfaTokenIdWithPath": "Path"}}], "iam:CreateVirtualMFADevice", + USERS_ARNS, USERS_FORMATS, models) == [ + {"type": "mfa", "fill": {"MfaTokenIdWithPath": "VirtualMFADeviceName"}, "path": "Path"}] + # A request giving no path, and identifiers saying nothing of paths a create gives, leave the resources as they are. + named = [{"type": "user", "fill": {"UserNameWithPath": "UserName"}}] + assert r.with_paths(named, "iam:GetUser", USERS_ARNS, USERS_FORMATS, models) == named + assert r.with_paths([{"type": "user", "fill": {"UserNameWithPath": "Path"}}], "iam:CreateUser", + dict(USERS_ARNS, paths=[]), USERS_FORMATS, models) == [ + {"type": "user", "fill": {"UserNameWithPath": "Path"}}] + + +def test_a_rename_also_names_the_resource_under_its_new_name_and_path(): + models = {"iam": iam_model()} + sentence = [{"operation": "UpdateGroup", "parameter": None, + "sentence": "The person making the request (the principal), must have permission to change the role " + "group with the old name and the new name."}] + old = [{"type": "group", "fill": {"GroupNameWithPath": "GroupName"}}] + assert r.with_renames(old, "iam:UpdateGroup", sentence, USERS_ARNS, USERS_FORMATS, models) == old + [ + {"type": "group", "fill": {"GroupNameWithPath": "NewGroupName"}, "path": "NewPath", "renames": "GroupName"}] + assert r.with_renames(old, "iam:UpdateGroup", [], USERS_ARNS, USERS_FORMATS, models) == old + # A rename whose request gives no new path is refused rather than read half. + with pytest.raises(ValueError, match="no NewUserName and NewPath"): + r.with_renames([{"type": "user", "fill": {"UserNameWithPath": "UserName"}}], "iam:UpdateUser", sentence, + USERS_ARNS, USERS_FORMATS, models) + + +def test_an_operation_acting_on_its_signer_names_that_user_when_its_request_names_none(): + models = {"iam": iam_model()} + get_user = [{"operation": "GetUser", "parameter": None, + "sentence": "If you do not specify a user name, IAM determines the user name implicitly based on the " + "AWS access key ID used to sign the request."}, + {"operation": "GetUser", "parameter": "UserName", + "sentence": "If it is not included, it defaults to the user making the request."}] + assert r.with_signing_user([], "iam:GetUser", ["user"], get_user, models) == [ + {"types": ["user"], "signer": True, "when": {"UserName": [None]}}] + change = [{"operation": "ChangePassword", "parameter": None, + "sentence": "Changes the password of the IAM user who is calling this operation."}] + assert r.with_signing_user([], "iam:ChangePassword", ["user"], change, models) == [ + {"types": ["user"], "signer": True}] + assert r.with_signing_user([], "iam:GetUser", ["user"], [], models) == [] + with pytest.raises(ValueError, match="not one of each"): + r.with_signing_user([], "iam:GetUser", ["group"], get_user, models) + + +def test_a_member_whose_value_is_the_resources_arn_names_it_and_a_formats_type_is_named_through_it(): + models = {"iam": iam_model()} + serial = [{"operation": "TagMFADevice", "parameter": "SerialNumber", + "sentence": "For virtual MFA devices, the serial number is the same as the ARN."}] + assert r.with_same_as_arn([], "iam:TagMFADevice", ["mfa"], serial, USERS_FORMATS, models) == [ + {"types": ["mfa"], "arn": "SerialNumber"}] + task = [{"operation": "GetServiceLinkedRoleDeletionStatus", "parameter": "DeletionTaskId", + "sentence": "This identifier is returned by the DeleteServiceLinkedRole operation in the format " + "task/aws-service-role///."}] + assert r.with_formats([], "iam:GetServiceLinkedRoleDeletionStatus", ["role"], task, models) == [ + {"types": ["role"], "through": "DeletionTaskId"}] + named = [{"type": "role", "fill": {"RoleNameWithPath": "RoleName"}}] + assert r.with_formats(named, "iam:GetServiceLinkedRoleDeletionStatus", ["role"], task, models) == named + + +def test_a_resource_named_after_its_path_or_signed_for_is_checked(): + types = {"user", "group"} + good = {"type": "user", "fill": {"UserNameWithPath": "UserName"}, "path": "Path"} + renamed = {"type": "group", "fill": {"GroupNameWithPath": "NewGroupName"}, "path": "NewPath", + "renames": "GroupName"} + signer = {"types": ["user"], "signer": True, "when": {"UserName": [None]}} + for resource in (good, renamed, signer, {"types": ["user"], "signer": True}): + assert r._resource_problems("iam:Op", resource, types, USERS_FORMATS) == [], resource + for bad in (dict(good, path="Paths[]"), dict(good, find=["UserName"]), dict(renamed, path=None), + {"type": "group", "fill": {"GroupNameWithPath": "NewGroupName"}, "renames": "GroupName"}, + dict(signer, signer="yes"), dict(signer, types=["user", "group"]), dict(signer, fill={})): + assert r._resource_problems("iam:Op", bad, types, USERS_FORMATS), bad