diff --git a/docs/services/iam.md b/docs/services/iam.md index 8186efbbd2..8de6d39241 100644 --- a/docs/services/iam.md +++ b/docs/services/iam.md @@ -1663,7 +1663,8 @@ Step Functions, EventBridge, Amazon Cognito user pools and identity pools, Amazo 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, AWS Data Exports, AWS Pricing Calculator, Cost Explorer, CloudTrail, Global Accelerator, Amazon -Timestream for InfluxDB and the Amazon Redshift Data API they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each +Timestream for InfluxDB, the Amazon Redshift Data API, AWS Payment Cryptography, AWS DataSync, Amazon EMR, +Amazon Rekognition and IAM Identity Center they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each operation's action, the resource types that action acts on with their ARN formats, and the request members that name them: a member holding a resource's ARN, which counts when it matches the format of a type the action acts on, or members filling the variables of a type's format. A member holding @@ -1710,6 +1711,17 @@ ARN its `Export.ExportArn` gives, which is the new export's own. CloudTrail's `S `StopLogging` and `GetTrailStatus` are checked on the trail their bare `Name` names, by name or by ARN, its tag operations on the resource whose ARN their `ResourceId` gives, and its dashboard operations on the dashboard their `DashboardId` names, by name or by ARN. +Amazon EMR's requests naming a cluster by its job flow id, in `JobFlowId` or `JobFlowIds`, are checked on +`cluster/`, as when they name it by `ClusterId`, and `AddTags` and `RemoveTags` on the cluster their +`ResourceId` names, the one Floci tags, not on one their `ClusterId` gives. A `ModifyInstanceGroups` +naming its instance groups with no `ClusterId`, or a null one, is checked on the cluster each group is +in, the one EMR finds it in. A Rekognition stream processor is checked on `streamprocessor/`, the ARN its `Name` +gives. IAM Identity Center's `CreateAccountAssignment`, `DeleteAccountAssignment` and +`ProvisionPermissionSet` are checked on the account their `TargetId` names, `account/`, beside the +instance and the permission set, and a `ProvisionPermissionSet` for `ALL_PROVISIONED_ACCOUNTS` on each +account the permission set is provisioned to. AWS does not document which accounts such a request is +authorized on, so checking each one it provisions is Floci's reading. A permission set, an application or a trusted token issuer +a create makes has the id of the instance its `InstanceArn` names, `permissionSet//*`. Cost Explorer's `GetAnomalyMonitors` and `GetAnomalySubscriptions` are checked on each ARN their `MonitorArnList` or `SubscriptionArnList` gives, and Timestream for InfluxDB's `RebootDbCluster` on the cluster and on each member instance its `instanceIds` names. Global @@ -1746,7 +1758,8 @@ an execution started through one is the state machine's. An ARN naming another a Region than the request's is checked as given and as each resource of that name a handler may act on instead, in the ARN's account or the caller's and in the ARN's Region or the request's (ECR's tag handlers keep the ARN's account in the request's Region), and the request is refused if any is -denied. Every other request is checked on `*`, as is an operation whose action acts on no +denied; one of a type AWS owns, whose ARN's account is `aws` (an IAM Identity Center application +provider), is checked in that account alone. Every other request is checked on `*`, as is an operation whose action acts on no resource type or whose request names none, where AWS checks `*` too. `make iam-request-resources-check` re-derives the table from the pinned botocore, `make iam-request-resources-verify` checks it against AWS, and the namespaces it does not read yet are diff --git a/src/main/java/io/github/hectorvent/floci/core/common/RequestResourceMembers.java b/src/main/java/io/github/hectorvent/floci/core/common/RequestResourceMembers.java index 9ad9c1770b..1a748598d1 100644 --- a/src/main/java/io/github/hectorvent/floci/core/common/RequestResourceMembers.java +++ b/src/main/java/io/github/hectorvent/floci/core/common/RequestResourceMembers.java @@ -50,7 +50,7 @@ final class RequestResourceMembers { /** The keys a resource found by members does not take: it is read no other way, in the caller's account. */ private static final List FOUND_ONLY = List.of("absent", "arnOf", "account", "fixed", "before"); /** 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", "endpoint"); + private static final Set THROUGH_KEYS = Set.of("types", "through", "when", "endpoint"); /** * A top-level request member that holds a string, or a list of them when {@code list}, or, with a @@ -103,6 +103,14 @@ final class RequestResourceMembers { return arn.substring(0, at); } + /** + * Whether AWS owns the type's resources, its format's account being {@code aws} + * ({@code arn:${Partition}:sso::aws:applicationProvider/...}), so an ARN of one names none of the caller's. + */ + boolean awsOwned() { + return "aws".equals(format.split(":", 6)[4]); // partition-literal: the account AWS owns resources in + } + /** The one variable of a format whose resource ends in it ({@code event-bus/${EventBusName}}), from an ARN of it. */ String variable(String arn) { String resource = format.split(":", 6)[5]; @@ -134,8 +142,10 @@ final class RequestResourceMembers { * scalable dimension). A resource with an {@code endpoint} applies only to a request the service of that endpoint * prefix serves, where two APIs share the operation's name and nothing in a request tells them apart * (EventBridge's {@code events} and EventBridge V2's {@code eventsv2}); null for every request. A resource of one - * of {@code types} may be named {@code through} a member of one value naming a resource of its service's own the - * table gives no type, which runs on it (a Data API session, by its {@code SessionId}), and read no other way. + * of {@code types} may be named {@code through} a member naming, by each of its values, a resource of its + * service's own that runs on it, is in it or reaches it (a Data API session, by its {@code SessionId}; an EMR + * instance group, by its {@code InstanceGroups[].InstanceGroupId}), {@code when} the request gives the values it + * names, and read no other way. */ record Resource(List types, Member arn, Map fill, Map> when, Map> unless, Map absent, Map arnOf, @@ -266,15 +276,15 @@ final class RequestResourceMembers { } if (resource.has("through")) { List types = resource.path("types").valueStream().map(JsonNode::asText).toList(); - Member through = member(operation, resource.path("through").asText("")); - if (types.isEmpty() || !formats.keySet().containsAll(types) || through.list() || resource.properties() + Member through = fillMember(operation, resource.path("through").asText("")); + if (types.isEmpty() || !formats.keySet().containsAll(types) || resource.properties() .stream().map(Map.Entry::getKey).anyMatch(key -> !THROUGH_KEYS.contains(key))) { throw new IllegalStateException(RESOURCE_NAME + " names a resource of " + operation + " through " - + resource.path("through") + ", no member of one value naming types with a format, or beside " + + resource.path("through") + ", no member naming types with a format, or beside " + "members reading it otherwise"); } - return new Resource(types, null, Map.of(), Map.of(), Map.of(), Map.of(), Map.of(), null, null, Map.of(), - false, List.of(), endpoint, through); + return new Resource(types, null, Map.of(), values(operation, String.join(", ", types), resource.path("when")), + Map.of(), Map.of(), Map.of(), null, null, Map.of(), false, List.of(), endpoint, through); } if (resource.has("arn")) { List types = resource.path("types").valueStream().map(JsonNode::asText).toList(); diff --git a/src/main/java/io/github/hectorvent/floci/core/common/RequestResources.java b/src/main/java/io/github/hectorvent/floci/core/common/RequestResources.java index d7c12672ed..1a26eba51f 100644 --- a/src/main/java/io/github/hectorvent/floci/core/common/RequestResources.java +++ b/src/main/java/io/github/hectorvent/floci/core/common/RequestResources.java @@ -30,7 +30,7 @@ import java.util.regex.Pattern; * another account or Region than the request's is checked as given and as each resource of that name a handler may * act on instead, in the ARN's account or the caller's and in the ARN's Region or the request's, and the request is * refused if any is denied, as handlers mix them (ECR's tag handlers keep the ARN's account in the request's - * Region). + * Region); one of a resource AWS owns, whose account is {@code aws}, is checked in that account alone. */ public final class RequestResources { @@ -70,7 +70,7 @@ public final class RequestResources { * As {@link #of(String, ContainerRequestContext, String, String, String)}, a resource of a type whose service * mints an id after its name, or as all of its ARN, being the one {@code stored} finds for the caller under the * name or the members the request gives, or else its ARN with that id open, as it is with no {@code stored}; and - * one a request names through another of its service's own, the one {@code stored} gives, or none. + * those a request names through another of its service's own, the ones {@code stored} gives, or none. */ public static List of(String operation, ContainerRequestContext ctx, String partition, String region, String accountId, StoredResourceArns stored) { @@ -99,8 +99,8 @@ public final class RequestResources { for (String value : values(form, body, resource.arn())) { String named = before(value, resource.before()); resource.types().stream().map(formats::get).filter(format -> format.pattern().matcher(named).matches()) - .findFirst().ifPresent(format -> addNamed(arns, format.checked(named), partition, region, - accountId)); + .findFirst().ifPresent(format -> addNamed(arns, format.checked(named), format.awsOwned(), + partition, region, accountId)); } } else if (resource.through() != null) { through(arns, resource, formats, form, body, region, stored); @@ -152,7 +152,7 @@ public final class RequestResources { String under = parent.resource().substring(created.parentWord().length()); addNamed(arns, new AwsArnUtils.Arn(parent.partition(), parent.service(), parent.region(), parent.accountId(), created.childWord() + under + created.separator() + "*").toString(), - partition, region, accountId); + false, partition, region, accountId); } } return List.copyOf(arns); @@ -319,7 +319,8 @@ public final class RequestResources { if (resource.fill().size() == 1 && fromRequest == null) { List asArns = values.stream() .filter(value -> !isArnOf(named, value) && format.pattern().matcher(value).matches()).toList(); - asArns.forEach(value -> addNamed(arns, format.checked(value), partition, region, accountId)); + asArns.forEach(value -> addNamed(arns, format.checked(value), format.awsOwned(), partition, region, + accountId)); values = values.stream().filter(value -> !asArns.contains(value)).toList(); if (values.isEmpty()) { return; @@ -348,7 +349,8 @@ public final class RequestResources { addNamed(arns, withId(render(format.format(), filling.variables(), from.partition(), from.region().isEmpty() ? region : from.region(), from.accountId().isEmpty() ? accountId : from.accountId()), format, - resource.types().getFirst(), filling.variables(), null, region), partition, region, accountId); + resource.types().getFirst(), filling.variables(), null, region), format.awsOwned(), partition, + region, accountId); } } } @@ -380,21 +382,23 @@ public final class RequestResources { } /** - * The resource of one of the types a request names through a member naming another of its service's own, which - * runs on it ({@code through}), when the request gives it one value: the ARN {@code stored} gives for the caller's - * resource of that name; none when there is no such resource, which its handler refuses. + * The resources of the types a request names through a member naming another of its service's own, which runs on + * them, is in them or reaches them ({@code through}), for each value the request gives it: the ARNs + * {@code stored} gives for the caller's resource of that name; none for a value naming no such resource, which + * its handler refuses. */ private static void through(Set arns, RequestResourceMembers.Resource resource, Map formats, Map form, JsonNode body, String region, StoredResourceArns stored) { - List values = values(form, body, resource.through()); - if (stored == null || isNull(body, resource.through()) || values.size() != 1) { + if (stored == null || isNull(body, resource.through())) { return; } - stored.through(resource.through().name(), values.getFirst(), region) - .filter(arn -> resource.types().stream().map(formats::get) - .anyMatch(format -> format.pattern().matcher(arn).matches())) - .ifPresent(arns::add); + for (String value : values(form, body, resource.through())) { + stored.through(resource.through().path(), value, region).stream() + .filter(arn -> resource.types().stream().map(formats::get) + .anyMatch(format -> format.pattern().matcher(arn).matches())) + .forEach(arns::add); + } } /** Whether a member that may give an ARN of a type instead of its name gives one. */ @@ -450,15 +454,18 @@ public final class RequestResources { /** * An ARN the request names: as given, and, when it names another partition, account or Region than the * request's, as each resource of that name in the request's partition, in the ARN's account or the caller's and - * the ARN's Region or the request's, whichever its handler acts on. An ARN with no account or Region keeps none. + * the ARN's Region or the request's, whichever its handler acts on. An ARN with no account or Region keeps none, + * and one of a type AWS owns ({@code awsOwned}) its account, {@code aws}, which is no caller's. */ - private static void addNamed(Set arns, String arn, String partition, String region, String accountId) { + private static void addNamed(Set arns, String arn, boolean awsOwned, String partition, String region, + String accountId) { arns.add(arn); if (!AwsArnUtils.isArn(arn)) { return; } AwsArnUtils.Arn named = AwsArnUtils.parse(arn); - List accounts = named.accountId().isEmpty() ? List.of("") : List.of(named.accountId(), accountId); + List accounts = named.accountId().isEmpty() || awsOwned ? List.of(named.accountId()) + : List.of(named.accountId(), accountId); List regions = named.region().isEmpty() ? List.of("") : List.of(named.region(), region); for (String account : accounts) { for (String inRegion : regions) { diff --git a/src/main/java/io/github/hectorvent/floci/core/common/StoredResourceArns.java b/src/main/java/io/github/hectorvent/floci/core/common/StoredResourceArns.java index 57a8bb7a66..0ca6221f90 100644 --- a/src/main/java/io/github/hectorvent/floci/core/common/StoredResourceArns.java +++ b/src/main/java/io/github/hectorvent/floci/core/common/StoredResourceArns.java @@ -8,8 +8,9 @@ import java.util.Optional; * service knows: after the name a request gives ({@code connection//}), or as all of it, a request naming * the resource by members its ARN does not hold * ({@code scalable-target/}, named by its service namespace, resource id and scalable dimension; - * {@code workgroup/}, named by its name). Also the ARN of a resource a request names through another of its - * service's own, which the table gives no type (the cluster or workgroup a Data API session runs on). + * {@code workgroup/}, named by its name). Also the ARNs of the resources a request names through another of its + * service's own (the cluster or workgroup a Data API session runs on, the cluster an EMR instance group is in, the + * accounts an IAM Identity Center permission set is provisioned to). * *

The reader asks for every type of the namespace, not only for the ones whose ARN carries an id the service * mints, so a service may answer for a type whose ARN it does not mint: a key an alias names is the key the alias @@ -18,7 +19,8 @@ import java.util.Optional; *

Implemented by the service that owns such resources or whose requests name them (EventBridge, for its * connections and API destinations; Application Auto Scaling, for its scalable targets; Redshift Data, for the * Redshift Serverless workgroups it runs statements on and the targets of its sessions; Payment Cryptography, for - * the key an alias names); looked up lazily by {@code ResourceArnBuilder} through {@code Instance} + * the key an alias names; EMR, for the clusters of its instance groups; IAM Identity Center, for the accounts its + * permission sets are provisioned to); looked up lazily by {@code ResourceArnBuilder} through {@code Instance} * for the namespace a request is of, so IAM never depends on that service directly.

*/ public interface StoredResourceArns { @@ -35,12 +37,14 @@ public interface StoredResourceArns { Optional find(String type, List names, String region); /** - * The ARN of the resource the caller's resource named by {@code value} in its {@code member} runs on in the - * Region, as a request naming it runs there (the cluster or workgroup of a Data API session, by its - * {@code SessionId}); empty when the caller has none of that name, or the member is not one it reads. + * The ARNs of the resources the caller's resource named by {@code value} in {@code member}, as the table writes + * the member's path, runs on, is in or reaches in the Region, which a request naming it acts on (the cluster or + * workgroup of a Data API session, by its {@code SessionId}; the cluster of an instance group, by its + * {@code InstanceGroups[].InstanceGroupId}; the accounts of a permission set, by its {@code PermissionSetArn}); + * empty when the caller has none of that name, or the member is not one it reads. */ - default Optional through(String member, String value, String region) { - return Optional.empty(); + default List through(String member, String value, String region) { + return List.of(); } /** diff --git a/src/main/java/io/github/hectorvent/floci/services/emr/EmrHandler.java b/src/main/java/io/github/hectorvent/floci/services/emr/EmrHandler.java index 5cc7e24e4e..07ce1948be 100644 --- a/src/main/java/io/github/hectorvent/floci/services/emr/EmrHandler.java +++ b/src/main/java/io/github/hectorvent/floci/services/emr/EmrHandler.java @@ -462,13 +462,18 @@ public class EmrHandler { private Response handleModifyInstanceGroups(JsonNode request, String region) { List modifications = new ArrayList<>(); - for (JsonNode g : request.path("InstanceGroups")) { - JsonNode count = g.path("InstanceCount"); - JsonNode configurations = g.path("Configurations"); - modifications.add(new EmrService.InstanceGroupModification( - g.path("InstanceGroupId").asText(null), - count.isMissingNode() || count.isNull() ? null : count.asInt(), - configurations.isArray() ? configurations.toString() : null)); + // Only a list names groups, as the other list members here and the IAM check read one: any other + // InstanceGroups names none, which the service refuses. + JsonNode groups = request.path("InstanceGroups"); + if (groups.isArray()) { + for (JsonNode g : groups) { + JsonNode count = g.path("InstanceCount"); + JsonNode configurations = g.path("Configurations"); + modifications.add(new EmrService.InstanceGroupModification( + g.path("InstanceGroupId").asText(null), + count.isMissingNode() || count.isNull() ? null : count.asInt(), + configurations.isArray() ? configurations.toString() : null)); + } } service.modifyInstanceGroups(text(request, "ClusterId"), region, modifications); return Response.ok(objectMapper.createObjectNode()).build(); diff --git a/src/main/java/io/github/hectorvent/floci/services/emr/EmrService.java b/src/main/java/io/github/hectorvent/floci/services/emr/EmrService.java index a937271757..3454c817a3 100644 --- a/src/main/java/io/github/hectorvent/floci/services/emr/EmrService.java +++ b/src/main/java/io/github/hectorvent/floci/services/emr/EmrService.java @@ -14,6 +14,7 @@ import io.github.hectorvent.floci.core.common.RegionResolver; import io.github.hectorvent.floci.core.common.RequestScopes; import io.github.hectorvent.floci.core.common.Resettable; import io.github.hectorvent.floci.core.common.SmithyValidationErrors; +import io.github.hectorvent.floci.core.common.StoredResourceArns; import io.github.hectorvent.floci.core.storage.AccountAwareStorageBackend; import io.github.hectorvent.floci.core.storage.StorageBackend; import io.github.hectorvent.floci.core.storage.StorageFactory; @@ -74,7 +75,7 @@ import java.util.function.Supplier; * BOOTSTRAPPING, and leave the image its steps then run in. */ @ApplicationScoped -public class EmrService implements Resettable { +public class EmrService implements Resettable, StoredResourceArns { private static final Logger LOG = Logger.getLogger(EmrService.class); private static final String UPPER_ALNUM = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; @@ -584,6 +585,28 @@ public class EmrService implements Resettable { }); } + @Override + public String namespace() { + return "elasticmapreduce"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + /** + * The cluster an instance group a {@code ModifyInstanceGroups} names by its id alone is in, the one + * {@link #modifyInstanceGroups} finds it in and changes it there, read under the service's lock, as + * {@code addInstanceGroups} adds to a cluster's groups. + */ + @Override + public List through(String member, String value, String region) { + return "InstanceGroups[].InstanceGroupId".equals(member) + ? call(() -> clusterWithGroup(region, value).map(EmrCluster::getClusterArn).stream().toList()) + : List.of(); + } + public List listInstanceGroups(String clusterId) { return call(() -> snapshotOf(requireCluster(clusterId)).getInstanceGroups()); } @@ -1024,12 +1047,17 @@ public class EmrService implements Resettable { if (instanceGroupId == null) { throw invalid("InstanceGroupId is required."); } + return clusterWithGroup(region, instanceGroupId) + .map(this::settle) + .orElseThrow(() -> invalid("Instance group " + instanceGroupId + " is not valid.")); + } + + /** The caller's cluster in the Region that has the instance group, as stored. */ + private Optional clusterWithGroup(String region, String instanceGroupId) { return clusterStore.scan(k -> true).stream() .filter(c -> region.equals(c.getRegion())) .filter(c -> c.getInstanceGroups().stream().anyMatch(g -> instanceGroupId.equals(g.getId()))) - .findFirst() - .map(this::settle) - .orElseThrow(() -> invalid("Instance group " + instanceGroupId + " is not valid.")); + .findFirst(); } private static AwsException invalid(String message) { diff --git a/src/main/java/io/github/hectorvent/floci/services/redshiftdata/RedshiftDataService.java b/src/main/java/io/github/hectorvent/floci/services/redshiftdata/RedshiftDataService.java index 80e8fbf4fc..97ccc3f19a 100644 --- a/src/main/java/io/github/hectorvent/floci/services/redshiftdata/RedshiftDataService.java +++ b/src/main/java/io/github/hectorvent/floci/services/redshiftdata/RedshiftDataService.java @@ -234,8 +234,9 @@ public class RedshiftDataService implements Resettable, StoredResourceArns { /** The cluster or workgroup the caller's open session runs on, named by its {@code SessionId}, as it reads it. */ @Override - public Optional through(String member, String value, String region) { - return "SessionId".equals(member) ? sessions.targetArn(sessionScope(region, null), value) : Optional.empty(); + public List through(String member, String value, String region) { + return "SessionId".equals(member) ? sessions.targetArn(sessionScope(region, null), value).stream().toList() + : List.of(); } private Admission replay(RedshiftDataIdempotencyStore.Receipt receipt, RedshiftDataIdempotencyStore.Scope scope, diff --git a/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminService.java b/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminService.java index b47b61c76c..7315633531 100644 --- a/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminService.java +++ b/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminService.java @@ -10,6 +10,7 @@ import io.github.hectorvent.floci.core.common.EpochSeconds; import io.github.hectorvent.floci.core.common.PaginatedResult; import io.github.hectorvent.floci.core.common.Pagination; import io.github.hectorvent.floci.core.common.Resettable; +import io.github.hectorvent.floci.core.common.StoredResourceArns; import io.github.hectorvent.floci.core.storage.AccountAwareStorageBackend; import io.github.hectorvent.floci.core.storage.StorageBackend; import io.github.hectorvent.floci.core.storage.StorageFactory; @@ -64,7 +65,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; @ApplicationScoped -public class SsoAdminService implements Resettable { +public class SsoAdminService implements Resettable, StoredResourceArns { private static final String BOOTSTRAP_INSTANCE = "instance/ssoins-7223b02a5d9f7c8e"; private static final String IDENTITY_STORE_ID = "d-9067f2a3c1"; private static final Pattern INSTANCE_ARN_PATTERN = Pattern.compile("arn:" + AwsArnUtils.PARTITION_REGEX + ":sso:::instance/(?:sso)?ins-[a-zA-Z0-9-.]{16}"); @@ -1874,10 +1875,7 @@ public class SsoAdminService implements Resettable { if (targetId != null) { throw validation("TargetId must not be provided when TargetType is ALL_PROVISIONED_ACCOUNTS."); } - permissionSetProvisionings.scan(key -> true).stream() - .filter(provisioning -> permissionSetArn.equals(provisioning.permissionSetArn())) - .map(PermissionSetProvisioning::accountId) - .distinct() + provisionedAccounts(permissionSetArn) .forEach(accountId -> ensurePermissionSetProvisioned(permissionSetArn, accountId)); } else { throw validation("TargetType must be AWS_ACCOUNT or ALL_PROVISIONED_ACCOUNTS."); @@ -1889,6 +1887,40 @@ public class SsoAdminService implements Resettable { return operation; } + /** The accounts the permission set is provisioned to. */ + private List provisionedAccounts(String permissionSetArn) { + return permissionSetProvisionings.scan(key -> true).stream() + .filter(provisioning -> permissionSetArn.equals(provisioning.permissionSetArn())) + .map(PermissionSetProvisioning::accountId) + .distinct() + .toList(); + } + + @Override + public String namespace() { + return "sso"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + /** + * The accounts a permission set is provisioned to, in its partition, which a {@code ProvisionPermissionSet} for + * {@code ALL_PROVISIONED_ACCOUNTS} provisions it to again, as {@link #provisionPermissionSet} does. + */ + @Override + public List through(String member, String value, String region) { + if (!"PermissionSetArn".equals(member) || !AwsArnUtils.isArn(value)) { + return List.of(); + } + String partition = AwsArnUtils.parse(value).partition(); + return provisionedAccounts(value).stream() + .map(accountId -> AwsArnUtils.Arn.global(partition, "sso", "", "account/" + accountId).toString()) + .toList(); + } + private void ensurePermissionSetProvisioned(String permissionSetArn, String accountId) { String key = permissionSetArn + "::" + accountId; permissionSetProvisionings.put(key, new PermissionSetProvisioning( diff --git a/src/main/resources/aws/iam-request-resources.json b/src/main/resources/aws/iam-request-resources.json index a5f1f9ef4c..75c73dc691 100644 --- a/src/main/resources/aws/iam-request-resources.json +++ b/src/main/resources/aws/iam-request-resources.json @@ -1,11 +1,11 @@ { - "_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-03", "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": {"acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "cur": ["cur"], "dynamodb": ["dynamodb"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "redshift-data": ["redshift-data"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"]}, + "_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.113 (installed package)", "retrieved": "2026-11-03", "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": {"acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "redshift-data": ["redshift-data"], "rekognition": ["rekognition"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"]}, "clientsNotRead": {"kinesisanalytics": "Kinesis Data Analytics v1, SQL applications on the KinesisAnalytics_20150814 target, which Floci does not serve (it serves v2, kinesisanalyticsv2); its operations share v2's names and name their resources by other members"}, "handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "lambda", "logs", "pipes", "resource-groups", "s3", "scheduler", "secretsmanager", "sns", "sqs", "ssm", "sts"], - "notCovered": {"access-analyzer": "REST: its requests name their resources in the path, which RequestResources does not read yet", "account": "REST: its requests name their resources in the path, which RequestResources does not read yet", "airflow": "REST: its requests name their resources in the path, which RequestResources does not read yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appsync": "REST: its requests name their resources in the path, which RequestResources does not read yet", "aps": "REST: its requests name their resources in the path, which RequestResources does not read 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 does not read yet", "batch": "REST: its requests name their resources in the path, which RequestResources does not read yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudfront": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rule does not fill a name from, so nearly every operation needs a correction", "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 does not read 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 does not read 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 does not read yet", "controlcatalog": "REST: its requests name their resources in the path, which RequestResources does not read yet", "controltower": "REST: its requests name their resources in the path, which RequestResources does not read yet", "datasync": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "detective": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dlm": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ecs": "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: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources does not read yet", "elasticmapreduce": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "emr-serverless": "REST: its requests name their resources in the path, which RequestResources does not read yet", "es": "REST: its requests name their resources in the path, which RequestResources does not read yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources does not read yet", "fis": "REST: its requests name their resources in the path, which RequestResources does not read yet", "glue": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "guardduty": "REST: its requests name their resources in the path, which RequestResources does not read yet", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "inspector2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "macie2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "oam": "REST: its requests name their resources in the path, which RequestResources does not read yet", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ram": "REST: its requests name their resources in the path, which RequestResources does not read yet", "rds": "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 does not read yet", "redshift": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "redshift-serverless": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rekognition": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "resource-explorer-2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "route53": "REST: its requests name their resources in the path, which RequestResources does not read 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 does not read yet", "s3tables": "REST: its requests name their resources in the path, which RequestResources does not read yet", "s3vectors": "REST: its requests name their resources in the path, which RequestResources does not read yet", "sagemaker": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "securityhub": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "sso": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources does not read 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"}, + "notCovered": {"access-analyzer": "REST: its requests name their resources in the path, which RequestResources does not read yet", "account": "REST: its requests name their resources in the path, which RequestResources does not read yet", "airflow": "REST: its requests name their resources in the path, which RequestResources does not read yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources does not read yet", "appsync": "REST: its requests name their resources in the path, which RequestResources does not read yet", "aps": "REST: its requests name their resources in the path, which RequestResources does not read 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 does not read yet", "batch": "REST: its requests name their resources in the path, which RequestResources does not read yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudfront": "REST: its requests name their resources in the path, which RequestResources does not read yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rule does not fill a name from, so nearly every operation needs a correction", "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 does not read 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 does not read 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 does not read yet", "controlcatalog": "REST: its requests name their resources in the path, which RequestResources does not read yet", "controltower": "REST: its requests name their resources in the path, which RequestResources does not read yet", "detective": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dlm": "REST: its requests name their resources in the path, which RequestResources does not read yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ecs": "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 does not read yet", "emr-serverless": "REST: its requests name their resources in the path, which RequestResources does not read yet", "es": "REST: its requests name their resources in the path, which RequestResources does not read yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources does not read yet", "fis": "REST: its requests name their resources in the path, which RequestResources does not read yet", "glue": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "guardduty": "REST: its requests name their resources in the path, which RequestResources does not read yet", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "inspector2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "macie2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "oam": "REST: its requests name their resources in the path, which RequestResources does not read yet", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ram": "REST: its requests name their resources in the path, which RequestResources does not read yet", "rds": "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 does not read yet", "redshift": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "redshift-serverless": "not read yet: its namespace, workgroup, snapshot and managed VPC endpoint ARNs end in an id the service mints, `namespace/`, while its requests name them by namespaceName, workgroupName, snapshotName and endpointName, so reading it needs the stored ARNs those find, as Redshift Data's workgroups are found", "resource-explorer-2": "REST: its requests name their resources in the path, which RequestResources does not read yet", "route53": "REST: its requests name their resources in the path, which RequestResources does not read 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 does not read yet", "s3tables": "REST: its requests name their resources in the path, which RequestResources does not read yet", "s3vectors": "REST: its requests name their resources in the path, which RequestResources does not read yet", "sagemaker": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "securityhub": "REST: its requests name their resources in the path, which RequestResources does not read yet", "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 does not read yet", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources does not read 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", "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", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudfront-keyvaluestore", "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", "ec2-instance-connect", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "emr-containers", "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", "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", "quicksight", "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", "signer", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "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", "xray"], - "arnFormats": {"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}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "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}", "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}"}, "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}"}, "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}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "dynamodb": {"backup": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/backup/${BackupName}", "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}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "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}"}, "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}"}, "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}"}, "kinesisanalytics": {"application": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:application/${ApplicationName}"}, "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}"}, "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}"}, "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}"}, "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}"}, "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}"}, "textract": {"adapter": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}", "adapterversion": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}/versions/${AdapterVersion}"}, "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}"}}, + "arnFormats": {"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}"}, "application-autoscaling": {"ScalableTarget": "arn:${Partition}:application-autoscaling:${Region}:${Account}:scalable-target/${ResourceId}"}, "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}", "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}"}, "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}"}, "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}"}, "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}"}, "dynamodb": {"backup": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/backup/${BackupName}", "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}"}, "ecr": {"repository": "arn:${Partition}:ecr:${Region}:${Account}:repository/${RepositoryName}"}, "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}"}, "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}"}, "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}"}, "kinesisanalytics": {"application": "arn:${Partition}:kinesisanalytics:${Region}:${Account}:application/${ApplicationName}"}, "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}"}, "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}"}, "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}"}, "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}"}, "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}"}, "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}"}, "textract": {"adapter": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}", "adapterversion": "arn:${Partition}:textract:${Region}:${Account}:/adapters/${AdapterId}/versions/${AdapterVersion}"}, "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}"}}, "unqualified": {"states": ["statemachine"]}, "mintedIds": {"events": ["api-destination", "connection"]}, "operations": { @@ -579,6 +579,59 @@ "cur:PutReportDefinition": {"action": "cur:PutReportDefinition", "types": ["cur"], "resources": [{"type": "cur", "fill": {"ReportName": "ReportDefinition.ReportName"}}]}, "cur:TagResource": {"action": "cur:TagResource", "types": ["cur"], "resources": [{"type": "cur", "fill": {"ReportName": "ReportName"}}]}, "cur:UntagResource": {"action": "cur:UntagResource", "types": ["cur"], "resources": [{"type": "cur", "fill": {"ReportName": "ReportName"}}]}, + "datasync:CancelTaskExecution": {"action": "datasync:CancelTaskExecution", "types": ["taskexecution"], "resources": [{"types": ["taskexecution"], "arn": "TaskExecutionArn"}]}, + "datasync:CreateAgent": {"action": "datasync:CreateAgent", "types": [], "resources": []}, + "datasync:CreateLocationAzureBlob": {"action": "datasync:CreateLocationAzureBlob", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}, {"types": ["agent"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretArn"}]}, + "datasync:CreateLocationEfs": {"action": "datasync:CreateLocationEfs", "types": [], "resources": []}, + "datasync:CreateLocationFsxLustre": {"action": "datasync:CreateLocationFsxLustre", "types": [], "resources": []}, + "datasync:CreateLocationFsxOntap": {"action": "datasync:CreateLocationFsxOntap", "types": [], "resources": []}, + "datasync:CreateLocationFsxOpenZfs": {"action": "datasync:CreateLocationFsxOpenZfs", "types": [], "resources": []}, + "datasync:CreateLocationFsxWindows": {"action": "datasync:CreateLocationFsxWindows", "types": [], "resources": []}, + "datasync:CreateLocationHdfs": {"action": "datasync:CreateLocationHdfs", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}, {"types": ["agent"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretArn"}]}, + "datasync:CreateLocationNfs": {"action": "datasync:CreateLocationNfs", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "OnPremConfig.AgentArns[]"}]}, + "datasync:CreateLocationObjectStorage": {"action": "datasync:CreateLocationObjectStorage", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}, {"types": ["agent"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretArn"}]}, + "datasync:CreateLocationS3": {"action": "datasync:CreateLocationS3", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}, {"types": ["agent"], "arn": "S3BucketArn"}, {"types": ["agent"], "arn": "S3Config.BucketAccessRoleArn"}]}, + "datasync:CreateLocationSmb": {"action": "datasync:CreateLocationSmb", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}, {"types": ["agent"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent"], "arn": "CustomSecretConfig.SecretArn"}]}, + "datasync:CreateTask": {"action": "datasync:CreateTask", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "CloudWatchLogGroupArn"}, {"types": ["agent", "location"], "arn": "DestinationLocationArn"}, {"types": ["agent", "location"], "arn": "SourceLocationArn"}]}, + "datasync:DeleteAgent": {"action": "datasync:DeleteAgent", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArn"}]}, + "datasync:DeleteLocation": {"action": "datasync:DeleteLocation", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DeleteTask": {"action": "datasync:DeleteTask", "types": ["task"], "resources": [{"types": ["task"], "arn": "TaskArn"}]}, + "datasync:DescribeAgent": {"action": "datasync:DescribeAgent", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArn"}]}, + "datasync:DescribeLocationAzureBlob": {"action": "datasync:DescribeLocationAzureBlob", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationEfs": {"action": "datasync:DescribeLocationEfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationFsxLustre": {"action": "datasync:DescribeLocationFsxLustre", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationFsxOntap": {"action": "datasync:DescribeLocationFsxOntap", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationFsxOpenZfs": {"action": "datasync:DescribeLocationFsxOpenZfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationFsxWindows": {"action": "datasync:DescribeLocationFsxWindows", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationHdfs": {"action": "datasync:DescribeLocationHdfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationNfs": {"action": "datasync:DescribeLocationNfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationObjectStorage": {"action": "datasync:DescribeLocationObjectStorage", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationS3": {"action": "datasync:DescribeLocationS3", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeLocationSmb": {"action": "datasync:DescribeLocationSmb", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:DescribeTask": {"action": "datasync:DescribeTask", "types": ["task"], "resources": [{"types": ["task"], "arn": "TaskArn"}]}, + "datasync:DescribeTaskExecution": {"action": "datasync:DescribeTaskExecution", "types": ["taskexecution"], "resources": [{"types": ["taskexecution"], "arn": "TaskExecutionArn"}]}, + "datasync:ListAgents": {"action": "datasync:ListAgents", "types": [], "resources": []}, + "datasync:ListLocations": {"action": "datasync:ListLocations", "types": [], "resources": []}, + "datasync:ListTagsForResource": {"action": "datasync:ListTagsForResource", "types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "resources": [{"types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "arn": "ResourceArn"}]}, + "datasync:ListTaskExecutions": {"action": "datasync:ListTaskExecutions", "types": [], "resources": []}, + "datasync:ListTasks": {"action": "datasync:ListTasks", "types": [], "resources": []}, + "datasync:StartTaskExecution": {"action": "datasync:StartTaskExecution", "types": ["task"], "resources": [{"types": ["task"], "arn": "TaskArn"}]}, + "datasync:TagResource": {"action": "datasync:TagResource", "types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "resources": [{"types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "arn": "ResourceArn"}]}, + "datasync:UntagResource": {"action": "datasync:UntagResource", "types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "resources": [{"types": ["agent", "discoveryjob", "location", "storagesystem", "task", "taskexecution"], "arn": "ResourceArn"}]}, + "datasync:UpdateAgent": {"action": "datasync:UpdateAgent", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArn"}]}, + "datasync:UpdateLocationAzureBlob": {"action": "datasync:UpdateLocationAzureBlob", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationEfs": {"action": "datasync:UpdateLocationEfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "AccessPointArn"}, {"types": ["location"], "arn": "FileSystemAccessRoleArn"}, {"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationFsxLustre": {"action": "datasync:UpdateLocationFsxLustre", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationFsxOntap": {"action": "datasync:UpdateLocationFsxOntap", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationFsxOpenZfs": {"action": "datasync:UpdateLocationFsxOpenZfs", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationFsxWindows": {"action": "datasync:UpdateLocationFsxWindows", "types": ["location"], "resources": [{"types": ["location"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["location"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["location"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["location"], "arn": "CustomSecretConfig.SecretArn"}, {"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationHdfs": {"action": "datasync:UpdateLocationHdfs", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationNfs": {"action": "datasync:UpdateLocationNfs", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "LocationArn"}, {"types": ["agent", "location"], "arn": "OnPremConfig.AgentArns[]"}]}, + "datasync:UpdateLocationObjectStorage": {"action": "datasync:UpdateLocationObjectStorage", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationS3": {"action": "datasync:UpdateLocationS3", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}, {"types": ["location"], "arn": "S3Config.BucketAccessRoleArn"}]}, + "datasync:UpdateLocationSmb": {"action": "datasync:UpdateLocationSmb", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.KmsKeyArn"}, {"types": ["agent", "location"], "arn": "CmkSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretAccessRoleArn"}, {"types": ["agent", "location"], "arn": "CustomSecretConfig.SecretArn"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateTask": {"action": "datasync:UpdateTask", "types": ["task"], "resources": [{"types": ["task"], "arn": "CloudWatchLogGroupArn"}, {"types": ["task"], "arn": "TaskArn"}]}, + "datasync:UpdateTaskExecution": {"action": "datasync:UpdateTaskExecution", "types": ["taskexecution"], "resources": [{"types": ["taskexecution"], "arn": "TaskExecutionArn"}]}, "dynamodb:ListTables": {"action": "dynamodb:ListTables", "types": [], "resources": [{"type": "table", "fill": {}}]}, "ecr:BatchCheckLayerAvailability": {"action": "ecr:BatchCheckLayerAvailability", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]}, "ecr:BatchDeleteImage": {"action": "ecr:BatchDeleteImage", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]}, @@ -713,6 +766,71 @@ "elasticloadbalancing:SetRulePriorities": {"action": "elasticloadbalancing:SetRulePriorities", "types": ["listener-rule/app", "listener-rule/net"], "resources": [{"types": ["listener-rule/app", "listener-rule/net"], "arn": "RulePriorities[].RuleArn"}]}, "elasticloadbalancing:SetSecurityGroups": {"action": "elasticloadbalancing:SetSecurityGroups", "types": ["loadbalancer/app/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:SetSubnets": {"action": "elasticloadbalancing:SetSubnets", "types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, + "elasticmapreduce:AddInstanceFleet": {"action": "elasticmapreduce:AddInstanceFleet", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:AddInstanceGroups": {"action": "elasticmapreduce:AddInstanceGroups", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowId"}}]}, + "elasticmapreduce:AddJobFlowSteps": {"action": "elasticmapreduce:AddJobFlowSteps", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowId"}}]}, + "elasticmapreduce:AddTags": {"action": "elasticmapreduce:AddTags", "types": ["cluster", "editor", "notebook-execution", "session", "studio"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ResourceId"}}]}, + "elasticmapreduce:CancelSteps": {"action": "elasticmapreduce:CancelSteps", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:CreatePersistentAppUI": {"action": "elasticmapreduce:CreatePersistentAppUI", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "TargetResourceArn"}]}, + "elasticmapreduce:CreateSecurityConfiguration": {"action": "elasticmapreduce:CreateSecurityConfiguration", "types": [], "resources": []}, + "elasticmapreduce:CreateStudio": {"action": "elasticmapreduce:CreateStudio", "types": [], "resources": []}, + "elasticmapreduce:CreateStudioSessionMapping": {"action": "elasticmapreduce:CreateStudioSessionMapping", "types": ["studio"], "resources": [{"types": ["studio"], "arn": "SessionPolicyArn"}, {"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:DeleteSecurityConfiguration": {"action": "elasticmapreduce:DeleteSecurityConfiguration", "types": [], "resources": []}, + "elasticmapreduce:DeleteStudio": {"action": "elasticmapreduce:DeleteStudio", "types": ["studio"], "resources": [{"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:DeleteStudioSessionMapping": {"action": "elasticmapreduce:DeleteStudioSessionMapping", "types": ["studio"], "resources": [{"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:DescribeCluster": {"action": "elasticmapreduce:DescribeCluster", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:DescribeJobFlows": {"action": "elasticmapreduce:DescribeJobFlows", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:DescribeNotebookExecution": {"action": "elasticmapreduce:DescribeNotebookExecution", "types": ["notebook-execution"], "resources": [{"type": "notebook-execution", "fill": {"NotebookExecutionId": "NotebookExecutionId"}}]}, + "elasticmapreduce:DescribePersistentAppUI": {"action": "elasticmapreduce:DescribePersistentAppUI", "types": ["cluster"], "resources": []}, + "elasticmapreduce:DescribeReleaseLabel": {"action": "elasticmapreduce:DescribeReleaseLabel", "types": [], "resources": []}, + "elasticmapreduce:DescribeSecurityConfiguration": {"action": "elasticmapreduce:DescribeSecurityConfiguration", "types": [], "resources": []}, + "elasticmapreduce:DescribeStep": {"action": "elasticmapreduce:DescribeStep", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:DescribeStudio": {"action": "elasticmapreduce:DescribeStudio", "types": ["studio"], "resources": [{"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:GetAutoTerminationPolicy": {"action": "elasticmapreduce:GetAutoTerminationPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:GetBlockPublicAccessConfiguration": {"action": "elasticmapreduce:GetBlockPublicAccessConfiguration", "types": [], "resources": []}, + "elasticmapreduce:GetClusterSessionCredentials": {"action": "elasticmapreduce:GetClusterSessionCredentials", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ExecutionRoleArn"}, {"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:GetManagedScalingPolicy": {"action": "elasticmapreduce:GetManagedScalingPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:GetOnClusterAppUIPresignedURL": {"action": "elasticmapreduce:GetOnClusterAppUIPresignedURL", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ExecutionRoleArn"}, {"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:GetPersistentAppUIPresignedURL": {"action": "elasticmapreduce:GetPersistentAppUIPresignedURL", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ExecutionRoleArn"}]}, + "elasticmapreduce:GetSession": {"action": "elasticmapreduce:GetSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ClusterId": "ClusterId", "SessionId": "SessionId"}}]}, + "elasticmapreduce:GetSessionEndpoint": {"action": "elasticmapreduce:GetSessionEndpoint", "types": ["session"], "resources": [{"type": "session", "fill": {"ClusterId": "ClusterId", "SessionId": "SessionId"}}]}, + "elasticmapreduce:GetStudioSessionMapping": {"action": "elasticmapreduce:GetStudioSessionMapping", "types": ["studio"], "resources": [{"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:ListBootstrapActions": {"action": "elasticmapreduce:ListBootstrapActions", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListClusters": {"action": "elasticmapreduce:ListClusters", "types": [], "resources": []}, + "elasticmapreduce:ListInstanceFleets": {"action": "elasticmapreduce:ListInstanceFleets", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListInstanceGroups": {"action": "elasticmapreduce:ListInstanceGroups", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListInstances": {"action": "elasticmapreduce:ListInstances", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListNotebookExecutions": {"action": "elasticmapreduce:ListNotebookExecutions", "types": [], "resources": []}, + "elasticmapreduce:ListReleaseLabels": {"action": "elasticmapreduce:ListReleaseLabels", "types": [], "resources": []}, + "elasticmapreduce:ListSecurityConfigurations": {"action": "elasticmapreduce:ListSecurityConfigurations", "types": [], "resources": []}, + "elasticmapreduce:ListSessions": {"action": "elasticmapreduce:ListSessions", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListSteps": {"action": "elasticmapreduce:ListSteps", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ListStudioSessionMappings": {"action": "elasticmapreduce:ListStudioSessionMappings", "types": [], "resources": []}, + "elasticmapreduce:ListStudios": {"action": "elasticmapreduce:ListStudios", "types": [], "resources": []}, + "elasticmapreduce:ListSupportedInstanceTypes": {"action": "elasticmapreduce:ListSupportedInstanceTypes", "types": [], "resources": []}, + "elasticmapreduce:ModifyCluster": {"action": "elasticmapreduce:ModifyCluster", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ModifyInstanceFleet": {"action": "elasticmapreduce:ModifyInstanceFleet", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:ModifyInstanceGroups": {"action": "elasticmapreduce:ModifyInstanceGroups", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}, "unless": {"ClusterId": [null]}}, {"types": ["cluster"], "through": "InstanceGroups[].InstanceGroupId", "when": {"ClusterId": [null]}}]}, + "elasticmapreduce:PutAutoScalingPolicy": {"action": "elasticmapreduce:PutAutoScalingPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:PutAutoTerminationPolicy": {"action": "elasticmapreduce:PutAutoTerminationPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:PutBlockPublicAccessConfiguration": {"action": "elasticmapreduce:PutBlockPublicAccessConfiguration", "types": [], "resources": []}, + "elasticmapreduce:PutManagedScalingPolicy": {"action": "elasticmapreduce:PutManagedScalingPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:RemoveAutoScalingPolicy": {"action": "elasticmapreduce:RemoveAutoScalingPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:RemoveAutoTerminationPolicy": {"action": "elasticmapreduce:RemoveAutoTerminationPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:RemoveManagedScalingPolicy": {"action": "elasticmapreduce:RemoveManagedScalingPolicy", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:RemoveTags": {"action": "elasticmapreduce:RemoveTags", "types": ["cluster", "editor", "notebook-execution", "session", "studio"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ResourceId"}}]}, + "elasticmapreduce:RunJobFlow": {"action": "elasticmapreduce:RunJobFlow", "types": [], "resources": []}, + "elasticmapreduce:SetKeepJobFlowAliveWhenNoSteps": {"action": "elasticmapreduce:SetKeepJobFlowAliveWhenNoSteps", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:SetTerminationProtection": {"action": "elasticmapreduce:SetTerminationProtection", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:SetUnhealthyNodeReplacement": {"action": "elasticmapreduce:SetUnhealthyNodeReplacement", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:SetVisibleToAllUsers": {"action": "elasticmapreduce:SetVisibleToAllUsers", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:StartNotebookExecution": {"action": "elasticmapreduce:StartNotebookExecution", "types": ["cluster", "editor"], "resources": [{"types": ["cluster", "editor"], "arn": "ExecutionEngine.ExecutionRoleArn"}, {"type": "editor", "fill": {"EditorId": "EditorId"}}]}, + "elasticmapreduce:StartSession": {"action": "elasticmapreduce:StartSession", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ExecutionRoleArn"}, {"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]}, + "elasticmapreduce:StopNotebookExecution": {"action": "elasticmapreduce:StopNotebookExecution", "types": ["notebook-execution"], "resources": [{"type": "notebook-execution", "fill": {"NotebookExecutionId": "NotebookExecutionId"}}]}, + "elasticmapreduce:TerminateJobFlows": {"action": "elasticmapreduce:TerminateJobFlows", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}]}, + "elasticmapreduce:TerminateSession": {"action": "elasticmapreduce:TerminateSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ClusterId": "ClusterId", "SessionId": "SessionId"}}]}, + "elasticmapreduce:UpdateStudio": {"action": "elasticmapreduce:UpdateStudio", "types": ["studio"], "resources": [{"types": ["studio"], "arn": "EncryptionKeyArn"}, {"type": "studio", "fill": {"StudioId": "StudioId"}}]}, + "elasticmapreduce:UpdateStudioSessionMapping": {"action": "elasticmapreduce:UpdateStudioSessionMapping", "types": ["studio"], "resources": [{"types": ["studio"], "arn": "SessionPolicyArn"}, {"type": "studio", "fill": {"StudioId": "StudioId"}}]}, "events:ActivateEventSource": {"action": "events:ActivateEventSource", "types": ["event-source"], "resources": [{"type": "event-source", "fill": {"EventSourceName": "Name"}}]}, "events:CancelReplay": {"action": "events:CancelReplay", "types": ["replay"], "resources": [{"type": "replay", "fill": {"ReplayName": "ReplayName"}}]}, "events:CreateApiDestination": {"action": "events:CreateApiDestination", "types": ["api-destination", "connection"], "resources": [{"types": ["api-destination", "connection"], "arn": "ConnectionArn"}, {"type": "api-destination", "fill": {"ApiDestinationName": "Name"}, "made": true}]}, @@ -957,6 +1075,81 @@ "redshift-data:ListSessions": {"action": "redshift-data:ListSessions", "types": [], "resources": []}, "redshift-data:ListStatements": {"action": "redshift-data:ListStatements", "types": [], "resources": []}, "redshift-data:ListTables": {"action": "redshift-data:ListTables", "types": ["cluster", "workgroup"], "resources": [{"types": ["cluster", "workgroup"], "arn": "SecretArn"}, {"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}, {"type": "workgroup", "fill": {}, "find": ["WorkgroupName"]}]}, + "rekognition:AssociateFaces": {"action": "rekognition:AssociateFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:CompareFaces": {"action": "rekognition:CompareFaces", "types": [], "resources": []}, + "rekognition:CopyProjectVersion": {"action": "rekognition:CopyProjectVersion", "types": ["project", "projectversion"], "resources": [{"types": ["project", "projectversion"], "arn": "DestinationProjectArn"}, {"types": ["project", "projectversion"], "arn": "SourceProjectArn"}, {"types": ["project", "projectversion"], "arn": "SourceProjectVersionArn"}, {"type": "projectversion", "fill": {"VersionName": "VersionName"}, "made": true}]}, + "rekognition:CreateCollection": {"action": "rekognition:CreateCollection", "types": [], "resources": []}, + "rekognition:CreateDataset": {"action": "rekognition:CreateDataset", "types": ["project"], "resources": [{"types": ["project"], "arn": "DatasetSource.DatasetArn"}, {"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:CreateFaceLivenessSession": {"action": "rekognition:CreateFaceLivenessSession", "types": [], "resources": []}, + "rekognition:CreateProject": {"action": "rekognition:CreateProject", "types": [], "resources": []}, + "rekognition:CreateProjectVersion": {"action": "rekognition:CreateProjectVersion", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:CreateStreamProcessor": {"action": "rekognition:CreateStreamProcessor", "types": ["collection"], "resources": [{"types": ["collection"], "arn": "NotificationChannel.SNSTopicArn"}, {"types": ["collection"], "arn": "RoleArn"}]}, + "rekognition:CreateUser": {"action": "rekognition:CreateUser", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DeleteCollection": {"action": "rekognition:DeleteCollection", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DeleteDataset": {"action": "rekognition:DeleteDataset", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "DatasetArn"}]}, + "rekognition:DeleteFaces": {"action": "rekognition:DeleteFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DeleteProject": {"action": "rekognition:DeleteProject", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:DeleteProjectPolicy": {"action": "rekognition:DeleteProjectPolicy", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:DeleteProjectVersion": {"action": "rekognition:DeleteProjectVersion", "types": ["projectversion"], "resources": [{"types": ["projectversion"], "arn": "ProjectVersionArn"}]}, + "rekognition:DeleteStreamProcessor": {"action": "rekognition:DeleteStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}]}, + "rekognition:DeleteUser": {"action": "rekognition:DeleteUser", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DescribeCollection": {"action": "rekognition:DescribeCollection", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DescribeDataset": {"action": "rekognition:DescribeDataset", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "DatasetArn"}]}, + "rekognition:DescribeProjectVersions": {"action": "rekognition:DescribeProjectVersions", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:DescribeProjects": {"action": "rekognition:DescribeProjects", "types": [], "resources": []}, + "rekognition:DescribeStreamProcessor": {"action": "rekognition:DescribeStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}]}, + "rekognition:DetectCustomLabels": {"action": "rekognition:DetectCustomLabels", "types": ["projectversion"], "resources": [{"types": ["projectversion"], "arn": "ProjectVersionArn"}]}, + "rekognition:DetectFaces": {"action": "rekognition:DetectFaces", "types": [], "resources": []}, + "rekognition:DetectLabels": {"action": "rekognition:DetectLabels", "types": [], "resources": []}, + "rekognition:DetectModerationLabels": {"action": "rekognition:DetectModerationLabels", "types": ["projectversion"], "resources": [{"types": ["projectversion"], "arn": "HumanLoopConfig.FlowDefinitionArn"}, {"type": "projectversion", "fill": {"VersionName": "ProjectVersion"}}]}, + "rekognition:DetectProtectiveEquipment": {"action": "rekognition:DetectProtectiveEquipment", "types": [], "resources": []}, + "rekognition:DetectText": {"action": "rekognition:DetectText", "types": [], "resources": []}, + "rekognition:DisassociateFaces": {"action": "rekognition:DisassociateFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:DistributeDatasetEntries": {"action": "rekognition:DistributeDatasetEntries", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "Datasets[].Arn"}]}, + "rekognition:GetCelebrityInfo": {"action": "rekognition:GetCelebrityInfo", "types": [], "resources": []}, + "rekognition:GetCelebrityRecognition": {"action": "rekognition:GetCelebrityRecognition", "types": [], "resources": []}, + "rekognition:GetContentModeration": {"action": "rekognition:GetContentModeration", "types": [], "resources": []}, + "rekognition:GetFaceDetection": {"action": "rekognition:GetFaceDetection", "types": [], "resources": []}, + "rekognition:GetFaceLivenessSessionResults": {"action": "rekognition:GetFaceLivenessSessionResults", "types": [], "resources": []}, + "rekognition:GetFaceSearch": {"action": "rekognition:GetFaceSearch", "types": [], "resources": []}, + "rekognition:GetLabelDetection": {"action": "rekognition:GetLabelDetection", "types": [], "resources": []}, + "rekognition:GetMediaAnalysisJob": {"action": "rekognition:GetMediaAnalysisJob", "types": [], "resources": []}, + "rekognition:GetPersonTracking": {"action": "rekognition:GetPersonTracking", "types": [], "resources": []}, + "rekognition:GetSegmentDetection": {"action": "rekognition:GetSegmentDetection", "types": [], "resources": []}, + "rekognition:GetTextDetection": {"action": "rekognition:GetTextDetection", "types": [], "resources": []}, + "rekognition:IndexFaces": {"action": "rekognition:IndexFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:ListCollections": {"action": "rekognition:ListCollections", "types": [], "resources": []}, + "rekognition:ListDatasetEntries": {"action": "rekognition:ListDatasetEntries", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "DatasetArn"}]}, + "rekognition:ListDatasetLabels": {"action": "rekognition:ListDatasetLabels", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "DatasetArn"}]}, + "rekognition:ListFaces": {"action": "rekognition:ListFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:ListMediaAnalysisJobs": {"action": "rekognition:ListMediaAnalysisJobs", "types": [], "resources": []}, + "rekognition:ListProjectPolicies": {"action": "rekognition:ListProjectPolicies", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:ListStreamProcessors": {"action": "rekognition:ListStreamProcessors", "types": [], "resources": []}, + "rekognition:ListTagsForResource": {"action": "rekognition:ListTagsForResource", "types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "resources": [{"types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "arn": "ResourceArn"}]}, + "rekognition:ListUsers": {"action": "rekognition:ListUsers", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:PutProjectPolicy": {"action": "rekognition:PutProjectPolicy", "types": ["project"], "resources": [{"types": ["project"], "arn": "ProjectArn"}]}, + "rekognition:RecognizeCelebrities": {"action": "rekognition:RecognizeCelebrities", "types": [], "resources": []}, + "rekognition:SearchFaces": {"action": "rekognition:SearchFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:SearchFacesByImage": {"action": "rekognition:SearchFacesByImage", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:SearchUsers": {"action": "rekognition:SearchUsers", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:SearchUsersByImage": {"action": "rekognition:SearchUsersByImage", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:StartCelebrityRecognition": {"action": "rekognition:StartCelebrityRecognition", "types": [], "resources": []}, + "rekognition:StartContentModeration": {"action": "rekognition:StartContentModeration", "types": [], "resources": []}, + "rekognition:StartFaceDetection": {"action": "rekognition:StartFaceDetection", "types": [], "resources": []}, + "rekognition:StartFaceSearch": {"action": "rekognition:StartFaceSearch", "types": ["collection"], "resources": [{"types": ["collection"], "arn": "NotificationChannel.RoleArn"}, {"types": ["collection"], "arn": "NotificationChannel.SNSTopicArn"}, {"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, + "rekognition:StartLabelDetection": {"action": "rekognition:StartLabelDetection", "types": [], "resources": []}, + "rekognition:StartMediaAnalysisJob": {"action": "rekognition:StartMediaAnalysisJob", "types": ["projectversion"], "resources": []}, + "rekognition:StartPersonTracking": {"action": "rekognition:StartPersonTracking", "types": [], "resources": []}, + "rekognition:StartProjectVersion": {"action": "rekognition:StartProjectVersion", "types": ["projectversion"], "resources": [{"types": ["projectversion"], "arn": "ProjectVersionArn"}]}, + "rekognition:StartSegmentDetection": {"action": "rekognition:StartSegmentDetection", "types": [], "resources": []}, + "rekognition:StartStreamProcessor": {"action": "rekognition:StartStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}]}, + "rekognition:StartTextDetection": {"action": "rekognition:StartTextDetection", "types": [], "resources": []}, + "rekognition:StopProjectVersion": {"action": "rekognition:StopProjectVersion", "types": ["projectversion"], "resources": [{"types": ["projectversion"], "arn": "ProjectVersionArn"}]}, + "rekognition:StopStreamProcessor": {"action": "rekognition:StopStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}]}, + "rekognition:TagResource": {"action": "rekognition:TagResource", "types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "resources": [{"types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "arn": "ResourceArn"}]}, + "rekognition:UntagResource": {"action": "rekognition:UntagResource", "types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "resources": [{"types": ["collection", "dataset", "project", "projectversion", "streamprocessor"], "arn": "ResourceArn"}]}, + "rekognition:UpdateDatasetEntries": {"action": "rekognition:UpdateDatasetEntries", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "DatasetArn"}]}, + "rekognition:UpdateStreamProcessor": {"action": "rekognition:UpdateStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}]}, "servicediscovery:CreateHttpNamespace": {"action": "servicediscovery:CreateHttpNamespace", "types": [], "resources": []}, "servicediscovery:CreatePrivateDnsNamespace": {"action": "servicediscovery:CreatePrivateDnsNamespace", "types": [], "resources": []}, "servicediscovery:CreatePublicDnsNamespace": {"action": "servicediscovery:CreatePublicDnsNamespace", "types": [], "resources": []}, @@ -1013,6 +1206,89 @@ "servicequotas:TagResource": {"action": "servicequotas:TagResource", "types": [], "resources": []}, "servicequotas:UntagResource": {"action": "servicequotas:UntagResource", "types": [], "resources": []}, "servicequotas:UpdateAutoManagement": {"action": "servicequotas:UpdateAutoManagement", "types": [], "resources": []}, + "sso:AddRegion": {"action": "sso:AddRegion", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:AttachCustomerManagedPolicyReferenceToPermissionSet": {"action": "sso:AttachCustomerManagedPolicyReferenceToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:AttachManagedPolicyToPermissionSet": {"action": "sso:AttachManagedPolicyToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "ManagedPolicyArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:CreateAccountAssignment": {"action": "sso:CreateAccountAssignment", "types": ["Account", "Instance", "PermissionSet"], "resources": [{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, {"type": "Account", "fill": {"AccountId": "TargetId"}}]}, + "sso:CreateApplication": {"action": "sso:CreateApplication", "types": ["Application", "ApplicationProvider", "Instance"], "resources": [{"types": ["Application", "ApplicationProvider", "Instance"], "arn": "ApplicationProviderArn"}, {"types": ["Application", "ApplicationProvider", "Instance"], "arn": "InstanceArn"}, {"type": "Application", "fill": {"InstanceId": "InstanceArn"}, "arnOf": {"InstanceArn": "Instance"}, "made": true}]}, + "sso:CreateApplicationAssignment": {"action": "sso:CreateApplicationAssignment", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:CreateInstance": {"action": "sso:CreateInstance", "types": ["Instance"], "resources": [{"type": "Instance", "fill": {}}]}, + "sso:CreateInstanceAccessControlAttributeConfiguration": {"action": "sso:CreateInstanceAccessControlAttributeConfiguration", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:CreatePermissionSet": {"action": "sso:CreatePermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"type": "PermissionSet", "fill": {"InstanceId": "InstanceArn"}, "arnOf": {"InstanceArn": "Instance"}, "made": true}]}, + "sso:CreateTrustedTokenIssuer": {"action": "sso:CreateTrustedTokenIssuer", "types": ["Instance", "TrustedTokenIssuer"], "resources": [{"types": ["Instance", "TrustedTokenIssuer"], "arn": "InstanceArn"}, {"type": "TrustedTokenIssuer", "fill": {"InstanceId": "InstanceArn"}, "arnOf": {"InstanceArn": "Instance"}, "made": true}]}, + "sso:DeleteAccountAssignment": {"action": "sso:DeleteAccountAssignment", "types": ["Account", "Instance", "PermissionSet"], "resources": [{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, {"type": "Account", "fill": {"AccountId": "TargetId"}}]}, + "sso:DeleteApplication": {"action": "sso:DeleteApplication", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DeleteApplicationAccessScope": {"action": "sso:DeleteApplicationAccessScope", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DeleteApplicationAssignment": {"action": "sso:DeleteApplicationAssignment", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DeleteApplicationAuthenticationMethod": {"action": "sso:DeleteApplicationAuthenticationMethod", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DeleteApplicationGrant": {"action": "sso:DeleteApplicationGrant", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DeleteInlinePolicyFromPermissionSet": {"action": "sso:DeleteInlinePolicyFromPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:DeleteInstance": {"action": "sso:DeleteInstance", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DeleteInstanceAccessControlAttributeConfiguration": {"action": "sso:DeleteInstanceAccessControlAttributeConfiguration", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DeletePermissionSet": {"action": "sso:DeletePermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:DeletePermissionsBoundaryFromPermissionSet": {"action": "sso:DeletePermissionsBoundaryFromPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:DeleteTrustedTokenIssuer": {"action": "sso:DeleteTrustedTokenIssuer", "types": ["TrustedTokenIssuer"], "resources": [{"types": ["TrustedTokenIssuer"], "arn": "TrustedTokenIssuerArn"}]}, + "sso:DescribeAccountAssignmentCreationStatus": {"action": "sso:DescribeAccountAssignmentCreationStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribeAccountAssignmentDeletionStatus": {"action": "sso:DescribeAccountAssignmentDeletionStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribeApplication": {"action": "sso:DescribeApplication", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DescribeApplicationAssignment": {"action": "sso:DescribeApplicationAssignment", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:DescribeApplicationProvider": {"action": "sso:DescribeApplicationProvider", "types": ["ApplicationProvider"], "resources": [{"types": ["ApplicationProvider"], "arn": "ApplicationProviderArn"}]}, + "sso:DescribeInstance": {"action": "sso:DescribeInstance", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribeInstanceAccessControlAttributeConfiguration": {"action": "sso:DescribeInstanceAccessControlAttributeConfiguration", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribePermissionSet": {"action": "sso:DescribePermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:DescribePermissionSetProvisioningStatus": {"action": "sso:DescribePermissionSetProvisioningStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribeRegion": {"action": "sso:DescribeRegion", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:DescribeTrustedTokenIssuer": {"action": "sso:DescribeTrustedTokenIssuer", "types": ["TrustedTokenIssuer"], "resources": [{"types": ["TrustedTokenIssuer"], "arn": "TrustedTokenIssuerArn"}]}, + "sso:DetachCustomerManagedPolicyReferenceFromPermissionSet": {"action": "sso:DetachCustomerManagedPolicyReferenceFromPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:DetachManagedPolicyFromPermissionSet": {"action": "sso:DetachManagedPolicyFromPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "ManagedPolicyArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:GetApplicationAccessScope": {"action": "sso:GetApplicationAccessScope", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:GetApplicationAssignmentConfiguration": {"action": "sso:GetApplicationAssignmentConfiguration", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:GetApplicationAuthenticationMethod": {"action": "sso:GetApplicationAuthenticationMethod", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:GetApplicationGrant": {"action": "sso:GetApplicationGrant", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:GetApplicationSessionConfiguration": {"action": "sso:GetApplicationSessionConfiguration", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:GetInlinePolicyForPermissionSet": {"action": "sso:GetInlinePolicyForPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:GetPermissionsBoundaryForPermissionSet": {"action": "sso:GetPermissionsBoundaryForPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:GetRoleCredentials": {"action": "sso:GetRoleCredentials", "types": [], "resources": []}, + "sso:ListAccountAssignmentCreationStatus": {"action": "sso:ListAccountAssignmentCreationStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListAccountAssignmentDeletionStatus": {"action": "sso:ListAccountAssignmentDeletionStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListAccountAssignments": {"action": "sso:ListAccountAssignments", "types": ["Account", "Instance", "PermissionSet"], "resources": [{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, {"type": "Account", "fill": {"AccountId": "AccountId"}}]}, + "sso:ListAccountAssignmentsForPrincipal": {"action": "sso:ListAccountAssignmentsForPrincipal", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListAccountRoles": {"action": "sso:ListAccountRoles", "types": [], "resources": []}, + "sso:ListAccounts": {"action": "sso:ListAccounts", "types": [], "resources": []}, + "sso:ListAccountsForProvisionedPermissionSet": {"action": "sso:ListAccountsForProvisionedPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:ListApplicationAccessScopes": {"action": "sso:ListApplicationAccessScopes", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:ListApplicationAssignments": {"action": "sso:ListApplicationAssignments", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:ListApplicationAssignmentsForPrincipal": {"action": "sso:ListApplicationAssignmentsForPrincipal", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "Filter.ApplicationArn"}, {"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListApplicationAuthenticationMethods": {"action": "sso:ListApplicationAuthenticationMethods", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:ListApplicationGrants": {"action": "sso:ListApplicationGrants", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:ListApplicationProviders": {"action": "sso:ListApplicationProviders", "types": ["ApplicationProvider"], "resources": []}, + "sso:ListApplications": {"action": "sso:ListApplications", "types": [], "resources": []}, + "sso:ListCustomerManagedPolicyReferencesInPermissionSet": {"action": "sso:ListCustomerManagedPolicyReferencesInPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:ListInstances": {"action": "sso:ListInstances", "types": [], "resources": []}, + "sso:ListManagedPoliciesInPermissionSet": {"action": "sso:ListManagedPoliciesInPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:ListPermissionSetProvisioningStatus": {"action": "sso:ListPermissionSetProvisioningStatus", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListPermissionSets": {"action": "sso:ListPermissionSets", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListPermissionSetsProvisionedToAccount": {"action": "sso:ListPermissionSetsProvisionedToAccount", "types": ["Account", "Instance"], "resources": [{"types": ["Account", "Instance"], "arn": "InstanceArn"}, {"type": "Account", "fill": {"AccountId": "AccountId"}}]}, + "sso:ListRegions": {"action": "sso:ListRegions", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:ListTagsForResource": {"action": "sso:ListTagsForResource", "types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "resources": [{"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "InstanceArn"}, {"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "ResourceArn"}]}, + "sso:ListTrustedTokenIssuers": {"action": "sso:ListTrustedTokenIssuers", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:Logout": {"action": "sso:Logout", "types": [], "resources": []}, + "sso:ProvisionPermissionSet": {"action": "sso:ProvisionPermissionSet", "types": ["Account", "Instance", "PermissionSet"], "resources": [{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, {"type": "Account", "fill": {"AccountId": "TargetId"}, "when": {"TargetType": ["AWS_ACCOUNT"]}}, {"types": ["Account"], "through": "PermissionSetArn", "when": {"TargetType": ["ALL_PROVISIONED_ACCOUNTS"]}}]}, + "sso:PutApplicationAccessScope": {"action": "sso:PutApplicationAccessScope", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:PutApplicationAssignmentConfiguration": {"action": "sso:PutApplicationAssignmentConfiguration", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:PutApplicationAuthenticationMethod": {"action": "sso:PutApplicationAuthenticationMethod", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:PutApplicationGrant": {"action": "sso:PutApplicationGrant", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:PutApplicationSessionConfiguration": {"action": "sso:PutApplicationSessionConfiguration", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:PutInlinePolicyToPermissionSet": {"action": "sso:PutInlinePolicyToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:PutPermissionsBoundaryToPermissionSet": {"action": "sso:PutPermissionsBoundaryToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionsBoundary.ManagedPolicyArn"}]}, + "sso:RemoveRegion": {"action": "sso:RemoveRegion", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:TagResource": {"action": "sso:TagResource", "types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "resources": [{"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "InstanceArn"}, {"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "ResourceArn"}]}, + "sso:UntagResource": {"action": "sso:UntagResource", "types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "resources": [{"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "InstanceArn"}, {"types": ["Application", "Instance", "PermissionSet", "TrustedTokenIssuer"], "arn": "ResourceArn"}]}, + "sso:UpdateApplication": {"action": "sso:UpdateApplication", "types": ["Application"], "resources": [{"types": ["Application"], "arn": "ApplicationArn"}]}, + "sso:UpdateInstance": {"action": "sso:UpdateInstance", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "EncryptionConfiguration.KmsKeyArn"}, {"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:UpdateInstanceAccessControlAttributeConfiguration": {"action": "sso:UpdateInstanceAccessControlAttributeConfiguration", "types": ["Instance"], "resources": [{"types": ["Instance"], "arn": "InstanceArn"}]}, + "sso:UpdatePermissionSet": {"action": "sso:UpdatePermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, + "sso:UpdateTrustedTokenIssuer": {"action": "sso:UpdateTrustedTokenIssuer", "types": ["TrustedTokenIssuer"], "resources": [{"types": ["TrustedTokenIssuer"], "arn": "TrustedTokenIssuerArn"}]}, "states:CreateActivity": {"action": "states:CreateActivity", "types": ["activity"], "resources": [{"type": "activity", "fill": {"ActivityName": "name"}}]}, "states:CreateStateMachine": {"action": "states:CreateStateMachine", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "roleArn"}, {"type": "statemachine", "fill": {"StateMachineName": "name"}}]}, "states:CreateStateMachineAlias": {"action": "states:CreateStateMachineAlias", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "routingConfiguration[].stateMachineVersionArn"}]}, diff --git a/src/test/java/io/github/hectorvent/floci/core/common/RequestResourceMembersTest.java b/src/test/java/io/github/hectorvent/floci/core/common/RequestResourceMembersTest.java index a6c5a95047..02faa13a2d 100644 --- a/src/test/java/io/github/hectorvent/floci/core/common/RequestResourceMembersTest.java +++ b/src/test/java/io/github/hectorvent/floci/core/common/RequestResourceMembersTest.java @@ -137,10 +137,17 @@ class RequestResourceMembersTest { assertEquals(new Member("SessionId", false), parseUnchecked(document(formats, "{\"types\":[\"cluster\",\"group\"],\"through\":\"SessionId\",\"endpoint\":\"a\"}")) .operations().get("a:Op").getFirst().through()); - // No types, a type with no format, no member of one value, or beside members reading it otherwise. + // A list's structures' field names one through each of its values, when another member is absent. + Resource each = parseUnchecked(document(formats, "{\"types\":[\"group\"],\"through\":\"Parts[].PartId\"," + + "\"when\":{\"GroupId\":[null]}}")).operations().get("a:Op").getFirst(); + assertEquals(new Member("Parts", true, new Member("PartId", false)), each.through()); + assertEquals(Map.of("GroupId", List.of("")), each.when()); + // No types, a type with no format, no member, or beside members reading it otherwise. for (String bad : List.of("\"types\":[],\"through\":\"SessionId\"", - "\"types\":[\"pool\"],\"through\":\"SessionId\"", "\"types\":[\"group\"],\"through\":\"Ids[]\"", - "\"types\":[\"group\"],\"through\":\"Session.Id\"", + "\"types\":[\"pool\"],\"through\":\"SessionId\"", "\"types\":[\"group\"],\"through\":\"Ids[][]\"", + "\"types\":[\"group\"],\"through\":\"Session.Id.Part\"", + "\"types\":[\"group\"],\"through\":\"SessionId\",\"unless\":{\"GroupId\":[null]}", + "\"types\":[\"group\"],\"through\":\"SessionId\",\"when\":{\"Ids[]\":[\"a\"]}", "\"types\":[\"group\"],\"through\":\"SessionId\",\"arn\":\"GroupArn\"", "\"types\":[\"group\"],\"through\":\"SessionId\",\"before\":\"#\"", "\"type\":\"group\",\"fill\":{},\"through\":\"SessionId\"")) { @@ -269,9 +276,10 @@ class RequestResourceMembersTest { /** * Each resource alone, from a request naming it and nothing else, gives exactly its ARN, in the account its - * account member names when it has one, with those sharing its explicit member selector and those the operation - * always names, such as a create's new resource (Cloud Map's {@code CreateService}); one named through another - * resource of its service's own, the ARN its service gives for that. + * account member names when it has one, with those sharing its explicit member selector, those the operation + * always names, such as a create's new resource (Cloud Map's {@code CreateService}), and those filled from the ARN + * it is read from (a permission set made in an instance); one named through another resource of its service's + * own, the ARN its service gives for that. */ @TestFactory Stream everyResourceOfTheTableIsReadFromAJsonBodyAndAForm() { @@ -305,7 +313,7 @@ class RequestResourceMembersTest { form.append('&').append(parameter(member)).append('=').append(encoded(value)); }); List named = operation.getValue().stream() - .filter(other -> (other == resource || named(other) + .filter(other -> (other == resource || named(other) || fillsFromTheArn(other, resource) || !other.find().isEmpty() && other.find().equals(resource.find()) && other.when().equals(resource.when()) && other.unless().equals(resource.unless())) && (other.endpoint() == null || resource.endpoint() == null @@ -350,6 +358,17 @@ class RequestResourceMembersTest { }))); } + /** + * Whether a resource fills its variables from the ARN the other's member holds, as that ARN's type's variable alone + * (a permission set made in the instance an {@code InstanceArn} names), so a request naming the other by an ARN of + * its first type, which the test gives, names it too. + */ + private static boolean fillsFromTheArn(Resource resource, Resource other) { + return other.arn() != null && !resource.fill().isEmpty() + && resource.fill().values().stream().allMatch(other.arn()::equals) + && other.types().getFirst().equals(resource.arnOf().get(other.arn().path())); + } + /** 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() @@ -370,8 +389,8 @@ class RequestResourceMembersTest { } @Override - public Optional through(String member, String value, String region) { - return Optional.of(arn); + public List through(String member, String value, String region) { + return List.of(arn); } }; } diff --git a/src/test/java/io/github/hectorvent/floci/core/common/RequestResourcesTest.java b/src/test/java/io/github/hectorvent/floci/core/common/RequestResourcesTest.java index 0c926b7bbf..cff3de359b 100644 --- a/src/test/java/io/github/hectorvent/floci/core/common/RequestResourcesTest.java +++ b/src/test/java/io/github/hectorvent/floci/core/common/RequestResourcesTest.java @@ -70,6 +70,21 @@ class RequestResourcesTest { json("{\"resourceArn\":\"arn:aws:ecr:eu-west-1:111122223333:repository/web\",\"tags\":[]}"))); } + /** + * A resource of a type AWS owns, whose format's account is {@code aws} (an IAM Identity Center application + * provider), has no copy in the caller's account, so its ARN is checked as given alone; an ARN of any other type + * giving that account is still checked as the caller's own too. + */ + @Test + void anArnOfATypeAwsOwnsIsCheckedInItsAccountAlone() { + String provider = "arn:aws:sso::aws:applicationProvider/custom"; + assertEquals(List.of(provider), of("sso:DescribeApplicationProvider", + json("{\"ApplicationProviderArn\":\"" + provider + "\"}"))); + String machine = "arn:aws:states:us-east-1:aws:stateMachine:orders"; + assertEquals(List.of(machine, MACHINE), of("states:DescribeStateMachine", + json("{\"stateMachineArn\":\"" + machine + "\"}"))); + } + @Test void aTypesVariablesAreFilledFromTheRequestAndAListGivesAResourceForEachValue() { assertEquals(List.of("arn:aws:ecr:us-east-1:000000000000:repository/web", @@ -577,9 +592,9 @@ class RequestResourcesTest { } @Override - public Optional through(String member, String value, String region) { + public List through(String member, String value, String region) { return "SessionId".equals(member) && "us-east-1".equals(region) - ? Optional.ofNullable(sessions.get(value)) : Optional.empty(); + ? Optional.ofNullable(sessions.get(value)).stream().toList() : List.of(); } }; String secret = ",\"SecretArn\":\"arn:aws:secretsmanager:us-east-1:000000000000:secret:db-AbCdEf\""; @@ -613,6 +628,101 @@ class RequestResourcesTest { "eu-west-1", "000000000000", stored)); } + /** + * An EMR request modifying instance groups without its {@code ClusterId} is on the cluster each group is in, as its + * service finds it, and none for a group in no cluster; with one, on that cluster alone, and with a null one as + * with none. A permission set provisioned to all the accounts it is provisioned to is on each of them, a null + * {@code TargetId} naming none, and one provisioned to an account on that account alone. + */ + @Test + void aResourceIsNamedThroughEachValueOfAListAndOnlyWhenTheRequestNamesItNoOtherWay() { + String clusters = "arn:aws:elasticmapreduce:us-east-1:000000000000:cluster/"; + Map groups = Map.of("ig-A", clusters + "j-A", "ig-B", clusters + "j-B"); + StoredResourceArns emr = new StoredResourceArns() { + @Override + public String namespace() { + return "elasticmapreduce"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + @Override + public List through(String member, String value, String region) { + return "InstanceGroups[].InstanceGroupId".equals(member) + ? Optional.ofNullable(groups.get(value)).stream().toList() : List.of(); + } + }; + String modified = "\"InstanceGroups\":[{\"InstanceGroupId\":\"ig-A\",\"InstanceCount\":2}," + + "{\"InstanceGroupId\":\"ig-B\",\"InstanceCount\":2},{\"InstanceGroupId\":\"ig-none\"}]"; + assertEquals(List.of(clusters + "j-A", clusters + "j-B"), RequestResources.of( + "elasticmapreduce:ModifyInstanceGroups", json("{" + modified + "}"), "aws", "us-east-1", + "000000000000", emr)); + assertEquals(List.of(clusters + "j-A"), RequestResources.of("elasticmapreduce:ModifyInstanceGroups", + json("{\"ClusterId\":\"j-A\"," + modified + "}"), "aws", "us-east-1", "000000000000", emr)); + // A null ClusterId names no cluster of its own, as the handler reads it; an InstanceGroups that is not a + // list names no group, which the handler refuses. + assertEquals(List.of(clusters + "j-A", clusters + "j-B"), RequestResources.of( + "elasticmapreduce:ModifyInstanceGroups", json("{\"ClusterId\":null," + modified + "}"), "aws", + "us-east-1", "000000000000", emr)); + assertEquals(List.of(), RequestResources.of("elasticmapreduce:ModifyInstanceGroups", + json("{\"InstanceGroups\":{\"first\":{\"InstanceGroupId\":\"ig-A\"}}}"), "aws", "us-east-1", + "000000000000", emr)); + + String instance = "arn:aws:sso:::instance/ssoins-1111111111111111"; + String permissionSet = "arn:aws:sso:::permissionSet/ssoins-1111111111111111/ps-2222222222222222"; + StoredResourceArns sso = new StoredResourceArns() { + @Override + public String namespace() { + return "sso"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + @Override + public List through(String member, String value, String region) { + return "PermissionSetArn".equals(member) && permissionSet.equals(value) + ? List.of("arn:aws:sso:::account/111111111111", "arn:aws:sso:::account/222222222222") + : List.of(); + } + }; + String provisioned = "{\"InstanceArn\":\"" + instance + "\",\"PermissionSetArn\":\"" + permissionSet + "\","; + assertEquals(List.of(instance, permissionSet, "arn:aws:sso:::account/111111111111", + "arn:aws:sso:::account/222222222222"), RequestResources.of("sso:ProvisionPermissionSet", + json(provisioned + "\"TargetType\":\"ALL_PROVISIONED_ACCOUNTS\"}"), "aws", "us-east-1", + "000000000000", sso)); + assertEquals(List.of(instance, permissionSet, "arn:aws:sso:::account/111111111111", + "arn:aws:sso:::account/222222222222"), RequestResources.of("sso:ProvisionPermissionSet", + json(provisioned + "\"TargetType\":\"ALL_PROVISIONED_ACCOUNTS\",\"TargetId\":null}"), "aws", + "us-east-1", "000000000000", sso)); + assertEquals(List.of(instance, permissionSet, "arn:aws:sso:::account/333333333333"), RequestResources.of( + "sso:ProvisionPermissionSet", json(provisioned + "\"TargetType\":\"AWS_ACCOUNT\"," + + "\"TargetId\":\"333333333333\"}"), "aws", "us-east-1", "000000000000", sso)); + } + + /** + * A resource an IAM Identity Center create makes in an instance has the id of the instance its request names by + * its ARN, and its own id open, so a grant on the instance's permission sets covers it. + */ + @Test + void aResourceMadeInAnInstanceHasTheInstancesId() { + String instance = "arn:aws:sso:::instance/ssoins-1111111111111111"; + assertEquals(List.of(instance, "arn:aws:sso:::permissionSet/ssoins-1111111111111111/*"), + of("sso:CreatePermissionSet", json("{\"InstanceArn\":\"" + instance + "\",\"Name\":\"admins\"}"))); + assertEquals(List.of("arn:aws:sso:::permissionSet/ssoins-1111111111111111/*"), + RequestResources.created("sso:CreatePermissionSet", + json("{\"InstanceArn\":\"" + instance + "\",\"Name\":\"admins\"}"), "aws", "us-east-1", + "000000000000")); + assertEquals(List.of(instance, "arn:aws:sso::000000000000:trustedTokenIssuer/ssoins-1111111111111111/*"), + of("sso:CreateTrustedTokenIssuer", json("{\"InstanceArn\":\"" + instance + "\",\"Name\":\"idp\"," + + "\"TrustedTokenIssuerType\":\"OIDC_JWT\"}"))); + } + /** A request value is a name, so a {@code ${...}} in it is kept, not read as a variable of the format. */ @Test void aValueIsTakenLiterally() { diff --git a/src/test/java/io/github/hectorvent/floci/services/iam/IamRequestResourceEnforcementIntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/iam/IamRequestResourceEnforcementIntegrationTest.java index c63b218ab0..e20471d4d8 100644 --- a/src/test/java/io/github/hectorvent/floci/services/iam/IamRequestResourceEnforcementIntegrationTest.java +++ b/src/test/java/io/github/hectorvent/floci/services/iam/IamRequestResourceEnforcementIntegrationTest.java @@ -1383,6 +1383,248 @@ class IamRequestResourceEnforcementIntegrationTest { .body("{\"Database\":\"res-none\"," + members + "}").post("/").then(); } + /** A DataSync agent is checked on its ARN, which ends in the id DataSync gave it, to describe it or to tag it. */ + @Test + void aDataSyncAgentIsCheckedOnItsArn() { + String arn = adminJson("datasync", "FmrsService.CreateAgent").body("{\"ActivationKey\":\"RES-ACTIVATION\"}") + .post("/").then().statusCode(200).extract().path("AgentArn"); + cleanup.register(() -> adminJson("datasync", "FmrsService.DeleteAgent") + .body("{\"AgentArn\":\"" + arn + "\"}").post("/")); + String agents = "arn:aws:datasync:" + REGION + ":" + ACCOUNT + ":agent/"; + assertTrue(arn.startsWith(agents + "agent-"), arn); + String other = agents + "agent-0123456789abcdef0"; + + User user = user("res-agent"); + user.policy(allowOn("datasync:DescribeAgent", arn) + "," + allowOn("datasync:TagResource", arn)); + dataSync(user, "DescribeAgent", "{\"AgentArn\":\"" + arn + "\"}").statusCode(200); + refusedJson(dataSync(user, "DescribeAgent", "{\"AgentArn\":\"" + other + "\"}"), "datasync:DescribeAgent"); + String tags = "\",\"Tags\":[{\"Key\":\"a\",\"Value\":\"b\"}]}"; + dataSync(user, "TagResource", "{\"ResourceArn\":\"" + arn + tags).statusCode(200); + refusedJson(dataSync(user, "TagResource", "{\"ResourceArn\":\"" + other + tags), "datasync:TagResource"); + } + + /** + * An EMR cluster is checked on {@code cluster/}, the ARN EMR gives it, whether a request names it by its + * {@code ClusterId} or among its {@code JobFlowIds}, and a tag request on the cluster its {@code ResourceId} + * names, the one Floci tags, not on the one its {@code ClusterId} gives. + */ + @Test + void anEmrClusterIsCheckedOnTheArnItsIdGives() { + String arn = emrCluster("res-emr"); + String id = arn.substring(arn.lastIndexOf('/') + 1); + + User user = user("res-emr"); + user.policy(allowOn("elasticmapreduce:DescribeCluster", arn) + "," + + allowOn("elasticmapreduce:SetTerminationProtection", arn) + "," + + allowOn("elasticmapreduce:AddTags", arn)); + emr(user, "DescribeCluster", "{\"ClusterId\":\"" + id + "\"}").statusCode(200); + refusedJson(emr(user, "DescribeCluster", "{\"ClusterId\":\"j-RESOTHER\"}"), "elasticmapreduce:DescribeCluster"); + String unprotected = "],\"TerminationProtected\":false}"; + emr(user, "SetTerminationProtection", "{\"JobFlowIds\":[\"" + id + "\"" + unprotected).statusCode(200); + refusedJson(emr(user, "SetTerminationProtection", "{\"JobFlowIds\":[\"" + id + "\",\"j-RESOTHER\"" + + unprotected), "elasticmapreduce:SetTerminationProtection"); + String tags = "\",\"Tags\":[{\"Key\":\"a\",\"Value\":\"b\"}]}"; + emr(user, "AddTags", "{\"ResourceId\":\"" + id + tags).statusCode(200); + refusedJson(emr(user, "AddTags", "{\"ClusterId\":\"" + id + "\",\"ResourceId\":\"j-RESOTHER" + tags), + "elasticmapreduce:AddTags"); + } + + /** + * A Rekognition stream processor is checked on the ARN its {@code Name} gives, and a moderation analysis on the + * custom model whose ARN its {@code ProjectVersion} gives. Floci serves no stream processor and no custom model, + * so an allowed request is answered by the handler, never by IAM. + */ + @Test + void aStreamProcessorIsCheckedOnTheArnItsNameGives() { + String processor = "arn:aws:rekognition:" + REGION + ":" + ACCOUNT + ":streamprocessor/res-denied"; + String version = "arn:aws:rekognition:" + REGION + ":" + ACCOUNT + ":project/res/version/res-denied/1"; + User user = user("res-rekognition"); + user.policy(allowOn("rekognition:*", "*") + ",{\"Effect\":\"Deny\",\"Action\":\"rekognition:*\"," + + "\"Resource\":[\"" + processor + "\",\"" + version + "\"]}"); + refusedJson(rekognition(user, "StartStreamProcessor", "{\"Name\":\"res-denied\"}"), + "rekognition:StartStreamProcessor"); + rekognition(user, "StartStreamProcessor", "{\"Name\":\"res-other\"}") + .body(not(containsString("not authorized"))); + String image = "{\"Image\":{\"Bytes\":\"AA==\"}"; + refusedJson(rekognition(user, "DetectModerationLabels", image + ",\"ProjectVersion\":\"" + version + "\"}"), + "rekognition:DetectModerationLabels"); + rekognition(user, "DetectModerationLabels", image + "}").body(not(containsString("not authorized"))); + } + + /** + * An EMR {@code ModifyInstanceGroups} naming its instance groups by their ids alone, with no {@code ClusterId} or + * a null one, is checked on the cluster each group is in, the one EMR finds and modifies it in, so a grant on + * another cluster does not reach it and a deny on its own holds; an {@code InstanceGroups} that is no list is + * refused, not read as its values. + */ + @Test + void anInstanceGroupNamedWithoutItsClusterIsCheckedOnTheClusterItIsIn() { + String arn = emrCluster("res-emr-groups"); + String group = adminJson("elasticmapreduce", "ElasticMapReduce.ListInstanceGroups") + .body("{\"ClusterId\":\"" + arn.substring(arn.lastIndexOf('/') + 1) + "\"}").post("/").then() + .statusCode(200).extract().path("InstanceGroups[0].Id"); + String modify = "{\"InstanceGroups\":[{\"InstanceGroupId\":\"" + group + "\",\"InstanceCount\":1}]}"; + + User user = user("res-emr-groups"); + user.policy(allowOn("elasticmapreduce:ModifyInstanceGroups", arn)); + emr(user, "ModifyInstanceGroups", modify).statusCode(200); + emr(user, "ModifyInstanceGroups", "{\"ClusterId\":null," + modify.substring(1)).statusCode(200); + user.policy(allowOn("elasticmapreduce:ModifyInstanceGroups", arn.substring(0, arn.lastIndexOf('/') + 1) + + "j-RESOTHER")); + refusedJson(emr(user, "ModifyInstanceGroups", modify), "elasticmapreduce:ModifyInstanceGroups"); + user.policy(allowOn("elasticmapreduce:ModifyInstanceGroups", "*") + ",{\"Effect\":\"Deny\"," + + "\"Action\":\"elasticmapreduce:ModifyInstanceGroups\",\"Resource\":\"" + arn + "\"}"); + refusedJson(emr(user, "ModifyInstanceGroups", modify), "elasticmapreduce:ModifyInstanceGroups"); + // An InstanceGroups that is not a list names no group to the check, and EMR changes none. + emr(user, "ModifyInstanceGroups", "{\"InstanceGroups\":{\"first\":{\"InstanceGroupId\":\"" + group + + "\",\"InstanceCount\":1}}}").statusCode(400) + .body(containsString("InstanceGroups must contain at least one instance group.")); + } + + /** + * An IAM Identity Center account assignment is checked on the account its {@code TargetId} names beside the + * instance and the permission set, so a grant scoped to one account does not reach another, and a deny on an + * account holds. + */ + @Test + void anAccountAssignmentIsCheckedOnTheAccountItsTargetIdNames() { + String instance = ssoInstance(); + String permissionSet = permissionSet(instance); + String assigned = assignment(instance, permissionSet, "111111111111"); + String other = assignment(instance, permissionSet, "222222222222"); + + User user = user("res-sso"); + user.policy(allowOn("sso:CreateAccountAssignment", instance) + "," + + allowOn("sso:CreateAccountAssignment", permissionSet) + "," + + allowOn("sso:CreateAccountAssignment", "arn:aws:sso:::account/111111111111")); + ssoAdmin(user, "CreateAccountAssignment", assigned).statusCode(200); + cleanup.register(() -> adminJson("sso", "SWBExternalService.DeleteAccountAssignment").body(assigned) + .post("/")); + refusedJson(ssoAdmin(user, "CreateAccountAssignment", other), "sso:CreateAccountAssignment"); + user.policy(allowOn("sso:CreateAccountAssignment", "*") + ",{\"Effect\":\"Deny\"," + + "\"Action\":\"sso:CreateAccountAssignment\",\"Resource\":\"arn:aws:sso:::account/222222222222\"}"); + refusedJson(ssoAdmin(user, "CreateAccountAssignment", other), "sso:CreateAccountAssignment"); + } + + /** An assignment of the permission set to a group, in the account. */ + /** + * An IAM Identity Center permission set provisioned to all the accounts it is provisioned to, with no + * {@code TargetId}, or a null one, is checked on each of those accounts, so a grant on one does not reach the + * others, a deny on one holds, and a grant on all of them lets it through. + */ + @Test + void aPermissionSetProvisionedToAllItsAccountsIsCheckedOnEachOfThem() { + String instance = ssoInstance(); + String permissionSet = permissionSet(instance); + for (String account : List.of("111111111111", "222222222222")) { + String assigned = assignment(instance, permissionSet, account); + adminJson("sso", "SWBExternalService.CreateAccountAssignment").body(assigned).post("/").then() + .statusCode(200); + cleanup.register(() -> adminJson("sso", "SWBExternalService.DeleteAccountAssignment").body(assigned) + .post("/")); + } + String provision = "{\"InstanceArn\":\"" + instance + "\",\"PermissionSetArn\":\"" + permissionSet + "\","; + String all = provision + "\"TargetType\":\"ALL_PROVISIONED_ACCOUNTS\"}"; + String one = provision + "\"TargetType\":\"AWS_ACCOUNT\",\"TargetId\":\"111111111111\"}"; + + User user = user("res-sso-provision"); + user.policy(allowOn("sso:ProvisionPermissionSet", instance) + "," + + allowOn("sso:ProvisionPermissionSet", permissionSet) + "," + + allowOn("sso:ProvisionPermissionSet", "arn:aws:sso:::account/111111111111")); + ssoAdmin(user, "ProvisionPermissionSet", one).statusCode(200); + refusedJson(ssoAdmin(user, "ProvisionPermissionSet", all), "sso:ProvisionPermissionSet"); + user.policy(allowOn("sso:ProvisionPermissionSet", "*") + ",{\"Effect\":\"Deny\"," + + "\"Action\":\"sso:ProvisionPermissionSet\",\"Resource\":\"arn:aws:sso:::account/222222222222\"}"); + refusedJson(ssoAdmin(user, "ProvisionPermissionSet", all), "sso:ProvisionPermissionSet"); + ssoAdmin(user, "ProvisionPermissionSet", one).statusCode(200); + // A grant on both accounts covers it, a null TargetId naming no account of its own. + user.policy(allowOn("sso:ProvisionPermissionSet", instance) + "," + + allowOn("sso:ProvisionPermissionSet", permissionSet) + "," + + allowOn("sso:ProvisionPermissionSet", "arn:aws:sso:::account/111111111111") + "," + + allowOn("sso:ProvisionPermissionSet", "arn:aws:sso:::account/222222222222")); + ssoAdmin(user, "ProvisionPermissionSet", provision + "\"TargetType\":\"ALL_PROVISIONED_ACCOUNTS\"," + + "\"TargetId\":null}").statusCode(200); + } + + /** + * An IAM Identity Center permission set a request creates is checked on the permission sets of the instance its + * {@code InstanceArn} names, {@code permissionSet//*}, so a grant on those lets it through and one on + * another instance's does not. + */ + @Test + void aPermissionSetIsCreatedUnderTheInstanceItsRequestNames() { + String instance = ssoInstance(); + String permissionSets = "arn:aws:sso:::permissionSet/"; + String create = "{\"InstanceArn\":\"" + instance + "\",\"Name\":\"res-" + suffix() + "\"}"; + + User user = user("res-sso-create"); + user.policy(allowOn("sso:CreatePermissionSet", instance) + "," + + allowOn("sso:CreatePermissionSet", permissionSets + "ssoins-0000000000000000/*")); + refusedJson(ssoAdmin(user, "CreatePermissionSet", create), "sso:CreatePermissionSet"); + user.policy(allowOn("sso:CreatePermissionSet", instance) + "," + + allowOn("sso:CreatePermissionSet", permissionSets + instance.substring(instance.lastIndexOf('/') + 1) + + "/*")); + String permissionSet = ssoAdmin(user, "CreatePermissionSet", create).statusCode(200).extract() + .path("PermissionSet.PermissionSetArn"); + cleanup.register(() -> adminJson("sso", "SWBExternalService.DeletePermissionSet") + .body("{\"InstanceArn\":\"" + instance + "\",\"PermissionSetArn\":\"" + permissionSet + "\"}") + .post("/")); + } + + /** A cluster an administrator runs, kept alive with no steps, terminated after the test; its ARN. */ + private String emrCluster(String name) { + String arn = adminJson("elasticmapreduce", "ElasticMapReduce.RunJobFlow") + .body("{\"Name\":\"" + name + "\",\"ReleaseLabel\":\"emr-7.5.0\",\"Instances\":{" + + "\"KeepJobFlowAliveWhenNoSteps\":true,\"InstanceGroups\":[{\"Name\":\"master\"," + + "\"InstanceRole\":\"MASTER\",\"InstanceType\":\"m5.xlarge\",\"InstanceCount\":1}]}}") + .post("/").then().statusCode(200).extract().path("ClusterArn"); + String clusters = "arn:aws:elasticmapreduce:" + REGION + ":" + ACCOUNT + ":cluster/"; + assertTrue(arn.startsWith(clusters + "j-"), arn); + String id = arn.substring(clusters.length()); + cleanup.register(() -> adminJson("elasticmapreduce", "ElasticMapReduce.TerminateJobFlows") + .body("{\"JobFlowIds\":[\"" + id + "\"]}").post("/")); + return arn; + } + + /** The IAM Identity Center instance ListInstances gives. */ + private static String ssoInstance() { + return adminJson("sso", "SWBExternalService.ListInstances").body("{}").post("/").then() + .statusCode(200).extract().path("Instances[0].InstanceArn"); + } + + /** A permission set an administrator creates in the instance, deleted after the test. */ + private String permissionSet(String instance) { + String permissionSet = adminJson("sso", "SWBExternalService.CreatePermissionSet") + .body("{\"InstanceArn\":\"" + instance + "\",\"Name\":\"res-" + suffix() + "\"}").post("/").then() + .statusCode(200).extract().path("PermissionSet.PermissionSetArn"); + cleanup.register(() -> adminJson("sso", "SWBExternalService.DeletePermissionSet") + .body("{\"InstanceArn\":\"" + instance + "\",\"PermissionSetArn\":\"" + permissionSet + "\"}") + .post("/")); + return permissionSet; + } + + private static String assignment(String instance, String permissionSet, String account) { + return "{\"InstanceArn\":\"" + instance + "\",\"TargetId\":\"" + account + "\",\"TargetType\":\"AWS_ACCOUNT\"," + + "\"PermissionSetArn\":\"" + permissionSet + "\",\"PrincipalType\":\"GROUP\"," + + "\"PrincipalId\":\"11111111-2222-3333-4444-555555555555\"}"; + } + + private static ValidatableResponse dataSync(User user, String operation, String body) { + return send(user, "datasync", "FmrsService." + operation, "1.1", body); + } + + private static ValidatableResponse emr(User user, String operation, String body) { + return send(user, "elasticmapreduce", "ElasticMapReduce." + operation, "1.1", body); + } + + private static ValidatableResponse rekognition(User user, String operation, String body) { + return send(user, "rekognition", "RekognitionService." + operation, "1.1", body); + } + + private static ValidatableResponse ssoAdmin(User user, String operation, String body) { + return send(user, "sso", "SWBExternalService." + operation, "1.1", body); + } + /** A monthly cost budget of the name, with a billing view ARN when one is given. */ private static String budget(String name, String billingViewArn) { return "{\"BudgetName\":\"" + name + "\",\"BudgetType\":\"COST\",\"TimeUnit\":\"MONTHLY\",\"BudgetLimit\":" diff --git a/tools/aws/regen_iam_request_resources.py b/tools/aws/regen_iam_request_resources.py index ee27933ffd..108a54d432 100644 --- a/tools/aws/regen_iam_request_resources.py +++ b/tools/aws/regen_iam_request_resources.py @@ -44,7 +44,8 @@ acts in, so `repository/` is that account's. A member whose shape's patter the name (`(arn:...:event-bus/)?`) may give the ARN of the type of that name instead, whose one variable it is then read as, in the ARN's account and Region: EventBridge's `EventBusName`. So may a field of each element of a list of structures, each element's resource in the account and Region of -the ARN it gives: `PutEvents`' `Entries[].EventBusName`. +the ARN it gives: `PutEvents`' `Entries[].EventBusName`. A format whose account the reference names +`${AccountId}` rather than `${Account}` (DataSync's) is read as every other format's account. An operation that creates a type its action does not act on names the new resource from the ARN of the parent it acts on, when the child's ARN format is the parent's with its resource type word replaced and @@ -78,7 +79,9 @@ element lacking it (`PutEvents` publishes each entry to its bus), or from a stru a variable no member gives may be `fixed` to the one value its handler uses (a CodePipeline custom action type's owner, `Custom`), and an ARN member's value may be read only up to a character `before` which its handler drops the rest (`StartExecution`'s -`#`). A resource there may also apply only to the requests of the client whose +`#`). A resource there may be named `through` a member, a list's included, by each of +its values, `when` the request names it no other way (an EMR `ModifyInstanceGroups` with no `ClusterId`, through +each group's id, on the cluster it is in). A resource there may also apply only to the requests of the client whose `endpoint` prefix it names, where two clients give an operation of one name and nothing in a request tells them apart (EventBridge's `CreateEventBus` and EventBridge V2's); Floci reads that from the service serving the request, never from a member a caller could add. `CLIENTS_NOT_READ` are SDK clients the reference lists for a @@ -99,7 +102,9 @@ type, through which a request names a resource of one it does, with those types: request has the member, and whose action acts on one of them, names its resource through it (`through`), and the reader asks the service for the ARN of the caller's resource at the other end, or else names none; a Data API session, by its `SessionId`, runs on the cluster or the serverless workgroup it was -opened on. +opened on. A type named by its variables takes one no member fills from the ARN of another type the action acts +on whose format is that variable alone, given by the one top-level ARN member named after that type: a permission +set an IAM Identity Center create makes has the id of the instance its `InstanceArn` names. The Service Reference is live rather than a pinned dependency, so a fresh generation is not byte-identical. The two gates split along the sources: @@ -142,10 +147,11 @@ OUTPUT = REPO_ROOT / "src/main/resources/aws/iam-request-resources.json" # The namespaces read, in batches: each moves here from NOT_COVERED with the tests that show its ARNs # are the ones its handlers mint. -NAMESPACES = ("acm", "application-autoscaling", "athena", "bcm-data-exports", "bcm-pricing-calculator", "budgets", "ce", "cloudtrail", - "codebuild", "codepipeline", "cognito-identity", "cognito-idp", "cur", "ecr", "elasticloadbalancing", - "events", "firehose", "globalaccelerator", "kinesisanalytics", "payment-cryptography", "redshift-data", - "servicediscovery", "servicequotas", "states", "textract", "timestream-influxdb", "translate") +NAMESPACES = ("acm", "application-autoscaling", "athena", "bcm-data-exports", "bcm-pricing-calculator", "budgets", "ce", + "cloudtrail", "codebuild", "codepipeline", "cognito-identity", "cognito-idp", "cur", "datasync", "ecr", + "elasticloadbalancing", "elasticmapreduce", "events", "firehose", "globalaccelerator", "kinesisanalytics", + "payment-cryptography", "redshift-data", "rekognition", "servicediscovery", "servicequotas", "sso", + "states", "textract", "timestream-influxdb", "translate") # SDK clients the reference lists for a namespace's operations whose requests Floci does not serve, and why: their # members are not read. @@ -207,16 +213,16 @@ NOT_COVERED: dict[str, str] = { "connect": _REST, "controlcatalog": _REST, "controltower": _REST, - "datasync": _LATER, "detective": _REST, "dlm": _REST, "dms": _LATER, "ec2": _LATER, "ecs": _LATER, "elasticache": _LATER, - "elasticbeanstalk": _LATER, + "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, - "elasticmapreduce": _LATER, "emr-serverless": _REST, "es": _REST, "execute-api": _REST, @@ -238,8 +244,10 @@ NOT_COVERED: dict[str, str] = { "rds": _LATER, "rds-data": _REST, "redshift": _LATER, - "redshift-serverless": _LATER, - "rekognition": _LATER, + "redshift-serverless": "not read yet: its namespace, workgroup, snapshot and managed VPC endpoint ARNs end in an " + "id the service mints, `namespace/`, while its requests name them by namespaceName, " + "workgroupName, snapshotName and endpointName, so reading it needs the stored ARNs those " + "find, as Redshift Data's workgroups are found", "resource-explorer-2": _REST, "route53": _REST, "route53resolver": _LATER, @@ -255,7 +263,6 @@ NOT_COVERED: dict[str, str] = { "named in the path", "ses": _LATER, "signin": _REST, - "sso": _LATER, "sso-oauth": _REST, "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 " @@ -462,6 +469,57 @@ CORRECTIONS: dict[str, tuple[list[dict], str]] = { "accelerator's (accelerator//listener//" "endpoint-group/) and so matches the accelerator's " "format, which the action acts on alone"), + **{f"elasticmapreduce:{operation}": ([{"type": "cluster", "fill": {"ClusterId": member}}], + f"the request names its cluster by {member}, a job flow's id, which is the " + "cluster's (RunJobFlow answers it as JobFlowId beside the cluster's ARN, and " + "SetVisibleToAllUsers' JobFlowIds is 'The unique identifier of the job flow " + "(cluster)'), which the rule does not take for a ClusterId") + for operation, member in (("AddInstanceGroups", "JobFlowId"), ("AddJobFlowSteps", "JobFlowId"), + ("DescribeJobFlows", "JobFlowIds[]"), + ("SetKeepJobFlowAliveWhenNoSteps", "JobFlowIds[]"), + ("SetTerminationProtection", "JobFlowIds[]"), + ("SetUnhealthyNodeReplacement", "JobFlowIds[]"), + ("SetVisibleToAllUsers", "JobFlowIds[]"), ("TerminateJobFlows", "JobFlowIds[]"))}, + **{f"elasticmapreduce:{operation}": ([{"type": "cluster", "fill": {"ClusterId": "ResourceId"}}], + "the request names the resource it tags by ResourceId ('a cluster identifier " + "or an Amazon EMR Studio ID'), not by its ClusterId, which only 'scopes the " + "tag operation' of a session-scoped resource; Floci tags clusters alone, the " + "one ResourceId names") + for operation in ("AddTags", "RemoveTags")}, + "elasticmapreduce:ModifyInstanceGroups": ( + [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}, "unless": {"ClusterId": [None]}}, + {"types": ["cluster"], "through": "InstanceGroups[].InstanceGroupId", "when": {"ClusterId": [None]}}], + "a request may leave out its ClusterId ('The ID of the cluster to which the instance group belongs', " + "Required: No), or give it a JSON null, which the handler reads as none, and name each instance group by " + "its InstanceGroupId alone, which is then in a cluster the service finds and modifies the group in; read " + "through the group, the cluster is the one it is in, and a null ClusterId names no cluster of its own"), + **{f"rekognition:{operation}": ([{"type": "streamprocessor", "fill": {"StreamprocessorId": "Name"}}], + "the request names the stream processor by the Name it was created with, which " + "its ARN ends in (the Developer Guide's CreateStreamProcessor example: Name " + "streamProcessorForCam, StreamProcessorArn arn:aws:rekognition:us-east-1:" + "nnnnnnnnnnnn:streamprocessor/streamProcessorForCam), and the rule does not take " + "a name for the format's id") + for operation in ("DeleteStreamProcessor", "DescribeStreamProcessor", "StartStreamProcessor", + "StopStreamProcessor", "UpdateStreamProcessor")}, + **{f"sso:{operation}": ([{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, + {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, + {"type": "Account", "fill": {"AccountId": "TargetId"}}], + "the request names the account it assigns or provisions the permission set to by TargetId " + "('TargetID is an Amazon Web Services account identifier'), which the rule does not take " + "for the id of the Account the action acts on") + for operation in ("CreateAccountAssignment", "DeleteAccountAssignment")}, + "sso:ProvisionPermissionSet": ( + [{"types": ["Account", "Instance", "PermissionSet"], "arn": "InstanceArn"}, + {"types": ["Account", "Instance", "PermissionSet"], "arn": "PermissionSetArn"}, + {"type": "Account", "fill": {"AccountId": "TargetId"}, "when": {"TargetType": ["AWS_ACCOUNT"]}}, + {"types": ["Account"], "through": "PermissionSetArn", "when": {"TargetType": ["ALL_PROVISIONED_ACCOUNTS"]}}], + "the request names the account it provisions the permission set to by TargetId ('TargetID is an Amazon Web " + "Services account identifier'), which the rule does not take for the id of the Account the action acts on; " + "with the TargetType ALL_PROVISIONED_ACCOUNTS it names none and provisions the permission set to every " + "account it is provisioned to ('The ProvisionPermissionSet API operation can provision a permission set " + "using the option ALL_PROVISIONED_ACCOUNTS to, at most, 3,500 AWS accounts', the AWS_ACCOUNT option " + "provisioning it 'in a single AWS account', IAM Identity Center User Guide), read through the permission set; " + "its TargetId names the account only for AWS_ACCOUNT, the handler reading a null one as none"), } # Resource types whose ARN a request may give with a qualifier, one more `:` past its format, which their @@ -517,6 +575,8 @@ THROUGH: dict[str, tuple[list[str], str]] = { # The variables of an ARN format the account, partition and Region fill. KNOWN_VARIABLES = {"Partition", "Region", "Account"} +# An ARN format's account given as `${AccountId}`, the account `${Account}` gives in every other format. +ACCOUNT_ID_SLOT_RE = re.compile(r"^(arn:[^:]*:[^:]*:[^:]*:)\$\{AccountId}:") VARIABLE_RE = re.compile(r"\$\{(\w+)}") STEM_SUFFIX_RE = re.compile(r"(arns|arn|names|name|identifiers|identifier|ids|id|s)$") # A bare member that names the resource of the type its operation acts on. @@ -571,12 +631,13 @@ def checked_actions(documents: list[dict]) -> dict[str, dict]: def arn_formats(documents: list[dict], namespaces: set[str]) -> dict[str, dict[str, str]]: - """Each resource type of the namespaces given, as its first ARN format.""" + """Each resource type of the namespaces given, as its first ARN format, its account `${Account}` where the + reference names it `${AccountId}` (DataSync's, IAM Identity Center's applications).""" formats = {} for document in documents: if document["Name"] in namespaces: formats[document["Name"]] = dict(sorted( - (resource["Name"], resource["ARNFormats"][0]) + (resource["Name"], ACCOUNT_ID_SLOT_RE.sub(r"\1${Account}:", resource["ARNFormats"][0])) for resource in document.get("Resources", []) if resource.get("ARNFormats"))) return dict(sorted(formats.items())) @@ -698,7 +759,36 @@ def with_arn_of(resources: list[dict], formats: dict[str, str], members: dict[st | set(resource.get("unless", {})) | set(resource.get("absent", {})) arn_of = {member: named_by(members[member], formats) for member in sorted(read) if member in members} arn_of = {member: kind for member, kind in arn_of.items() if kind is not None} - found.append(dict(resource, arnOf=arn_of) if "fill" in resource and arn_of else resource) + found.append(dict(resource, arnOf={**resource.get("arnOf", {}), **arn_of}) + if "fill" in resource and arn_of else resource) + return found + + +def with_parent_ids(resources: list[dict], formats: dict[str, str], types: list[str], + members: dict[str, str]) -> list[dict]: + """The resources, each a type named by its variables taking one no member fills from the ARN of another type the + action acts on whose format is that variable alone, given by the one top-level ARN member named after that type: + a permission set made in an instance, `permissionSet/${InstanceId}/${PermissionSetId}`, has the id of the + instance the request's InstanceArn names, `instance/${InstanceId}`, and its own id open.""" + found = [] + for resource in resources: + if "fill" not in resource or "find" in resource: + found.append(resource) + continue + fill, arn_of = dict(resource["fill"]), dict(resource.get("arnOf", {})) + for parent in types: + variables = [v for v in VARIABLE_RE.findall(formats.get(parent, "")) if v not in KNOWN_VARIABLES] + if parent == resource["type"] or len(variables) != 1 or variables[0] in fill \ + or variables[0] not in VARIABLE_RE.findall(formats[resource["type"]]) \ + or not ONE_VARIABLE_RE.match(_resource(formats[parent])): + continue + held = [member for member, path in members.items() if path == member + and re.search(r"arn$", member, re.IGNORECASE) and related(stem(member), stem(parent))] + if len(held) == 1: + fill[variables[0]] = held[0] + arn_of[held[0]] = parent + found.append(dict(resource, fill=dict(sorted(fill.items())), arnOf=arn_of) if fill != resource["fill"] + else resource) return found @@ -879,7 +969,8 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d raise ValueError(f"CORRECTIONS serves {operation} on {sorted(unknown)}, no endpoint prefix of the clients " f"it reads ({sorted(endpoints)})") else: - resources = with_through(with_found(resources_for(operation, types, formats, members), + resources = with_through(with_found(with_parent_ids(resources_for(operation, types, formats, members), + formats, types, members), namespace_of(operation), types, members), namespace_of(operation), types, members) resources = with_account(resources, formats, account_members(models, operation.split(":", 1)[1])) @@ -1111,7 +1202,8 @@ def validate(document: dict) -> list[str]: def _resource_problems(operation: str, resource: object, types: set[str], formats: dict[str, str]) -> list[str]: if not isinstance(resource, dict) or not ({"types", "arn"} <= set(resource) <= {"types", "arn", "before", "made", "endpoint"} - or {"types", "through"} <= set(resource) <= {"types", "through", "endpoint"} + or {"types", "through"} <= set(resource) <= {"types", "through", "when", + "endpoint"} or {"type", "fill"} <= set(resource) <= {"type", "fill", "when", "unless", "absent", "arnOf", "account", "fixed", "made", "before", "find", "endpoint"}): return [f"{operation} names {resource!r}, which is neither an ARN member nor a type's variables"] @@ -1133,9 +1225,9 @@ def _resource_problems(operation: str, resource: object, types: set[str], format return [] if "through" in resource: through = resource["through"] - if not isinstance(through, str) or not PATH_RE.match(through) or through.endswith("[]"): - return [f"{operation} names {kinds} through {through!r}, which is no member of one value"] - return [] + if not isinstance(through, str) or not FILL_PATH_RE.match(through): + return [f"{operation} names {kinds} through {through!r}, which is no member"] + return _conditions_problems(operation, kinds, resource) fill = resource["fill"] find = resource.get("find", []) if not isinstance(find, list) or ("find" in resource and (not find or fill or set(resource) & FOUND_ONLY)) \ @@ -1152,12 +1244,9 @@ def _resource_problems(operation: str, resource: object, types: set[str], format if not isinstance(fixed, dict) or set(fixed) - variables or set(fixed) & set(fill) or not all( isinstance(value, str) and value for value in fixed.values()): return [f"{operation} fixes {fixed!r}, which are no variables of {kinds[0]}'s ARN no member fills, or no values"] - for key in ("when", "unless"): - when = resource.get(key, {}) - if not isinstance(when, dict) or not all( - isinstance(path, str) and PATH_RE.match(path) and not path.endswith("[]") and isinstance(values, list) - and values and all(value is None or isinstance(value, str) for value in values) for path, values in when.items()): - return [f"{operation} names {kinds[0]} {key} {when!r}, which is no member's values"] + problems = _conditions_problems(operation, kinds, resource) + if problems: + return problems absent = resource.get("absent", {}) if not isinstance(absent, dict) or not all(_read_as_one(path, fill) and isinstance(value, str) and value for path, value in absent.items()): @@ -1175,6 +1264,17 @@ def _resource_problems(operation: str, resource: object, types: set[str], format return [] +def _conditions_problems(operation: str, kinds: list[str], resource: dict) -> list[str]: + """What is wrong with the members' values a resource is named `when` or `unless` the request gives.""" + for key in ("when", "unless"): + when = resource.get(key, {}) + if not isinstance(when, dict) or not all( + isinstance(path, str) and PATH_RE.match(path) and not path.endswith("[]") and isinstance(values, list) + and values and all(value is None or isinstance(value, str) for value in values) for path, values in when.items()): + return [f"{operation} names {kinds[0]} {key} {when!r}, which is no member's values"] + return [] + + def _read_as_one(path: object, fill: dict) -> bool: """Whether a member gives one value as it is read: one that is no list, top-level or a field of a structure, or a field of each element of a list of structures that fills a variable, one value for each element.""" diff --git a/tools/aws/test_regen_iam_request_resources.py b/tools/aws/test_regen_iam_request_resources.py index bd5486e368..39036a6140 100644 --- a/tools/aws/test_regen_iam_request_resources.py +++ b/tools/aws/test_regen_iam_request_resources.py @@ -147,6 +147,25 @@ def test_a_create_naming_others_marks_what_it_makes(): assert r.with_made([parent, webhook], "svc:PutWebhook", formats) == [parent, dict(webhook, made=True)] +def test_a_type_made_in_another_takes_that_ones_id_from_the_arn_member_named_after_it(): + formats = {"instance": "arn:${Partition}:svc:::instance/${InstanceId}", + "set": "arn:${Partition}:svc:::set/${InstanceId}/${SetId}", + "pool": FORMATS["pool"]} + made = {"type": "set", "fill": {}, "made": True} + instance = {"types": ["instance", "set"], "arn": "InstanceArn"} + assert r.with_parent_ids([instance, made], formats, ["instance", "set"], members("InstanceArn", "Name")) == [ + instance, {"type": "set", "fill": {"InstanceId": "InstanceArn"}, "arnOf": {"InstanceArn": "instance"}, + "made": True}] + # Not from a type the action does not act on, a member in a structure, or with two ARN members to pick from, + # and not over a variable a member fills already. + assert r.with_parent_ids([made], formats, ["set"], members("InstanceArn")) == [made] + assert r.with_parent_ids([made], formats, ["instance", "set"], {"InstanceArn": "Config.InstanceArn"}) == [made] + assert r.with_parent_ids([made], formats, ["instance", "set"], + members("InstanceArn", "SourceInstanceArn")) == [made] + filled = {"type": "set", "fill": {"InstanceId": "InstanceId"}} + assert r.with_parent_ids([filled], formats, ["instance", "set"], members("InstanceArn", "InstanceId")) == [filled] + + def test_stems_drop_the_suffixes_names_carry(): assert r.stem("TargetGroupArns") == "targetgroup" assert r.stem("DBInstanceIdentifier") == "dbinstance" @@ -230,6 +249,17 @@ def test_a_member_holding_an_account_id_gives_the_account_of_the_types_named_by_ assert r.with_account([{"type": "thing", "fill": {}}], FORMATS, ["a", "b"]) == [{"type": "thing", "fill": {}}] +def test_a_format_whose_account_is_an_account_id_variable_takes_the_account_every_other_format_does(): + documents = [reference("svc", {}, {"agent": "arn:${Partition}:svc:${Region}:${AccountId}:agent/${AgentId}", + "account": "arn:${Partition}:svc:::account/${AccountId}", + "thing": FORMATS["thing"]})] + # An account id in the resource, past the account, stays a variable a member fills. + assert r.arn_formats(documents, {"svc"}) == {"svc": { + "account": "arn:${Partition}:svc:::account/${AccountId}", + "agent": "arn:${Partition}:svc:${Region}:${Account}:agent/${AgentId}", + "thing": FORMATS["thing"]}} + + def test_a_file_that_is_not_json_is_reported_and_not_read(corrections, tmp_path, capsys): output = tmp_path / "iam-request-resources.json" output.write_text("{not json", encoding="utf-8") @@ -437,9 +467,12 @@ def test_a_well_formed_document_validates(): document = good_document() document["operations"]["svc:B"]["resources"][0].update(fill={}, find=["Namespace", "Id"]) assert r.validate(document) == [] - # A resource named through a member naming another of its service's own, which it runs on. + # A resource named through a member naming another of its service's own, which it runs on, or through each + # value of a list's field when another member is absent. document = good_document() - document["operations"]["svc:A"]["resources"] = [{"types": ["thing"], "through": "SessionId"}] + document["operations"]["svc:A"]["resources"] = [{"types": ["thing"], "through": "SessionId"}, + {"types": ["thing"], "through": "Parts[].PartId", + "when": {"ThingName": [None]}}] assert r.validate(document) == [] @@ -454,10 +487,14 @@ def with_a_create() -> dict: (lambda d: d["operations"]["svc:A"]["resources"][0].update(types=["pool"]), "not resource types"), (lambda d: d["operations"]["svc:A"]["resources"][0].update(arn="a.b.c"), "no member"), (lambda d: d["operations"]["svc:A"]["resources"][0].update(arn="a[][]"), "no member"), - (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "Ids[]"}), - "no member of one value"), - (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "a.b"}), - "no member of one value"), + (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "Ids[][]"}), + "no member"), + (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "a.b.c"}), + "no member"), + (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "SessionId", + "when": {"Ids[]": ["a"]}}), "no member's values"), + (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "SessionId", + "unless": {"Id": ["a"]}}), "neither an ARN member"), (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["pool"], "through": "SessionId"}), "not resource types"), (lambda d: d["operations"]["svc:A"]["resources"].__setitem__(0, {"types": ["thing"], "through": "SessionId",