diff --git a/docs/services/athena.md b/docs/services/athena.md index 964c207096..5c06cf1e52 100644 --- a/docs/services/athena.md +++ b/docs/services/athena.md @@ -78,7 +78,11 @@ omitted, since the API reference does not document a default. The built-in `AwsDataCatalog` stays first, followed by registered catalogs in name order. `GetDataCatalog` requires `Name`; `ListDatabases`, `ListTableMetadata` and `GetTableMetadata` require `CatalogName`. Name `AwsDataCatalog` explicitly to -read the built-in catalog. +read the built-in catalog. Floci reads databases and tables from the account's +Glue Data Catalog alone, so these three refuse a catalog whose metadata lives +elsewhere, a `LAMBDA`, `HIVE` or `FEDERATED` one or a `GLUE` one registered for +another account's `catalog-id`, with `MetadataException`, and a catalog that is +not registered with `InvalidRequestException`. Pass the opaque `NextToken` to continue; final pages omit it. Tokens are scoped to the action, caller account, and request region and remain resumable after a cursor catalog is deleted. Malformed tokens, tokens outside the 1-to-1024 diff --git a/docs/services/ce.md b/docs/services/ce.md index 099b09c301..3da6220f38 100644 --- a/docs/services/ce.md +++ b/docs/services/ce.md @@ -10,6 +10,13 @@ multiplied by the bundled AWS Pricing snapshot served by the so any test that mutates resources (e.g. creates a bucket, runs an instance) sees those changes in the next `GetCostAndUsage` call. +Floci answers the costs of the account as a whole, which AWS gives as the +caller's primary billing view. AWS does not document that view's ARN, so Floci +takes it as `arn:aws:billing:::billingview/primary`. `GetCostAndUsage`, `GetCostAndUsageWithResources`, `GetDimensionValues`, `GetTags` +and `GetCostCategories` accept that view or none in `BillingViewArn`, and refuse +any other with `ResourceNotFoundException`, as AWS does for a view it does not +hold. With IAM enforcement on, they are checked on the view they name. + ## Supported Actions diff --git a/docs/services/cloudwatch.md b/docs/services/cloudwatch.md index 98f98dda01..19974cb14e 100644 --- a/docs/services/cloudwatch.md +++ b/docs/services/cloudwatch.md @@ -149,8 +149,9 @@ configuration and does not deliver the source's logs. this account." (likewise for a Delivery Destination and a Delivery). - With IAM enforcement on, each action is authorized on the resources the AWS Service Authorization Reference lists for it: the source, destination or delivery it names, and for `CreateDelivery` the - source, the destination and the new delivery; `DeleteDeliverySource` on the source it deletes. The - Describe actions are authorized on `*`, as the reference lists no resource for them. + source, the destination and the new delivery; `DeleteDeliverySource` on the delivery destinations the + deliveries from the source it deletes send to, the type the reference lists for it, and on `*` for a source + with none. The Describe actions are authorized on `*`, as the reference lists no resource for them. Not modelled: delivery destination policies (`PutDeliveryDestinationPolicy` and its siblings), and record field defaults for sources other than an EventBridge event bus. diff --git a/docs/services/dynamodb.md b/docs/services/dynamodb.md index 98fa2c9692..a76eafba05 100644 --- a/docs/services/dynamodb.md +++ b/docs/services/dynamodb.md @@ -14,9 +14,9 @@ The listing is not filtered to the caller's individually authorized tables. This resource matching was checked against live AWS with isolated role sessions. Pagination and ignored table selectors do not change the collection being authorized. Other DynamoDB operations retain their own authorization resources. -The generated IAM request-resource table records `ListTables` as a measured correction to -the Service Reference. Other DynamoDB operations keep their existing resource builders, -including batch, transaction and PartiQL table extraction. +The Service Reference lists no resource type for the action, so the collection comes from that +measurement, the one thing the generated table of request resources states by hand. Other DynamoDB +operations keep their existing resource builders, including batch, transaction and PartiQL table extraction. ## Supported Actions diff --git a/docs/services/iam.md b/docs/services/iam.md index 3e02733443..9d00ae93c2 100644 --- a/docs/services/iam.md +++ b/docs/services/iam.md @@ -1921,7 +1921,15 @@ Access Manager, CloudWatch Observability Access Manager, AWS Resource Explorer, Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub and Amazon GuardDuty 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 +of a type the action acts on, or members filling the variables of a type's format. Nothing in it is +stated by hand but what AWS was measured to check where neither botocore nor the Service Reference says +it, each entry citing the measurement (a policy probe against real AWS, or AWS's own AccessDenied message +naming the resource): DynamoDB's `ListTables` is checked on the literal `table/*` of the request's +partition, Region and account, and Step Functions' `SendTaskSuccess`, `SendTaskFailure` and +`SendTaskHeartbeat` on the activity or the unqualified state machine their task token belongs to, though +the Service Reference lists no resource type for either. A service only looks up what it holds where the +table asks it to (the resource a name finds, the one an id reaches, its default one); none says what an +operation acts on. A member holding an ARN may be one inside a structure or inside each of a list's structures: `SetRulePriorities` is checked on the rules its `RulePriorities` name, and `CreateStateMachineAlias` on the state machine its routing configuration's versions are of. A variable the @@ -1937,30 +1945,36 @@ and answers with every repository, names no repository, and a number or a null a member whose botocore shape is an account id gives the account the type is in: ECR's `registryId` selects the registry its handler acts in, so `repository/` is checked in that account, and a `registryId` that is no account id names no repository, while a null one is the caller's, as ECR -reads it. `StartExecution` and -`StartSyncExecution` take Step Functions Local's `#` and run the -machine before the `#`, so that machine is the one checked. `StartPipelineExecution` and +reads it. Step Functions Local's `#`, which `StartExecution` and +`StartSyncExecution` take and run the machine before the `#` of, is checked as given: it is no ARN AWS has, +and nothing botocore or the Service Reference says reads it otherwise, so a grant covering such executions +names it (`stateMachine:*`). `StartPipelineExecution` and `GetPipelineState` name their pipeline by a bare `name`, which is read as the pipeline's; `CreatePipeline` and `UpdatePipeline` by `pipeline.name`, not by `pipeline.roleArn`, which holds the role CodePipeline assumes; `PutWebhook` names the webhook by `webhook.name` and the pipeline it connects to by `webhook.targetPipeline`. A CodePipeline webhook is `webhook:`, the ARN AWS gives it, and a custom action type `actiontype:Custom///`, its owner -being `Custom`, which the request does not give. Cloud Map's `CreateService` is checked on the +being `Custom`, which the request does not give and the operation's name gives as the one value of +botocore's `ActionOwner` enum it is. Cloud Map's `CreateService` is checked on the namespace its `NamespaceId` names or, when it gives none or a JSON null, the one its -`DnsConfig.NamespaceId` names, as Cloud Map reads them, and on the service it creates. A CodeBuild build is checked on its -project, which its id names before its `:` (`:`), as CodeBuild authorizes -`BatchGetBuilds`, `StopBuild`, `RetryBuild` and `BatchDeleteBuilds`. `CreateBudget` and `UpdateBudget` +`DnsConfig.NamespaceId` names, as Cloud Map reads them, and on the service it creates. A CodeBuild build is checked on the +project CodeBuild holds it under, as CodeBuild authorizes `BatchGetBuilds`, `StopBuild`, `RetryBuild` and +`BatchDeleteBuilds`; an id of no build it holds names no project, as nothing botocore or the Service +Reference says gives a build id's project, so such a request is checked on `*`. `CreateBudget` and `UpdateBudget` are checked on the budget their `Budget.BudgetName` or `NewBudget.BudgetName` names, and Cost and Usage Reports' `PutReportDefinition` and `ModifyReportDefinition` on the report their `ReportDefinition.ReportName` or `ReportName` names, not on the billing view ARN each may carry, which names no budget or report. An Athena request naming no workgroup is checked on `workgroup/primary`, where `StartQueryExecution` runs its query, `ListQueryExecutions` and `ListNamedQueries` list, and `GetWorkGroup` answers. Athena's `ListDatabases`, `ListTableMetadata` and `GetTableMetadata` are checked on the catalog their -`CatalogName` names and on `datacatalog/AwsDataCatalog`, the Glue Data Catalog Floci reads whichever -catalog they name, and a `GetDataCatalog` naming no catalog on `datacatalog/AwsDataCatalog`, the one it -answers. Cost Explorer's cost and usage reads are checked on `*`, not on the billing view -their `BillingViewArn` gives: Floci serves no billing views and answers the account's costs whichever -one is named. Data Exports' `CreateExport` is not checked on the +`CatalogName` names, and a `GetDataCatalog` naming no catalog on `datacatalog/AwsDataCatalog`, the one it +answers. Floci reads their metadata from the account's Glue Data Catalog alone, so they refuse with +`MetadataException` a catalog whose metadata is elsewhere, one of another type than `GLUE` or registered +for another account's catalog, and read no catalog but the one checked. Cost Explorer's cost and usage +reads are checked on the billing view their `BillingViewArn` gives, and on `*` when they give none. +Floci answers the costs of the caller's primary billing view alone, which it takes as `billingview/primary` +since AWS does not document that view's ARN, and refuses any other with `ResourceNotFoundException`, as AWS +does a view it does not hold. Data Exports' `CreateExport` is not checked on the ARN its `Export.ExportArn` gives, which is the new export's own. CloudTrail's `StartLogging`, `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 @@ -1969,14 +1983,13 @@ Amazon EMR's requests naming a cluster by its job flow id, in `JobFlowId` or `Jo `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` +in, the one EMR finds it in, botocore documenting `ClusterId` as "the cluster to which the instance group +belongs". 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, and it provisions to the accounts it was -checked on: one another request provisions the permission set to while it runs is left as that request -left it. A permission set, an application or a trusted token issuer +instance and the permission set. A `ProvisionPermissionSet` for `ALL_PROVISIONED_ACCOUNTS` names no +account, and nothing botocore or the Service Reference says names the accounts it provisions to, so it is +checked on its instance and permission set alone. 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 @@ -2174,7 +2187,8 @@ Analyzer's analyzer operations, Security Hub's hub operations and GuardDuty's de table of request resources reading the resource they name. Every route Floci serves of AWS Lake Formation and Amazon Inspector is one AWS authorizes on no resource type, as is every one of Amazon Macie's but `CreateMember`, so those are checked by their routes alone. `CreateMember`, on `POST /members`, is checked on the -member its `account.accountId` names, and needs `macie2:TagResource` when it carries tags. API Gateway's +account's members, `member/*`, as nothing botocore or the Service Reference says names the member it makes by its +`account.accountId`, and needs `macie2:TagResource` when it carries tags. API Gateway's routes are checked by their routes alone too, on the path Floci builds the ARN from, and the authorized actions list the operations AWS checks as the action their HTTP method names (above). A route whose action AWS checks on a resource Floci neither builds nor reads would not be checked, since checked on `*` a grant scoped to @@ -2416,13 +2430,12 @@ when the caller may not pass the role. `StartAutomationExecution`, Config `PutRemediationConfigurations`); one the Service Reference passes roles from to several services without saying which member goes where (EMR `RunJobFlow`, whose `JobFlowRole` also names an instance profile, EKS `UpdateClusterConfig`, CloudWatch Logs - `CreateImportTask`, SageMaker `CreateTrainingSession`); one whose body is XML (S3 - `PutBucketReplication`); and one the botocore models Floci is pinned to do not have yet (SSM - `RegisterDefaultHostManagementConfiguration`, Kinesis Analytics `ImportSnapshot`), whose role is - read as soon as a release that has it is pinned, since the generator and its offline gate refuse - that reason once the models carry the operation. EC2's `RequestSpotFleet` names its roles in - EC2's own protocol, one of them as an instance profile. The REST services whose routes no rule - maps yet, and API Gateway, which is authorized by HTTP method, are not read either. + `CreateImportTask`); one whose body is XML (S3 `PutBucketReplication`); and one the botocore + models Floci is pinned to do not have yet (SSM `RegisterDefaultHostManagementConfiguration`, + Kinesis Analytics `ImportSnapshot`, Secrets Manager `AssociateCrossAccountReplica`), whose role + the generator reads as soon as a release that has it is pinned. EC2's `RequestSpotFleet` names + its roles in EC2's own protocol, one of them as an instance profile. The REST services whose + routes no rule maps yet, and API Gateway, which is authorized by HTTP method, are not read either. A request that names a Lambda network connector also needs `lambda:PassNetworkConnector` on it. The Lambda developer guide has "The caller must have `lambda:PassNetworkConnector` on the referenced diff --git a/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java b/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java index 6c322b30f5..1e9c829d89 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java +++ b/src/main/java/io/floci/aws/core/common/RequestResourceMembers.java @@ -53,7 +53,12 @@ final class RequestResourceMembers { /** The one id a child type's format appends to its parent's. */ private static final Pattern APPENDED_ID = Pattern.compile("[/:]\\$\\{\\w+}"); /** The keys a resource found by members does not take: it is read no other way. */ - private static final List FOUND_ONLY = List.of("absent", "arnOf", "fixed", "before"); + private static final List FOUND_ONLY = List.of("arnOf", "fixed"); + /** The keys of a resource read from a member holding its ARN. */ + private static final Set ARN_KEYS = Set.of("types", "arn", "made", "endpoint"); + /** The keys of a resource whose format's variables members fill, or its service finds by them. */ + private static final Set FILL_KEYS = Set.of("type", "fill", "when", "unless", "arnOf", "account", "fixed", + "made", "find", "endpoint", "default", "whenDefault", "unlessDefault"); /** The keys of a resource named through a member naming another of its service's own: it is read no other way. */ private static final Set THROUGH_KEYS = Set.of("types", "through", "when", "endpoint"); /** The keys of a resource its service acts on for a request naming none of it: it is read no other way. */ @@ -133,19 +138,15 @@ final class RequestResourceMembers { * A resource a request names: by a member holding its ARN, which names a resource of one of {@code types} when * it matches the type's format, or by members filling the variables of one type's format, the others open, * only {@code when} each member named has one of its values and {@code unless} it has one of those, an empty - * one for the member absent or given a JSON null it is not read as a value for, in the account an {@code account} member gives (ECR's {@code registryId}), or else - * the request's. A member {@code absent} from the request, or given a JSON null, is read as the value given for - * it (an EventBridge request naming no event bus names {@code default}), and one in {@code arnOf} may give an - * ARN of the type named for it instead of its name, read as that type's one variable, the resource then in the - * ARN's account and Region, or the caller's and the request's where the ARN leaves them empty. A member filling - * a variable may be a field of each of a list's structures ({@code Entries[].EventBusName}), which names one - * resource for each structure, read as {@code absent} gives for one that lacks it and in the account and Region - * of the ARN that structure gives, if any. Such a member is in {@code absent} or {@code arnOf} only when it - * fills a variable. A member filling a variable may also be a field of a structure ({@code pipeline.name}). A - * variable no member gives may be {@code fixed} to the one value its handler uses (a CodePipeline custom action - * type's owner, {@code Custom}). A member's value, an ARN or a variable's, is read up to the character - * {@code before}, when there is one: Step Functions Local's handler drops a test case after {@code #}, and a - * CodeBuild build id is {@code :}, a build being checked on its project. A create naming other + * one for the member absent or given a JSON null, in the account an {@code account} member gives (ECR's + * {@code registryId}), or else the request's. A member in {@code arnOf} may give an ARN of the type named for it + * instead of its name, read as that type's one variable, the resource then in the ARN's account and Region, or the + * caller's and the request's where the ARN leaves them empty. A member filling a variable may be a field of each + * of a list's structures ({@code Entries[].EventBusName}), which names one resource for each structure, in the + * account and Region of the ARN that structure gives, if any; a member is in {@code arnOf} only when it fills a + * variable. A member filling a variable may also be a field of a structure ({@code pipeline.name}). A variable no + * member gives may be {@code fixed} to the one value of its enum the operation's name gives (a CodePipeline + * custom action type's owner, {@code Custom}). A create naming other * resources beside the one it makes marks that one {@code made}, where its tags go (a webhook, not the pipeline * it connects to). A type whose ARN is all an id its service mints is named instead by the members its service * finds it by, {@code find}, each one value, in the order its service reads them, filling none of its variables @@ -158,25 +159,34 @@ final class RequestResourceMembers { * instance group, by its {@code InstanceGroups[].InstanceGroupId}), {@code when} the request gives the values it * names, and read no other way. A resource {@code byDefault} is the one of its type its service acts on for a * request naming none of it, {@code when} the request leaves out the member that would (Resource Explorer's - * {@code Search} with no {@code ViewArn}, on the Region's default view), read no other way. + * {@code Search} with no {@code ViewArn}, on the Region's default view), read no other way. Of two types whose + * formats differ by one variable a member fills, the one without it applies {@code whenDefault} that member is + * absent or names its type's default resource, which the service gives, and the other {@code unlessDefault}: a + * rule on EventBridge's default bus has no bus in its ARN. Each maps the member to that type. */ record Resource(List types, Member arn, Map fill, Map> when, - Map> unless, Map absent, Map arnOf, - Member account, String before, Map fixed, boolean made, List find, - String endpoint, Member through, boolean byDefault) { + Map> unless, Map arnOf, Member account, + Map fixed, boolean made, List find, String endpoint, Member through, + boolean byDefault, Map whenDefault, Map unlessDefault) { Resource(List types, Member arn, Map fill, Map> when, - Map> unless, Map absent, Map arnOf, - Member account, String before, Map fixed, boolean made, List find, - String endpoint, Member through) { - this(types, arn, fill, when, unless, absent, arnOf, account, before, fixed, made, find, endpoint, through, - false); + Map> unless, Map arnOf, Member account, + Map fixed, boolean made, List find, String endpoint, Member through, + boolean byDefault) { + this(types, arn, fill, when, unless, arnOf, account, fixed, made, find, endpoint, through, byDefault, + Map.of(), Map.of()); } Resource(List types, Member arn, Map fill, Map> when, - Map> unless, Map absent, Map arnOf, - Member account, String before, Map fixed, boolean made, String endpoint) { - this(types, arn, fill, when, unless, absent, arnOf, account, before, fixed, made, List.of(), endpoint, null); + Map> unless, Map arnOf, Member account, + Map fixed, boolean made, List find, String endpoint, Member through) { + this(types, arn, fill, when, unless, arnOf, account, fixed, made, find, endpoint, through, false); + } + + Resource(List types, Member arn, Map fill, Map> when, + Map> unless, Map arnOf, Member account, + Map fixed, boolean made, String endpoint) { + this(types, arn, fill, when, unless, arnOf, account, fixed, made, List.of(), endpoint, null); } } @@ -384,10 +394,12 @@ final class RequestResourceMembers { throw new IllegalStateException(RESOURCE_NAME + " serves a resource of " + operation + " on no endpoint prefix"); } - String before = resource.has("before") ? resource.path("before").asText("") : null; - if (before != null && before.length() != 1) { - throw new IllegalStateException(RESOURCE_NAME + " reads a member for " + operation - + " before " + before + ", no one character"); + Set keys = resource.has("through") ? THROUGH_KEYS : resource.has("arn") ? ARN_KEYS : FILL_KEYS; + List unknown = resource.properties().stream().map(Map.Entry::getKey) + .filter(key -> !keys.contains(key)).toList(); + if (!unknown.isEmpty()) { + throw new IllegalStateException(RESOURCE_NAME + " gives a resource of " + operation + " " + unknown + + ", no key of its kind of resource"); } if (resource.has("through")) { List types = resource.path("types").valueStream().map(JsonNode::asText).toList(); @@ -399,7 +411,7 @@ final class RequestResourceMembers { + "members reading it otherwise"); } 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); + Map.of(), Map.of(), null, Map.of(), false, List.of(), endpoint, through); } if (resource.has("arn")) { List types = resource.path("types").valueStream().map(JsonNode::asText).toList(); @@ -412,7 +424,7 @@ final class RequestResourceMembers { + " and finds its resource by " + resource.path("find") + " too"); } return new Resource(types, arnMember(operation, resource.path("arn").asText("")), Map.of(), Map.of(), - Map.of(), Map.of(), Map.of(), null, before, Map.of(), made, endpoint); + Map.of(), Map.of(), null, Map.of(), made, endpoint); } String type = resource.path("type").asText(""); ArnFormat format = formats.get(type); @@ -461,15 +473,12 @@ final class RequestResourceMembers { + " as its service's default, which is not for a request naming none"); } Set filled = Set.copyOf(fill.values().stream().map(Member::path).toList()); - Map absent = new LinkedHashMap<>(); - resource.path("absent").properties().forEach(member -> { - if (!readAsOne(operation, member.getKey(), filled) || !member.getValue().isTextual() - || member.getValue().asText().isEmpty()) { - throw new IllegalStateException(RESOURCE_NAME + " reads " + member.getKey() + " for " + operation - + " when absent as no value"); - } - absent.put(member.getKey(), member.getValue().asText()); - }); + Map whenDefault = defaultPair(operation, type, resource.path("whenDefault"), formats, null); + Map unlessDefault = defaultPair(operation, type, resource.path("unlessDefault"), formats, filled); + if (!whenDefault.isEmpty() && !unlessDefault.isEmpty()) { + throw new IllegalStateException(RESOURCE_NAME + " names " + type + " for " + operation + + " both when and unless a member names its default"); + } Map arnOf = new LinkedHashMap<>(); resource.path("arnOf").properties().forEach(member -> { ArnFormat named = formats.get(member.getValue().asText("")); @@ -485,8 +494,37 @@ final class RequestResourceMembers { throw new IllegalStateException(RESOURCE_NAME + " takes " + type + "'s account for " + operation + " from " + account.name() + ", no member of one account or a type of none"); } - return new Resource(List.of(type), null, Map.copyOf(fill), when, unless, Map.copyOf(absent), Map.copyOf(arnOf), - account, before, Map.copyOf(fixed), made, List.copyOf(find), endpoint, null, byDefault); + return new Resource(List.of(type), null, Map.copyOf(fill), when, unless, Map.copyOf(arnOf), account, + Map.copyOf(fixed), made, List.copyOf(find), endpoint, null, byDefault, whenDefault, unlessDefault); + } + + /** + * A {@code whenDefault} or {@code unlessDefault}: one member and the type whose default it may name, a member the + * resource fills for {@code unlessDefault} ({@code filled} given); empty when the resource has none. + */ + private static Map defaultPair(String operation, String type, JsonNode pair, + Map formats, Set filled) { + if (pair.isMissingNode()) { + return Map.of(); + } + if (!pair.isObject() || pair.size() != 1) { + throw new IllegalStateException(RESOURCE_NAME + " names " + type + " for " + operation + + " by a default of no one member and type"); + } + Map.Entry entry = pair.properties().iterator().next(); + if (!formats.containsKey(entry.getValue().asText("")) || (filled != null && !filled.contains(entry.getKey()))) { + throw new IllegalStateException(RESOURCE_NAME + " names " + type + " for " + operation + " by the default of " + + entry.getValue() + " " + entry.getKey() + " names, no type or no member it fills"); + } + return Map.of(entry.getKey(), entry.getValue().asText()); + } + + /** + * A member of a request by its path, as {@code StoredResourceArns.actedOn} names one: {@code taskToken}, + * {@code account.accountId}, {@code InstanceGroups[].InstanceGroupId}. + */ + static Member selector(String path) { + return arnMember("a service's selector", path); } /** The values each member named in {@code when} or {@code unless} may have, an empty one for the member absent. */ diff --git a/src/main/java/io/floci/aws/core/common/RequestResources.java b/src/main/java/io/floci/aws/core/common/RequestResources.java index 2b7d57cc29..d3955dc1c7 100644 --- a/src/main/java/io/floci/aws/core/common/RequestResources.java +++ b/src/main/java/io/floci/aws/core/common/RequestResources.java @@ -59,7 +59,7 @@ public final class RequestResources { private RequestResources() { } - /** Whether the generated table owns this operation, including corrections to hand-built namespaces. */ + /** Whether the generated table owns this operation, including those of hand-built namespaces it reads. */ public static boolean reads(String operation) { return operation != null && RequestResourceMembers.table().operations().containsKey(operation); } @@ -107,13 +107,14 @@ public final class RequestResources { } List resources = operation == null ? null : served(table.operations().get(operation), ctx); - if (resources == null || resources.isEmpty()) { + if (resources == null) { return List.of(); } Map sent = IamConditionContextResolver.formParameters(ctx); JsonNode body = sent.isEmpty() ? located(table, operation, PassedRoles.jsonBody(ctx), ctx, labels) : null; Map form = located(table, operation, sent, ctx, labels); - return named(resources, formats(table, operation), form, body, partition, region, accountId, stored); + return resources.isEmpty() ? List.of() + : named(operation, resources, formats(table, operation), form, body, partition, region, accountId, stored); } /** @@ -132,7 +133,7 @@ public final class RequestResources { if (resources == null || resources.isEmpty()) { return List.of(); } - return named(resources, formats(table, operation), Map.of(), body, partition, region, accountId, stored); + return named(operation, resources, formats(table, operation), Map.of(), body, partition, region, accountId, stored); } /** Whether the table holds the operation as one with no resource of its own, which is checked on {@code *}. */ @@ -177,18 +178,20 @@ public final class RequestResources { } /** The ARNs of the resources the request names, as {@link #of} reads them. */ - private static List named(List resources, + private static List named(String operation, List resources, Map formats, Map form, JsonNode body, String partition, String region, String accountId, StoredResourceArns stored) { Set arns = new LinkedHashSet<>(); for (RequestResourceMembers.Resource resource : resources) { - if (!applies(resource, form, body, formats)) { + if (!applies(resource, form, body, formats) || !onDefault(resource, form, body, formats, region, stored)) { continue; } if (resource.arn() != null) { - for (String value : values(form, body, resource.arn())) { - String named = before(value, resource.before()); + for (String named : values(form, body, resource.arn())) { + if (longerFormat(named, resource.types(), formats)) { + continue; + } // An ARN fitting a customer's format and one AWS owns is AWS's: the account `aws` tells them apart. resource.types().stream().map(formats::get).filter(format -> format.pattern().matcher(named).matches()) .min(Comparator.comparing(format -> !format.awsOwned())) @@ -262,16 +265,12 @@ public final class RequestResources { Map form = located(table, operation, sent, ctx, labels); Map formats = formats(table, operation); if (creates == null) { - return named(made, formats, form, body, partition, region, accountId, null); + return named(operation, made, formats, form, body, partition, region, accountId, null); } Set arns = new LinkedHashSet<>(); for (RequestResourceMembers.Created created : creates) { - String separator = table.operations().getOrDefault(operation, List.of()).stream() - .filter(resource -> created.arn().equals(resource.arn()) && resource.before() != null) - .map(RequestResourceMembers.Resource::before).findFirst().orElse(null); RequestResourceMembers.ArnFormat parentFormat = formats.get(created.parent()); - for (String value : values(form, body, created.arn())) { - String named = before(value, separator); + for (String named : values(form, body, created.arn())) { if (!parentFormat.pattern().matcher(named).matches()) { continue; } @@ -376,10 +375,48 @@ public final class RequestResources { || resource.endpoint().equals(endpoint)).toList(); } - /** The value up to {@code separator}, which its handler drops the rest after; the whole value without one. */ - private static String before(String value, String separator) { - int at = separator == null ? -1 : value.indexOf(separator); - return at < 0 ? value : value.substring(0, at); + /** + * Whether an ARN fits the format of a type of the namespace the resource does not read, longer than every one of + * its own that it fits: an endpoint group's ARN under its accelerator's, {@code accelerator//listener/...}, + * is the endpoint group's, not the accelerator's. + */ + private static boolean longerFormat(String arn, List types, + Map formats) { + List fits = types.stream().map(formats::get) + .filter(format -> format != null && format.pattern().matcher(arn).matches()).toList(); + // A type checked without its qualifier takes the longer ARNs of its versions and aliases on purpose. + if (fits.stream().anyMatch(RequestResourceMembers.ArnFormat::unqualified)) { + return false; + } + int own = fits.stream().mapToInt(format -> format.format().length()).max().orElse(Integer.MAX_VALUE); + return formats.entrySet().stream().anyMatch(other -> !types.contains(other.getKey()) + && other.getValue().format().length() > own && other.getValue().pattern().matcher(arn).matches()); + } + + /** + * Whether a resource marked {@code whenDefault} or {@code unlessDefault} applies: the one without the variable when + * its member is absent or names the default resource of its type, which the service gives ({@code findDefault}), + * the other otherwise; true for a resource marked neither. With no service, only an absent member is the default. + */ + private static boolean onDefault(RequestResourceMembers.Resource resource, Map form, JsonNode body, + Map formats, String region, + StoredResourceArns stored) { + Map pair = resource.whenDefault().isEmpty() ? resource.unlessDefault() : resource.whenDefault(); + if (pair.isEmpty()) { + return true; + } + Map.Entry member = pair.entrySet().iterator().next(); + RequestResourceMembers.ArnFormat format = formats.get(member.getValue()); + List given = isNull(body, new RequestResourceMembers.Member(member.getKey(), false)) ? List.of() + : values(form, body, new RequestResourceMembers.Member(member.getKey(), false)); + String value = given.isEmpty() ? "" : given.getFirst(); + if (format != null && format.pattern().matcher(value).matches()) { + value = format.variable(value); + } + Optional fallback = stored == null ? Optional.empty() : stored.findDefault(member.getValue(), region); + boolean isDefault = value.isEmpty() || fallback.map(arn -> format != null && format.pattern().matcher(arn).matches() + ? format.variable(arn) : arn).filter(value::equals).isPresent(); + return resource.whenDefault().isEmpty() != isDefault; } /** @@ -405,7 +442,7 @@ public final class RequestResources { private static String first(RequestResourceMembers.Resource resource, Map form, JsonNode body, String member, Map formats) { RequestResourceMembers.Member read = new RequestResourceMembers.Member(member, false); - if (!resource.absent().containsKey(member) && isNull(body, read)) { + if (isNull(body, read)) { return ""; } List given = given(resource, form, body, read, formats); @@ -413,32 +450,25 @@ public final class RequestResources { } /** - * The values a request gives a member as the resource reads them, as {@link #read} gives them, and, for a member - * that may give an ARN of a type instead of its name, that type's one variable of such an ARN. + * The values a request gives a member, and, for a member that may give an ARN of a type instead of its name, that + * type's one variable of such an ARN. */ private static List given(RequestResourceMembers.Resource resource, Map form, JsonNode body, RequestResourceMembers.Member member, Map formats) { RequestResourceMembers.ArnFormat named = arnOf(resource, member.path(), formats); - List values = read(resource, form, body, member); + List values = values(form, body, member); return named == null ? values : values.stream() .map(value -> named.pattern().matcher(value).matches() ? named.variable(value) : value).toList(); } - /** - * The values a request gives a member: the one the resource reads for the member absent or given a JSON null, - * as a handler reading it with {@code asText(null)} does (EventBridge's {@code EventBusName}), and, for a field - * of each of a list's structures, one for each structure, that one for a structure lacking it (a - * {@code PutEvents} entry naming no event bus is published to the default one), none for no structures. - */ - private static List read(RequestResourceMembers.Resource resource, Map form, - JsonNode body, RequestResourceMembers.Member member) { - String absent = resource.absent().get(member.path()); - if (absent != null && member.eachElement()) { - return eachElement(form, body, member, absent); + /** The values of a member, a JSON null, or one in an element of a list, giving none. */ + private static List namingNoneWhenNull(Map form, JsonNode body, + RequestResourceMembers.Member member) { + if (member.eachElement()) { + return eachElement(form, body, member, "").stream().filter(value -> !value.isEmpty()).toList(); } - List values = absent != null && isNull(body, member) ? List.of() : values(form, body, member); - return values.isEmpty() && absent != null ? List.of(absent) : values; + return isNull(body, member) ? List.of() : values(form, body, member); } /** The format of the type whose ARN a member of the resource may give instead of its name; null for none. */ @@ -489,11 +519,11 @@ public final class RequestResources { * handler then acts on the caller's resource of that name, and it is named as an ARN the request gives is; for * a member naming one resource for each of a list's structures, each in the account and Region of the ARN its * structure gives, the request's for a name (a {@code PutEvents} entry, on the bus it names). Each value is read - * up to the resource's {@code before} character, when it has one (a CodeBuild build id's project), and without the - * type's own path when it begins with one, as Route 53 returns its ids ({@code /hostedzone/Z1} names hosted zone - * {@code Z1}). A value filling a {@code ...WithoutLeadingSlash} variable is a Parameter Store name instead, read - * as {@link #asVariable} reads it. A value rendered past a type's format, when its service checks the - * type without a qualifier, is cut where the format ends, as an ARN given is. A type + * without the type's own path when it begins with one, as Route 53 returns its ids ({@code /hostedzone/Z1} names + * hosted zone {@code Z1}). A value filling a {@code ...WithoutLeadingSlash} variable is a Parameter Store name + * instead, read as {@link #asVariable} reads it. A value rendered past a type's format, when its service checks + * the type without a qualifier, is cut where the format ends, as an ARN given is. A variable no member fills + * takes the value the resource gives it {@code fixed}. A type * whose service mints an id after its name is the caller's resource {@code stored} finds under that name, or * else has that id open. */ @@ -508,14 +538,23 @@ public final class RequestResources { } AwsArnUtils.Arn fromRequest = arnGiven(resource, form, body, formats); List fillings = new ArrayList<>(List.of(new Filling(resource.fixed(), fromRequest))); + // A member that is a JSON null names none, as a request leaving it out and as a handler reading it with + // asText(null) does: an EventBridge rule with a null EventBusName is on the default bus, and an EMR request + // with a null ClusterId names no cluster of its own. boolean given = false; for (Map.Entry variable : resource.fill().entrySet()) { - List values = read(resource, form, body, variable.getValue()).stream() - .map(value -> before(value, resource.before())) + List values = namingNoneWhenNull(form, body, variable.getValue()).stream() .map(value -> variable.getKey().endsWith(WITHOUT_LEADING_SLASH) ? asVariable(variable.getKey(), value) : withoutTypePath(value, resource.types().getFirst())) .toList(); + // An element of a list naming no resource names its service's default (a PutEvents entry with no bus). + if (variable.getValue().eachElement() && stored != null && resource.fill().size() == 1) { + List elements = eachElement(form, body, variable.getValue(), ""); + if (elements.contains("")) { + stored.findDefault(resource.types().getFirst(), region).ifPresent(arns::add); + } + } if (values.isEmpty()) { continue; } @@ -543,6 +582,12 @@ public final class RequestResources { fillings = next; } if (!resource.fill().isEmpty() && !given) { + // A request leaving out every member naming the resource acts on the one its service uses then; a list's + // elements each name their own (above), so a list of none names nothing (a PutEvents of no entries). + boolean perElement = resource.fill().values().stream().anyMatch(RequestResourceMembers.Member::eachElement); + if (stored != null && account.equals(accountId) && !perElement) { + stored.findDefault(resource.types().getFirst(), region).ifPresent(arns::add); + } return; } for (Filling filling : fillings) { diff --git a/src/main/java/io/floci/aws/core/common/StoredResourceArns.java b/src/main/java/io/floci/aws/core/common/StoredResourceArns.java index ef76ede660..6291931404 100644 --- a/src/main/java/io/floci/aws/core/common/StoredResourceArns.java +++ b/src/main/java/io/floci/aws/core/common/StoredResourceArns.java @@ -23,6 +23,10 @@ import java.util.Optional; * permission sets are provisioned to; Resource Explorer, for its default view; OAM and RAM, for the sinks, * invitations and shares of other accounts they act on); looked up lazily by {@code ResourceArnBuilder} through {@code Instance} * for the namespace a request is of, so IAM never depends on that service directly.

+ * + *

Each answer is a lookup of what the service holds, asked for by an entry of the generated table ({@code find}, + * {@code through}, a default): never a fact about what an operation acts on, which the table alone says, from + * botocore and the Service Reference, or from AWS behaviour measured where neither carries it.

*/ public interface StoredResourceArns { diff --git a/src/main/java/io/floci/aws/services/athena/AthenaJsonHandler.java b/src/main/java/io/floci/aws/services/athena/AthenaJsonHandler.java index 6c486c10b3..666aafd4cf 100644 --- a/src/main/java/io/floci/aws/services/athena/AthenaJsonHandler.java +++ b/src/main/java/io/floci/aws/services/athena/AthenaJsonHandler.java @@ -199,15 +199,18 @@ public class AthenaJsonHandler { } case "ListDatabases" -> { String catalog = catalogName(request); + athenaService.requireGlueCatalog(region, catalog); yield Response.ok(Map.of("DatabaseList", athenaService.listDatabases(catalog))).build(); } case "ListTableMetadata" -> { String catalog = catalogName(request); + athenaService.requireGlueCatalog(region, catalog); String database = request.path("DatabaseName").asText(request.path("Database").asText("")); yield Response.ok(Map.of("TableMetadataList", athenaService.listTableMetadata(catalog, database))).build(); } case "GetTableMetadata" -> { String catalog = catalogName(request); + athenaService.requireGlueCatalog(region, catalog); String database = request.path("DatabaseName").asText(request.path("Database").asText("")); String tableName = request.get("TableName").asText(); yield Response.ok(Map.of("TableMetadata", athenaService.getTableMetadata(catalog, database, tableName))).build(); diff --git a/src/main/java/io/floci/aws/services/athena/AthenaService.java b/src/main/java/io/floci/aws/services/athena/AthenaService.java index a1c2f4a538..1cee2b04f6 100644 --- a/src/main/java/io/floci/aws/services/athena/AthenaService.java +++ b/src/main/java/io/floci/aws/services/athena/AthenaService.java @@ -942,6 +942,23 @@ public class AthenaService { "WorkGroup " + name + " is not found.", 400)); } + /** + * Refuses a metadata read of a data catalog whose metadata is not the account's Glue Data Catalog, which Floci + * reads them from: a catalog of another type, or a Glue one registered for another account's catalog. Athena + * answers {@code MetadataException} when it cannot read a catalog's metastore, and {@code InvalidRequestException} + * for one it does not hold. + */ + public void requireGlueCatalog(String region, String name) { + if (DEFAULT_CATALOG.equals(name)) { + return; + } + DataCatalog catalog = requireDataCatalog(region, name); + String catalogId = catalog.getParameters() == null ? null : catalog.getParameters().get("catalog-id"); + if (!"GLUE".equals(catalog.getType()) || (catalogId != null && !catalogId.equals(regionResolver.getAccountId()))) { + throw new AwsException("MetadataException", "Unable to read the metadata of data catalog " + name + ".", 400); + } + } + private DataCatalog requireDataCatalog(String region, String name) { return dataCatalogStore.get(catalogKey(region, name)) .orElseThrow(() -> new AwsException("InvalidRequestException", diff --git a/src/main/java/io/floci/aws/services/athena/AthenaStoredResourceArns.java b/src/main/java/io/floci/aws/services/athena/AthenaStoredResourceArns.java new file mode 100644 index 0000000000..6fd1efd073 --- /dev/null +++ b/src/main/java/io/floci/aws/services/athena/AthenaStoredResourceArns.java @@ -0,0 +1,44 @@ +package io.floci.aws.services.athena; + +import io.floci.aws.core.common.RegionResolver; +import io.floci.aws.core.common.StoredResourceArns; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +import java.util.List; +import java.util.Optional; + +/** + * What IAM asks Athena of the resources a request names: the workgroup and the data catalog its handlers use for a + * request naming none, {@code primary} and {@code AwsDataCatalog}. + */ +@ApplicationScoped +public class AthenaStoredResourceArns implements StoredResourceArns { + + private final RegionResolver regionResolver; + + @Inject + public AthenaStoredResourceArns(RegionResolver regionResolver) { + this.regionResolver = regionResolver; + } + + @Override + public String namespace() { + return "athena"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + @Override + public Optional findDefault(String type, String region) { + return switch (type) { + case "workgroup" -> Optional.of(regionResolver.buildArn("athena", region, "workgroup/primary")); + case "datacatalog" -> Optional.of(regionResolver.buildArn("athena", region, + "datacatalog/" + AthenaService.DEFAULT_CATALOG)); + default -> Optional.empty(); + }; + } +} diff --git a/src/main/java/io/floci/aws/services/ce/CostExplorerJsonHandler.java b/src/main/java/io/floci/aws/services/ce/CostExplorerJsonHandler.java index 3a4d5d386a..645e870a6b 100644 --- a/src/main/java/io/floci/aws/services/ce/CostExplorerJsonHandler.java +++ b/src/main/java/io/floci/aws/services/ce/CostExplorerJsonHandler.java @@ -2,11 +2,15 @@ package io.floci.aws.services.ce; import com.fasterxml.jackson.databind.JsonNode; import io.floci.aws.core.common.AwsErrorResponse; +import io.floci.aws.core.common.AwsException; +import io.floci.aws.core.common.RegionResolver; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; import jakarta.ws.rs.core.Response; import org.jboss.logging.Logger; +import java.util.Set; + /** * JSON 1.1 handler for AWS Cost Explorer operations. * Dispatches {@code X-Amz-Target: AWSInsightsIndexService.*} actions to @@ -18,18 +22,28 @@ import org.jboss.logging.Logger; public class CostExplorerJsonHandler { private static final Logger LOG = Logger.getLogger(CostExplorerJsonHandler.class); + /** The reads that take a {@code BillingViewArn}, which they answer the costs of. */ + private static final Set BILLING_VIEW_READS = Set.of("GetCostAndUsage", "GetCostAndUsageWithResources", + "GetDimensionValues", "GetTags", "GetCostCategories"); private final CostExplorerService service; private final CostAnomalyService anomalies; + private final RegionResolver regionResolver; + @Inject - public CostExplorerJsonHandler(CostExplorerService service, CostAnomalyService anomalies) { + public CostExplorerJsonHandler(CostExplorerService service, CostAnomalyService anomalies, + RegionResolver regionResolver) { this.service = service; this.anomalies = anomalies; + this.regionResolver = regionResolver; } public Response handle(String action, JsonNode request, String region) { LOG.debugv("CostExplorer action: {0}", action); + if (BILLING_VIEW_READS.contains(action)) { + requireServedBillingView(request); + } return switch (action) { case "GetCostAndUsage" -> Response.ok(service.getCostAndUsage(request, region)).build(); case "GetCostAndUsageWithResources" -> Response.ok(service.getCostAndUsageWithResources(request, region)).build(); @@ -69,4 +83,21 @@ public class CostExplorerJsonHandler { .build(); }; } + + /** + * Refuses a billing view other than the caller's primary one, the costs of the whole account, the only view Floci + * answers the costs of: AWS answers {@code ResourceNotFoundException}, "The specified ARN in the request doesn't + * exist.", for a view it does not hold. AWS does not document the primary view's ARN; Floci takes it as + * {@code billingview/primary}. The view is that ARN exactly, of AWS Billing, global, in the request's partition + * and account, as IAM checks it: one of another service or with a Region names no view IAM could check. + */ + private void requireServedBillingView(JsonNode request) { + String view = request.path("BillingViewArn").asText(""); + if (view.isEmpty()) { + return; + } + if (!regionResolver.buildGlobalArn("billing", "billingview/primary").equals(view)) { + throw new AwsException("ResourceNotFoundException", "The specified ARN in the request doesn't exist.", 400); + } + } } diff --git a/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsDeliveryService.java b/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsDeliveryService.java index 0ced505e20..6325d0f3f7 100644 --- a/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsDeliveryService.java +++ b/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsDeliveryService.java @@ -229,6 +229,13 @@ public class CloudWatchLogsDeliveryService { deliveries.delete(key(region, id)); } + /** The ARNs of the delivery destinations the deliveries from the delivery source of that name send to. */ + public List destinationArnsFrom(String sourceName, String region) { + return deliveries.scan(k -> k.startsWith(prefix(region))).stream() + .filter(delivery -> sourceName.equals(delivery.getDeliverySourceName())) + .map(Delivery::getDeliveryDestinationArn).distinct().toList(); + } + /** Every delivery, or those from one of {@code deliverySourceNames}. */ public PaginatedResult describeDeliveries(Integer limit, String nextToken, List deliverySourceNames, String region) { diff --git a/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsStoredResourceArns.java b/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsStoredResourceArns.java new file mode 100644 index 0000000000..bc19bcdcc4 --- /dev/null +++ b/src/main/java/io/floci/aws/services/cloudwatch/logs/CloudWatchLogsStoredResourceArns.java @@ -0,0 +1,49 @@ +package io.floci.aws.services.cloudwatch.logs; + +import io.floci.aws.core.common.AwsException; +import io.floci.aws.core.common.StoredResourceArns; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +import java.util.List; +import java.util.Optional; + +/** + * What IAM asks CloudWatch Logs of the resources a request names: the caller's delivery of the id it was created + * with, and the delivery destinations the deliveries from a delivery source send to, which the Service Reference + * checks a {@code DeleteDeliverySource} on. + */ +@ApplicationScoped +public class CloudWatchLogsStoredResourceArns implements StoredResourceArns { + + private final CloudWatchLogsDeliveryService deliveries; + + @Inject + public CloudWatchLogsStoredResourceArns(CloudWatchLogsDeliveryService deliveries) { + this.deliveries = deliveries; + } + + @Override + public String namespace() { + return "logs"; + } + + /** The ARN of the caller's delivery of the id {@code names} gives, as the service stored it; empty for none. */ + @Override + public Optional find(String type, List names, String region) { + if (!"delivery".equals(type) || names.size() != 1) { + return Optional.empty(); + } + try { + return Optional.ofNullable(deliveries.getDelivery(names.getFirst(), region).getArn()); + } catch (AwsException notFound) { + return Optional.empty(); + } + } + + /** The delivery destinations the caller's deliveries from the delivery source a {@code name} names send to. */ + @Override + public List through(String member, String value, String region) { + return "name".equals(member) ? deliveries.destinationArnsFrom(value, region) : List.of(); + } +} diff --git a/src/main/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArns.java b/src/main/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArns.java new file mode 100644 index 0000000000..c4120d0ffb --- /dev/null +++ b/src/main/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArns.java @@ -0,0 +1,52 @@ +package io.floci.aws.services.codebuild; + +import io.floci.aws.core.common.RegionResolver; +import io.floci.aws.core.common.StoredResourceArns; +import io.floci.aws.services.codebuild.model.Build; +import io.floci.aws.services.codebuild.model.Project; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +import java.util.List; +import java.util.Optional; + +/** + * What IAM asks CodeBuild of the resources a request names: the project the caller's build of an id belongs to, as + * the service stores them, which CodeBuild checks a call naming the build on. + */ +@ApplicationScoped +public class CodeBuildStoredResourceArns implements StoredResourceArns { + + private final CodeBuildService codeBuild; + private final RegionResolver regionResolver; + + @Inject + public CodeBuildStoredResourceArns(CodeBuildService codeBuild, RegionResolver regionResolver) { + this.codeBuild = codeBuild; + this.regionResolver = regionResolver; + } + + @Override + public String namespace() { + return "codebuild"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + /** The project of the caller's build of the id an {@code id} or {@code ids[]} gives; empty for one it has none of. */ + @Override + public List through(String member, String value, String region) { + if (!"ids[]".equals(member) && !"id".equals(member)) { + return List.of(); + } + return codeBuild.batchGetBuilds(region, regionResolver.getAccountId(), List.of(value)).stream() + .map(Build::getProjectName) + .flatMap(name -> codeBuild.batchGetProjects(region, List.of(name)).stream()) + .map(Project::getArn) + .distinct() + .toList(); + } +} diff --git a/src/main/java/io/floci/aws/services/emr/EmrService.java b/src/main/java/io/floci/aws/services/emr/EmrService.java index ea32e2aeed..0a2431c4b6 100644 --- a/src/main/java/io/floci/aws/services/emr/EmrService.java +++ b/src/main/java/io/floci/aws/services/emr/EmrService.java @@ -661,13 +661,20 @@ public class EmrService implements Resettable, StoredResourceArns, ContainerTear /** * 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. + * {@code addInstanceGroups} adds to a cluster's groups; and the cluster a tag call's {@code ResourceId} names. */ @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(); + return switch (member) { + case "InstanceGroups[].InstanceGroupId" -> + call(() -> clusterWithGroup(region, value).map(EmrCluster::getClusterArn).stream().toList()); + // A tag call's ResourceId is a cluster's id, or a Studio's, which Floci does not serve: the cluster the + // tag handlers find by it (findCluster), one recorded with no Region included. + case "ResourceId" -> call(() -> clusterStore.get(value) + .filter(cluster -> cluster.getRegion() == null || cluster.getRegion().equals(region)) + .map(EmrCluster::getClusterArn).stream().toList()); + default -> List.of(); + }; } public List listInstanceGroups(String clusterId) { diff --git a/src/main/java/io/floci/aws/services/eventbridge/EventBridgeService.java b/src/main/java/io/floci/aws/services/eventbridge/EventBridgeService.java index 73701bfe34..89a26f6263 100644 --- a/src/main/java/io/floci/aws/services/eventbridge/EventBridgeService.java +++ b/src/main/java/io/floci/aws/services/eventbridge/EventBridgeService.java @@ -1917,6 +1917,13 @@ public class EventBridgeService implements ResourceProvider, StoredResourceArns return "events"; } + /** The Region's default event bus, which a request naming no bus acts on. */ + @Override + public Optional findDefault(String type, String region) { + return "event-bus".equals(type) ? Optional.of(regionResolver.buildArn("events", region, "event-bus/default")) + : Optional.empty(); + } + /** * The ARN of the caller's connection or API destination of the one name in the Region, which follows the name * with the id it was minted with, as its handlers look it up. diff --git a/src/main/java/io/floci/aws/services/quicksight/QuickSightService.java b/src/main/java/io/floci/aws/services/quicksight/QuickSightService.java index 62951ff69d..12953403f8 100644 --- a/src/main/java/io/floci/aws/services/quicksight/QuickSightService.java +++ b/src/main/java/io/floci/aws/services/quicksight/QuickSightService.java @@ -234,9 +234,9 @@ public class QuickSightService implements Resettable, StoredResourceArns { @Override public Optional find(String type, List names, String region) { - if ("user".equals(type) && names.size() == 3) { + if (("user".equals(type) || "group".equals(type)) && names.size() == 3) { return Optional.of(regions.buildArn("quicksight", region, names.getFirst(), - "user/" + names.get(1) + "/" + names.get(2))); + type + "/" + names.get(1) + "/" + names.get(2))); } return Optional.empty(); } diff --git a/src/main/java/io/floci/aws/services/rekognition/RekognitionStoredResourceArns.java b/src/main/java/io/floci/aws/services/rekognition/RekognitionStoredResourceArns.java new file mode 100644 index 0000000000..6098f1eb16 --- /dev/null +++ b/src/main/java/io/floci/aws/services/rekognition/RekognitionStoredResourceArns.java @@ -0,0 +1,36 @@ +package io.floci.aws.services.rekognition; + +import io.floci.aws.core.common.RegionResolver; +import io.floci.aws.core.common.StoredResourceArns; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +import java.util.List; +import java.util.Optional; + +/** + * What IAM asks Rekognition of the resources a request names: a stream processor by the name it was created with, + * which its ARN ends in. + */ +@ApplicationScoped +public class RekognitionStoredResourceArns implements StoredResourceArns { + + private final RegionResolver regionResolver; + + @Inject + public RekognitionStoredResourceArns(RegionResolver regionResolver) { + this.regionResolver = regionResolver; + } + + @Override + public String namespace() { + return "rekognition"; + } + + @Override + public Optional find(String type, List names, String region) { + return "streamprocessor".equals(type) && names.size() == 1 + ? Optional.of(regionResolver.buildArn("rekognition", region, "streamprocessor/" + names.getFirst())) + : Optional.empty(); + } +} diff --git a/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminRequestContext.java b/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminRequestContext.java deleted file mode 100644 index e9c5b4e463..0000000000 --- a/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminRequestContext.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.floci.aws.services.ssoadmin; - -import jakarta.enterprise.context.RequestScoped; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * What this request found, kept for the request. - * - *

A {@code ProvisionPermissionSet} for {@code ALL_PROVISIONED_ACCOUNTS} provisions a permission set to every - * account it is provisioned to, and the permission check finds those accounts and checks each one. Another request - * may provision the permission set to one more account while this one is running, with an assignment of its own, - * and the request must provision to the accounts it was checked on: an account found again afterwards could be one - * no policy was checked against. - */ -@RequestScoped -public class SsoAdminRequestContext { - - /** The accounts a permission set was provisioned to, by the permission set's ARN. */ - private final Map> provisionedAccounts = new HashMap<>(); - - /** - * The accounts the permission set was provisioned to when this request found them, and null when this request - * has not looked for them yet. - */ - List provisionedAccounts(String permissionSetArn) { - return provisionedAccounts.get(permissionSetArn); - } - - /** Remembers the accounts the permission set is provisioned to, so that the request provisions to those. */ - void pinProvisionedAccounts(String permissionSetArn, List accountIds) { - provisionedAccounts.put(permissionSetArn, List.copyOf(accountIds)); - } -} diff --git a/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminService.java b/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminService.java index 9236f660a9..f4946f31c1 100644 --- a/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminService.java +++ b/src/main/java/io/floci/aws/services/ssoadmin/SsoAdminService.java @@ -140,7 +140,6 @@ public class SsoAdminService implements Resettable, StoredResourceArns { private final StorageBackend trustedTokenIssuerClientTokens; private final IdentityStoreService identityStoreService; private final OrganizationsService organizationsService; - private final SsoAdminRequestContext requestContext; private final String defaultAccountId; private final String defaultRegion; /** The seeded instance lives in the deployment's home region, so its ARN takes that partition. */ @@ -150,8 +149,7 @@ public class SsoAdminService implements Resettable, StoredResourceArns { @Inject public SsoAdminService(StorageFactory storageFactory, IdentityStoreService identityStoreService, - OrganizationsService organizationsService, SsoAdminRequestContext requestContext, - EmulatorConfig config) { + OrganizationsService organizationsService, EmulatorConfig config) { this( storageFactory.create("ssoadmin", "ssoadmin-permission-sets.json", new TypeReference>() {}), storageFactory.create("ssoadmin", "ssoadmin-assignments.json", new TypeReference>() {}), @@ -180,7 +178,6 @@ public class SsoAdminService implements Resettable, StoredResourceArns { storageFactory.create("ssoadmin", "ssoadmin-trusted-token-issuer-client-tokens.json", new TypeReference>() {}), identityStoreService, organizationsService, - requestContext, config.defaultAccountId(), config.defaultRegion(), Clock.systemUTC()); @@ -213,7 +210,6 @@ public class SsoAdminService implements Resettable, StoredResourceArns { StorageBackend trustedTokenIssuerClientTokens, IdentityStoreService identityStoreService, OrganizationsService organizationsService, - SsoAdminRequestContext requestContext, String defaultAccountId, String defaultRegion, Clock clock) { @@ -245,7 +241,6 @@ public class SsoAdminService implements Resettable, StoredResourceArns { this.trustedTokenIssuerClientTokens = trustedTokenIssuerClientTokens; this.identityStoreService = identityStoreService; this.organizationsService = organizationsService; - this.requestContext = requestContext; this.defaultAccountId = defaultAccountId; this.defaultRegion = defaultRegion; this.bootstrapInstanceArn = globalArn("sso", defaultRegion, "", BOOTSTRAP_INSTANCE); @@ -1921,25 +1916,13 @@ public class SsoAdminService implements Resettable, StoredResourceArns { return operation; } - /** - * The accounts the permission set is provisioned to, as this request found them. - * - *

They are found once for the request, and kept: the permission check of a {@code ProvisionPermissionSet} for - * {@code ALL_PROVISIONED_ACCOUNTS} finds them and checks each one, and the request must provision to those. - * Another request may provision the permission set to one more account in between, and an account found again - * afterwards could be one no policy was checked against. - */ + /** The accounts the permission set is provisioned to. */ private List provisionedAccounts(String permissionSetArn) { - List accountIds = requestContext.provisionedAccounts(permissionSetArn); - if (accountIds == null) { - accountIds = permissionSetProvisionings.scan(key -> true).stream() - .filter(provisioning -> permissionSetArn.equals(provisioning.permissionSetArn())) - .map(PermissionSetProvisioning::accountId) - .distinct() - .toList(); - requestContext.pinProvisionedAccounts(permissionSetArn, accountIds); - } - return accountIds; + return permissionSetProvisionings.scan(key -> true).stream() + .filter(provisioning -> permissionSetArn.equals(provisioning.permissionSetArn())) + .map(PermissionSetProvisioning::accountId) + .distinct() + .toList(); } @Override @@ -1952,22 +1935,6 @@ public class SsoAdminService implements Resettable, StoredResourceArns { 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: the same - * ones, found once for the request. - */ - @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-passed-roles.json b/src/main/resources/aws/iam-passed-roles.json index 0f22596f87..95345a1869 100644 --- a/src/main/resources/aws/iam-passed-roles.json +++ b/src/main/resources/aws/iam-passed-roles.json @@ -1,5 +1,5 @@ { - "_source": {"generator": "tools/aws/regen_iam_passed_roles.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-12", "note": "make iam-passed-roles-check re-derives every member from botocore; make iam-passed-roles-verify checks every operation against AWS."}, + "_source": {"generator": "tools/aws/regen_iam_passed_roles.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-13", "note": "make iam-passed-roles-check re-derives every member from botocore; make iam-passed-roles-verify checks every operation against AWS."}, "namespaces": {"application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "budgets": ["budgets"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codebuild": ["codebuild"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "glue": ["glue"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "pipes": ["pipes"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-groups": ["resource-groups"], "s3": ["s3", "s3control"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "servicecatalog": ["servicecatalog"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "sns": ["sns"], "ssm": ["ssm"], "states": ["stepfunctions"], "swf": ["swf"], "textract": ["textract"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"]}, "notCovered": {"access-analyzer": "REST routes no rule maps yet", "airflow": "REST routes no rule maps yet", "apigateway": "authorized by HTTP method, so no request is checked as one of these operations", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "es": "REST routes no rule maps yet", "fis": "REST routes no rule maps yet", "guardduty": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "macie2": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; role passing and iam:PassRole checks are not implemented", "rum": "REST routes no rule maps yet", "s3tables": "REST routes no rule maps yet"}, "otherNamespaces": ["agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "aoss", "appflow", "appmesh", "apprunner", "appstream", "arc-region-switch", "backup-gateway", "backup-search", "bcm-dashboards", "braket", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "codeconnections", "codestar-connections", "cognito-sync", "comprehendmedical", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "elemental-inference", "emr-containers", "entityresolution", "fms", "forecast", "frauddetector", "gamelift", "gameliftstreams", "geo", "grafana", "greengrass", "groundstation", "health-agent", "healthlake", "imagebuilder", "iotdeviceadvisor", "iotfleetwise", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "kafkaconnect", "kendra", "lex", "lookoutequipment", "m2", "machinelearning", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "medical-imaging", "mobiletargeting", "neptune-graph", "observabilityadmin", "odb", "omics", "opensearch", "osis", "partnercentral", "pcs", "personalize", "profile", "proton", "qbusiness", "repostspace", "resiliencehub", "rolesanywhere", "s3files", "sagemaker-geospatial", "securityagent", "securitylake", "shield", "sms-voice", "snowball", "social-messaging", "ssm-incidents", "ssm-quicksetup", "storagegateway", "supportapp", "synthetics", "timestream", "voiceid", "wellarchitected", "wisdom", "workmail", "workspaces"], @@ -840,7 +840,9 @@ "sagemaker:CreateTrainingJob": {"passedTo": ["sagemaker"], "roles": [ {"member": "RoleArn", "passedTo": "sagemaker"} ]}, - "sagemaker:CreateTrainingSession": {"passedTo": ["sagemaker", "training-session.sagemaker"], "notRead": "the reference passes the role to sagemaker or training-session.sagemaker and nothing says which"}, + "sagemaker:CreateTrainingSession": {"passedTo": ["training-session.sagemaker"], "roles": [ + {"member": "RoleArn", "passedTo": "training-session.sagemaker"} + ]}, "sagemaker:CreateTransformJob": {"passedTo": ["sagemaker"], "notRead": "no member of the request names a role"}, "sagemaker:CreateUserProfile": {"passedTo": ["sagemaker"], "roles": [ {"member": "UserSettings.CanvasAppSettings.EmrServerlessSettings.ExecutionRoleArn", "passedTo": "sagemaker"}, @@ -885,6 +887,7 @@ ]}, "scheduler:CreateSchedule": {"passedTo": ["scheduler"], "byHand": "the target's role"}, "scheduler:UpdateSchedule": {"passedTo": ["scheduler"], "byHand": "the target's role"}, + "secretsmanager:AssociateCrossAccountReplica": {"passedTo": ["secretsmanager"], "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "secretsmanager:RotateSecret": {"passedTo": ["secretsmanager"], "roles": [ {"member": "ExternalSecretRotationRoleArn", "passedTo": "secretsmanager"} ]}, diff --git a/src/main/resources/aws/iam-request-resources.json b/src/main/resources/aws/iam-request-resources.json index bbd4bf15a6..7a47ddcd76 100644 --- a/src/main/resources/aws/iam-request-resources.json +++ b/src/main/resources/aws/iam-request-resources.json @@ -3,7 +3,7 @@ "namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "guardduty": ["guardduty"], "inspector2": ["inspector2"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "ram": ["ram"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "route53": ["route53"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]}, "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", "sts"], - "notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "aps": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup::autoScalingGroupName/`, while Floci mints `autoScalingGroup:`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "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 reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/_, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "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 reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "glue": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "memorydb": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds-data": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "route53resolver": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "s3tables": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "s3vectors": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sagemaker": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the path", "ses": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "signin": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "swf": "not read yet: the Service Reference gives a domain's ARN no Region, `swf:::/domain/`, while the SWF Developer Guide gives it as arn:aws:swf:Region:AccountID:/domain/DomainName, as Floci mints it; reading it needs that format corrected", "transcribe": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "transfer": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "verifiedpermissions": "not read yet: a policyStoreId may name its store by an alias, `policy-store-alias/`, which AWS authorizes as the action on the store the alias points to and GetPolicyStoreAlias on the alias, and an aliasName carries the `policy-store-alias/` its format already gives; reading it needs both", "wafv2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint"}, + "notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "aps": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup::autoScalingGroupName/`, while Floci mints `autoScalingGroup:`, which other services (ECS capacity providers) read back; the mint is fixed first", "aws-marketplace": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "backup": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "batch": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "bedrock-agentcore": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudformation": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "codeartifact": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "codedeploy": "not read yet: the Service Reference gives an on-premises instance's ARN as `instance:${InstanceName}`, while the CodeDeploy permissions reference gives arn:aws:codedeploy:region:account-id:instance/instance-ID and AWS's GetOnPremisesInstance example answers instance/_, an id the service mints after the name; reading it needs that format corrected", "codeguru-reviewer": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "comprehend": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "ec2-instance-connect": "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 reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "glue": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "memorydb": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "network-firewall": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "organizations": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rds-data": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "route53resolver": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "rum": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "s3tables": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "s3vectors": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sagemaker": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "servicecatalog": "not read yet: CreatePortfolioShare, UpdatePortfolioShare and DeletePortfolioShare give in AccountId the account a portfolio is shared with, which the rule reads as the portfolio's; a portfolio or product imported from another account keeps its owner's account in its ARN while requests name it by its id alone; and AppRegistry's applications and attribute groups are named in the path", "ses": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "signin": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "sso-oauth": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "swf": "not read yet: the Service Reference gives a domain's ARN no Region, `swf:::/domain/`, while the SWF Developer Guide gives it as arn:aws:swf:Region:AccountID:/domain/DomainName, as Floci mints it; reading it needs that format corrected", "transcribe": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "transfer": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "verifiedpermissions": "not read yet: a policyStoreId may name its store by an alias, `policy-store-alias/`, which AWS authorizes as the action on the store the alias points to and GetPolicyStoreAlias on the alias, and an aliasName carries the `policy-store-alias/` its format already gives; reading it needs both", "wafv2": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint"}, "otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "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", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "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", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"], "arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "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}", "system-table": "arn:${Partition}:athena:${Region}:${Account}:system-table/${TableName}", "workgroup": "arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}"}, "bcm-data-exports": {"billingview": "arn:${Partition}:billing::${Account}:billingview/${ResourceId}", "export": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:export/${Identifier}", "table": "arn:${Partition}:bcm-data-exports:${Region}:${Account}:table/${Identifier}"}, "bcm-pricing-calculator": {"bill-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-estimate/${BillEstimateId}", "bill-scenario": "arn:${Partition}:bcm-pricing-calculator::${Account}:bill-scenario/${BillScenarioId}", "workload-estimate": "arn:${Partition}:bcm-pricing-calculator::${Account}:workload-estimate/${WorkloadEstimateId}"}, "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}"}, "cloudfront": {"anycast-ip-list": "arn:${Partition}:cloudfront::${Account}:anycast-ip-list/${Id}", "cache-policy": "arn:${Partition}:cloudfront::${Account}:cache-policy/${Id}", "connection-function": "arn:${Partition}:cloudfront::${Account}:connection-function/${Id}", "connection-group": "arn:${Partition}:cloudfront::${Account}:connection-group/${Id}", "continuous-deployment-policy": "arn:${Partition}:cloudfront::${Account}:continuous-deployment-policy/${Id}", "distribution": "arn:${Partition}:cloudfront::${Account}:distribution/${DistributionId}", "distribution-tenant": "arn:${Partition}:cloudfront::${Account}:distribution-tenant/${Id}", "field-level-encryption-config": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-config/${Id}", "field-level-encryption-profile": "arn:${Partition}:cloudfront::${Account}:field-level-encryption-profile/${Id}", "function": "arn:${Partition}:cloudfront::${Account}:function/${Name}", "key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${Name}", "origin-access-control": "arn:${Partition}:cloudfront::${Account}:origin-access-control/${Id}", "origin-access-identity": "arn:${Partition}:cloudfront::${Account}:origin-access-identity/${Id}", "origin-request-policy": "arn:${Partition}:cloudfront::${Account}:origin-request-policy/${Id}", "realtime-log-config": "arn:${Partition}:cloudfront::${Account}:realtime-log-config/${Name}", "response-headers-policy": "arn:${Partition}:cloudfront::${Account}:response-headers-policy/${Id}", "streaming-distribution": "arn:${Partition}:cloudfront::${Account}:streaming-distribution/${DistributionId}", "trust-store": "arn:${Partition}:cloudfront::${Account}:trust-store/${Id}", "vpcorigin": "arn:${Partition}:cloudfront::${Account}:vpcorigin/${Id}"}, "cloudfront-keyvaluestore": {"key-value-store": "arn:${Partition}:cloudfront::${Account}:key-value-store/${ResourceId}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId}", "fleet": "arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId}", "project": "arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName}", "report": "arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId}", "report-group": "arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName}", "sandbox": "arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "controlcatalog": {"common-control": "arn:${Partition}:controlcatalog:::common-control/${CommonControlId}", "control": "arn:${Partition}:controlcatalog:::control/${ControlId}", "domain": "arn:${Partition}:controlcatalog:::domain/${DomainId}", "objective": "arn:${Partition}:controlcatalog:::objective/${ObjectiveId}"}, "controltower": {"Baseline": "arn:${Partition}:controltower:${Region}::baseline/${BaselineId}", "EnabledBaseline": "arn:${Partition}:controltower:${Region}:${Account}:enabledbaseline/${EnabledBaselineId}", "EnabledControl": "arn:${Partition}:controltower:${Region}:${Account}:enabledcontrol/${EnabledControlId}", "LandingZone": "arn:${Partition}:controltower:${Region}:${Account}:landingzone/${LandingZoneId}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "datasync": {"agent": "arn:${Partition}:datasync:${Region}:${Account}:agent/${AgentId}", "discoveryjob": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}/job/${DiscoveryJobId}", "location": "arn:${Partition}:datasync:${Region}:${Account}:location/${LocationId}", "storagesystem": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}", "task": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}", "taskexecution": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}/execution/${ExecutionId}"}, "dynamodb": {"backup": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/backup/${BackupName}", "bulk-operation": "arn:${Partition}:dynamodb:${Region}:${Account}:bulk-operation/${BulkOperationId}", "export": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/export/${ExportName}", "global-table": "arn:${Partition}:dynamodb::${Account}:global-table/${GlobalTableName}", "import": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/import/${ImportName}", "index": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/index/${IndexName}", "stream": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}/stream/${StreamLabel}", "table": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}"}, "ec2": {"application-status-check": "arn:${Partition}:ec2:${Region}:${Account}:application-status-check/${ApplicationStatusCheckId}", "capacity-block": "arn:${Partition}:ec2:${Region}:${Account}:capacity-block/${CapacityBlockId}", "capacity-manager-data-export": "arn:${Partition}:ec2:${Region}:${Account}:capacity-manager-data-export/${CapacityManagerDataExportId}", "capacity-reservation": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation/${CapacityReservationId}", "capacity-reservation-cancellation-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-cancellation-quote/${CapacityReservationCancellationQuoteId}", "capacity-reservation-fleet": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-fleet/${CapacityReservationFleetId}", "capacity-reservation-modification-quote": "arn:${Partition}:ec2:${Region}:${Account}:capacity-reservation-modification-quote/${CapacityReservationModificationQuoteId}", "carrier-gateway": "arn:${Partition}:ec2:${Region}:${Account}:carrier-gateway/${CarrierGatewayId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}", "client-vpn-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:client-vpn-endpoint/${ClientVpnEndpointId}", "coip-pool": "arn:${Partition}:ec2:${Region}:${Account}:coip-pool/${Ipv4PoolCoipId}", "customer-gateway": "arn:${Partition}:ec2:${Region}:${Account}:customer-gateway/${CustomerGatewayId}", "declarative-policies-report": "arn:${Partition}:ec2:${Region}:${Account}:declarative-policies-report/${DeclarativePoliciesReportId}", "dedicated-host": "arn:${Partition}:ec2:${Region}:${Account}:dedicated-host/${DedicatedHostId}", "dhcp-options": "arn:${Partition}:ec2:${Region}:${Account}:dhcp-options/${DhcpOptionsId}", "egress-only-internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:egress-only-internet-gateway/${EgressOnlyInternetGatewayId}", "elastic-gpu": "arn:${Partition}:ec2:${Region}:${Account}:elastic-gpu/${ElasticGpuId}", "elastic-inference": "arn:${Partition}:elastic-inference:${Region}:${Account}:elastic-inference-accelerator/${AcceleratorId}", "elastic-ip": "arn:${Partition}:ec2:${Region}:${Account}:elastic-ip/${AllocationId}", "export-image-task": "arn:${Partition}:ec2:${Region}:${Account}:export-image-task/${ExportImageTaskId}", "export-instance-task": "arn:${Partition}:ec2:${Region}:${Account}:export-instance-task/${ExportTaskId}", "fleet": "arn:${Partition}:ec2:${Region}:${Account}:fleet/${FleetId}", "fpga-image": "arn:${Partition}:ec2:${Region}:${Account}:fpga-image/${FpgaImageId}", "group": "arn:${Partition}:resource-groups:${Region}:${Account}:group/${GroupName}", "host-reservation": "arn:${Partition}:ec2:${Region}:${Account}:host-reservation/${HostReservationId}", "image": "arn:${Partition}:ec2:${Region}::image/${ImageId}", "image-usage-report": "arn:${Partition}:ec2:${Region}:${Account}:image-usage-report/${ImageUsageReportId}", "import-image-task": "arn:${Partition}:ec2:${Region}:${Account}:import-image-task/${ImportImageTaskId}", "import-snapshot-task": "arn:${Partition}:ec2:${Region}:${Account}:import-snapshot-task/${ImportSnapshotTaskId}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "instance-connect-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId}", "instance-event-window": "arn:${Partition}:ec2:${Region}:${Account}:instance-event-window/${InstanceEventWindowId}", "internet-gateway": "arn:${Partition}:ec2:${Region}:${Account}:internet-gateway/${InternetGatewayId}", "ipam": "arn:${Partition}:ec2::${Account}:ipam/${IpamId}", "ipam-external-resource-verification-token": "arn:${Partition}:ec2::${Account}:ipam-external-resource-verification-token/${IpamExternalResourceVerificationTokenId}", "ipam-internet-registry-association": "arn:${Partition}:ec2::${Account}:ipam-internet-registry-association/${IpamInternetRegistryAssociationId}", "ipam-policy": "arn:${Partition}:ec2::${Account}:ipam-policy/${IpamPolicyId}", "ipam-pool": "arn:${Partition}:ec2::${Account}:ipam-pool/${IpamPoolId}", "ipam-pool-allocation": "arn:${Partition}:ec2:${Region}:${Account}:ipam-pool-allocation/${IpamPoolAllocationId}", "ipam-prefix-list-resolver": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver/${IpamPrefixListResolverId}", "ipam-prefix-list-resolver-target": "arn:${Partition}:ec2::${Account}:ipam-prefix-list-resolver-target/${IpamPrefixListResolverTargetId}", "ipam-resource-discovery": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery/${IpamResourceDiscoveryId}", "ipam-resource-discovery-association": "arn:${Partition}:ec2::${Account}:ipam-resource-discovery-association/${IpamResourceDiscoveryAssociationId}", "ipam-scope": "arn:${Partition}:ec2::${Account}:ipam-scope/${IpamScopeId}", "ipv4pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv4pool-ec2/${Ipv4PoolEc2Id}", "ipv6pool-ec2": "arn:${Partition}:ec2:${Region}:${Account}:ipv6pool-ec2/${Ipv6PoolEc2Id}", "key-pair": "arn:${Partition}:ec2:${Region}:${Account}:key-pair/${KeyPairName}", "launch-template": "arn:${Partition}:ec2:${Region}:${Account}:launch-template/${LaunchTemplateId}", "license-configuration": "arn:${Partition}:license-manager:${Region}:${Account}:license-configuration:${LicenseConfigurationId}", "local-gateway": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway/${LocalGatewayId}", "local-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table/${LocalGatewayRoutetableId}", "local-gateway-route-table-virtual-interface-group-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-virtual-interface-group-association/${LocalGatewayRouteTableVirtualInterfaceGroupAssociationId}", "local-gateway-route-table-vpc-association": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-route-table-vpc-association/${LocalGatewayRouteTableVpcAssociationId}", "local-gateway-virtual-interface": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface/${LocalGatewayVirtualInterfaceId}", "local-gateway-virtual-interface-group": "arn:${Partition}:ec2:${Region}:${Account}:local-gateway-virtual-interface-group/${LocalGatewayVirtualInterfaceGroupId}", "mac-modification-task": "arn:${Partition}:ec2:${Region}:${Account}:mac-modification-task/${MacModificationTaskId}", "natgateway": "arn:${Partition}:ec2:${Region}:${Account}:natgateway/${NatGatewayId}", "network-acl": "arn:${Partition}:ec2:${Region}:${Account}:network-acl/${NaclId}", "network-insights-access-scope": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope/${NetworkInsightsAccessScopeId}", "network-insights-access-scope-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-access-scope-analysis/${NetworkInsightsAccessScopeAnalysisId}", "network-insights-analysis": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-analysis/${NetworkInsightsAnalysisId}", "network-insights-path": "arn:${Partition}:ec2:${Region}:${Account}:network-insights-path/${NetworkInsightsPathId}", "network-interface": "arn:${Partition}:ec2:${Region}:${Account}:network-interface/${NetworkInterfaceId}", "outpost-lag": "arn:${Partition}:ec2:${Region}:${Account}:outpost-lag/${OutpostLagId}", "placement-group": "arn:${Partition}:ec2:${Region}:${Account}:placement-group/${PlacementGroupName}", "prefix-list": "arn:${Partition}:ec2:${Region}:${Account}:prefix-list/${PrefixListId}", "replace-root-volume-task": "arn:${Partition}:ec2:${Region}:${Account}:replace-root-volume-task/${ReplaceRootVolumeTaskId}", "reserved-instances": "arn:${Partition}:ec2:${Region}:${Account}:reserved-instances/${ReservationId}", "role": "arn:${Partition}:iam::${Account}:role/${RoleNameWithPath}", "route-server": "arn:${Partition}:ec2:${Region}:${Account}:route-server/${RouteServerId}", "route-server-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:route-server-endpoint/${RouteServerEndpointId}", "route-server-peer": "arn:${Partition}:ec2:${Region}:${Account}:route-server-peer/${RouteServerPeerId}", "route-table": "arn:${Partition}:ec2:${Region}:${Account}:route-table/${RouteTableId}", "secondary-interface": "arn:${Partition}:ec2:${Region}:${Account}:secondary-interface/${SecondaryInterfaceId}", "secondary-network": "arn:${Partition}:ec2:${Region}:${Account}:secondary-network/${SecondaryNetworkId}", "secondary-subnet": "arn:${Partition}:ec2:${Region}:${Account}:secondary-subnet/${SecondarySubnetId}", "security-group": "arn:${Partition}:ec2:${Region}:${Account}:security-group/${SecurityGroupId}", "security-group-rule": "arn:${Partition}:ec2:${Region}:${Account}:security-group-rule/${SecurityGroupRuleId}", "snapshot": "arn:${Partition}:ec2:${Region}::snapshot/${SnapshotId}", "spot-fleet-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-fleet-request/${SpotFleetRequestId}", "spot-instances-request": "arn:${Partition}:ec2:${Region}:${Account}:spot-instances-request/${SpotInstanceRequestId}", "subnet": "arn:${Partition}:ec2:${Region}:${Account}:subnet/${SubnetId}", "subnet-cidr-reservation": "arn:${Partition}:ec2:${Region}:${Account}:subnet-cidr-reservation/${SubnetCidrReservationId}", "traffic-mirror-filter": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter/${TrafficMirrorFilterId}", "traffic-mirror-filter-rule": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-filter-rule/${TrafficMirrorFilterRuleId}", "traffic-mirror-session": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-session/${TrafficMirrorSessionId}", "traffic-mirror-target": "arn:${Partition}:ec2:${Region}:${Account}:traffic-mirror-target/${TrafficMirrorTargetId}", "transit-gateway": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway/${TransitGatewayId}", "transit-gateway-attachment": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-attachment/${TransitGatewayAttachmentId}", "transit-gateway-connect-peer": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-connect-peer/${TransitGatewayConnectPeerId}", "transit-gateway-metering-policy": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-metering-policy/${TransitGatewayMeteringPolicyId}", "transit-gateway-multicast-domain": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-multicast-domain/${TransitGatewayMulticastDomainId}", "transit-gateway-policy-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-policy-table/${TransitGatewayPolicyTableId}", "transit-gateway-route-table": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table/${TransitGatewayRouteTableId}", "transit-gateway-route-table-announcement": "arn:${Partition}:ec2:${Region}:${Account}:transit-gateway-route-table-announcement/${TransitGatewayRouteTableAnnouncementId}", "verified-access-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint/${VerifiedAccessEndpointId}", "verified-access-endpoint-target": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-endpoint-target/${VerifiedAccessEndpointTargetId}", "verified-access-group": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-group/${VerifiedAccessGroupId}", "verified-access-instance": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-instance/${VerifiedAccessInstanceId}", "verified-access-policy": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-policy/${VerifiedAccessPolicyId}", "verified-access-trust-provider": "arn:${Partition}:ec2:${Region}:${Account}:verified-access-trust-provider/${VerifiedAccessTrustProviderId}", "volume": "arn:${Partition}:ec2:${Region}:${Account}:volume/${VolumeId}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}", "vpc-block-public-access-exclusion": "arn:${Partition}:ec2:${Region}:${Account}:vpc-block-public-access-exclusion/${VpcBlockPublicAccessExclusionId}", "vpc-encryption-control": "arn:${Partition}:ec2:${Region}:${Account}:vpc-encryption-control/${VpcEncryptionControlId}", "vpc-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint/${VpcEndpointId}", "vpc-endpoint-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-connection/${VpcEndpointConnectionId}", "vpc-endpoint-service": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service/${VpcEndpointServiceId}", "vpc-endpoint-service-permission": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint-service-permission/${VpcEndpointServicePermissionId}", "vpc-flow-log": "arn:${Partition}:ec2:${Region}:${Account}:vpc-flow-log/${VpcFlowLogId}", "vpc-peering-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpc-peering-connection/${VpcPeeringConnectionId}", "vpn-concentrator": "arn:${Partition}:ec2:${Region}:${Account}:vpn-concentrator/${VpnConcentratorId}", "vpn-connection": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection/${VpnConnectionId}", "vpn-connection-device-type": "arn:${Partition}:ec2:${Region}:${Account}:vpn-connection-device-type/${VpnConnectionDeviceTypeId}", "vpn-gateway": "arn:${Partition}:ec2:${Region}:${Account}:vpn-gateway/${VpnGatewayId}"}, "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}"}, "emr-serverless": {"application": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}", "jobRun": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/jobruns/${JobRunId}", "session": "arn:${Partition}:emr-serverless:${Region}:${Account}:/applications/${ApplicationId}/sessions/${SessionId}"}, "es": {"application": "arn:${Partition}:opensearch:${Region}:${Account}:application/${AppId}", "datasource": "arn:${Partition}:opensearch:${Region}:${Account}:datasource/${DataSourceName}", "domain": "arn:${Partition}:es:${Region}:${Account}:domain/${DomainName}", "es_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/es.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService", "opensearchservice_role": "arn:${Partition}:iam::${Account}:role/aws-service-role/opensearchservice.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService"}, "events": {"alias": "arn:${Partition}:kms:${Region}:${Account}:alias/${Alias}", "api-destination": "arn:${Partition}:events:${Region}:${Account}:api-destination/${ApiDestinationName}", "archive": "arn:${Partition}:events:${Region}:${Account}:archive/${ArchiveName}", "connection": "arn:${Partition}:events:${Region}:${Account}:connection/${ConnectionName}", "create-snapshot": "arn:${Partition}:events:${Region}:${Account}:target/create-snapshot", "endpoint": "arn:${Partition}:events:${Region}:${Account}:endpoint/${EndpointName}", "event-bus": "arn:${Partition}:events:${Region}:${Account}:event-bus/${EventBusName}", "event-busv2": "arn:${Partition}:events:${Region}:${Account}:event-busv2/${EventBusName}/${OpaqueId}", "event-source": "arn:${Partition}:events:${Region}::event-source/${EventSourceName}", "event-sourcev2": "arn:${Partition}:events:${Region}:${Account}:event-sourcev2/${SourceType}/${EventSourceName}/${OpaqueId}", "key": "arn:${Partition}:kms:${Region}:${Account}:key/${KeyId}", "reboot-instance": "arn:${Partition}:events:${Region}:${Account}:target/reboot-instance", "replay": "arn:${Partition}:events:${Region}:${Account}:replay/${ReplayName}", "rule-on-custom-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${EventBusName}/${RuleName}", "rule-on-default-event-bus": "arn:${Partition}:events:${Region}:${Account}:rule/${RuleName}", "stop-instance": "arn:${Partition}:events:${Region}:${Account}:target/stop-instance", "subscriber": "arn:${Partition}:events:${Region}:${Account}:subscriber/${SubscriberName}/${OpaqueId}", "terminate-instance": "arn:${Partition}:events:${Region}:${Account}:target/terminate-instance"}, "firehose": {"deliverystream": "arn:${Partition}:firehose:${Region}:${Account}:deliverystream/${DeliveryStreamName}"}, "fis": {"action": "arn:${Partition}:fis:${Region}:${Account}:action/${Id}", "experiment": "arn:${Partition}:fis:${Region}:${Account}:experiment/${Id}", "experiment-template": "arn:${Partition}:fis:${Region}:${Account}:experiment-template/${Id}", "safety-lever": "arn:${Partition}:fis:${Region}:${Account}:safety-lever/${Id}"}, "globalaccelerator": {"accelerator": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}", "attachment": "arn:${Partition}:globalaccelerator::${Account}:attachment/${ResourceId}", "endpointgroup": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}/endpoint-group/${EndpointGroupId}", "listener": "arn:${Partition}:globalaccelerator::${Account}:accelerator/${ResourceId}/listener/${ListenerId}"}, "guardduty": {"customdetectionrule": "arn:${Partition}:guardduty::aws:detection-rule/custom/${RuleId}", "customdetectionruleassociation": "arn:${Partition}:guardduty:${Region}:${Account}:detection-rule/custom/${RuleId}/association/${AssociationId}", "detector": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}", "filter": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/filter/${FilterName}", "ipset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/ipset/${IPSetId}", "malwareprotectionplan": "arn:${Partition}:guardduty:${Region}:${Account}:malware-protection-plan/${MalwareProtectionPlanId}", "publishingDestination": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/publishingdestination/${PublishingDestinationId}", "threatentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatentityset/${ThreatEntitySetId}", "threatintelset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/threatintelset/${ThreatIntelSetId}", "trustedentityset": "arn:${Partition}:guardduty:${Region}:${Account}:detector/${DetectorId}/trustedentityset/${TrustedEntitySetId}"}, "inspector2": {"CIS Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/cis-configuration/${CISScanConfigurationId}", "Code Security Integration": "arn:${Partition}:inspector2:${Region}:${Account}:codesecurity-integration/${CodeSecurityIntegrationId}", "Code Security Scan Configuration": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/codesecurity-configuration/${CodeSecurityScanConfigurationId}", "Connector": "arn:${Partition}:inspector2:${Region}:${Account}:connector/${ConnectorId}", "Filter": "arn:${Partition}:inspector2:${Region}:${Account}:owner/${OwnerId}/filter/${FilterId}", "Finding": "arn:${Partition}:inspector2:${Region}:${Account}:finding/${FindingId}"}, "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}"}, "macie2": {"AllowList": "arn:${Partition}:macie2:${Region}:${Account}:allow-list/${ResourceId}", "ClassificationJob": "arn:${Partition}:macie2:${Region}:${Account}:classification-job/${ResourceId}", "CustomDataIdentifier": "arn:${Partition}:macie2:${Region}:${Account}:custom-data-identifier/${ResourceId}", "FindingsFilter": "arn:${Partition}:macie2:${Region}:${Account}:findings-filter/${ResourceId}", "Member": "arn:${Partition}:macie2:${Region}:${Account}:member/${ResourceId}"}, "oam": {"Link": "arn:${Partition}:oam:${Region}:${Account}:link/${ResourceId}", "Sink": "arn:${Partition}:oam:${Region}:${Account}:sink/${ResourceId}"}, "payment-cryptography": {"alias": "arn:${Partition}:payment-cryptography:${Region}:${Account}:alias/${Alias}", "approval-team": "arn:${Partition}:mpa:${Region}:${Account}:approval-team/${ApprovalTeamId}", "key": "arn:${Partition}:payment-cryptography:${Region}:${Account}:key/${KeyId}"}, "quicksight": {"accessControlApplication": "arn:${Partition}:quicksight:${Region}:${Account}:access-control-application/${ResourceId}", "account": "arn:${Partition}:quicksight:${Region}:${Account}:account/${ResourceId}", "actionconnector": "arn:${Partition}:quicksight:${Region}:${Account}:action-connector/${ResourceId}", "agent": "arn:${Partition}:quicksight:${Region}:${Account}:agent/${ResourceId}", "analysis": "arn:${Partition}:quicksight:${Region}:${Account}:analysis/${ResourceId}", "app": "arn:${Partition}:quicksight:${Region}:${Account}:app/${ResourceId}", "approvalPolicy": "arn:${Partition}:quicksight:${Region}:${Account}:approval-policy/${ResourceId}", "assetBundleExportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-export-job/${ResourceId}", "assetBundleImportJob": "arn:${Partition}:quicksight:${Region}:${Account}:asset-bundle-import-job/${ResourceId}", "assignment": "arn:${Partition}:quicksight::${Account}:assignment/${ResourceId}", "automation": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${ResourceId}", "automationGroup": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${ResourceId}", "automationJob": "arn:${Partition}:quicksight:${Region}:${Account}:automation-group/${AutomationGroupId}/automation/${AutomationId}/job/${ResourceId}", "brand": "arn:${Partition}:quicksight:${Region}:${Account}:brand/${ResourceId}", "customization": "arn:${Partition}:quicksight:${Region}:${Account}:customization/${ResourceId}", "custompermissions": "arn:${Partition}:quicksight:${Region}:${Account}:custompermissions/${ResourceId}", "dashboard": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${ResourceId}", "dashboardSnapshotJob": "arn:${Partition}:quicksight:${Region}:${Account}:dashboard/${DashboardId}/snapshot-job/${ResourceId}", "dataset": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${ResourceId}", "datasource": "arn:${Partition}:quicksight:${Region}:${Account}:datasource/${ResourceId}", "dlpSetting": "arn:${Partition}:quicksight:${Region}:${Account}:dlpsetting/${ResourceId}", "emailCustomizationTemplate": "arn:${Partition}:quicksight:${Region}:${Account}:email-customization-template/${ResourceId}", "extension": "arn:${Partition}:quicksight:${Region}:${Account}:extension/${ResourceId}", "extensionaccess": "arn:${Partition}:quicksight:${Region}:${Account}:extension-access/${ResourceId}", "flow": "arn:${Partition}:quicksight:${Region}:${Account}:flow/${ResourceId}", "folder": "arn:${Partition}:quicksight:${Region}:${Account}:folder/${ResourceId}", "group": "arn:${Partition}:quicksight:${Region}:${Account}:group/${ResourceId}", "inboundConnector": "arn:${Partition}:quicksight:${Region}:${Account}:inbound-connector/${ResourceId}", "ingestion": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/ingestion/${ResourceId}", "knowledgeBase": "arn:${Partition}:quicksight:${Region}:${Account}:knowledge-base/${ResourceId}", "limitsProfile": "arn:${Partition}:quicksight:${Region}:${Account}:limits-profile/${ResourceId}", "namespace": "arn:${Partition}:quicksight:${Region}:${Account}:namespace/${ResourceId}", "oauthClientApplication": "arn:${Partition}:quicksight:${Region}:${Account}:oauthClientApplication/${ResourceId}", "refreshschedule": "arn:${Partition}:quicksight:${Region}:${Account}:dataset/${DatasetId}/refresh-schedule/${ResourceId}", "space": "arn:${Partition}:quicksight:${Region}:${Account}:space/${ResourceId}", "template": "arn:${Partition}:quicksight:${Region}:${Account}:template/${ResourceId}", "theme": "arn:${Partition}:quicksight:${Region}:${Account}:theme/${ResourceId}", "topic": "arn:${Partition}:quicksight:${Region}:${Account}:topic/${ResourceId}", "user": "arn:${Partition}:quicksight:${Region}:${Account}:user/${ResourceId}", "vpcconnection": "arn:${Partition}:quicksight:${Region}:${Account}:vpcConnection/${ResourceId}"}, "ram": {"customer-managed-permission": "arn:${Partition}:ram:${Region}:${Account}:permission/${ResourcePath}", "permission": "arn:${Partition}:ram::aws:permission/${ResourcePath}", "resource-share": "arn:${Partition}:ram:${Region}:${Account}:resource-share/${ResourcePath}", "resource-share-invitation": "arn:${Partition}:ram:${Region}:${Account}:resource-share-invitation/${ResourcePath}"}, "redshift": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "datashare": "arn:${Partition}:redshift:${Region}:${Account}:datashare:${ProducerClusterNamespace}/${DataShareName}", "dbgroup": "arn:${Partition}:redshift:${Region}:${Account}:dbgroup:${ClusterName}/${DbGroup}", "dbname": "arn:${Partition}:redshift:${Region}:${Account}:dbname:${ClusterName}/${DbName}", "dbuser": "arn:${Partition}:redshift:${Region}:${Account}:dbuser:${ClusterName}/${DbUser}", "eventsubscription": "arn:${Partition}:redshift:${Region}:${Account}:eventsubscription:${EventSubscriptionName}", "hsmclientcertificate": "arn:${Partition}:redshift:${Region}:${Account}:hsmclientcertificate:${HSMClientCertificateId}", "hsmconfiguration": "arn:${Partition}:redshift:${Region}:${Account}:hsmconfiguration:${HSMConfigurationId}", "integration": "arn:${Partition}:redshift:${Region}:${Account}:integration:${IntegrationIdentifier}", "namespace": "arn:${Partition}:redshift:${Region}:${Account}:namespace:${ClusterNamespace}", "parametergroup": "arn:${Partition}:redshift:${Region}:${Account}:parametergroup:${ParameterGroupName}", "qev2idcapplication": "arn:${Partition}:redshift:${Region}:${Account}:qev2idcapplication:${Qev2IdcApplicationId}", "redshiftidcapplication": "arn:${Partition}:redshift:${Region}:${Account}:redshiftidcapplication:${RedshiftIdcApplicationId}", "securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroup:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ec2SecurityGroupId}", "securitygroupingress-cidr": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/cidrip/${IpRange}", "securitygroupingress-ec2securitygroup": "arn:${Partition}:redshift:${Region}:${Account}:securitygroupingress:${SecurityGroupName}/ec2securitygroup/${Owner}/${Ece2SecuritygroupId}", "snapshot": "arn:${Partition}:redshift:${Region}:${Account}:snapshot:${ClusterName}/${SnapshotName}", "snapshotcopygrant": "arn:${Partition}:redshift:${Region}:${Account}:snapshotcopygrant:${SnapshotCopyGrantName}", "snapshotschedule": "arn:${Partition}:redshift:${Region}:${Account}:snapshotschedule:${ScheduleIdentifier}", "subnetgroup": "arn:${Partition}:redshift:${Region}:${Account}:subnetgroup:${SubnetGroupName}", "usagelimit": "arn:${Partition}:redshift:${Region}:${Account}:usagelimit:${UsageLimitId}"}, "redshift-data": {"cluster": "arn:${Partition}:redshift:${Region}:${Account}:cluster:${ClusterName}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "redshift-serverless": {"endpointAccess": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managedvpcendpoint/${EndpointAccessId}", "managed-workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:managed-workgroup/${ManagedWorkgroupName}", "namespace": "arn:${Partition}:redshift-serverless:${Region}:${Account}:namespace/${NamespaceId}", "recoveryPoint": "arn:${Partition}:redshift-serverless:${Region}:${Account}:recoverypoint/${RecoveryPointId}", "snapshot": "arn:${Partition}:redshift-serverless:${Region}:${Account}:snapshot/${SnapshotId}", "workgroup": "arn:${Partition}:redshift-serverless:${Region}:${Account}:workgroup/${WorkgroupId}"}, "rekognition": {"collection": "arn:${Partition}:rekognition:${Region}:${Account}:collection/${CollectionId}", "dataset": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/dataset/${DatasetType}/${CreationTimestamp}", "project": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/${CreationTimestamp}", "projectversion": "arn:${Partition}:rekognition:${Region}:${Account}:project/${ProjectName}/version/${VersionName}/${CreationTimestamp}", "streamprocessor": "arn:${Partition}:rekognition:${Region}:${Account}:streamprocessor/${StreamprocessorId}"}, "resource-explorer-2": {"index": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:index/${IndexUuid}", "managed-view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:managed-view/${ManagedViewName}/${ManagedViewUuid}", "view": "arn:${Partition}:resource-explorer-2:${Region}:${Account}:view/${ViewName}/${ViewUuid}"}, "route53": {"change": "arn:${Partition}:route53:::change/${Id}", "cidrcollection": "arn:${Partition}:route53:::cidrcollection/${Id}", "delegationset": "arn:${Partition}:route53:::delegationset/${Id}", "healthcheck": "arn:${Partition}:route53:::healthcheck/${Id}", "hostedzone": "arn:${Partition}:route53:::hostedzone/${Id}", "queryloggingconfig": "arn:${Partition}:route53:::queryloggingconfig/${Id}", "trafficpolicy": "arn:${Partition}:route53:::trafficpolicy/${Id}", "trafficpolicyinstance": "arn:${Partition}:route53:::trafficpolicyinstance/${Id}", "vpc": "arn:${Partition}:ec2:${Region}:${Account}:vpc/${VpcId}"}, "securityhub": {"aggregatorv2": "arn:${Partition}:securityhub:${Region}:${Account}:aggregatorv2/${AggregatorV2Id}", "automation-rule": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rule/${AutomationRuleId}", "automation-rulev2": "arn:${Partition}:securityhub:${Region}:${Account}:automation-rulev2/${AutomationRuleV2Id}", "configuration-policy": "arn:${Partition}:securityhub:${Region}:${Account}:configuration-policy/${ConfigurationPolicyId}", "connector": "arn:${Partition}:securityhub:${Region}:${Account}:connector/${ConnectorId}", "connectorv2": "arn:${Partition}:securityhub:${Region}:${Account}:connectorv2/${ConnectorV2Id}", "finding-aggregator": "arn:${Partition}:securityhub:${Region}:${Account}:finding-aggregator/${FindingAggregatorId}", "hub": "arn:${Partition}:securityhub:${Region}:${Account}:hub/default", "hubv2": "arn:${Partition}:securityhub:${Region}:${Account}:hubv2/${HubV2Id}", "product": "arn:${Partition}:securityhub:${Region}:${Account}:product/${Company}/${ProductId}"}, "servicediscovery": {"namespace": "arn:${Partition}:servicediscovery:${Region}:${Account}:namespace/${NamespaceId}", "service": "arn:${Partition}:servicediscovery:${Region}:${Account}:service/${ServiceId}"}, "servicequotas": {"quota": "arn:${Partition}:servicequotas:${Region}:${Account}:${ServiceCode}/${QuotaCode}"}, "signer": {"signing-job": "arn:${Partition}:signer:${Region}:${Account}:/signing-jobs/${JobId}", "signing-profile": "arn:${Partition}:signer:${Region}:${Account}:/signing-profiles/${ProfileName}"}, "ssm": {"association": "arn:${Partition}:ssm:${Region}:${Account}:association/${AssociationId}", "automation-definition": "arn:${Partition}:ssm:${Region}:${Account}:automation-definition/${AutomationDefinitionName}:${VersionId}", "automation-execution": "arn:${Partition}:ssm:${Region}:${Account}:automation-execution/${AutomationExecutionId}", "bucket": "arn:${Partition}:s3:::${BucketName}", "cloud-connector": "arn:${Partition}:ssm:${Region}:${Account}:cloud-connector/${CloudConnectorId}", "document": "arn:${Partition}:ssm:${Region}:${Account}:document/${DocumentName}", "iam-role": "arn:${Partition}:iam::${Account}:role/${RoleName}", "instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}", "maintenancewindow": "arn:${Partition}:ssm:${Region}:${Account}:maintenancewindow/${ResourceId}", "managed-instance": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance/${InstanceId}", "managed-instance-inventory": "arn:${Partition}:ssm:${Region}:${Account}:managed-instance-inventory/${InstanceId}", "opsitem": "arn:${Partition}:ssm:${Region}:${Account}:opsitem/${ResourceId}", "opsitemgroup": "arn:${Partition}:ssm:${Region}:${Account}:opsitemgroup/default", "opsmetadata": "arn:${Partition}:ssm:${Region}:${Account}:opsmetadata/${ResourceId}", "parameter": "arn:${Partition}:ssm:${Region}:${Account}:parameter/${ParameterNameWithoutLeadingSlash}", "patchbaseline": "arn:${Partition}:ssm:${Region}:${Account}:patchbaseline/${PatchBaselineIdResourceId}", "resourcedatasync": "arn:${Partition}:ssm:${Region}:${Account}:resource-data-sync/${SyncName}", "servicesetting": "arn:${Partition}:ssm:${Region}:${Account}:servicesetting/${ResourceId}", "session": "arn:${Partition}:ssm:${Region}:${Account}:session/${SessionId}", "task": "arn:${Partition}:ecs:${Region}:${Account}:task/${TaskId}", "windowtarget": "arn:${Partition}:ssm:${Region}:${Account}:windowtarget/${WindowTargetId}", "windowtask": "arn:${Partition}:ssm:${Region}:${Account}:windowtask/${WindowTaskId}"}, "sso": {"Account": "arn:${Partition}:sso:::account/${AccountId}", "Application": "arn:${Partition}:sso::${Account}:application/${InstanceId}/${ApplicationId}", "ApplicationProvider": "arn:${Partition}:sso::aws:applicationProvider/${ApplicationProviderId}", "Instance": "arn:${Partition}:sso:::instance/${InstanceId}", "PermissionSet": "arn:${Partition}:sso:::permissionSet/${InstanceId}/${PermissionSetId}", "TrustedTokenIssuer": "arn:${Partition}:sso::${Account}:trustedTokenIssuer/${InstanceId}/${TrustedTokenIssuerId}"}, "states": {"activity": "arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}", "execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}:${ExecutionId}", "express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}:${ExecutionId}:${ExpressId}", "labelled execution": "arn:${Partition}:states:${Region}:${Account}:execution:${StateMachineName}/${MapRunLabel}:${ExecutionId}", "labelled express": "arn:${Partition}:states:${Region}:${Account}:express:${StateMachineName}/${MapRunLabel}:${ExecutionId}:${ExpressId}", "maprun": "arn:${Partition}:states:${Region}:${Account}:mapRun:${StateMachineName}/${MapRunLabel}:${MapRunId}", "statemachine": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}", "statemachinealias": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineAliasName}", "statemachineversion": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}:${StateMachineVersionId}"}, "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}"}, "xray": {"group": "arn:${Partition}:xray:${Region}:${Account}:group/${GroupName}/${Id}", "sampling-rule": "arn:${Partition}:xray:${Region}:${Account}:sampling-rule/${SamplingRuleName}"}}, "resourceTagKeys": {"ec2": {"instance": ["aws:ResourceTag/", "ec2:ResourceTag/"]}}, @@ -70,7 +70,7 @@ "acm:AddTagsToCertificate": {"action": "acm:AddTagsToCertificate", "types": ["certificate"], "resources": [{"types": ["certificate"], "arn": "CertificateArn"}]}, "acm:CreateAcmeDomainValidation": {"action": "acm:CreateAcmeDomainValidation", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]}, "acm:CreateAcmeEndpoint": {"action": "acm:CreateAcmeEndpoint", "types": [], "resources": [], "makes": [{"type": "acme-endpoint", "fill": {}}]}, - "acm:CreateAcmeExternalAccountBinding": {"action": "acm:CreateAcmeExternalAccountBinding", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}, {"types": ["acme-endpoint"], "arn": "RoleArn"}]}, + "acm:CreateAcmeExternalAccountBinding": {"action": "acm:CreateAcmeExternalAccountBinding", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]}, "acm:DeleteAcmeDomainValidation": {"action": "acm:DeleteAcmeDomainValidation", "types": ["acme-domain-validation"], "resources": [{"types": ["acme-domain-validation"], "arn": "AcmeDomainValidationArn"}]}, "acm:DeleteAcmeEndpoint": {"action": "acm:DeleteAcmeEndpoint", "types": ["acme-endpoint"], "resources": [{"types": ["acme-endpoint"], "arn": "AcmeEndpointArn"}]}, "acm:DeleteAcmeExternalAccountBinding": {"action": "acm:DeleteAcmeExternalAccountBinding", "types": ["acme-external-account-binding"], "resources": [{"types": ["acme-external-account-binding"], "arn": "AcmeExternalAccountBindingArn"}]}, @@ -146,7 +146,7 @@ "athena:GetCalculationExecutionStatus": {"action": "athena:GetCalculationExecutionStatus", "types": ["workgroup"], "resources": []}, "athena:GetCapacityAssignmentConfiguration": {"action": "athena:GetCapacityAssignmentConfiguration", "types": ["capacity-reservation"], "resources": [{"type": "capacity-reservation", "fill": {"CapacityReservationName": "CapacityReservationName"}}]}, "athena:GetCapacityReservation": {"action": "athena:GetCapacityReservation", "types": ["capacity-reservation"], "resources": [{"type": "capacity-reservation", "fill": {"CapacityReservationName": "Name"}}]}, - "athena:GetDataCatalog": {"action": "athena:GetDataCatalog", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "Name"}, "absent": {"Name": "AwsDataCatalog"}}]}, + "athena:GetDataCatalog": {"action": "athena:GetDataCatalog", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "Name"}}]}, "athena:GetDatabase": {"action": "athena:GetDatabase", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}}]}, "athena:GetNamedQuery": {"action": "athena:GetNamedQuery", "types": ["workgroup"], "resources": []}, "athena:GetNotebookMetadata": {"action": "athena:GetNotebookMetadata", "types": ["workgroup"], "resources": []}, @@ -159,29 +159,29 @@ "athena:GetSessionEndpoint": {"action": "athena:GetSessionEndpoint", "types": ["session", "workgroup"], "resources": [{"type": "session", "fill": {"SessionId": "SessionId"}}]}, "athena:GetSessionStatus": {"action": "athena:GetSessionStatus", "types": ["session", "workgroup"], "resources": [{"type": "session", "fill": {"SessionId": "SessionId"}}]}, "athena:GetSystemTableConfiguration": {"action": "athena:GetSystemTableConfiguration", "types": ["system-table"], "resources": []}, - "athena:GetTableMetadata": {"action": "athena:GetTableMetadata", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}, "absent": {"CatalogName": "AwsDataCatalog"}}, {"type": "datacatalog", "fill": {}, "fixed": {"DataCatalogName": "AwsDataCatalog"}}]}, - "athena:GetWorkGroup": {"action": "athena:GetWorkGroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}, "absent": {"WorkGroup": "primary"}}]}, + "athena:GetTableMetadata": {"action": "athena:GetTableMetadata", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}}]}, + "athena:GetWorkGroup": {"action": "athena:GetWorkGroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ImportNotebook": {"action": "athena:ImportNotebook", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ListApplicationDPUSizes": {"action": "athena:ListApplicationDPUSizes", "types": [], "resources": []}, "athena:ListCalculationExecutions": {"action": "athena:ListCalculationExecutions", "types": ["workgroup"], "resources": []}, "athena:ListCapacityReservations": {"action": "athena:ListCapacityReservations", "types": [], "resources": []}, "athena:ListDataCatalogs": {"action": "athena:ListDataCatalogs", "types": [], "resources": []}, - "athena:ListDatabases": {"action": "athena:ListDatabases", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}, "absent": {"CatalogName": "AwsDataCatalog"}}, {"type": "datacatalog", "fill": {}, "fixed": {"DataCatalogName": "AwsDataCatalog"}}]}, + "athena:ListDatabases": {"action": "athena:ListDatabases", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}}]}, "athena:ListEngineVersions": {"action": "athena:ListEngineVersions", "types": [], "resources": []}, "athena:ListExecutors": {"action": "athena:ListExecutors", "types": [], "resources": []}, - "athena:ListNamedQueries": {"action": "athena:ListNamedQueries", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}, "absent": {"WorkGroup": "primary"}}]}, + "athena:ListNamedQueries": {"action": "athena:ListNamedQueries", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ListNotebookMetadata": {"action": "athena:ListNotebookMetadata", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ListNotebookSessions": {"action": "athena:ListNotebookSessions", "types": ["workgroup"], "resources": []}, "athena:ListPreparedStatements": {"action": "athena:ListPreparedStatements", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, - "athena:ListQueryExecutions": {"action": "athena:ListQueryExecutions", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}, "absent": {"WorkGroup": "primary"}}]}, + "athena:ListQueryExecutions": {"action": "athena:ListQueryExecutions", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ListSessions": {"action": "athena:ListSessions", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:ListSystemTableStatuses": {"action": "athena:ListSystemTableStatuses", "types": [], "resources": []}, - "athena:ListTableMetadata": {"action": "athena:ListTableMetadata", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}, "absent": {"CatalogName": "AwsDataCatalog"}}, {"type": "datacatalog", "fill": {}, "fixed": {"DataCatalogName": "AwsDataCatalog"}}]}, + "athena:ListTableMetadata": {"action": "athena:ListTableMetadata", "types": ["datacatalog"], "resources": [{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}}]}, "athena:ListTagsForResource": {"action": "athena:ListTagsForResource", "types": ["capacity-reservation", "datacatalog", "session", "system-table", "workgroup"], "resources": [{"types": ["capacity-reservation", "datacatalog", "session", "system-table", "workgroup"], "arn": "ResourceARN"}]}, "athena:ListWorkGroups": {"action": "athena:ListWorkGroups", "types": [], "resources": []}, "athena:PutCapacityAssignmentConfiguration": {"action": "athena:PutCapacityAssignmentConfiguration", "types": ["capacity-reservation", "workgroup"], "resources": [{"type": "capacity-reservation", "fill": {"CapacityReservationName": "CapacityReservationName"}}]}, "athena:StartCalculationExecution": {"action": "athena:StartCalculationExecution", "types": ["workgroup"], "resources": []}, - "athena:StartQueryExecution": {"action": "athena:StartQueryExecution", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}, "absent": {"WorkGroup": "primary"}}]}, + "athena:StartQueryExecution": {"action": "athena:StartQueryExecution", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:StartSession": {"action": "athena:StartSession", "types": ["session", "workgroup"], "resources": [{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}}]}, "athena:StopCalculationExecution": {"action": "athena:StopCalculationExecution", "types": ["workgroup"], "resources": []}, "athena:StopQueryExecution": {"action": "athena:StopQueryExecution", "types": ["workgroup"], "resources": []}, @@ -200,7 +200,7 @@ "bcm-data-exports:DeleteExport": {"action": "bcm-data-exports:DeleteExport", "types": ["export"], "resources": [{"types": ["export"], "arn": "ExportArn"}]}, "bcm-data-exports:GetExecution": {"action": "bcm-data-exports:GetExecution", "types": ["export"], "resources": [{"types": ["export"], "arn": "ExportArn"}]}, "bcm-data-exports:GetExport": {"action": "bcm-data-exports:GetExport", "types": ["export"], "resources": [{"types": ["export"], "arn": "ExportArn"}]}, - "bcm-data-exports:GetTable": {"action": "bcm-data-exports:GetTable", "types": ["table"], "resources": []}, + "bcm-data-exports:GetTable": {"action": "bcm-data-exports:GetTable", "types": ["table"], "resources": [{"type": "table", "fill": {"Identifier": "TableName"}}]}, "bcm-data-exports:ListExecutions": {"action": "bcm-data-exports:ListExecutions", "types": ["export"], "resources": [{"types": ["export"], "arn": "ExportArn"}]}, "bcm-data-exports:ListExports": {"action": "bcm-data-exports:ListExports", "types": [], "resources": []}, "bcm-data-exports:ListTables": {"action": "bcm-data-exports:ListTables", "types": [], "resources": []}, @@ -241,11 +241,11 @@ "bcm-pricing-calculator:TagResource": {"action": "bcm-pricing-calculator:TagResource", "types": ["bill-scenario", "workload-estimate"], "resources": [{"types": ["bill-scenario", "workload-estimate"], "arn": "arn"}]}, "bcm-pricing-calculator:UntagResource": {"action": "bcm-pricing-calculator:UntagResource", "types": ["bill-scenario", "workload-estimate"], "resources": [{"types": ["bill-scenario", "workload-estimate"], "arn": "arn"}]}, "bcm-pricing-calculator:UpdateBillEstimate": {"action": "bcm-pricing-calculator:UpdateBillEstimate", "types": ["bill-estimate"], "resources": [{"type": "bill-estimate", "fill": {"BillEstimateId": "identifier"}}]}, - "bcm-pricing-calculator:UpdateBillScenario": {"action": "bcm-pricing-calculator:UpdateBillScenario", "types": ["bill-scenario"], "resources": [{"types": ["bill-scenario"], "arn": "costCategoryGroupSharingPreferenceArn"}, {"type": "bill-scenario", "fill": {"BillScenarioId": "identifier"}}]}, + "bcm-pricing-calculator:UpdateBillScenario": {"action": "bcm-pricing-calculator:UpdateBillScenario", "types": ["bill-scenario"], "resources": [{"type": "bill-scenario", "fill": {"BillScenarioId": "identifier"}}]}, "bcm-pricing-calculator:UpdatePreferences": {"action": "bcm-pricing-calculator:UpdatePreferences", "types": [], "resources": []}, "bcm-pricing-calculator:UpdateWorkloadEstimate": {"action": "bcm-pricing-calculator:UpdateWorkloadEstimate", "types": ["workload-estimate"], "resources": [{"type": "workload-estimate", "fill": {"WorkloadEstimateId": "identifier"}}]}, "budgets:CreateBudget": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "Budget.BudgetName"}, "account": "AccountId"}]}, - "budgets:CreateBudgetAction": {"action": "budgets:CreateBudgetAction", "types": ["budgetAction"], "resources": [{"types": ["budgetAction"], "arn": "ExecutionRoleArn"}, {"type": "budgetAction", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, + "budgets:CreateBudgetAction": {"action": "budgets:CreateBudgetAction", "types": ["budgetAction"], "resources": [{"type": "budgetAction", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, "budgets:CreateNotification": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, "budgets:CreateSubscriber": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, "budgets:DeleteBudget": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, @@ -267,7 +267,7 @@ "budgets:TagResource": {"action": "budgets:TagResource", "types": ["budget", "budgetAction"], "resources": [{"types": ["budget", "budgetAction"], "arn": "ResourceARN"}]}, "budgets:UntagResource": {"action": "budgets:UntagResource", "types": ["budget", "budgetAction"], "resources": [{"types": ["budget", "budgetAction"], "arn": "ResourceARN"}]}, "budgets:UpdateBudget": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "NewBudget.BudgetName"}, "account": "AccountId"}]}, - "budgets:UpdateBudgetAction": {"action": "budgets:UpdateBudgetAction", "types": ["budgetAction"], "resources": [{"types": ["budgetAction"], "arn": "ExecutionRoleArn"}, {"type": "budgetAction", "fill": {"ActionId": "ActionId", "BudgetName": "BudgetName"}, "account": "AccountId"}]}, + "budgets:UpdateBudgetAction": {"action": "budgets:UpdateBudgetAction", "types": ["budgetAction"], "resources": [{"type": "budgetAction", "fill": {"ActionId": "ActionId", "BudgetName": "BudgetName"}, "account": "AccountId"}]}, "budgets:UpdateNotification": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, "budgets:UpdateSubscriber": {"action": "budgets:ModifyBudget", "types": ["budget"], "resources": [{"type": "budget", "fill": {"BudgetName": "BudgetName"}, "account": "AccountId"}]}, "ce:CreateAnomalyMonitor": {"action": "ce:CreateAnomalyMonitor", "types": [], "resources": [], "makes": [{"type": "anomalymonitor", "fill": {}}]}, @@ -279,16 +279,16 @@ "ce:DescribeCostCategoryDefinition": {"action": "ce:DescribeCostCategoryDefinition", "types": ["costcategory"], "resources": [{"types": ["costcategory"], "arn": "CostCategoryArn"}]}, "ce:GetAnomalies": {"action": "ce:GetAnomalies", "types": ["anomalymonitor"], "resources": [{"types": ["anomalymonitor"], "arn": "MonitorArn"}, {"type": "anomalymonitor", "fill": {}, "when": {"MonitorArn": [null]}, "default": true}]}, "ce:GetAnomalyMonitors": {"action": "ce:GetAnomalyMonitors", "types": ["anomalymonitor"], "resources": [{"types": ["anomalymonitor"], "arn": "MonitorArnList[]"}]}, - "ce:GetAnomalySubscriptions": {"action": "ce:GetAnomalySubscriptions", "types": ["anomalysubscription"], "resources": [{"types": ["anomalysubscription"], "arn": "SubscriptionArnList[]"}]}, + "ce:GetAnomalySubscriptions": {"action": "ce:GetAnomalySubscriptions", "types": ["anomalysubscription"], "resources": [{"types": ["anomalysubscription"], "arn": "MonitorArn"}, {"types": ["anomalysubscription"], "arn": "SubscriptionArnList[]"}]}, "ce:GetApproximateUsageRecords": {"action": "ce:GetApproximateUsageRecords", "types": [], "resources": []}, "ce:GetCommitmentPurchaseAnalysis": {"action": "ce:GetCommitmentPurchaseAnalysis", "types": [], "resources": []}, - "ce:GetCostAndUsage": {"action": "ce:GetCostAndUsage", "types": ["billingview"], "resources": []}, - "ce:GetCostAndUsageComparisons": {"action": "ce:GetCostAndUsageComparisons", "types": ["billingview"], "resources": []}, - "ce:GetCostAndUsageWithResources": {"action": "ce:GetCostAndUsageWithResources", "types": ["billingview"], "resources": []}, - "ce:GetCostCategories": {"action": "ce:GetCostCategories", "types": ["billingview"], "resources": []}, - "ce:GetCostComparisonDrivers": {"action": "ce:GetCostComparisonDrivers", "types": ["billingview"], "resources": []}, - "ce:GetCostForecast": {"action": "ce:GetCostForecast", "types": ["billingview"], "resources": []}, - "ce:GetDimensionValues": {"action": "ce:GetDimensionValues", "types": ["billingview"], "resources": []}, + "ce:GetCostAndUsage": {"action": "ce:GetCostAndUsage", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetCostAndUsageComparisons": {"action": "ce:GetCostAndUsageComparisons", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetCostAndUsageWithResources": {"action": "ce:GetCostAndUsageWithResources", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetCostCategories": {"action": "ce:GetCostCategories", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetCostComparisonDrivers": {"action": "ce:GetCostComparisonDrivers", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetCostForecast": {"action": "ce:GetCostForecast", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetDimensionValues": {"action": "ce:GetDimensionValues", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, "ce:GetReservationCoverage": {"action": "ce:GetReservationCoverage", "types": [], "resources": []}, "ce:GetReservationPurchaseRecommendation": {"action": "ce:GetReservationPurchaseRecommendation", "types": [], "resources": []}, "ce:GetReservationUtilization": {"action": "ce:GetReservationUtilization", "types": [], "resources": []}, @@ -298,8 +298,8 @@ "ce:GetSavingsPlansPurchaseRecommendation": {"action": "ce:GetSavingsPlansPurchaseRecommendation", "types": [], "resources": []}, "ce:GetSavingsPlansUtilization": {"action": "ce:GetSavingsPlansUtilization", "types": [], "resources": []}, "ce:GetSavingsPlansUtilizationDetails": {"action": "ce:GetSavingsPlansUtilizationDetails", "types": [], "resources": []}, - "ce:GetTags": {"action": "ce:GetTags", "types": ["billingview"], "resources": []}, - "ce:GetUsageForecast": {"action": "ce:GetUsageForecast", "types": ["billingview"], "resources": []}, + "ce:GetTags": {"action": "ce:GetTags", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, + "ce:GetUsageForecast": {"action": "ce:GetUsageForecast", "types": ["billingview"], "resources": [{"types": ["billingview"], "arn": "BillingViewArn"}, {"type": "billingview", "fill": {}, "when": {"BillingViewArn": [null]}, "default": true}]}, "ce:ListCommitmentPurchaseAnalyses": {"action": "ce:ListCommitmentPurchaseAnalyses", "types": [], "resources": []}, "ce:ListCostAllocationTagBackfillHistory": {"action": "ce:ListCostAllocationTagBackfillHistory", "types": [], "resources": []}, "ce:ListCostAllocationTags": {"action": "ce:ListCostAllocationTags", "types": [], "resources": []}, @@ -314,7 +314,7 @@ "ce:TagResource": {"action": "ce:TagResource", "types": ["anomalymonitor", "anomalysubscription", "costcategory"], "resources": [{"types": ["anomalymonitor", "anomalysubscription", "costcategory"], "arn": "ResourceArn"}]}, "ce:UntagResource": {"action": "ce:UntagResource", "types": ["anomalymonitor", "anomalysubscription", "costcategory"], "resources": [{"types": ["anomalymonitor", "anomalysubscription", "costcategory"], "arn": "ResourceArn"}]}, "ce:UpdateAnomalyMonitor": {"action": "ce:UpdateAnomalyMonitor", "types": ["anomalymonitor"], "resources": [{"types": ["anomalymonitor"], "arn": "MonitorArn"}]}, - "ce:UpdateAnomalySubscription": {"action": "ce:UpdateAnomalySubscription", "types": ["anomalysubscription"], "resources": [{"types": ["anomalysubscription"], "arn": "SubscriptionArn"}]}, + "ce:UpdateAnomalySubscription": {"action": "ce:UpdateAnomalySubscription", "types": ["anomalysubscription"], "resources": [{"types": ["anomalysubscription"], "arn": "MonitorArnList[]"}, {"types": ["anomalysubscription"], "arn": "SubscriptionArn"}]}, "ce:UpdateCostAllocationTagsStatus": {"action": "ce:UpdateCostAllocationTagsStatus", "types": [], "resources": []}, "ce:UpdateCostCategoryDefinition": {"action": "ce:UpdateCostCategoryDefinition", "types": ["costcategory"], "resources": [{"types": ["costcategory"], "arn": "CostCategoryArn"}]}, "cloudfront-keyvaluestore:DeleteKey": {"action": "cloudfront-keyvaluestore:DeleteKey", "types": ["key-value-store"], "resources": [{"types": ["key-value-store"], "arn": "KvsARN"}], "located": {"KvsARN": "{KvsARN}"}}, @@ -493,9 +493,9 @@ "cloudfront:VerifyDnsConfiguration": {"action": "cloudfront:VerifyDnsConfiguration", "types": ["distribution-tenant"], "resources": []}, "cloudtrail:AddTags": {"action": "cloudtrail:AddTags", "types": ["channel", "dashboard", "eventdatastore", "trail"], "resources": [{"types": ["channel", "dashboard", "eventdatastore", "trail"], "arn": "ResourceId"}]}, "cloudtrail:CancelQuery": {"action": "cloudtrail:CancelQuery", "types": ["eventdatastore"], "resources": [{"type": "eventdatastore", "fill": {"EventDataStoreId": "EventDataStore"}}]}, - "cloudtrail:CreateChannel": {"action": "cloudtrail:CreateChannel", "types": ["channel", "eventdatastore"], "resources": [{"type": "channel", "fill": {}}]}, + "cloudtrail:CreateChannel": {"action": "cloudtrail:CreateChannel", "types": ["channel", "eventdatastore"], "resources": [{"type": "channel", "fill": {}, "find": ["Name"]}]}, "cloudtrail:CreateDashboard": {"action": "cloudtrail:CreateDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"DashboardName": "Name"}}]}, - "cloudtrail:CreateEventDataStore": {"action": "cloudtrail:CreateEventDataStore", "types": ["eventdatastore"], "resources": [{"type": "eventdatastore", "fill": {}}]}, + "cloudtrail:CreateEventDataStore": {"action": "cloudtrail:CreateEventDataStore", "types": ["eventdatastore"], "resources": [{"type": "eventdatastore", "fill": {}, "find": ["Name"]}]}, "cloudtrail:CreateTrail": {"action": "cloudtrail:CreateTrail", "types": ["trail"], "resources": [{"types": ["trail"], "arn": "CloudWatchLogsLogGroupArn"}, {"types": ["trail"], "arn": "CloudWatchLogsRoleArn"}, {"type": "trail", "fill": {"TrailName": "Name"}}]}, "cloudtrail:DeleteChannel": {"action": "cloudtrail:DeleteChannel", "types": ["channel"], "resources": [{"type": "channel", "fill": {"ChannelId": "Channel"}}]}, "cloudtrail:DeleteDashboard": {"action": "cloudtrail:DeleteDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"DashboardName": "DashboardId"}}]}, @@ -551,9 +551,9 @@ "cloudtrail:UpdateDashboard": {"action": "cloudtrail:UpdateDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"DashboardName": "DashboardId"}}]}, "cloudtrail:UpdateEventDataStore": {"action": "cloudtrail:UpdateEventDataStore", "types": ["eventdatastore"], "resources": [{"type": "eventdatastore", "fill": {"EventDataStoreId": "EventDataStore"}}]}, "cloudtrail:UpdateTrail": {"action": "cloudtrail:UpdateTrail", "types": ["trail"], "resources": [{"types": ["trail"], "arn": "CloudWatchLogsLogGroupArn"}, {"types": ["trail"], "arn": "CloudWatchLogsRoleArn"}, {"type": "trail", "fill": {"TrailName": "Name"}}]}, - "codebuild:BatchDeleteBuilds": {"action": "codebuild:BatchDeleteBuilds", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "ids[]"}, "before": ":"}]}, + "codebuild:BatchDeleteBuilds": {"action": "codebuild:BatchDeleteBuilds", "types": ["project"], "resources": [{"types": ["project"], "through": "ids[]"}]}, "codebuild:BatchGetBuildBatches": {"action": "codebuild:BatchGetBuildBatches", "types": ["project"], "resources": []}, - "codebuild:BatchGetBuilds": {"action": "codebuild:BatchGetBuilds", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "ids[]"}, "before": ":"}]}, + "codebuild:BatchGetBuilds": {"action": "codebuild:BatchGetBuilds", "types": ["project"], "resources": [{"types": ["project"], "through": "ids[]"}]}, "codebuild:BatchGetCommandExecutions": {"action": "codebuild:BatchGetCommandExecutions", "types": ["sandbox"], "resources": [{"type": "sandbox", "fill": {"SandboxId": "sandboxId"}}]}, "codebuild:BatchGetFleets": {"action": "codebuild:BatchGetFleets", "types": ["fleet"], "resources": [{"type": "fleet", "fill": {"FleetName": "names[]"}}]}, "codebuild:BatchGetProjects": {"action": "codebuild:BatchGetProjects", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "names[]"}}]}, @@ -564,16 +564,16 @@ "codebuild:CreateProject": {"action": "codebuild:CreateProject", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "name"}}]}, "codebuild:CreateReportGroup": {"action": "codebuild:CreateReportGroup", "types": ["report-group"], "resources": [{"type": "report-group", "fill": {"ReportGroupName": "name"}}]}, "codebuild:CreateWebhook": {"action": "codebuild:CreateWebhook", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "projectName"}}]}, - "codebuild:DeleteBuildBatch": {"action": "codebuild:DeleteBuildBatch", "types": ["project"], "resources": []}, + "codebuild:DeleteBuildBatch": {"action": "codebuild:DeleteBuildBatch", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, "codebuild:DeleteFleet": {"action": "codebuild:DeleteFleet", "types": ["fleet"], "resources": [{"types": ["fleet"], "arn": "arn"}]}, "codebuild:DeleteProject": {"action": "codebuild:DeleteProject", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "name"}}]}, - "codebuild:DeleteReport": {"action": "codebuild:DeleteReport", "types": ["report-group"], "resources": [{"types": ["report-group"], "arn": "arn"}]}, + "codebuild:DeleteReport": {"action": "codebuild:DeleteReport", "types": ["report-group"], "resources": []}, "codebuild:DeleteReportGroup": {"action": "codebuild:DeleteReportGroup", "types": ["report-group"], "resources": [{"types": ["report-group"], "arn": "arn"}]}, "codebuild:DeleteResourcePolicy": {"action": "codebuild:DeleteResourcePolicy", "types": ["project", "report-group"], "resources": [{"types": ["project", "report-group"], "arn": "resourceArn"}]}, "codebuild:DeleteSourceCredentials": {"action": "codebuild:DeleteSourceCredentials", "types": [], "resources": []}, "codebuild:DeleteWebhook": {"action": "codebuild:DeleteWebhook", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "projectName"}}]}, - "codebuild:DescribeCodeCoverages": {"action": "codebuild:DescribeCodeCoverages", "types": ["report-group"], "resources": [{"types": ["report-group"], "arn": "reportArn"}]}, - "codebuild:DescribeTestCases": {"action": "codebuild:DescribeTestCases", "types": ["report-group"], "resources": [{"types": ["report-group"], "arn": "reportArn"}]}, + "codebuild:DescribeCodeCoverages": {"action": "codebuild:DescribeCodeCoverages", "types": ["report-group"], "resources": []}, + "codebuild:DescribeTestCases": {"action": "codebuild:DescribeTestCases", "types": ["report-group"], "resources": []}, "codebuild:GetReportGroupTrend": {"action": "codebuild:GetReportGroupTrend", "types": ["report-group"], "resources": [{"types": ["report-group"], "arn": "reportGroupArn"}]}, "codebuild:GetResourcePolicy": {"action": "codebuild:GetResourcePolicy", "types": ["project", "report-group"], "resources": [{"types": ["project", "report-group"], "arn": "resourceArn"}]}, "codebuild:ImportSourceCredentials": {"action": "codebuild:ImportSourceCredentials", "types": [], "resources": []}, @@ -595,16 +595,16 @@ "codebuild:ListSharedReportGroups": {"action": "codebuild:ListSharedReportGroups", "types": [], "resources": []}, "codebuild:ListSourceCredentials": {"action": "codebuild:ListSourceCredentials", "types": [], "resources": []}, "codebuild:PutResourcePolicy": {"action": "codebuild:PutResourcePolicy", "types": ["project", "report-group"], "resources": [{"types": ["project", "report-group"], "arn": "resourceArn"}]}, - "codebuild:RetryBuild": {"action": "codebuild:RetryBuild", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "id"}, "before": ":"}]}, - "codebuild:RetryBuildBatch": {"action": "codebuild:RetryBuildBatch", "types": ["project"], "resources": []}, + "codebuild:RetryBuild": {"action": "codebuild:RetryBuild", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, + "codebuild:RetryBuildBatch": {"action": "codebuild:RetryBuildBatch", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, "codebuild:StartBuild": {"action": "codebuild:StartBuild", "types": ["project"], "resources": [{"types": ["project"], "arn": "fleetOverride.fleetArn"}, {"type": "project", "fill": {"ProjectName": "projectName"}}]}, "codebuild:StartBuildBatch": {"action": "codebuild:StartBuildBatch", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "projectName"}}]}, "codebuild:StartCommandExecution": {"action": "codebuild:StartCommandExecution", "types": ["sandbox"], "resources": [{"type": "sandbox", "fill": {"SandboxId": "sandboxId"}}]}, "codebuild:StartSandbox": {"action": "codebuild:StartSandbox", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "projectName"}}]}, "codebuild:StartSandboxConnection": {"action": "codebuild:StartSandboxConnection", "types": ["sandbox"], "resources": [{"type": "sandbox", "fill": {"SandboxId": "sandboxId"}}]}, - "codebuild:StopBuild": {"action": "codebuild:StopBuild", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "id"}, "before": ":"}]}, - "codebuild:StopBuildBatch": {"action": "codebuild:StopBuildBatch", "types": ["project"], "resources": []}, - "codebuild:StopSandbox": {"action": "codebuild:StopSandbox", "types": ["project"], "resources": []}, + "codebuild:StopBuild": {"action": "codebuild:StopBuild", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, + "codebuild:StopBuildBatch": {"action": "codebuild:StopBuildBatch", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, + "codebuild:StopSandbox": {"action": "codebuild:StopSandbox", "types": ["project"], "resources": [{"types": ["project"], "through": "id"}]}, "codebuild:UpdateFleet": {"action": "codebuild:UpdateFleet", "types": ["fleet"], "resources": [{"types": ["fleet"], "arn": "arn"}]}, "codebuild:UpdateProject": {"action": "codebuild:UpdateProject", "types": ["project"], "resources": [{"type": "project", "fill": {"ProjectName": "name"}}]}, "codebuild:UpdateProjectVisibility": {"action": "codebuild:UpdateProjectVisibility", "types": ["project"], "resources": [{"types": ["project"], "arn": "projectArn"}]}, @@ -860,18 +860,18 @@ "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": [], "makes": [{"type": "agent", "fill": {}}]}, - "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:CreateLocationAzureBlob": {"action": "datasync:CreateLocationAzureBlob", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}]}, "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:CreateLocationHdfs": {"action": "datasync:CreateLocationHdfs", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}]}, "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:CreateLocationObjectStorage": {"action": "datasync:CreateLocationObjectStorage", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}]}, + "datasync:CreateLocationS3": {"action": "datasync:CreateLocationS3", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}]}, + "datasync:CreateLocationSmb": {"action": "datasync:CreateLocationSmb", "types": ["agent"], "resources": [{"types": ["agent"], "arn": "AgentArns[]"}]}, + "datasync:CreateTask": {"action": "datasync:CreateTask", "types": ["agent", "location"], "resources": [{"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"}]}, @@ -898,18 +898,18 @@ "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:UpdateLocationAzureBlob": {"action": "datasync:UpdateLocationAzureBlob", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"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:UpdateLocationFsxWindows": {"action": "datasync:UpdateLocationFsxWindows", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationHdfs": {"action": "datasync:UpdateLocationHdfs", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"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:UpdateLocationObjectStorage": {"action": "datasync:UpdateLocationObjectStorage", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationS3": {"action": "datasync:UpdateLocationS3", "types": ["location"], "resources": [{"types": ["location"], "arn": "LocationArn"}]}, + "datasync:UpdateLocationSmb": {"action": "datasync:UpdateLocationSmb", "types": ["agent", "location"], "resources": [{"types": ["agent", "location"], "arn": "AgentArns[]"}, {"types": ["agent", "location"], "arn": "LocationArn"}]}, + "datasync:UpdateTask": {"action": "datasync:UpdateTask", "types": ["task"], "resources": [{"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": {}}]}, "ec2:AcceptAddressTransfer": {"action": "ec2:AcceptAddressTransfer", "types": ["elastic-ip"], "resources": []}, @@ -1790,14 +1790,14 @@ "ecr:UploadLayerPart": {"action": "ecr:UploadLayerPart", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]}, "ecr:ValidatePullThroughCacheRule": {"action": "ecr:ValidatePullThroughCacheRule", "types": [], "resources": []}, "elasticloadbalancing:AddListenerCertificates": {"action": "elasticloadbalancing:AddListenerCertificates", "types": ["listener/app", "listener/net"], "resources": [{"types": ["listener/app", "listener/net"], "arn": "Certificates[].CertificateArn"}, {"types": ["listener/app", "listener/net"], "arn": "ListenerArn"}]}, - "elasticloadbalancing:AddTags": {"action": "elasticloadbalancing:AddTags", "types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "resources": [{"types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "arn": "ResourceArns[]"}, {"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerNames[]"}}]}, + "elasticloadbalancing:AddTags": {"action": "elasticloadbalancing:AddTags", "types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerNames[]"}}, {"types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "arn": "ResourceArns[]"}]}, "elasticloadbalancing:AddTrustStoreRevocations": {"action": "elasticloadbalancing:AddTrustStoreRevocations", "types": ["truststore"], "resources": [{"types": ["truststore"], "arn": "TrustStoreArn"}]}, "elasticloadbalancing:ApplySecurityGroupsToLoadBalancer": {"action": "elasticloadbalancing:ApplySecurityGroupsToLoadBalancer", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:AttachLoadBalancerToSubnets": {"action": "elasticloadbalancing:AttachLoadBalancerToSubnets", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:ConfigureHealthCheck": {"action": "elasticloadbalancing:ConfigureHealthCheck", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:CreateAppCookieStickinessPolicy": {"action": "elasticloadbalancing:CreateAppCookieStickinessPolicy", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:CreateLBCookieStickinessPolicy": {"action": "elasticloadbalancing:CreateLBCookieStickinessPolicy", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, - "elasticloadbalancing:CreateListener": {"action": "elasticloadbalancing:CreateListener", "types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "Certificates[].CertificateArn"}, {"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "DefaultActions[].TargetGroupArn"}, {"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}, {"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "MutualAuthentication.TrustStoreArn"}], "creates": [{"type": "listener/app", "parent": "loadbalancer/app/", "arn": "LoadBalancerArn"}, {"type": "listener/gwy", "parent": "loadbalancer/gwy/", "arn": "LoadBalancerArn"}, {"type": "listener/net", "parent": "loadbalancer/net/", "arn": "LoadBalancerArn"}]}, + "elasticloadbalancing:CreateListener": {"action": "elasticloadbalancing:CreateListener", "types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "Certificates[].CertificateArn"}, {"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "DefaultActions[].TargetGroupArn"}, {"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}], "creates": [{"type": "listener/app", "parent": "loadbalancer/app/", "arn": "LoadBalancerArn"}, {"type": "listener/gwy", "parent": "loadbalancer/gwy/", "arn": "LoadBalancerArn"}, {"type": "listener/net", "parent": "loadbalancer/net/", "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:CreateLoadBalancer": {"action": "elasticloadbalancing:CreateLoadBalancer", "types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}, {"type": "loadbalancer/app/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["application", null]}}, {"type": "loadbalancer/gwy/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["gateway"]}}, {"type": "loadbalancer/net/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["network"]}}]}, "elasticloadbalancing:CreateLoadBalancerListeners": {"action": "elasticloadbalancing:CreateLoadBalancerListeners", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:CreateLoadBalancerPolicy": {"action": "elasticloadbalancing:CreateLoadBalancerPolicy", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, @@ -1805,7 +1805,7 @@ "elasticloadbalancing:CreateTargetGroup": {"action": "elasticloadbalancing:CreateTargetGroup", "types": ["targetgroup"], "resources": [{"type": "targetgroup", "fill": {"TargetGroupName": "Name"}}]}, "elasticloadbalancing:CreateTrustStore": {"action": "elasticloadbalancing:CreateTrustStore", "types": ["truststore"], "resources": [{"type": "truststore", "fill": {"TrustStoreName": "Name"}}]}, "elasticloadbalancing:DeleteListener": {"action": "elasticloadbalancing:DeleteListener", "types": ["listener/app", "listener/gwy", "listener/net"], "resources": [{"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "ListenerArn"}]}, - "elasticloadbalancing:DeleteLoadBalancer": {"action": "elasticloadbalancing:DeleteLoadBalancer", "types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}, {"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, + "elasticloadbalancing:DeleteLoadBalancer": {"action": "elasticloadbalancing:DeleteLoadBalancer", "types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}, {"types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:DeleteLoadBalancerListeners": {"action": "elasticloadbalancing:DeleteLoadBalancerListeners", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:DeleteLoadBalancerPolicy": {"action": "elasticloadbalancing:DeleteLoadBalancerPolicy", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:DeleteRule": {"action": "elasticloadbalancing:DeleteRule", "types": ["listener-rule/app", "listener-rule/net"], "resources": [{"types": ["listener-rule/app", "listener-rule/net"], "arn": "RuleArn"}]}, @@ -1841,9 +1841,9 @@ "elasticloadbalancing:GetTrustStoreRevocationContent": {"action": "elasticloadbalancing:GetTrustStoreRevocationContent", "types": ["truststore"], "resources": [{"types": ["truststore"], "arn": "TrustStoreArn"}]}, "elasticloadbalancing:ModifyCapacityReservation": {"action": "elasticloadbalancing:ModifyCapacityReservation", "types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:ModifyIpPools": {"action": "elasticloadbalancing:ModifyIpPools", "types": ["loadbalancer/app/"], "resources": [{"types": ["loadbalancer/app/"], "arn": "LoadBalancerArn"}]}, - "elasticloadbalancing:ModifyListener": {"action": "elasticloadbalancing:ModifyListener", "types": ["listener/app", "listener/gwy", "listener/net"], "resources": [{"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "Certificates[].CertificateArn"}, {"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "DefaultActions[].TargetGroupArn"}, {"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "ListenerArn"}, {"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "MutualAuthentication.TrustStoreArn"}]}, + "elasticloadbalancing:ModifyListener": {"action": "elasticloadbalancing:ModifyListener", "types": ["listener/app", "listener/gwy", "listener/net"], "resources": [{"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "Certificates[].CertificateArn"}, {"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "DefaultActions[].TargetGroupArn"}, {"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "ListenerArn"}]}, "elasticloadbalancing:ModifyListenerAttributes": {"action": "elasticloadbalancing:ModifyListenerAttributes", "types": ["listener/app", "listener/gwy", "listener/net"], "resources": [{"types": ["listener/app", "listener/gwy", "listener/net"], "arn": "ListenerArn"}]}, - "elasticloadbalancing:ModifyLoadBalancerAttributes": {"action": "elasticloadbalancing:ModifyLoadBalancerAttributes", "types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}, {"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, + "elasticloadbalancing:ModifyLoadBalancerAttributes": {"action": "elasticloadbalancing:ModifyLoadBalancerAttributes", "types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}, {"types": ["loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:ModifyRule": {"action": "elasticloadbalancing:ModifyRule", "types": ["listener-rule/app", "listener-rule/net"], "resources": [{"types": ["listener-rule/app", "listener-rule/net"], "arn": "Actions[].TargetGroupArn"}, {"types": ["listener-rule/app", "listener-rule/net"], "arn": "RuleArn"}]}, "elasticloadbalancing:ModifyTargetGroup": {"action": "elasticloadbalancing:ModifyTargetGroup", "types": ["targetgroup"], "resources": [{"types": ["targetgroup"], "arn": "TargetGroupArn"}]}, "elasticloadbalancing:ModifyTargetGroupAttributes": {"action": "elasticloadbalancing:ModifyTargetGroupAttributes", "types": ["targetgroup"], "resources": [{"types": ["targetgroup"], "arn": "TargetGroupArn"}]}, @@ -1851,7 +1851,7 @@ "elasticloadbalancing:RegisterInstancesWithLoadBalancer": {"action": "elasticloadbalancing:RegisterInstancesWithLoadBalancer", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, "elasticloadbalancing:RegisterTargets": {"action": "elasticloadbalancing:RegisterTargets", "types": ["targetgroup"], "resources": [{"types": ["targetgroup"], "arn": "TargetGroupArn"}]}, "elasticloadbalancing:RemoveListenerCertificates": {"action": "elasticloadbalancing:RemoveListenerCertificates", "types": ["listener/app", "listener/net"], "resources": [{"types": ["listener/app", "listener/net"], "arn": "Certificates[].CertificateArn"}, {"types": ["listener/app", "listener/net"], "arn": "ListenerArn"}]}, - "elasticloadbalancing:RemoveTags": {"action": "elasticloadbalancing:RemoveTags", "types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "resources": [{"types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "arn": "ResourceArns[]"}, {"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerNames[]"}}]}, + "elasticloadbalancing:RemoveTags": {"action": "elasticloadbalancing:RemoveTags", "types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerNames[]"}}, {"types": ["listener-rule/app", "listener-rule/net", "listener/app", "listener/gwy", "listener/net", "loadbalancer", "loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/", "targetgroup", "truststore"], "arn": "ResourceArns[]"}]}, "elasticloadbalancing:RemoveTrustStoreRevocations": {"action": "elasticloadbalancing:RemoveTrustStoreRevocations", "types": ["truststore"], "resources": [{"types": ["truststore"], "arn": "TrustStoreArn"}]}, "elasticloadbalancing:SetIpAddressType": {"action": "elasticloadbalancing:SetIpAddressType", "types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "resources": [{"types": ["loadbalancer/app/", "loadbalancer/gwy/", "loadbalancer/net/"], "arn": "LoadBalancerArn"}]}, "elasticloadbalancing:SetLoadBalancerListenerSSLCertificate": {"action": "elasticloadbalancing:SetLoadBalancerListenerSSLCertificate", "types": ["loadbalancer"], "resources": [{"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}]}, @@ -1862,8 +1862,8 @@ "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:AddJobFlowSteps": {"action": "elasticmapreduce:AddJobFlowSteps", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "ExecutionRoleArn"}, {"type": "cluster", "fill": {"ClusterId": "JobFlowId"}}]}, + "elasticmapreduce:AddTags": {"action": "elasticmapreduce:AddTags", "types": ["cluster", "editor", "notebook-execution", "session", "studio"], "resources": [{"types": ["cluster", "editor", "notebook-execution", "studio"], "through": "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": []}, @@ -1904,7 +1904,7 @@ "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:ModifyInstanceGroups": {"action": "elasticmapreduce:ModifyInstanceGroups", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}, {"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": []}, @@ -1912,14 +1912,14 @@ "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:RemoveTags": {"action": "elasticmapreduce:RemoveTags", "types": ["cluster", "editor", "notebook-execution", "session", "studio"], "resources": [{"types": ["cluster", "editor", "notebook-execution", "studio"], "through": "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:StartNotebookExecution": {"action": "elasticmapreduce:StartNotebookExecution", "types": ["cluster", "editor"], "resources": [{"type": "editor", "fill": {"EditorId": "EditorId"}}]}, + "elasticmapreduce:StartSession": {"action": "elasticmapreduce:StartSession", "types": ["cluster"], "resources": [{"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"}}]}, @@ -1940,13 +1940,13 @@ "emr-serverless:ListSessions": {"action": "emr-serverless:ListSessions", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, "emr-serverless:ListTagsForResource": {"action": "emr-serverless:ListTagsForResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}}, "emr-serverless:StartApplication": {"action": "emr-serverless:StartApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, - "emr-serverless:StartJobRun": {"action": "emr-serverless:StartJobRun", "types": ["application"], "resources": [{"types": ["application"], "arn": "executionIamPolicy.policyArns[]"}, {"types": ["application"], "arn": "executionRoleArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, - "emr-serverless:StartSession": {"action": "emr-serverless:StartSession", "types": ["application"], "resources": [{"types": ["application"], "arn": "executionRoleArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, + "emr-serverless:StartJobRun": {"action": "emr-serverless:StartJobRun", "types": ["application"], "resources": [{"types": ["application"], "arn": "executionIamPolicy.policyArns[]"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, + "emr-serverless:StartSession": {"action": "emr-serverless:StartSession", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, "emr-serverless:StopApplication": {"action": "emr-serverless:StopApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, "emr-serverless:TagResource": {"action": "emr-serverless:TagResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}}, "emr-serverless:TerminateSession": {"action": "emr-serverless:TerminateSession", "types": ["session"], "resources": [{"type": "session", "fill": {"ApplicationId": "applicationId", "SessionId": "sessionId"}}], "located": {"applicationId": "{applicationId}", "sessionId": "{sessionId}"}}, "emr-serverless:UntagResource": {"action": "emr-serverless:UntagResource", "types": ["application", "jobRun", "session"], "resources": [{"types": ["application", "jobRun", "session"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}}, - "emr-serverless:UpdateApplication": {"action": "emr-serverless:UpdateApplication", "types": ["application"], "resources": [{"types": ["application"], "arn": "diskEncryptionConfiguration.encryptionKeyArn"}, {"types": ["application"], "arn": "identityCenterConfiguration.identityCenterInstanceArn"}, {"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, + "emr-serverless:UpdateApplication": {"action": "emr-serverless:UpdateApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationId": "applicationId"}}], "located": {"applicationId": "{applicationId}"}}, "es:AcceptInboundConnection": {"action": "es:AcceptInboundConnection", "types": [], "resources": []}, "es:AcceptInboundCrossClusterSearchConnection": {"action": "es:AcceptInboundCrossClusterSearchConnection", "types": [], "resources": []}, "es:AddDataSource": {"action": "es:AddDataSource", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, @@ -1954,14 +1954,14 @@ "es:AddTags": {"action": "es:AddTags", "types": ["application", "datasource", "domain"], "resources": [{"types": ["application", "datasource", "domain"], "arn": "ARN"}]}, "es:AssociatePackage": {"action": "es:AssociatePackage", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:AssociatePackages": {"action": "es:AssociatePackages", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, - "es:AttachDataSource": {"action": "es:AttachDataSource", "types": ["application"], "resources": [{"types": ["application"], "arn": "dataSourceArn"}, {"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, + "es:AttachDataSource": {"action": "es:AttachDataSource", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, "es:AuthorizeVpcEndpointAccess": {"action": "es:AuthorizeVpcEndpointAccess", "types": [], "resources": []}, "es:CancelDomainConfigChange": {"action": "es:CancelDomainConfigChange", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:CancelElasticsearchServiceSoftwareUpdate": {"action": "es:CancelElasticsearchServiceSoftwareUpdate", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, "es:CancelServiceSoftwareUpdate": {"action": "es:CancelServiceSoftwareUpdate", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, "es:CreateApplication": {"action": "es:CreateApplication", "types": [], "resources": [], "makes": [{"type": "application", "fill": {}}]}, - "es:CreateDomain": {"action": "es:CreateDomain", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "IdentityCenterOptions.IdentityCenterInstanceARN"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}]}, - "es:CreateElasticsearchDomain": {"action": "es:CreateElasticsearchDomain", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}]}, + "es:CreateDomain": {"action": "es:CreateDomain", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "IdentityCenterOptions.IdentityCenterInstanceARN"}, {"types": ["domain"], "arn": "LogPublishingOptions{}.CloudWatchLogsLogGroupArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}]}, + "es:CreateElasticsearchDomain": {"action": "es:CreateElasticsearchDomain", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "LogPublishingOptions{}.CloudWatchLogsLogGroupArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}]}, "es:CreateIndex": {"action": "es:CreateIndex", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:CreateOutboundConnection": {"action": "es:CreateOutboundConnection", "types": ["domain"], "resources": []}, "es:CreateOutboundCrossClusterSearchConnection": {"action": "es:CreateOutboundCrossClusterSearchConnection", "types": ["domain"], "resources": []}, @@ -1981,7 +1981,7 @@ "es:DeletePackage": {"action": "es:DeletePackage", "types": [], "resources": []}, "es:DeleteVpcEndpoint": {"action": "es:DeleteVpcEndpoint", "types": [], "resources": []}, "es:DeregisterCapability": {"action": "es:DeregisterCapability", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "applicationId"}}], "located": {"applicationId": "{ApplicationId}"}}, - "es:DescribeDataSourceAttachment": {"action": "es:DescribeDataSourceAttachment", "types": ["application"], "resources": [{"types": ["application"], "arn": "dataSourceArn"}, {"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, + "es:DescribeDataSourceAttachment": {"action": "es:DescribeDataSourceAttachment", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, "es:DescribeDomain": {"action": "es:DescribeDomain", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:DescribeDomainAutoTunes": {"action": "es:DescribeDomainAutoTunes", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:DescribeDomainChangeProgress": {"action": "es:DescribeDomainChangeProgress", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, @@ -2006,7 +2006,7 @@ "es:DescribeReservedInstanceOfferings": {"action": "es:DescribeReservedInstanceOfferings", "types": [], "resources": []}, "es:DescribeReservedInstances": {"action": "es:DescribeReservedInstances", "types": [], "resources": []}, "es:DescribeVpcEndpoints": {"action": "es:DescribeVpcEndpoints", "types": [], "resources": []}, - "es:DetachDataSource": {"action": "es:DetachDataSource", "types": ["application"], "resources": [{"types": ["application"], "arn": "dataSourceArn"}, {"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, + "es:DetachDataSource": {"action": "es:DetachDataSource", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, "es:DissociatePackage": {"action": "es:DissociatePackage", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:DissociatePackages": {"action": "es:DissociatePackages", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, "es:GetApplication": {"action": "es:GetApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, @@ -2055,12 +2055,12 @@ "es:StartElasticsearchServiceSoftwareUpdate": {"action": "es:StartElasticsearchServiceSoftwareUpdate", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, "es:StartMigration": {"action": "es:StartMigration", "types": ["application"], "resources": [{"type": "application", "fill": {"AppId": "applicationId"}}]}, "es:StartServiceSoftwareUpdate": {"action": "es:StartServiceSoftwareUpdate", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}]}, - "es:UpdateApplication": {"action": "es:UpdateApplication", "types": ["application"], "resources": [{"types": ["application"], "arn": "dataSources[].dataSourceArn"}, {"types": ["application"], "arn": "dataSources[].iamRoleForDataSourceArn"}, {"types": ["application"], "arn": "iamIdentityCenterOptions.iamIdentityCenterInstanceArn"}, {"types": ["application"], "arn": "iamIdentityCenterOptions.iamRoleForIdentityCenterApplicationArn"}, {"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, + "es:UpdateApplication": {"action": "es:UpdateApplication", "types": ["application"], "resources": [{"types": ["application"], "arn": "dataSources[].dataSourceArn"}, {"types": ["application"], "arn": "dataSources[].iamRoleForDataSourceArn"}, {"type": "application", "fill": {"AppId": "id"}}], "located": {"id": "{id}"}}, "es:UpdateClone": {"action": "es:UpdateClone", "types": ["domain"], "resources": []}, "es:UpdateDataSource": {"action": "es:UpdateDataSource", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:UpdateDirectQueryDataSource": {"action": "es:UpdateDirectQueryDataSource", "types": ["datasource"], "resources": [{"types": ["datasource"], "arn": "OpenSearchArns[]"}, {"type": "datasource", "fill": {"DataSourceName": "DataSourceName"}}], "located": {"DataSourceName": "{DataSourceName}"}}, - "es:UpdateDomainConfig": {"action": "es:UpdateDomainConfig", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "IdentityCenterOptions.IdentityCenterInstanceARN"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, - "es:UpdateElasticsearchDomainConfig": {"action": "es:UpdateElasticsearchDomainConfig", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, + "es:UpdateDomainConfig": {"action": "es:UpdateDomainConfig", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "IdentityCenterOptions.IdentityCenterInstanceARN"}, {"types": ["domain"], "arn": "LogPublishingOptions{}.CloudWatchLogsLogGroupArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, + "es:UpdateElasticsearchDomainConfig": {"action": "es:UpdateElasticsearchDomainConfig", "types": ["domain"], "resources": [{"types": ["domain"], "arn": "CognitoOptions.RoleArn"}, {"types": ["domain"], "arn": "DomainEndpointOptions.CustomEndpointCertificateArn"}, {"types": ["domain"], "arn": "LogPublishingOptions{}.CloudWatchLogsLogGroupArn"}, {"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:UpdateIndex": {"action": "es:UpdateIndex", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainName": "DomainName"}}], "located": {"DomainName": "{DomainName}"}}, "es:UpdatePackage": {"action": "es:UpdatePackage", "types": [], "resources": []}, "es:UpdatePackageScope": {"action": "es:UpdatePackageScope", "types": [], "resources": []}, @@ -2073,11 +2073,11 @@ "events:CreateApiDestination": {"action": "events:CreateApiDestination", "types": ["api-destination", "connection"], "resources": [{"types": ["api-destination", "connection"], "arn": "ConnectionArn"}, {"type": "api-destination", "fill": {"ApiDestinationName": "Name"}, "made": true}]}, "events:CreateArchive": {"action": "events:CreateArchive", "types": ["alias", "archive", "event-bus", "key"], "resources": [{"types": ["alias", "archive", "event-bus", "key"], "arn": "EventSourceArn"}, {"type": "archive", "fill": {"ArchiveName": "ArchiveName"}, "made": true}]}, "events:CreateConnection": {"action": "events:CreateConnection", "types": ["connection"], "resources": [{"type": "connection", "fill": {"ConnectionName": "Name"}}]}, - "events:CreateEndpoint": {"action": "events:CreateEndpoint", "types": ["endpoint"], "resources": [{"types": ["endpoint"], "arn": "EventBuses[].EventBusArn"}, {"types": ["endpoint"], "arn": "RoleArn"}, {"type": "endpoint", "fill": {"EndpointName": "Name"}}]}, - "events:CreateEventBus": {"action": "events:CreateEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", "endpoint": "events"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events", "made": true}, {"type": "event-busv2", "fill": {"EventBusName": "Name"}, "endpoint": "eventsv2"}]}, + "events:CreateEndpoint": {"action": "events:CreateEndpoint", "types": ["endpoint"], "resources": [{"types": ["endpoint"], "arn": "EventBuses[].EventBusArn"}, {"type": "endpoint", "fill": {"EndpointName": "Name"}}]}, + "events:CreateEventBus": {"action": "events:CreateEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"type": "event-busv2", "fill": {"EventBusName": "Name"}, "endpoint": "eventsv2"}, {"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", "endpoint": "events"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events", "made": true}]}, "events:CreateEventSource": {"action": "events:CreateEventSource", "types": ["event-busv2", "event-sourcev2"], "resources": [{"types": ["event-busv2", "event-sourcev2"], "arn": "EventBusArn"}]}, "events:CreatePartnerEventSource": {"action": "events:CreatePartnerEventSource", "types": ["event-source"], "resources": [{"type": "event-source", "fill": {"EventSourceName": "Name"}}]}, - "events:CreateSubscriber": {"action": "events:CreateSubscriber", "types": ["event-busv2", "subscriber"], "resources": [{"types": ["event-busv2", "subscriber"], "arn": "EventBusArn"}, {"types": ["event-busv2", "subscriber"], "arn": "InvokeConfiguration.RoleArn"}, {"types": ["event-busv2", "subscriber"], "arn": "InvokeConfiguration.TargetArn"}, {"types": ["event-busv2", "subscriber"], "arn": "OnFailureConfiguration.Arn"}, {"type": "subscriber", "fill": {"SubscriberName": "Name"}, "made": true}]}, + "events:CreateSubscriber": {"action": "events:CreateSubscriber", "types": ["event-busv2", "subscriber"], "resources": [{"types": ["event-busv2", "subscriber"], "arn": "EventBusArn"}, {"type": "subscriber", "fill": {"SubscriberName": "Name"}, "made": true}]}, "events:DeactivateEventSource": {"action": "events:DeactivateEventSource", "types": ["event-source"], "resources": [{"type": "event-source", "fill": {"EventSourceName": "Name"}}]}, "events:DeauthorizeConnection": {"action": "events:DeauthorizeConnection", "types": ["connection"], "resources": [{"type": "connection", "fill": {"ConnectionName": "Name"}}]}, "events:DeleteApiDestination": {"action": "events:DeleteApiDestination", "types": ["api-destination"], "resources": [{"type": "api-destination", "fill": {"ApiDestinationName": "Name"}}]}, @@ -2088,20 +2088,20 @@ "events:DeleteEventSource": {"action": "events:DeleteEventSource", "types": ["event-sourcev2"], "resources": [{"types": ["event-sourcev2"], "arn": "EventSourceArn"}]}, "events:DeletePartnerEventSource": {"action": "events:DeletePartnerEventSource", "types": ["event-source"], "resources": [{"type": "event-source", "fill": {"EventSourceName": "Name"}}]}, "events:DeleteResourcePolicy": {"action": "events:DeleteResourcePolicy", "types": ["event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "ResourceArn"}]}, - "events:DeleteRule": {"action": "events:DeleteRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:DeleteRule": {"action": "events:DeleteRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, "events:DeleteSubscriber": {"action": "events:DeleteSubscriber", "types": ["subscriber"], "resources": [{"types": ["subscriber"], "arn": "SubscriberArn"}]}, "events:DescribeApiDestination": {"action": "events:DescribeApiDestination", "types": ["api-destination", "connection"], "resources": [{"type": "api-destination", "fill": {"ApiDestinationName": "Name"}}]}, "events:DescribeArchive": {"action": "events:DescribeArchive", "types": ["archive"], "resources": [{"type": "archive", "fill": {"ArchiveName": "ArchiveName"}}]}, "events:DescribeConnection": {"action": "events:DescribeConnection", "types": ["connection"], "resources": [{"type": "connection", "fill": {"ConnectionName": "Name"}}]}, "events:DescribeEndpoint": {"action": "events:DescribeEndpoint", "types": ["endpoint"], "resources": [{"type": "endpoint", "fill": {"EndpointName": "Name"}}]}, - "events:DescribeEventBus": {"action": "events:DescribeEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "absent": {"Name": "default"}, "endpoint": "events", "arnOf": {"Name": "event-bus"}}]}, + "events:DescribeEventBus": {"action": "events:DescribeEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "arnOf": {"Name": "event-bus"}, "endpoint": "events"}]}, "events:DescribeEventSource": {"action": "events:DescribeEventSource", "types": ["event-source", "event-sourcev2"], "resources": [{"types": ["event-sourcev2"], "arn": "EventSourceArn", "endpoint": "eventsv2"}, {"type": "event-source", "fill": {"EventSourceName": "Name"}, "endpoint": "events"}]}, "events:DescribePartnerEventSource": {"action": "events:DescribePartnerEventSource", "types": ["event-source"], "resources": [{"type": "event-source", "fill": {"EventSourceName": "Name"}}]}, "events:DescribeReplay": {"action": "events:DescribeReplay", "types": ["replay"], "resources": [{"type": "replay", "fill": {"ReplayName": "ReplayName"}}]}, - "events:DescribeRule": {"action": "events:DescribeRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:DescribeRule": {"action": "events:DescribeRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, "events:DescribeSubscriber": {"action": "events:DescribeSubscriber", "types": ["subscriber"], "resources": [{"types": ["subscriber"], "arn": "SubscriberArn"}]}, - "events:DisableRule": {"action": "events:DisableRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, - "events:EnableRule": {"action": "events:EnableRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:DisableRule": {"action": "events:DisableRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:EnableRule": {"action": "events:EnableRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, "events:GetResourcePolicy": {"action": "events:GetResourcePolicy", "types": ["event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "ResourceArn"}]}, "events:ListApiDestinations": {"action": "events:ListApiDestinations", "types": [], "resources": []}, "events:ListArchives": {"action": "events:ListArchives", "types": [], "resources": []}, @@ -2116,41 +2116,41 @@ "events:ListRuleNamesByTarget": {"action": "events:ListRuleNamesByTarget", "types": [], "resources": []}, "events:ListRules": {"action": "events:ListRules", "types": [], "resources": []}, "events:ListSubscribers": {"action": "events:ListSubscribers", "types": [], "resources": []}, - "events:ListTagsForResource": {"action": "events:ListTagsForResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceArn"}]}, - "events:ListTargetsByRule": {"action": "events:ListTargetsByRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, - "events:PutEvents": {"action": "events:PutEvents", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Entries[].EventBusName"}, "absent": {"Entries[].EventBusName": "default"}, "endpoint": "events", "arnOf": {"Entries[].EventBusName": "event-bus"}}]}, + "events:ListTagsForResource": {"action": "events:ListTagsForResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-busv2", "event-sourcev2", "subscriber"], "arn": "ResourceArn", "endpoint": "eventsv2"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN", "endpoint": "events"}]}, + "events:ListTargetsByRule": {"action": "events:ListTargetsByRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:PutEvents": {"action": "events:PutEvents", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Entries[].EventBusName"}, "arnOf": {"Entries[].EventBusName": "event-bus"}, "endpoint": "events"}]}, "events:PutPartnerEvents": {"action": "events:PutPartnerEvents", "types": [], "resources": []}, "events:PutPermission": {"action": "events:PutPermission", "types": [], "resources": []}, "events:PutRawEvents": {"action": "events:PutRawEvents", "types": ["event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn"}]}, "events:PutResourcePolicy": {"action": "events:PutResourcePolicy", "types": ["event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "ResourceArn"}]}, - "events:PutRule": {"action": "events:PutRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, - "events:PutTargets": {"action": "events:PutTargets", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:PutRule": {"action": "events:PutRule", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "arn": "RoleArn"}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:PutTargets": {"action": "events:PutTargets", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "arn": "Targets[].Arn"}, {"types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "arn": "Targets[].RoleArn"}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, "events:RemovePermission": {"action": "events:RemovePermission", "types": [], "resources": []}, - "events:RemoveTargets": {"action": "events:RemoveTargets", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "when": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}]}, + "events:RemoveTargets": {"action": "events:RemoveTargets", "types": ["rule-on-custom-event-bus", "rule-on-default-event-bus"], "resources": [{"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Rule"}, "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Rule"}, "whenDefault": {"EventBusName": "event-bus"}, "arnOf": {"EventBusName": "event-bus"}}]}, "events:RevokeResource": {"action": "events:RevokeResource", "types": ["event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "Arn"}]}, "events:StartReplay": {"action": "events:StartReplay", "types": ["archive", "event-bus", "replay"], "resources": [{"types": ["archive", "event-bus", "replay"], "arn": "Destination.Arn"}, {"types": ["archive", "event-bus", "replay"], "arn": "Destination.FilterArns[]"}, {"types": ["archive", "event-bus", "replay"], "arn": "EventSourceArn"}, {"type": "replay", "fill": {"ReplayName": "ReplayName"}, "made": true}]}, - "events:TagResource": {"action": "events:TagResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceArn"}]}, + "events:TagResource": {"action": "events:TagResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-busv2", "event-sourcev2", "subscriber"], "arn": "ResourceArn", "endpoint": "eventsv2"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN", "endpoint": "events"}]}, "events:TestEventPattern": {"action": "events:TestEventPattern", "types": [], "resources": []}, - "events:UntagResource": {"action": "events:UntagResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceArn"}]}, - "events:UpdateApiDestination": {"action": "events:UpdateApiDestination", "types": ["api-destination"], "resources": [{"types": ["api-destination"], "arn": "ConnectionArn"}, {"type": "api-destination", "fill": {"ApiDestinationName": "Name"}}]}, + "events:UntagResource": {"action": "events:UntagResource", "types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "resources": [{"types": ["event-busv2", "event-sourcev2", "subscriber"], "arn": "ResourceArn", "endpoint": "eventsv2"}, {"types": ["event-bus", "event-busv2", "event-sourcev2", "rule-on-custom-event-bus", "rule-on-default-event-bus", "subscriber"], "arn": "ResourceARN", "endpoint": "events"}]}, + "events:UpdateApiDestination": {"action": "events:UpdateApiDestination", "types": ["api-destination"], "resources": [{"type": "api-destination", "fill": {"ApiDestinationName": "Name"}}]}, "events:UpdateArchive": {"action": "events:UpdateArchive", "types": ["alias", "archive", "key"], "resources": [{"type": "archive", "fill": {"ArchiveName": "ArchiveName"}}]}, "events:UpdateConnection": {"action": "events:UpdateConnection", "types": ["connection"], "resources": [{"type": "connection", "fill": {"ConnectionName": "Name"}}]}, - "events:UpdateEndpoint": {"action": "events:UpdateEndpoint", "types": ["endpoint"], "resources": [{"types": ["endpoint"], "arn": "EventBuses[].EventBusArn"}, {"types": ["endpoint"], "arn": "RoleArn"}, {"type": "endpoint", "fill": {"EndpointName": "Name"}}]}, - "events:UpdateEventBus": {"action": "events:UpdateEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", "endpoint": "events"}, {"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events"}]}, + "events:UpdateEndpoint": {"action": "events:UpdateEndpoint", "types": ["endpoint"], "resources": [{"types": ["endpoint"], "arn": "EventBuses[].EventBusArn"}, {"type": "endpoint", "fill": {"EndpointName": "Name"}}]}, + "events:UpdateEventBus": {"action": "events:UpdateEventBus", "types": ["event-bus", "event-busv2"], "resources": [{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", "endpoint": "events"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events"}]}, "events:UpdateEventSource": {"action": "events:UpdateEventSource", "types": ["event-busv2", "event-sourcev2"], "resources": [{"types": ["event-busv2", "event-sourcev2"], "arn": "EventSourceArn"}]}, - "events:UpdateSubscriber": {"action": "events:UpdateSubscriber", "types": ["event-busv2", "subscriber"], "resources": [{"types": ["event-busv2", "subscriber"], "arn": "InvokeConfiguration.RoleArn"}, {"types": ["event-busv2", "subscriber"], "arn": "OnFailureConfiguration.Arn"}, {"types": ["event-busv2", "subscriber"], "arn": "SubscriberArn"}]}, - "firehose:CreateDeliveryStream": {"action": "firehose:CreateDeliveryStream", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "AmazonOpenSearchServerlessDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationConfiguration.DomainARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "DeliveryStreamEncryptionConfigurationInput.KeyARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationConfiguration.DomainARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationConfiguration.BucketARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "HttpEndpointDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "IcebergDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "KinesisStreamSourceConfiguration.KinesisStreamARN"}, {"types": ["deliverystream"], "arn": "KinesisStreamSourceConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "MSKSourceConfiguration.MSKClusterARN"}, {"types": ["deliverystream"], "arn": "RedshiftDestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "S3DestinationConfiguration.BucketARN"}, {"types": ["deliverystream"], "arn": "S3DestinationConfiguration.RoleARN"}, {"types": ["deliverystream"], "arn": "SnowflakeDestinationConfiguration.RoleARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, + "events:UpdateSubscriber": {"action": "events:UpdateSubscriber", "types": ["event-busv2", "subscriber"], "resources": [{"types": ["event-busv2", "subscriber"], "arn": "SubscriberArn"}]}, + "firehose:CreateDeliveryStream": {"action": "firehose:CreateDeliveryStream", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "MSKSourceConfiguration.MSKClusterARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:DeleteDeliveryStream": {"action": "firehose:DeleteDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:DescribeDeliveryStream": {"action": "firehose:DescribeDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:ListDeliveryStreams": {"action": "firehose:ListDeliveryStreams", "types": [], "resources": []}, "firehose:ListTagsForDeliveryStream": {"action": "firehose:ListTagsForDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:PutRecord": {"action": "firehose:PutRecord", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:PutRecordBatch": {"action": "firehose:PutRecordBatch", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, - "firehose:StartDeliveryStreamEncryption": {"action": "firehose:StartDeliveryStreamEncryption", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "DeliveryStreamEncryptionConfigurationInput.KeyARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, + "firehose:StartDeliveryStreamEncryption": {"action": "firehose:StartDeliveryStreamEncryption", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:StopDeliveryStreamEncryption": {"action": "firehose:StopDeliveryStreamEncryption", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:TagDeliveryStream": {"action": "firehose:TagDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "firehose:UntagDeliveryStream": {"action": "firehose:UntagDeliveryStream", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, - "firehose:UpdateDestination": {"action": "firehose:UpdateDestination", "types": ["deliverystream"], "resources": [{"types": ["deliverystream"], "arn": "AmazonOpenSearchServerlessDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationUpdate.DomainARN"}, {"types": ["deliverystream"], "arn": "AmazonopensearchserviceDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationUpdate.DomainARN"}, {"types": ["deliverystream"], "arn": "ElasticsearchDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationUpdate.BucketARN"}, {"types": ["deliverystream"], "arn": "ExtendedS3DestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "HttpEndpointDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "IcebergDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "RedshiftDestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "S3DestinationUpdate.BucketARN"}, {"types": ["deliverystream"], "arn": "S3DestinationUpdate.RoleARN"}, {"types": ["deliverystream"], "arn": "SnowflakeDestinationUpdate.RoleARN"}, {"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, + "firehose:UpdateDestination": {"action": "firehose:UpdateDestination", "types": ["deliverystream"], "resources": [{"type": "deliverystream", "fill": {"DeliveryStreamName": "DeliveryStreamName"}}]}, "fis:CreateExperimentTemplate": {"action": "fis:CreateExperimentTemplate", "types": ["action", "experiment-template"], "resources": [{"types": ["action", "experiment-template"], "arn": "roleArn"}, {"type": "experiment-template", "fill": {}, "made": true}, {"type": "action", "fill": {"Id": "actions{}.actionId"}}]}, "fis:CreateTargetAccountConfiguration": {"action": "fis:CreateTargetAccountConfiguration", "types": ["experiment-template"], "resources": [{"types": ["experiment-template"], "arn": "roleArn"}, {"type": "experiment-template", "fill": {"Id": "experimentTemplateId"}}], "located": {"experimentTemplateId": "{id}"}}, "fis:DeleteExperimentTemplate": {"action": "fis:DeleteExperimentTemplate", "types": ["experiment-template"], "resources": [{"type": "experiment-template", "fill": {"Id": "id"}}], "located": {"id": "{id}"}}, @@ -2348,9 +2348,9 @@ "inspector2:CancelFindingsReport": {"action": "inspector2:CancelFindingsReport", "types": [], "resources": []}, "inspector2:CancelSbomExport": {"action": "inspector2:CancelSbomExport", "types": [], "resources": []}, "inspector2:CreateCisScanConfiguration": {"action": "inspector2:CreateCisScanConfiguration", "types": ["CIS Scan Configuration"], "resources": [{"type": "CIS Scan Configuration", "fill": {}}]}, - "inspector2:CreateCodeSecurityIntegration": {"action": "inspector2:CreateCodeSecurityIntegration", "types": ["Code Security Integration"], "resources": [{"type": "Code Security Integration", "fill": {}}]}, + "inspector2:CreateCodeSecurityIntegration": {"action": "inspector2:CreateCodeSecurityIntegration", "types": ["Code Security Integration"], "resources": [{"type": "Code Security Integration", "fill": {}, "find": ["name"]}]}, "inspector2:CreateCodeSecurityScanConfiguration": {"action": "inspector2:CreateCodeSecurityScanConfiguration", "types": ["Code Security Scan Configuration"], "resources": [{"type": "Code Security Scan Configuration", "fill": {}}]}, - "inspector2:CreateConnector": {"action": "inspector2:CreateConnector", "types": ["Connector"], "resources": [{"type": "Connector", "fill": {}}]}, + "inspector2:CreateConnector": {"action": "inspector2:CreateConnector", "types": ["Connector"], "resources": [{"type": "Connector", "fill": {}, "find": ["name"]}]}, "inspector2:CreateFilter": {"action": "inspector2:CreateFilter", "types": ["Filter"], "resources": [{"type": "Filter", "fill": {}}]}, "inspector2:CreateFindingsReport": {"action": "inspector2:CreateFindingsReport", "types": [], "resources": []}, "inspector2:CreateSbomExport": {"action": "inspector2:CreateSbomExport", "types": [], "resources": []}, @@ -2462,19 +2462,19 @@ "kinesisanalytics:UpdateApplication": {"action": "kinesisanalytics:UpdateApplication", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]}, "kinesisanalytics:UpdateApplicationMaintenanceConfiguration": {"action": "kinesisanalytics:UpdateApplicationMaintenanceConfiguration", "types": ["application"], "resources": [{"type": "application", "fill": {"ApplicationName": "ApplicationName"}}]}, "logs:CreateDelivery": {"action": "logs:CreateDelivery", "types": ["delivery", "delivery-destination", "delivery-source"], "resources": [{"types": ["delivery", "delivery-destination", "delivery-source"], "arn": "deliveryDestinationArn"}, {"type": "delivery", "fill": {}, "made": true}, {"type": "delivery-source", "fill": {"DeliverySourceName": "deliverySourceName"}}]}, - "logs:DeleteDelivery": {"action": "logs:DeleteDelivery", "types": ["delivery"], "resources": [{"type": "delivery", "fill": {"DeliveryName": "id"}}]}, + "logs:DeleteDelivery": {"action": "logs:DeleteDelivery", "types": ["delivery"], "resources": [{"type": "delivery", "fill": {}, "find": ["id"]}]}, "logs:DeleteDeliveryDestination": {"action": "logs:DeleteDeliveryDestination", "types": ["delivery-destination"], "resources": [{"type": "delivery-destination", "fill": {"DeliveryDestinationName": "name"}}]}, - "logs:DeleteDeliverySource": {"action": "logs:DeleteDeliverySource", "types": ["delivery-destination"], "resources": [{"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}]}, + "logs:DeleteDeliverySource": {"action": "logs:DeleteDeliverySource", "types": ["delivery-destination"], "resources": [{"types": ["delivery-destination"], "through": "name"}]}, "logs:DescribeDeliveries": {"action": "logs:DescribeDeliveries", "types": [], "resources": []}, "logs:DescribeDeliveryDestinations": {"action": "logs:DescribeDeliveryDestinations", "types": [], "resources": []}, "logs:DescribeDeliverySources": {"action": "logs:DescribeDeliverySources", "types": [], "resources": []}, - "logs:GetDelivery": {"action": "logs:GetDelivery", "types": ["delivery"], "resources": [{"type": "delivery", "fill": {"DeliveryName": "id"}}]}, + "logs:GetDelivery": {"action": "logs:GetDelivery", "types": ["delivery"], "resources": [{"type": "delivery", "fill": {}, "find": ["id"]}]}, "logs:GetDeliveryDestination": {"action": "logs:GetDeliveryDestination", "types": ["delivery-destination"], "resources": [{"type": "delivery-destination", "fill": {"DeliveryDestinationName": "name"}}]}, "logs:GetDeliverySource": {"action": "logs:GetDeliverySource", "types": ["delivery-source"], "resources": [{"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}]}, - "logs:PutDeliveryDestination": {"action": "logs:PutDeliveryDestination", "types": ["delivery-destination"], "resources": [{"type": "delivery-destination", "fill": {"DeliveryDestinationName": "name"}}]}, - "logs:PutDeliverySource": {"action": "logs:PutDeliverySource", "types": ["delivery-source"], "resources": [{"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}]}, + "logs:PutDeliveryDestination": {"action": "logs:PutDeliveryDestination", "types": ["delivery-destination"], "resources": [{"types": ["delivery-destination"], "arn": "deliveryDestinationConfiguration.destinationResourceArn"}, {"types": ["delivery-destination"], "arn": "roleArn"}, {"type": "delivery-destination", "fill": {"DeliveryDestinationName": "name"}}]}, + "logs:PutDeliverySource": {"action": "logs:PutDeliverySource", "types": ["delivery-source"], "resources": [{"types": ["delivery-source"], "arn": "resourceArn"}, {"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}]}, "logs:PutDestination": {"action": "logs:PutDestination", "types": ["destination"], "resources": [{"types": ["destination"], "arn": "roleArn"}, {"types": ["destination"], "arn": "targetArn"}, {"type": "destination", "fill": {"DestinationName": "destinationName"}}]}, - "logs:UpdateDeliveryConfiguration": {"action": "logs:UpdateDeliveryConfiguration", "types": ["delivery", "delivery-destination", "delivery-source"], "resources": [{"type": "delivery", "fill": {"DeliveryName": "id"}}]}, + "logs:UpdateDeliveryConfiguration": {"action": "logs:UpdateDeliveryConfiguration", "types": ["delivery", "delivery-destination", "delivery-source"], "resources": [{"type": "delivery", "fill": {}, "find": ["id"]}]}, "macie2:AcceptInvitation": {"action": "macie2:AcceptInvitation", "types": [], "resources": []}, "macie2:BatchGetCustomDataIdentifiers": {"action": "macie2:BatchGetCustomDataIdentifiers", "types": ["CustomDataIdentifier"], "resources": [{"type": "CustomDataIdentifier", "fill": {"ResourceId": "ids[]"}}]}, "macie2:BatchUpdateAutomatedDiscoveryAccounts": {"action": "macie2:BatchUpdateAutomatedDiscoveryAccounts", "types": [], "resources": []}, @@ -2483,7 +2483,7 @@ "macie2:CreateCustomDataIdentifier": {"action": "macie2:CreateCustomDataIdentifier", "types": ["CustomDataIdentifier"], "resources": [{"type": "CustomDataIdentifier", "fill": {}}]}, "macie2:CreateFindingsFilter": {"action": "macie2:CreateFindingsFilter", "types": ["FindingsFilter"], "resources": [{"type": "FindingsFilter", "fill": {}}]}, "macie2:CreateInvitations": {"action": "macie2:CreateInvitations", "types": [], "resources": []}, - "macie2:CreateMember": {"action": "macie2:CreateMember", "types": ["Member"], "resources": [{"type": "Member", "fill": {"ResourceId": "account.accountId"}}]}, + "macie2:CreateMember": {"action": "macie2:CreateMember", "types": ["Member"], "resources": [{"type": "Member", "fill": {}}]}, "macie2:CreateSampleFindings": {"action": "macie2:CreateSampleFindings", "types": [], "resources": []}, "macie2:DeclineInvitations": {"action": "macie2:DeclineInvitations", "types": [], "resources": []}, "macie2:DeleteAllowList": {"action": "macie2:DeleteAllowList", "types": ["AllowList"], "resources": [{"type": "AllowList", "fill": {"ResourceId": "id"}}], "located": {"id": "{id}"}}, @@ -2492,7 +2492,7 @@ "macie2:DeleteInvitations": {"action": "macie2:DeleteInvitations", "types": [], "resources": []}, "macie2:DeleteMember": {"action": "macie2:DeleteMember", "types": ["Member"], "resources": [{"type": "Member", "fill": {"ResourceId": "id"}}], "located": {"id": "{id}"}}, "macie2:DescribeBuckets": {"action": "macie2:DescribeBuckets", "types": [], "resources": []}, - "macie2:DescribeClassificationJob": {"action": "macie2:DescribeClassificationJob", "types": ["ClassificationJob"], "resources": []}, + "macie2:DescribeClassificationJob": {"action": "macie2:DescribeClassificationJob", "types": ["ClassificationJob"], "resources": [{"type": "ClassificationJob", "fill": {"ResourceId": "jobId"}}], "located": {"jobId": "{jobId}"}}, "macie2:DescribeOrganizationConfiguration": {"action": "macie2:DescribeOrganizationConfiguration", "types": [], "resources": []}, "macie2:DisableMacie": {"action": "macie2:DisableMacie", "types": [], "resources": []}, "macie2:DisableOrganizationAdminAccount": {"action": "macie2:DisableOrganizationAdminAccount", "types": [], "resources": []}, @@ -2546,7 +2546,7 @@ "macie2:UntagResource": {"action": "macie2:UntagResource", "types": ["AllowList", "ClassificationJob", "CustomDataIdentifier", "FindingsFilter", "Member"], "resources": [{"types": ["AllowList", "ClassificationJob", "CustomDataIdentifier", "FindingsFilter", "Member"], "arn": "resourceArn"}], "located": {"resourceArn": "{resourceArn}"}}, "macie2:UpdateAllowList": {"action": "macie2:UpdateAllowList", "types": ["AllowList"], "resources": [{"type": "AllowList", "fill": {"ResourceId": "id"}}], "located": {"id": "{id}"}}, "macie2:UpdateAutomatedDiscoveryConfiguration": {"action": "macie2:UpdateAutomatedDiscoveryConfiguration", "types": [], "resources": []}, - "macie2:UpdateClassificationJob": {"action": "macie2:UpdateClassificationJob", "types": ["ClassificationJob"], "resources": []}, + "macie2:UpdateClassificationJob": {"action": "macie2:UpdateClassificationJob", "types": ["ClassificationJob"], "resources": [{"type": "ClassificationJob", "fill": {"ResourceId": "jobId"}}], "located": {"jobId": "{jobId}"}}, "macie2:UpdateClassificationScope": {"action": "macie2:UpdateClassificationScope", "types": [], "resources": []}, "macie2:UpdateFindingsFilter": {"action": "macie2:UpdateFindingsFilter", "types": ["FindingsFilter"], "resources": [{"type": "FindingsFilter", "fill": {"ResourceId": "id"}}], "located": {"id": "{id}"}}, "macie2:UpdateMacieSession": {"action": "macie2:UpdateMacieSession", "types": [], "resources": []}, @@ -2556,28 +2556,28 @@ "macie2:UpdateResourceProfileDetections": {"action": "macie2:UpdateResourceProfileDetections", "types": [], "resources": []}, "macie2:UpdateRevealConfiguration": {"action": "macie2:UpdateRevealConfiguration", "types": [], "resources": []}, "macie2:UpdateSensitivityInspectionTemplate": {"action": "macie2:UpdateSensitivityInspectionTemplate", "types": [], "resources": []}, - "oam:CreateLink": {"action": "oam:CreateLink", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, + "oam:CreateLink": {"action": "oam:CreateLink", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "SinkIdentifier"}, {"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, "oam:CreateSink": {"action": "oam:CreateSink", "types": [], "resources": [], "makes": [{"type": "Sink", "fill": {}}]}, - "oam:DeleteLink": {"action": "oam:DeleteLink", "types": ["Link"], "resources": [{"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, - "oam:DeleteSink": {"action": "oam:DeleteSink", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "Identifier"}}]}, - "oam:GetLink": {"action": "oam:GetLink", "types": ["Link"], "resources": [{"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, - "oam:GetSink": {"action": "oam:GetSink", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "Identifier"}}]}, - "oam:GetSinkPolicy": {"action": "oam:GetSinkPolicy", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, - "oam:ListAttachedLinks": {"action": "oam:ListAttachedLinks", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, + "oam:DeleteLink": {"action": "oam:DeleteLink", "types": ["Link"], "resources": [{"types": ["Link"], "arn": "Identifier"}, {"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, + "oam:DeleteSink": {"action": "oam:DeleteSink", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "Identifier"}, {"type": "Sink", "fill": {"ResourceId": "Identifier"}}]}, + "oam:GetLink": {"action": "oam:GetLink", "types": ["Link"], "resources": [{"types": ["Link"], "arn": "Identifier"}, {"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, + "oam:GetSink": {"action": "oam:GetSink", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "Identifier"}, {"type": "Sink", "fill": {"ResourceId": "Identifier"}}]}, + "oam:GetSinkPolicy": {"action": "oam:GetSinkPolicy", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "SinkIdentifier"}, {"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, + "oam:ListAttachedLinks": {"action": "oam:ListAttachedLinks", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "SinkIdentifier"}, {"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, "oam:ListLinks": {"action": "oam:ListLinks", "types": [], "resources": []}, "oam:ListSinks": {"action": "oam:ListSinks", "types": [], "resources": []}, "oam:ListTagsForResource": {"action": "oam:ListTagsForResource", "types": ["Link", "Sink"], "resources": [{"types": ["Link", "Sink"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, - "oam:PutSinkPolicy": {"action": "oam:PutSinkPolicy", "types": ["Sink"], "resources": [{"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, + "oam:PutSinkPolicy": {"action": "oam:PutSinkPolicy", "types": ["Sink"], "resources": [{"types": ["Sink"], "arn": "SinkIdentifier"}, {"type": "Sink", "fill": {"ResourceId": "SinkIdentifier"}}]}, "oam:TagResource": {"action": "oam:TagResource", "types": ["Link", "Sink"], "resources": [{"types": ["Link", "Sink"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, "oam:UntagResource": {"action": "oam:UntagResource", "types": ["Link", "Sink"], "resources": [{"types": ["Link", "Sink"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, - "oam:UpdateLink": {"action": "oam:UpdateLink", "types": ["Link"], "resources": [{"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, + "oam:UpdateLink": {"action": "oam:UpdateLink", "types": ["Link"], "resources": [{"types": ["Link"], "arn": "Identifier"}, {"type": "Link", "fill": {"ResourceId": "Identifier"}}]}, "payment-cryptography:AddKeyReplicationRegions": {"action": "payment-cryptography:AddKeyReplicationRegions", "types": ["alias", "key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, "payment-cryptography:AssociateMpaTeam": {"action": "payment-cryptography:AssociateMpaTeam", "types": ["approval-team"], "resources": [{"types": ["approval-team"], "arn": "MpaTeamArn"}]}, "payment-cryptography:CreateAlias": {"action": "payment-cryptography:CreateAlias", "types": ["alias", "key"], "resources": [{"types": ["alias", "key"], "arn": "KeyArn"}, {"type": "alias", "fill": {"Alias": "AliasName"}, "made": true}, {"type": "key", "fill": {}, "when": {"KeyArn": [null]}, "default": true}]}, "payment-cryptography:CreateKey": {"action": "payment-cryptography:CreateKey", "types": [], "resources": [], "makes": [{"type": "key", "fill": {}}]}, "payment-cryptography:DecryptData": {"action": "payment-cryptography:DecryptData", "types": ["alias", "key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}], "located": {"KeyIdentifier": "{KeyIdentifier}"}}, "payment-cryptography:DeleteAlias": {"action": "payment-cryptography:DeleteAlias", "types": ["alias"], "resources": [{"type": "alias", "fill": {"Alias": "AliasName"}}]}, - "payment-cryptography:DeleteKey": {"action": "payment-cryptography:DeleteKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, + "payment-cryptography:DeleteKey": {"action": "payment-cryptography:DeleteKey", "types": ["key"], "resources": [{"types": ["key"], "arn": "KeyIdentifier"}, {"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, "payment-cryptography:DeleteResourcePolicy": {"action": "payment-cryptography:DeleteResourcePolicy", "types": ["key"], "resources": [{"types": ["key"], "arn": "ResourceArn"}]}, "payment-cryptography:DisableDefaultKeyReplicationRegions": {"action": "payment-cryptography:DisableDefaultKeyReplicationRegions", "types": [], "resources": []}, "payment-cryptography:DisassociateMpaTeam": {"action": "payment-cryptography:DisassociateMpaTeam", "types": ["approval-team"], "resources": []}, @@ -2606,9 +2606,9 @@ "payment-cryptography:PutResourcePolicy": {"action": "payment-cryptography:PutResourcePolicy", "types": ["key"], "resources": [{"types": ["key"], "arn": "ResourceArn"}]}, "payment-cryptography:ReEncryptData": {"action": "payment-cryptography:ReEncryptData", "types": ["alias", "key"], "resources": [{"type": "key", "fill": {"KeyId": "IncomingKeyIdentifier"}}, {"type": "key", "fill": {"KeyId": "OutgoingKeyIdentifier"}}], "located": {"IncomingKeyIdentifier": "{IncomingKeyIdentifier}"}}, "payment-cryptography:RemoveKeyReplicationRegions": {"action": "payment-cryptography:RemoveKeyReplicationRegions", "types": ["alias", "key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, - "payment-cryptography:RestoreKey": {"action": "payment-cryptography:RestoreKey", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, - "payment-cryptography:StartKeyUsage": {"action": "payment-cryptography:StartKeyUsage", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, - "payment-cryptography:StopKeyUsage": {"action": "payment-cryptography:StopKeyUsage", "types": ["key"], "resources": [{"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, + "payment-cryptography:RestoreKey": {"action": "payment-cryptography:RestoreKey", "types": ["key"], "resources": [{"types": ["key"], "arn": "KeyIdentifier"}, {"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, + "payment-cryptography:StartKeyUsage": {"action": "payment-cryptography:StartKeyUsage", "types": ["key"], "resources": [{"types": ["key"], "arn": "KeyIdentifier"}, {"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, + "payment-cryptography:StopKeyUsage": {"action": "payment-cryptography:StopKeyUsage", "types": ["key"], "resources": [{"types": ["key"], "arn": "KeyIdentifier"}, {"type": "key", "fill": {"KeyId": "KeyIdentifier"}}]}, "payment-cryptography:TagResource": {"action": "payment-cryptography:TagResource", "types": ["key"], "resources": [{"types": ["key"], "arn": "ResourceArn"}]}, "payment-cryptography:TranslateKeyMaterial": {"action": "payment-cryptography:TranslateKeyMaterial", "types": ["alias", "key"], "resources": []}, "payment-cryptography:TranslatePinData": {"action": "payment-cryptography:TranslatePinData", "types": ["alias", "key"], "resources": [{"type": "key", "fill": {"KeyId": "IncomingKeyIdentifier"}}, {"type": "key", "fill": {"KeyId": "OutgoingKeyIdentifier"}}]}, @@ -2622,39 +2622,39 @@ "quicksight:BatchDeleteKnowledgeBase": {"action": "quicksight:BatchDeleteKnowledgeBase", "types": ["knowledgeBase"], "resources": [{"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseIds[]"}}]}, "quicksight:BatchDeleteTopicReviewedAnswer": {"action": "quicksight:BatchDeleteTopicReviewedAnswer", "types": ["topic"], "resources": [{"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, "quicksight:BatchDescribeUserLimits": {"action": "quicksight:BatchDescribeUserLimits", "types": ["limitsProfile"], "resources": []}, - "quicksight:CancelIngestion": {"action": "quicksight:CancelIngestion", "types": ["ingestion"], "resources": [{"type": "ingestion", "fill": {"DatasetId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:CancelIngestion": {"action": "quicksight:CancelIngestion", "types": ["ingestion"], "resources": [{"type": "ingestion", "fill": {"DatasetId": "DataSetId", "ResourceId": "IngestionId"}}], "located": {"DataSetId": "{DataSetId}", "IngestionId": "{IngestionId}"}}, "quicksight:CreateAccountCustomization": {"action": "quicksight:CreateAccountCustomization", "types": [], "resources": [], "makes": [{"type": "customization", "fill": {}}]}, "quicksight:CreateAccountSubscription": {"action": "quicksight:CreateAccountSubscription", "types": [], "resources": []}, - "quicksight:CreateActionConnector": {"action": "quicksight:CreateActionConnector", "types": ["actionconnector"], "resources": [{"types": ["actionconnector"], "arn": "VpcConnectionArn"}, {"type": "actionconnector", "fill": {"ResourceId": "ActionConnectorId"}}]}, + "quicksight:CreateActionConnector": {"action": "quicksight:CreateActionConnector", "types": ["actionconnector"], "resources": [{"type": "actionconnector", "fill": {"ResourceId": "ActionConnectorId"}}]}, "quicksight:CreateAgent": {"action": "quicksight:CreateAgent", "types": ["agent"], "resources": [{"type": "agent", "fill": {"ResourceId": "AgentId"}}]}, - "quicksight:CreateAnalysis": {"action": "quicksight:CreateAnalysis", "types": ["analysis"], "resources": [{"types": ["analysis"], "arn": "FolderArns[]"}, {"types": ["analysis"], "arn": "ThemeArn"}, {"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, + "quicksight:CreateAnalysis": {"action": "quicksight:CreateAnalysis", "types": ["analysis"], "resources": [{"types": ["analysis"], "arn": "FolderArns[]"}, {"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, "quicksight:CreateApprovalPolicy": {"action": "quicksight:CreateApprovalPolicy", "types": ["approvalPolicy"], "resources": [{"types": ["approvalPolicy"], "arn": "ApplicableTo.GroupArns[]"}, {"type": "approvalPolicy", "fill": {"ResourceId": "PolicyId"}}]}, "quicksight:CreateBrand": {"action": "quicksight:CreateBrand", "types": ["brand"], "resources": [{"type": "brand", "fill": {"ResourceId": "BrandId"}}], "located": {"BrandId": "{BrandId}"}}, - "quicksight:CreateCustomPermissions": {"action": "quicksight:CreateCustomPermissions", "types": ["custompermissions"], "resources": [{"type": "custompermissions", "fill": {}}]}, - "quicksight:CreateDashboard": {"action": "quicksight:CreateDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, - "quicksight:CreateDataSet": {"action": "quicksight:CreateDataSet", "types": ["datasource"], "resources": [{"types": ["datasource"], "arn": "PhysicalTableMap{}.S3Source.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.RelationalTable.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.CustomSql.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.SaaSTable.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.FileSource.DataSourceArn"}]}, + "quicksight:CreateCustomPermissions": {"action": "quicksight:CreateCustomPermissions", "types": ["custompermissions"], "resources": [{"type": "custompermissions", "fill": {}, "find": ["AwsAccountId", "CustomPermissionsName"]}], "located": {"AwsAccountId": "{AwsAccountId}"}}, + "quicksight:CreateDashboard": {"action": "quicksight:CreateDashboard", "types": ["dashboard"], "resources": [{"types": ["dashboard"], "arn": "FolderArns[]"}, {"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, + "quicksight:CreateDataSet": {"action": "quicksight:CreateDataSet", "types": ["datasource"], "resources": [{"types": ["datasource"], "arn": "FolderArns[]"}, {"types": ["datasource"], "arn": "LogicalTableMap{}.Source.DataSetArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.CustomSql.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.FileSource.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.RelationalTable.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.S3Source.DataSourceArn"}, {"types": ["datasource"], "arn": "PhysicalTableMap{}.SaaSTable.DataSourceArn"}]}, "quicksight:CreateDataSource": {"action": "quicksight:CreateDataSource", "types": [], "resources": [], "makes": [{"type": "datasource", "fill": {"ResourceId": "DataSourceId"}}]}, "quicksight:CreateDlpSetting": {"action": "quicksight:CreateDlpSetting", "types": ["dlpSetting"], "resources": [{"type": "dlpSetting", "fill": {"ResourceId": "DlpSettingId"}}], "located": {"DlpSettingId": "{DlpSettingId}"}}, "quicksight:CreateFlow": {"action": "quicksight:CreateFlow", "types": ["flow"], "resources": [{"type": "flow", "fill": {}}]}, "quicksight:CreateFolder": {"action": "quicksight:CreateFolder", "types": ["folder"], "resources": [{"types": ["folder"], "arn": "ParentFolderArn"}, {"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:CreateFolderMembership": {"action": "quicksight:CreateFolderMembership", "types": ["analysis", "dashboard", "dataset", "folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, - "quicksight:CreateGroup": {"action": "quicksight:CreateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {}}]}, - "quicksight:CreateGroupMembership": {"action": "quicksight:CreateGroupMembership", "types": ["group"], "resources": []}, - "quicksight:CreateIAMPolicyAssignment": {"action": "quicksight:CreateIAMPolicyAssignment", "types": ["assignment"], "resources": [{"types": ["assignment"], "arn": "PolicyArn"}, {"type": "assignment", "fill": {}}]}, + "quicksight:CreateGroup": {"action": "quicksight:CreateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}"}}, + "quicksight:CreateGroupMembership": {"action": "quicksight:CreateGroupMembership", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, + "quicksight:CreateIAMPolicyAssignment": {"action": "quicksight:CreateIAMPolicyAssignment", "types": ["assignment"], "resources": [{"types": ["assignment"], "arn": "PolicyArn"}, {"type": "assignment", "fill": {}, "find": ["AwsAccountId", "Namespace", "AssignmentName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}"}}, "quicksight:CreateIngestion": {"action": "quicksight:CreateIngestion", "types": ["ingestion"], "resources": [{"type": "ingestion", "fill": {"DatasetId": "DataSetId", "ResourceId": "IngestionId"}}], "located": {"DataSetId": "{DataSetId}", "IngestionId": "{IngestionId}"}}, - "quicksight:CreateKnowledgeBase": {"action": "quicksight:CreateKnowledgeBase", "types": ["datasource", "knowledgeBase"], "resources": [{"types": ["datasource", "knowledgeBase"], "arn": "DataSourceArn"}, {"types": ["datasource", "knowledgeBase"], "arn": "PrimaryOwnerArn"}, {"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseId"}, "made": true}]}, - "quicksight:CreateLimitsProfile": {"action": "quicksight:CreateLimitsProfile", "types": ["limitsProfile"], "resources": [{"type": "limitsProfile", "fill": {}}]}, + "quicksight:CreateKnowledgeBase": {"action": "quicksight:CreateKnowledgeBase", "types": ["datasource", "knowledgeBase"], "resources": [{"types": ["datasource", "knowledgeBase"], "arn": "DataSourceArn"}, {"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseId"}, "made": true}]}, + "quicksight:CreateLimitsProfile": {"action": "quicksight:CreateLimitsProfile", "types": ["limitsProfile"], "resources": [{"type": "limitsProfile", "fill": {}, "find": ["accountId", "profileName"]}], "located": {"accountId": "{accountId}"}}, "quicksight:CreateNamespace": {"action": "quicksight:CreateNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"ResourceId": "Namespace"}}]}, "quicksight:CreateOAuthClientApplication": {"action": "quicksight:CreateOAuthClientApplication", "types": [], "resources": [], "makes": [{"type": "oauthClientApplication", "fill": {"ResourceId": "OAuthClientApplicationId"}}]}, - "quicksight:CreateRefreshSchedule": {"action": "quicksight:CreateRefreshSchedule", "types": ["refreshschedule"], "resources": [{"types": ["refreshschedule"], "arn": "Schedule.Arn"}, {"type": "refreshschedule", "fill": {"DatasetId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:CreateRefreshSchedule": {"action": "quicksight:CreateRefreshSchedule", "types": ["refreshschedule"], "resources": [{"types": ["refreshschedule"], "arn": "Schedule.Arn"}, {"type": "refreshschedule", "fill": {"DatasetId": "DataSetId", "ResourceId": "Schedule.ScheduleId"}}], "located": {"DataSetId": "{DataSetId}"}}, "quicksight:CreateRoleMembership": {"action": "quicksight:CreateRoleMembership", "types": [], "resources": []}, "quicksight:CreateSpace": {"action": "quicksight:CreateSpace", "types": ["space"], "resources": [{"type": "space", "fill": {"ResourceId": "SpaceId"}}]}, "quicksight:CreateTemplate": {"action": "quicksight:CreateTemplate", "types": ["template"], "resources": [{"type": "template", "fill": {"ResourceId": "TemplateId"}}], "located": {"TemplateId": "{TemplateId}"}}, "quicksight:CreateTemplateAlias": {"action": "quicksight:CreateTemplateAlias", "types": ["template"], "resources": [{"type": "template", "fill": {"ResourceId": "TemplateId"}}], "located": {"TemplateId": "{TemplateId}"}}, "quicksight:CreateTheme": {"action": "quicksight:CreateTheme", "types": ["theme"], "resources": [{"type": "theme", "fill": {"ResourceId": "ThemeId"}}], "located": {"ThemeId": "{ThemeId}"}}, "quicksight:CreateThemeAlias": {"action": "quicksight:CreateThemeAlias", "types": ["theme"], "resources": [{"type": "theme", "fill": {"ResourceId": "ThemeId"}}], "located": {"ThemeId": "{ThemeId}"}}, - "quicksight:CreateTopic": {"action": "quicksight:CreateTopic", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "FolderArns[]"}]}, - "quicksight:CreateTopicRefreshSchedule": {"action": "quicksight:CreateTopicRefreshSchedule", "types": ["topic"], "resources": [{"types": ["topic"], "arn": "DatasetArn"}, {"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, + "quicksight:CreateTopic": {"action": "quicksight:CreateTopic", "types": ["dataset"], "resources": []}, + "quicksight:CreateTopicRefreshSchedule": {"action": "quicksight:CreateTopicRefreshSchedule", "types": ["topic"], "resources": [{"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, "quicksight:CreateTopicV2": {"action": "quicksight:CreateTopic", "types": ["dataset"], "resources": [{"types": ["dataset"], "arn": "FolderArns[]"}]}, "quicksight:CreateVPCConnection": {"action": "quicksight:CreateVPCConnection", "types": [], "resources": [], "makes": [{"type": "vpcconnection", "fill": {"ResourceId": "VPCConnectionId"}}]}, "quicksight:DeleteAccountCustomPermission": {"action": "quicksight:DeleteAccountCustomPermission", "types": [], "resources": []}, @@ -2677,15 +2677,15 @@ "quicksight:DeleteFlow": {"action": "quicksight:DeleteFlow", "types": ["flow"], "resources": [{"type": "flow", "fill": {"ResourceId": "FlowId"}}], "located": {"FlowId": "{FlowId}"}}, "quicksight:DeleteFolder": {"action": "quicksight:DeleteFolder", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:DeleteFolderMembership": {"action": "quicksight:DeleteFolderMembership", "types": ["analysis", "dashboard", "dataset", "folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, - "quicksight:DeleteGroup": {"action": "quicksight:DeleteGroup", "types": ["group"], "resources": []}, - "quicksight:DeleteGroupMembership": {"action": "quicksight:DeleteGroupMembership", "types": ["group"], "resources": []}, - "quicksight:DeleteIAMPolicyAssignment": {"action": "quicksight:DeleteIAMPolicyAssignment", "types": ["assignment"], "resources": []}, + "quicksight:DeleteGroup": {"action": "quicksight:DeleteGroup", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, + "quicksight:DeleteGroupMembership": {"action": "quicksight:DeleteGroupMembership", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, + "quicksight:DeleteIAMPolicyAssignment": {"action": "quicksight:DeleteIAMPolicyAssignment", "types": ["assignment"], "resources": [{"type": "assignment", "fill": {}, "find": ["AwsAccountId", "Namespace", "AssignmentName"]}], "located": {"AssignmentName": "{AssignmentName}", "AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}"}}, "quicksight:DeleteIdentityPropagationConfig": {"action": "quicksight:DeleteIdentityPropagationConfig", "types": [], "resources": []}, "quicksight:DeleteKnowledgeBase": {"action": "quicksight:DeleteKnowledgeBase", "types": ["knowledgeBase"], "resources": [{"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseId"}}], "located": {"KnowledgeBaseId": "{KnowledgeBaseId}"}}, "quicksight:DeleteLimitsProfile": {"action": "quicksight:DeleteLimitsProfile", "types": ["limitsProfile"], "resources": [{"type": "limitsProfile", "fill": {"ResourceId": "profileId"}}], "located": {"profileId": "{profileId}"}}, "quicksight:DeleteNamespace": {"action": "quicksight:DeleteNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"ResourceId": "Namespace"}}], "located": {"Namespace": "{Namespace}"}}, "quicksight:DeleteOAuthClientApplication": {"action": "quicksight:DeleteOAuthClientApplication", "types": ["oauthClientApplication"], "resources": [{"type": "oauthClientApplication", "fill": {"ResourceId": "OAuthClientApplicationId"}}], "located": {"OAuthClientApplicationId": "{OAuthClientApplicationId}"}}, - "quicksight:DeleteRefreshSchedule": {"action": "quicksight:DeleteRefreshSchedule", "types": ["refreshschedule"], "resources": [{"type": "refreshschedule", "fill": {"DatasetId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:DeleteRefreshSchedule": {"action": "quicksight:DeleteRefreshSchedule", "types": ["refreshschedule"], "resources": [{"type": "refreshschedule", "fill": {"DatasetId": "DataSetId", "ResourceId": "ScheduleId"}}], "located": {"DataSetId": "{DataSetId}", "ScheduleId": "{ScheduleId}"}}, "quicksight:DeleteRoleCustomPermission": {"action": "quicksight:DeleteRoleCustomPermission", "types": [], "resources": []}, "quicksight:DeleteRoleMembership": {"action": "quicksight:DeleteRoleMembership", "types": [], "resources": []}, "quicksight:DeleteSpace": {"action": "quicksight:DeleteSpace", "types": ["space"], "resources": [{"type": "space", "fill": {"ResourceId": "SpaceId"}}], "located": {"SpaceId": "{SpaceId}"}}, @@ -2696,7 +2696,7 @@ "quicksight:DeleteTopic": {"action": "quicksight:DeleteTopic", "types": ["topic"], "resources": [{"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, "quicksight:DeleteTopicRefreshSchedule": {"action": "quicksight:DeleteTopicRefreshSchedule", "types": ["topic"], "resources": [{"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, "quicksight:DeleteTopicV2": {"action": "quicksight:DeleteTopic", "types": ["topic"], "resources": [{"type": "topic", "fill": {"ResourceId": "TopicId"}}], "located": {"TopicId": "{TopicId}"}}, - "quicksight:DeleteUser": {"action": "quicksight:DeleteUser", "types": ["user"], "resources": []}, + "quicksight:DeleteUser": {"action": "quicksight:DeleteUser", "types": ["user"], "resources": [{"type": "user", "fill": {}, "find": ["AwsAccountId", "Namespace", "UserName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}", "UserName": "{UserName}"}}, "quicksight:DeleteUserByPrincipalId": {"action": "quicksight:DeleteUserByPrincipalId", "types": ["user"], "resources": []}, "quicksight:DeleteUserCustomPermission": {"action": "quicksight:DeleteUserCustomPermission", "types": ["user"], "resources": []}, "quicksight:DeleteVPCConnection": {"action": "quicksight:DeleteVPCConnection", "types": ["vpcconnection"], "resources": [{"type": "vpcconnection", "fill": {"ResourceId": "VPCConnectionId"}}], "located": {"VPCConnectionId": "{VPCConnectionId}"}}, @@ -2716,7 +2716,7 @@ "quicksight:DescribeApprovalPolicy": {"action": "quicksight:DescribeApprovalPolicy", "types": ["approvalPolicy"], "resources": [{"type": "approvalPolicy", "fill": {"ResourceId": "PolicyId"}}], "located": {"PolicyId": "{PolicyId}"}}, "quicksight:DescribeAssetBundleExportJob": {"action": "quicksight:DescribeAssetBundleExportJob", "types": ["assetBundleExportJob"], "resources": [{"type": "assetBundleExportJob", "fill": {"ResourceId": "AssetBundleExportJobId"}}], "located": {"AssetBundleExportJobId": "{AssetBundleExportJobId}"}}, "quicksight:DescribeAssetBundleImportJob": {"action": "quicksight:DescribeAssetBundleImportJob", "types": ["assetBundleImportJob"], "resources": [{"type": "assetBundleImportJob", "fill": {"ResourceId": "AssetBundleImportJobId"}}], "located": {"AssetBundleImportJobId": "{AssetBundleImportJobId}"}}, - "quicksight:DescribeAutomationJob": {"action": "quicksight:DescribeAutomationJob", "types": ["automationJob"], "resources": [{"type": "automationJob", "fill": {"AutomationGroupId": "AutomationGroupId", "AutomationId": "AutomationId"}}], "located": {"AutomationGroupId": "{AutomationGroupId}", "AutomationId": "{AutomationId}"}}, + "quicksight:DescribeAutomationJob": {"action": "quicksight:DescribeAutomationJob", "types": ["automationJob"], "resources": [{"type": "automationJob", "fill": {"AutomationGroupId": "AutomationGroupId", "AutomationId": "AutomationId", "ResourceId": "JobId"}}], "located": {"AutomationGroupId": "{AutomationGroupId}", "AutomationId": "{AutomationId}", "JobId": "{JobId}"}}, "quicksight:DescribeBrand": {"action": "quicksight:DescribeBrand", "types": ["brand"], "resources": [{"type": "brand", "fill": {"ResourceId": "BrandId"}}], "located": {"BrandId": "{BrandId}"}}, "quicksight:DescribeBrandAssignment": {"action": "quicksight:DescribeBrandAssignment", "types": [], "resources": []}, "quicksight:DescribeBrandPublishedVersion": {"action": "quicksight:DescribeBrandPublishedVersion", "types": ["brand"], "resources": [{"type": "brand", "fill": {"ResourceId": "BrandId"}}], "located": {"BrandId": "{BrandId}"}}, @@ -2724,8 +2724,8 @@ "quicksight:DescribeDashboard": {"action": "quicksight:DescribeDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:DescribeDashboardDefinition": {"action": "quicksight:DescribeDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:DescribeDashboardPermissions": {"action": "quicksight:DescribeDashboardPermissions", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, - "quicksight:DescribeDashboardSnapshotJob": {"action": "quicksight:DescribeDashboardSnapshotJob", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, - "quicksight:DescribeDashboardSnapshotJobResult": {"action": "quicksight:DescribeDashboardSnapshotJobResult", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, + "quicksight:DescribeDashboardSnapshotJob": {"action": "quicksight:DescribeDashboardSnapshotJob", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId", "ResourceId": "SnapshotJobId"}}], "located": {"DashboardId": "{DashboardId}", "SnapshotJobId": "{SnapshotJobId}"}}, + "quicksight:DescribeDashboardSnapshotJobResult": {"action": "quicksight:DescribeDashboardSnapshotJobResult", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId", "ResourceId": "SnapshotJobId"}}], "located": {"DashboardId": "{DashboardId}", "SnapshotJobId": "{SnapshotJobId}"}}, "quicksight:DescribeDashboardsQAConfiguration": {"action": "quicksight:DescribeDashboardsQAConfiguration", "types": [], "resources": []}, "quicksight:DescribeDataSet": {"action": "quicksight:DescribeDataSet", "types": ["dataset"], "resources": [{"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, "quicksight:DescribeDataSetPermissions": {"action": "quicksight:DescribeDataSetPermissions", "types": ["dataset"], "resources": [{"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, @@ -2738,8 +2738,8 @@ "quicksight:DescribeFolder": {"action": "quicksight:DescribeFolder", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:DescribeFolderPermissions": {"action": "quicksight:DescribeFolderPermissions", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:DescribeFolderResolvedPermissions": {"action": "quicksight:DescribeFolderResolvedPermissions", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, - "quicksight:DescribeGroup": {"action": "quicksight:DescribeGroup", "types": ["group"], "resources": []}, - "quicksight:DescribeGroupMembership": {"action": "quicksight:DescribeGroupMembership", "types": ["group"], "resources": []}, + "quicksight:DescribeGroup": {"action": "quicksight:DescribeGroup", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, + "quicksight:DescribeGroupMembership": {"action": "quicksight:DescribeGroupMembership", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, "quicksight:DescribeIAMPolicyAssignment": {"action": "quicksight:DescribeIAMPolicyAssignment", "types": ["assignment"], "resources": []}, "quicksight:DescribeIngestion": {"action": "quicksight:DescribeIngestion", "types": ["ingestion"], "resources": [{"type": "ingestion", "fill": {"DatasetId": "DataSetId", "ResourceId": "IngestionId"}}], "located": {"DataSetId": "{DataSetId}", "IngestionId": "{IngestionId}"}}, "quicksight:DescribeIpRestriction": {"action": "quicksight:DescribeIpRestriction", "types": [], "resources": []}, @@ -2751,7 +2751,7 @@ "quicksight:DescribeOAuthClientApplication": {"action": "quicksight:DescribeOAuthClientApplication", "types": ["oauthClientApplication"], "resources": [{"type": "oauthClientApplication", "fill": {"ResourceId": "OAuthClientApplicationId"}}], "located": {"OAuthClientApplicationId": "{OAuthClientApplicationId}"}}, "quicksight:DescribeQPersonalizationConfiguration": {"action": "quicksight:DescribeQPersonalizationConfiguration", "types": [], "resources": []}, "quicksight:DescribeQuickSightQSearchConfiguration": {"action": "quicksight:DescribeQuickSightQSearchConfiguration", "types": [], "resources": []}, - "quicksight:DescribeRefreshSchedule": {"action": "quicksight:DescribeRefreshSchedule", "types": ["refreshschedule"], "resources": [{"type": "refreshschedule", "fill": {"DatasetId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:DescribeRefreshSchedule": {"action": "quicksight:DescribeRefreshSchedule", "types": ["refreshschedule"], "resources": [{"type": "refreshschedule", "fill": {"DatasetId": "DataSetId", "ResourceId": "ScheduleId"}}], "located": {"DataSetId": "{DataSetId}", "ScheduleId": "{ScheduleId}"}}, "quicksight:DescribeResourcePermissions": {"action": "quicksight:DescribeResourcePermissions", "types": [], "resources": []}, "quicksight:DescribeRoleCustomPermission": {"action": "quicksight:DescribeRoleCustomPermission", "types": [], "resources": []}, "quicksight:DescribeSelfUpgradeConfiguration": {"action": "quicksight:DescribeSelfUpgradeConfiguration", "types": [], "resources": []}, @@ -2798,7 +2798,7 @@ "quicksight:ListFolderMembers": {"action": "quicksight:ListFolderMembers", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:ListFolders": {"action": "quicksight:ListFolders", "types": ["folder"], "resources": []}, "quicksight:ListFoldersForResource": {"action": "quicksight:ListFoldersForResource", "types": ["analysis", "dashboard", "dataset", "datasource", "topic"], "resources": [{"types": ["analysis", "dashboard", "dataset", "datasource", "topic"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, - "quicksight:ListGroupMemberships": {"action": "quicksight:ListGroupMemberships", "types": ["group"], "resources": []}, + "quicksight:ListGroupMemberships": {"action": "quicksight:ListGroupMemberships", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, "quicksight:ListGroups": {"action": "quicksight:ListGroups", "types": ["group"], "resources": []}, "quicksight:ListIAMPolicyAssignments": {"action": "quicksight:ListIAMPolicyAssignments", "types": ["assignment"], "resources": []}, "quicksight:ListIAMPolicyAssignmentsForUser": {"action": "quicksight:ListIAMPolicyAssignmentsForUser", "types": ["assignment"], "resources": []}, @@ -2830,7 +2830,7 @@ "quicksight:ListVPCConnections": {"action": "quicksight:ListVPCConnections", "types": [], "resources": []}, "quicksight:PredictQAResults": {"action": "quicksight:PredictQAResults", "types": ["dashboard", "topic"], "resources": []}, "quicksight:PutDataSetRefreshProperties": {"action": "quicksight:PutDataSetRefreshProperties", "types": ["dataset"], "resources": [{"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, - "quicksight:RegisterUser": {"action": "quicksight:RegisterUser", "types": ["user"], "resources": [{"type": "user", "fill": {}, "find": ["AwsAccountId", "Namespace", "UserName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}"}}, + "quicksight:RegisterUser": {"action": "quicksight:RegisterUser", "types": ["user"], "resources": [{"types": ["user"], "arn": "IamArn"}, {"type": "user", "fill": {}, "find": ["AwsAccountId", "Namespace", "UserName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "Namespace": "{Namespace}"}}, "quicksight:RestoreAnalysis": {"action": "quicksight:RestoreAnalysis", "types": ["analysis"], "resources": [{"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, "quicksight:SearchActionConnectors": {"action": "quicksight:SearchActionConnectors", "types": ["actionconnector"], "resources": []}, "quicksight:SearchAgents": {"action": "quicksight:SearchAgents", "types": ["agent"], "resources": []}, @@ -2848,19 +2848,19 @@ "quicksight:SearchTopicsV2": {"action": "quicksight:SearchTopics", "types": ["topic"], "resources": []}, "quicksight:StartAssetBundleExportJob": {"action": "quicksight:StartAssetBundleExportJob", "types": ["assetBundleExportJob"], "resources": [{"types": ["assetBundleExportJob"], "arn": "ResourceArns[]"}, {"type": "assetBundleExportJob", "fill": {"ResourceId": "AssetBundleExportJobId"}}]}, "quicksight:StartAssetBundleImportJob": {"action": "quicksight:StartAssetBundleImportJob", "types": ["assetBundleImportJob"], "resources": [{"type": "assetBundleImportJob", "fill": {"ResourceId": "AssetBundleImportJobId"}}]}, - "quicksight:StartAutomationJob": {"action": "quicksight:StartAutomationJob", "types": ["automation"], "resources": [{"type": "automation", "fill": {"AutomationGroupId": "AutomationGroupId"}}], "located": {"AutomationGroupId": "{AutomationGroupId}"}}, - "quicksight:StartDashboardSnapshotJob": {"action": "quicksight:StartDashboardSnapshotJob", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, + "quicksight:StartAutomationJob": {"action": "quicksight:StartAutomationJob", "types": ["automation"], "resources": [{"type": "automation", "fill": {"AutomationGroupId": "AutomationGroupId", "ResourceId": "AutomationId"}}], "located": {"AutomationGroupId": "{AutomationGroupId}", "AutomationId": "{AutomationId}"}}, + "quicksight:StartDashboardSnapshotJob": {"action": "quicksight:StartDashboardSnapshotJob", "types": ["dashboardSnapshotJob"], "resources": [{"type": "dashboardSnapshotJob", "fill": {"DashboardId": "DashboardId", "ResourceId": "SnapshotJobId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:StartDashboardSnapshotJobSchedule": {"action": "quicksight:StartDashboardSnapshotJobSchedule", "types": [], "resources": []}, "quicksight:TagResource": {"action": "quicksight:TagResource", "types": ["accessControlApplication", "actionconnector", "analysis", "app", "brand", "customization", "custompermissions", "dashboard", "dataset", "datasource", "dlpSetting", "emailCustomizationTemplate", "flow", "folder", "inboundConnector", "ingestion", "namespace", "oauthClientApplication", "template", "theme", "topic", "user", "vpcconnection"], "resources": [{"types": ["accessControlApplication", "actionconnector", "analysis", "app", "brand", "customization", "custompermissions", "dashboard", "dataset", "datasource", "dlpSetting", "emailCustomizationTemplate", "flow", "folder", "inboundConnector", "ingestion", "namespace", "oauthClientApplication", "template", "theme", "topic", "user", "vpcconnection"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, "quicksight:UntagResource": {"action": "quicksight:UntagResource", "types": ["accessControlApplication", "actionconnector", "analysis", "app", "brand", "customization", "custompermissions", "dashboard", "dataset", "datasource", "dlpSetting", "emailCustomizationTemplate", "flow", "folder", "inboundConnector", "ingestion", "namespace", "oauthClientApplication", "template", "theme", "topic", "user", "vpcconnection"], "resources": [{"types": ["accessControlApplication", "actionconnector", "analysis", "app", "brand", "customization", "custompermissions", "dashboard", "dataset", "datasource", "dlpSetting", "emailCustomizationTemplate", "flow", "folder", "inboundConnector", "ingestion", "namespace", "oauthClientApplication", "template", "theme", "topic", "user", "vpcconnection"], "arn": "ResourceArn"}], "located": {"ResourceArn": "{ResourceArn}"}}, "quicksight:UpdateAccountCustomPermission": {"action": "quicksight:UpdateAccountCustomPermission", "types": [], "resources": []}, "quicksight:UpdateAccountCustomization": {"action": "quicksight:UpdateAccountCustomization", "types": ["customization"], "resources": []}, "quicksight:UpdateAccountSettings": {"action": "quicksight:UpdateAccountSettings", "types": [], "resources": []}, - "quicksight:UpdateActionConnector": {"action": "quicksight:UpdateActionConnector", "types": ["actionconnector"], "resources": [{"types": ["actionconnector"], "arn": "VpcConnectionArn"}, {"type": "actionconnector", "fill": {"ResourceId": "ActionConnectorId"}}], "located": {"ActionConnectorId": "{ActionConnectorId}"}}, + "quicksight:UpdateActionConnector": {"action": "quicksight:UpdateActionConnector", "types": ["actionconnector"], "resources": [{"type": "actionconnector", "fill": {"ResourceId": "ActionConnectorId"}}], "located": {"ActionConnectorId": "{ActionConnectorId}"}}, "quicksight:UpdateActionConnectorPermissions": {"action": "quicksight:UpdateActionConnectorPermissions", "types": ["actionconnector"], "resources": [{"type": "actionconnector", "fill": {"ResourceId": "ActionConnectorId"}}], "located": {"ActionConnectorId": "{ActionConnectorId}"}}, "quicksight:UpdateAgent": {"action": "quicksight:UpdateAgent", "types": ["agent"], "resources": [{"type": "agent", "fill": {"ResourceId": "AgentId"}}], "located": {"AgentId": "{AgentId}"}}, "quicksight:UpdateAgentPermissions": {"action": "quicksight:UpdateAgentPermissions", "types": ["agent"], "resources": [{"type": "agent", "fill": {"ResourceId": "AgentId"}}], "located": {"AgentId": "{AgentId}"}}, - "quicksight:UpdateAnalysis": {"action": "quicksight:UpdateAnalysis", "types": ["analysis"], "resources": [{"types": ["analysis"], "arn": "ThemeArn"}, {"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, + "quicksight:UpdateAnalysis": {"action": "quicksight:UpdateAnalysis", "types": ["analysis"], "resources": [{"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, "quicksight:UpdateAnalysisPermissions": {"action": "quicksight:UpdateAnalysisPermissions", "types": ["analysis"], "resources": [{"type": "analysis", "fill": {"ResourceId": "AnalysisId"}}], "located": {"AnalysisId": "{AnalysisId}"}}, "quicksight:UpdateAppPermissions": {"action": "quicksight:UpdateAppPermissions", "types": ["app"], "resources": [{"type": "app", "fill": {"ResourceId": "AppId"}}], "located": {"AppId": "{AppId}"}}, "quicksight:UpdateApplicationWithTokenExchangeGrant": {"action": "quicksight:UpdateApplicationWithTokenExchangeGrant", "types": [], "resources": []}, @@ -2869,14 +2869,14 @@ "quicksight:UpdateBrandAssignment": {"action": "quicksight:UpdateBrandAssignment", "types": [], "resources": []}, "quicksight:UpdateBrandPublishedVersion": {"action": "quicksight:UpdateBrandPublishedVersion", "types": ["brand"], "resources": [{"type": "brand", "fill": {"ResourceId": "BrandId"}}], "located": {"BrandId": "{BrandId}"}}, "quicksight:UpdateCustomPermissions": {"action": "quicksight:UpdateCustomPermissions", "types": ["custompermissions"], "resources": []}, - "quicksight:UpdateDashboard": {"action": "quicksight:UpdateDashboard", "types": ["dashboard"], "resources": [{"types": ["dashboard"], "arn": "ThemeArn"}, {"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, + "quicksight:UpdateDashboard": {"action": "quicksight:UpdateDashboard", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:UpdateDashboardLinks": {"action": "quicksight:UpdateDashboardLinks", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:UpdateDashboardPermissions": {"action": "quicksight:UpdateDashboardPermissions", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:UpdateDashboardPublishedVersion": {"action": "quicksight:UpdateDashboardPublishedVersion", "types": ["dashboard"], "resources": [{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], "located": {"DashboardId": "{DashboardId}"}}, "quicksight:UpdateDashboardsQAConfiguration": {"action": "quicksight:UpdateDashboardsQAConfiguration", "types": [], "resources": []}, - "quicksight:UpdateDataSet": {"action": "quicksight:UpdateDataSet", "types": ["dataset", "datasource"], "resources": [{"types": ["dataset", "datasource"], "arn": "RowLevelPermissionDataSet.Arn"}, {"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:UpdateDataSet": {"action": "quicksight:UpdateDataSet", "types": ["dataset", "datasource"], "resources": [{"types": ["dataset", "datasource"], "arn": "LogicalTableMap{}.Source.DataSetArn"}, {"types": ["dataset", "datasource"], "arn": "PhysicalTableMap{}.CustomSql.DataSourceArn"}, {"types": ["dataset", "datasource"], "arn": "PhysicalTableMap{}.FileSource.DataSourceArn"}, {"types": ["dataset", "datasource"], "arn": "PhysicalTableMap{}.RelationalTable.DataSourceArn"}, {"types": ["dataset", "datasource"], "arn": "PhysicalTableMap{}.S3Source.DataSourceArn"}, {"types": ["dataset", "datasource"], "arn": "PhysicalTableMap{}.SaaSTable.DataSourceArn"}, {"types": ["dataset", "datasource"], "arn": "RowLevelPermissionDataSet.Arn"}, {"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, "quicksight:UpdateDataSetPermissions": {"action": "quicksight:UpdateDataSetPermissions", "types": ["dataset"], "resources": [{"type": "dataset", "fill": {"ResourceId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, - "quicksight:UpdateDataSource": {"action": "quicksight:UpdateDataSource", "types": ["datasource"], "resources": [{"types": ["datasource"], "arn": "Credentials.CopySourceArn"}, {"types": ["datasource"], "arn": "Credentials.SecretArn"}, {"types": ["datasource"], "arn": "VpcConnectionProperties.VpcConnectionArn"}, {"type": "datasource", "fill": {"ResourceId": "DataSourceId"}}], "located": {"DataSourceId": "{DataSourceId}"}}, + "quicksight:UpdateDataSource": {"action": "quicksight:UpdateDataSource", "types": ["datasource"], "resources": [{"types": ["datasource"], "arn": "Credentials.CopySourceArn"}, {"type": "datasource", "fill": {"ResourceId": "DataSourceId"}}], "located": {"DataSourceId": "{DataSourceId}"}}, "quicksight:UpdateDataSourcePermissions": {"action": "quicksight:UpdateDataSourcePermissions", "types": ["datasource"], "resources": [{"type": "datasource", "fill": {"ResourceId": "DataSourceId"}}], "located": {"DataSourceId": "{DataSourceId}"}}, "quicksight:UpdateDefaultQBusinessApplication": {"action": "quicksight:UpdateDefaultQBusinessApplication", "types": [], "resources": []}, "quicksight:UpdateDlpSetting": {"action": "quicksight:UpdateDlpSetting", "types": ["dlpSetting"], "resources": [{"type": "dlpSetting", "fill": {"ResourceId": "DlpSettingId"}}], "located": {"DlpSettingId": "{DlpSettingId}"}}, @@ -2884,7 +2884,7 @@ "quicksight:UpdateFlowPermissions": {"action": "quicksight:UpdateFlowPermissions", "types": ["flow"], "resources": [{"type": "flow", "fill": {"ResourceId": "FlowId"}}], "located": {"FlowId": "{FlowId}"}}, "quicksight:UpdateFolder": {"action": "quicksight:UpdateFolder", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, "quicksight:UpdateFolderPermissions": {"action": "quicksight:UpdateFolderPermissions", "types": ["folder"], "resources": [{"type": "folder", "fill": {"ResourceId": "FolderId"}}], "located": {"FolderId": "{FolderId}"}}, - "quicksight:UpdateGroup": {"action": "quicksight:UpdateGroup", "types": ["group"], "resources": []}, + "quicksight:UpdateGroup": {"action": "quicksight:UpdateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}], "located": {"AwsAccountId": "{AwsAccountId}", "GroupName": "{GroupName}", "Namespace": "{Namespace}"}}, "quicksight:UpdateIAMPolicyAssignment": {"action": "quicksight:UpdateIAMPolicyAssignment", "types": ["assignment"], "resources": [{"types": ["assignment"], "arn": "PolicyArn"}]}, "quicksight:UpdateIdentityPropagationConfig": {"action": "quicksight:UpdateIdentityPropagationConfig", "types": [], "resources": []}, "quicksight:UpdateIpRestriction": {"action": "quicksight:UpdateIpRestriction", "types": [], "resources": []}, @@ -2892,11 +2892,11 @@ "quicksight:UpdateKnowledgeBase": {"action": "quicksight:UpdateKnowledgeBase", "types": ["knowledgeBase"], "resources": [{"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseId"}}], "located": {"KnowledgeBaseId": "{KnowledgeBaseId}"}}, "quicksight:UpdateKnowledgeBasePermissions": {"action": "quicksight:UpdateKnowledgeBasePermissions", "types": ["knowledgeBase"], "resources": [{"type": "knowledgeBase", "fill": {"ResourceId": "KnowledgeBaseId"}}], "located": {"KnowledgeBaseId": "{KnowledgeBaseId}"}}, "quicksight:UpdateLimitsProfile": {"action": "quicksight:UpdateLimitsProfile", "types": ["limitsProfile"], "resources": [{"type": "limitsProfile", "fill": {"ResourceId": "profileId"}}], "located": {"profileId": "{profileId}"}}, - "quicksight:UpdateOAuthClientApplication": {"action": "quicksight:UpdateOAuthClientApplication", "types": ["oauthClientApplication"], "resources": [{"types": ["oauthClientApplication"], "arn": "IdentityProviderVpcConnectionProperties.VpcConnectionArn"}, {"type": "oauthClientApplication", "fill": {"ResourceId": "OAuthClientApplicationId"}}], "located": {"OAuthClientApplicationId": "{OAuthClientApplicationId}"}}, + "quicksight:UpdateOAuthClientApplication": {"action": "quicksight:UpdateOAuthClientApplication", "types": ["oauthClientApplication"], "resources": [{"type": "oauthClientApplication", "fill": {"ResourceId": "OAuthClientApplicationId"}}], "located": {"OAuthClientApplicationId": "{OAuthClientApplicationId}"}}, "quicksight:UpdatePublicSharingSettings": {"action": "quicksight:UpdatePublicSharingSettings", "types": [], "resources": []}, "quicksight:UpdateQPersonalizationConfiguration": {"action": "quicksight:UpdateQPersonalizationConfiguration", "types": [], "resources": []}, "quicksight:UpdateQuickSightQSearchConfiguration": {"action": "quicksight:UpdateQuickSightQSearchConfiguration", "types": [], "resources": []}, - "quicksight:UpdateRefreshSchedule": {"action": "quicksight:UpdateRefreshSchedule", "types": ["refreshschedule"], "resources": [{"types": ["refreshschedule"], "arn": "Schedule.Arn"}, {"type": "refreshschedule", "fill": {"DatasetId": "DataSetId"}}], "located": {"DataSetId": "{DataSetId}"}}, + "quicksight:UpdateRefreshSchedule": {"action": "quicksight:UpdateRefreshSchedule", "types": ["refreshschedule"], "resources": [{"types": ["refreshschedule"], "arn": "Schedule.Arn"}, {"type": "refreshschedule", "fill": {"DatasetId": "DataSetId", "ResourceId": "Schedule.ScheduleId"}}], "located": {"DataSetId": "{DataSetId}"}}, "quicksight:UpdateResourcePermissions": {"action": "quicksight:UpdateResourcePermissions", "types": [], "resources": []}, "quicksight:UpdateRoleCustomPermission": {"action": "quicksight:UpdateRoleCustomPermission", "types": [], "resources": []}, "quicksight:UpdateSPICECapacityConfiguration": {"action": "quicksight:UpdateSPICECapacityConfiguration", "types": [], "resources": []}, @@ -2967,30 +2967,30 @@ "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"]}]}, - "redshift-serverless:ConvertRecoveryPointToSnapshot": {"action": "redshift-serverless:ConvertRecoveryPointToSnapshot", "types": ["recoveryPoint", "snapshot"], "resources": [{"type": "recoveryPoint", "fill": {"RecoveryPointId": "recoveryPointId"}}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, - "redshift-serverless:CreateCustomDomainAssociation": {"action": "redshift-serverless:CreateCustomDomainAssociation", "types": ["workgroup"], "resources": [{"types": ["workgroup"], "arn": "customDomainCertificateArn"}, {"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, + "redshift-serverless:ConvertRecoveryPointToSnapshot": {"action": "redshift-serverless:ConvertRecoveryPointToSnapshot", "types": ["recoveryPoint", "snapshot"], "resources": [{"type": "recoveryPoint", "fill": {"RecoveryPointId": "recoveryPointId"}}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, + "redshift-serverless:CreateCustomDomainAssociation": {"action": "redshift-serverless:CreateCustomDomainAssociation", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:CreateEndpointAccess": {"action": "redshift-serverless:CreateEndpointAccess", "types": ["endpointAccess"], "resources": [{"type": "endpointAccess", "fill": {}, "find": ["endpointName"]}]}, - "redshift-serverless:CreateNamespace": {"action": "redshift-serverless:CreateNamespace", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "defaultIamRoleArn"}, {"types": ["namespace"], "arn": "redshiftIdcApplicationArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:CreateNamespace": {"action": "redshift-serverless:CreateNamespace", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "defaultIamRoleArn"}, {"types": ["namespace"], "arn": "redshiftIdcApplicationArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, "redshift-serverless:CreateReservation": {"action": "redshift-serverless:CreateReservation", "types": [], "resources": []}, - "redshift-serverless:CreateScheduledAction": {"action": "redshift-serverless:CreateScheduledAction", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "roleArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, - "redshift-serverless:CreateSnapshot": {"action": "redshift-serverless:CreateSnapshot", "types": ["namespace", "snapshot"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"], "made": true}]}, - "redshift-serverless:CreateSnapshotCopyConfiguration": {"action": "redshift-serverless:CreateSnapshotCopyConfiguration", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:CreateScheduledAction": {"action": "redshift-serverless:CreateScheduledAction", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "roleArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:CreateSnapshot": {"action": "redshift-serverless:CreateSnapshot", "types": ["namespace", "snapshot"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"], "made": true}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"], "made": true}]}, + "redshift-serverless:CreateSnapshotCopyConfiguration": {"action": "redshift-serverless:CreateSnapshotCopyConfiguration", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, "redshift-serverless:CreateUsageLimit": {"action": "redshift-serverless:CreateUsageLimit", "types": [], "resources": []}, "redshift-serverless:CreateWorkgroup": {"action": "redshift-serverless:CreateWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:DeleteCustomDomainAssociation": {"action": "redshift-serverless:DeleteCustomDomainAssociation", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:DeleteEndpointAccess": {"action": "redshift-serverless:DeleteEndpointAccess", "types": ["endpointAccess"], "resources": [{"type": "endpointAccess", "fill": {}, "find": ["endpointName"]}]}, - "redshift-serverless:DeleteNamespace": {"action": "redshift-serverless:DeleteNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:DeleteNamespace": {"action": "redshift-serverless:DeleteNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, "redshift-serverless:DeleteResourcePolicy": {"action": "redshift-serverless:DeleteResourcePolicy", "types": [], "resources": []}, "redshift-serverless:DeleteScheduledAction": {"action": "redshift-serverless:DeleteScheduledAction", "types": [], "resources": []}, - "redshift-serverless:DeleteSnapshot": {"action": "redshift-serverless:DeleteSnapshot", "types": ["snapshot"], "resources": [{"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, + "redshift-serverless:DeleteSnapshot": {"action": "redshift-serverless:DeleteSnapshot", "types": ["snapshot"], "resources": [{"type": "snapshot", "fill": {}, "find": ["snapshotName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, "redshift-serverless:DeleteSnapshotCopyConfiguration": {"action": "redshift-serverless:DeleteSnapshotCopyConfiguration", "types": [], "resources": []}, "redshift-serverless:DeleteUsageLimit": {"action": "redshift-serverless:DeleteUsageLimit", "types": [], "resources": []}, - "redshift-serverless:DeleteWorkgroup": {"action": "redshift-serverless:DeleteWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, + "redshift-serverless:DeleteWorkgroup": {"action": "redshift-serverless:DeleteWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}, {"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:GetCredentials": {"action": "redshift-serverless:GetCredentials", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:GetCustomDomainAssociation": {"action": "redshift-serverless:GetCustomDomainAssociation", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:GetEndpointAccess": {"action": "redshift-serverless:GetEndpointAccess", "types": ["endpointAccess"], "resources": [{"type": "endpointAccess", "fill": {}, "find": ["endpointName"]}]}, "redshift-serverless:GetIdentityCenterAuthToken": {"action": "redshift-serverless:GetIdentityCenterAuthToken", "types": ["workgroup"], "resources": []}, - "redshift-serverless:GetNamespace": {"action": "redshift-serverless:GetNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:GetNamespace": {"action": "redshift-serverless:GetNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, "redshift-serverless:GetRecoveryPoint": {"action": "redshift-serverless:GetRecoveryPoint", "types": ["recoveryPoint"], "resources": [{"type": "recoveryPoint", "fill": {"RecoveryPointId": "recoveryPointId"}}]}, "redshift-serverless:GetReservation": {"action": "redshift-serverless:GetReservation", "types": [], "resources": []}, "redshift-serverless:GetReservationOffering": {"action": "redshift-serverless:GetReservationOffering", "types": [], "resources": []}, @@ -3000,17 +3000,17 @@ "redshift-serverless:GetTableRestoreStatus": {"action": "redshift-serverless:GetTableRestoreStatus", "types": [], "resources": []}, "redshift-serverless:GetTrack": {"action": "redshift-serverless:GetTrack", "types": [], "resources": []}, "redshift-serverless:GetUsageLimit": {"action": "redshift-serverless:GetUsageLimit", "types": [], "resources": []}, - "redshift-serverless:GetWorkgroup": {"action": "redshift-serverless:GetWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, + "redshift-serverless:GetWorkgroup": {"action": "redshift-serverless:GetWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}, {"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:ListCustomDomainAssociations": {"action": "redshift-serverless:ListCustomDomainAssociations", "types": [], "resources": []}, "redshift-serverless:ListEndpointAccess": {"action": "redshift-serverless:ListEndpointAccess", "types": ["endpointAccess"], "resources": []}, "redshift-serverless:ListManagedWorkgroups": {"action": "redshift-serverless:ListManagedWorkgroups", "types": [], "resources": []}, "redshift-serverless:ListNamespaces": {"action": "redshift-serverless:ListNamespaces", "types": [], "resources": []}, - "redshift-serverless:ListRecoveryPoints": {"action": "redshift-serverless:ListRecoveryPoints", "types": ["recoveryPoint"], "resources": [{"types": ["recoveryPoint"], "arn": "namespaceArn"}]}, + "redshift-serverless:ListRecoveryPoints": {"action": "redshift-serverless:ListRecoveryPoints", "types": ["recoveryPoint"], "resources": []}, "redshift-serverless:ListReservationOfferings": {"action": "redshift-serverless:ListReservationOfferings", "types": [], "resources": []}, "redshift-serverless:ListReservations": {"action": "redshift-serverless:ListReservations", "types": [], "resources": []}, "redshift-serverless:ListScheduledActions": {"action": "redshift-serverless:ListScheduledActions", "types": [], "resources": []}, "redshift-serverless:ListSnapshotCopyConfigurations": {"action": "redshift-serverless:ListSnapshotCopyConfigurations", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, - "redshift-serverless:ListSnapshots": {"action": "redshift-serverless:ListSnapshots", "types": ["snapshot"], "resources": [{"types": ["snapshot"], "arn": "namespaceArn"}]}, + "redshift-serverless:ListSnapshots": {"action": "redshift-serverless:ListSnapshots", "types": ["snapshot"], "resources": []}, "redshift-serverless:ListTableRestoreStatus": {"action": "redshift-serverless:ListTableRestoreStatus", "types": [], "resources": []}, "redshift-serverless:ListTagsForResource": {"action": "redshift-serverless:ListTagsForResource", "types": ["namespace", "workgroup"], "resources": [{"types": ["namespace", "workgroup"], "arn": "resourceArn"}]}, "redshift-serverless:ListTracks": {"action": "redshift-serverless:ListTracks", "types": [], "resources": []}, @@ -3020,25 +3020,25 @@ "redshift-serverless:RestoreFromRecoveryPoint": {"action": "redshift-serverless:RestoreFromRecoveryPoint", "types": ["recoveryPoint"], "resources": [{"type": "recoveryPoint", "fill": {"RecoveryPointId": "recoveryPointId"}}]}, "redshift-serverless:RestoreFromSnapshot": {"action": "redshift-serverless:RestoreFromSnapshot", "types": ["snapshot"], "resources": [{"types": ["snapshot"], "arn": "snapshotArn"}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"], "account": "ownerAccount"}]}, "redshift-serverless:RestoreTableFromRecoveryPoint": {"action": "redshift-serverless:RestoreTableFromRecoveryPoint", "types": ["namespace", "recoveryPoint"], "resources": [{"type": "recoveryPoint", "fill": {"RecoveryPointId": "recoveryPointId"}}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, - "redshift-serverless:RestoreTableFromSnapshot": {"action": "redshift-serverless:RestoreTableFromSnapshot", "types": ["namespace", "snapshot"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, + "redshift-serverless:RestoreTableFromSnapshot": {"action": "redshift-serverless:RestoreTableFromSnapshot", "types": ["namespace", "snapshot"], "resources": [{"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, "redshift-serverless:TagResource": {"action": "redshift-serverless:TagResource", "types": ["namespace", "recoveryPoint", "snapshot", "workgroup"], "resources": [{"types": ["namespace", "recoveryPoint", "snapshot", "workgroup"], "arn": "resourceArn"}]}, "redshift-serverless:UntagResource": {"action": "redshift-serverless:UntagResource", "types": ["namespace", "recoveryPoint", "snapshot", "workgroup"], "resources": [{"types": ["namespace", "recoveryPoint", "snapshot", "workgroup"], "arn": "resourceArn"}]}, - "redshift-serverless:UpdateCustomDomainAssociation": {"action": "redshift-serverless:UpdateCustomDomainAssociation", "types": ["workgroup"], "resources": [{"types": ["workgroup"], "arn": "customDomainCertificateArn"}, {"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, + "redshift-serverless:UpdateCustomDomainAssociation": {"action": "redshift-serverless:UpdateCustomDomainAssociation", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift-serverless:UpdateEndpointAccess": {"action": "redshift-serverless:UpdateEndpointAccess", "types": ["endpointAccess"], "resources": [{"type": "endpointAccess", "fill": {}, "find": ["endpointName"]}]}, - "redshift-serverless:UpdateLakehouseConfiguration": {"action": "redshift-serverless:UpdateLakehouseConfiguration", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "lakehouseIdcApplicationArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, - "redshift-serverless:UpdateNamespace": {"action": "redshift-serverless:UpdateNamespace", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "defaultIamRoleArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:UpdateLakehouseConfiguration": {"action": "redshift-serverless:UpdateLakehouseConfiguration", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "lakehouseIdcApplicationArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, + "redshift-serverless:UpdateNamespace": {"action": "redshift-serverless:UpdateNamespace", "types": ["namespace"], "resources": [{"types": ["namespace"], "arn": "defaultIamRoleArn"}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}, {"type": "namespace", "fill": {}, "find": ["namespaceName"]}]}, "redshift-serverless:UpdateScheduledAction": {"action": "redshift-serverless:UpdateScheduledAction", "types": [], "resources": []}, - "redshift-serverless:UpdateSnapshot": {"action": "redshift-serverless:UpdateSnapshot", "types": ["snapshot"], "resources": [{"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, + "redshift-serverless:UpdateSnapshot": {"action": "redshift-serverless:UpdateSnapshot", "types": ["snapshot"], "resources": [{"type": "snapshot", "fill": {}, "find": ["snapshotName"]}, {"type": "snapshot", "fill": {}, "find": ["snapshotName"]}]}, "redshift-serverless:UpdateSnapshotCopyConfiguration": {"action": "redshift-serverless:UpdateSnapshotCopyConfiguration", "types": [], "resources": []}, "redshift-serverless:UpdateUsageLimit": {"action": "redshift-serverless:UpdateUsageLimit", "types": [], "resources": []}, - "redshift-serverless:UpdateWorkgroup": {"action": "redshift-serverless:UpdateWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, + "redshift-serverless:UpdateWorkgroup": {"action": "redshift-serverless:UpdateWorkgroup", "types": ["workgroup"], "resources": [{"type": "workgroup", "fill": {}, "find": ["workgroupName"]}, {"type": "workgroup", "fill": {}, "find": ["workgroupName"]}]}, "redshift:AcceptReservedNodeExchange": {"action": "redshift:AcceptReservedNodeExchange", "types": [], "resources": []}, "redshift:AddPartner": {"action": "redshift:AddPartner", "types": [], "resources": []}, "redshift:AssociateDataShareConsumer": {"action": "redshift:AssociateDataShareConsumer", "types": ["datashare"], "resources": [{"types": ["datashare"], "arn": "ConsumerArn"}, {"types": ["datashare"], "arn": "DataShareArn"}]}, "redshift:AuthorizeClusterSecurityGroupIngress": {"action": "redshift:AuthorizeClusterSecurityGroupIngress", "types": ["securitygroup", "securitygroupingress-ec2securitygroup"], "resources": []}, "redshift:AuthorizeDataShare": {"action": "redshift:AuthorizeDataShare", "types": ["datashare"], "resources": [{"types": ["datashare"], "arn": "DataShareArn"}]}, "redshift:AuthorizeEndpointAccess": {"action": "redshift:AuthorizeEndpointAccess", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, - "redshift:AuthorizeSnapshotAccess": {"action": "redshift:AuthorizeSnapshotAccess", "types": ["cluster", "snapshot"], "resources": [{"types": ["cluster", "snapshot"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "SnapshotClusterIdentifier"}}, {"type": "snapshot", "fill": {"ClusterName": "SnapshotClusterIdentifier", "SnapshotName": "SnapshotIdentifier"}}]}, + "redshift:AuthorizeSnapshotAccess": {"action": "redshift:AuthorizeSnapshotAccess", "types": ["cluster", "snapshot"], "resources": [{"types": ["cluster", "snapshot"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "SnapshotClusterIdentifier"}}, {"type": "snapshot", "fill": {"ClusterName": "SnapshotClusterIdentifier", "SnapshotName": "SnapshotIdentifier"}, "unless": {"SnapshotIdentifier": [null]}}]}, "redshift:BatchDeleteClusterSnapshots": {"action": "redshift:BatchDeleteClusterSnapshots", "types": ["snapshot"], "resources": []}, "redshift:BatchModifyClusterSnapshots": {"action": "redshift:BatchModifyClusterSnapshots", "types": ["snapshot"], "resources": []}, "redshift:CancelResize": {"action": "redshift:CancelResize", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, @@ -3049,12 +3049,12 @@ "redshift:CreateClusterSecurityGroup": {"action": "redshift:CreateClusterSecurityGroup", "types": ["securitygroup"], "resources": [{"type": "securitygroup", "fill": {"SecurityGroupName": "ClusterSecurityGroupName"}}]}, "redshift:CreateClusterSnapshot": {"action": "redshift:CreateClusterSnapshot", "types": ["cluster", "snapshot"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}, {"type": "snapshot", "fill": {"ClusterName": "ClusterIdentifier", "SnapshotName": "SnapshotIdentifier"}, "made": true}]}, "redshift:CreateClusterSubnetGroup": {"action": "redshift:CreateClusterSubnetGroup", "types": ["subnetgroup"], "resources": [{"type": "subnetgroup", "fill": {"SubnetGroupName": "ClusterSubnetGroupName"}}]}, - "redshift:CreateCustomDomainAssociation": {"action": "redshift:CreateCustomDomainAssociation", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "CustomDomainCertificateArn"}, {"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, + "redshift:CreateCustomDomainAssociation": {"action": "redshift:CreateCustomDomainAssociation", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:CreateEndpointAccess": {"action": "redshift:CreateEndpointAccess", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:CreateEventSubscription": {"action": "redshift:CreateEventSubscription", "types": ["eventsubscription"], "resources": [{"types": ["eventsubscription"], "arn": "SnsTopicArn"}, {"type": "eventsubscription", "fill": {"EventSubscriptionName": "SubscriptionName"}}]}, "redshift:CreateHsmClientCertificate": {"action": "redshift:CreateHsmClientCertificate", "types": ["hsmclientcertificate"], "resources": [{"type": "hsmclientcertificate", "fill": {"HSMClientCertificateId": "HsmClientCertificateIdentifier"}}]}, "redshift:CreateHsmConfiguration": {"action": "redshift:CreateHsmConfiguration", "types": ["hsmconfiguration"], "resources": [{"type": "hsmconfiguration", "fill": {"HSMConfigurationId": "HsmConfigurationIdentifier"}}]}, - "redshift:CreateIntegration": {"action": "redshift:CreateIntegration", "types": ["integration"], "resources": [{"types": ["integration"], "arn": "SourceArn"}, {"types": ["integration"], "arn": "TargetArn"}, {"type": "integration", "fill": {}}]}, + "redshift:CreateIntegration": {"action": "redshift:CreateIntegration", "types": ["integration"], "resources": [{"types": ["integration"], "arn": "SourceArn"}, {"types": ["integration"], "arn": "TargetArn"}, {"type": "integration", "fill": {}, "find": ["IntegrationName"]}]}, "redshift:CreateQev2IdcApplication": {"action": "redshift:CreateQev2IdcApplication", "types": [], "resources": [], "makes": [{"type": "qev2idcapplication", "fill": {}}]}, "redshift:CreateRedshiftIdcApplication": {"action": "redshift:CreateRedshiftIdcApplication", "types": [], "resources": [], "makes": [{"type": "redshiftidcapplication", "fill": {}}]}, "redshift:CreateScheduledAction": {"action": "redshift:CreateScheduledAction", "types": [], "resources": []}, @@ -3091,7 +3091,7 @@ "redshift:DescribeClusterParameterGroups": {"action": "redshift:DescribeClusterParameterGroups", "types": [], "resources": []}, "redshift:DescribeClusterParameters": {"action": "redshift:DescribeClusterParameters", "types": ["parametergroup"], "resources": [{"type": "parametergroup", "fill": {"ParameterGroupName": "ParameterGroupName"}}]}, "redshift:DescribeClusterSecurityGroups": {"action": "redshift:DescribeClusterSecurityGroups", "types": [], "resources": []}, - "redshift:DescribeClusterSnapshots": {"action": "redshift:DescribeClusterSnapshots", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, + "redshift:DescribeClusterSnapshots": {"action": "redshift:DescribeClusterSnapshots", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:DescribeClusterSubnetGroups": {"action": "redshift:DescribeClusterSubnetGroups", "types": [], "resources": []}, "redshift:DescribeClusterTracks": {"action": "redshift:DescribeClusterTracks", "types": [], "resources": []}, "redshift:DescribeClusterVersions": {"action": "redshift:DescribeClusterVersions", "types": [], "resources": []}, @@ -3111,7 +3111,7 @@ "redshift:DescribeInboundIntegrations": {"action": "redshift:DescribeInboundIntegrations", "types": [], "resources": []}, "redshift:DescribeIntegrations": {"action": "redshift:DescribeIntegrations", "types": ["integration"], "resources": [{"types": ["integration"], "arn": "IntegrationArn"}, {"type": "integration", "fill": {}, "when": {"IntegrationArn": [null]}, "default": true}]}, "redshift:DescribeLoggingStatus": {"action": "redshift:DescribeLoggingStatus", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, - "redshift:DescribeNodeConfigurationOptions": {"action": "redshift:DescribeNodeConfigurationOptions", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, + "redshift:DescribeNodeConfigurationOptions": {"action": "redshift:DescribeNodeConfigurationOptions", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:DescribeOrderableClusterOptions": {"action": "redshift:DescribeOrderableClusterOptions", "types": [], "resources": []}, "redshift:DescribePartners": {"action": "redshift:DescribePartners", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:DescribeQev2IdcApplications": {"action": "redshift:DescribeQev2IdcApplications", "types": [], "resources": []}, @@ -3150,7 +3150,7 @@ "redshift:ModifyClusterSnapshot": {"action": "redshift:ModifyClusterSnapshot", "types": ["snapshot"], "resources": [{"type": "snapshot", "fill": {"SnapshotName": "SnapshotIdentifier"}}]}, "redshift:ModifyClusterSnapshotSchedule": {"action": "redshift:ModifyClusterSnapshotSchedule", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:ModifyClusterSubnetGroup": {"action": "redshift:ModifyClusterSubnetGroup", "types": ["subnetgroup"], "resources": [{"type": "subnetgroup", "fill": {"SubnetGroupName": "ClusterSubnetGroupName"}}]}, - "redshift:ModifyCustomDomainAssociation": {"action": "redshift:ModifyCustomDomainAssociation", "types": ["cluster"], "resources": [{"types": ["cluster"], "arn": "CustomDomainCertificateArn"}, {"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, + "redshift:ModifyCustomDomainAssociation": {"action": "redshift:ModifyCustomDomainAssociation", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:ModifyEndpointAccess": {"action": "redshift:ModifyEndpointAccess", "types": [], "resources": []}, "redshift:ModifyEventSubscription": {"action": "redshift:ModifyEventSubscription", "types": ["eventsubscription"], "resources": [{"types": ["eventsubscription"], "arn": "SnsTopicArn"}, {"type": "eventsubscription", "fill": {"EventSubscriptionName": "SubscriptionName"}}]}, "redshift:ModifyIntegration": {"action": "redshift:ModifyIntegration", "types": ["integration"], "resources": [{"types": ["integration"], "arn": "IntegrationArn"}]}, @@ -3174,7 +3174,7 @@ "redshift:ResumeCluster": {"action": "redshift:ResumeCluster", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:RevokeClusterSecurityGroupIngress": {"action": "redshift:RevokeClusterSecurityGroupIngress", "types": ["securitygroup", "securitygroupingress-ec2securitygroup"], "resources": []}, "redshift:RevokeEndpointAccess": {"action": "redshift:RevokeEndpointAccess", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, - "redshift:RevokeSnapshotAccess": {"action": "redshift:RevokeSnapshotAccess", "types": ["cluster", "snapshot"], "resources": [{"types": ["cluster", "snapshot"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "SnapshotClusterIdentifier"}}, {"type": "snapshot", "fill": {"ClusterName": "SnapshotClusterIdentifier", "SnapshotName": "SnapshotIdentifier"}}]}, + "redshift:RevokeSnapshotAccess": {"action": "redshift:RevokeSnapshotAccess", "types": ["cluster", "snapshot"], "resources": [{"types": ["cluster", "snapshot"], "arn": "SnapshotArn"}, {"type": "cluster", "fill": {"ClusterName": "SnapshotClusterIdentifier"}}, {"type": "snapshot", "fill": {"ClusterName": "SnapshotClusterIdentifier", "SnapshotName": "SnapshotIdentifier"}, "unless": {"SnapshotIdentifier": [null]}}]}, "redshift:RotateEncryptionKey": {"action": "redshift:RotateEncryptionKey", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "redshift:UpdatePartnerStatus": {"action": "redshift:UpdatePartnerStatus", "types": ["cluster"], "resources": [{"type": "cluster", "fill": {"ClusterName": "ClusterIdentifier"}}]}, "rekognition:AssociateFaces": {"action": "rekognition:AssociateFaces", "types": ["collection"], "resources": [{"type": "collection", "fill": {"CollectionId": "CollectionId"}}]}, @@ -3185,7 +3185,7 @@ "rekognition:CreateFaceLivenessSession": {"action": "rekognition:CreateFaceLivenessSession", "types": [], "resources": []}, "rekognition:CreateProject": {"action": "rekognition:CreateProject", "types": [], "resources": [], "makes": [{"type": "project", "fill": {"ProjectName": "ProjectName"}}]}, "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:CreateStreamProcessor": {"action": "rekognition:CreateStreamProcessor", "types": ["collection"], "resources": [{"types": ["collection"], "arn": "NotificationChannel.SNSTopicArn"}]}, "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"}]}, @@ -3193,13 +3193,13 @@ "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:DeleteStreamProcessor": {"action": "rekognition:DeleteStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {}, "find": ["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:DescribeStreamProcessor": {"action": "rekognition:DescribeStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {}, "find": ["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": []}, @@ -3238,20 +3238,20 @@ "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:StartFaceSearch": {"action": "rekognition:StartFaceSearch", "types": ["collection"], "resources": [{"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:StartStreamProcessor": {"action": "rekognition:StartStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {}, "find": ["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:StopStreamProcessor": {"action": "rekognition:StopStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {}, "find": ["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"}}]}, + "rekognition:UpdateStreamProcessor": {"action": "rekognition:UpdateStreamProcessor", "types": ["streamprocessor"], "resources": [{"type": "streamprocessor", "fill": {}, "find": ["Name"]}]}, "resource-explorer-2:AssociateDefaultView": {"action": "resource-explorer-2:AssociateDefaultView", "types": [], "resources": []}, "resource-explorer-2:BatchGetView": {"action": "resource-explorer-2:BatchGetView", "types": [], "resources": []}, "resource-explorer-2:CreateIndex": {"action": "resource-explorer-2:CreateIndex", "types": [], "resources": [], "makes": [{"type": "index", "fill": {}}]}, @@ -3411,7 +3411,7 @@ "securityhub:DisassociateFromAdministratorAccount": {"action": "securityhub:DisassociateFromAdministratorAccount", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, "securityhub:DisassociateFromMasterAccount": {"action": "securityhub:DisassociateFromMasterAccount", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, "securityhub:DisassociateMembers": {"action": "securityhub:DisassociateMembers", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, - "securityhub:EnableImportFindingsForProduct": {"action": "securityhub:EnableImportFindingsForProduct", "types": ["hub"], "resources": [{"types": ["hub"], "arn": "ProductArn"}, {"type": "hub", "fill": {}}]}, + "securityhub:EnableImportFindingsForProduct": {"action": "securityhub:EnableImportFindingsForProduct", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, "securityhub:EnableOrganizationAdminAccount": {"action": "securityhub:EnableOrganizationAdminAccount", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, "securityhub:EnableSecurityHub": {"action": "securityhub:EnableSecurityHub", "types": ["hub"], "resources": [{"type": "hub", "fill": {}}]}, "securityhub:EnableSecurityHubFeatureV2": {"action": "securityhub:EnableSecurityHubFeatureV2", "types": ["hubv2"], "resources": []}, @@ -3492,8 +3492,8 @@ "servicediscovery:DeleteService": {"action": "servicediscovery:DeleteService", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "Id"}}]}, "servicediscovery:DeleteServiceAttributes": {"action": "servicediscovery:DeleteServiceAttributes", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]}, "servicediscovery:DeregisterInstance": {"action": "servicediscovery:DeregisterInstance", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]}, - "servicediscovery:DiscoverInstances": {"action": "servicediscovery:DiscoverInstances", "types": ["namespace", "service"], "resources": []}, - "servicediscovery:DiscoverInstancesRevision": {"action": "servicediscovery:DiscoverInstancesRevision", "types": ["namespace", "service"], "resources": []}, + "servicediscovery:DiscoverInstances": {"action": "servicediscovery:DiscoverInstances", "types": ["namespace", "service"], "resources": [{"type": "service", "fill": {}, "find": ["ServiceName"]}]}, + "servicediscovery:DiscoverInstancesRevision": {"action": "servicediscovery:DiscoverInstancesRevision", "types": ["namespace", "service"], "resources": [{"type": "service", "fill": {}, "find": ["ServiceName"]}]}, "servicediscovery:GetInstance": {"action": "servicediscovery:GetInstance", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]}, "servicediscovery:GetInstancesHealthStatus": {"action": "servicediscovery:GetInstancesHealthStatus", "types": ["service"], "resources": [{"type": "service", "fill": {"ServiceId": "ServiceId"}}]}, "servicediscovery:GetNamespace": {"action": "servicediscovery:GetNamespace", "types": ["namespace"], "resources": [{"type": "namespace", "fill": {"NamespaceId": "Id"}}]}, @@ -3565,11 +3565,11 @@ "ssm:CancelMaintenanceWindowExecution": {"action": "ssm:CancelMaintenanceWindowExecution", "types": ["maintenancewindow"], "resources": []}, "ssm:CreateActivation": {"action": "ssm:CreateActivation", "types": [], "resources": []}, "ssm:CreateAssociation": {"action": "ssm:CreateAssociation", "types": ["association", "document", "instance", "managed-instance"], "resources": [{"type": "association", "fill": {}, "made": true}, {"type": "document", "fill": {"DocumentName": "Name"}}]}, - "ssm:CreateAssociationBatch": {"action": "ssm:CreateAssociationBatch", "types": ["document", "instance", "managed-instance"], "resources": []}, - "ssm:CreateCloudConnector": {"action": "ssm:CreateCloudConnector", "types": ["cloud-connector"], "resources": [{"types": ["cloud-connector"], "arn": "ConfigConnectorArn"}, {"types": ["cloud-connector"], "arn": "RoleArn"}, {"type": "cloud-connector", "fill": {}}]}, + "ssm:CreateAssociationBatch": {"action": "ssm:CreateAssociationBatch", "types": ["document", "instance", "managed-instance"], "resources": [{"type": "instance", "fill": {"InstanceId": "Entries[].InstanceId"}}]}, + "ssm:CreateCloudConnector": {"action": "ssm:CreateCloudConnector", "types": ["cloud-connector"], "resources": [{"type": "cloud-connector", "fill": {}}]}, "ssm:CreateDocument": {"action": "ssm:CreateDocument", "types": ["document"], "resources": [{"type": "document", "fill": {"DocumentName": "Name"}}]}, "ssm:CreateMaintenanceWindow": {"action": "ssm:CreateMaintenanceWindow", "types": [], "resources": [], "makes": [{"type": "maintenancewindow", "fill": {}}]}, - "ssm:CreateOpsItem": {"action": "ssm:CreateOpsItem", "types": [], "resources": [], "makes": [{"type": "opsitem", "fill": {"ResourceId": "Source"}}]}, + "ssm:CreateOpsItem": {"action": "ssm:CreateOpsItem", "types": [], "resources": [], "makes": [{"type": "opsitem", "fill": {}}]}, "ssm:CreateOpsMetadata": {"action": "ssm:CreateOpsMetadata", "types": [], "resources": [], "makes": [{"type": "opsmetadata", "fill": {"ResourceId": "ResourceId"}}]}, "ssm:CreatePatchBaseline": {"action": "ssm:CreatePatchBaseline", "types": [], "resources": [], "makes": [{"type": "patchbaseline", "fill": {}}]}, "ssm:CreateResourceDataSync": {"action": "ssm:CreateResourceDataSync", "types": ["resourcedatasync"], "resources": [{"types": ["resourcedatasync"], "arn": "S3Destination.AWSKMSKeyARN"}, {"type": "resourcedatasync", "fill": {"SyncName": "SyncName"}}]}, @@ -3674,7 +3674,7 @@ "ssm:ListResourceDataSync": {"action": "ssm:ListResourceDataSync", "types": [], "resources": []}, "ssm:ListTagsForResource": {"action": "ssm:ListTagsForResource", "types": ["association", "automation-execution", "cloud-connector", "document", "maintenancewindow", "managed-instance", "opsitem", "opsmetadata", "parameter", "patchbaseline"], "resources": [{"type": "association", "fill": {"AssociationId": "ResourceId"}, "when": {"ResourceType": ["Association"]}}, {"type": "cloud-connector", "fill": {"CloudConnectorId": "ResourceId"}, "when": {"ResourceType": ["CloudConnector"]}}, {"type": "document", "fill": {"DocumentName": "ResourceId"}, "when": {"ResourceType": ["Document"]}}, {"type": "maintenancewindow", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["MaintenanceWindow"]}}, {"type": "managed-instance", "fill": {"InstanceId": "ResourceId"}, "when": {"ResourceType": ["ManagedInstance"]}}, {"type": "opsitem", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["OpsItem"]}}, {"type": "opsmetadata", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["OpsMetadata"]}}, {"type": "parameter", "fill": {"ParameterNameWithoutLeadingSlash": "ResourceId"}, "when": {"ResourceType": ["Parameter"]}}, {"type": "patchbaseline", "fill": {"PatchBaselineIdResourceId": "ResourceId"}, "when": {"ResourceType": ["PatchBaseline"]}}]}, "ssm:ModifyDocumentPermission": {"action": "ssm:ModifyDocumentPermission", "types": ["document"], "resources": [{"type": "document", "fill": {"DocumentName": "Name"}}]}, - "ssm:PutComplianceItems": {"action": "ssm:PutComplianceItems", "types": ["instance", "managed-instance"], "resources": []}, + "ssm:PutComplianceItems": {"action": "ssm:PutComplianceItems", "types": ["instance", "managed-instance"], "resources": [{"types": ["instance", "managed-instance"], "through": "ResourceId"}]}, "ssm:PutInventory": {"action": "ssm:PutInventory", "types": [], "resources": [], "makes": [{"type": "managed-instance-inventory", "fill": {"InstanceId": "InstanceId"}}]}, "ssm:PutParameter": {"action": "ssm:PutParameter", "types": ["parameter"], "resources": [{"type": "parameter", "fill": {"ParameterNameWithoutLeadingSlash": "Name"}}]}, "ssm:PutResourcePolicy": {"action": "ssm:PutResourcePolicy", "types": ["document", "opsitemgroup", "parameter"], "resources": [{"types": ["document", "opsitemgroup", "parameter"], "arn": "ResourceArn"}]}, @@ -3682,9 +3682,9 @@ "ssm:RegisterDefaultPatchBaseline": {"action": "ssm:RegisterDefaultPatchBaseline", "types": ["patchbaseline"], "resources": [{"type": "patchbaseline", "fill": {"PatchBaselineIdResourceId": "BaselineId"}}]}, "ssm:RegisterPatchBaselineForPatchGroup": {"action": "ssm:RegisterPatchBaselineForPatchGroup", "types": ["patchbaseline"], "resources": [{"type": "patchbaseline", "fill": {"PatchBaselineIdResourceId": "BaselineId"}}]}, "ssm:RegisterTargetWithMaintenanceWindow": {"action": "ssm:RegisterTargetWithMaintenanceWindow", "types": ["maintenancewindow"], "resources": [{"type": "maintenancewindow", "fill": {"ResourceId": "WindowId"}}]}, - "ssm:RegisterTaskWithMaintenanceWindow": {"action": "ssm:RegisterTaskWithMaintenanceWindow", "types": ["maintenancewindow"], "resources": [{"types": ["maintenancewindow"], "arn": "ServiceRoleArn"}, {"types": ["maintenancewindow"], "arn": "TaskArn"}, {"type": "maintenancewindow", "fill": {"ResourceId": "WindowId"}}]}, + "ssm:RegisterTaskWithMaintenanceWindow": {"action": "ssm:RegisterTaskWithMaintenanceWindow", "types": ["maintenancewindow"], "resources": [{"types": ["maintenancewindow"], "arn": "ServiceRoleArn"}, {"type": "maintenancewindow", "fill": {"ResourceId": "WindowId"}}]}, "ssm:RemoveTagsFromResource": {"action": "ssm:RemoveTagsFromResource", "types": ["association", "automation-execution", "cloud-connector", "document", "instance", "maintenancewindow", "managed-instance", "opsitem", "opsmetadata", "parameter", "patchbaseline", "task"], "resources": [{"type": "association", "fill": {"AssociationId": "ResourceId"}, "when": {"ResourceType": ["Association"]}}, {"type": "cloud-connector", "fill": {"CloudConnectorId": "ResourceId"}, "when": {"ResourceType": ["CloudConnector"]}}, {"type": "document", "fill": {"DocumentName": "ResourceId"}, "when": {"ResourceType": ["Document"]}}, {"type": "maintenancewindow", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["MaintenanceWindow"]}}, {"type": "managed-instance", "fill": {"InstanceId": "ResourceId"}, "when": {"ResourceType": ["ManagedInstance"]}}, {"type": "opsitem", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["OpsItem"]}}, {"type": "opsmetadata", "fill": {"ResourceId": "ResourceId"}, "when": {"ResourceType": ["OpsMetadata"]}}, {"type": "parameter", "fill": {"ParameterNameWithoutLeadingSlash": "ResourceId"}, "when": {"ResourceType": ["Parameter"]}}, {"type": "patchbaseline", "fill": {"PatchBaselineIdResourceId": "ResourceId"}, "when": {"ResourceType": ["PatchBaseline"]}}]}, - "ssm:ResetServiceSetting": {"action": "ssm:ResetServiceSetting", "types": ["servicesetting"], "resources": [{"type": "servicesetting", "fill": {"ResourceId": "SettingId"}}]}, + "ssm:ResetServiceSetting": {"action": "ssm:ResetServiceSetting", "types": ["servicesetting"], "resources": [{"types": ["servicesetting"], "arn": "SettingId"}, {"type": "servicesetting", "fill": {"ResourceId": "SettingId"}}]}, "ssm:ResumeSession": {"action": "ssm:ResumeSession", "types": ["session"], "resources": [{"type": "session", "fill": {"SessionId": "SessionId"}}]}, "ssm:SendAutomationSignal": {"action": "ssm:SendAutomationSignal", "types": ["automation-execution"], "resources": [{"type": "automation-execution", "fill": {"AutomationExecutionId": "AutomationExecutionId"}}]}, "ssm:SendCommand": {"action": "ssm:SendCommand", "types": ["bucket", "document", "instance", "managed-instance"], "resources": [{"types": ["bucket", "document", "instance", "managed-instance"], "arn": "NotificationConfig.NotificationArn"}, {"types": ["bucket", "document", "instance", "managed-instance"], "arn": "ServiceRoleArn"}, {"type": "bucket", "fill": {"BucketName": "OutputS3BucketName"}}, {"type": "document", "fill": {"DocumentName": "DocumentName"}}]}, @@ -3711,15 +3711,15 @@ "ssm:UpdateOpsMetadata": {"action": "ssm:UpdateOpsMetadata", "types": ["opsmetadata"], "resources": [{"types": ["opsmetadata"], "arn": "OpsMetadataArn"}]}, "ssm:UpdatePatchBaseline": {"action": "ssm:UpdatePatchBaseline", "types": ["patchbaseline"], "resources": [{"type": "patchbaseline", "fill": {"PatchBaselineIdResourceId": "BaselineId"}}]}, "ssm:UpdateResourceDataSync": {"action": "ssm:UpdateResourceDataSync", "types": ["resourcedatasync"], "resources": [{"type": "resourcedatasync", "fill": {"SyncName": "SyncName"}}]}, - "ssm:UpdateServiceSetting": {"action": "ssm:UpdateServiceSetting", "types": ["servicesetting"], "resources": [{"type": "servicesetting", "fill": {"ResourceId": "SettingId"}}]}, + "ssm:UpdateServiceSetting": {"action": "ssm:UpdateServiceSetting", "types": ["servicesetting"], "resources": [{"types": ["servicesetting"], "arn": "SettingId"}, {"type": "servicesetting", "fill": {"ResourceId": "SettingId"}}]}, "ssm:ValidateCloudConnector": {"action": "ssm:ValidateCloudConnector", "types": ["cloud-connector"], "resources": [{"type": "cloud-connector", "fill": {"CloudConnectorId": "CloudConnectorId"}}]}, "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:AttachManagedPolicyToPermissionSet": {"action": "sso:AttachManagedPolicyToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"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:CreateInstance": {"action": "sso:CreateInstance", "types": ["Instance"], "resources": [{"type": "Instance", "fill": {}, "find": ["Name"]}]}, "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}]}, @@ -3747,7 +3747,7 @@ "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:DetachManagedPolicyFromPermissionSet": {"action": "sso:DetachManagedPolicyFromPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"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"}]}, @@ -3765,7 +3765,7 @@ "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:ListApplicationAssignmentsForPrincipal": {"action": "sso:ListApplicationAssignmentsForPrincipal", "types": ["Instance"], "resources": [{"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": []}, @@ -3780,19 +3780,19 @@ "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"}, {"type": "Instance", "fill": {}, "when": {"InstanceArn": [null]}, "default": true}]}, "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: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"}}]}, "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:PutPermissionsBoundaryToPermissionSet": {"action": "sso:PutPermissionsBoundaryToPermissionSet", "types": ["Instance", "PermissionSet"], "resources": [{"types": ["Instance", "PermissionSet"], "arn": "InstanceArn"}, {"types": ["Instance", "PermissionSet"], "arn": "PermissionSetArn"}]}, "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"}, {"type": "Instance", "fill": {}, "when": {"InstanceArn": [null]}, "default": true}]}, "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"}, {"type": "Instance", "fill": {}, "when": {"InstanceArn": [null]}, "default": true}]}, "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:UpdateInstance": {"action": "sso:UpdateInstance", "types": ["Instance"], "resources": [{"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"}]}, @@ -3823,8 +3823,8 @@ "states:SendTaskFailure": {"action": "states:SendTaskFailure", "types": [], "resources": [{"type": "activity", "fill": {}, "find": ["taskToken"]}, {"type": "statemachine", "fill": {}, "find": ["taskToken"]}]}, "states:SendTaskHeartbeat": {"action": "states:SendTaskHeartbeat", "types": [], "resources": [{"type": "activity", "fill": {}, "find": ["taskToken"]}, {"type": "statemachine", "fill": {}, "find": ["taskToken"]}]}, "states:SendTaskSuccess": {"action": "states:SendTaskSuccess", "types": [], "resources": [{"type": "activity", "fill": {}, "find": ["taskToken"]}, {"type": "statemachine", "fill": {}, "find": ["taskToken"]}]}, - "states:StartExecution": {"action": "states:StartExecution", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "stateMachineArn", "before": "#"}], "creates": [{"type": "execution", "parent": "statemachine", "arn": "stateMachineArn"}]}, - "states:StartSyncExecution": {"action": "states:StartSyncExecution", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "stateMachineArn", "before": "#"}], "creates": [{"type": "execution", "parent": "statemachine", "arn": "stateMachineArn"}]}, + "states:StartExecution": {"action": "states:StartExecution", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "stateMachineArn"}], "creates": [{"type": "execution", "parent": "statemachine", "arn": "stateMachineArn"}]}, + "states:StartSyncExecution": {"action": "states:StartSyncExecution", "types": ["statemachine"], "resources": [{"types": ["statemachine"], "arn": "stateMachineArn"}], "creates": [{"type": "execution", "parent": "statemachine", "arn": "stateMachineArn"}]}, "states:StopExecution": {"action": "states:StopExecution", "types": ["execution"], "resources": [{"types": ["execution"], "arn": "executionArn"}]}, "states:TagResource": {"action": "states:TagResource", "types": ["activity", "statemachine"], "resources": [{"types": ["activity", "statemachine"], "arn": "resourceArn"}]}, "states:TestState": {"action": "states:TestState", "types": [], "resources": []}, @@ -3904,7 +3904,7 @@ "xray:BatchGetTraces": {"action": "xray:BatchGetTraces", "types": [], "resources": []}, "xray:CancelTraceRetrieval": {"action": "xray:CancelTraceRetrieval", "types": [], "resources": []}, "xray:CreateGroup": {"action": "xray:CreateGroup", "types": ["group"], "resources": [{"type": "group", "fill": {"GroupName": "GroupName"}}]}, - "xray:CreateSamplingRule": {"action": "xray:CreateSamplingRule", "types": ["sampling-rule"], "resources": [{"types": ["sampling-rule"], "arn": "SamplingRule.ResourceARN"}, {"types": ["sampling-rule"], "arn": "SamplingRule.RuleARN"}, {"type": "sampling-rule", "fill": {}}]}, + "xray:CreateSamplingRule": {"action": "xray:CreateSamplingRule", "types": ["sampling-rule"], "resources": [{"types": ["sampling-rule"], "arn": "SamplingRule.ResourceARN"}, {"types": ["sampling-rule"], "arn": "SamplingRule.RuleARN"}, {"type": "sampling-rule", "fill": {"SamplingRuleName": "SamplingRule.RuleName"}}]}, "xray:DeleteGroup": {"action": "xray:DeleteGroup", "types": ["group"], "resources": [{"types": ["group"], "arn": "GroupARN"}, {"type": "group", "fill": {"GroupName": "GroupName"}}]}, "xray:DeleteResourcePolicy": {"action": "xray:DeleteResourcePolicy", "types": [], "resources": []}, "xray:DeleteSamplingRule": {"action": "xray:DeleteSamplingRule", "types": ["sampling-rule"], "resources": [{"types": ["sampling-rule"], "arn": "RuleARN"}, {"type": "sampling-rule", "fill": {"SamplingRuleName": "RuleName"}}]}, @@ -3937,7 +3937,7 @@ "xray:UntagResource": {"action": "xray:UntagResource", "types": ["group", "sampling-rule"], "resources": [{"types": ["group", "sampling-rule"], "arn": "ResourceARN"}]}, "xray:UpdateGroup": {"action": "xray:UpdateGroup", "types": ["group"], "resources": [{"types": ["group"], "arn": "GroupARN"}, {"type": "group", "fill": {"GroupName": "GroupName"}}]}, "xray:UpdateIndexingRule": {"action": "xray:UpdateIndexingRule", "types": [], "resources": []}, - "xray:UpdateSamplingRule": {"action": "xray:UpdateSamplingRule", "types": ["sampling-rule"], "resources": [{"types": ["sampling-rule"], "arn": "SamplingRuleUpdate.ResourceARN"}, {"types": ["sampling-rule"], "arn": "SamplingRuleUpdate.RuleARN"}]}, + "xray:UpdateSamplingRule": {"action": "xray:UpdateSamplingRule", "types": ["sampling-rule"], "resources": [{"types": ["sampling-rule"], "arn": "SamplingRuleUpdate.ResourceARN"}, {"types": ["sampling-rule"], "arn": "SamplingRuleUpdate.RuleARN"}, {"type": "sampling-rule", "fill": {"SamplingRuleName": "SamplingRuleUpdate.RuleName"}}]}, "xray:UpdateTraceSegmentDestination": {"action": "xray:UpdateTraceSegmentDestination", "types": [], "resources": []} } } diff --git a/src/main/resources/aws/iam-tag-on-create.json b/src/main/resources/aws/iam-tag-on-create.json index e6015c0a34..59c825f17d 100644 --- a/src/main/resources/aws/iam-tag-on-create.json +++ b/src/main/resources/aws/iam-tag-on-create.json @@ -1,5 +1,5 @@ { - "_source": {"generator": "tools/aws/regen_iam_tag_on_create.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-12", "note": "make iam-tag-on-create-check re-derives every member from botocore; make iam-tag-on-create-verify checks every operation against AWS."}, + "_source": {"generator": "tools/aws/regen_iam_tag_on_create.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-13", "note": "make iam-tag-on-create-check re-derives every member from botocore; make iam-tag-on-create-verify checks every operation against AWS."}, "namespaces": {"access-analyzer": ["accessanalyzer"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "autoscaling": ["autoscaling"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudformation"], "cloudhsm": ["cloudhsmv2"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codedeploy": ["codedeploy"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "lightsail": ["lightsail"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "network-firewall": ["network-firewall"], "oam": ["oam"], "organizations": ["organizations"], "payment-cryptography": ["payment-cryptography"], "pipes": ["pipes"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53resolver": ["route53resolver"], "sagemaker": ["sagemaker"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "ses": ["mailmanager", "pinpoint-email", "ses", "sesv2"], "signer": ["signer"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "swf": ["swf"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "transcribe": ["transcribe"], "transfer": ["transfer"], "translate": ["translate"], "wafv2": ["wafv2"], "xray": ["xray"]}, "notCovered": {"airflow": "REST routes no rule maps yet", "app-integrations": "REST routes no rule maps yet", "appconfig": "REST routes no rule maps yet", "appsync": "REST routes no rule maps yet", "aps": "REST routes no rule maps yet", "aws-marketplace": "REST routes no rule maps yet", "backup": "REST routes no rule maps yet", "batch": "REST routes no rule maps yet", "bedrock": "REST routes no rule maps yet", "bedrock-agentcore": "REST routes no rule maps yet", "cloudfront": "its creation tags are a Tags structure holding Items, which this file does not read yet", "codeguru-reviewer": "REST routes no rule maps yet", "connect": "REST routes no rule maps yet", "detective": "REST routes no rule maps yet", "dlm": "REST routes no rule maps yet", "elasticfilesystem": "REST routes no rule maps yet", "inspector2": "REST routes no rule maps yet", "iot": "REST routes no rule maps yet", "kafka": "REST routes no rule maps yet", "mq": "REST routes no rule maps yet", "quicksight": "metadata-only REST subset; creation-tag IAM authorization is not implemented", "rum": "REST routes no rule maps yet", "s3": "authorized by route; S3 checks s3:PutObjectTagging for an object it creates with tags itself", "s3tables": "REST routes no rule maps yet", "servicecatalog": "its operations that tag are AppRegistry's, whose REST routes no rule maps yet"}, "otherNamespaces": ["account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifyuibuilder", "aoss", "appfabric", "appflow", "application-signals", "applicationinsights", "appmesh", "apprunner", "appstream", "arc-region-switch", "artifact", "auditmanager", "b2bi", "backup-gateway", "backup-search", "bcm-dashboards", "billing", "billingconductor", "braket", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "connect-campaigns", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "directconnect", "docdb-elastic", "drs", "ds", "ebs", "ecr-public", "elemental-inference", "emr-containers", "entityresolution", "evs", "fms", "forecast", "frauddetector", "fsx", "gamelift", "gameliftstreams", "geo", "grafana", "greengrass", "groundstation", "health-agent", "healthlake", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotdeviceadvisor", "iotfleetwise", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "ivs", "ivschat", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "m2", "managedblockchain", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgn", "migrationhub-orchestrator", "mobiletargeting", "mpa", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "notifications", "notifications-contacts", "observabilityadmin", "odb", "omics", "opensearch", "osis", "outposts", "partnercentral", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "profile", "proton", "qbusiness", "rbin", "refactor-spaces", "repostspace", "resiliencehub", "rolesanywhere", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3files", "sagemaker-geospatial", "savingsplans", "schemas", "scn", "security-ir", "securityagent", "securitylake", "shield", "sms-voice", "snow-device-management", "social-messaging", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "voiceid", "vpc-lattice", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workspaces", "workspaces-instances", "workspaces-web"], @@ -51,6 +51,7 @@ "cloudwatch:PutInsightRule": {"tagging": ["cloudwatch:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "cloudwatch:PutLogAlarm": {"tagging": ["cloudwatch:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "cloudwatch:PutMetricAlarm": {"tagging": ["cloudwatch:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, + "cloudwatch:PutMetricDataQueryDefinition": {"tagging": ["cloudwatch:TagResource"], "requestTags": true, "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "cloudwatch:PutMetricStream": {"tagging": ["cloudwatch:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "codedeploy:CreateApplication": {"tagging": ["codedeploy:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "Key", "value": "Value"}]}, "codedeploy:CreateDeploymentGroup": {"tagging": ["codedeploy:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "Key", "value": "Value"}]}, @@ -172,11 +173,13 @@ "ec2:CreateLocalGatewayVirtualInterfaceGroup": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateMacSystemIntegrityProtectionModificationTask": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateManagedPrefixList": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, + "ec2:CreateMetricCategory": {"tagging": ["ec2:CreateTags"], "createAction": true, "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "ec2:CreateNatGateway": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateNetworkAcl": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateNetworkInsightsAccessScope": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateNetworkInsightsPath": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateNetworkInterface": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, + "ec2:CreateNetworkingFlexCostAllocationPolicy": {"tagging": ["ec2:CreateTags"], "createAction": true, "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "ec2:CreatePlacementGroup": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreatePublicIpv4Pool": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, "ec2:CreateReplaceRootVolumeTask": {"tagging": ["ec2:CreateTags"], "createAction": true, "requestTags": true, "tags": [{"member": "TagSpecification[item].Tag[item]", "key": "Key", "value": "Value", "resourceType": "ResourceType"}]}, @@ -345,6 +348,7 @@ "lambda:CreateFunction": {"tagging": ["lambda:TagResource"], "requestTags": true, "tags": [{"member": "Tags{}"}]}, "lambda:CreateMicrovmImage": {"tagging": ["lambda:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]}, "lambda:CreateNetworkConnector": {"tagging": ["lambda:TagResource"], "requestTags": true, "tags": [{"member": "Tags{}"}]}, + "lambda:CreateRuntime": {"tagging": ["lambda:TagResource"], "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "lambda:CreateWebFunction": {"tagging": ["lambda:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]}, "lightsail:CreateBucket": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, "lightsail:CreateCertificate": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, @@ -363,6 +367,7 @@ "lightsail:CreateRelationalDatabase": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, "lightsail:CreateRelationalDatabaseFromSnapshot": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, "lightsail:CreateRelationalDatabaseSnapshot": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, + "lightsail:CreateSubdomain": {"tagging": ["lightsail:TagResource"], "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, "lightsail:PutAlarm": {"tagging": ["lightsail:TagResource"], "requestTags": true, "tags": [{"member": "tags[]", "key": "key", "value": "value"}]}, "logs:CreateDelivery": {"tagging": ["logs:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]}, "logs:CreateLogAnomalyDetector": {"tagging": ["logs:TagResource"], "requestTags": true, "tags": [{"member": "tags{}"}]}, @@ -390,9 +395,6 @@ "network-firewall:CreateFirewall": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "network-firewall:CreateFirewallPolicy": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "network-firewall:CreateFirewallPolicyV2": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "notRead": "the pinned botocore does not have the operation yet, so its request cannot be read"}, - "network-firewall:CreateProxy": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, - "network-firewall:CreateProxyConfiguration": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, - "network-firewall:CreateProxyRuleGroup": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "network-firewall:CreateRuleGroup": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "network-firewall:CreateTLSInspectionConfiguration": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, "network-firewall:CreateVpcEndpointAssociation": {"tagging": ["network-firewall:TagResource"], "requestTags": true, "tags": [{"member": "Tags[]", "key": "Key", "value": "Value"}]}, diff --git a/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java b/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java index 6b3b3cf024..9d33734387 100644 --- a/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java +++ b/src/test/java/io/floci/aws/core/common/RequestResourceMembersTest.java @@ -99,12 +99,13 @@ class RequestResourceMembersTest { "UpdateDeliveryConfiguration", "DeleteDelivery", "DescribeDeliveries") .map(operation -> "logs:" + operation).collect(Collectors.toSet()); Set expected = new HashSet<>(logsDelivery); - expected.add("dynamodb:ListTables"); expected.add("logs:PutDestination"); + // What AWS was measured to check where the Service Reference lists no resource type (MEASURED). + expected.add("dynamodb:ListTables"); assertEquals(expected, table.operations().keySet().stream() .filter(operation -> table.handBuilt().contains(operation.substring(0, operation.indexOf(':')))) .collect(Collectors.toSet()), - "only explicit corrections and the operations listed to read override hand-built operations"); + "only the operations listed to read override hand-built operations"); assertTrue(table.namespaces().stream().noneMatch(table.notCovered()::contains)); assertTrue(table.otherNamespaces().stream().noneMatch(table.notCovered()::contains)); table.operations().forEach((operation, resources) -> { @@ -178,7 +179,7 @@ class RequestResourceMembersTest { @Test void aDataApiSessionNamesTheClusterOrWorkgroupItRunsOnThroughItsSessionId() { Resource session = new Resource(List.of("cluster", "workgroup"), null, Map.of(), Map.of(), Map.of(), Map.of(), - Map.of(), null, null, Map.of(), false, List.of(), null, new Member("SessionId", false)); + null, Map.of(), false, List.of(), null, new Member("SessionId", false)); for (String operation : List.of("ExecuteStatement", "BatchExecuteStatement")) { assertEquals(session, RequestResourceMembers.table().operations().get("redshift-data:" + operation) .getLast(), operation); @@ -234,31 +235,31 @@ class RequestResourceMembersTest { assertThrows(IllegalStateException.class, () -> parse(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"" + bad + "\"}}")), bad); } - // A field of each of a list's structures fills a variable, read as given when absent or as an ARN, which - // only a member filling a variable is. + // A field of each of a list's structures fills a variable, read as given or as an ARN, which only a member + // filling a variable is. Member each = new Member("A", true, new Member("Name", false)); assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", each), Map.of(), Map.of(), - Map.of("A[].Name", "default"), Map.of("A[].Name", "thing"), null, null, Map.of(), false, null)), + Map.of("A[].Name", "thing"), null, Map.of(), false, null)), parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A[].Name\"}," - + "\"absent\":{\"A[].Name\":\"default\"},\"arnOf\":{\"A[].Name\":\"thing\"}}")) + + "\"arnOf\":{\"A[].Name\":\"thing\"}}")) .operations().get("a:Op")); assertEquals("A[].Name", each.path()); - for (String bad : List.of("\"absent\":{\"A[].Name\":\"default\"}", "\"arnOf\":{\"A[].Name\":\"thing\"}")) { + for (String bad : List.of("\"arnOf\":{\"A[].Name\":\"thing\"}")) { assertThrows(IllegalStateException.class, () -> parse(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," + bad + "}")), bad); } // A field of a structure fills a variable, as one value. Member field = new Member("A", false, new Member("Name", false)); assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", field), Map.of(), Map.of(), - Map.of("A.Name", "default"), Map.of(), null, null, Map.of(), false, null)), - parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A.Name\"}," - + "\"absent\":{\"A.Name\":\"default\"}}")).operations().get("a:Op")); + Map.of(), null, Map.of(), false, null)), + parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A.Name\"}}")) + .operations().get("a:Op")); assertEquals("A.Name", field.path()); // A variable fixed to the one value its handler uses, and one fixed that is no variable, that a member fills, // or to no value. String owned = "\"arnFormats\":{\"a\":{\"thing\":\"arn:${Partition}:a:${Region}:${Account}:thing/${Owner}/${ThingName}\"}}"; assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Name", false)), Map.of(), - Map.of(), Map.of(), Map.of(), null, null, Map.of("Owner", "Custom"), false, null)), + Map.of(), Map.of(), null, Map.of("Owner", "Custom"), false, null)), parseUnchecked(document(owned, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," + "\"fixed\":{\"Owner\":\"Custom\"}}")).operations().get("a:Op")); for (String bad : List.of("{\"Other\":\"Custom\"}", "{\"ThingName\":\"Custom\"}", "{\"Owner\":\"\"}", @@ -276,16 +277,15 @@ class RequestResourceMembersTest { "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},\"made\":" + bad + "}")), bad); } assertEquals(List.of(new Resource(List.of("thing"), new Member("A", true, new Member("ThingArns", true)), Map.of(), - Map.of(), Map.of(), Map.of(), Map.of(), null, null, Map.of(), false, null)), parseUnchecked(document(formats, "{\"types\":[\"thing\"],\"arn\":\"A[].ThingArns[]\"}")) + Map.of(), Map.of(), Map.of(), null, Map.of(), false, null)), parseUnchecked(document(formats, "{\"types\":[\"thing\"],\"arn\":\"A[].ThingArns[]\"}")) .operations().get("a:Op")); - // A member read before more than one character, holding an ARN or filling a variable. - assertThrows(IllegalStateException.class, () -> parse(document(formats, - "{\"types\":[\"thing\"],\"arn\":\"ThingArn\",\"before\":\"##\"}"))); - assertThrows(IllegalStateException.class, () -> parse(document(formats, - "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Id\"},\"before\":\"##\"}"))); - // A member filling a variable read up to a character, as a CodeBuild build id names its project. - assertEquals(":", parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Id\"}," - + "\"before\":\":\"}")).operations().get("a:Op").getFirst().before()); + // A key no resource of its kind has, as one the table no longer writes, fails rather than being ignored. + for (String bad : List.of("{\"types\":[\"thing\"],\"arn\":\"ThingArn\",\"before\":\"#\"}", + "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Id\"},\"before\":\":\"}", + "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},\"absent\":{\"Name\":\"default\"}}", + "{\"types\":[\"thing\"],\"arn\":\"ThingArn\",\"when\":{\"Type\":[\"a\"]}}")) { + assertThrows(IllegalStateException.class, () -> parse(document(formats, bad)), bad); + } // An account from a list, or for a type whose format has no account. assertThrows(IllegalStateException.class, () -> parse(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"},\"account\":\"Ids[]\"}"))); @@ -306,22 +306,21 @@ class RequestResourceMembersTest { } assertTrue(parseUnchecked("{\"namespaces\":{\"a\":[]}," + parts + ",\"mintedIds\":{\"a\":[\"thing\"]}," + "\"operations\":{\"a:Op\":{\"resources\":[]}}}").formats().get("a").get("thing").minted()); - // A member read when absent as no value, or as an ARN of a type with no format or of more than one variable. - for (String bad : List.of("\"absent\":{\"Bus\":\"\"}", "\"absent\":{\"Bus[]\":\"default\"}", - "\"arnOf\":{\"Bus\":\"other\"}", "\"arnOf\":{\"Bus\":\"part\"}", "\"unless\":{\"Bus\":[]}")) { + // A member read as an ARN of a type with no format or of more than one variable. + for (String bad : List.of("\"arnOf\":{\"Bus\":\"other\"}", "\"arnOf\":{\"Bus\":\"part\"}", + "\"unless\":{\"Bus\":[]}")) { assertThrows(IllegalStateException.class, () -> parse(document("\"arnFormats\":{\"a\":{" + "\"thing\":\"arn:${Partition}:a:${Region}:${Account}:thing/${ThingName}\"," + "\"part\":\"arn:${Partition}:a:${Region}:${Account}:part/${ThingName}/${PartId}\"}}", "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," + bad + "}")), bad); } assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Name", false)), - Map.of(), Map.of("Bus", List.of("default")), Map.of("Bus", "default"), Map.of("Bus", "thing"), null, null, - Map.of(), false, null)), + Map.of(), Map.of("Bus", List.of("default")), Map.of("Bus", "thing"), null, Map.of(), false, null)), parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}," - + "\"unless\":{\"Bus\":[\"default\"]},\"absent\":{\"Bus\":\"default\"}," - + "\"arnOf\":{\"Bus\":\"thing\"}}")).operations().get("a:Op")); + + "\"unless\":{\"Bus\":[\"default\"]},\"arnOf\":{\"Bus\":\"thing\"}}")) + .operations().get("a:Op")); assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Names", true)), Map.of(), - Map.of(), Map.of(), Map.of(), new Member("registryId", false), null, Map.of(), false, null)), + Map.of(), Map.of(), new Member("registryId", false), Map.of(), false, null)), parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Names[]\"}," + "\"account\":\"registryId\"}")).operations().get("a:Op")); } @@ -342,7 +341,7 @@ class RequestResourceMembersTest { // The resource a create acting on no type makes, of its variables alone; and none for a create acting on one. String makes = "\"makes\":[{\"type\":\"thing\",\"fill\":{\"ThingName\":\"Name\"}}]"; assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", new Member("Name", false)), Map.of(), - Map.of(), Map.of(), Map.of(), null, null, Map.of(), false, null)), + Map.of(), Map.of(), null, Map.of(), false, null)), parseUnchecked("{\"namespaces\":{\"a\":[]}," + formats + ",\"operations\":{\"a:Op\":{\"types\":[]," + "\"resources\":[]," + makes + "}}}").makes().get("a:Op")); for (String bad : List.of("\"types\":[\"thing\"],\"resources\":[]," + makes, "\"types\":[],\"resources\":[]," @@ -354,7 +353,7 @@ class RequestResourceMembersTest { // A field of each of a map's structure values fills a variable, one value for each. Member each = new Member("A", false, new Member("Name", false), true); assertEquals(List.of(new Resource(List.of("thing"), null, Map.of("ThingName", each), Map.of(), Map.of(), Map.of(), - Map.of(), null, null, Map.of(), false, null)), + null, Map.of(), false, null)), parseUnchecked(document(formats, "{\"type\":\"thing\",\"fill\":{\"ThingName\":\"A{}.Name\"}}")) .operations().get("a:Op")); assertEquals("A{}.Name", each.path()); @@ -555,6 +554,12 @@ class RequestResourceMembersTest { } Map values = given.entrySet().stream() .collect(Collectors.toMap(entry -> entry.getKey().name(), Map.Entry::getValue, (a, b) -> a)); + // Of a pair whose formats differ by one variable, the one without it applies when its member is absent (the + // test's services give no default), the other when the request gives it. + if (resource.whenDefault().keySet().stream().anyMatch(values::containsKey) + || resource.unlessDefault().keySet().stream().anyMatch(member -> !values.containsKey(member))) { + return false; + } return resource.when().entrySet().stream() .allMatch(when -> when.getValue().contains(values.getOrDefault(when.getKey(), ""))) && resource.unless().entrySet().stream() diff --git a/src/test/java/io/floci/aws/core/common/RequestResourcesTest.java b/src/test/java/io/floci/aws/core/common/RequestResourcesTest.java index 393f49d7d7..6a5c56e8d9 100644 --- a/src/test/java/io/floci/aws/core/common/RequestResourcesTest.java +++ b/src/test/java/io/floci/aws/core/common/RequestResourcesTest.java @@ -30,6 +30,25 @@ class RequestResourcesTest { private static final ObjectMapper CBOR = new ObjectMapper(new CBORFactory()); private static final String MACHINE = "arn:aws:states:us-east-1:000000000000:stateMachine:orders"; + private static final RegionResolver US_EAST_1 = new RegionResolver("us-east-1", "000000000000"); + /** EventBridge as it answers the reader: the Region's default bus, {@code event-bus/default}. */ + private static final StoredResourceArns EVENTS = new StoredResourceArns() { + @Override + public String namespace() { + return "events"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + @Override + public Optional findDefault(String type, String region) { + return "event-bus".equals(type) ? Optional.of("arn:aws:events:" + region + ":000000000000:event-bus/default") + : Optional.empty(); + } + }; @Test void inferredLandingZoneIdentifiersKeepRawContextAcrossOperations() { @@ -136,12 +155,15 @@ class RequestResourcesTest { "000000000000", null)); } + /** + * DynamoDB is built by hand, but the table reads {@code ListTables}: AWS was measured to check it on the literal + * {@code table/*} of the request's partition, Region and account, whatever table its request names, though the + * Service Reference lists no resource type for it (the generator's {@code MEASURED}). + */ @Test - void listTablesCorrectionReadsTheCollectionAndLeavesOtherDynamoOperationsHandBuilt() { + void listTablesIsCheckedOnTheTableCollectionAwsWasMeasuredToCheck() { assertTrue(RequestResources.reads("dynamodb:ListTables")); - assertFalse(RequestResources.reads("dynamodb:BatchWriteItem")); - assertFalse(RequestResources.reads("dynamodb:ExecuteStatement")); - assertFalse(RequestResources.reads(null)); + assertFalse(RequestResources.reads("dynamodb:DescribeLimits")); for (String body : List.of("{}", "{\"TableName\":\"ignored\",\"ExclusiveStartTableName\":\"cursor\"}")) { assertEquals(List.of("arn:aws-us-gov:dynamodb:us-gov-west-1:111122223333:table/*"), RequestResources.of("dynamodb:ListTables", json(body), "aws-us-gov", "us-gov-west-1", @@ -448,18 +470,17 @@ class RequestResourcesTest { } /** - * {@code StartExecution} takes Step Functions Local's {@code #} and runs the - * machine the part before the {@code #} names, so that machine is checked; other operations read it whole. + * Step Functions Local's {@code #} is no ARN AWS has, and neither botocore nor the + * Service Reference says to read it otherwise, so a request giving one is checked on it as given. */ @Test - void aStateMachinesTestCaseIsCheckedOnTheMachineItRuns() { - assertEquals(List.of(MACHINE), of("states:StartExecution", + void aStateMachinesTestCaseIsCheckedAsGiven() { + assertEquals(List.of(MACHINE + "#HappyPath"), of("states:StartExecution", json("{\"stateMachineArn\":\"" + MACHINE + "#HappyPath\"}"))); - assertEquals(List.of(MACHINE), of("states:StartSyncExecution", json("{\"stateMachineArn\":\"" + MACHINE + "#\"}"))); assertEquals(List.of(MACHINE + "#x"), of("states:DescribeStateMachine", json("{\"stateMachineArn\":\"" + MACHINE + "#x\"}"))); assertEquals(List.of("arn:aws:states:us-east-1:000000000000:execution:orders:*"), created("states:StartExecution", - json("{\"stateMachineArn\":\"" + MACHINE + "#HappyPath\"}"))); + json("{\"stateMachineArn\":\"" + MACHINE + "\"}"))); } /** @@ -474,7 +495,7 @@ class RequestResourcesTest { json("{\"stateMachineVersionArn\":\"" + MACHINE + ":3\"}"))); assertEquals(List.of(MACHINE), of("states:DescribeStateMachine", json("{\"stateMachineArn\":\"" + MACHINE + ":1\"}"))); assertEquals(List.of(MACHINE), of("states:StartExecution", - json("{\"stateMachineArn\":\"" + MACHINE + ":PROD#HappyPath\"}"))); + json("{\"stateMachineArn\":\"" + MACHINE + ":PROD\"}"))); assertEquals(List.of("arn:aws:states:us-east-1:000000000000:execution:orders:*"), created("states:StartExecution", json("{\"stateMachineArn\":\"" + MACHINE + ":PROD\"}"))); String execution = "arn:aws:states:us-east-1:000000000000:execution:orders:run-1"; @@ -515,27 +536,27 @@ class RequestResourcesTest { @Test void aRuleIsOnTheEventBusItsRequestNames() { String events = "arn:aws:events:us-east-1:000000000000:"; - assertEquals(List.of(events + "rule/r"), of("events:DescribeRule", json("{\"Name\":\"r\"}"))); + assertEquals(List.of(events + "rule/r"), of("events:DescribeRule", json("{\"Name\":\"r\"}"), EVENTS)); assertEquals(List.of(events + "rule/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":\"default\"}"))); + json("{\"Name\":\"r\",\"EventBusName\":\"default\"}"), EVENTS)); assertEquals(List.of(events + "rule/orders/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":\"orders\"}"))); + json("{\"Name\":\"r\",\"EventBusName\":\"orders\"}"), EVENTS)); assertEquals(List.of(events + "rule/orders/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":\"" + events + "event-bus/orders\"}"))); + json("{\"Name\":\"r\",\"EventBusName\":\"" + events + "event-bus/orders\"}"), EVENTS)); assertEquals(List.of(events + "rule/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":\"" + events + "event-bus/default\"}"))); + json("{\"Name\":\"r\",\"EventBusName\":\"" + events + "event-bus/default\"}"), EVENTS)); assertEquals(List.of("arn:aws:events:eu-west-1:111122223333:rule/orders/r", "arn:aws:events:us-east-1:111122223333:rule/orders/r", "arn:aws:events:eu-west-1:000000000000:rule/orders/r", events + "rule/orders/r"), of("events:DescribeRule", json("{\"Name\":\"r\",\"EventBusName\":" - + "\"arn:aws:events:eu-west-1:111122223333:event-bus/orders\"}"))); + + "\"arn:aws:events:eu-west-1:111122223333:event-bus/orders\"}"), EVENTS)); // A target's rule is named by Rule. assertEquals(List.of(events + "rule/orders/r"), of("events:PutTargets", json("{\"Rule\":\"r\"," - + "\"EventBusName\":\"orders\",\"Targets\":[{\"Id\":\"1\",\"Arn\":\"arn:aws:sqs:us-east-1:000000000000:q\"}]}"))); + + "\"EventBusName\":\"orders\",\"Targets\":[{\"Id\":\"1\",\"Arn\":\"arn:aws:sqs:us-east-1:000000000000:q\"}]}"), EVENTS)); // A request naming no event bus describes the default one. - assertEquals(List.of(events + "event-bus/default"), of("events:DescribeEventBus", json("{}"))); - assertEquals(List.of(events + "event-bus/orders"), of("events:DescribeEventBus", json("{\"Name\":\"orders\"}"))); + assertEquals(List.of(events + "event-bus/default"), of("events:DescribeEventBus", json("{}"), EVENTS)); + assertEquals(List.of(events + "event-bus/orders"), of("events:DescribeEventBus", json("{\"Name\":\"orders\"}"), EVENTS)); assertEquals(List.of(events + "event-bus/orders"), of("events:DescribeEventBus", - json("{\"Name\":\"" + events + "event-bus/orders\"}"))); + json("{\"Name\":\"" + events + "event-bus/orders\"}"), EVENTS)); } /** @@ -547,14 +568,14 @@ class RequestResourcesTest { String events = "arn:aws:events:us-east-1:000000000000:"; assertEquals(List.of("arn:aws:events:us-east-1:111122223333:rule/r", events + "rule/r"), of("events:DescribeRule", json("{\"Name\":\"r\",\"EventBusName\":" - + "\"arn:aws:events:us-east-1:111122223333:event-bus/default\"}"))); + + "\"arn:aws:events:us-east-1:111122223333:event-bus/default\"}"), EVENTS)); assertEquals(List.of(events + "rule/orders/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":\"arn:aws:events:::event-bus/orders\"}"))); + json("{\"Name\":\"r\",\"EventBusName\":\"arn:aws:events:::event-bus/orders\"}"), EVENTS)); assertEquals(List.of(events + "rule/r"), of("events:DescribeRule", - json("{\"Name\":\"r\",\"EventBusName\":null}"))); + json("{\"Name\":\"r\",\"EventBusName\":null}"), EVENTS)); assertEquals(List.of(events + "event-bus/orders"), of("events:DescribeEventBus", - json("{\"Name\":\"arn:aws:events:::event-bus/orders\"}"))); - assertEquals(List.of(events + "event-bus/default"), of("events:DescribeEventBus", json("{\"Name\":null}"))); + json("{\"Name\":\"arn:aws:events:::event-bus/orders\"}"), EVENTS)); + assertEquals(List.of(events + "event-bus/default"), of("events:DescribeEventBus", json("{\"Name\":null}"), EVENTS)); } /** @@ -565,11 +586,12 @@ class RequestResourcesTest { @Test void eachEntryIsOnTheEventBusItNames() { String events = "arn:aws:events:us-east-1:000000000000:"; - assertEquals(List.of(events + "event-bus/orders", events + "event-bus/default", events + "event-bus/audit"), + // An entry naming no bus is on the default one, which EventBridge gives (StoredResourceArns.findDefault). + assertEquals(List.of(events + "event-bus/default", events + "event-bus/orders", events + "event-bus/audit"), of("events:PutEvents", json("{\"Entries\":[{\"EventBusName\":\"orders\"},{\"Source\":\"s\"}," - + "{\"EventBusName\":\"audit\"},{\"EventBusName\":\"orders\"}]}"))); + + "{\"EventBusName\":\"audit\"},{\"EventBusName\":\"orders\"}]}"), EVENTS)); assertEquals(List.of(events + "event-bus/default"), of("events:PutEvents", - json("{\"Entries\":[{\"EventBusName\":null},{\"EventBusName\":\"\"},{\"EventBusName\":\" \"}]}"))); + json("{\"Entries\":[{\"EventBusName\":null},{\"EventBusName\":\"\"},{\"EventBusName\":\" \"}]}"), EVENTS)); // Each ARN puts its entry's bus in its own account and Region, checked as the caller's too. assertEquals(List.of("arn:aws:events:eu-west-1:111122223333:event-bus/orders", "arn:aws:events:us-east-1:111122223333:event-bus/orders", @@ -578,15 +600,15 @@ class RequestResourcesTest { events + "event-bus/billing"), of("events:PutEvents", json("{\"Entries\":[" + "{\"EventBusName\":\"arn:aws:events:eu-west-1:111122223333:event-bus/orders\"}," + "{\"EventBusName\":\"audit\"}," - + "{\"EventBusName\":\"arn:aws:events:us-east-1:444455556666:event-bus/billing\"}]}"))); + + "{\"EventBusName\":\"arn:aws:events:us-east-1:444455556666:event-bus/billing\"}]}"), EVENTS)); assertEquals(List.of(events + "event-bus/orders"), of("events:PutEvents", - json("{\"Entries\":[{\"EventBusName\":\"arn:aws:events:::event-bus/orders\"}]}"))); - assertEquals(List.of(), of("events:PutEvents", json("{\"Entries\":[]}"))); - assertEquals(List.of(), of("events:PutEvents", json("{}"))); + json("{\"Entries\":[{\"EventBusName\":\"arn:aws:events:::event-bus/orders\"}]}"), EVENTS)); + assertEquals(List.of(), of("events:PutEvents", json("{\"Entries\":[]}"), EVENTS)); + assertEquals(List.of(), of("events:PutEvents", json("{}"), EVENTS)); // A form's entries run from 1 to the first it gives nothing of. - assertEquals(List.of(events + "event-bus/orders", events + "event-bus/default"), of("events:PutEvents", + assertEquals(List.of(events + "event-bus/default", events + "event-bus/orders"), of("events:PutEvents", form("Action=PutEvents&Entries.member.1.EventBusName=orders&Entries.member.2.Source=s" - + "&Entries.member.4.EventBusName=late"))); + + "&Entries.member.4.EventBusName=late"), EVENTS)); } /** @@ -899,10 +921,11 @@ class RequestResourcesTest { } /** - * 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. + * An EMR request modifying instance groups without its {@code ClusterId}, documented as "the cluster to which the + * instance group belongs", 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 an + * account is on that account; provisioned to all the accounts it is provisioned to, on its instance and itself, + * since nothing botocore or the Service Reference says names those accounts. */ @Test void aResourceIsNamedThroughEachValueOfAListAndOnlyWhenTheRequestNamesItNoOtherWay() { @@ -924,6 +947,7 @@ class RequestResourcesTest { 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\"}]"; @@ -962,12 +986,10 @@ class RequestResourcesTest { } }; 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", + assertEquals(List.of(instance, permissionSet), 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", + assertEquals(List.of(instance, permissionSet), 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( @@ -1022,7 +1044,10 @@ class RequestResourcesTest { json("{\"webhook\":{\"name\":\"w\",\"targetPipeline\":\"p\"}}"))); } - /** A custom action type is {@code Custom}'s, the owner CodePipeline gives every one, which its request does not. */ + /** + * A custom action type is {@code Custom}'s: the request gives no owner, and the operation's name gives the one + * value of the {@code ActionOwner} enum it is (the table's {@code fixed}). + */ @Test void aCustomActionTypeIsCustoms() { assertEquals(List.of("arn:aws:codepipeline:us-east-1:000000000000:actiontype:Custom/Build/MyProvider/1"), @@ -1055,14 +1080,34 @@ class RequestResourcesTest { json("{\"Name\":\"s\",\"NamespaceId\":\"ns-a\"}"))); } - /** A CodeBuild build is checked on its project, which its id names before its {@code :}. */ + /** A CodeBuild build is checked on the project its service holds it under, and none for an id it holds none of. */ @Test void aBuildIsCheckedOnItsProject() { String project = "arn:aws:codebuild:us-east-1:000000000000:project/"; - assertEquals(List.of(project + "a"), of("codebuild:StopBuild", json("{\"id\":\"a:1\"}"))); + Map builds = Map.of("a:1", project + "a", "b:2", project + "b", "a:3", project + "a"); + StoredResourceArns codeBuild = new StoredResourceArns() { + @Override + public String namespace() { + return "codebuild"; + } + + @Override + public Optional find(String type, List names, String region) { + return Optional.empty(); + } + + @Override + public List through(String member, String value, String region) { + return "id".equals(member) || "ids[]".equals(member) + ? Optional.ofNullable(builds.get(value)).stream().toList() : List.of(); + } + }; + assertEquals(List.of(project + "a"), of("codebuild:StopBuild", json("{\"id\":\"a:1\"}"), codeBuild)); assertEquals(List.of(project + "a", project + "b"), of("codebuild:BatchGetBuilds", - json("{\"ids\":[\"a:1\",\"b:2\",\"a:3\"]}"))); - assertEquals(List.of(project + "a"), of("codebuild:RetryBuild", form("Action=RetryBuild&id=a:1"))); + json("{\"ids\":[\"a:1\",\"b:2\",\"a:3\"]}"), codeBuild)); + assertEquals(List.of(project + "a"), of("codebuild:RetryBuild", form("Action=RetryBuild&id=a:1"), codeBuild)); + // An id of no build it holds names none. + assertEquals(List.of(), of("codebuild:StopBuild", json("{\"id\":\"orphan\"}"), codeBuild)); } /** @@ -1206,6 +1251,10 @@ class RequestResourcesTest { return RequestResources.of(operation, request, "aws", "us-east-1", "000000000000"); } + private static List of(String operation, ContainerRequestContext request, StoredResourceArns stored) { + return RequestResources.of(operation, request, "aws", "us-east-1", "000000000000", stored); + } + private static ContainerRequestContext json(String body) { return request("application/x-amz-json-1.1", body); } diff --git a/src/test/java/io/floci/aws/services/athena/AthenaDataCatalogIntegrationTest.java b/src/test/java/io/floci/aws/services/athena/AthenaDataCatalogIntegrationTest.java index 1321a60d0d..555db77d37 100644 --- a/src/test/java/io/floci/aws/services/athena/AthenaDataCatalogIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/athena/AthenaDataCatalogIntegrationTest.java @@ -2,6 +2,7 @@ package io.floci.aws.services.athena; import io.floci.aws.testing.RestAssuredJsonUtils; import io.quarkus.test.junit.QuarkusTest; +import io.restassured.response.ValidatableResponse; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; @@ -500,4 +501,65 @@ class AthenaDataCatalogIntegrationTest { .statusCode(400) .body("__type", equalTo("InvalidRequestException")); } + + /** + * Floci reads databases and tables from the account's Glue Data Catalog alone, so the metadata reads refuse a + * catalog whose metadata is elsewhere: one of another type, or a Glue one registered for another account. + */ + @Test + @Order(20) + void metadataReadsRefuseACatalogThatIsNotTheAccountsGlueCatalog() { + String federated = "floci-metadata-federated"; + String foreignGlue = "floci-metadata-foreign-glue"; + String ownGlue = "floci-metadata-own-glue"; + createCatalog(federated, "FEDERATED", "\"connection-type\": \"MYSQL\", " + + "\"connection-arn\": \"arn:aws:glue:us-east-1:000000000000:connection/mysql\""); + createCatalog(foreignGlue, "GLUE", "\"catalog-id\": \"111122223333\""); + createCatalog(ownGlue, "GLUE", "\"catalog-id\": \"000000000000\""); + try { + for (String catalog : new String[] {federated, foreignGlue}) { + for (String read : new String[] {"ListDatabases", "ListTableMetadata", "GetTableMetadata"}) { + metadataRead(read, catalog) + .statusCode(400) + .body("__type", equalTo("MetadataException")); + } + } + for (String catalog : new String[] {ownGlue, "AwsDataCatalog"}) { + metadataRead("ListDatabases", catalog).statusCode(200); + } + metadataRead("ListDatabases", "floci-metadata-absent") + .statusCode(400) + .body("__type", equalTo("InvalidRequestException")); + } finally { + for (String catalog : new String[] {federated, foreignGlue, ownGlue}) { + given() + .header("X-Amz-Target", "AmazonAthena.DeleteDataCatalog") + .contentType(CONTENT_TYPE) + .body("{ \"Name\": \"" + catalog + "\" }") + .when() + .post("/"); + } + } + } + + private static void createCatalog(String name, String type, String parameters) { + given() + .header("X-Amz-Target", "AmazonAthena.CreateDataCatalog") + .contentType(CONTENT_TYPE) + .body("{ \"Name\": \"" + name + "\", \"Type\": \"" + type + "\", \"Parameters\": { " + parameters + " } }") + .when() + .post("/") + .then() + .statusCode(200); + } + + private static ValidatableResponse metadataRead(String operation, String catalog) { + return given() + .header("X-Amz-Target", "AmazonAthena." + operation) + .contentType(CONTENT_TYPE) + .body("{ \"CatalogName\": \"" + catalog + "\", \"DatabaseName\": \"default\", \"TableName\": \"t\" }") + .when() + .post("/") + .then(); + } } diff --git a/src/test/java/io/floci/aws/services/ce/CostExplorerIntegrationTest.java b/src/test/java/io/floci/aws/services/ce/CostExplorerIntegrationTest.java index 20132f2606..323b04a2ee 100644 --- a/src/test/java/io/floci/aws/services/ce/CostExplorerIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/ce/CostExplorerIntegrationTest.java @@ -2,6 +2,7 @@ package io.floci.aws.services.ce; import io.floci.aws.testing.RestAssuredJsonUtils; import io.quarkus.test.junit.QuarkusTest; +import io.restassured.response.ValidatableResponse; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -61,6 +62,35 @@ class CostExplorerIntegrationTest { .body("ResultsByTime", hasSize(3)); } + @Test + void costReadsAnswerThePrimaryBillingViewAndRefuseAnother() { + String views = "arn:aws:billing::000000000000:billingview/"; + costRead("GetCostAndUsage", views + "primary").statusCode(200).body("ResultsByTime", hasSize(1)); + // A view Floci does not hold, a custom one or another account's primary one, does not exist, nor does the + // primary one's path under another service or with a Region. + for (String view : new String[] {views + "custom-view", "arn:aws:billing::111122223333:billingview/primary", + "arn:aws:ce::000000000000:billingview/primary", "arn:aws:billing:us-east-1:000000000000:billingview/primary", + "not-an-arn"}) { + costRead("GetCostAndUsage", view).statusCode(400).body("__type", equalTo("ResourceNotFoundException")) + .body("message", equalTo("The specified ARN in the request doesn't exist.")); + } + costRead("GetDimensionValues", views + "custom-view").statusCode(400) + .body("__type", equalTo("ResourceNotFoundException")); + } + + private static ValidatableResponse costRead(String action, String billingViewArn) { + return given() + .contentType(CONTENT_TYPE) + .header("X-Amz-Target", "AWSInsightsIndexService." + action) + .header("Authorization", AUTH_HEADER) + .body("{\"TimePeriod\":{\"Start\":\"2026-01-01\",\"End\":\"2026-02-01\"},\"Granularity\":\"MONTHLY\"," + + "\"Metrics\":[\"UnblendedCost\"],\"Dimension\":\"SERVICE\",\"BillingViewArn\":\"" + + billingViewArn + "\"}") + .when() + .post("/") + .then(); + } + @Test void getCostAndUsage_hourlyGranularityEmitsHourBuckets() { given() diff --git a/src/test/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArnsTest.java b/src/test/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArnsTest.java new file mode 100644 index 0000000000..841203b53f --- /dev/null +++ b/src/test/java/io/floci/aws/services/codebuild/CodeBuildStoredResourceArnsTest.java @@ -0,0 +1,40 @@ +package io.floci.aws.services.codebuild; + +import io.floci.aws.core.common.RegionResolver; +import io.floci.aws.services.codebuild.model.Build; +import io.floci.aws.services.codebuild.model.Project; +import org.junit.jupiter.api.Test; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +/** What IAM asks CodeBuild of a build a request names: the project CodeBuild holds the build under. */ +class CodeBuildStoredResourceArnsTest { + + private static final String ACCOUNT = "000000000000"; + private static final String PROJECT = "arn:aws:codebuild:us-east-1:000000000000:project/web"; + + @Test + void aBuildReachesTheProjectItIsHeldUnderAndAnIdOfNoBuildReachesNone() { + CodeBuildService codeBuild = mock(CodeBuildService.class); + RegionResolver regionResolver = mock(RegionResolver.class); + when(regionResolver.getAccountId()).thenReturn(ACCOUNT); + Build build = new Build(); + build.setId("web:1"); + build.setProjectName("web"); + Project project = new Project(); + project.setArn(PROJECT); + when(codeBuild.batchGetBuilds("us-east-1", ACCOUNT, List.of("web:1"))).thenReturn(List.of(build)); + when(codeBuild.batchGetProjects("us-east-1", List.of("web"))).thenReturn(List.of(project)); + CodeBuildStoredResourceArns stored = new CodeBuildStoredResourceArns(codeBuild, regionResolver); + + assertEquals(List.of(PROJECT), stored.through("id", "web:1", "us-east-1")); + assertEquals(List.of(PROJECT), stored.through("ids[]", "web:1", "us-east-1")); + // An id of no build it holds, whatever project it seems to name, reaches none, nor does another member. + assertEquals(List.of(), stored.through("id", "web:2", "us-east-1")); + assertEquals(List.of(), stored.through("projectName", "web:1", "us-east-1")); + } +} diff --git a/src/test/java/io/floci/aws/services/emr/EmrServiceFixture.java b/src/test/java/io/floci/aws/services/emr/EmrServiceFixture.java index dc004597e1..618944c236 100644 --- a/src/test/java/io/floci/aws/services/emr/EmrServiceFixture.java +++ b/src/test/java/io/floci/aws/services/emr/EmrServiceFixture.java @@ -175,7 +175,7 @@ final class EmrServiceFixture { // The docker runner mode's step threads, not yet run. private final List stepThreads = new ArrayList<>(); private boolean waking; - private final InMemoryStorageFactory storage; + final InMemoryStorageFactory storage; private final SparkJobRunner runner; private final BootstrapRunner bootstrap; // The docker runner mode's; null in the immediate one. diff --git a/src/test/java/io/floci/aws/services/emr/EmrServiceTest.java b/src/test/java/io/floci/aws/services/emr/EmrServiceTest.java index bd04fd92a8..b710b3f716 100644 --- a/src/test/java/io/floci/aws/services/emr/EmrServiceTest.java +++ b/src/test/java/io/floci/aws/services/emr/EmrServiceTest.java @@ -1,9 +1,11 @@ package io.floci.aws.services.emr; import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import io.floci.aws.core.common.AwsException; +import io.floci.aws.core.storage.AccountAwareStorageBackend; import io.floci.aws.services.emr.model.EmrCluster; import io.floci.aws.services.emr.model.EmrInstanceFleet; import io.floci.aws.services.emr.model.EmrInstanceGroup; @@ -45,6 +47,28 @@ class EmrServiceTest { + "\"Rules\":[{\"Name\":\"scale-out\",\"Action\":{},\"Trigger\":{}}]}"; private static final ObjectMapper MAPPER = new ObjectMapper(); + /** + * A tag call's {@code ResourceId} is the cluster the tag handlers find by it: one in the request's Region, or one + * stored with no Region, which they find in any. + */ + @Test + void aTagCallsResourceIdIsTheClusterTheTagHandlersFind() { + EmrServiceFixture fixture = new EmrServiceFixture(0, 0, 0); + EmrService service = fixture.service; + EmrCluster cluster = service.runJobFlow(cluster("tagged", true), REGION); + + assertEquals(List.of(cluster.getClusterArn()), service.through("ResourceId", cluster.getId(), REGION)); + assertEquals(List.of(), service.through("ResourceId", cluster.getId(), "eu-west-1")); + assertEquals(List.of(), service.through("ResourceId", "j-UNKNOWN", REGION)); + + AccountAwareStorageBackend clusters = fixture.storage.create("emr", "emr-clusters.json", + new TypeReference>() {}); + EmrCluster regionless = clusters.get(cluster.getId()).orElseThrow(); + regionless.setRegion(null); + clusters.put(cluster.getId(), regionless); + assertEquals(List.of(cluster.getClusterArn()), service.through("ResourceId", cluster.getId(), "eu-west-1")); + } + @Test void aClusterIsStartingThenBootstrappingUntilItIsReady() { EmrServiceFixture fixture = new EmrServiceFixture(10, 0, 0); diff --git a/src/test/java/io/floci/aws/services/iam/IamRequestResourceEnforcementIntegrationTest.java b/src/test/java/io/floci/aws/services/iam/IamRequestResourceEnforcementIntegrationTest.java index 6e4bb5b742..8438e26d2f 100644 --- a/src/test/java/io/floci/aws/services/iam/IamRequestResourceEnforcementIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/iam/IamRequestResourceEnforcementIntegrationTest.java @@ -232,19 +232,22 @@ class IamRequestResourceEnforcementIntegrationTest { } /** - * {@code StartExecution} runs the machine before a Step Functions Local test case's {@code #}, so a grant on - * that machine allows a start that names a test case, and a deny on it holds. + * A Step Functions Local {@code #} is checked as given: it is no ARN AWS has, and + * nothing botocore or the Service Reference says reads it otherwise. So a grant on the machine alone does not + * reach a start naming a test case, a grant covering it does, and a deny on the machine alone does not apply. */ @Test - void aStateMachinesTestCaseIsCheckedOnTheMachineItRuns() { + void aStateMachinesTestCaseIsCheckedAsGiven() { String arn = createStateMachine("res-tc-" + suffix()); User user = user("res-tc"); user.policy(allowOn("states:StartExecution", arn)); + refusedJson(startExecution(user, arn + "#"), "states:StartExecution"); + user.policy(allowOn("states:StartExecution", arn + "*")); startExecution(user, arn + "#").statusCode(200); user.policy(allowOn("states:StartExecution", "*") + ",{\"Effect\":\"Deny\",\"Action\":\"states:StartExecution\"," + "\"Resource\":\"" + arn + "\"}"); - refusedJson(startExecution(user, arn + "#"), "states:StartExecution"); + startExecution(user, arn + "#").statusCode(200); } /** @@ -867,11 +870,12 @@ class IamRequestResourceEnforcementIntegrationTest { } /** - * A build is checked on its project, which its id names before its {@code :}, as CodeBuild authorizes builds, - * and a project on the ARN its name gives, a list naming it by name and by ARN alike. + * A build is checked on the project CodeBuild holds it under, and one it holds none of on {@code *}: nothing + * botocore or the Service Reference says gives a build id's project. A project is checked on the ARN its name + * gives, a list naming it by name and by ARN alike. */ @Test - void aBuildIsCheckedOnTheProjectItsIdNames() { + void aBuildIsCheckedOnTheProjectItIsHeldUnder() { String project = "res-project-" + suffix(); String arn = adminJson("codebuild", "CodeBuild_20161006.CreateProject").body("{\"name\":\"" + project + "\",\"source\":{\"type\":\"NO_SOURCE\",\"buildspec\":\"version: 0.2\"},\"artifacts\":{\"type\":" @@ -887,12 +891,14 @@ class IamRequestResourceEnforcementIntegrationTest { + allowOn("codebuild:StopBuild", arn)); codeBuild(user, "BatchGetProjects", "{\"names\":[\"" + project + "\"]}").statusCode(200); codeBuild(user, "BatchGetProjects", "{\"names\":[\"" + project + "\",\"" + arn + "\"]}").statusCode(200); - codeBuild(user, "BatchGetBuilds", "{\"ids\":[\"" + project + ":1\"]}").statusCode(200); - refusedJson(codeBuild(user, "BatchGetBuilds", "{\"ids\":[\"" + project + ":1\",\"" + project + "-other:1\"]}"), - "codebuild:BatchGetBuilds"); - codeBuild(user, "StopBuild", "{\"id\":\"" + project + ":1\"}").statusCode(400) + // CodeBuild holds no build of these ids, so none names a project and each request is checked on *. + refusedJson(codeBuild(user, "BatchGetBuilds", "{\"ids\":[\"" + project + ":1\"]}"), "codebuild:BatchGetBuilds"); + refusedJson(codeBuild(user, "StopBuild", "{\"id\":\"" + project + ":1\"}"), "codebuild:StopBuild"); + User any = user("res-build-any"); + any.policy(allowOn("codebuild:BatchGetBuilds", "*") + "," + allowOn("codebuild:StopBuild", "*")); + codeBuild(any, "BatchGetBuilds", "{\"ids\":[\"" + project + ":1\"]}").statusCode(200); + codeBuild(any, "StopBuild", "{\"id\":\"" + project + ":1\"}").statusCode(400) .body(containsString("ResourceNotFoundException")); - refusedJson(codeBuild(user, "StopBuild", "{\"id\":\"" + project + "-other:1\"}"), "codebuild:StopBuild"); } /** A Managed Service for Apache Flink application is checked on the ARN its name gives. */ @@ -942,21 +948,35 @@ class IamRequestResourceEnforcementIntegrationTest { } /** - * An Athena catalog read is checked on the catalog its {@code CatalogName} names and on {@code AwsDataCatalog}, - * the Glue Data Catalog Floci reads whichever it names, so a grant on another catalog alone does not reach it. + * An Athena catalog read is checked on the catalog its {@code CatalogName} names, and Floci reads the metadata of + * none but the account's Glue Data Catalog: a catalog of another type is refused, so a grant on it does not reach + * the Glue data, nor does one on a Glue catalog reach {@code AwsDataCatalog}'s grant. */ @Test - void aCatalogReadIsCheckedOnTheGlueCatalogFlociReads() { + void aCatalogReadIsCheckedOnTheCatalogItNamesAndReadsNoOther() { String catalogs = "arn:aws:athena:" + REGION + ":" + ACCOUNT + ":datacatalog/"; - User both = user("res-catalogs"); - both.policy(allowOn("athena:ListDatabases", catalogs + "AwsDataCatalog") + "," - + allowOn("athena:ListDatabases", catalogs + "res-allowed")); - send(both, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"res-allowed\"}").statusCode(200); - refusedJson(send(both, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"res-other\"}"), + String glue = "res-glue-" + suffix(); + String lambda = "res-lambda-" + suffix(); + for (String catalog : List.of("{\"Name\":\"" + glue + "\",\"Type\":\"GLUE\",\"Parameters\":{\"catalog-id\":\"" + + ACCOUNT + "\"}}", + "{\"Name\":\"" + lambda + "\",\"Type\":\"LAMBDA\",\"Parameters\":{\"function\":\"arn:aws:lambda:" + + REGION + ":" + ACCOUNT + ":function:meta\"}}")) { + adminJson("athena", "AmazonAthena.CreateDataCatalog").body(catalog).post("/").then().statusCode(200); + } + for (String name : List.of(glue, lambda)) { + cleanup.register(() -> adminJson("athena", "AmazonAthena.DeleteDataCatalog") + .body("{\"Name\":\"" + name + "\"}").post("/")); + } + User user = user("res-catalogs"); + user.policy(allowOn("athena:ListDatabases", catalogs + glue) + "," + + allowOn("athena:ListDatabases", catalogs + lambda)); + send(user, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"" + glue + "\"}") + .statusCode(200); + send(user, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"" + lambda + "\"}") + .statusCode(400).body("__type", equalTo("MetadataException")); + refusedJson(send(user, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"AwsDataCatalog\"}"), "athena:ListDatabases"); - User named = user("res-catalog"); - named.policy(allowOn("athena:ListDatabases", catalogs + "res-allowed")); - refusedJson(send(named, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"res-allowed\"}"), + refusedJson(send(user, "athena", "AmazonAthena.ListDatabases", "1.1", "{\"CatalogName\":\"res-other\"}"), "athena:ListDatabases"); } @@ -1069,17 +1089,34 @@ class IamRequestResourceEnforcementIntegrationTest { } /** - * A Cost Explorer cost read is checked on {@code *}, not on the billing view its {@code BillingViewArn} gives: - * Floci serves no billing views and answers the account's costs whichever it names. + * A Cost Explorer cost read is checked on the billing view its {@code BillingViewArn} gives, and Floci answers the + * costs of none but the caller's primary view: another is refused, so a grant on it does not reach the account's + * costs, nor does one on the primary view reach another's. */ @Test - void aBillingViewGrantDoesNotReachTheAccountsCosts() { - String view = "arn:aws:billing::" + ACCOUNT + ":billingview/res-view"; + void aCostReadIsCheckedOnTheBillingViewItNamesAndAnswersNoOther() { + String views = "arn:aws:billing::" + ACCOUNT + ":billingview/"; User user = user("res-view"); - user.policy(allowOn("ce:GetCostAndUsage", view)); - refusedJson(send(user, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", "{\"TimePeriod\":{\"Start\":" - + "\"2026-01-01\",\"End\":\"2026-02-01\"},\"Granularity\":\"MONTHLY\",\"Metrics\":[\"UnblendedCost\"]," - + "\"BillingViewArn\":\"" + view + "\"}"), "ce:GetCostAndUsage"); + user.policy(allowOn("ce:GetCostAndUsage", views + "primary") + "," + + allowOn("ce:GetCostAndUsage", views + "res-view")); + send(user, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", costs(views + "primary")).statusCode(200); + send(user, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", costs(views + "res-view")).statusCode(400) + .body("__type", equalTo("ResourceNotFoundException")); + refusedJson(send(user, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", costs(views + "res-other")), + "ce:GetCostAndUsage"); + User primary = user("res-view-primary"); + primary.policy(allowOn("ce:GetCostAndUsage", views + "primary")); + refusedJson(send(primary, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", costs(views + "res-view")), + "ce:GetCostAndUsage"); + // A deny on the primary view is not sidestepped by naming it under another service, which IAM checks as *. + User denied = user("res-view-denied"); + denied.policy(allowOn("ce:GetCostAndUsage", "*") + ",{\"Effect\":\"Deny\",\"Action\":\"ce:GetCostAndUsage\"," + + "\"Resource\":\"" + views + "primary\"}"); + refusedJson(send(denied, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", costs(views + "primary")), + "ce:GetCostAndUsage"); + send(denied, "ce", "AWSInsightsIndexService.GetCostAndUsage", "1.1", + costs("arn:aws:ce::" + ACCOUNT + ":billingview/primary")).statusCode(400) + .body("__type", equalTo("ResourceNotFoundException")); } /** @@ -1556,12 +1593,12 @@ class IamRequestResourceEnforcementIntegrationTest { /** 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. Each request finds the accounts - * afresh, so one provisioned to since is checked too. + * {@code TargetId} or a null one, is checked on its instance and itself: nothing botocore or the Service Reference + * says names those accounts, so a grant on the instance and the permission set lets it through and a deny on one of + * its accounts does not apply. One provisioned to an account is checked on that account too. */ @Test - void aPermissionSetProvisionedToAllItsAccountsIsCheckedOnEachOfThem() { + void aPermissionSetProvisionedToAllItsAccountsIsCheckedOnItsInstanceAndItself() { String instance = ssoInstance(); String permissionSet = permissionSet(instance); for (String account : List.of("111111111111", "222222222222")) { @@ -1576,26 +1613,19 @@ class IamRequestResourceEnforcementIntegrationTest { String one = provision + "\"TargetType\":\"AWS_ACCOUNT\",\"TargetId\":\"111111111111\"}"; User user = user("res-sso-provision"); + user.policy(allowOn("sso:ProvisionPermissionSet", instance) + "," + + allowOn("sso:ProvisionPermissionSet", permissionSet)); + ssoAdmin(user, "ProvisionPermissionSet", all).statusCode(200); + ssoAdmin(user, "ProvisionPermissionSet", provision + "\"TargetType\":\"ALL_PROVISIONED_ACCOUNTS\"," + + "\"TargetId\":null}").statusCode(200); + refusedJson(ssoAdmin(user, "ProvisionPermissionSet", one), "sso:ProvisionPermissionSet"); + user.policy(allowOn("sso:ProvisionPermissionSet", "*") + ",{\"Effect\":\"Deny\"," + + "\"Action\":\"sso:ProvisionPermissionSet\",\"Resource\":\"arn:aws:sso:::account/222222222222\"}"); + ssoAdmin(user, "ProvisionPermissionSet", all).statusCode(200); 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); - String third = assignment(instance, permissionSet, "333333333333"); - adminJson("sso", "SWBExternalService.CreateAccountAssignment").body(third).post("/").then().statusCode(200); - cleanup.register(() -> adminJson("sso", "SWBExternalService.DeleteAccountAssignment").body(third).post("/")); - refusedJson(ssoAdmin(user, "ProvisionPermissionSet", all), "sso:ProvisionPermissionSet"); } /** @@ -1782,6 +1812,12 @@ class IamRequestResourceEnforcementIntegrationTest { .formParam("SnapshotClusterIdentifier", snapshotCluster).post("/").then(); } + /** A month's unblended cost of the billing view. */ + private static String costs(String billingViewArn) { + return "{\"TimePeriod\":{\"Start\":\"2026-01-01\",\"End\":\"2026-02-01\"},\"Granularity\":\"MONTHLY\"," + + "\"Metrics\":[\"UnblendedCost\"],\"BillingViewArn\":\"" + billingViewArn + "\"}"; + } + private static String budget(String name, String billingViewArn) { return "{\"BudgetName\":\"" + name + "\",\"BudgetType\":\"COST\",\"TimeUnit\":\"MONTHLY\",\"BudgetLimit\":" + "{\"Amount\":\"100\",\"Unit\":\"USD\"}" + (billingViewArn == null ? "" diff --git a/src/test/java/io/floci/aws/services/iam/IamRestRouteEnforcementIntegrationTest.java b/src/test/java/io/floci/aws/services/iam/IamRestRouteEnforcementIntegrationTest.java index b8634fa130..9e3b31ea65 100644 --- a/src/test/java/io/floci/aws/services/iam/IamRestRouteEnforcementIntegrationTest.java +++ b/src/test/java/io/floci/aws/services/iam/IamRestRouteEnforcementIntegrationTest.java @@ -603,22 +603,25 @@ class IamRestRouteEnforcementIntegrationTest { } /** - * Macie's {@code CreateMember} is checked on the member its {@code account.accountId} names: a grant scoped to the - * member lets the request reach Macie, which answers that this account has no session, a request naming another - * member is refused, and a deny on the member holds under an allow on everything. + * Macie's {@code CreateMember} is checked on the account's members, {@code member/*}: nothing botocore or the + * Service Reference says names the member it makes by its {@code account.accountId}, so a grant scoped to one + * member does not reach it, a grant on the members lets the request reach Macie, which answers that this account + * has no session, and a deny on them holds under an allow on everything. */ @Test - void macieCreateMemberIsCheckedOnTheMemberItNames() { + void macieCreateMemberIsCheckedOnTheAccountsMembers() { String user = user("route-macie-member"); - String member = "arn:aws:macie2:us-east-1:" + ACCOUNT + ":member/111122223333"; + String members = "arn:aws:macie2:us-east-1:" + ACCOUNT + ":member/*"; - policy(user, allow("macie2:CreateMember", member)); - createMember(user, "111122223333", null).statusCode(404); - refused(createMember(user, "444455556666", null), "macie2:CreateMember"); - - policy(user, allow("macie2:CreateMember", "*") + "," + deny("macie2:CreateMember", member)); + policy(user, allow("macie2:CreateMember", "arn:aws:macie2:us-east-1:" + ACCOUNT + ":member/111122223333")); refused(createMember(user, "111122223333", null), "macie2:CreateMember"); + + policy(user, allow("macie2:CreateMember", members)); + createMember(user, "111122223333", null).statusCode(404); createMember(user, "444455556666", null).statusCode(404); + + policy(user, allow("macie2:CreateMember", "*") + "," + deny("macie2:CreateMember", members)); + refused(createMember(user, "111122223333", null), "macie2:CreateMember"); } /** @@ -628,7 +631,7 @@ class IamRestRouteEnforcementIntegrationTest { @Test void macieCreateMemberIsCheckedWithTheTagsItCarries() { String user = user("route-macie-tags"); - String member = "arn:aws:macie2:us-east-1:" + ACCOUNT + ":member/111122223333"; + String member = "arn:aws:macie2:us-east-1:" + ACCOUNT + ":member/*"; policy(user, allow("macie2:CreateMember", member)); createMember(user, "111122223333", null).statusCode(404); diff --git a/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java b/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java index 529f177705..c4f59e2ea5 100644 --- a/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java +++ b/src/test/java/io/floci/aws/services/iam/ResourceArnBuilderTest.java @@ -1,6 +1,7 @@ package io.floci.aws.services.iam; import com.fasterxml.jackson.databind.ObjectMapper; +import io.floci.aws.core.common.AwsException; import io.floci.aws.core.common.AwsProtocolClaimFilter; import io.floci.aws.core.common.AwsRegions; import io.floci.aws.core.common.ProtocolClaim; @@ -10,6 +11,9 @@ import io.floci.aws.core.common.StoredResourceArns; import io.floci.aws.core.common.WireProtocol; import io.floci.aws.core.storage.AccountAwareStorageBackend; import io.floci.aws.core.storage.InMemoryStorage; +import io.floci.aws.services.cloudwatch.logs.CloudWatchLogsDeliveryService; +import io.floci.aws.services.cloudwatch.logs.CloudWatchLogsStoredResourceArns; +import io.floci.aws.services.cloudwatch.logs.model.Delivery; import io.floci.aws.services.eks.EksService; import io.floci.aws.services.iam.model.AccessKey; import io.floci.aws.services.iam.model.IamGroup; @@ -947,11 +951,29 @@ class ResourceArnBuilderTest { @Test void deliveryActionsAreAuthorizedOnTheSourceDestinationOrDeliveryTheyName() { String prefix = "arn:aws:logs:us-east-1:" + ACCOUNT + ":"; - for (String action : List.of("logs:PutDeliverySource", "logs:GetDeliverySource", "logs:DeleteDeliverySource")) { + // A delivery is the one CloudWatch Logs holds under its id; a deleted delivery source is checked on the + // delivery destinations its deliveries send to, the type the Service Reference gives DeleteDeliverySource. + CloudWatchLogsDeliveryService deliveries = mock(CloudWatchLogsDeliveryService.class); + Delivery delivery = new Delivery(); + delivery.setArn(prefix + "delivery:AbCdEfGh12345678"); + when(deliveries.getDelivery("AbCdEfGh12345678", "us-east-1")).thenReturn(delivery); + when(deliveries.getDelivery("gone", "us-east-1")) + .thenThrow(new AwsException("ResourceNotFoundException", "Delivery not found", 400)); + when(deliveries.destinationArnsFrom("bus-source", "us-east-1")) + .thenReturn(List.of(prefix + "delivery-destination:bus-logs")); + ResourceArnBuilder builder = reading(new CloudWatchLogsStoredResourceArns(deliveries)); + for (String action : List.of("logs:PutDeliverySource", "logs:GetDeliverySource")) { setJsonBody("{\"name\":\"bus-source\"}"); assertEquals(List.of(prefix + "delivery-source:bus-source"), builder.buildLogResources(action, ctx, "us-east-1", ACCOUNT, "aws")); } + setJsonBody("{\"name\":\"bus-source\"}"); + assertEquals(List.of(prefix + "delivery-destination:bus-logs"), + builder.buildLogResources("logs:DeleteDeliverySource", ctx, "us-east-1", ACCOUNT, "aws")); + // A source with no deliveries reaches no destination, so the request names none of its resource type. + setJsonBody("{\"name\":\"idle-source\"}"); + assertEquals(List.of("*"), builder.buildLogResources("logs:DeleteDeliverySource", ctx, "us-east-1", ACCOUNT, + "aws")); for (String action : List.of("logs:PutDeliveryDestination", "logs:GetDeliveryDestination", "logs:DeleteDeliveryDestination")) { setJsonBody("{\"name\":\"bus-logs\"}"); @@ -962,6 +984,10 @@ class ResourceArnBuilderTest { setJsonBody("{\"id\":\"AbCdEfGh12345678\"}"); assertEquals(List.of(prefix + "delivery:AbCdEfGh12345678"), builder.buildLogResources(action, ctx, "us-east-1", ACCOUNT, "aws")); + // One it holds none of has its id open. + setJsonBody("{\"id\":\"gone\"}"); + assertEquals(List.of(prefix + "delivery:*"), + builder.buildLogResources(action, ctx, "us-east-1", ACCOUNT, "aws")); } setJsonBody("{\"deliverySourceName\":\"bus-source\",\"deliveryDestinationArn\":\"" + prefix + "delivery-destination:bus-logs\"}"); @@ -1046,6 +1072,7 @@ class ResourceArnBuilderTest { @Test void listTablesUsesTheCollectionInTheRequestPartitionRegionAndAccount() { + // The collection AWS was measured to check ListTables on, the Service Reference giving its action no type. for (String body : List.of("{}", "{\"ExclusiveStartTableName\":\"page-start\"}", "{\"TableName\":\"decoy\",\"ResourceArn\":\"decoy\"}")) { setJsonBody(body); @@ -1380,11 +1407,11 @@ class ResourceArnBuilderTest { return new ResourceArnBuilder(new ObjectMapper(), null, null, null, null, instance); } - /** A builder reading the stored ARNs of a namespace, for a request of that namespace. */ + /** A builder reading the stored ARNs of a namespace, for every request of that namespace. */ private static ResourceArnBuilder reading(StoredResourceArns stored) { @SuppressWarnings("unchecked") Instance instance = mock(Instance.class); - when(instance.iterator()).thenReturn(List.of(stored).iterator()); + when(instance.iterator()).thenAnswer(invocation -> List.of(stored).iterator()); return new ResourceArnBuilder(new ObjectMapper(), null, null, null, null, null, instance); } diff --git a/src/test/java/io/floci/aws/services/ssoadmin/SsoAdminServiceTest.java b/src/test/java/io/floci/aws/services/ssoadmin/SsoAdminServiceTest.java index 2bd9684ac6..fa2de74bed 100644 --- a/src/test/java/io/floci/aws/services/ssoadmin/SsoAdminServiceTest.java +++ b/src/test/java/io/floci/aws/services/ssoadmin/SsoAdminServiceTest.java @@ -94,7 +94,6 @@ class SsoAdminServiceTest { new InMemoryStorage(), identityStoreService, organizationsService, - new SsoAdminRequestContext(), ACCOUNT_ID, "us-east-1", clock); @@ -1593,41 +1592,6 @@ class SsoAdminServiceTest { () -> accountInstanceService.listAssignmentsForPrincipal(accountInstanceRequest, ACCOUNT_ID)); } - /** - * A {@code ProvisionPermissionSet} for {@code ALL_PROVISIONED_ACCOUNTS} provisions the permission set to the - * accounts its permission check found it provisioned to, not to one another request provisioned it to in between: - * a permission set change then leaves that account not provisioned, and this request was not checked on it. - */ - @Test - void allProvisionedAccountsAreTheOnesThePermissionCheckFound() { - PermissionSet permissionSet = createPermissionSet("PinnedAccounts"); - service.createAssignment(assignmentRequest(permissionSet.arn())); - assertEquals(List.of("arn:aws:sso:::account/" + ACCOUNT_ID), - service.through("PermissionSetArn", permissionSet.arn(), "us-east-1")); - - ObjectNode other = assignmentRequest(permissionSet.arn()); - other.put("TargetId", "222222222222"); - service.createAssignment(other); - service.attachPolicy(service.getInstanceArn(), permissionSet.arn(), "arn:aws:iam::aws:policy/ReadOnlyAccess"); - ObjectNode all = mapper.createObjectNode(); - all.put("InstanceArn", service.getInstanceArn()); - all.put("PermissionSetArn", permissionSet.arn()); - all.put("TargetType", "ALL_PROVISIONED_ACCOUNTS"); - service.provisionPermissionSet(all); - - assertEquals(List.of(ACCOUNT_ID), accountsProvisioned(permissionSet.arn(), "LATEST_PERMISSION_SET_PROVISIONED")); - assertEquals(List.of("222222222222"), - accountsProvisioned(permissionSet.arn(), "LATEST_PERMISSION_SET_NOT_PROVISIONED")); - } - - private List accountsProvisioned(String permissionSetArn, String status) { - ObjectNode request = mapper.createObjectNode(); - request.put("InstanceArn", service.getInstanceArn()); - request.put("PermissionSetArn", permissionSetArn); - request.put("ProvisioningStatus", status); - return service.listAccountsForProvisionedPermissionSet(request).items(); - } - @Test void provisionPermissionSetSupportsSingleAndAllProvisionedAccounts() { PermissionSet permissionSet = createPermissionSet("ProvisionAdmins"); @@ -1962,7 +1926,6 @@ class SsoAdminServiceTest { new InMemoryStorage(), identityStoreService, organizationsService, - new SsoAdminRequestContext(), "999999999999", defaultRegion, Clock.systemUTC()); diff --git a/src/test/resources/partition/smoke-exemptions.tsv b/src/test/resources/partition/smoke-exemptions.tsv index afdbf655a5..2a68fe935f 100644 --- a/src/test/resources/partition/smoke-exemptions.tsv +++ b/src/test/resources/partition/smoke-exemptions.tsv @@ -4,6 +4,7 @@ # without a reason. account the one ARN it builds is the member account an IAM check names, in the partition of the caller's organization's own ARN, and it never reaches the wire, so a case has nothing to assert appintegrations no non-commercial partition publishes the service, so a case would be skipped in every partition +athena the only ARNs it builds are the default workgroup and data catalog an IAM check names for a request naming none, in the request Region's partition, and they never reach the wire, so a case has nothing to assert cloudformation covered by PartitionArnMintingIntegrationTest (all partitions) cloudhsmv2 the only ARN on the wire is the automatic backup's, and a backup is never removed (DeleteBackup only marks it), so a case would leak state into the shared emulator cloudtrail covered by CloudTrailSelfDeliveryTest (one partition) diff --git a/tools/aws/regen_iam_passed_roles.py b/tools/aws/regen_iam_passed_roles.py index 5dbc7ada27..146ce07028 100644 --- a/tools/aws/regen_iam_passed_roles.py +++ b/tools/aws/regen_iam_passed_roles.py @@ -246,8 +246,8 @@ BY_HAND.update({ NO_ROLE_MEMBER = "no member of the request names a role" # For an operation no botocore release models, as a legacy one the SDKs dropped. NO_SUCH_OPERATION = "botocore's model has no such operation" -# For an operation AWS has shipped since the botocore pin. It lasts until a bump brings the operation in, -# when entry_for refuses it, so that the role its request names is read. +# For an operation the reference lists that no model of the pinned botocore has, one AWS has shipped since the +# pin. It lasts until a bump brings the operation in, when entry_for reads the role its request names. NOT_IN_BOTOCORE = "the pinned botocore does not have the operation yet, so its request cannot be read" RUNBOOK_PARAMETER = "the role is a parameter of the runbook it runs, not a member of the request" XML_BODY = "the request body is XML, which PassedRoles does not read" @@ -268,7 +268,6 @@ NOT_READ = { "elasticmapreduce:UpdateStudio": NO_ROLE_MEMBER, "glue:GetJob": NO_ROLE_MEMBER, "glue:GetJobs": NO_ROLE_MEMBER, - "kinesisanalytics:ImportSnapshot": NOT_IN_BOTOCORE, "lambda:AddEventSource": NO_SUCH_OPERATION, "logs:CreateImportTask": "the reference passes the role to cloudtrail or logs and nothing says which", "logs:StartQuery": NO_ROLE_MEMBER, @@ -277,14 +276,11 @@ NOT_READ = { "s3:PutBucketReplication": XML_BODY, "redshift:ModifyLakehouseConfiguration": NO_ROLE_MEMBER, "redshift-serverless:UpdateLakehouseConfiguration": NO_ROLE_MEMBER, - "sagemaker:CreateTrainingSession": "the reference passes the role to sagemaker or training-session.sagemaker " - "and nothing says which", "sagemaker:CreateTransformJob": NO_ROLE_MEMBER, "sagemaker:ImportHubContent": NO_ROLE_MEMBER, "ssm:CreateDocument": NO_ROLE_MEMBER, "ssm:DescribeAutomationStepExecutions": NO_ROLE_MEMBER, "ssm:GetAutomationExecution": NO_ROLE_MEMBER, - "ssm:RegisterDefaultHostManagementConfiguration": NOT_IN_BOTOCORE, "ssm:StartAutomationExecution": RUNBOOK_PARAMETER, "ssm:StartChangeRequestExecution": RUNBOOK_PARAMETER, "ssm:UpdateDocument": NO_ROLE_MEMBER, @@ -588,9 +584,9 @@ def entry_for(operation: str, passed_to: list[str], models: dict[str, dict]) -> return {"passedTo": passed_to, "byHand": BY_HAND[operation]} name = operation.split(":", 1)[1] if operation in NOT_READ: - if NOT_READ[operation] == NOT_IN_BOTOCORE and any(name in model["operations"] for model in models.values()): - raise ValueError(f"{operation}: the pinned botocore has it now, so take it out of NOT_READ") return {"passedTo": passed_to, "notRead": NOT_READ[operation]} + if not any(name in model["operations"] for model in models.values()): + return {"passedTo": passed_to, "notRead": NOT_IN_BOTOCORE} members: dict[str, bool] = {} for model in models.values(): for path, by_name in role_members(model, name).items(): diff --git a/tools/aws/regen_iam_request_resources.py b/tools/aws/regen_iam_request_resources.py index 9a64274479..4bca3d81b9 100644 --- a/tools/aws/regen_iam_request_resources.py +++ b/tools/aws/regen_iam_request_resources.py @@ -88,9 +88,8 @@ of its own name with that action's resource types when the reference has that ac the reference lists one client's operations per namespace, and OpenSearch Service's are the `es` client's alone, while the `opensearch` client's are named after `es` actions. -Every operation in `NAMESPACES` is read, whether Floci serves it or not. Explicit `CORRECTIONS` -in `HAND_BUILT` are also read, overriding only those operations while the remaining operations -keep their existing resource builders, and so are the operations `READ_IN_HAND_BUILT` lists, which +Every operation in `NAMESPACES` is read, whether Floci serves it or not. In a namespace in `HAND_BUILT`, whose +other operations keep their existing resource builders, so are the operations `READ_IN_HAND_BUILT` lists, which follow the rule unchanged: a family of a hand-built namespace whose requests name their resources the way the rule reads them. `HAND_BUILT` are the namespaces `ResourceArnBuilder` builds resources for itself, and `NOT_COVERED` the ones Floci serves that are not read yet, each with its reason; @@ -101,24 +100,54 @@ EC2 Query name (including queryName and capitalization), and documented id prefi the supported resource types. `resourceTagKeys` comes from those types' Service Reference condition keys. Each generated `targets` entry preserves the request's order and duplicates, including a wildcard for each unsupported id; only resolved ARNs use the corresponding target's condition context. Other requests in those namespaces stay on `*`. -`CORRECTIONS` gives an operation's resources where the rule gets them wrong, each with its reason; a -resource there may apply only `when` a member has one of some values (`Type` picks the load balancer -v2 `CreateLoadBalancer` creates), or `unless` it has, a member given a JSON null counting as absent -(Cloud Map's handler then reads `DnsConfig.NamespaceId`), and a member read as a value when it is -`absent` (an EventBridge request naming no event bus names the default one), a member filling a variable may be -read up to a character `before` (a CodeBuild build id, `:`, names its project), a variable may be -filled from a field of each element of a list of structures, one resource for each element and the `absent` value -for an -element lacking it (`PutEvents` publishes each entry to its bus), or from a structure's field (`pipeline.name`), -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 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 +Beyond the members' names, botocore's shapes and documentation say what a member names, and the rule reads them: +- a member whose documentation names the type, word for word ("The name of the pipeline to start"), fills its + variable when it is the kind the variable is (a name, an id), and is found by the type's service otherwise + (`find`: "The name of the stream processor" for its `${StreamprocessorId}`), the id open when it finds none; + one whose documentation's head noun is an ARN ("The Amazon Resource Name (ARN) to which you want to add the tag") + holds an ARN, and so does one whose name ends in `ArnList`; +- a field of a top-level structure is a member too (`Budget.BudgetName`, `pipeline.name`, a bare field taking the + structure's name), and so is a field of each element of a list or value of a map of structures named after a type + (`PutEvents`' `Entries[].EventBusName`); a nested field named as an optional top-level member filling the same + variable fills it only when that member is absent or null (Cloud Map's `DnsConfig.NamespaceId`); +- the id a create answers beside another type's ARN is that type's (`RunJobFlow`: `JobFlowId`, `ClusterArn`), an + account id member fills a type's `AccountId`, a member qualified by the type's name fills it first + (`SnapshotClusterIdentifier` for a snapshot), and a variable the reference names `ResourceId` is the type's own + id; a type whose one variable is `ResourceId`, in a REST request, is found by its path's labels and the member + named after it (a QuickSight user); +- an ARN member whose pattern takes another service's ARNs names none of the action's resources; +- the type a non-create is about, which its action does not act on, reaches the acted-on types through their + service (`through`: a CodeBuild build id, its project), and so does a `ResourceId` naming whatever the action acts + on (an EMR cluster or Studio its tag calls name); +- a member whose enum values the word that sets two types' formats apart abbreviates picks the type, its + documented default picking one for a request leaving it out (Elastic Load Balancing v2's `Type`); +- two types whose formats differ by one variable an optional member fills are marked so the one without it + applies when the member is absent or names its service's default (`whenDefault`, `unlessDefault`: a rule on the + default event bus has no bus in its ARN), and a resource filling a variable from an optional member no other + reads, beside another, is named only when the request gives it (`GetClusterCredentials`' `DbName`); +- where two clients' requests of one operation name different resources, each is read apart and its own apply + only to requests of its `endpoint` prefix (EventBridge's `events` and EventBridge V2's `eventsv2`), or to every + request where they share one; a client takes the type its ARN patterns name of two it names by the same members, + a versioned twin (`event-busv2`) for one they do not; +- a variable no member fills is `fixed` to the one value of an enum named after it that the operation's name gives + (CodePipeline's `CreateCustomActionType` makes an action type whose `ActionOwner` is `Custom`); +- a type named only by an optional member documented as holding what the operation is about ("the cluster to which + the instance group belongs") is named, when the request leaves that member out, through each member naming what + the operation is about (`ModifyInstanceGroups`' `InstanceGroups[].InstanceGroupId`). +What a request names, this file alone says. A service only looks up what it holds where an entry asks it to +(`StoredResourceArns`): the resource the members a `find` gives name, the ones a `through` member reaches, and the +resource its handler uses for a member left out (Athena's `primary` workgroup, EventBridge's `default` bus). No +service says what an operation acts on. + +`MEASURED` holds what AWS was measured to check where neither botocore nor the Service Reference says it, and +nothing else. It is the only part of the file stated by hand, and an entry is admitted only with evidence that AWS +itself answered (a policy probe against real AWS published in a Floci pull request, or AWS's AccessDenied message +recorded verbatim), for resource types the reference does not list for the action, giving what the rules do not +already give, and linking to its evidence; the generator refuses an entry that breaks any of the last three, and +review the first. Documentation, analogy, the request's shape and what a Floci handler does are not evidence: what +they give belongs in a rule. DynamoDB's `ListTables` (`table/*`) and Step Functions' `SendTask*` (the token's +activity or state machine) are its entries. +`CLIENTS_NOT_READ` are SDK clients the reference lists for a namespace's operations whose requests Floci does not serve, each with its reason. `UNQUALIFIED` are the resource types whose ARN a request may give with a qualifier, one more `:` past its format, and whose service checks it without one: Step Functions checks a version or an alias @@ -146,8 +175,8 @@ The Service Reference is live rather than a pinned dependency, so a fresh genera byte-identical. The two gates split along the sources: - `--check` is offline and needs the pinned botocore. The file must be well-formed, and every - operation's resources must be exactly what the rule and the corrections give from botocore for the - resource types and ARN formats the file records, so a hand-edited entry fails. + operation's resources must be exactly what the rules give from botocore for the resource types and + ARN formats the file records, so a hand-edited entry fails. - `--verify` is online and stdlib-only. Every operation must still be checked as the action, on the resource types, the file records, and every type must still have its ARN format. An operation AWS has added is reported without failing: until the next sync it is checked on `*`, where it was @@ -226,7 +255,52 @@ READ_IN_HAND_BUILT["logs:PutDestination"] = ( "CloudWatch Logs destination creation names the destination by destinationName, which ResourceArnBuilder " "reads from the generated request-resource table") -_LATER = "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint" +# --------------------------------------------------------------------------------------------------------------------- +# MEASURED: what AWS was measured to check where neither botocore nor the Service Reference says it. +# +# This is the only place in the generator that states an operation's resources by hand, and it is closed to +# everything but measured AWS behaviour. An entry is admitted only when ALL of these hold: +# +# 1. Measured. Its evidence is AWS itself answering: a policy probe run against real AWS with real credentials, +# published with its cases and results in a Floci pull request, or an AWS response recorded verbatim (an +# AccessDenied message naming the resource AWS checked). Documentation prose, an analogy with another +# operation, a reading of the request's shape and what a Floci handler does are NOT evidence: a fact one of +# those gives belongs in a rule, which reads it from botocore or the Service Reference for every operation. +# 2. Absent from the metadata. The Service Reference lists none of the entry's resource types for the +# operation's action, so no rule can read them; an entry for a type the reference lists is refused. +# 3. Needed. The rules do not already give the entry's resources; an entry they give is refused, so one a later +# rule, a botocore bump or a reference update makes redundant is taken out rather than kept. +# 4. Cited. Its evidence names where the measurement is, with at least one https:// link to it. +# +# The generator enforces 2 to 4 (`measured_resources`); review enforces 1. Never add an entry to make a check pass, +# to keep Floci's existing behaviour, or because a handler acts on a resource: measure AWS first, or leave the +# operation to the rules. Floci services never state what an operation acts on either (`StoredResourceArns` only +# looks up what a service holds), so this table is the whole of the hand-stated part of the file. +# --------------------------------------------------------------------------------------------------------------------- +_SEND_TASK_EVIDENCE = ( + "real AWS probes in https://github.com/floci-io/floci/pull/7277 (boto3 against us-east-1 on 2026-11-02, a fresh " + "assumed role per case holding only the policy under test) authorize an activity's task token on its activity and " + "a .waitForTaskToken integration's on its unqualified state machine, a grant on a version ARN failing and a deny " + "on one not applying; AWS's recorded denial of SendTaskSuccess for such a token names 'on resource: " + "' (https://github.com/aws/aws-emulator/blob/main/issues/things-that-do-not-work/" + "20261109T171600Z-stepfunctions-step-functions-the-accessdeniedexception-for-states-sendtasksuccess-names.md); " + "the Service Reference lists no resource type for the action, and the token is resolved by the service (find)") +MEASURED: dict[str, tuple[list[dict], str]] = { + "dynamodb:ListTables": ( + [{"type": "table", "fill": {}}], + "real AWS probes in https://github.com/floci-io/floci/pull/7336 (27 policy cases with real AWS STS role " + "sessions) accept an allow and enforce a deny on arn::dynamodb:::table/*, the " + "literal table/* (table/? matches it, table/ does not), whatever TableName or ExclusiveStartTableName the " + "request gives; AWS's recorded denial names 'on resource: arn:aws:dynamodb:::table/*' " + "(https://github.com/aws/aws-emulator/blob/main/issues/things-that-do-not-work/" + "20261024T015148Z-dynamodb-does-not-enforce-iam-listtables-succeeds-for.md); the Service Reference lists no " + "resource type for the action"), + **{f"states:{operation}": ([{"type": kind, "fill": {}, "find": ["taskToken"]} for kind in ("activity", "statemachine")], + _SEND_TASK_EVIDENCE) + for operation in ("SendTaskSuccess", "SendTaskFailure", "SendTaskHeartbeat")}, +} + +_LATER ="not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint" _REST = ("REST: its requests name their resources in the path, which RequestResources reads from the route a request " "matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet") @@ -247,7 +321,7 @@ NOT_COVERED: dict[str, str] = { "cloudformation": _LATER, "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", + "rules do not fill a name from, so nearly every operation's resource would be left open", "cloudwatch": _LATER, "codeartifact": _REST, "codeguru-reviewer": _REST, @@ -306,286 +380,6 @@ NOT_COVERED: dict[str, str] = { "wafv2": _LATER, } -# An operation's resources where the rule gets them wrong: the resources, and why. A resource's `when` names the -# values of a member it applies for, null for the member absent. Its `endpoint` names the endpoint prefix of the one -# client whose requests it applies to, where two clients share the operation's name and nothing a request gives tells -# them apart (EventBridge's `events` and EventBridge V2's `eventsv2`): Floci applies it only to a request the service -# of that endpoint serves, never by a member a caller could add to a request of the other. -CORRECTIONS: dict[str, tuple[list[dict], str]] = { - "quicksight:CreateDataSet": ([{"types": ["datasource"], "arn": f"PhysicalTableMap{{}}.{kind}.DataSourceArn"} - for kind in ("S3Source", "RelationalTable", "CustomSql", "SaaSTable", "FileSource")], - "CreateDataSet acts on each data source named by its physical tables; " - "FolderArns and RowLevelPermissionDataSet.Arn name other resource types"), - "quicksight:CreateDashboard": ([{"type": "dashboard", "fill": {"ResourceId": "DashboardId"}}], - "DashboardId names the created dashboard; FolderArns and ThemeArn name " - "other resource types and are not dashboard ARN selectors"), - **{f"quicksight:{operation}": ([{"type": "ingestion", "fill": {"DatasetId": "DataSetId", "ResourceId": "IngestionId"}}], - "the ingestion ARN contains its dataset id and ingestion id, named by " - "DataSetId and IngestionId in the REST path") - for operation in ("CreateIngestion", "DescribeIngestion")}, - **{f"quicksight:{operation}": ([{"type": "user", "fill": {}, "find": ["AwsAccountId", "Namespace", "UserName"]}], - "the user ARN ends in namespace/user-name, which the reference combines as " - "ResourceId; QuickSight resolves it from the account, namespace and user name") - for operation in ("RegisterUser", "DescribeUser")}, - "logs:PutDeliverySource": ([{"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}], - "resourceArn is the ARN of the resource that sends the logs (an event bus, a load " - "balancer), never the delivery source's, which the request names by name"), - "logs:DeleteDeliverySource": ([{"type": "delivery-source", "fill": {"DeliverySourceName": "name"}}], - "the reference lists only delivery-destination, which nothing in the request names, " - "so the rule would authorize it on * and a deny on the source it deletes would not " - "apply; the request names that source by name"), - "logs:PutDeliveryDestination": ([{"type": "delivery-destination", "fill": {"DeliveryDestinationName": "name"}}], - "deliveryDestinationConfiguration.destinationResourceArn is the log group, bucket " - "or stream the logs go to and roleArn a role, neither the delivery destination, " - "which the request names by name"), - **{f"logs:{operation}": ([{"type": "delivery", "fill": {"DeliveryName": "id"}}], - "the delivery format ends in ${DeliveryName}, while a delivery is named by the id " - "CreateDelivery mints, which the request gives in id") - for operation in ("GetDelivery", "DeleteDelivery", "UpdateDeliveryConfiguration")}, - "dynamodb:ListTables": ([{"type": "table", "fill": {}}], - "AWS policy probes accepted by review #7336 authorize the literal regional table/*: " - "table/? matches while table/ does not, despite the Service Reference listing no " - "resource types; request-body table names and pagination do not select its resource"), - **{f"states:{operation}": ([{"type": kind, "fill": {}, "find": ["taskToken"]} - for kind in ("activity", "statemachine")], - "AWS callback policy probes on 2026-11-02 authorize an activity token against its " - "activity and an integration token against its unqualified state machine, despite " - "the action table listing no resource types; the token's service resolves the ARN") - for operation in ("SendTaskSuccess", "SendTaskFailure", "SendTaskHeartbeat")}, - "elasticloadbalancing:CreateLoadBalancer": ([ - {"type": "loadbalancer", "fill": {"LoadBalancerName": "LoadBalancerName"}}, - {"type": "loadbalancer/app/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["application", None]}}, - {"type": "loadbalancer/gwy/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["gateway"]}}, - {"type": "loadbalancer/net/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["network"]}}, - ], "the classic API names its load balancer by LoadBalancerName; the v2 API by Name, its type by Type, " - "an application load balancer when it gives none, which the rule cannot tell apart"), - **{f"budgets:{operation}": ([{"type": "budget", "fill": {"BudgetName": member}}], - f"the request names the budget by {member} ('The name of a budget'), which the rule " - "does not read inside a structure; its BillingViewArn is a billing view's ARN " - "(arn:aws:billing:::billingview/...), never a budget's") - for operation, member in (("CreateBudget", "Budget.BudgetName"), ("UpdateBudget", "NewBudget.BudgetName"))}, - **{f"codebuild:{operation}": ([{"type": "project", "fill": {"ProjectName": member}, "before": ":"}], - "a build is checked on its project (the CodeBuild User Guide's permissions reference " - "gives each of these the resource project/project-name), which its id names before " - "its ':' (CODEBUILD_BUILD_ID, for example codebuild-demo-project:b1e6661e-...)") - for operation, member in (("BatchDeleteBuilds", "ids[]"), ("BatchGetBuilds", "ids[]"), ("RetryBuild", "id"), - ("StopBuild", "id"))}, - **{f"cur:{operation}": ([{"type": "cur", "fill": {"ReportName": member}}], - f"the request names the report by {member} ('The name of the report that you want to " - "create') alone; its ReportDefinition's BillingViewArn, which the rule reads as a report " - "definition's ARN, is a billing view's (arn:aws:billing:::billingview/...)") - for operation, member in (("ModifyReportDefinition", "ReportName"), - ("PutReportDefinition", "ReportDefinition.ReportName"))}, - **{f"codepipeline:{operation}": ([{"type": "pipeline", "fill": {"PipelineName": "pipeline.name"}}], - "the request names the pipeline by its pipeline structure's name, which the " - "rule does not read inside a structure; its roleArn is the role CodePipeline " - "assumes, an IAM role's ARN by botocore's pattern, never a pipeline's, so it " - "names no pipeline") - for operation in ("CreatePipeline", "UpdatePipeline")}, - "codepipeline:PutWebhook": ([{"type": "webhook", "fill": {"WebhookName": "webhook.name"}}, - {"type": "pipeline", "fill": {"PipelineName": "webhook.targetPipeline"}}], - "the request names the webhook by its webhook structure's name and the pipeline it " - "connects to by its targetPipeline ('The name of the pipeline you want to connect to " - "the webhook'), which the rule does not read inside a structure"), - **{f"codepipeline:{operation}": ([{"type": "actiontype", "fill": {"Category": "category", "Provider": "provider", - "Version": "version"}, - "fixed": {"Owner": "Custom"}}], - "a custom action type's owner is Custom, which the request does not give: the API " - "Reference's CreateCustomActionType example answers \"owner\": \"Custom\", and " - "PollForJobs is valid only for action types with Custom in the owner field") - for operation in ("CreateCustomActionType", "DeleteCustomActionType")}, - "servicediscovery:CreateService": ([ - {"type": "namespace", "fill": {"NamespaceId": "NamespaceId"}, "unless": {"NamespaceId": [None]}}, - {"type": "namespace", "fill": {"NamespaceId": "DnsConfig.NamespaceId"}, "when": {"NamespaceId": [None]}}, - {"type": "service", "fill": {}}, - ], "the request names its namespace by NamespaceId or, when it gives none or a JSON null, by " - "DnsConfig.NamespaceId, which botocore keeps ('Use NamespaceId in Service instead') and Cloud Map's handler " - "reads then; the rule does not read a structure's member, and names the service the request creates with " - "every variable open"), - **{f"codepipeline:{operation}": ([{"type": "pipeline", "fill": {"PipelineName": "name"}}], - f"the request names the pipeline by a bare name, '{doc}' in botocore's model, " - "which the rule reads only for an operation named after the type") - for operation, doc in (("GetPipelineState", "The name of the pipeline about which you want to get " - "information"), - ("StartPipelineExecution", "The name of the pipeline to start"))}, - **{f"events:{operation}": ([ - {"type": "rule-on-default-event-bus", "fill": {"RuleName": rule}, "when": {"EventBusName": ["default"]}, - "absent": {"EventBusName": "default"}}, - {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": rule}, - "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}}, - ], f"a rule is named by its {rule} on the event bus EventBusName names, the default one when it names none " - "('If you omit this, the default event bus is used'), whose rules have no bus in their ARN; the rule takes " - "the bus's name for the rule's and cannot tell the default bus's rules from a custom bus's") - for operation, rule in (("DeleteRule", "Name"), ("DescribeRule", "Name"), ("DisableRule", "Name"), - ("EnableRule", "Name"), ("ListTargetsByRule", "Rule"), ("PutRule", "Name"), - ("PutTargets", "Rule"), ("RemoveTargets", "Rule"))}, - "events:DescribeEventBus": ([{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, - {"type": "event-bus", "fill": {"EventBusName": "Name"}, "absent": {"Name": "default"}, - "endpoint": "events"}], - "a request naming no event bus describes the default one ('If you omit this, the " - "default event bus is displayed'); EventBridge V2's request names its bus by " - "EventBusArn alone"), - "events:PutEvents": ([{"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, - {"type": "event-bus", "fill": {"EventBusName": "Entries[].EventBusName"}, - "absent": {"Entries[].EventBusName": "default"}, "endpoint": "events"}], - "each entry goes to the event bus its EventBusName names, the default one when it names " - "none ('If you omit this, the default event bus is used'), and publishing is authorized " - "against the bus for every entry in the request; the rule reads no member of a list's " - "structures. EventBridge V2's request names by EventBusArn the one bus every entry goes to"), - "events:CreateEventBus": ([{"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", - "endpoint": "events"}, - {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events"}, - {"type": "event-busv2", "fill": {"EventBusName": "Name"}, "endpoint": "eventsv2"}], - "EventBridge's request and EventBridge V2's both name the bus they create by Name, and " - "nothing a request gives tells them apart; the API serving it does, an event-bus " - "for EventBridge and an event-busv2, whose id V2 mints, for V2"), - **{f"events:{operation}": ([*extra, {"types": [v2], "arn": arn, "endpoint": "eventsv2"}, - {"type": v1, "fill": {variable: "Name"}, "endpoint": "events"}], - f"EventBridge's request names the {v1} by Name, EventBridge V2's by {arn}; the rule " - "fills a type's variables only when no member holds its ARN, so with both clients " - "read it drops EventBridge's Name") - for operation, v1, v2, variable, arn, extra in ( - ("DeleteEventBus", "event-bus", "event-busv2", "EventBusName", "EventBusArn", []), - ("UpdateEventBus", "event-bus", "event-busv2", "EventBusName", "EventBusArn", - [{"types": ["event-bus", "event-busv2"], "arn": "DeadLetterConfig.Arn", "endpoint": "events"}]), - ("DescribeEventSource", "event-source", "event-sourcev2", "EventSourceName", "EventSourceArn", []))}, - **{f"states:{operation}": ([{"types": ["statemachine"], "arn": "stateMachineArn", "before": "#"}], - "Floci takes Step Functions Local's # and runs the machine " - "the part before the # names, so that part is the one checked") - for operation in ("StartExecution", "StartSyncExecution")}, - **{f"athena:{operation}": ([{"type": "workgroup", "fill": {"WorkGroupName": "WorkGroup"}, - "absent": {"WorkGroup": "primary"}}], - "a request naming no workgroup acts in the primary one (ListQueryExecutions: 'If a " - "workgroup is not specified, returns a list of query execution IDs for the primary " - "workgroup', ListNamedQueries alike; the user guide has users without their own " - "workgroup 'continue running queries in the primary workgroup'), and Floci's " - "GetWorkGroup answers the primary one for a request naming none") - for operation in ("GetWorkGroup", "ListNamedQueries", "ListQueryExecutions", "StartQueryExecution")}, - "athena:GetDataCatalog": ([{"type": "datacatalog", "fill": {"DataCatalogName": "Name"}, - "absent": {"Name": "AwsDataCatalog"}}], - "Floci's GetDataCatalog answers the account's Glue Data Catalog, AwsDataCatalog, for a " - "request naming no catalog, so that is the one checked"), - **{f"athena:{operation}": ([{"type": "datacatalog", "fill": {"DataCatalogName": "CatalogName"}, - "absent": {"CatalogName": "AwsDataCatalog"}}, - {"type": "datacatalog", "fill": {}, "fixed": {"DataCatalogName": "AwsDataCatalog"}}], - "Floci's handler reads the account's Glue Data Catalog, AwsDataCatalog, whichever " - "catalog CatalogName names, so that one is checked as well as the one named, and a " - "request naming none is read as naming it") - for operation in ("GetTableMetadata", "ListDatabases", "ListTableMetadata")}, - **{f"ce:{operation}": ([], "Floci serves no billing views: it answers the account's costs whichever view " - "BillingViewArn names, so the request is checked on `*`, as one naming no view, and a " - "grant scoped to a view does not reach them") - for operation in ("GetCostAndUsage", "GetCostAndUsageComparisons", "GetCostAndUsageWithResources", - "GetCostCategories", "GetCostComparisonDrivers", "GetCostForecast", "GetDimensionValues", - "GetTags", "GetUsageForecast")}, - "bcm-data-exports:CreateExport": ([], "its Export.ExportArn is the ARN 'for this export', the one the request " - "creates, never a billing view's or a table's, although its pattern takes " - "any bcm-data-exports ARN, a table's included; the request names its table " - "in its query statement and its table configurations' keys, which the rule " - "does not read"), - **{f"cloudtrail:{operation}": ([{"type": "trail", "fill": {"TrailName": "Name"}}], - "the request names the trail by a bare Name, 'the name or the CloudTrail ARN of " - "the trail', which the rule reads only for an operation named after the type") - for operation in ("GetTrailStatus", "StartLogging", "StopLogging")}, - **{f"cloudtrail:{operation}": ([{"types": ["channel", "dashboard", "eventdatastore", "trail"], "arn": member}], - f"the request names the resource by its ARN in {member} ('the ARN of the trail, " - "event data store, dashboard, or channel'), whose name does not end in Arn") - for operation, member in (("AddTags", "ResourceId"), ("ListTags", "ResourceIdList[]"), - ("RemoveTags", "ResourceId"))}, - **{f"cloudtrail:{operation}": ([{"type": "dashboard", "fill": {"DashboardName": "DashboardId"}}], - "the request names the dashboard by DashboardId, 'The name or ARN for the " - "dashboard', which the rule does not take for a name") - for operation in ("DeleteDashboard", "GetDashboard", "StartDashboardRefresh", "UpdateDashboard")}, - **{f"ce:{operation}": ([{"types": [kind], "arn": f"{member}[]"}], - f"the request names the {noun} by the ARNs in {member} ('A list of cost anomaly {noun} " - "ARNs'), whose name does not end in Arn" + extra) - for operation, member, kind, noun, extra in ( - ("GetAnomalyMonitors", "MonitorArnList", "anomalymonitor", "monitor", ""), - ("GetAnomalySubscriptions", "SubscriptionArnList", "anomalysubscription", "subscription", - "; its MonitorArn narrows them to a monitor's, an anomaly monitor's ARN, never a subscription's"))}, - "timestream-influxdb:RebootDbCluster": ([ - {"type": "db-cluster", "fill": {"DbClusterId": "dbClusterId"}}, - {"type": "db-instance", "fill": {"DbInstanceIdentifier": "instanceIds[]"}}, - ], "the request names the cluster's instances to reboot by instanceIds ('A list of service-generated unique DB " - "Instance Ids belonging to the DB Cluster to reboot'), ids the rule does not take for an identifier"), - "globalaccelerator:ListCustomRoutingPortMappings": ([{"types": ["accelerator"], "arn": "AcceleratorArn"}], - "its EndpointGroupArn narrows the mappings to an endpoint " - "group of the accelerator, whose ARN extends the " - "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"), - "redshift:GetClusterCredentials": ([ - {"type": "dbname", "fill": {"ClusterName": "ClusterIdentifier", "DbName": "DbName"}, - "unless": {"DbName": [None]}}, - {"type": "dbuser", "fill": {"ClusterName": "ClusterIdentifier", "DbUser": "DbUser"}}, - ], "the database is checked only when the request names one ('If the DbName parameter is specified, the IAM " - "policy must allow access to the resource dbname for the specified database name'), and the Management " - "Guide's policy granting the action on a dbuser alone allows it; the rule names the database by " - "ClusterIdentifier alone when DbName is absent"), - **{f"redshift:{operation}": ([{"types": ["cluster", "eventsubscription", "hsmclientcertificate", "hsmconfiguration", - "integration", "parametergroup", "securitygroup", - "securitygroupingress-cidr", "securitygroupingress-ec2securitygroup", - "snapshot", "snapshotcopygrant", "snapshotschedule", "subnetgroup", - "usagelimit"], "arn": "ResourceName"}], - "the request names the resource by its ARN in ResourceName ('The Amazon Resource " - "Name (ARN) to which you want to add the tag or tags'), whose name does not end in " - "Arn") - for operation in ("CreateTags", "DeleteTags", "DescribeTags")}, - "macie2:CreateMember": ([{"type": "Member", "fill": {"ResourceId": "account.accountId"}}], - "the member ARN ends in the account the request associates, which it names as " - "account.accountId, nested where the rule does not look for the member's id"), -} # Resource types whose ARN a request may give with a qualifier, one more `:` past its format, which their # service drops to check it, and why. @@ -776,8 +570,9 @@ def with_absent_arn(resources: list[dict], formats: dict[str, str], optional: se def map_fields(models: dict[str, dict], operation: str) -> dict[str, str]: - """The fields of each value of a top-level map of structures in the operation's request body that hold a string and - end as an id, a name or an identifier, by their path, `Name{}.Field`, each with the field's name.""" + """The fields of each value of a top-level map of structures, or of each element of a list of them, in the + operation's request body that hold a string and end as an id, a name or an identifier, by their path, + `Name{}.Field` or `Name[].Field`, each with the field's name: `PutEvents`' `Entries[].EventBusName`.""" found: dict[str, str] = {} for model in models.values(): spec = model["operations"].get(operation) @@ -785,12 +580,13 @@ def map_fields(models: dict[str, dict], operation: str) -> dict[str, str]: continue for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items(): shape = model["shapes"][member["shape"]] - if member.get("location") not in BODY_LOCATIONS or shape["type"] != "map": + if member.get("location") not in BODY_LOCATIONS or shape["type"] not in ("map", "list"): continue - value = model["shapes"][shape["value"]["shape"]] + value = model["shapes"][shape["value" if shape["type"] == "map" else "member"]["shape"]] + marker = "{}" if shape["type"] == "map" else "[]" for field, nested in value.get("members", {}).items() if value["type"] == "structure" else (): if kind_of(field) and model["shapes"][nested["shape"]]["type"] == "string": - found.setdefault(f"{name}{{}}.{field}", field) + found.setdefault(f"{name}{marker}.{field}", field) return found @@ -830,6 +626,308 @@ def with_absent_account(resources: list[dict], formats: dict[str, str], accounts else resource for resource in resources] +# --------------------------------------------------------------------------- # +# What botocore's documentation and shapes say a member names +# --------------------------------------------------------------------------- # +# Words that end a type's name in a member's documentation: "The name of the pipeline to start". +DOC_STOP = {"to", "that", "you", "for", "which", "created", "from", "in", "of", "about", "whose", "with", "on", + "belonging", "the", "a", "an", "is", "are", "and", "or", "by", "used", "will", "should", "can", ""} +# "The name of the pipeline", "Specifies the name or the CloudTrail ARN of the trail", "The ID of the delivery". +DOC_NAMES_RE = re.compile(r"^(?:specifies )?(?:the |a |an )?(?:unique )?(?:name|id|identifier)" + r"(?: or (?:the )?(?:[a-z]+ )?arn)? (?:of|for) (?:the |a |an )?(?P.+)$") +# "A list of service-generated unique DB Instance Ids belonging to the DB Cluster". +DOC_LIST_RE = re.compile(r"^(?:a |the )?(?:list of )?(?:service-generated |unique )*(?P[a-z][a-z0-9 -]*?) " + r"(?:ids|names|identifiers)\b") +# The service an ARN pattern names: `arn:aws(-[\w]+)*:iam::[0-9]{12}:role/.*` is IAM's. +# A member's documentation saying it holds another thing: "the cluster to which the instance group belongs". +SUBJECT_HOLDER_RE = re.compile(r"\bto which the (?P[a-z][a-z ]*?) belongs\b") +PATTERN_SERVICE_RE = re.compile(r"^\^?\(?arn:[^:]*:\(?([a-z0-9-]+)\)?:") + + +def _lead(documentation: str | None) -> str: + """A member's documentation, lowercased, up to its first sentence's end.""" + text = re.sub(r"\s+", " ", re.sub(r"<[^>]+>", "", documentation or "")).strip().lower() + return re.split(r"(?<=[a-z0-9)])\.(?:\s|$)", text, maxsplit=1)[0] + + +def doc_head(lead: str) -> tuple[str, str | None]: + """The documentation's head noun phrase and what it is of: ("the arn", "the trail, event data store, ...") for + "Specifies the ARN of the trail, event data store, dashboard, or channel"; a list's head is what it lists ("a list + of trail, event data store, dashboard, or channel arns" before "whose tags will be listed").""" + rest = re.sub(r" (?:of|for)$", "", re.split(r" (?:to|from|whose|that|which|in which|with|associated) ", lead, + maxsplit=1)[0]) + match = re.match(r"^(.*?)(?: (?:of|for) (?:the |a |an )?(.*))?$", rest) + head, of = match.group(1).strip(), (match.group(2) or None) + if re.search(r"(?:^|\s)list$", head) and of: + return f"{head} of {of}", None + return head, of + + +def doc_kind(lead: str) -> str | None: + """Whether the documentation says the member is a name or an id; None when it says neither.""" + head, _ = doc_head(lead) + if re.search(r"\bname(?: or (?:the )?(?:\w+ )?arn)?$", head): + return "name" + if re.search(r"\b(?:id|identifier|ids|identifiers)(?: or (?:the )?(?:\w+ )?arn)?$", head): + return "id" + return None + + +def doc_names(lead: str, kind: str, formats: dict[str, str]) -> bool: + """Whether a member's documentation says it names a resource of the type, by the type's name or its format's + leading resource word, word for word and followed by a word that ends it: "The name of the stream processor you + want to delete" names a `streamprocessor`, "The ID of the pipeline execution" no `pipeline`.""" + word = RESOURCE_PART_RE.match(formats.get(kind, "")) + targets = {re.sub(r"[^a-z0-9]", "", kind.lower())} | ({re.sub(r"[^a-z0-9]", "", word.group(1).lower())} if word else set()) + for regex in (DOC_NAMES_RE, DOC_LIST_RE): + match = regex.match(lead) + if not match: + continue + words = re.split(r"[\s,;()]+", match.group("phrase")) + joined = "" + for index, piece in enumerate(words[:4]): + joined += re.sub(r"[^a-z0-9]", "", piece) + if joined in targets: + return regex is DOC_LIST_RE or re.sub(r"[^a-z0-9]", "", words[index + 1] if index + 1 < len(words) else "") in DOC_STOP + if not any(target.startswith(joined) for target in targets): + break + return False + + +def documented_members(models: dict[str, dict], operation: str) -> dict[str, dict]: + """The request's members holding a string or a list of strings, top-level and fields of a top-level structure, + each with its documentation's lead, its pattern and whether it is nested, by name or `Name.Field`.""" + found: dict[str, dict] = {} + for model in models.values(): + spec = model["operations"].get(operation) + if spec is None or "input" not in spec or _reading(model) != "all": + continue + for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items(): + if member.get("location") not in BODY_LOCATIONS and _located(member) is None: + continue + shape = model["shapes"][member["shape"]] + entries = [(name, member, shape)] + if shape["type"] == "structure" and member.get("location") in BODY_LOCATIONS: + entries += [(f"{name}.{field}", nested, model["shapes"][nested["shape"]]) + for field, nested in shape.get("members", {}).items()] + for path, item, item_shape in entries: + strings = _strings(model, item_shape) + if strings is None: + continue + element = model["shapes"][item_shape["member"]["shape"]] if item_shape["type"] == "list" else item_shape + found.setdefault(path, {"path": path + strings, "nested": "." in path, + "lead": _lead(item.get("documentation") or item_shape.get("documentation")), + "pattern": element.get("pattern") or ""}) + return found + + +def uri_labels(models: dict[str, dict], operation: str) -> list[str]: + """The members a REST request's path carries, in the order its path gives them.""" + for model in models.values(): + spec = model["operations"].get(operation) + if spec is None or "input" not in spec or "http" not in spec: + continue + by_label = {member.get("locationName", name): name + for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items() + if member.get("location") == "uri"} + return [by_label[label] for label in re.findall(r"\{(\w+)\+?}", spec["http"]["requestUri"]) if label in by_label] + return [] + + +def created_aliases(models: dict[str, dict]) -> dict[str, str]: + """The id a create answers beside the ARN of another type, by their stems: `RunJobFlow` answers `JobFlowId` and + `ClusterArn`, so a job flow's id is a cluster's.""" + aliases: dict[str, str] = {} + for model in models.values(): + for name, spec in model["operations"].items(): + if not CREATING_RE.match(name) or "output" not in spec: + continue + subject = stem(CREATING_RE.sub("", name)) + answered = model["shapes"][spec["output"]["shape"]].get("members", {}) + ids = [m for m in answered if re.search(r"id$", m, re.IGNORECASE) and stem(m) and related(stem(m), subject)] + arns = [m for m in answered if re.search(r"arn$", m, re.IGNORECASE) and stem(m) and not related(stem(m), subject)] + if len(ids) == 1 and len(arns) == 1: + aliases[stem(ids[0])] = stem(arns[0]) + return aliases + + +def with_documented(operation: str, types: list[str], formats: dict[str, str], models: dict[str, dict], + resources: list[dict]) -> list[dict]: + """The resources, completed from what botocore's shapes and documentation say each member names. + + - A member whose documentation's head noun is an ARN of a type the action acts on (or of whatever it acts on) + holds one: Redshift's `ResourceName`, 'The Amazon Resource Name (ARN) to which you want to add the tag'. + - An ARN member whose pattern takes another service's ARNs (a role's, a bucket's, a key's, CUR's billing view), + or whose documentation gives it as the ARN of another type of the service (a `CreateExport`'s + `Export.ExportArn`, "for this export"), names none of the action's resources, unless named after one of them. + - A type with one variable left to fill takes the one member that names it: a field of a top-level structure + named for it (`Budget.BudgetName`, `pipeline.name`), a member whose documentation names the type and says it + is a name or an id as the variable is ("The name of the pipeline to start"), an id a create answers beside the + type's ARN (`JobFlowId`, beside `RunJobFlow`'s `ClusterArn`), or an account id member for an `AccountId`. One + whose documentation names the type but is the other kind (a stream processor's name for its id variable) is + found by the type's service by that member (`find`), the id open when it finds none; on a create, no + documentation fills a variable of another or no kind. + - A field of a structure named as a top-level member filling the same variable fills it only when that member + is absent or null (Cloud Map's `DnsConfig.NamespaceId`). + - A bare id of the type a non-create operation is about, which its action does not act on, names the types the + action acts on through their service (`through`): a CodeBuild build id, its project.""" + name = operation.split(":", 1)[1] + made = stem(CREATING_RE.sub("", name)) if CREATING_RE.match(name) else None + # A create makes a type of its namespace: `AddTags` makes no tag, `RegisterUser` a user. + creating = made is not None and any(related(made, stem(kind)) or related(made, stem(word.group(1))) + for kind in formats for word in [RESOURCE_PART_RE.match(formats[kind])] if word) + facts = documented_members(models, name) + accounts = account_members(models, name) + aliases = created_aliases(models) + kinds = [kind for kind in types if kind in formats] + resources = [dict(resource) for resource in resources] + held = {resource["arn"] for resource in resources if "arn" in resource} + for path, fact in sorted(facts.items()): + if fact["nested"] or fact["path"] in held or not kinds or re.search(r"arn(s|list)?$", path, re.IGNORECASE): + continue + head, of = doc_head(fact["lead"]) + if re.search(r"(?:arns?|amazon resource names? \(arns?\))$", head) \ + and not re.search(r"\b(?:name|id|identifier)s? or\b", head) and ( + (of is None and stem(path).startswith("resource")) + or (of is not None and any(doc_names("the name of the " + part.strip(), kind, formats) + for part in re.split(r",| or ", of) for kind in kinds))): + resources.insert(0, {"types": kinds, "arn": fact["path"]}) + services = {formats[kind].split(":")[2] for kind in kinds} + def foreign(path: str) -> bool: + fact = facts.get(path.removesuffix("[]")) + service = PATTERN_SERVICE_RE.match(fact["pattern"]) if fact else None + return service is not None and service.group(1) not in services + # An ARN member its documentation gives as the ARN of another type of the service, one the action does not act + # on, holds that resource's: a `CreateExport`'s `Export.ExportArn`, "the ARN for this export", is the export's. + # A member named after a type the action acts on keeps it, its name saying more than a shared shape's + # documentation (OpenSearch's `applicationArn`, documented as "the ARN of the domain"). + others = [kind for kind in formats if kind not in kinds] + + def of_another_type(path: str) -> bool: + fact = facts.get(path.removesuffix("[]")) + member = stem(path.removesuffix("[]").split(".")[-1]) + if member and any(related(member, stem(kind)) for kind in kinds): + return False + head, of = doc_head(fact["lead"]) if fact else ("", None) + if of is None or not re.search(r"(?:arns?|amazon resource names? \(arns?\))$", head): + return False + parts = [re.sub(r"^(?:this|that|its) ", "", part.strip()) for part in re.split(r",| or ", of)] + return not any(doc_names("the name of the " + part, kind, formats) for part in parts for kind in kinds) \ + and any(doc_names("the name of the " + part, kind, formats) for part in parts for kind in others) + resources = [resource for resource in resources + if "arn" not in resource or not (foreign(resource["arn"]) or of_another_type(resource["arn"]))] + used = {path.removesuffix("[]") for resource in resources for path in resource.get("fill", {}).values()} + for kind in kinds: + variables = [v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES] + # A type an ARN member of the request already holds is named there (`UpdateAccelerator`'s `AcceleratorArn`, + # whose `Name` is the new name). + if any("arn" in resource and "." not in resource["arn"] and kind in resource["types"] + and (stem(resource["arn"]) in ("", "resource") or related(stem(resource["arn"]), stem(kind))) + for resource in resources): + continue + current = next((resource for resource in resources if resource.get("type") == kind + and not {"find", "when", "unless"} & set(resource)), None) + opened = current is not None and current.get("fill") == {} and "made" not in current + fill = dict(current["fill"]) if current else {} + unfilled = [v for v in variables if v not in fill] + if len(unfilled) != 1: + continue + variable = unfilled[0] + kind_stem = stem(kind) + candidates = [] + for path, fact in sorted(facts.items()): + if path in used or re.search(r"arns?$", path, re.IGNORECASE): + continue + field = path.split(".")[-1] + effective = stem(path.split(".")[0] if fact["nested"] and field.lower() in BARE else field) + aliased = aliases.get(effective, effective) + if fact["nested"]: + if aliased and (related(aliased, stem(variable)) or related(aliased, kind_stem)) \ + and compatible(field, variable): + candidates.append(("fill", fact["path"])) + elif doc_names(fact["lead"], kind, formats): + said = doc_kind(fact["lead"]) or kind_of(field) + if (compatible(said, variable) or (kind_of(variable) == "identifier" and not creating)) \ + and not (creating and not kind_of(variable)) \ + and not (creating and said != kind_of(variable) and kind_of(variable) != "identifier"): + candidates.append(("fill", fact["path"])) + elif len(variables) == 1 and not fact["path"].endswith("[]"): + candidates.append(("find", fact["path"])) + elif aliased != effective and related(aliased, kind_stem) and compatible(field, variable): + candidates.append(("fill", fact["path"])) + elif variable == "AccountId" and path in accounts: + candidates.append(("fill", fact["path"])) + if len(candidates) != 1: + continue + how, path = candidates[0] + if how == "find": + if current is None or opened: + resources = [resource for resource in resources if resource is not current] + resources.append({"type": kind, "fill": {}, "find": [path]}) + continue + fill[variable] = path + if current is not None: + current["fill"] = dict(sorted(fill.items())) + else: + resources.append({"type": kind, "fill": dict(sorted(fill.items()))}) + # A nested field filling a variable an optional top-level member of its name fills too is read when that member + # is absent. + optional = optional_members(models, name) + for path, fact in sorted(facts.items()): + field = path.split(".")[-1] + if not fact["nested"] or field not in facts or facts[field]["nested"] or field not in optional \ + or re.search(r"arns?$", field, re.IGNORECASE): + continue + for resource in list(resources): + if "fill" not in resource or {"when", "unless", "find"} & set(resource): + continue + filled = [v for v, p in resource["fill"].items() if p == facts[field]["path"]] + if len(filled) == 1 and fact["path"] not in resource["fill"].values(): + fallback = {key: value for key, value in resource.items() if key != "fill"} + fallback["fill"] = dict(resource["fill"], **{filled[0]: fact["path"]}) + fallback["when"] = {field: [None]} + resource["unless"] = {field: [None]} + resources.insert(resources.index(resource) + 1, fallback) + # A type whose one variable is the reference's `ResourceId` placeholder, in a REST request, is found by its + # service by the labels of its path up to the member named after it, and that member: a QuickSight user by its + # account, namespace and name, a group a membership is in by its own, not the member's. A member holding its ARN + # names it there, not by a name to find (an embed URL's `UserArn`). + labels = uri_labels(models, name) + for kind in kinds: + if [v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES] != ["ResourceId"] or not labels: + continue + if any(resource.get("type") == kind and resource.get("fill") for resource in resources): + continue + finding = [resource for resource in resources if resource.get("type") == kind and "find" in resource] + named = [path for path, fact in facts.items() if not fact["nested"] and path not in labels + and stem(path) and related(stem(path), stem(kind)) and not path.endswith("[]") + and not re.search(r"arns?$", path, re.IGNORECASE)] + member = finding[0]["find"][-1] if finding else (named[0] if len(named) == 1 else None) + about_it = related(made, stem(kind)) if made is not None else related(stem(SUBJECT_RE.sub("", name)), stem(kind)) + if member is None or not (finding or about_it): + continue + resources = [resource for resource in resources if not (resource.get("type") == kind and "find" in resource) + and not (resource.get("type") == kind and resource.get("fill") == {})] + # The labels before the member's own scope it; those after it name something inside it (a group's member). + scope = labels[:labels.index(member)] if member in labels else labels + resources.append({"type": kind, "fill": {}, "find": [label for label in scope if label != member] + [member]}) + # A `ResourceId` a non-create's request gives names whatever the action acts on, which its service finds it as + # (an EMR cluster or Studio its tag calls name), and another member then scopes the call rather than names one. + one = [kind for kind in kinds if len([v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES]) == 1] + if not creating and "ResourceId" in facts and len(one) >= 2 \ + and not any("arn" in resource or "find" in resource for resource in resources): + resources = [resource for resource in resources if resource.get("type") not in one] + resources.append({"types": one, "through": "ResourceId"}) + subject = stem(SUBJECT_RE.sub("", name)) + about = [kind for kind in formats if kind not in kinds and related(subject, stem(kind))] + if about and kinds and not creating and not any(resource.get("type") in kinds and resource.get("fill") + for resource in resources): + bare = [fact["path"] for path, fact in sorted(facts.items()) if not fact["nested"] and path.lower() in BARE] + if len(bare) == 1: + resources.append({"types": kinds, "through": bare[0]}) + return resources + + def path_labels(models: dict[str, dict], operation: str) -> dict[str, str]: """The bare members (`BARE`) the operation's REST request carries as a path label after a segment naming something, each with that segment stemmed, a plural in `ies` read as its `y`: FIS's `id` in @@ -932,29 +1030,57 @@ def enum_members(models: dict[str, dict], operation: str) -> dict[str, set[str]] return found -def picked_by_enum(types: list[str], formats: dict[str, str], members: dict[str, str], - enums: dict[str, set[str]]) -> list[dict] | None: +def picked_by_enum(operation: str, types: list[str], formats: dict[str, str], members: dict[str, str], + enums: dict[str, set[str]], models: dict[str, dict] | None = None, arn_members: set[str] | None = None, + labels: dict[str, str] | None = None) -> list[dict] | None: """The resources of a request a member of which picks the type: one whose enum lists two or more of the action's types, a value naming a type when it matches it ignoring case and hyphens (Route 53's tag calls name a - `ResourceType` of `healthcheck` or `hostedzone`, SSM's a `Document` or a `ManagedInstance`). Each type it lists is - filled from the member naming whatever the action acts on (`ResourceId`), whatever kind of value the type's - variable is, when the request holds that value; None when no member picks a type, or no member names the - resource.""" + `ResourceType` of `healthcheck` or `hostedzone`, SSM's a `Document` or a `ManagedInstance`), or when the word that + sets those types' formats apart abbreviates it, its letters in order from the first (Elastic Load Balancing v2's + `Type` of `application`, `network` or `gateway`, for `loadbalancer/app/`, `/net/` and `/gwy/`). A type is picked + too by a request leaving the member out when its documentation gives that value as the default ("The default is + application."). Each type is filled from the member naming whatever the action acts on (`ResourceId`), whatever + kind of value the type's one variable is, or as the rule fills it; None when no member picks a type, or no member + names the resource.""" + def abbreviates(word: str, value: str) -> bool: + if len(word) < 3 or not value.lower().startswith(word[0]): + return False + rest = iter(value.lower()) + return all(letter in rest for letter in word) + def word(kind: str) -> str | None: + parts = _resource(formats[kind]).split("/") + return parts[1] if len(parts) > 2 and "$" not in parts[1] else None for picker, values in sorted(enums.items()): - kinds = {kind: value for kind in types if kind in formats for value in values - if _enum_key(value) == _enum_key(kind)} - if len(kinds) < 2: + picks: dict[str, list] = {} + for kind in types: + if kind not in formats: + continue + matched = [value for value in sorted(values) if _enum_key(value) == _enum_key(kind)] + if not matched and word(kind): + matched = [value for value in sorted(values) if abbreviates(word(kind), value)] + matched = matched if len(matched) == 1 else [] + if matched: + picks[kind] = matched + if len(picks) < 2: continue + default = _documented_default(models or {}, operation.split(":", 1)[1], picker) picked = [] - for kind, value in kinds.items(): + for kind, picked_values in picks.items(): variables = [v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES] - if len(variables) != 1: - return None - named = [member for member in members if member != picker and stem(member) == "resource"] - if not named: - return None - member = min(named, key=lambda m: (members[m].endswith("[]"), len(m), m)) - picked.append({"type": kind, "fill": {variables[0]: members[member]}, "when": {picker: [value]}}) + named = [member for member in members if member != picker and stem(member) == "resource" + and len(variables) == 1] + if named: + member = min(named, key=lambda m: (members[m].endswith("[]"), len(m), m)) + fill = {variables[0]: members[member]} + else: + own = [r_ for r_ in resources_for(operation, [kind], formats, members, arn_members, labels) + if r_.get("type") == kind and r_.get("fill")] + if not own: + return None + fill = own[0]["fill"] + defaulted = default is not None and any(_enum_key(default) == _enum_key(v) for v in picked_values) + when = list(picked_values) + ([None] if defaulted else []) + picked.append({"type": kind, "fill": fill, "when": {picker: when}}) return picked return None @@ -964,6 +1090,24 @@ def _enum_key(value: str) -> str: return value.lower().replace("-", "") +def _documented_default(models: dict[str, dict], operation: str, member: str) -> str | None: + """The value a member's documentation gives as its default: "The default is application." gives `application`.""" + for model in models.values(): + spec = model["operations"].get(operation) + if spec is None or "input" not in spec: + continue + found = model["shapes"][spec["input"]["shape"]].get("members", {}).get(member) + if found: + match = re.search(r"the default is ([a-z0-9_-]+)", _lead_text(found.get("documentation"))) + if match: + return match.group(1) + return None + + +def _lead_text(documentation: str | None) -> str: + return re.sub(r"\s+", " ", re.sub(r"<[^>]+>", "", documentation or "")).strip().lower() + + def string_patterns(models: dict[str, dict], operation: str) -> dict[str, set[str | None]]: """Patterns of each top-level string member, including list elements, across the request's clients.""" found: dict[str, set[str | None]] = {} @@ -1049,7 +1193,22 @@ def _strings(model: dict, shape: dict) -> str | None: def _nested_arns(model: dict, name: str, shape: dict) -> list[str]: """The members ending in `Arn` or `Arns` of a structure, or of a list's structures, holding a string or a list - of strings, as `Name.Field` or `Name[].Field`.""" + of strings, as `Name.Field` or `Name[].Field`; and those of the structures of each value of a map, or of a + structure inside them, as `Name{}.Field` or `Name{}.Structure.Field` (a QuickSight data set's + `PhysicalTableMap{}.S3Source.DataSourceArn`).""" + if shape["type"] == "map": + value = model["shapes"][shape["value"]["shape"]] + if value["type"] != "structure": + return [] + found = [] + for field, member in value.get("members", {}).items(): + inner = model["shapes"][member["shape"]] + if re.search(r"arns?$", field, re.IGNORECASE) and _strings(model, inner) == "": + found.append(f"{name}{{}}.{field}") + elif inner["type"] == "structure": + found += [f"{name}{{}}.{field}.{sub}" for sub, nested in inner.get("members", {}).items() + if re.search(r"arns?$", sub, re.IGNORECASE) and _strings(model, model["shapes"][nested["shape"]]) == ""] + return found element = model["shapes"][shape["member"]["shape"]] if shape["type"] == "list" else shape if element["type"] != "structure": return [] @@ -1128,7 +1287,7 @@ def with_arn_of(resources: list[dict], formats: dict[str, str], members: dict[st found = [] for resource in resources: read = {path.removesuffix("[]") for path in resource.get("fill", {}).values()} | set(resource.get("when", {})) \ - | set(resource.get("unless", {})) | set(resource.get("absent", {})) + | set(resource.get("unless", {})) 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={**resource.get("arnOf", {}), **arn_of}) @@ -1236,7 +1395,7 @@ def resources_for(operation: str, types: list[str], formats: dict[str, str], mem name = operation.split(":", 1)[1] created = stem(CREATING_RE.sub("", name)) if CREATING_RE.match(name) else None subject = stem(SUBJECT_RE.sub("", name)) - arns = {member: path for member, path in members.items() if re.search(r"arns?$", member, re.IGNORECASE) + arns = {member: path for member, path in members.items() if re.search(r"arn(s|list)?$", member, re.IGNORECASE) or member in (arn_members or set())} names = {member: path for member, path in members.items() if member not in arns} by_arn: dict[str, list[str]] = {} @@ -1247,6 +1406,9 @@ def resources_for(operation: str, types: list[str], formats: dict[str, str], mem if kind not in formats: continue kind_stem = stem(kind) + # A type is also named by its format's leading resource word: `rule-on-default-event-bus` is a `rule`. + word = RESOURCE_PART_RE.match(formats[kind]) + word_stem = stem(word.group(1)) if word else kind_stem for member in sorted(arns): by_arn.setdefault(member, []).append(kind) # A top-level ARN member named for the type, or for whatever the action acts on, holds it, and a bare @@ -1255,9 +1417,16 @@ def resources_for(operation: str, types: list[str], formats: dict[str, str], mem or (stem(member) == kind_stem if member in (arn_members or set()) else related(stem(member), kind_stem) or kind_stem.startswith(stem(member))))] variables = [v for v in VARIABLE_RE.findall(formats[kind]) if v not in KNOWN_VARIABLES] + # A create makes its own type, so a member holding whatever the action acts on does not hold that one: + # `CreateResourceShare`'s `resourceArns` are what the share it makes holds. + creates_it = created is not None and (related(created, kind_stem) or related(created, word_stem)) + holding = [member for member in held if not (creates_it and stem(member) in ("", "resource"))] + # Its bare name then names what it makes, when the type's variables say they are a name or an id: a share's + # `${ResourcePath}`, which RAM mints, takes no name. + naming = holding if all(kind_of(v) for v in variables) else held # A bare `Name` or `Id` names the type the operation is about, or the one the path segment before it # names: `UpdateSafetyLeverState`'s `id`, in `/safetyLevers/{id}/state`, is the lever's. - bare = set() if held else set(names) if related(subject, kind_stem) \ + bare = set() if naming else set(names) if related(subject, kind_stem) or related(subject, word_stem) \ else {member for member, segment in (labels or {}).items() if related(segment, kind_stem)} # A member fills the resource's own variables before the account its ARN is in, which a request gives # through an account member alone: Account Management's `AccountId` is the member account an @@ -1267,7 +1436,7 @@ def resources_for(operation: str, types: list[str], formats: dict[str, str], mem fill: dict[str, str] = {} for variable in sorted(variables, key=lambda v: (v == in_slot, kind_of(v) == "", v)): choice = _filling(variable, kind_stem, len(variables), {m: p for m, p in names.items() if m not in fill.values()}, - bare=bare, qualified=namespace_of(operation) in QUALIFIED_MEMBERS, + bare=bare, qualified=namespace_of(operation) in QUALIFIED_MEMBERS, word_stem=word_stem, shapes=shapes if not held else None) if choice is not None: fill[variable] = choice @@ -1275,10 +1444,6 @@ def resources_for(operation: str, types: list[str], formats: dict[str, str], mem fill = {variable: names[member] for variable, member in fill.items()} if len([path for path in fill.values() if path.endswith("[]")]) > 1: fill = {variable: path for variable, path in fill.items() if not path.endswith("[]")} - # A create makes its own type, so a member holding whatever the action acts on does not hold that one: - # `CreateResourceShare`'s `resourceArns` are what the share it makes holds. - creates_it = created is not None and related(created, kind_stem) - holding = [member for member in held if not (creates_it and stem(member) in ("", "resource"))] if fill or (not holding and (not variables or creates_it)): filled[kind] = fill complete[kind] = len(fill) == len(variables) @@ -1386,13 +1551,20 @@ def by_members_key_is_empty(kinds: list[str], filled: dict[str, dict[str, str]]) def _filling(variable: str, kind_stem: str, variables: int, names: dict[str, str], bare: set[str], - qualified: bool = False, shapes: dict[str, str] | None = None) -> str | None: + qualified: bool = False, word_stem: str | None = None, + shapes: dict[str, str] | None = None) -> str | None: """The member that fills the variable: one of a compatible kind whose stem relates to the variable's, or, for the variable named after the type or a type's only one, a member named after the type, or a bare `Name` or `Id` among those `bare` gives, of a compatible kind, or else a string member whose botocore shape is named after the type, of a compatible kind (Parameter Store's `Path` and `GetParameterHistory`'s - `Name` hold a `PSParameterName`); the closest of them, and a string before a list.""" - variable_stem = stem(variable) + `Name` hold a `PSParameterName`); the closest of them, one qualified by the type's own name first (a + snapshot's `SnapshotClusterIdentifier` before `ClusterIdentifier`), and a string before a list. A variable the + reference names `ResourceId` is the type's own id (`ingestion/${ResourceId}`).""" + # A `ResourceId` variable is filled by a member named so (CreateOpsMetadata's, `opsmetadata/${ResourceId}`) before + # one named after the type; a bare `Id` is not, being whatever the operation is about. + if stem(variable) == "resource" and variable in names and not names[variable].endswith("[]"): + return variable + variable_stem = kind_stem if stem(variable) == "resource" else stem(variable) candidates = [member for member in names if stem(member) and related(stem(member), variable_stem) and compatible(member, variable)] if not candidates and (related(variable_stem, kind_stem) or variables == 1): @@ -1400,6 +1572,11 @@ def _filling(variable: str, kind_stem: str, variables: int, names: dict[str, str and ((member in bare and member.lower() in BARE) or (stem(member) and (related(stem(member), kind_stem) or (qualified and names_type(member, kind_stem)))))] + elif not candidates and word_stem and related(variable_stem, word_stem): + # A variable named after the format's leading word (`rule/${EventBusName}/${RuleName}`'s `RuleName`) takes a + # bare `Name` or `Id` of the operation that is about the type, and no member named after another type. + candidates = [member for member in names if compatible(member, variable) + and member in bare and member.lower() in BARE] if not candidates and (related(variable_stem, kind_stem) or variables == 1): candidates = [member for member in names if member in (shapes or {}) and not names[member].endswith("[]") and "." not in member and stem(shapes[member]) and related(stem(shapes[member]), kind_stem) @@ -1407,9 +1584,12 @@ def _filling(variable: str, kind_stem: str, variables: int, names: dict[str, str if not candidates: return None # A member naming the type before the variable (`SnapshotClusterIdentifier` for the snapshot's `ClusterName`, - # `DistributionTenantId` for the tenant's `Id`) wins over a bare one, which names something else. - return min(candidates, key=lambda member: (stem(member) != kind_stem + variable_stem, stem(member) != variable_stem, - names[member].endswith("[]"), len(member), member)) + # `DistributionTenantId` for the tenant's `Id`), or qualified by the type's own name, wins over a bare one, which + # names something else. + return min(candidates, key=lambda member: (not (stem(member) == kind_stem + variable_stem + or (stem(member).startswith(kind_stem) and stem(member) != kind_stem)), + stem(member) != variable_stem, names[member].endswith("[]"), + len(member), member)) def also_filled(types: list[str], members: dict[str, str], filled: dict[str, dict[str, str]], @@ -1504,33 +1684,10 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d if targets is not None: entry["targets"] = targets return entry - if operation in CORRECTIONS: - resources = CORRECTIONS[operation][0] - endpoints = {model["metadata"]["endpointPrefix"] for model in models.values()} - unknown = {resource["endpoint"] for resource in resources if "endpoint" in resource} - endpoints - if unknown: - raise ValueError(f"CORRECTIONS serves {operation} on {sorted(unknown)}, no endpoint prefix of the clients " - f"it reads ({sorted(endpoints)})") - else: - labels = path_labels(models, operation.split(":", 1)[1]) - resources = picked_by_enum(types, formats, members, enum_members(models, operation.split(":", 1)[1])) - if resources is None: - resources = with_through(with_found(with_parent_ids(resources_for(operation, types, formats, members, - arn_members, labels, - member_shapes(models, operation.split(":", 1)[1])), - formats, types, members), - namespace_of(operation), types, members), - namespace_of(operation), types, members) - optional = optional_members(models, operation.split(":", 1)[1]) - resources = with_absent_arn(resources, formats, optional) - resources = with_absent_account(resources, formats, account_members(models, operation.split(":", 1)[1]), - optional) - resources = with_map_fields(resources, types, formats, map_fields(models, operation.split(":", 1)[1])) - resources = with_account(resources, formats, account_members(models, operation.split(":", 1)[1])) - resources = with_structure_account(resources, formats, - structure_account_members(models, operation.split(":", 1)[1], types)) - resources = with_arn_of(resources, formats, name_or_arn_members(models, operation.split(":", 1)[1])) + resources = by_client(operation, models, lambda read: read_resources(operation, types, formats, read), formats) resources = with_made(resources, operation, formats) + if operation in MEASURED: + resources = measured_resources(operation, types, formats, resources) entry = {"action": upstream["action"], "types": types, "resources": resources} creates = creates_for(operation, types, formats, members) if creates: @@ -1547,6 +1704,274 @@ def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: d return entry +def measured_resources(operation: str, types: list[str], formats: dict[str, str], derived: list[dict]) -> list[dict]: + """The resources `MEASURED` gives the operation, refused unless its admission rules hold: its evidence links to + the measurement, the Service Reference lists none of its types for the action, each has an ARN format, and the + rules, which gave `derived`, do not already give them.""" + resources, evidence = MEASURED[operation] + kinds = {kind for resource in resources for kind in _kinds(resource)} + if "https://" not in evidence: + raise ValueError(f"MEASURED gives {operation} with no link to the measurement of AWS it rests on") + listed = sorted(kinds & set(types)) + if listed: + raise ValueError(f"MEASURED gives {operation} {listed}, which the Service Reference lists for its action: " + f"the rules read those, so a measurement of them belongs in a rule") + unknown = sorted(kinds - set(formats)) + if unknown: + raise ValueError(f"MEASURED gives {operation} {unknown}, which have no ARN format in the Service Reference") + if derived == resources: + raise ValueError(f"MEASURED gives {operation} what the rules already give: take it out") + return resources + + +def read_resources(operation: str, types: list[str], formats: dict[str, str], models: dict[str, dict]) -> list[dict]: + """The resources the rules read from the request of the clients given.""" + name = operation.split(":", 1)[1] + members = request_members(models, name) + patterns = string_patterns(models, name) + arn_members = {member for member, values in patterns.items() + if (kind_of(member) == "identifier" or stem(member) in ("", "resource")) + and values and all(only_arn(value) for value in values)} + labels = path_labels(models, name) + resources = picked_by_enum(operation, types, formats, members, enum_members(models, name), models, arn_members, labels) + if resources is None: + resources = with_through(with_found(with_parent_ids(resources_for(operation, types, formats, members, + arn_members, labels, + member_shapes(models, name)), + formats, types, members), + namespace_of(operation), types, members), + namespace_of(operation), types, members) + resources = with_documented(operation, types, formats, models, resources) + optional = optional_members(models, name) + resources = with_absent_arn(resources, formats, optional) + resources = with_absent_account(resources, formats, account_members(models, name), optional) + resources = with_map_fields(resources, types, formats, map_fields(models, name)) + resources = with_account(resources, formats, account_members(models, name)) + resources = with_structure_account(resources, formats, structure_account_members(models, name, types)) + resources = with_arn_of(resources, formats, name_or_arn_members(models, name)) + resources = with_default_pairs(resources, formats, optional) + resources = with_enum_named(operation, resources, formats, models) + resources = with_subject_through(operation, resources, members, map_fields(models, name), optional, models) + return with_optional_qualifier(resources, optional) + + +def with_enum_named(operation: str, resources: list[dict], formats: dict[str, str], + models: dict[str, dict]) -> list[dict]: + """The resources, a variable no member fills of a type named by its variables `fixed` to the one value of an enum + named after the variable that the operation's name gives as a word: CodePipeline's `CreateCustomActionType` names + an `actiontype:${Owner}/${Category}/${Provider}/${Version}` whose `ActionOwner` enum lists `AWS`, `ThirdParty` + and `Custom`, the owner of the custom action types it makes.""" + name = operation.split(":", 1)[1] + found = [] + for resource in resources: + if not resource.get("fill") or "find" in resource or "default" in resource: + found.append(resource) + continue + unfilled = set(VARIABLE_RE.findall(formats[resource["type"]])) - KNOWN_VARIABLES - set(resource["fill"]) + fixed = {} + for variable in sorted(unfilled): + values = {value for model in models.values() for shape_name, shape in model["shapes"].items() + if shape.get("enum") and shape_name.lower().endswith(variable.lower()) for value in shape["enum"]} + given = sorted(value for value in values + if value[:1].isupper() and re.search(rf"{re.escape(value)}(?=[A-Z]|$)", name)) + if len(given) == 1: + fixed[variable] = given[0] + found.append(dict(resource, fixed=fixed) if fixed else resource) + return found + + +def with_subject_through(operation: str, resources: list[dict], members: dict[str, str], fields: dict[str, str], + optional: set[str], models: dict[str, dict]) -> list[dict]: + """The resources, and a type the request names only by an optional member documented as holding what the operation + is about (its name past the verb), "the cluster to which the instance group belongs", also named, when the request + leaves that member out, through each member naming what the operation is about: `ModifyInstanceGroups` names its + cluster by its `ClusterId`, or else through each `InstanceGroups[].InstanceGroupId`, the cluster the service finds + the group in.""" + name = operation.split(":", 1)[1] + verb = SUBJECT_RE.match(name) + subject = stem(name[verb.end():]) if verb else "" + if not subject: + return resources + found = list(resources) + for resource in resources: + fill = resource.get("fill") + if not fill or set(resource) - {"type", "fill", "arnOf"} or len(set(fill.values())) != 1: + continue + member = next(iter(fill.values())) + held = SUBJECT_HOLDER_RE.search(_lead(_member_documentation(models, name, member))) + if member not in optional or not held or stem(held.group("subject")) != subject: + continue + for path in sorted(set(members.values()) | set(fields)): + if path != member and stem(path.split(".")[-1].removesuffix("[]")) == subject: + found.append({"types": [resource["type"]], "through": path, "when": {member: [None]}}) + return found + + +def _member_documentation(models: dict[str, dict], operation: str, member: str) -> str | None: + """The documentation of a top-level member of the operation's request, from the first client that has it.""" + for model in models.values(): + spec = model["operations"].get(operation) + if spec and "input" in spec: + found = model["shapes"][spec["input"]["shape"]].get("members", {}).get(member) + if found: + return found.get("documentation") + return None + + +def pattern_words(pattern: str) -> set[str]: + """The resource type words an ARN pattern names after its account: `...:([0-9]{12}):(event-busv2|subscriber)\\/` + gives `event-busv2` and `subscriber`.""" + words: set[str] = set() + for match in re.finditer(r"\{12\}\)?\??:", pattern): + rest = pattern[match.end():].lstrip("(") + depth, text = 0, "" + for char in rest: + if char == "(": + depth += 1 + elif char == ")": + if depth == 0: + break + depth -= 1 + elif char == "/" and depth == 0: + break + text += char + depth, part, parts = 0, "", [] + for char in text: + depth += char == "(" + depth -= char == ")" + if char == "|" and depth == 0: + parts.append(part) + part = "" + else: + part += char + parts.append(part) + words |= {found.group(0) for found in (re.match(r"[a-z][a-z0-9-]*", item) for item in parts) if found} + return words + + +def client_words(model: dict) -> set[str]: + """The resource type words a client's ARN patterns name.""" + return set().union(*(pattern_words(shape.get("pattern") or "") for shape in model["shapes"].values() + if shape.get("type") == "string")) + + +def by_client(operation: str, models: dict[str, dict], read, formats: dict[str, str] | None = None) -> list[dict]: + """The resources read from every client of the namespace whose model has the operation, each read apart when + they disagree: a resource every client names stays as it is, and one only some name applies to the requests of + their endpoint prefix (EventBridge's `events` and EventBridge V2's `eventsv2`), or to every request where the + clients share one (Elastic Load Balancing's classic and v2 APIs). Where a client's ARN patterns name one of two + types its request names by the same members, that client's request names that one: EventBridge V2's + `CreateEventBus` makes an `event-busv2`.""" + name = operation.split(":", 1)[1] + clients = sorted(client for client, model in models.items() + if "input" in model["operations"].get(name, {}) and _reading(model)) + merged = read(models) + if len(clients) < 2: + return merged + apart = {client: read({client: models[client]}) for client in clients} + if all(apart[client] == apart[clients[0]] for client in clients): + return merged + for client in clients: + apart[client] = narrowed(apart[client], client_words(models[client]), models[client], name, formats) + prefixes = {client: models[client]["metadata"].get("endpointPrefix") for client in clients} + shared = len(set(prefixes.values())) < len(clients) + resources: list[dict] = [] + for client in clients: + for resource in apart[client]: + everywhere = all(resource in apart[other] for other in clients) + tagged = resource if everywhere or shared else dict(resource, endpoint=prefixes[client]) + if tagged not in resources: + resources.append(tagged) + return resources + + +def narrowed(resources: list[dict], words: set[str], model: dict, operation: str, + formats: dict[str, str] | None = None) -> list[dict]: + """A client's resources, each ARN member's types narrowed to those its own pattern names, and a type its patterns + never name read as its versioned twin they do (`event-bus` as `event-busv2`, EventBridge V2's own), when that + twin's format has the variables it fills.""" + def word(kind: str) -> str: + match = RESOURCE_PART_RE.match((formats or {}).get(kind, "")) + return match.group(1) if match else "" + twins = {kind: twin for kind in (formats or {}) for twin in (formats or {}) + if word(kind) and word(kind) not in words and word(twin) in words + and re.fullmatch(r"v\d+", word(twin)[len(word(kind)):] if word(twin).startswith(word(kind)) else "")} + resources = [dict(resource, type=twins[resource["type"]]) if resource.get("type") in twins + and set(resource.get("fill", {})) <= set(VARIABLE_RE.findall(formats[twins[resource["type"]]])) + else resource for resource in resources] + spec = model["operations"].get(operation, {}) + root = model["shapes"][spec["input"]["shape"]] if "input" in spec else {"members": {}} + found = [] + for resource in resources: + if "arn" in resource and "." not in resource["arn"]: + member = root.get("members", {}).get(resource["arn"].removesuffix("[]")) + shape = model["shapes"][member["shape"]] if member else {} + element = model["shapes"][shape["member"]["shape"]] if shape.get("type") == "list" else shape + own = pattern_words(element.get("pattern") or "") + kinds = [kind for kind in resource["types"] if kind in own] + found.append(dict(resource, types=kinds) if kinds and kinds != resource["types"] else resource) + else: + found.append(resource) + return found + + +def with_default_pairs(resources: list[dict], formats: dict[str, str], optional: set[str]) -> list[dict]: + """The resources, two types whose formats differ by one variable an optional member fills (EventBridge's + `rule/${RuleName}` and `rule/${EventBusName}/${RuleName}`) marked so the one without it applies when the member + is absent or names its service's default (`whenDefault`), and the other otherwise (`unlessDefault`): a rule on + the default event bus has no bus in its ARN.""" + found = [dict(resource) for resource in resources] + for longer in found: + for shorter in found: + if "fill" not in longer or "fill" not in shorter or longer is shorter or "type" not in longer \ + or "type" not in shorter: + continue + extra = set(longer["fill"]) - set(shorter["fill"]) + if len(extra) != 1: + continue + variable = extra.pop() + member = longer["fill"][variable] + if member not in optional or shorter["fill"] != {k: v for k, v in longer["fill"].items() if k != variable}: + continue + if _resource(formats[shorter["type"]]).replace("${" + variable + "}/", "") != \ + _resource(formats[longer["type"]]).replace("${" + variable + "}/", "") \ + or "${" + variable + "}" in formats[shorter["type"]]: + continue + # The type whose default it is: the one the member may give the ARN of, or else whose format is the + # variable alone. + kind = longer.get("arnOf", {}).get(member) or named_by_variable(variable, formats) + if kind is None: + continue + shorter["whenDefault"] = {member: kind} + longer["unlessDefault"] = {member: kind} + # The resource on the default is in the account and Region of an ARN the member gives, as the other is. + if member in longer.get("arnOf", {}): + shorter["arnOf"] = {**shorter.get("arnOf", {}), member: longer["arnOf"][member]} + return found + + +def named_by_variable(variable: str, formats: dict[str, str]) -> str | None: + """The one type whose format's resource is a word and the variable alone (`event-bus/${EventBusName}`).""" + found = [kind for kind, arn in formats.items() if re.fullmatch(r"[A-Za-z][A-Za-z0-9-]*/\$\{" + variable + "}", _resource(arn))] + return found[0] if len(found) == 1 else None + + +def with_optional_qualifier(resources: list[dict], optional: set[str]) -> list[dict]: + """The resources, one filling a variable from an optional member no other resource reads, beside another it + fills from a member that is, named only when the request gives that member: Redshift's `GetClusterCredentials` + checks the database it names only 'If the DbName parameter is specified'.""" + read = [path for resource in resources for path in resource.get("fill", {}).values()] + found = [] + for resource in resources: + fill = resource.get("fill", {}) + own = [path for path in fill.values() if path in optional and read.count(path) == 1] + if len(fill) >= 2 and len(own) == 1 and len(own) < len(fill) \ + and not {"when", "unless", "find", "whenDefault", "unlessDefault"} & set(resource): + resource = dict(resource, unless={own[0]: [None]}) + found.append(resource) + return found + + def _named(value: object) -> set[str]: """The member names an operation's resources read: every key and string they hold, each up to its first `[` or `.`, a superset that keeps `located` to the members something reads.""" @@ -1704,19 +2129,22 @@ def _with_resource_types(documents: list[dict]) -> set[str]: def reads(operation: str) -> bool: - """Read whole namespaces, and in a namespace otherwise built by hand its explicit corrections and the - operations `READ_IN_HAND_BUILT` lists.""" + """Read whole namespaces, and in a namespace otherwise built by hand the operations `READ_IN_HAND_BUILT` lists + and those `MEASURED` gives.""" namespace = namespace_of(operation) - return namespace in NAMESPACES or namespace in HAND_BUILT and (operation in CORRECTIONS - or operation in READ_IN_HAND_BUILT) + return namespace in NAMESPACES or namespace in HAND_BUILT and (operation in READ_IN_HAND_BUILT + or operation in MEASURED) def _check_overrides(covered: dict[str, dict]) -> None: - """Every correction names an operation the file reads, and no namespace is in two places.""" - stale = [f"CORRECTIONS names {operation}, which the file does not read" for operation in CORRECTIONS - if operation not in covered] - stale += [f"READ_IN_HAND_BUILT names {operation}, which the reference does not give" for operation in READ_IN_HAND_BUILT + """Every operation `READ_IN_HAND_BUILT` lists or `MEASURED` gives is one the file reads, and no namespace is in + two places.""" + stale = [f"READ_IN_HAND_BUILT names {operation}, which the reference does not give" for operation in READ_IN_HAND_BUILT if operation not in covered] + stale += [f"MEASURED gives {operation}, which the file does not read" for operation in MEASURED + if operation not in covered] + stale += [f"MEASURED gives {operation}, which READ_IN_HAND_BUILT reads by the rules" for operation in MEASURED + if operation in READ_IN_HAND_BUILT] stale += [f"READ_IN_HAND_BUILT names {operation}, outside HAND_BUILT" for operation in READ_IN_HAND_BUILT if namespace_of(operation) not in HAND_BUILT] for left, right in (("NAMESPACES", "HAND_BUILT"), ("NAMESPACES", "NOT_COVERED"), ("HAND_BUILT", "NOT_COVERED")): @@ -1755,7 +2183,7 @@ ARN_PATH_RE = re.compile(r"^(?:[A-Za-z][A-Za-z0-9_]*(\[])?(\.[A-Za-z][A-Za-z0-9_ # A format's resource that is a literal and one variable, at its end. ONE_VARIABLE_RE = re.compile(r"^[^$]*\$\{\w+}$") # The keys a resource found by members does not take: it is read no other way. -FOUND_ONLY = {"absent", "arnOf", "fixed", "before"} +FOUND_ONLY = {"arnOf", "fixed"} def validate(document: dict) -> list[str]: @@ -1818,7 +2246,10 @@ def validate(document: dict) -> list[str]: problems.append(f"{operation} has no list of resource types") continue for resource in entry["resources"] if isinstance(entry["resources"], list) else [None]: - problems += _resource_problems(operation, resource, set(types), formats.get(namespace, {})) + # Only a measured entry names a type the reference omits for the action; MEASURED's admission checks + # (see `measured_resources`) say when it may. + measured = set(_kinds(resource)) if isinstance(resource, dict) and operation in MEASURED else set() + problems += _resource_problems(operation, resource, set(types) | measured, formats.get(namespace, {})) for created in entry.get("creates", []) if isinstance(entry.get("creates", []), list) else [None]: problems += _created_problems(operation, created, set(types), formats.get(namespace, {})) for made in entry.get("makes", []) if isinstance(entry.get("makes", []), list) else [None]: @@ -1854,14 +2285,20 @@ 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"} + if not isinstance(resource, dict) or not ({"types", "arn"} <= set(resource) <= {"types", "arn", "made", "endpoint"} or {"types", "through"} <= set(resource) <= {"types", "through", "when", "endpoint"} - or {"type", "fill"} <= set(resource) <= {"type", "fill", "when", "unless", "absent", "arnOf", "account", - "fixed", "made", "before", "find", "endpoint", - "default"}): + or {"type", "fill"} <= set(resource) <= {"type", "fill", "when", "unless", "arnOf", "account", + "fixed", "made", "find", "endpoint", + "default", "whenDefault", "unlessDefault"}): return [f"{operation} names {resource!r}, which is neither an ARN member nor a type's variables"] + for key in ("whenDefault", "unlessDefault"): + pair = resource.get(key) + if key in resource and (not isinstance(pair, dict) or len(pair) != 1 + or not all(isinstance(m, str) and PATH_RE.match(m) and k in formats for m, k in pair.items()) + or (key == "unlessDefault" and next(iter(pair)) not in resource["fill"].values()) + or ("whenDefault" in resource and "unlessDefault" in resource)): + return [f"{operation} names {resource!r} {key} no member and type of a default, or both"] if "default" in resource and (resource["default"] is not True or resource["fill"] or not resource.get("when") or set(resource) - {"type", "fill", "when", "default", "endpoint"}): return [f"{operation} names {resource!r} as its service's default, which is not for a request naming none"] @@ -1869,13 +2306,9 @@ def _resource_problems(operation: str, resource: object, types: set[str], format return [f"{operation} serves {resource!r} on {resource['endpoint']!r}, which is no endpoint prefix"] if resource.get("made", True) is not True: return [f"{operation} marks {resource!r} made by {resource['made']!r}, which is not true"] - before = resource.get("before", "#") - if not isinstance(before, str) or len(before) != 1: - return [f"{operation} reads its members before {before!r}, which is no one character"] named = resource.get("types") or [resource.get("type")] kinds = _kinds(resource) - corrected = resource in CORRECTIONS.get(operation, ([], ""))[0] - if len(kinds) != len(named) or not all((kind in types or corrected) and kind in formats for kind in kinds): + if len(kinds) != len(named) or not all(kind in types and kind in formats for kind in kinds): return [f"{operation} names {named}, not resource types its action acts on with an ARN format"] if "arn" in resource: if not isinstance(resource["arn"], str) or not ARN_PATH_RE.match(resource["arn"]): @@ -1905,10 +2338,6 @@ def _resource_problems(operation: str, resource: object, types: set[str], format 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()): - return [f"{operation} reads {absent!r} for absent members, which is no member's value"] arn_of = resource.get("arnOf", {}) if not isinstance(arn_of, dict) or not all( _read_as_one(path, fill) and isinstance(kind, str) @@ -1994,7 +2423,8 @@ def verify_against(vendored: dict, upstream: dict[str, dict], formats: dict[str, untrue.append(f"AWS no longer gives {namespace}'s {', '.join(changed)} the ARN format the file does") added = sorted(operation for operation in upstream if namespace_of(operation) in vendored["namespaces"] - and (namespace_of(operation) not in vendored["handBuilt"] or operation in CORRECTIONS) + and (namespace_of(operation) not in vendored["handBuilt"] or operation in READ_IN_HAND_BUILT + or operation in MEASURED) and operation not in vendored["operations"]) return untrue, added diff --git a/tools/aws/test_regen_iam_passed_roles.py b/tools/aws/test_regen_iam_passed_roles.py index a7d146cf4c..2f5bcd4cbf 100644 --- a/tools/aws/test_regen_iam_passed_roles.py +++ b/tools/aws/test_regen_iam_passed_roles.py @@ -218,13 +218,12 @@ def test_an_operation_naming_no_role_must_say_why(corrections): def test_an_operation_botocore_does_not_have_yet_is_not_read_until_a_bump_brings_it(corrections): - corrections.setattr(r, "NOT_READ", {"svc:CreateThing": r.NOT_IN_BOTOCORE}) before = {"svc": model({"CreateOther": "In"}, {"In": structure(Name="String")})} assert r.entry_for("svc:CreateThing", ["svc"], before) == {"passedTo": ["svc"], "notRead": r.NOT_IN_BOTOCORE} bumped = {"svc": model({"CreateThing": "In"}, {"In": structure(RoleArn="String")})} - with pytest.raises(ValueError, match="take it out of NOT_READ"): - r.entry_for("svc:CreateThing", ["svc"], bumped) + assert r.entry_for("svc:CreateThing", ["svc"], bumped) == {"passedTo": ["svc"], + "roles": [{"member": "RoleArn", "passedTo": "svc"}]} # --------------------------------------------------------------------------- # diff --git a/tools/aws/test_regen_iam_request_resources.py b/tools/aws/test_regen_iam_request_resources.py index 793fc499a1..dc2e7a136d 100644 --- a/tools/aws/test_regen_iam_request_resources.py +++ b/tools/aws/test_regen_iam_request_resources.py @@ -87,6 +87,17 @@ def test_a_create_makes_its_own_type_whatever_a_member_holding_the_resources_it_ {"types": ["pool"], "arn": "resourceArns[]"}] +def test_a_creates_bare_name_fills_what_it_makes_only_when_the_type_says_its_a_name_or_an_id(): + # CreateResourceShare's share is `resource-share/${ResourcePath}`, a path RAM mints, which no name fills. + formats = {"share": "arn:${Partition}:svc:${Region}:${Account}:share/${ResourcePath}", "thing": FORMATS["thing"]} + assert r.resources_for("svc:CreateShare", ["share", "thing"], formats, members("name", "resourceArns[]")) == [ + {"types": ["share", "thing"], "arn": "resourceArns[]"}, {"type": "share", "fill": {}}] + # A type whose variable is a name or an id takes the create's bare one. + named = {"share": "arn:${Partition}:svc:${Region}:${Account}:share/${ShareName}", "thing": FORMATS["thing"]} + assert r.resources_for("svc:CreateShare", ["share", "thing"], named, members("name", "resourceArns[]")) == [ + {"types": ["share", "thing"], "arn": "resourceArns[]"}, {"type": "share", "fill": {"ShareName": "name"}}] + + def test_an_optional_arn_member_of_a_type_without_variables_names_it_when_absent(): named = [{"types": ["catalog", "thing"], "arn": "CatalogArn"}] assert r.with_absent_arn(named, FORMATS, {"CatalogArn"}) == named + [ @@ -127,7 +138,7 @@ def test_a_create_whose_action_acts_on_no_type_makes_the_one_named_as_it_is(): assert r.makes_for("svc:CreatePool", [], VIEWS, {}) == [] -def test_a_built_document_with_what_a_create_makes_a_default_and_a_maps_ids_validates(corrections, tmp_path): +def test_a_built_document_with_what_a_create_makes_a_default_and_a_maps_ids_validates(isolated, tmp_path): service = model({"CreateThing": {"ThingName": "String"}, "ListThings": {"ThingArn": "String"}, "ApplySteps": {}}) service["shapes"]["Step"] = {"type": "structure", "members": {"poolId": {"shape": "String"}, "note": {"shape": "String"}}} @@ -355,12 +366,12 @@ def model(operations: dict[str, dict[str, str]], protocol: str = "json") -> dict @pytest.fixture -def corrections(monkeypatch): +def isolated(monkeypatch): monkeypatch.setattr(r, "NAMESPACES", ("svc",)) monkeypatch.setattr(r, "HAND_BUILT", ("hand",)) monkeypatch.setattr(r, "NOT_COVERED", {"later": "a later batch"}) - monkeypatch.setattr(r, "CORRECTIONS", {}) monkeypatch.setattr(r, "READ_IN_HAND_BUILT", {}) + monkeypatch.setattr(r, "MEASURED", {}) monkeypatch.setattr(r, "UNQUALIFIED", {}) monkeypatch.setattr(r, "MINTED_IDS", {}) monkeypatch.setattr(r, "FOUND_BY", {}) @@ -381,7 +392,7 @@ DOCUMENTS = [reference("svc", {"GetThing": ["thing"], "ListThings": []}, {"thing reference("later", {"Op": ["y"]}, {"y": "arn:${Partition}:later:::y"})] -def test_a_built_document_validates_matches_botocore_and_names_the_namespaces_it_does_not_read(corrections, tmp_path): +def test_a_built_document_validates_matches_botocore_and_names_the_namespaces_it_does_not_read(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}})}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") assert r.validate(document) == [] @@ -393,7 +404,7 @@ def test_a_built_document_validates_matches_botocore_and_names_the_namespaces_it assert json.loads(r.render(document)) == document -def test_a_member_holding_an_account_id_gives_the_account_of_the_types_named_by_variables(corrections, tmp_path): +def test_a_member_holding_an_account_id_gives_the_account_of_the_types_named_by_variables(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String", "registryId": "AccountId"}, "ListThings": {"registryId": "AccountId"}})}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") @@ -515,7 +526,7 @@ def test_a_format_whose_account_is_an_account_id_variable_takes_the_account_ever "thing": FORMATS["thing"]}} -def test_a_file_that_is_not_json_is_reported_and_not_read(corrections, tmp_path, capsys): +def test_a_file_that_is_not_json_is_reported_and_not_read(isolated, tmp_path, capsys): output = tmp_path / "iam-request-resources.json" output.write_text("{not json", encoding="utf-8") @@ -524,7 +535,7 @@ def test_a_file_that_is_not_json_is_reported_and_not_read(corrections, tmp_path, assert "could not be read" in capsys.readouterr().err -def test_a_file_that_cannot_be_read_is_reported(corrections, tmp_path, capsys): +def test_a_file_that_cannot_be_read_is_reported(isolated, tmp_path, capsys): output = tmp_path / "iam-request-resources.json" output.write_text("{}", encoding="utf-8") @@ -532,12 +543,12 @@ def test_a_file_that_cannot_be_read_is_reported(corrections, tmp_path, capsys): raise PermissionError(13, "Permission denied") # The read is refused rather than the file made unreadable, which a run as root could read anyway. - corrections.setattr(Path, "read_text", refuse) + isolated.setattr(Path, "read_text", refuse) assert r.main(["--check", "--output", str(output)]) == 1 assert "could not be read" in capsys.readouterr().err -def test_a_hand_edited_entry_does_not_match_botocore(corrections, tmp_path): +def test_a_hand_edited_entry_does_not_match_botocore(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}})}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") document["operations"]["svc:GetThing"]["resources"] = [] @@ -545,35 +556,35 @@ def test_a_hand_edited_entry_does_not_match_botocore(corrections, tmp_path): assert len(r.derive(document, tmp_path)) == 1 -def test_a_type_checked_without_a_qualifier_is_recorded_and_must_be_one_the_file_reads(corrections, tmp_path): +def test_a_type_checked_without_a_qualifier_is_recorded_and_must_be_one_the_file_reads(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}})}) - corrections.setattr(r, "UNQUALIFIED", {"svc:thing": "its service checks a qualified ARN without the qualifier"}) + isolated.setattr(r, "UNQUALIFIED", {"svc:thing": "its service checks a qualified ARN without the qualifier"}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") assert document["unqualified"] == {"svc": ["thing"]} assert r.validate(document) == [] and r.derive(document, tmp_path) == [] # A hand edit no longer matches, and a type the file has no format for fails the build. document["unqualified"] = {} assert r.validate(document) == [] and len(r.derive(document, tmp_path)) == 1 - corrections.setattr(r, "UNQUALIFIED", {"svc:gone": "no longer there"}) + isolated.setattr(r, "UNQUALIFIED", {"svc:gone": "no longer there"}) with pytest.raises(ValueError, match="svc:gone"): r.build(DOCUMENTS, "test", tmp_path, "botocore test") -def test_a_type_whose_service_mints_an_id_after_its_name_is_recorded_and_must_be_one_the_file_reads(corrections, tmp_path): +def test_a_type_whose_service_mints_an_id_after_its_name_is_recorded_and_must_be_one_the_file_reads(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}})}) - corrections.setattr(r, "MINTED_IDS", {"svc:thing": "its service follows the name with an id it mints"}) + isolated.setattr(r, "MINTED_IDS", {"svc:thing": "its service follows the name with an id it mints"}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") assert document["mintedIds"] == {"svc": ["thing"]} assert r.validate(document) == [] and r.derive(document, tmp_path) == [] # A hand edit no longer matches, and a type the file has no format for fails the build. document["mintedIds"] = {} assert r.validate(document) == [] and len(r.derive(document, tmp_path)) == 1 - corrections.setattr(r, "MINTED_IDS", {"svc:gone": "no longer there"}) + isolated.setattr(r, "MINTED_IDS", {"svc:gone": "no longer there"}) with pytest.raises(ValueError, match="svc:gone"): r.build(DOCUMENTS, "test", tmp_path, "botocore test") -def test_a_type_whose_arn_is_all_an_id_its_service_mints_is_found_by_the_members_naming_it(corrections, tmp_path): +def test_a_type_whose_arn_is_all_an_id_its_service_mints_is_found_by_the_members_naming_it(isolated, tmp_path): documents = [reference("svc", {"PutTarget": ["target"], "TagTarget": ["target"], "GetByResource": ["target"], "RunOn": ["target", "group"]}, {"target": "arn:${Partition}:svc:${Region}:${Account}:target/${ResourceId}", @@ -583,7 +594,7 @@ def test_a_type_whose_arn_is_all_an_id_its_service_mints_is_found_by_the_members "TagTarget": {"ResourceArn": "String"}, "GetByResource": {"ResourceId": "String"}, "RunOn": {"GroupName": "String"}})}) - corrections.setattr(r, "FOUND_BY", {"svc:target": (["Namespace", "ResourceId", "Dimension"], "its service mints the id"), + isolated.setattr(r, "FOUND_BY", {"svc:target": (["Namespace", "ResourceId", "Dimension"], "its service mints the id"), "svc:group": (["GroupName"], "its service mints the id")}) document = r.build(documents, "test", tmp_path, "botocore test") assert r.validate(document) == [] and r.derive(document, tmp_path) == [] @@ -599,19 +610,19 @@ def test_a_type_whose_arn_is_all_an_id_its_service_mints_is_found_by_the_members # A hand edit no longer matches, and a type the file has no format for fails the build. operations["svc:PutTarget"]["resources"] = [{"type": "target", "fill": {"ResourceId": "ResourceId"}}] assert r.validate(document) == [] and len(r.derive(document, tmp_path)) == 1 - corrections.setattr(r, "FOUND_BY", {"svc:gone": (["Namespace"], "no longer there")}) + isolated.setattr(r, "FOUND_BY", {"svc:gone": (["Namespace"], "no longer there")}) with pytest.raises(ValueError, match="svc:gone"): r.build(documents, "test", tmp_path, "botocore test") -def test_a_member_naming_a_resource_of_no_type_names_the_one_it_runs_on_through_it(corrections, tmp_path): +def test_a_member_naming_a_resource_of_no_type_names_the_one_it_runs_on_through_it(isolated, tmp_path): documents = [reference("svc", {"Run": ["cluster", "group"], "RunOnGroup": ["group"], "RunOnCluster": ["cluster"], "ListSessions": []}, {"cluster": "arn:${Partition}:svc:${Region}:${Account}:cluster:${ClusterName}", "group": "arn:${Partition}:svc:${Region}:${Account}:group/${GroupId}"})] write_models(tmp_path, {"svc": model({"Run": {"SessionId": "String"}, "RunOnGroup": {"SessionId": "String"}, "RunOnCluster": {"Sql": "String"}, "ListSessions": {"SessionId": "String"}})}) - corrections.setattr(r, "THROUGH", {"svc:SessionId": (["cluster", "group"], "a session runs on one")}) + isolated.setattr(r, "THROUGH", {"svc:SessionId": (["cluster", "group"], "a session runs on one")}) document = r.build(documents, "test", tmp_path, "botocore test") assert r.validate(document) == [] and r.derive(document, tmp_path) == [] operations = document["operations"] @@ -624,13 +635,13 @@ def test_a_member_naming_a_resource_of_no_type_names_the_one_it_runs_on_through_ # A hand edit no longer matches, and a type the file has no format for fails the build. operations["svc:Run"]["resources"] = [] assert r.validate(document) == [] and len(r.derive(document, tmp_path)) == 1 - corrections.setattr(r, "THROUGH", {"svc:SessionId": (["gone"], "no longer there")}) + isolated.setattr(r, "THROUGH", {"svc:SessionId": (["gone"], "no longer there")}) with pytest.raises(ValueError, match="svc:gone"): r.build(documents, "test", tmp_path, "botocore test") -def test_a_client_not_read_gives_no_members_and_aws_listing_it_is_no_untrue_claim(corrections, tmp_path): - corrections.setattr(r, "CLIENTS_NOT_READ", {"svcv2": "a second API Floci does not serve"}) +def test_a_client_not_read_gives_no_members_and_aws_listing_it_is_no_untrue_claim(isolated, tmp_path): + isolated.setattr(r, "CLIENTS_NOT_READ", {"svcv2": "a second API Floci does not serve"}) write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}}), "svcv2": model({"GetThing": {"ThingArn": "String"}})}) documents = [dict(DOCUMENTS[0], Operations=[dict(op, SDK=op["SDK"] + [{"Name": "svcv2", "Package": "Boto3"}]) @@ -672,17 +683,11 @@ def test_a_field_of_each_of_a_lists_structures_taking_an_arn_before_a_name_is_re # Only a list's structures give one value for each, so a lone structure's field is not read. assert r.name_or_arn_members(models, "PutEvents") == {"Entries[].BusName": "bus"} formats = {"bus": "arn:${Partition}:svc:${Region}:${Account}:bus/${BusName}"} - buses = [{"type": "bus", "fill": {"BusName": "Entries[].BusName"}, "absent": {"Entries[].BusName": "default"}}] + buses = [{"type": "bus", "fill": {"BusName": "Entries[].BusName"}}] assert r.with_arn_of(buses, formats, r.name_or_arn_members(models, "PutEvents")) == [ dict(buses[0], arnOf={"Entries[].BusName": "bus"})] -def test_a_correction_for_an_operation_the_file_does_not_read_fails(corrections, tmp_path): - corrections.setattr(r, "CORRECTIONS", {"svc:Gone": ([], "no longer there")}) - with pytest.raises(ValueError, match="svc:Gone"): - r.build(DOCUMENTS, "test", tmp_path, "botocore test") - - def good_document() -> dict: return {"namespaces": {"svc": ["svc"]}, "clientsNotRead": {"svcv2": "not served"}, "handBuilt": ["hand"], "notCovered": {"later": "a later batch"}, @@ -700,22 +705,18 @@ def test_a_well_formed_document_validates(): document["operations"]["svc:B"]["resources"][0]["when"] = {"Type": ["application", None]} document["operations"]["svc:B"]["resources"][0]["account"] = "registryId" document["operations"]["svc:B"]["resources"][0]["unless"] = {"Bus": ["default"]} - document["operations"]["svc:B"]["resources"][0]["absent"] = {"Bus": "default"} document["operations"]["svc:B"]["resources"][0]["arnOf"] = {"Bus": "thing"} - document["operations"]["svc:A"]["resources"][0]["before"] = "#" - # A member filling a variable read up to a character, as a CodeBuild build id names its project before ':'. - document["operations"]["svc:B"]["resources"][0]["before"] = ":" assert r.validate(document) == [] assert r.validate(with_a_create()) == [] - # A field of each of a list's structures fills a variable, read as given when absent, or as an ARN. + # A field of each of a list's structures fills a variable, read as given, or as an ARN. document = good_document() document["operations"]["svc:B"]["resources"][0].update( - fill={"GroupName": "Groups[].Name"}, absent={"Groups[].Name": "default"}, arnOf={"Groups[].Name": "thing"}) + fill={"GroupName": "Groups[].Name"}, arnOf={"Groups[].Name": "thing"}) assert r.validate(document) == [] # A field of a structure fills a variable, read as one value, and a variable no member fills may be fixed. document = good_document() document["operations"]["svc:B"]["resources"][0].update( - fill={"GroupName": "Group.Name"}, absent={"Group.Name": "default"}, fixed={"GroupId": "g-1"}, made=True) + fill={"GroupName": "Group.Name"}, fixed={"GroupId": "g-1"}, made=True) document["operations"]["svc:A"]["resources"][0]["made"] = True assert r.validate(document) == [] # A type whose ARN is all an id its service mints, found by the members naming it. @@ -766,7 +767,6 @@ def with_a_create() -> dict: (lambda d: d["operations"]["svc:A"]["resources"][0].update(made="true"), "not true"), (lambda d: d["operations"]["svc:B"]["resources"][0]["fill"].update(GroupName="Groups[].Names[]"), "no variables"), (lambda d: d["operations"]["svc:B"]["resources"][0]["fill"].update(GroupId="Groups[].Id"), "more than one list"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(absent={"Groups[].Name": "default"}), "absent members"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(arnOf={"Groups[].Name": "thing"}), "types of one variable"), (lambda d: d["operations"]["svc:B"]["resources"][0]["fill"].update(Other="Name"), "no variables"), (lambda d: d["operations"]["svc:B"]["resources"][0]["fill"].update(GroupId="Ids[]"), "more than one list"), @@ -779,17 +779,15 @@ def with_a_create() -> dict: (lambda d: d["operations"]["svc:B"]["resources"][0].update(when={"Type": []}), "no member's values"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(when={"Types[]": ["a"]}), "no member's values"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(when={"Type": [1]}), "no member's values"), - (lambda d: d["operations"]["svc:A"]["resources"][0].update(before="##"), "no one character"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(before="##"), "no one character"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(before=":", fill={"GroupName": "Names[]"}) or - d["operations"]["svc:B"]["resources"][0].update(before=1), "no one character"), + # A value read as given for a member left out, or up to a character, is no key of a resource any more. + (lambda d: d["operations"]["svc:A"]["resources"][0].update(before="#"), "neither an ARN member"), + (lambda d: d["operations"]["svc:B"]["resources"][0].update(before=":"), "neither an ARN member"), + (lambda d: d["operations"]["svc:B"]["resources"][0].update(absent={"Bus": "default"}), "neither an ARN member"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(account="Ids[]"), "no account of its ARN"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(account="a.b"), "no account of its ARN"), (lambda d: d["arnFormats"]["svc"].update(group="arn:${Partition}:svc:::group/${GroupName}") or d["operations"]["svc:B"]["resources"][0].update(account="registryId"), "no account of its ARN"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(unless={"Type": []}), "no member's values"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(absent={"Bus": ""}), "absent members"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(absent={"Bus[]": "default"}), "absent members"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(arnOf={"Bus": "pool"}), "types of one variable"), (lambda d: d["arnFormats"]["svc"].update(group="arn:${Partition}:svc:${Region}:${Account}:group/${GroupName}/${Id}") or d["operations"]["svc:B"]["resources"][0].update(arnOf={"Bus": "group"}), "types of one variable"), @@ -807,7 +805,7 @@ def with_a_create() -> dict: (lambda d: d["operations"]["svc:B"]["resources"][0].update(fill={}, find=[]), "beside a fill"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(fill={}, find=["Ids[]"]), "beside a fill"), (lambda d: d["operations"]["svc:B"]["resources"][0].update(fill={}, find="Namespace"), "beside a fill"), - (lambda d: d["operations"]["svc:B"]["resources"][0].update(fill={}, find=["Namespace"], absent={"Namespace": "ecs"}), + (lambda d: d["operations"]["svc:B"]["resources"][0].update(fill={}, find=["Namespace"], fixed={"GroupId": "g"}), "beside a fill"), (lambda d: d["operations"]["svc:A"]["resources"][0].update(find=["Namespace"]), "neither an ARN member"), ]) @@ -843,25 +841,6 @@ def test_verify_fails_on_an_action_type_or_format_aws_does_not_give_and_reports_ assert added == ["svc:D"] -def test_every_correction_is_the_vendored_entry_of_an_operation_the_file_reads(): - operations = json.loads(r.OUTPUT.read_text(encoding="utf-8"))["operations"] - assert r.CORRECTIONS - for operation, (resources, reason) in r.CORRECTIONS.items(): - assert operation in operations and reason, operation - # Derived metadata may extend a correction; metadata explicitly supplied by the correction must survive. - actual = operations[operation]["resources"] - assert len(actual) == len(resources), operation - for resource, correction in zip(actual, resources, strict=True): - assert {key: value for key, value in resource.items() - if key not in ("account", "arnOf", "made") or key in correction} == correction, operation - - -def test_a_correction_gives_the_operation_its_resources(corrections): - corrections.setattr(r, "CORRECTIONS", {"svc:GetThing": ([{"type": "thing", "fill": {}}], "a reason")}) - entry = r.entry_for("svc:GetThing", {"action": "svc:GetThing", "types": ["thing"]}, FORMATS, {}) - assert entry["resources"] == [{"type": "thing", "fill": {}}] - - def test_the_vendored_file_is_well_formed(): document = json.loads(r.OUTPUT.read_text(encoding="utf-8")) assert r.validate(document) == [] @@ -875,31 +854,31 @@ def test_the_vendored_file_is_well_formed(): assert operations["ecr:BatchGetRepositoryScanningConfiguration"]["resources"] == [ {"type": "repository", "fill": {"RepositoryName": "repositoryNames[]"}}] assert operations["cognito-idp:DescribeUserPool"]["resources"] == [{"type": "userpool", "fill": {"UserPoolId": "UserPoolId"}}] - # StartExecution's name is the execution's, so only its state machine ARN is read, up to a test case's #. - assert operations["states:StartExecution"]["resources"] == [ - {"types": ["statemachine"], "arn": "stateMachineArn", "before": "#"}] + # StartExecution's name is the execution's, so only its state machine ARN is read; Step Functions drops a test + # case's `#` from it at runtime (StoredResourceArns.canonical). + assert operations["states:StartExecution"]["resources"] == [{"types": ["statemachine"], "arn": "stateMachineArn"}] # An ARN inside a structure or each of a list's structures. assert operations["elasticloadbalancing:SetRulePriorities"]["resources"] == [ {"types": ["listener-rule/app", "listener-rule/net"], "arn": "RulePriorities[].RuleArn"}] assert operations["states:CreateStateMachineAlias"]["resources"] == [ {"types": ["statemachine"], "arn": "routingConfiguration[].stateMachineVersionArn"}] - # An EventBridge rule is on the bus EventBusName names, by name or ARN, or the default one when it names none. + # An EventBridge rule is on the bus EventBusName names, by name or ARN; a rule on the default bus, the one a + # request naming none acts on, which EventBridge gives at runtime, has no bus in its ARN, and a default bus's ARN + # puts it in that ARN's account. assert operations["events:DescribeRule"]["resources"] == [ - {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "when": {"EventBusName": ["default"]}, - "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}, {"type": "rule-on-custom-event-bus", "fill": {"EventBusName": "EventBusName", "RuleName": "Name"}, - "unless": {"EventBusName": ["default"]}, "absent": {"EventBusName": "default"}, "arnOf": {"EventBusName": "event-bus"}}] + "arnOf": {"EventBusName": "event-bus"}, "unlessDefault": {"EventBusName": "event-bus"}}, + {"type": "rule-on-default-event-bus", "fill": {"RuleName": "Name"}, "whenDefault": {"EventBusName": "event-bus"}, + "arnOf": {"EventBusName": "event-bus"}}] assert operations["events:DescribeEventBus"]["resources"] == [ {"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, - {"type": "event-bus", "fill": {"EventBusName": "Name"}, "absent": {"Name": "default"}, "endpoint": "events", - "arnOf": {"Name": "event-bus"}}] - # Each PutEvents entry is on the bus it names, by name or ARN, or the default one when it names none; an - # EventBridge V2 request is on the one bus its EventBusArn names. + {"type": "event-bus", "fill": {"EventBusName": "Name"}, "arnOf": {"Name": "event-bus"}, "endpoint": "events"}] + # Each PutEvents entry is on the bus it names, by name or ARN (the default one, which EventBridge gives, when it + # names none); an EventBridge V2 request is on the one bus its EventBusArn names. assert operations["events:PutEvents"]["resources"] == [ {"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Entries[].EventBusName"}, - "absent": {"Entries[].EventBusName": "default"}, "endpoint": "events", - "arnOf": {"Entries[].EventBusName": "event-bus"}}] + "arnOf": {"Entries[].EventBusName": "event-bus"}, "endpoint": "events"}] # EventBridge V2 is read beside EventBridge, and where both name an operation's resources, which one applies is # the endpoint serving the request, never a member a caller could add. assert document["namespaces"]["events"] == ["eventbridgev2", "events"] @@ -908,11 +887,11 @@ def test_the_vendored_file_is_well_formed(): assert operations["events:DeleteEventBus"]["resources"] == [ {"types": ["event-busv2"], "arn": "EventBusArn", "endpoint": "eventsv2"}, {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events"}] - assert operations["events:CreateEventBus"]["resources"][1:] == [ - {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events", "made": True}, - {"type": "event-busv2", "fill": {"EventBusName": "Name"}, "endpoint": "eventsv2"}] + created = operations["events:CreateEventBus"]["resources"] + assert {"type": "event-bus", "fill": {"EventBusName": "Name"}, "endpoint": "events", "made": True} in created + assert {"type": "event-busv2", "fill": {"EventBusName": "Name"}, "endpoint": "eventsv2"} in created # A create's tags are checked on what it makes: not a dead-letter target or the bus a subscriber is made on. - assert "made" not in operations["events:CreateEventBus"]["resources"][0] + assert [resource for resource in created if "arn" in resource and resource.get("made")] == [] assert [resource for resource in operations["events:CreateSubscriber"]["resources"] if resource.get("made")] == [ {"type": "subscriber", "fill": {"SubscriberName": "Name"}, "made": True}] assert not any("when" in resource or "unless" in resource @@ -947,47 +926,8 @@ def test_the_vendored_file_is_well_formed(): "type": "loadbalancer/app/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["application", None]}} -@pytest.mark.parametrize("operation", ["SendTaskSuccess", "SendTaskFailure", "SendTaskHeartbeat"]) -def test_callback_resources_are_resolved_from_the_token(operation): - resources, reason = r.CORRECTIONS[f"states:{operation}"] - assert resources == [{"type": kind, "fill": {}, "find": ["taskToken"]} - for kind in ("activity", "statemachine")] - assert "2026-11-02" in reason - assert "no resource types" in reason - - -def test_list_tables_correction_names_the_literal_collection_without_selectors(): - resources, reason = r.CORRECTIONS["dynamodb:ListTables"] - assert resources == [{"type": "table", "fill": {}}] - assert "table/?" in reason - formats = {"table": "arn:${Partition}:dynamodb:${Region}:${Account}:table/${TableName}"} - assert not r._resource_problems("dynamodb:ListTables", resources[0], [], formats) - assert r._resource_problems("dynamodb:OtherOperation", resources[0], [], formats) - assert r.reads("dynamodb:ListTables") - assert not r.reads("dynamodb:BatchWriteItem") - assert not r.reads("dynamodb:ExecuteStatement") - - -def test_hand_built_correction_is_generated_without_claiming_other_operations(corrections, tmp_path): - corrections.setattr(r, "CORRECTIONS", {"hand:ListThings": ([{"type": "thing", "fill": {}}], "measured collection")}) - documents = DOCUMENTS + [reference("hand", {"ListThings": [], "PutThing": ["thing"]}, - {"thing": "arn:${Partition}:hand:${Region}:${Account}:thing/${ThingName}"})] - hand = model({"ListThings": {}, "PutThing": {"ThingName": "String"}}) - hand["metadata"]["endpointPrefix"] = "hand" - write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}}), "hand": hand}) - document = r.build(documents, "test", tmp_path, "botocore test") - assert document["operations"]["hand:ListThings"] == { - "action": "hand:ListThings", "types": [], "resources": [{"type": "thing", "fill": {}}]} - assert "hand:PutThing" not in document["operations"] - assert document["namespaces"]["hand"] == ["hand"] - assert document["handBuilt"] == ["hand"] - assert r.validate(document) == [] - assert r.derive(document, tmp_path) == [] - assert r.verify_against(document, r.checked_actions(documents), document["arnFormats"]) == ([], []) - - -def test_hand_built_operations_listed_to_read_follow_the_rule(corrections, tmp_path): - corrections.setattr(r, "READ_IN_HAND_BUILT", {"hand:GetThing": "a family the rule reads"}) +def test_hand_built_operations_listed_to_read_follow_the_rule(isolated, tmp_path): + isolated.setattr(r, "READ_IN_HAND_BUILT", {"hand:GetThing": "a family the rule reads"}) documents = DOCUMENTS + [reference("hand", {"GetThing": ["thing"], "PutThing": ["thing"]}, {"thing": "arn:${Partition}:hand:${Region}:${Account}:thing/${ThingName}"})] hand = model({"GetThing": {"ThingName": "String"}, "PutThing": {"ThingName": "String"}}) @@ -1001,21 +941,86 @@ def test_hand_built_operations_listed_to_read_follow_the_rule(corrections, tmp_p assert r.validate(document) == [] -def test_operations_listed_to_read_must_exist_and_be_hand_built(corrections, tmp_path): +def test_operations_listed_to_read_must_exist_and_be_hand_built(isolated, tmp_path): write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}})}) - corrections.setattr(r, "READ_IN_HAND_BUILT", {"hand:Gone": "no longer there"}) + isolated.setattr(r, "READ_IN_HAND_BUILT", {"hand:Gone": "no longer there"}) with pytest.raises(ValueError, match="READ_IN_HAND_BUILT names hand:Gone, which the reference does not give"): r.build(DOCUMENTS, "test", tmp_path, "botocore test") -def test_measured_callback_correction_retains_action_metadata_and_rejects_unlisted_resources(): - formats = {"activity": "arn:${Partition}:states:${Region}:${Account}:activity:${ActivityName}", - "statemachine": "arn:${Partition}:states:${Region}:${Account}:stateMachine:${StateMachineName}"} - resource = {"type": "activity", "fill": {}, "find": ["taskToken"]} - assert not r._resource_problems("states:SendTaskSuccess", resource, [], formats) - assert r._resource_problems("states:SendTaskSuccess", {**resource, "find": ["otherToken"]}, [], formats) - assert r._resource_problems("states:OtherOperation", resource, [], formats) - assert r._resource_problems("states:SendTaskSuccess", resource, [], {}) +MEASURED_FORMATS = {"thing": "arn:${Partition}:hand:${Region}:${Account}:thing/${ThingName}"} +PROBED = "real AWS probes in https://example.com/probes accept an allow and enforce a deny on thing/*" + + +def measured_documents(tmp_path, listed: list[str]) -> list[dict]: + hand = model({"ListThings": {"StartName": "String"}}) + hand["metadata"]["endpointPrefix"] = "hand" + write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}}), "hand": hand}) + return DOCUMENTS + [reference("hand", {"ListThings": listed}, MEASURED_FORMATS)] + + +def test_a_measured_operation_takes_the_resources_aws_was_measured_to_check_where_the_reference_lists_none( + isolated, tmp_path): + isolated.setattr(r, "MEASURED", {"hand:ListThings": ([{"type": "thing", "fill": {}}], PROBED)}) + document = r.build(measured_documents(tmp_path, []), "test", tmp_path, "botocore test") + # Read in a namespace otherwise built by hand, keeping the reference's empty types. + assert document["operations"]["hand:ListThings"] == { + "action": "hand:ListThings", "types": [], "resources": [{"type": "thing", "fill": {}}]} + assert r.reads("hand:ListThings") + assert r.validate(document) == [] + assert r.derive(document, tmp_path) == [] + + +@pytest.mark.parametrize("measured, listed, problem", [ + # No link to the measurement it rests on. + (([{"type": "thing", "fill": {}}], "probed against AWS, results not published"), [], "no link to the measurement"), + # A type the reference lists for the action: the rules read it, so a measurement of it belongs in a rule. + (([{"type": "thing", "fill": {}}], PROBED), ["thing"], "which the Service Reference lists for its action"), + # A type with no ARN format. + (([{"type": "gadget", "fill": {}}], PROBED), [], "no ARN format"), + # What the rules already give: an entry a later rule or reference update makes redundant is taken out. + (([], PROBED), [], "what the rules already give"), +]) +def test_a_measured_entry_is_refused_unless_it_cites_aws_for_what_the_metadata_does_not_say( + isolated, tmp_path, measured, listed, problem): + isolated.setattr(r, "MEASURED", {"hand:ListThings": measured}) + with pytest.raises(ValueError, match=problem): + r.build(measured_documents(tmp_path, listed), "test", tmp_path, "botocore test") + + +def test_a_measured_entry_must_name_an_operation_the_file_reads(isolated, tmp_path): + isolated.setattr(r, "MEASURED", {"hand:Gone": ([{"type": "thing", "fill": {}}], PROBED)}) + with pytest.raises(ValueError, match="MEASURED gives hand:Gone, which the file does not read"): + r.build(measured_documents(tmp_path, []), "test", tmp_path, "botocore test") + + +def test_a_variable_no_member_fills_takes_the_one_value_of_its_enum_the_operations_name_gives(): + formats = {"actiontype": "arn:${Partition}:svc:${Region}:${Account}:actiontype:${Owner}/${Category}"} + owners = model({"CreateCustomActionType": {"category": "String"}}) + owners["shapes"]["ActionOwner"] = {"type": "string", "enum": ["AWS", "ThirdParty", "Custom"]} + named = [{"type": "actiontype", "fill": {"Category": "category"}}] + assert r.with_enum_named("svc:CreateCustomActionType", named, formats, {"svc": owners}) == [ + dict(named[0], fixed={"Owner": "Custom"})] + # A name giving none of its values, or a word inside another, fixes nothing. + assert r.with_enum_named("svc:CreateActionType", named, formats, {"svc": owners}) == named + assert r.with_enum_named("svc:CreateCustomizedActionType", named, formats, {"svc": owners}) == named + + +def test_a_type_named_by_a_member_documented_as_holding_the_operations_subject_is_reached_through_it_when_left_out(): + groups = model({"ModifyInstanceGroups": {"ClusterId": "String"}}) + groups["shapes"]["ModifyInstanceGroupsIn"]["members"]["ClusterId"]["documentation"] = \ + "

The ID of the cluster to which the instance group belongs.

" + named = [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}] + fields = {"InstanceGroups[].InstanceGroupId": "InstanceGroupId"} + assert r.with_subject_through("svc:ModifyInstanceGroups", named, {"ClusterId": "ClusterId"}, fields, + {"ClusterId"}, {"svc": groups}) == named + [ + {"types": ["cluster"], "through": "InstanceGroups[].InstanceGroupId", "when": {"ClusterId": [None]}}] + # A member that must be given, or one not documented as holding the subject, is all that names the type. + assert r.with_subject_through("svc:ModifyInstanceGroups", named, {"ClusterId": "ClusterId"}, fields, + set(), {"svc": groups}) == named + groups["shapes"]["ModifyInstanceGroupsIn"]["members"]["ClusterId"]["documentation"] = "

The cluster.

" + assert r.with_subject_through("svc:ModifyInstanceGroups", named, {"ClusterId": "ClusterId"}, fields, + {"ClusterId"}, {"svc": groups}) == named # --------------------------------------------------------------------------- # @@ -1032,7 +1037,7 @@ def rest_model(operations: dict[str, dict[str, str]], located: dict[str, dict[st return built -def test_a_rest_request_reads_its_path_and_query_members_and_records_where_the_ones_it_reads_are(corrections, tmp_path): +def test_a_rest_request_reads_its_path_and_query_members_and_records_where_the_ones_it_reads_are(isolated, tmp_path): svc = rest_model({"GetThing": {"ThingName": "String", "Marker": "String"}, "ListThings": {"Marker": "String"}}, {"GetThing": {"ThingName": "uri:Name", "Marker": "querystring:marker"}, "ListThings": {"Marker": "querystring:marker"}}) @@ -1053,7 +1058,7 @@ def test_a_member_two_clients_locate_apart_is_an_error(): r.located_members({"one": one, "two": two}, "GetThing") -def test_a_located_member_must_be_a_path_label_or_a_query_parameter(corrections, tmp_path): +def test_a_located_member_must_be_a_path_label_or_a_query_parameter(isolated, tmp_path): write_models(tmp_path, {"svc": rest_model({"GetThing": {"ThingName": "String"}, "ListThings": {}}, {"GetThing": {"ThingName": "uri:ThingName"}})}) document = r.build(DOCUMENTS, "test", tmp_path, "botocore test") @@ -1068,8 +1073,8 @@ SPLIT = [reference("svc", {"GetThing": ["thing"], "ListThings": []}, {"thing": F SPLIT[0]["Actions"].append({"Name": "DescribeThing", "Resources": [{"Name": "thing"}]}) -def test_a_rest_models_operations_the_reference_lists_for_no_client_take_their_own_actions(corrections): - corrections.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) +def test_a_rest_models_operations_the_reference_lists_for_no_client_take_their_own_actions(isolated): + isolated.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) found = r.with_rest_operations(r.checked_actions(SPLIT), SPLIT, {"svc-v2": {"GetThing", "DescribeThing", "Gone"}}) assert found["svc:GetThing"]["clients"] == ["svc", "svc-v2"] assert found["svc:DescribeThing"] == {"action": "svc:DescribeThing", "types": ["thing"], "clients": ["svc-v2"]} @@ -1077,8 +1082,8 @@ def test_a_rest_models_operations_the_reference_lists_for_no_client_take_their_o assert "svc:Gone" not in found -def test_a_namespace_reads_the_operations_of_the_rest_models_floci_routes_under_it(corrections, tmp_path): - corrections.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) +def test_a_namespace_reads_the_operations_of_the_rest_models_floci_routes_under_it(isolated, tmp_path): + isolated.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}}), "svc-v2": rest_model({"DescribeThing": {"ThingName": "String"}}, {"DescribeThing": {"ThingName": "uri:ThingName"}})}) @@ -1097,8 +1102,8 @@ def test_a_namespace_reads_the_operations_of_the_rest_models_floci_routes_under_ assert r.main(["--verify", "--source-dir", str(sources), "--output", str(output)]) == 0 -def test_verify_reports_a_rest_models_operation_whose_action_aws_no_longer_has(corrections, tmp_path): - corrections.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) +def test_verify_reports_a_rest_models_operation_whose_action_aws_no_longer_has(isolated, tmp_path): + isolated.setattr(r, "REST_MODELS", {"svc-v2": "svc"}) write_models(tmp_path, {"svc": model({"GetThing": {"ThingName": "String"}, "ListThings": {}}), "svc-v2": rest_model({"DescribeThing": {"ThingName": "String"}}, {"DescribeThing": {"ThingName": "uri:ThingName"}})}) @@ -1209,7 +1214,6 @@ def test_controltower_entries_are_derived_without_operation_corrections(operatio from regen_partitions import resolve_botocore_data key = "controltower:" + operation - assert key not in r.CORRECTIONS document = json.loads(r.OUTPUT.read_text()) data, _ = resolve_botocore_data(None) model = r.load_models(data, {"controltower"}) @@ -1262,8 +1266,6 @@ def test_no_inferred_identifier_metadata_or_withdrawn_redshift_rows(): document = json.loads(r.OUTPUT.read_text()) resource = document["operations"]["redshift:DescribeClusters"]["resources"][0] assert "arnOf" not in resource - assert "redshift:CreateCluster" not in r.CORRECTIONS - assert "redshift:AssociateDataShareConsumer" not in r.CORRECTIONS def test_sso_access_scope_does_not_authorize_target_applications(): @@ -1295,14 +1297,14 @@ def test_a_member_whose_enum_lists_two_of_the_actions_types_picks_the_type(): "hostedzone": "arn:${Partition}:route53:::hostedzone/${Id}"} members = {"ResourceType": "ResourceType", "ResourceId": "ResourceId"} enums = {"ResourceType": {"healthcheck", "hostedzone"}} - assert r.picked_by_enum(["healthcheck", "hostedzone"], formats, members, enums) == [ + assert r.picked_by_enum("route53:TagResource", ["healthcheck", "hostedzone"], formats, members, enums) == [ {"type": "healthcheck", "fill": {"Id": "ResourceId"}, "when": {"ResourceType": ["healthcheck"]}}, {"type": "hostedzone", "fill": {"Id": "ResourceId"}, "when": {"ResourceType": ["hostedzone"]}}] # An enum listing one of the action's types, or none of them, picks nothing. - assert r.picked_by_enum(["hostedzone"], formats, members, enums) is None - assert r.picked_by_enum(["healthcheck", "hostedzone"], formats, members, {"ResourceType": {"other"}}) is None + assert r.picked_by_enum("route53:TagResource", ["hostedzone"], formats, members, enums) is None + assert r.picked_by_enum("route53:TagResource", ["healthcheck", "hostedzone"], formats, members, {"ResourceType": {"other"}}) is None # Without a member naming the resource, the request names none of them. - assert r.picked_by_enum(["healthcheck", "hostedzone"], formats, {"ResourceType": "ResourceType"}, enums) is None + assert r.picked_by_enum("route53:TagResource", ["healthcheck", "hostedzone"], formats, {"ResourceType": "ResourceType"}, enums) is None def test_an_enum_value_picks_a_type_ignoring_case_and_hyphens_and_the_resource_id_fills_it(): @@ -1311,7 +1313,8 @@ def test_an_enum_value_picks_a_type_ignoring_case_and_hyphens_and_the_resource_i "parameter": "arn:${Partition}:ssm:${Region}:${Account}:parameter/${ParameterNameWithoutLeadingSlash}"} members = {"ResourceType": "ResourceType", "ResourceId": "ResourceId"} enums = {"ResourceType": {"Document", "ManagedInstance", "Parameter", "Automation"}} - assert r.picked_by_enum(["document", "managed-instance", "parameter"], formats, members, enums) == [ + assert r.picked_by_enum("ssm:AddTagsToResource", ["document", "managed-instance", "parameter"], formats, members, + enums) == [ {"type": "document", "fill": {"DocumentName": "ResourceId"}, "when": {"ResourceType": ["Document"]}}, {"type": "managed-instance", "fill": {"InstanceId": "ResourceId"}, "when": {"ResourceType": ["ManagedInstance"]}}, @@ -1328,3 +1331,239 @@ def test_a_member_whose_shape_is_named_after_the_type_names_it(): assert r.resources_for("svc:GetPoolsByPath", ["pool"], FORMATS, members("Path"), shapes={"Path": "PoolName"}) == [] assert r.resources_for("svc:GetThingsByPath", ["thing"], FORMATS, members("Paths[]"), shapes={"Paths": "ThingName"}) == [] + + +# --------------------------------------------------------------------------- # +# What botocore's documentation and shapes say a member names +# --------------------------------------------------------------------------- # +def documented(operation: str, fields: dict[str, tuple[str, str]], output: dict[str, str] | None = None, + protocol: str = "json") -> dict: + """A model whose operation takes the members given, each a shape name and its documentation.""" + shapes = {"String": {"type": "string"}, "Strings": {"type": "list", "member": {"shape": "String"}}, + "AccountId": {"type": "string", "pattern": "\\d{12}"}, + "RoleArn": {"type": "string", "pattern": "arn:aws(-[\\w]+)*:iam::[0-9]{12}:role/.*"}} + shapes["In"] = {"type": "structure", "members": {name: {"shape": shape, "documentation": f"

{doc}

"} + for name, (shape, doc) in fields.items()}} + spec = {"input": {"shape": "In"}} + if output: + shapes["Out"] = {"type": "structure", "members": {name: {"shape": shape} for name, shape in output.items()}} + spec["output"] = {"shape": "Out"} + return {"metadata": {"protocol": protocol, "endpointPrefix": "svc"}, "operations": {operation: spec}, "shapes": shapes} + + +DOCUMENTED = {"pipeline": "arn:${Partition}:svc:${Region}:${Account}:pipeline/${PipelineName}", + "processor": "arn:${Partition}:svc:${Region}:${Account}:processor/${ProcessorId}", + "trail": "arn:${Partition}:svc:${Region}:${Account}:trail/${TrailName}", + "dashboard": "arn:${Partition}:svc:${Region}:${Account}:dashboard/${DashboardName}"} + + +def test_a_member_whose_documentation_names_the_type_fills_it_or_is_found_by_its_service(): + starts = {"svc": documented("StartPipelineExecution", {"name": ("String", "The name of the pipeline to start.")})} + assert r.with_documented("svc:StartPipelineExecution", ["pipeline"], DOCUMENTED, starts, []) == [ + {"type": "pipeline", "fill": {"PipelineName": "name"}}] + # A name for an id variable: the type's service finds the resource by it, its id open when it finds none. + stops = {"svc": documented("StopProcessor", {"Name": ("String", "The name of the processor to stop.")})} + assert r.with_documented("svc:StopProcessor", ["processor"], DOCUMENTED, stops, []) == [ + {"type": "processor", "fill": {}, "find": ["Name"]}] + # A type named only past the word the documentation stops at names nothing: a pipeline execution is no pipeline. + runs = {"svc": documented("GetRun", {"id": ("String", "The ID of the pipeline execution.")})} + assert r.with_documented("svc:GetRun", ["pipeline"], DOCUMENTED, runs, []) == [] + # A type an ARN member of the request already holds takes no other member: an update's Name is the new name. + held = [{"types": ["pipeline"], "arn": "PipelineArn"}] + updates = {"svc": documented("UpdatePipeline", {"Name": ("String", "The name of the pipeline."), + "PipelineArn": ("String", "The ARN of the pipeline.")})} + assert r.with_documented("svc:UpdatePipeline", ["pipeline"], DOCUMENTED, updates, held) == held + + +def test_a_member_whose_documentation_says_it_is_an_arn_holds_one(): + tags = {"svc": documented("AddTags", {"ResourceId": ("String", "Specifies the ARN of the trail or dashboard to " + "which one or more tags will be added.")})} + assert r.with_documented("svc:AddTags", ["dashboard", "trail"], DOCUMENTED, tags, []) == [ + {"types": ["dashboard", "trail"], "arn": "ResourceId"}] + # A name or an ARN is a name, and an ARN of something else is no ARN of the action's types. + named = {"svc": documented("GetTrail", {"Name": ("String", "Specifies the name or the ARN of the trail.")})} + assert r.with_documented("svc:GetTrail", ["trail"], DOCUMENTED, named, []) == [ + {"type": "trail", "fill": {"TrailName": "Name"}}] + keys = {"svc": documented("UntagResource", {"ResourceTagKeys": ("Strings", "The tag keys associated with the " + "resource ARN.")})} + assert r.with_documented("svc:UntagResource", ["trail"], DOCUMENTED, keys, []) == [] + assert r.doc_head("the amazon resource name (arn) for which you want to describe the tags") == ( + "the amazon resource name (arn)", None) + + +def test_an_arn_member_whose_pattern_takes_another_services_arns_names_none_of_the_actions_resources(): + models = {"svc": documented("CreatePipeline", {"roleArn": ("RoleArn", "The role it assumes.")})} + assert r.with_documented("svc:CreatePipeline", ["pipeline"], DOCUMENTED, models, + [{"types": ["pipeline"], "arn": "roleArn"}]) == [] + # A pattern whose ARN is optional, in a group of its own: CUR's billing view ARN. + views = documented("PutPipeline", {"viewArn": ("ViewArn", "The billing view.")}) + views["shapes"]["ViewArn"] = {"type": "string", + "pattern": "(arn:aws(-cn)?:billing::[0-9]{12}:billingview/)?[a-zA-Z0-9_\\+=\\.\\-@].{1,30}"} + assert r.with_documented("svc:PutPipeline", ["pipeline"], DOCUMENTED, {"svc": views}, + [{"types": ["pipeline"], "arn": "viewArn"}]) == [] + + +def test_an_arn_member_documented_as_another_types_names_none_of_the_actions_resources(): + # CreateExport's `Export.ExportArn`, "the ARN for this export", is the export's, of no type the action acts on. + model_ = documented("CreateTrailExport", {}) + model_["shapes"]["Export"] = {"type": "structure", "members": { + "ExportArn": {"shape": "String", "documentation": "

The Amazon Resource Name (ARN) for this dashboard.

"}}} + model_["shapes"]["In"]["members"]["Export"] = {"shape": "Export"} + assert r.with_documented("svc:CreateTrailExport", ["trail"], DOCUMENTED, {"svc": model_}, + [{"types": ["trail"], "arn": "Export.ExportArn"}]) == [] + # One documented as an acted-on type's is kept, and so is one named after it, whatever its documentation says. + model_["shapes"]["Export"]["members"]["ExportArn"]["documentation"] = "

The ARN of the trail.

" + assert r.with_documented("svc:CreateTrailExport", ["trail"], DOCUMENTED, {"svc": model_}, + [{"types": ["trail"], "arn": "Export.ExportArn"}]) == [{"types": ["trail"], "arn": "Export.ExportArn"}] + named = documented("PutTrailSetting", {"trailArn": ("String", "The Amazon Resource Name (ARN) of the dashboard.")}) + assert r.with_documented("svc:PutTrailSetting", ["trail"], DOCUMENTED, {"svc": named}, + [{"types": ["trail"], "arn": "trailArn"}]) == [{"types": ["trail"], "arn": "trailArn"}] + + +def test_a_structures_field_and_each_lists_element_name_the_type_they_are_named_after(): + model_ = documented("CreateBudget", {}) + model_["shapes"]["Budget"] = {"type": "structure", "members": {"BudgetName": {"shape": "String"}, + "BillingViewArn": {"shape": "String"}}} + model_["shapes"]["In"]["members"]["Budget"] = {"shape": "Budget"} + formats = {"budget": "arn:${Partition}:svc::${Account}:budget/${BudgetName}"} + assert r.with_documented("svc:CreateBudget", ["budget"], formats, {"svc": model_}, + [{"type": "budget", "fill": {}}]) == [{"type": "budget", "fill": {"BudgetName": "Budget.BudgetName"}}] + # A field of each element of a list of structures, as of each value of a map. + entries = documented("PutEvents", {}) + entries["shapes"]["Entry"] = {"type": "structure", "members": {"BusName": {"shape": "String"}}} + entries["shapes"]["Entries"] = {"type": "list", "member": {"shape": "Entry"}} + entries["shapes"]["In"]["members"]["Entries"] = {"shape": "Entries"} + assert r.map_fields({"svc": entries}, "PutEvents") == {"Entries[].BusName": "BusName"} + + +def test_the_id_a_create_answers_beside_another_types_arn_is_that_types(): + model_ = documented("TerminateJobFlows", {"JobFlowIds": ("Strings", "A list of job flows to be shut down.")}) + model_["operations"]["RunJobFlow"] = {"input": {"shape": "In"}, "output": {"shape": "RunOut"}} + model_["shapes"]["RunOut"] = {"type": "structure", "members": {"JobFlowId": {"shape": "String"}, + "ClusterArn": {"shape": "String"}}} + assert r.created_aliases({"svc": model_}) == {"jobflow": "cluster"} + formats = {"cluster": "arn:${Partition}:svc:${Region}:${Account}:cluster/${ClusterId}"} + assert r.with_documented("svc:TerminateJobFlows", ["cluster"], formats, {"svc": model_}, []) == [ + {"type": "cluster", "fill": {"ClusterId": "JobFlowIds[]"}}] + + +def test_an_account_id_member_fills_an_account_id_variable(): + models = {"svc": documented("CreateAssignment", {"TargetId": ("AccountId", "TargetID is an account identifier.")})} + formats = {"Account": "arn:${Partition}:svc:::account/${AccountId}"} + assert r.with_documented("svc:CreateAssignment", ["Account"], formats, models, []) == [ + {"type": "Account", "fill": {"AccountId": "TargetId"}}] + + +def test_a_non_create_about_a_type_its_action_does_not_act_on_reaches_the_acted_types_through_its_service(): + formats = {"build": "arn:${Partition}:svc:${Region}:${Account}:build/${BuildId}", + "project": "arn:${Partition}:svc:${Region}:${Account}:project/${ProjectName}"} + gets = {"svc": documented("BatchGetBuilds", {"ids": ("Strings", "The IDs of the builds.")})} + assert r.with_documented("svc:BatchGetBuilds", ["project"], formats, gets, []) == [ + {"types": ["project"], "through": "ids[]"}] + # A create's bare name is the new resource's. + creates = {"svc": documented("CreateBuild", {"name": ("String", "The name of the build.")})} + assert r.with_documented("svc:CreateBuild", ["project"], formats, creates, []) == [] + + +def test_an_enum_value_the_word_setting_two_formats_apart_abbreviates_picks_the_type(): + formats = {"loadbalancer": "arn:${Partition}:svc:${Region}:${Account}:loadbalancer/${LoadBalancerName}", + "loadbalancer/app/": "arn:${Partition}:svc:${Region}:${Account}:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}", + "loadbalancer/gwy/": "arn:${Partition}:svc:${Region}:${Account}:loadbalancer/gwy/${LoadBalancerName}/${LoadBalancerId}"} + models = {"svc": documented("CreateLoadBalancer", {"Name": ("String", "The name of the load balancer."), + "Type": ("String", "The type of load balancer. The default is application.")})} + picked = r.picked_by_enum("svc:CreateLoadBalancer", ["loadbalancer/app/", "loadbalancer/gwy/"], formats, + {"Name": "Name", "Type": "Type"}, {"Type": {"application", "gateway", "network"}}, models) + assert picked == [ + {"type": "loadbalancer/app/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["application", None]}}, + {"type": "loadbalancer/gwy/", "fill": {"LoadBalancerName": "Name"}, "when": {"Type": ["gateway"]}}] + + +def test_two_types_differing_by_one_variable_are_marked_for_the_default_its_service_gives(): + formats = {"rule-on-default-bus": "arn:${Partition}:svc:${Region}:${Account}:rule/${RuleName}", + "rule-on-custom-bus": "arn:${Partition}:svc:${Region}:${Account}:rule/${BusName}/${RuleName}", + "bus": "arn:${Partition}:svc:${Region}:${Account}:bus/${BusName}"} + resources = [{"type": "rule-on-custom-bus", "fill": {"BusName": "BusName", "RuleName": "Name"}}, + {"type": "rule-on-default-bus", "fill": {"RuleName": "Name"}}] + assert r.with_default_pairs(resources, formats, {"BusName"}) == [ + dict(resources[0], unlessDefault={"BusName": "bus"}), dict(resources[1], whenDefault={"BusName": "bus"})] + # A required member always names its bus. + assert r.with_default_pairs(resources, formats, set()) == resources + + +def test_a_resource_one_optional_member_qualifies_is_named_only_when_the_request_gives_it(): + resources = [{"type": "dbname", "fill": {"ClusterName": "ClusterIdentifier", "DbName": "DbName"}}, + {"type": "dbuser", "fill": {"ClusterName": "ClusterIdentifier", "DbUser": "DbUser"}}] + assert r.with_optional_qualifier(resources, {"ClusterIdentifier", "DbName"}) == [ + dict(resources[0], unless={"DbName": [None]}), resources[1]] + assert r.with_optional_qualifier(resources, {"ClusterIdentifier"}) == resources + + +def test_an_arn_patterns_type_words_and_a_clients_versioned_twin(): + assert r.pattern_words("arn:aws:svc:[a-z0-9-]+:([0-9]{12}):(bus-v2|subscriber|source-v2\\/(a|b))\\/[A-Za-z]+") == { + "bus-v2", "subscriber", "source-v2"} + assert r.pattern_words("(arn:aws[\\w-]*:svc:[a-z]+:[0-9]{12}:bus\\/)?[A-Za-z]+") == {"bus"} + formats = {"bus": "arn:${Partition}:svc:${Region}:${Account}:bus/${BusName}", + "busv2": "arn:${Partition}:svc:${Region}:${Account}:busv2/${BusName}/${OpaqueId}"} + model_ = documented("CreateBus", {"Name": ("String", "The name of the bus.")}) + # A client whose patterns name only the versioned type reads the other as it. + assert r.narrowed([{"type": "bus", "fill": {"BusName": "Name"}}], {"busv2"}, model_, "CreateBus", formats) == [ + {"type": "busv2", "fill": {"BusName": "Name"}}] + assert r.narrowed([{"type": "bus", "fill": {"BusName": "Name"}}], {"bus", "busv2"}, model_, "CreateBus", formats) == [ + {"type": "bus", "fill": {"BusName": "Name"}}] + + +def test_a_lone_resource_id_in_a_rest_request_is_found_by_its_path_labels_and_the_member_named_after_it(): + model_ = documented("DescribeUser", {"AwsAccountId": ("String", "The account."), "Namespace": ("String", "The namespace."), + "UserName": ("String", "The name of the user that you want to describe.")}, + protocol="rest-json") + model_["operations"]["DescribeUser"]["http"] = { + "method": "GET", "requestUri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/users/{UserName}"} + for name in ("AwsAccountId", "Namespace", "UserName"): + model_["shapes"]["In"]["members"][name].update(location="uri", locationName=name) + formats = {"user": "arn:${Partition}:svc:${Region}:${Account}:user/${ResourceId}"} + assert r.with_documented("svc:DescribeUser", ["user"], formats, {"svc": model_}, []) == [ + {"type": "user", "fill": {}, "find": ["AwsAccountId", "Namespace", "UserName"]}] + # A member holding the user's ARN names it by that ARN, and its service has nothing to find. + embeds = documented("GenerateEmbedUrlForRegisteredUser", {"AwsAccountId": ("String", "The account."), + "UserArn": ("String", "The ARN of the user.")}, + protocol="rest-json") + embeds["operations"]["GenerateEmbedUrlForRegisteredUser"]["http"] = { + "method": "POST", "requestUri": "/accounts/{AwsAccountId}/embed-url/registered-user"} + embeds["shapes"]["In"]["members"]["AwsAccountId"].update(location="uri", locationName="AwsAccountId") + held = [{"types": ["user"], "arn": "UserArn"}] + assert r.with_documented("svc:GenerateEmbedUrlForRegisteredUser", ["user"], formats, {"svc": embeds}, held) == held + # A label after the member's own names something inside it: a membership's member is not its group's. + members_ = documented("DescribeGroupMembership", {name: ("String", "A label.") for name in + ("AwsAccountId", "Namespace", "GroupName", "MemberName")}, + protocol="rest-json") + members_["operations"]["DescribeGroupMembership"]["http"] = { + "method": "GET", + "requestUri": "/accounts/{AwsAccountId}/namespaces/{Namespace}/groups/{GroupName}/members/{MemberName}"} + for name in ("AwsAccountId", "Namespace", "GroupName", "MemberName"): + members_["shapes"]["In"]["members"][name].update(location="uri", locationName=name) + groups = {"group": "arn:${Partition}:svc:${Region}:${Account}:group/${ResourceId}"} + found = [{"type": "group", "fill": {}, "find": ["GroupName"]}] + assert r.with_documented("svc:DescribeGroupMembership", ["group"], groups, {"svc": members_}, found) == [ + {"type": "group", "fill": {}, "find": ["AwsAccountId", "Namespace", "GroupName"]}] + + +def test_a_resource_id_naming_whatever_the_action_acts_on_reaches_it_through_its_service(): + formats = {"cluster": "arn:${Partition}:svc:${Region}:${Account}:cluster/${ClusterId}", + "studio": "arn:${Partition}:svc:${Region}:${Account}:studio/${StudioId}"} + models = {"svc": documented("AddTags", {"ResourceId": ("String", "The resource identifier to tag."), + "ClusterId": ("String", "The cluster that scopes the call.")})} + # Another member then scopes the call rather than names a resource. + assert r.with_documented("svc:AddTags", ["cluster", "studio"], formats, models, + [{"type": "cluster", "fill": {"ClusterId": "ClusterId"}}]) == [ + {"types": ["cluster", "studio"], "through": "ResourceId"}] + + +def test_a_resource_id_variable_takes_a_member_named_so_and_a_bare_id_the_member_named_after_the_type(): + # CreateOpsMetadata names `opsmetadata/${ResourceId}` by its `ResourceId`. + assert r._filling("ResourceId", "opsmetadata", 1, {"ResourceId": "ResourceId", "Tags": "Tags[]"}, set()) == \ + "ResourceId" + # A QuickSight ingestion's `ResourceId` is its `IngestionId` when no member is named so. + assert r._filling("ResourceId", "ingestion", 1, {"IngestionId": "IngestionId"}, set()) == "IngestionId" + # A bare `Id` is whatever the operation is about: the tenant's is its `DistributionTenantId`. + assert r._filling("Id", "distributiontenant", 1, {"Id": "Id", "DistributionTenantId": "DistributionTenantId"}, + {"Id"}) == "DistributionTenantId"