fix(iam): resolve missing roles and EC2 tagging targets (#7596)

This commit is contained in:
luiseterc authored and GitHub committed 2026-11-09 18:28:31 -04:00
1 parent 69cc889552
commit 3c398103ed
14 files changed
+1490 -9

No files matched your search

+21
View File
@@ -2463,6 +2463,27 @@ acting on something that already exists is checked against that resource's store
partition included; a create is checked against an ARN minted from the request's own `Path`, since
reading a stored path would authorize a create into a path the policy does not name.
When a named role is absent and the operation's generated input shape declares `RoleName`
but no `Path`, the request is checked against `role/<name>` in the request account and partition.
This lets an authorized `GetRole` probe receive `NoSuchEntity` and proceed with creation, and
also applies to other role operations such as `DeleteRole` and `ListRolePolicies`. An injected
`Path` cannot change this ARN. Once the role exists, its stored path and partition apply;
creation still uses the path the request asks for.
EC2 tagging targets come from `regen_iam_request_resources.py`, with EC2 among its namespaces.
The Service Reference supplies the resource types and ARN formats, botocore supplies the
`Resources` list and its EC2 Query spelling (`ResourceId.N`), and a documented generator
mapping identifies instance IDs. The generated entries select `CreateTags` and `DeleteTags`
from their input shapes and resource types, without an operation-name branch in Java.
Each instance ARN is evaluated with that target's existing tags; every target must be authorized
before the handler changes any tags. Other EC2 resource types retain wildcard authorization
against every target context, including when mixed with instances. Only instance ARNs narrow
the context to their own stored tags. Resource resolution reuses the decoded form parameters
rather than reparsing the body for each target. The readers preserve the handler's parameter
ordering, first duplicate value and stop at the first missing list index. This staged EC2 read
covers only instances in heterogeneous target lists; other EC2 operations retain their existing
wildcard resource resolution.
Which type each action takes is vendored, not written out in Java:
`src/main/resources/aws/iam-action-resources.json` is generated by
`tools/aws/regen_iam_action_resources.py` from AWS's Service Reference Information for IAM, and
@@ -1241,7 +1241,8 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
String action, String operationAction, String credentialScope,
List<String> resources, List<Map<String, List<String>>> targetContexts,
String region, String accountId, String akid) {
for (String resource : resources) {
for (int resourceIndex = 0; resourceIndex < resources.size(); resourceIndex++) {
String resource = resources.get(resourceIndex);
List<ResourcePolicyProvider.ResourcePolicy> resourcePolicies =
resolveResourcePolicies(credentialScope, operationAction, resource);
String resourceOwnerAccountId = resourcePolicies.isEmpty() ? null : resourcePolicies.getFirst().ownerAccountId();
@@ -1259,6 +1260,11 @@ public class IamEnforcementFilter implements ContainerRequestFilter {
List<Map<String, List<String>>> batchContexts = "dynamodb".equals(credentialScope)
? conditionContextResolver.dynamoDbBatchConditionContexts(action, ctx, resource) : null;
List<Map<String, List<String>>> resourceContexts = targetContexts;
if (RequestResources.hasIndividualTargets(operationAction) && !"*".equals(resource)
&& resources.size() == targetContexts.size()) {
// Generated target lists preserve request order; wildcard targets retain every context.
resourceContexts = targetContexts.subList(resourceIndex, resourceIndex + 1);
}
if (batchContexts != null && !batchContexts.isEmpty()) {
resourceContexts = new ArrayList<>();
for (Map<String, List<String>> targetContext : targetContexts) {
@@ -114,6 +114,11 @@ public final class QueryConstraintCheck {
return of(model, SmithyValidationErrors.Violations.QUOTED);
}
/** Whether the generated input shape declares this top-level member. Unknown operations declare none. */
public boolean hasMember(String operation, String member) {
return shapes.path(operations.path(operation).asText("")).path("members").has(member);
}
public static QueryConstraintCheck of(JsonNode model, SmithyValidationErrors.Violations messages) {
return new QueryConstraintCheck(model, messages);
}
@@ -176,6 +176,10 @@ final class RequestResourceMembers {
record Created(String type, String parent, Member arn, String parentWord, String childWord, String separator) {
}
/** An ordered heterogeneous id list; unsupported ids retain wildcard authorization. */
record Targets(Member member, String query, Map<String, String> prefixes) {
}
/**
* The file: each operation's resources and the resources it creates under a parent, as
* {@code <namespace>:<Operation>}, the members a REST operation's request carries outside its body, each
@@ -184,6 +188,7 @@ final class RequestResourceMembers {
* query, {@code ?name}, by the member's name.
*/
record Table(Map<String, List<Resource>> operations, Map<String, List<Created>> creates,
Map<String, Targets> targets,
Map<String, Map<String, String>> located, Map<String, Map<String, ArnFormat>> formats,
Set<String> namespaces, Set<String> handBuilt, Set<String> notCovered, Set<String> otherNamespaces) {
}
@@ -240,6 +245,7 @@ final class RequestResourceMembers {
});
Map<String, List<Resource>> entries = new LinkedHashMap<>();
Map<String, List<Created>> creates = new LinkedHashMap<>();
Map<String, Targets> targets = new LinkedHashMap<>();
Map<String, Map<String, String>> located = new LinkedHashMap<>();
operations.properties().forEach(operation -> {
String namespace = operation.getKey().substring(0, Math.max(0, operation.getKey().indexOf(':')));
@@ -252,6 +258,33 @@ final class RequestResourceMembers {
resources.add(resource(operation.getKey(), resource, formats.getOrDefault(namespace, Map.of())));
}
entries.put(operation.getKey(), List.copyOf(resources));
JsonNode target = operation.getValue().path("targets");
if (!target.isMissingNode()) {
String member = target.path("member").asText("");
String query = target.path("query").asText("");
if (!member.matches("[A-Za-z][A-Za-z0-9_]*\\[\\]")
|| !LOCATED_MEMBER.matcher(query).matches()
|| !target.path("prefixes").isObject() || target.path("prefixes").isEmpty()) {
throw new IllegalStateException(RESOURCE_NAME + " has malformed id targets for " + operation.getKey());
}
Map<String, String> prefixes = new LinkedHashMap<>();
Set<String> allowed = names(operation.getValue().path("types"));
target.path("prefixes").properties().forEach(entry -> {
ArnFormat format = formats.getOrDefault(namespace, Map.of()).get(entry.getKey());
String prefix = entry.getValue().asText("");
if (!allowed.contains(entry.getKey()) || format == null || prefix.isEmpty()
|| VARIABLE.matcher(format.format()).results().map(match -> match.group(1))
.filter(variable -> !Set.of("Partition", "Region", "Account").contains(variable))
.distinct().count() != 1
|| prefixes.values().stream().anyMatch(other ->
prefix.startsWith(other) || other.startsWith(prefix))) {
throw new IllegalStateException(RESOURCE_NAME + " has an invalid id target for " + operation.getKey());
}
prefixes.put(entry.getKey(), prefix);
});
targets.put(operation.getKey(), new Targets(new Member(member.substring(0, member.length() - 2), true),
query, Map.copyOf(prefixes)));
}
List<Created> made = new ArrayList<>();
for (JsonNode created : operation.getValue().path("creates")) {
made.add(created(operation.getKey(), created, formats.getOrDefault(namespace, Map.of())));
@@ -272,7 +305,7 @@ final class RequestResourceMembers {
located.put(operation.getKey(), Map.copyOf(where));
}
});
return new Table(Map.copyOf(entries), Map.copyOf(creates), Map.copyOf(located), Map.copyOf(formats), namespaces,
return new Table(Map.copyOf(entries), Map.copyOf(creates), Map.copyOf(targets), Map.copyOf(located), Map.copyOf(formats), namespaces,
names(document.path("handBuilt")),
Set.copyOf(document.path("notCovered").propertyStream().map(Map.Entry::getKey).toList()),
names(document.path("otherNamespaces")));
@@ -93,6 +93,12 @@ public final class RequestResources {
public static List<String> of(String operation, ContainerRequestContext ctx, String partition, String region,
String accountId, StoredResourceArns stored, Map<String, String> labels) {
RequestResourceMembers.Table table = RequestResourceMembers.table();
RequestResourceMembers.Targets targets = operation == null ? null : table.targets().get(operation);
if (targets != null) {
Map<String, String> form = IamConditionContextResolver.formParameters(ctx);
return targetArns(targets, formats(table, operation), form,
form.isEmpty() ? PassedRoles.jsonBody(ctx) : null, partition, region, accountId);
}
List<RequestResourceMembers.Resource> resources = operation == null ? null
: served(table.operations().get(operation), ctx);
if (resources == null || resources.isEmpty()) {
@@ -112,6 +118,10 @@ public final class RequestResources {
public static List<String> ofBody(String operation, JsonNode body, String partition, String region,
String accountId, StoredResourceArns stored) {
RequestResourceMembers.Table table = RequestResourceMembers.table();
RequestResourceMembers.Targets targets = operation == null ? null : table.targets().get(operation);
if (targets != null) {
return targetArns(targets, formats(table, operation), Map.of(), body, partition, region, accountId);
}
List<RequestResourceMembers.Resource> resources = operation == null ? null : table.operations().get(operation);
if (resources == null || resources.isEmpty()) {
return List.of();
@@ -121,7 +131,43 @@ public final class RequestResources {
/** Whether the table holds the operation as one with no resource of its own, which is checked on {@code *}. */
public static boolean actsOnNoResource(String operation) {
return reads(operation) && RequestResourceMembers.table().operations().get(operation).isEmpty();
return reads(operation) && !hasIndividualTargets(operation)
&& RequestResourceMembers.table().operations().get(operation).isEmpty();
}
/** Whether the generated operation names targets in request order, one context per target. */
public static boolean hasIndividualTargets(String operation) {
return operation != null && RequestResourceMembers.table().targets().containsKey(operation);
}
private static List<String> targetArns(RequestResourceMembers.Targets targets,
Map<String, RequestResourceMembers.ArnFormat> formats,
Map<String, String> form, JsonNode body,
String partition, String region, String accountId) {
List<String> ids = new ArrayList<>();
if (!form.isEmpty()) {
for (int i = 1; form.containsKey(targets.query() + "." + i); i++) {
ids.add(form.get(targets.query() + "." + i));
}
} else if (body != null && body.path(targets.member().name()).isArray()) {
body.path(targets.member().name()).forEach(id -> ids.add(id.asText()));
}
List<String> arns = new ArrayList<>();
for (String id : ids) {
String arn = "*";
for (Map.Entry<String, String> prefix : targets.prefixes().entrySet()) {
if (id.startsWith(prefix.getValue())) {
String format = formats.get(prefix.getKey()).format();
Map<String, String> filling = new HashMap<>();
VARIABLE.matcher(format).results().map(match -> match.group(1))
.forEach(variable -> filling.put(variable, id));
arn = render(format, filling, partition, region, accountId);
break;
}
}
arns.add(arn);
}
return List.copyOf(arns);
}
/** The ARNs of the resources the request names, as {@link #of} reads them. */
@@ -41,6 +41,11 @@ public final class IamRequestShapes {
private IamRequestShapes() {
}
/** Whether the operation's generated input shape declares the member. */
static boolean hasMember(String operation, String member) {
return CHECK.hasMember(operation, member);
}
/** Throws {@code ValidationError} when the request breaks a constraint the model declares. */
public static void check(String action, MultivaluedMap<String, String> params) {
CHECK.check(action, params);
@@ -555,6 +555,12 @@ public class ResourceArnBuilder {
// resource has and leave a deny on the real one unmatched.
Optional<StoredEntity> stored = storedIamEntity(resourceType, name, accountId);
if (stored.isEmpty()) {
// Without a stored role or a modelled Path member, the request names only the root path.
if ("role".equals(resourceType) && IamRequestShapes.hasMember(action, "RoleName")
&& !IamRequestShapes.hasMember(action, "Path")) {
return List.of(AwsArnUtils.Arn.global(AwsRegions.partitionFor(region), "iam", accountId,
"role/" + name).toString());
}
return List.of("*");
}
String storedArn = stored.get().arn();
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.43.118 (installed package)", "retrieved": "2026-11-09", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "rekognition": ["rekognition"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"]},
"namespaces": {"access-analyzer": ["accessanalyzer"], "acm": ["acm"], "application-autoscaling": ["application-autoscaling"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "budgets": ["budgets"], "ce": ["ce"], "cloudtrail": ["cloudtrail"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "cur": ["cur"], "datasync": ["datasync"], "dynamodb": ["dynamodb"], "ec2": ["ec2"], "ecr": ["ecr"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "globalaccelerator": ["globalaccelerator"], "kinesisanalytics": ["kinesisanalyticsv2"], "logs": ["logs"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "quicksight": ["quicksight"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "rekognition": ["rekognition"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"]},
"clientsNotRead": {"kinesisanalytics": "Kinesis Data Analytics v1, SQL applications on the KinesisAnalytics_20150814 target, which Floci does not serve (it serves v2, kinesisanalyticsv2); its operations share v2's names and name their resources by other members"},
"handBuilt": ["apigateway", "bedrock", "dsql", "dynamodb", "eks", "iam", "kinesis", "kms", "lambda", "logs", "pipes", "resource-groups", "s3", "scheduler", "secretsmanager", "sns", "sqs", "ssm", "sts"],
"notCovered": {"account": "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", "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:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, 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", "cloudfront": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the 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/<name>_<id>, 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", "controlcatalog": "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", "controltower": "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 Line truncated
"notCovered": {"account": "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", "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:<id>:autoScalingGroupName/<name>`, while Floci mints `autoScalingGroup:<name>`, 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", "cloudfront": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the 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/<name>_<id>, 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", "controlcatalog": "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", "controltower": "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 Line truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudfront-keyvaluestore", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "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", "xray"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "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}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId}", "fleet": "arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId}", "project": "arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName}", "report": "arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId}", "report-group": "arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName}", "sandbox": "arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "datasync": {"agent": "arn:${Partition}:datasync:${Region}:${Account}:agent/${AgentId}", "discoveryjob": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}/job/${DiscoveryJobId}", "location": "arn:${Partition}:datasync:${Region}:${Account}:location/${LocationId}", "storagesystem": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}", "task": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}", "taskexecution": "arn:${Partition}:datasLine truncated
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "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}"}, "cloudtrail": {"channel": "arn:${Partition}:cloudtrail:${Region}:${Account}:channel/${ChannelId}", "dashboard": "arn:${Partition}:cloudtrail:${Region}:${Account}:dashboard/${DashboardName}", "eventdatastore": "arn:${Partition}:cloudtrail:${Region}:${Account}:eventdatastore/${EventDataStoreId}", "trail": "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"}, "codebuild": {"build": "arn:${Partition}:codebuild:${Region}:${Account}:build/${BuildId}", "build-batch": "arn:${Partition}:codebuild:${Region}:${Account}:build-batch/${BuildBatchId}", "fleet": "arn:${Partition}:codebuild:${Region}:${Account}:fleet/${FleetName}:${FleetId}", "project": "arn:${Partition}:codebuild:${Region}:${Account}:project/${ProjectName}", "report": "arn:${Partition}:codebuild:${Region}:${Account}:report/${ReportGroupName}:${ReportId}", "report-group": "arn:${Partition}:codebuild:${Region}:${Account}:report-group/${ReportGroupName}", "sandbox": "arn:${Partition}:codebuild:${Region}:${Account}:sandbox/${SandboxId}"}, "codepipeline": {"action": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}/${ActionName}", "actiontype": "arn:${Partition}:codepipeline:${Region}:${Account}:actiontype:${Owner}/${Category}/${Provider}/${Version}", "pipeline": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}", "stage": "arn:${Partition}:codepipeline:${Region}:${Account}:${PipelineName}/${StageName}", "webhook": "arn:${Partition}:codepipeline:${Region}:${Account}:webhook:${WebhookName}"}, "cognito-identity": {"identitypool": "arn:${Partition}:cognito-identity:${Region}:${Account}:identitypool/${IdentityPoolId}"}, "cognito-idp": {"userpool": "arn:${Partition}:cognito-idp:${Region}:${Account}:userpool/${UserPoolId}", "webacl": "arn:${Partition}:wafv2:${Region}:${Account}:${Scope}/webacl/${Name}/${Id}"}, "cur": {"cur": "arn:${Partition}:cur:${Region}:${Account}:definition/${ReportName}"}, "datasync": {"agent": "arn:${Partition}:datasync:${Region}:${Account}:agent/${AgentId}", "discoveryjob": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}/job/${DiscoveryJobId}", "location": "arn:${Partition}:datasync:${Region}:${Account}:location/${LocationId}", "storagesystem": "arn:${Partition}:datasync:${Region}:${Account}:system/${StorageSystemId}", "task": "arn:${Partition}:datasync:${Region}:${Account}:task/${TaskId}", "taskexecution": "arn:${Partition}:datasLine truncated
"unqualified": {"states": ["statemachine"]},
"mintedIds": {"events": ["api-destination", "connection"]},
"operations": {
@@ -677,6 +677,817 @@
"datasync:UpdateTask": {"action": "datasync:UpdateTask", "types": ["task"], "resources": [{"types": ["task"], "arn": "CloudWatchLogGroupArn"}, {"types": ["task"], "arn": "TaskArn"}]},
"datasync:UpdateTaskExecution": {"action": "datasync:UpdateTaskExecution", "types": ["taskexecution"], "resources": [{"types": ["taskexecution"], "arn": "TaskExecutionArn"}]},
"dynamodb:ListTables": {"action": "dynamodb:ListTables", "types": [], "resources": [{"type": "table", "fill": {}}]},
"ec2:AcceptAddressTransfer": {"action": "ec2:AcceptAddressTransfer", "types": ["elastic-ip"], "resources": []},
"ec2:AcceptCapacityReservationBillingOwnership": {"action": "ec2:AcceptCapacityReservationBillingOwnership", "types": ["capacity-reservation"], "resources": []},
"ec2:AcceptReservedInstancesExchangeQuote": {"action": "ec2:AcceptReservedInstancesExchangeQuote", "types": ["reserved-instances"], "resources": []},
"ec2:AcceptTransitGatewayClientVpnAttachment": {"action": "ec2:AcceptTransitGatewayClientVpnAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:AcceptTransitGatewayMulticastDomainAssociations": {"action": "ec2:AcceptTransitGatewayMulticastDomainAssociations", "types": ["transit-gateway-attachment", "transit-gateway-multicast-domain"], "resources": []},
"ec2:AcceptTransitGatewayPeeringAttachment": {"action": "ec2:AcceptTransitGatewayPeeringAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:AcceptTransitGatewayVpcAttachment": {"action": "ec2:AcceptTransitGatewayVpcAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:AcceptVpcEndpointConnections": {"action": "ec2:AcceptVpcEndpointConnections", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:AcceptVpcPeeringConnection": {"action": "ec2:AcceptVpcPeeringConnection", "types": ["vpc", "vpc-peering-connection"], "resources": []},
"ec2:AdvertiseByoipCidr": {"action": "ec2:AdvertiseByoipCidr", "types": [], "resources": []},
"ec2:AllocateAddress": {"action": "ec2:AllocateAddress", "types": ["elastic-ip", "ipam-pool", "ipv4pool-ec2"], "resources": []},
"ec2:AllocateHosts": {"action": "ec2:AllocateHosts", "types": ["dedicated-host"], "resources": []},
"ec2:AllocateIpamPoolCidr": {"action": "ec2:AllocateIpamPoolCidr", "types": ["ipam-pool", "ipam-pool-allocation"], "resources": []},
"ec2:ApplySecurityGroupsToClientVpnTargetNetwork": {"action": "ec2:ApplySecurityGroupsToClientVpnTargetNetwork", "types": ["client-vpn-endpoint", "security-group", "vpc"], "resources": []},
"ec2:AssignIpv6Addresses": {"action": "ec2:AssignIpv6Addresses", "types": ["network-interface"], "resources": []},
"ec2:AssignPrivateIpAddresses": {"action": "ec2:AssignPrivateIpAddresses", "types": ["network-interface"], "resources": []},
"ec2:AssignPrivateNatGatewayAddress": {"action": "ec2:AssignPrivateNatGatewayAddress", "types": ["natgateway"], "resources": []},
"ec2:AssociateAddress": {"action": "ec2:AssociateAddress", "types": ["elastic-ip", "instance", "network-interface"], "resources": []},
"ec2:AssociateApplicationStatusCheck": {"action": "ec2:AssociateApplicationStatusCheck", "types": ["application-status-check", "instance"], "resources": []},
"ec2:AssociateCapacityReservationBillingOwner": {"action": "ec2:AssociateCapacityReservationBillingOwner", "types": ["capacity-reservation"], "resources": []},
"ec2:AssociateClientVpnTargetNetwork": {"action": "ec2:AssociateClientVpnTargetNetwork", "types": ["client-vpn-endpoint", "subnet"], "resources": []},
"ec2:AssociateDhcpOptions": {"action": "ec2:AssociateDhcpOptions", "types": ["dhcp-options", "vpc"], "resources": []},
"ec2:AssociateEnclaveCertificateIamRole": {"action": "ec2:AssociateEnclaveCertificateIamRole", "types": ["certificate", "role"], "resources": []},
"ec2:AssociateIamInstanceProfile": {"action": "ec2:AssociateIamInstanceProfile", "types": ["instance"], "resources": []},
"ec2:AssociateInstanceEventWindow": {"action": "ec2:AssociateInstanceEventWindow", "types": ["instance-event-window"], "resources": []},
"ec2:AssociateIpamByoasn": {"action": "ec2:AssociateIpamByoasn", "types": [], "resources": []},
"ec2:AssociateIpamResourceDiscovery": {"action": "ec2:AssociateIpamResourceDiscovery", "types": ["ipam", "ipam-resource-discovery", "ipam-resource-discovery-association"], "resources": []},
"ec2:AssociateNatGatewayAddress": {"action": "ec2:AssociateNatGatewayAddress", "types": ["elastic-ip", "natgateway"], "resources": []},
"ec2:AssociateRouteServer": {"action": "ec2:AssociateRouteServer", "types": ["route-server", "vpc"], "resources": []},
"ec2:AssociateRouteTable": {"action": "ec2:AssociateRouteTable", "types": ["internet-gateway", "ipv4pool-ec2", "route-table", "subnet", "vpn-gateway"], "resources": []},
"ec2:AssociateSecurityGroupVpc": {"action": "ec2:AssociateSecurityGroupVpc", "types": ["security-group", "vpc"], "resources": []},
"ec2:AssociateSubnetCidrBlock": {"action": "ec2:AssociateSubnetCidrBlock", "types": ["ipam-pool", "subnet"], "resources": []},
"ec2:AssociateTransitGatewayMulticastDomain": {"action": "ec2:AssociateTransitGatewayMulticastDomain", "types": ["subnet", "transit-gateway-attachment", "transit-gateway-multicast-domain"], "resources": []},
"ec2:AssociateTransitGatewayPolicyTable": {"action": "ec2:AssociateTransitGatewayPolicyTable", "types": ["transit-gateway-attachment", "transit-gateway-policy-table"], "resources": []},
"ec2:AssociateTransitGatewayRouteTable": {"action": "ec2:AssociateTransitGatewayRouteTable", "types": ["transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:AssociateTrunkInterface": {"action": "ec2:AssociateTrunkInterface", "types": [], "resources": []},
"ec2:AssociateVpcCidrBlock": {"action": "ec2:AssociateVpcCidrBlock", "types": ["ipam-pool", "ipv6pool-ec2", "vpc"], "resources": []},
"ec2:AttachClassicLinkVpc": {"action": "ec2:AttachClassicLinkVpc", "types": ["instance", "security-group", "vpc"], "resources": []},
"ec2:AttachImageWatermark": {"action": "ec2:AttachImageWatermark", "types": ["image"], "resources": []},
"ec2:AttachInternetGateway": {"action": "ec2:AttachInternetGateway", "types": ["internet-gateway", "vpc"], "resources": []},
"ec2:AttachNetworkInterface": {"action": "ec2:AttachNetworkInterface", "types": ["instance", "network-interface"], "resources": []},
"ec2:AttachVerifiedAccessTrustProvider": {"action": "ec2:AttachVerifiedAccessTrustProvider", "types": ["verified-access-instance", "verified-access-trust-provider"], "resources": []},
"ec2:AttachVolume": {"action": "ec2:AttachVolume", "types": ["instance", "volume"], "resources": []},
"ec2:AttachVpnGateway": {"action": "ec2:AttachVpnGateway", "types": ["vpc", "vpn-gateway"], "resources": []},
"ec2:AuthorizeClientVpnIngress": {"action": "ec2:AuthorizeClientVpnIngress", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:AuthorizeSecurityGroupEgress": {"action": "ec2:AuthorizeSecurityGroupEgress", "types": ["security-group", "security-group-rule"], "resources": []},
"ec2:AuthorizeSecurityGroupIngress": {"action": "ec2:AuthorizeSecurityGroupIngress", "types": ["security-group", "security-group-rule"], "resources": []},
"ec2:BatchModifyIpamRoutingPolicyRegistrations": {"action": "ec2:BatchModifyIpamRoutingPolicyRegistrations", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:BundleInstance": {"action": "ec2:BundleInstance", "types": [], "resources": []},
"ec2:CancelBundleTask": {"action": "ec2:CancelBundleTask", "types": [], "resources": []},
"ec2:CancelCapacityReservation": {"action": "ec2:CancelCapacityReservation", "types": ["capacity-reservation", "capacity-reservation-cancellation-quote"], "resources": []},
"ec2:CancelCapacityReservationFleets": {"action": "ec2:CancelCapacityReservationFleets", "types": ["capacity-reservation-fleet"], "resources": []},
"ec2:CancelConversionTask": {"action": "ec2:CancelConversionTask", "types": [], "resources": []},
"ec2:CancelDeclarativePoliciesReport": {"action": "ec2:CancelDeclarativePoliciesReport", "types": ["declarative-policies-report"], "resources": []},
"ec2:CancelExportTask": {"action": "ec2:CancelExportTask", "types": ["export-image-task", "export-instance-task"], "resources": []},
"ec2:CancelImageLaunchPermission": {"action": "ec2:CancelImageLaunchPermission", "types": ["image"], "resources": []},
"ec2:CancelImportTask": {"action": "ec2:CancelImportTask", "types": ["import-image-task", "import-snapshot-task"], "resources": []},
"ec2:CancelReservedInstancesListing": {"action": "ec2:CancelReservedInstancesListing", "types": [], "resources": []},
"ec2:CancelSpotFleetRequests": {"action": "ec2:CancelSpotFleetRequests", "types": ["spot-fleet-request"], "resources": []},
"ec2:CancelSpotInstanceRequests": {"action": "ec2:CancelSpotInstanceRequests", "types": ["spot-instances-request"], "resources": []},
"ec2:ConfirmProductInstance": {"action": "ec2:ConfirmProductInstance", "types": [], "resources": []},
"ec2:CopyFpgaImage": {"action": "ec2:CopyFpgaImage", "types": ["fpga-image"], "resources": []},
"ec2:CopyImage": {"action": "ec2:CopyImage", "types": ["image", "snapshot"], "resources": []},
"ec2:CopySnapshot": {"action": "ec2:CopySnapshot", "types": ["snapshot"], "resources": []},
"ec2:CopyVolumes": {"action": "ec2:CopyVolumes", "types": ["volume"], "resources": []},
"ec2:CreateApplicationStatusCheck": {"action": "ec2:CreateApplicationStatusCheck", "types": ["application-status-check", "security-group", "subnet"], "resources": []},
"ec2:CreateCapacityManagerDataExport": {"action": "ec2:CreateCapacityManagerDataExport", "types": ["capacity-manager-data-export"], "resources": []},
"ec2:CreateCapacityReservation": {"action": "ec2:CreateCapacityReservation", "types": ["capacity-reservation"], "resources": []},
"ec2:CreateCapacityReservationBySplitting": {"action": "ec2:CreateCapacityReservationBySplitting", "types": ["capacity-reservation"], "resources": []},
"ec2:CreateCapacityReservationCancellationQuote": {"action": "ec2:CreateCapacityReservationCancellationQuote", "types": ["capacity-reservation", "capacity-reservation-cancellation-quote"], "resources": []},
"ec2:CreateCapacityReservationDateChangeQuote": {"action": "ec2:CreateCapacityReservationDateChangeQuote", "types": [], "resources": []},
"ec2:CreateCapacityReservationFleet": {"action": "ec2:CreateCapacityReservationFleet", "types": ["capacity-reservation-fleet"], "resources": []},
"ec2:CreateCarrierGateway": {"action": "ec2:CreateCarrierGateway", "types": ["carrier-gateway", "vpc"], "resources": []},
"ec2:CreateClientVpnEndpoint": {"action": "ec2:CreateClientVpnEndpoint", "types": ["client-vpn-endpoint", "security-group", "transit-gateway", "vpc"], "resources": []},
"ec2:CreateClientVpnRoute": {"action": "ec2:CreateClientVpnRoute", "types": ["client-vpn-endpoint", "subnet"], "resources": []},
"ec2:CreateCoipCidr": {"action": "ec2:CreateCoipCidr", "types": ["coip-pool"], "resources": []},
"ec2:CreateCoipPool": {"action": "ec2:CreateCoipPool", "types": ["coip-pool", "local-gateway-route-table"], "resources": []},
"ec2:CreateCustomerGateway": {"action": "ec2:CreateCustomerGateway", "types": ["customer-gateway"], "resources": []},
"ec2:CreateDefaultSubnet": {"action": "ec2:CreateDefaultSubnet", "types": [], "resources": []},
"ec2:CreateDefaultVpc": {"action": "ec2:CreateDefaultVpc", "types": [], "resources": []},
"ec2:CreateDelegateMacVolumeOwnershipTask": {"action": "ec2:CreateDelegateMacVolumeOwnershipTask", "types": ["instance", "mac-modification-task"], "resources": []},
"ec2:CreateDhcpOptions": {"action": "ec2:CreateDhcpOptions", "types": ["dhcp-options"], "resources": []},
"ec2:CreateEgressOnlyInternetGateway": {"action": "ec2:CreateEgressOnlyInternetGateway", "types": ["egress-only-internet-gateway", "vpc"], "resources": []},
"ec2:CreateFleet": {"action": "ec2:CreateFleet", "types": ["capacity-reservation", "fleet", "image", "instance", "launch-template", "placement-group", "subnet", "volume"], "resources": []},
"ec2:CreateFlowLogs": {"action": "ec2:CreateFlowLogs", "types": ["natgateway", "network-interface", "subnet", "transit-gateway", "transit-gateway-attachment", "vpc", "vpc-flow-log"], "resources": []},
"ec2:CreateFpgaImage": {"action": "ec2:CreateFpgaImage", "types": ["fpga-image"], "resources": []},
"ec2:CreateImage": {"action": "ec2:CreateImage", "types": ["image", "instance", "snapshot"], "resources": []},
"ec2:CreateImageUsageReport": {"action": "ec2:CreateImageUsageReport", "types": ["image", "image-usage-report"], "resources": []},
"ec2:CreateInstanceConnectEndpoint": {"action": "ec2:CreateInstanceConnectEndpoint", "types": ["instance-connect-endpoint", "security-group", "subnet"], "resources": []},
"ec2:CreateInstanceEventWindow": {"action": "ec2:CreateInstanceEventWindow", "types": ["instance-event-window"], "resources": []},
"ec2:CreateInstanceExportTask": {"action": "ec2:CreateInstanceExportTask", "types": ["export-instance-task", "instance"], "resources": []},
"ec2:CreateInternetGateway": {"action": "ec2:CreateInternetGateway", "types": ["internet-gateway"], "resources": []},
"ec2:CreateInterruptibleCapacityReservationAllocation": {"action": "ec2:CreateInterruptibleCapacityReservationAllocation", "types": ["capacity-reservation"], "resources": []},
"ec2:CreateIpam": {"action": "ec2:CreateIpam", "types": ["ipam"], "resources": []},
"ec2:CreateIpamExternalResourceVerificationToken": {"action": "ec2:CreateIpamExternalResourceVerificationToken", "types": ["ipam", "ipam-external-resource-verification-token"], "resources": []},
"ec2:CreateIpamInternetRegistryAssociation": {"action": "ec2:CreateIpamInternetRegistryAssociation", "types": ["ipam", "ipam-internet-registry-association"], "resources": []},
"ec2:CreateIpamPolicy": {"action": "ec2:CreateIpamPolicy", "types": ["ipam", "ipam-policy"], "resources": []},
"ec2:CreateIpamPool": {"action": "ec2:CreateIpamPool", "types": ["ipam-pool", "ipam-scope"], "resources": []},
"ec2:CreateIpamPrefixListResolver": {"action": "ec2:CreateIpamPrefixListResolver", "types": ["ipam", "ipam-prefix-list-resolver", "ipam-scope"], "resources": []},
"ec2:CreateIpamPrefixListResolverTarget": {"action": "ec2:CreateIpamPrefixListResolverTarget", "types": ["ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target"], "resources": []},
"ec2:CreateIpamResourceDiscovery": {"action": "ec2:CreateIpamResourceDiscovery", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:CreateIpamRoutingPolicyRegistration": {"action": "ec2:CreateIpamRoutingPolicyRegistration", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:CreateIpamScope": {"action": "ec2:CreateIpamScope", "types": ["ipam", "ipam-scope"], "resources": []},
"ec2:CreateKeyPair": {"action": "ec2:CreateKeyPair", "types": ["key-pair"], "resources": []},
"ec2:CreateLaunchTemplate": {"action": "ec2:CreateLaunchTemplate", "types": ["launch-template"], "resources": []},
"ec2:CreateLaunchTemplateVersion": {"action": "ec2:CreateLaunchTemplateVersion", "types": ["launch-template"], "resources": []},
"ec2:CreateLocalGatewayRoute": {"action": "ec2:CreateLocalGatewayRoute", "types": ["local-gateway-route-table", "local-gateway-virtual-interface-group", "network-interface", "prefix-list"], "resources": []},
"ec2:CreateLocalGatewayRouteTable": {"action": "ec2:CreateLocalGatewayRouteTable", "types": ["local-gateway", "local-gateway-route-table"], "resources": []},
"ec2:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation": {"action": "ec2:CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation", "types": ["local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-virtual-interface-group"], "resources": []},
"ec2:CreateLocalGatewayRouteTableVpcAssociation": {"action": "ec2:CreateLocalGatewayRouteTableVpcAssociation", "types": ["local-gateway-route-table", "local-gateway-route-table-vpc-association", "vpc"], "resources": []},
"ec2:CreateLocalGatewayVirtualInterface": {"action": "ec2:CreateLocalGatewayVirtualInterface", "types": ["local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "outpost-lag"], "resources": []},
"ec2:CreateLocalGatewayVirtualInterfaceGroup": {"action": "ec2:CreateLocalGatewayVirtualInterfaceGroup", "types": ["local-gateway", "local-gateway-virtual-interface-group"], "resources": []},
"ec2:CreateMacSystemIntegrityProtectionModificationTask": {"action": "ec2:CreateMacSystemIntegrityProtectionModificationTask", "types": ["instance", "mac-modification-task"], "resources": []},
"ec2:CreateManagedPrefixList": {"action": "ec2:CreateManagedPrefixList", "types": ["prefix-list"], "resources": []},
"ec2:CreateNatGateway": {"action": "ec2:CreateNatGateway", "types": ["elastic-ip", "natgateway", "subnet", "vpc"], "resources": []},
"ec2:CreateNetworkAcl": {"action": "ec2:CreateNetworkAcl", "types": ["network-acl", "vpc"], "resources": []},
"ec2:CreateNetworkAclEntry": {"action": "ec2:CreateNetworkAclEntry", "types": ["network-acl"], "resources": []},
"ec2:CreateNetworkInsightsAccessScope": {"action": "ec2:CreateNetworkInsightsAccessScope", "types": ["network-insights-access-scope"], "resources": []},
"ec2:CreateNetworkInsightsPath": {"action": "ec2:CreateNetworkInsightsPath", "types": ["instance", "internet-gateway", "network-insights-path", "network-interface", "transit-gateway", "vpc-endpoint", "vpc-endpoint-service", "vpc-peering-connection", "vpn-gateway"], "resources": []},
"ec2:CreateNetworkInterface": {"action": "ec2:CreateNetworkInterface", "types": ["network-interface", "security-group", "subnet"], "resources": []},
"ec2:CreateNetworkInterfacePermission": {"action": "ec2:CreateNetworkInterfacePermission", "types": ["network-interface"], "resources": []},
"ec2:CreatePlacementGroup": {"action": "ec2:CreatePlacementGroup", "types": ["placement-group"], "resources": []},
"ec2:CreatePublicIpv4Pool": {"action": "ec2:CreatePublicIpv4Pool", "types": ["ipv4pool-ec2"], "resources": []},
"ec2:CreateReplaceRootVolumeTask": {"action": "ec2:CreateReplaceRootVolumeTask", "types": ["image", "instance", "replace-root-volume-task", "snapshot", "volume"], "resources": []},
"ec2:CreateReservedInstancesListing": {"action": "ec2:CreateReservedInstancesListing", "types": [], "resources": []},
"ec2:CreateRestoreImageTask": {"action": "ec2:CreateRestoreImageTask", "types": ["image"], "resources": []},
"ec2:CreateRoute": {"action": "ec2:CreateRoute", "types": ["route-table"], "resources": []},
"ec2:CreateRouteServer": {"action": "ec2:CreateRouteServer", "types": ["route-server"], "resources": []},
"ec2:CreateRouteServerEndpoint": {"action": "ec2:CreateRouteServerEndpoint", "types": ["route-server", "route-server-endpoint", "subnet"], "resources": []},
"ec2:CreateRouteServerPeer": {"action": "ec2:CreateRouteServerPeer", "types": ["route-server-endpoint", "route-server-peer"], "resources": []},
"ec2:CreateRouteTable": {"action": "ec2:CreateRouteTable", "types": ["route-table", "vpc"], "resources": []},
"ec2:CreateSecondaryNetwork": {"action": "ec2:CreateSecondaryNetwork", "types": ["secondary-network"], "resources": []},
"ec2:CreateSecondarySubnet": {"action": "ec2:CreateSecondarySubnet", "types": ["secondary-network", "secondary-subnet"], "resources": []},
"ec2:CreateSecurityGroup": {"action": "ec2:CreateSecurityGroup", "types": ["security-group", "vpc"], "resources": []},
"ec2:CreateSnapshot": {"action": "ec2:CreateSnapshot", "types": ["snapshot", "volume"], "resources": []},
"ec2:CreateSnapshots": {"action": "ec2:CreateSnapshots", "types": ["instance", "snapshot", "volume"], "resources": []},
"ec2:CreateSpotDatafeedSubscription": {"action": "ec2:CreateSpotDatafeedSubscription", "types": [], "resources": []},
"ec2:CreateStoreImageTask": {"action": "ec2:CreateStoreImageTask", "types": ["image"], "resources": []},
"ec2:CreateSubnet": {"action": "ec2:CreateSubnet", "types": ["ipam-pool", "subnet", "vpc"], "resources": []},
"ec2:CreateSubnetCidrReservation": {"action": "ec2:CreateSubnetCidrReservation", "types": ["subnet"], "resources": []},
"ec2:CreateTags": {"action": "ec2:CreateTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-"}}},
"ec2:CreateTrafficMirrorFilter": {"action": "ec2:CreateTrafficMirrorFilter", "types": ["traffic-mirror-filter"], "resources": []},
"ec2:CreateTrafficMirrorFilterRule": {"action": "ec2:CreateTrafficMirrorFilterRule", "types": ["traffic-mirror-filter", "traffic-mirror-filter-rule"], "resources": []},
"ec2:CreateTrafficMirrorSession": {"action": "ec2:CreateTrafficMirrorSession", "types": ["network-interface", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target"], "resources": []},
"ec2:CreateTrafficMirrorTarget": {"action": "ec2:CreateTrafficMirrorTarget", "types": ["network-interface", "traffic-mirror-target", "vpc-endpoint"], "resources": []},
"ec2:CreateTransitGateway": {"action": "ec2:CreateTransitGateway", "types": ["transit-gateway"], "resources": []},
"ec2:CreateTransitGatewayConnect": {"action": "ec2:CreateTransitGatewayConnect", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:CreateTransitGatewayConnectPeer": {"action": "ec2:CreateTransitGatewayConnectPeer", "types": ["transit-gateway-attachment", "transit-gateway-connect-peer"], "resources": []},
"ec2:CreateTransitGatewayMeteringPolicy": {"action": "ec2:CreateTransitGatewayMeteringPolicy", "types": ["transit-gateway", "transit-gateway-attachment", "transit-gateway-metering-policy"], "resources": []},
"ec2:CreateTransitGatewayMeteringPolicyEntry": {"action": "ec2:CreateTransitGatewayMeteringPolicyEntry", "types": ["transit-gateway-attachment", "transit-gateway-metering-policy"], "resources": []},
"ec2:CreateTransitGatewayMulticastDomain": {"action": "ec2:CreateTransitGatewayMulticastDomain", "types": ["transit-gateway", "transit-gateway-multicast-domain"], "resources": []},
"ec2:CreateTransitGatewayPeeringAttachment": {"action": "ec2:CreateTransitGatewayPeeringAttachment", "types": ["transit-gateway", "transit-gateway-attachment"], "resources": []},
"ec2:CreateTransitGatewayPolicyTable": {"action": "ec2:CreateTransitGatewayPolicyTable", "types": ["transit-gateway", "transit-gateway-policy-table"], "resources": []},
"ec2:CreateTransitGatewayPolicyTableEntry": {"action": "ec2:CreateTransitGatewayPolicyTableEntry", "types": ["transit-gateway-policy-table", "transit-gateway-route-table"], "resources": []},
"ec2:CreateTransitGatewayPrefixListReference": {"action": "ec2:CreateTransitGatewayPrefixListReference", "types": ["prefix-list", "transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:CreateTransitGatewayRoute": {"action": "ec2:CreateTransitGatewayRoute", "types": ["transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:CreateTransitGatewayRouteTable": {"action": "ec2:CreateTransitGatewayRouteTable", "types": ["transit-gateway", "transit-gateway-route-table"], "resources": []},
"ec2:CreateTransitGatewayRouteTableAnnouncement": {"action": "ec2:CreateTransitGatewayRouteTableAnnouncement", "types": ["transit-gateway-attachment", "transit-gateway-route-table", "transit-gateway-route-table-announcement"], "resources": []},
"ec2:CreateTransitGatewayVpcAttachment": {"action": "ec2:CreateTransitGatewayVpcAttachment", "types": ["subnet", "transit-gateway", "transit-gateway-attachment", "vpc"], "resources": []},
"ec2:CreateVerifiedAccessEndpoint": {"action": "ec2:CreateVerifiedAccessEndpoint", "types": ["network-interface", "security-group", "subnet", "verified-access-endpoint", "verified-access-group"], "resources": []},
"ec2:CreateVerifiedAccessGroup": {"action": "ec2:CreateVerifiedAccessGroup", "types": ["verified-access-group", "verified-access-instance"], "resources": []},
"ec2:CreateVerifiedAccessInstance": {"action": "ec2:CreateVerifiedAccessInstance", "types": ["verified-access-instance"], "resources": []},
"ec2:CreateVerifiedAccessTrustProvider": {"action": "ec2:CreateVerifiedAccessTrustProvider", "types": ["verified-access-trust-provider"], "resources": []},
"ec2:CreateVolume": {"action": "ec2:CreateVolume", "types": ["snapshot", "volume"], "resources": []},
"ec2:CreateVpc": {"action": "ec2:CreateVpc", "types": ["ipam-pool", "ipv6pool-ec2", "vpc"], "resources": []},
"ec2:CreateVpcBlockPublicAccessExclusion": {"action": "ec2:CreateVpcBlockPublicAccessExclusion", "types": ["subnet", "vpc", "vpc-block-public-access-exclusion"], "resources": []},
"ec2:CreateVpcEncryptionControl": {"action": "ec2:CreateVpcEncryptionControl", "types": ["vpc", "vpc-encryption-control"], "resources": []},
"ec2:CreateVpcEndpoint": {"action": "ec2:CreateVpcEndpoint", "types": ["route-table", "security-group", "subnet", "vpc", "vpc-endpoint"], "resources": []},
"ec2:CreateVpcEndpointConnectionNotification": {"action": "ec2:CreateVpcEndpointConnectionNotification", "types": ["vpc-endpoint", "vpc-endpoint-service"], "resources": []},
"ec2:CreateVpcEndpointServiceConfiguration": {"action": "ec2:CreateVpcEndpointServiceConfiguration", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:CreateVpcPeeringConnection": {"action": "ec2:CreateVpcPeeringConnection", "types": ["vpc", "vpc-peering-connection"], "resources": []},
"ec2:CreateVpnConcentrator": {"action": "ec2:CreateVpnConcentrator", "types": ["transit-gateway", "vpn-concentrator"], "resources": []},
"ec2:CreateVpnConnection": {"action": "ec2:CreateVpnConnection", "types": ["customer-gateway", "transit-gateway", "transit-gateway-attachment", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": []},
"ec2:CreateVpnConnectionRoute": {"action": "ec2:CreateVpnConnectionRoute", "types": ["vpn-connection"], "resources": []},
"ec2:CreateVpnGateway": {"action": "ec2:CreateVpnGateway", "types": ["vpn-gateway"], "resources": []},
"ec2:DeleteApplicationStatusCheck": {"action": "ec2:DeleteApplicationStatusCheck", "types": ["application-status-check"], "resources": []},
"ec2:DeleteCapacityManagerDataExport": {"action": "ec2:DeleteCapacityManagerDataExport", "types": ["capacity-manager-data-export"], "resources": []},
"ec2:DeleteCarrierGateway": {"action": "ec2:DeleteCarrierGateway", "types": ["carrier-gateway"], "resources": []},
"ec2:DeleteClientVpnEndpoint": {"action": "ec2:DeleteClientVpnEndpoint", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DeleteClientVpnEndpointAuthorizationPolicy": {"action": "ec2:DeleteClientVpnEndpointAuthorizationPolicy", "types": [], "resources": []},
"ec2:DeleteClientVpnRoute": {"action": "ec2:DeleteClientVpnRoute", "types": ["client-vpn-endpoint", "subnet"], "resources": []},
"ec2:DeleteCoipCidr": {"action": "ec2:DeleteCoipCidr", "types": ["coip-pool"], "resources": []},
"ec2:DeleteCoipPool": {"action": "ec2:DeleteCoipPool", "types": ["coip-pool"], "resources": []},
"ec2:DeleteCustomerGateway": {"action": "ec2:DeleteCustomerGateway", "types": ["customer-gateway"], "resources": []},
"ec2:DeleteDhcpOptions": {"action": "ec2:DeleteDhcpOptions", "types": ["dhcp-options"], "resources": []},
"ec2:DeleteEgressOnlyInternetGateway": {"action": "ec2:DeleteEgressOnlyInternetGateway", "types": ["egress-only-internet-gateway"], "resources": []},
"ec2:DeleteFleets": {"action": "ec2:DeleteFleets", "types": ["fleet"], "resources": []},
"ec2:DeleteFlowLogs": {"action": "ec2:DeleteFlowLogs", "types": ["vpc-flow-log"], "resources": []},
"ec2:DeleteFpgaImage": {"action": "ec2:DeleteFpgaImage", "types": ["fpga-image"], "resources": []},
"ec2:DeleteImageUsageReport": {"action": "ec2:DeleteImageUsageReport", "types": ["image-usage-report"], "resources": []},
"ec2:DeleteInstanceConnectEndpoint": {"action": "ec2:DeleteInstanceConnectEndpoint", "types": ["instance-connect-endpoint"], "resources": []},
"ec2:DeleteInstanceEventWindow": {"action": "ec2:DeleteInstanceEventWindow", "types": ["instance-event-window"], "resources": []},
"ec2:DeleteInternetGateway": {"action": "ec2:DeleteInternetGateway", "types": ["internet-gateway"], "resources": []},
"ec2:DeleteIpam": {"action": "ec2:DeleteIpam", "types": ["ipam"], "resources": []},
"ec2:DeleteIpamExternalResourceVerificationToken": {"action": "ec2:DeleteIpamExternalResourceVerificationToken", "types": ["ipam-external-resource-verification-token"], "resources": []},
"ec2:DeleteIpamInternetRegistryAssociation": {"action": "ec2:DeleteIpamInternetRegistryAssociation", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:DeleteIpamPolicy": {"action": "ec2:DeleteIpamPolicy", "types": ["ipam-policy"], "resources": []},
"ec2:DeleteIpamPool": {"action": "ec2:DeleteIpamPool", "types": ["ipam-pool"], "resources": []},
"ec2:DeleteIpamPrefixListResolver": {"action": "ec2:DeleteIpamPrefixListResolver", "types": ["ipam-prefix-list-resolver"], "resources": []},
"ec2:DeleteIpamPrefixListResolverTarget": {"action": "ec2:DeleteIpamPrefixListResolverTarget", "types": ["ipam-prefix-list-resolver-target"], "resources": []},
"ec2:DeleteIpamResourceDiscovery": {"action": "ec2:DeleteIpamResourceDiscovery", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:DeleteIpamRoutingPolicyRegistration": {"action": "ec2:DeleteIpamRoutingPolicyRegistration", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:DeleteIpamScope": {"action": "ec2:DeleteIpamScope", "types": ["ipam-scope"], "resources": []},
"ec2:DeleteKeyPair": {"action": "ec2:DeleteKeyPair", "types": ["key-pair"], "resources": []},
"ec2:DeleteLaunchTemplate": {"action": "ec2:DeleteLaunchTemplate", "types": ["launch-template"], "resources": []},
"ec2:DeleteLaunchTemplateVersions": {"action": "ec2:DeleteLaunchTemplateVersions", "types": ["launch-template"], "resources": []},
"ec2:DeleteLocalGatewayRoute": {"action": "ec2:DeleteLocalGatewayRoute", "types": ["local-gateway-route-table", "prefix-list"], "resources": []},
"ec2:DeleteLocalGatewayRouteTable": {"action": "ec2:DeleteLocalGatewayRouteTable", "types": ["local-gateway-route-table"], "resources": []},
"ec2:DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation": {"action": "ec2:DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation", "types": ["local-gateway-route-table-virtual-interface-group-association"], "resources": []},
"ec2:DeleteLocalGatewayRouteTableVpcAssociation": {"action": "ec2:DeleteLocalGatewayRouteTableVpcAssociation", "types": ["local-gateway-route-table-vpc-association"], "resources": []},
"ec2:DeleteLocalGatewayVirtualInterface": {"action": "ec2:DeleteLocalGatewayVirtualInterface", "types": ["local-gateway-virtual-interface"], "resources": []},
"ec2:DeleteLocalGatewayVirtualInterfaceGroup": {"action": "ec2:DeleteLocalGatewayVirtualInterfaceGroup", "types": ["local-gateway-virtual-interface-group"], "resources": []},
"ec2:DeleteManagedPrefixList": {"action": "ec2:DeleteManagedPrefixList", "types": ["prefix-list"], "resources": []},
"ec2:DeleteNatGateway": {"action": "ec2:DeleteNatGateway", "types": ["natgateway"], "resources": []},
"ec2:DeleteNetworkAcl": {"action": "ec2:DeleteNetworkAcl", "types": ["network-acl"], "resources": []},
"ec2:DeleteNetworkAclEntry": {"action": "ec2:DeleteNetworkAclEntry", "types": ["network-acl"], "resources": []},
"ec2:DeleteNetworkInsightsAccessScope": {"action": "ec2:DeleteNetworkInsightsAccessScope", "types": ["network-insights-access-scope"], "resources": []},
"ec2:DeleteNetworkInsightsAccessScopeAnalysis": {"action": "ec2:DeleteNetworkInsightsAccessScopeAnalysis", "types": ["network-insights-access-scope-analysis"], "resources": []},
"ec2:DeleteNetworkInsightsAnalysis": {"action": "ec2:DeleteNetworkInsightsAnalysis", "types": ["network-insights-analysis"], "resources": []},
"ec2:DeleteNetworkInsightsPath": {"action": "ec2:DeleteNetworkInsightsPath", "types": ["network-insights-path"], "resources": []},
"ec2:DeleteNetworkInterface": {"action": "ec2:DeleteNetworkInterface", "types": ["network-interface"], "resources": []},
"ec2:DeleteNetworkInterfacePermission": {"action": "ec2:DeleteNetworkInterfacePermission", "types": ["network-interface"], "resources": []},
"ec2:DeletePlacementGroup": {"action": "ec2:DeletePlacementGroup", "types": ["placement-group"], "resources": []},
"ec2:DeletePublicIpv4Pool": {"action": "ec2:DeletePublicIpv4Pool", "types": ["ipv4pool-ec2"], "resources": []},
"ec2:DeleteQueuedReservedInstances": {"action": "ec2:DeleteQueuedReservedInstances", "types": ["reserved-instances"], "resources": []},
"ec2:DeleteRoute": {"action": "ec2:DeleteRoute", "types": ["route-table"], "resources": []},
"ec2:DeleteRouteServer": {"action": "ec2:DeleteRouteServer", "types": ["route-server"], "resources": []},
"ec2:DeleteRouteServerEndpoint": {"action": "ec2:DeleteRouteServerEndpoint", "types": ["route-server-endpoint"], "resources": []},
"ec2:DeleteRouteServerPeer": {"action": "ec2:DeleteRouteServerPeer", "types": ["route-server-peer"], "resources": []},
"ec2:DeleteRouteTable": {"action": "ec2:DeleteRouteTable", "types": ["route-table"], "resources": []},
"ec2:DeleteSecondaryNetwork": {"action": "ec2:DeleteSecondaryNetwork", "types": ["secondary-network"], "resources": []},
"ec2:DeleteSecondarySubnet": {"action": "ec2:DeleteSecondarySubnet", "types": ["secondary-subnet"], "resources": []},
"ec2:DeleteSecurityGroup": {"action": "ec2:DeleteSecurityGroup", "types": ["security-group"], "resources": []},
"ec2:DeleteSnapshot": {"action": "ec2:DeleteSnapshot", "types": ["snapshot"], "resources": []},
"ec2:DeleteSpotDatafeedSubscription": {"action": "ec2:DeleteSpotDatafeedSubscription", "types": [], "resources": []},
"ec2:DeleteSubnet": {"action": "ec2:DeleteSubnet", "types": ["subnet"], "resources": []},
"ec2:DeleteSubnetCidrReservation": {"action": "ec2:DeleteSubnetCidrReservation", "types": [], "resources": []},
"ec2:DeleteTags": {"action": "ec2:DeleteTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-"}}},
"ec2:DeleteTrafficMirrorFilter": {"action": "ec2:DeleteTrafficMirrorFilter", "types": ["traffic-mirror-filter"], "resources": []},
"ec2:DeleteTrafficMirrorFilterRule": {"action": "ec2:DeleteTrafficMirrorFilterRule", "types": ["traffic-mirror-filter", "traffic-mirror-filter-rule"], "resources": []},
"ec2:DeleteTrafficMirrorSession": {"action": "ec2:DeleteTrafficMirrorSession", "types": ["traffic-mirror-session"], "resources": []},
"ec2:DeleteTrafficMirrorTarget": {"action": "ec2:DeleteTrafficMirrorTarget", "types": ["traffic-mirror-target"], "resources": []},
"ec2:DeleteTransitGateway": {"action": "ec2:DeleteTransitGateway", "types": ["transit-gateway"], "resources": []},
"ec2:DeleteTransitGatewayClientVpnAttachment": {"action": "ec2:DeleteTransitGatewayClientVpnAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:DeleteTransitGatewayConnect": {"action": "ec2:DeleteTransitGatewayConnect", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:DeleteTransitGatewayConnectPeer": {"action": "ec2:DeleteTransitGatewayConnectPeer", "types": ["transit-gateway-connect-peer"], "resources": []},
"ec2:DeleteTransitGatewayMeteringPolicy": {"action": "ec2:DeleteTransitGatewayMeteringPolicy", "types": ["transit-gateway-metering-policy"], "resources": []},
"ec2:DeleteTransitGatewayMeteringPolicyEntry": {"action": "ec2:DeleteTransitGatewayMeteringPolicyEntry", "types": ["transit-gateway-metering-policy"], "resources": []},
"ec2:DeleteTransitGatewayMulticastDomain": {"action": "ec2:DeleteTransitGatewayMulticastDomain", "types": ["transit-gateway-multicast-domain"], "resources": []},
"ec2:DeleteTransitGatewayPeeringAttachment": {"action": "ec2:DeleteTransitGatewayPeeringAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:DeleteTransitGatewayPolicyTable": {"action": "ec2:DeleteTransitGatewayPolicyTable", "types": ["transit-gateway-policy-table"], "resources": []},
"ec2:DeleteTransitGatewayPolicyTableEntry": {"action": "ec2:DeleteTransitGatewayPolicyTableEntry", "types": ["transit-gateway-policy-table"], "resources": []},
"ec2:DeleteTransitGatewayPrefixListReference": {"action": "ec2:DeleteTransitGatewayPrefixListReference", "types": ["prefix-list", "transit-gateway-route-table"], "resources": []},
"ec2:DeleteTransitGatewayRoute": {"action": "ec2:DeleteTransitGatewayRoute", "types": ["transit-gateway-route-table"], "resources": []},
"ec2:DeleteTransitGatewayRouteTable": {"action": "ec2:DeleteTransitGatewayRouteTable", "types": ["transit-gateway-route-table"], "resources": []},
"ec2:DeleteTransitGatewayRouteTableAnnouncement": {"action": "ec2:DeleteTransitGatewayRouteTableAnnouncement", "types": ["transit-gateway-route-table-announcement"], "resources": []},
"ec2:DeleteTransitGatewayVpcAttachment": {"action": "ec2:DeleteTransitGatewayVpcAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:DeleteVerifiedAccessEndpoint": {"action": "ec2:DeleteVerifiedAccessEndpoint", "types": ["verified-access-endpoint"], "resources": []},
"ec2:DeleteVerifiedAccessGroup": {"action": "ec2:DeleteVerifiedAccessGroup", "types": ["verified-access-group"], "resources": []},
"ec2:DeleteVerifiedAccessInstance": {"action": "ec2:DeleteVerifiedAccessInstance", "types": ["verified-access-instance"], "resources": []},
"ec2:DeleteVerifiedAccessTrustProvider": {"action": "ec2:DeleteVerifiedAccessTrustProvider", "types": ["verified-access-trust-provider"], "resources": []},
"ec2:DeleteVolume": {"action": "ec2:DeleteVolume", "types": ["volume"], "resources": []},
"ec2:DeleteVpc": {"action": "ec2:DeleteVpc", "types": ["vpc"], "resources": []},
"ec2:DeleteVpcBlockPublicAccessExclusion": {"action": "ec2:DeleteVpcBlockPublicAccessExclusion", "types": ["vpc-block-public-access-exclusion"], "resources": []},
"ec2:DeleteVpcEncryptionControl": {"action": "ec2:DeleteVpcEncryptionControl", "types": ["vpc-encryption-control"], "resources": []},
"ec2:DeleteVpcEndpointConnectionNotifications": {"action": "ec2:DeleteVpcEndpointConnectionNotifications", "types": ["vpc-endpoint", "vpc-endpoint-service"], "resources": []},
"ec2:DeleteVpcEndpointServiceConfigurations": {"action": "ec2:DeleteVpcEndpointServiceConfigurations", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:DeleteVpcEndpoints": {"action": "ec2:DeleteVpcEndpoints", "types": ["vpc-endpoint"], "resources": []},
"ec2:DeleteVpcPeeringConnection": {"action": "ec2:DeleteVpcPeeringConnection", "types": ["vpc-peering-connection"], "resources": []},
"ec2:DeleteVpnConcentrator": {"action": "ec2:DeleteVpnConcentrator", "types": ["vpn-concentrator"], "resources": []},
"ec2:DeleteVpnConnection": {"action": "ec2:DeleteVpnConnection", "types": ["vpn-connection"], "resources": []},
"ec2:DeleteVpnConnectionRoute": {"action": "ec2:DeleteVpnConnectionRoute", "types": ["vpn-connection"], "resources": []},
"ec2:DeleteVpnGateway": {"action": "ec2:DeleteVpnGateway", "types": ["vpn-gateway"], "resources": []},
"ec2:DeprovisionByoipCidr": {"action": "ec2:DeprovisionByoipCidr", "types": [], "resources": []},
"ec2:DeprovisionIpamByoasn": {"action": "ec2:DeprovisionIpamByoasn", "types": ["ipam"], "resources": []},
"ec2:DeprovisionIpamPoolCidr": {"action": "ec2:DeprovisionIpamPoolCidr", "types": ["ipam-pool"], "resources": []},
"ec2:DeprovisionPublicIpv4PoolCidr": {"action": "ec2:DeprovisionPublicIpv4PoolCidr", "types": ["ipv4pool-ec2"], "resources": []},
"ec2:DeregisterImage": {"action": "ec2:DeregisterImage", "types": ["image"], "resources": []},
"ec2:DeregisterInstanceEventNotificationAttributes": {"action": "ec2:DeregisterInstanceEventNotificationAttributes", "types": [], "resources": []},
"ec2:DeregisterTransitGatewayMulticastGroupMembers": {"action": "ec2:DeregisterTransitGatewayMulticastGroupMembers", "types": ["network-interface", "transit-gateway-multicast-domain"], "resources": []},
"ec2:DeregisterTransitGatewayMulticastGroupSources": {"action": "ec2:DeregisterTransitGatewayMulticastGroupSources", "types": ["network-interface", "transit-gateway-multicast-domain"], "resources": []},
"ec2:DescribeAccountAttributes": {"action": "ec2:DescribeAccountAttributes", "types": [], "resources": []},
"ec2:DescribeAccountVpcEncryptionControl": {"action": "ec2:DescribeAccountVpcEncryptionControl", "types": [], "resources": []},
"ec2:DescribeAddressTransfers": {"action": "ec2:DescribeAddressTransfers", "types": [], "resources": []},
"ec2:DescribeAddresses": {"action": "ec2:DescribeAddresses", "types": [], "resources": []},
"ec2:DescribeAddressesAttribute": {"action": "ec2:DescribeAddressesAttribute", "types": [], "resources": []},
"ec2:DescribeAggregateIdFormat": {"action": "ec2:DescribeAggregateIdFormat", "types": [], "resources": []},
"ec2:DescribeApplicationStatus": {"action": "ec2:DescribeApplicationStatus", "types": [], "resources": []},
"ec2:DescribeApplicationStatusCheckAssociations": {"action": "ec2:DescribeApplicationStatusCheckAssociations", "types": [], "resources": []},
"ec2:DescribeApplicationStatusChecks": {"action": "ec2:DescribeApplicationStatusChecks", "types": [], "resources": []},
"ec2:DescribeAvailabilityZones": {"action": "ec2:DescribeAvailabilityZones", "types": [], "resources": []},
"ec2:DescribeAwsNetworkPerformanceMetricSubscriptions": {"action": "ec2:DescribeAwsNetworkPerformanceMetricSubscriptions", "types": [], "resources": []},
"ec2:DescribeBundleTasks": {"action": "ec2:DescribeBundleTasks", "types": [], "resources": []},
"ec2:DescribeByoipCidrs": {"action": "ec2:DescribeByoipCidrs", "types": [], "resources": []},
"ec2:DescribeCapacityBlockExtensionHistory": {"action": "ec2:DescribeCapacityBlockExtensionHistory", "types": [], "resources": []},
"ec2:DescribeCapacityBlockExtensionOfferings": {"action": "ec2:DescribeCapacityBlockExtensionOfferings", "types": ["capacity-reservation"], "resources": []},
"ec2:DescribeCapacityBlockOfferings": {"action": "ec2:DescribeCapacityBlockOfferings", "types": [], "resources": []},
"ec2:DescribeCapacityBlockStatus": {"action": "ec2:DescribeCapacityBlockStatus", "types": [], "resources": []},
"ec2:DescribeCapacityBlocks": {"action": "ec2:DescribeCapacityBlocks", "types": [], "resources": []},
"ec2:DescribeCapacityManagerDataExports": {"action": "ec2:DescribeCapacityManagerDataExports", "types": [], "resources": []},
"ec2:DescribeCapacityReservationBillingRequests": {"action": "ec2:DescribeCapacityReservationBillingRequests", "types": [], "resources": []},
"ec2:DescribeCapacityReservationCancellationQuotes": {"action": "ec2:DescribeCapacityReservationCancellationQuotes", "types": [], "resources": []},
"ec2:DescribeCapacityReservationDateChangeQuotes": {"action": "ec2:DescribeCapacityReservationDateChangeQuotes", "types": [], "resources": []},
"ec2:DescribeCapacityReservationFleets": {"action": "ec2:DescribeCapacityReservationFleets", "types": [], "resources": []},
"ec2:DescribeCapacityReservationTopology": {"action": "ec2:DescribeCapacityReservationTopology", "types": [], "resources": []},
"ec2:DescribeCapacityReservations": {"action": "ec2:DescribeCapacityReservations", "types": [], "resources": []},
"ec2:DescribeCarrierGateways": {"action": "ec2:DescribeCarrierGateways", "types": [], "resources": []},
"ec2:DescribeClassicLinkInstances": {"action": "ec2:DescribeClassicLinkInstances", "types": [], "resources": []},
"ec2:DescribeClientVpnAuthorizationRules": {"action": "ec2:DescribeClientVpnAuthorizationRules", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DescribeClientVpnConnections": {"action": "ec2:DescribeClientVpnConnections", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DescribeClientVpnEndpoints": {"action": "ec2:DescribeClientVpnEndpoints", "types": [], "resources": []},
"ec2:DescribeClientVpnRoutes": {"action": "ec2:DescribeClientVpnRoutes", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DescribeClientVpnTargetNetworks": {"action": "ec2:DescribeClientVpnTargetNetworks", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DescribeCoipPools": {"action": "ec2:DescribeCoipPools", "types": [], "resources": []},
"ec2:DescribeConversionTasks": {"action": "ec2:DescribeConversionTasks", "types": [], "resources": []},
"ec2:DescribeCustomerGateways": {"action": "ec2:DescribeCustomerGateways", "types": [], "resources": []},
"ec2:DescribeDeclarativePoliciesReports": {"action": "ec2:DescribeDeclarativePoliciesReports", "types": [], "resources": []},
"ec2:DescribeDhcpOptions": {"action": "ec2:DescribeDhcpOptions", "types": [], "resources": []},
"ec2:DescribeEgressOnlyInternetGateways": {"action": "ec2:DescribeEgressOnlyInternetGateways", "types": [], "resources": []},
"ec2:DescribeElasticGpus": {"action": "ec2:DescribeElasticGpus", "types": [], "resources": []},
"ec2:DescribeExportImageTasks": {"action": "ec2:DescribeExportImageTasks", "types": [], "resources": []},
"ec2:DescribeExportTasks": {"action": "ec2:DescribeExportTasks", "types": [], "resources": []},
"ec2:DescribeFastLaunchImages": {"action": "ec2:DescribeFastLaunchImages", "types": [], "resources": []},
"ec2:DescribeFastSnapshotRestores": {"action": "ec2:DescribeFastSnapshotRestores", "types": [], "resources": []},
"ec2:DescribeFleetHistory": {"action": "ec2:DescribeFleetHistory", "types": ["fleet"], "resources": []},
"ec2:DescribeFleetInstances": {"action": "ec2:DescribeFleetInstances", "types": ["fleet"], "resources": []},
"ec2:DescribeFleets": {"action": "ec2:DescribeFleets", "types": [], "resources": []},
"ec2:DescribeFlowLogs": {"action": "ec2:DescribeFlowLogs", "types": [], "resources": []},
"ec2:DescribeFpgaImageAttribute": {"action": "ec2:DescribeFpgaImageAttribute", "types": ["fpga-image"], "resources": []},
"ec2:DescribeFpgaImages": {"action": "ec2:DescribeFpgaImages", "types": [], "resources": []},
"ec2:DescribeHostReservationOfferings": {"action": "ec2:DescribeHostReservationOfferings", "types": [], "resources": []},
"ec2:DescribeHostReservations": {"action": "ec2:DescribeHostReservations", "types": [], "resources": []},
"ec2:DescribeHosts": {"action": "ec2:DescribeHosts", "types": [], "resources": []},
"ec2:DescribeIamInstanceProfileAssociations": {"action": "ec2:DescribeIamInstanceProfileAssociations", "types": [], "resources": []},
"ec2:DescribeIdFormat": {"action": "ec2:DescribeIdFormat", "types": [], "resources": []},
"ec2:DescribeIdentityIdFormat": {"action": "ec2:DescribeIdentityIdFormat", "types": [], "resources": []},
"ec2:DescribeImageAttribute": {"action": "ec2:DescribeImageAttribute", "types": ["image"], "resources": []},
"ec2:DescribeImageReferences": {"action": "ec2:DescribeImageReferences", "types": [], "resources": []},
"ec2:DescribeImageUsageReportEntries": {"action": "ec2:DescribeImageUsageReportEntries", "types": [], "resources": []},
"ec2:DescribeImageUsageReports": {"action": "ec2:DescribeImageUsageReports", "types": [], "resources": []},
"ec2:DescribeImages": {"action": "ec2:DescribeImages", "types": [], "resources": []},
"ec2:DescribeImportImageTasks": {"action": "ec2:DescribeImportImageTasks", "types": [], "resources": []},
"ec2:DescribeImportSnapshotTasks": {"action": "ec2:DescribeImportSnapshotTasks", "types": [], "resources": []},
"ec2:DescribeInstanceAttribute": {"action": "ec2:DescribeInstanceAttribute", "types": ["instance"], "resources": []},
"ec2:DescribeInstanceConnectEndpoints": {"action": "ec2:DescribeInstanceConnectEndpoints", "types": [], "resources": []},
"ec2:DescribeInstanceCreditSpecifications": {"action": "ec2:DescribeInstanceCreditSpecifications", "types": [], "resources": []},
"ec2:DescribeInstanceEventNotificationAttributes": {"action": "ec2:DescribeInstanceEventNotificationAttributes", "types": [], "resources": []},
"ec2:DescribeInstanceEventWindows": {"action": "ec2:DescribeInstanceEventWindows", "types": [], "resources": []},
"ec2:DescribeInstanceImageMetadata": {"action": "ec2:DescribeInstanceImageMetadata", "types": [], "resources": []},
"ec2:DescribeInstanceSqlHaHistoryStates": {"action": "ec2:DescribeInstanceSqlHaHistoryStates", "types": [], "resources": []},
"ec2:DescribeInstanceSqlHaStates": {"action": "ec2:DescribeInstanceSqlHaStates", "types": [], "resources": []},
"ec2:DescribeInstanceStatus": {"action": "ec2:DescribeInstanceStatus", "types": [], "resources": []},
"ec2:DescribeInstanceTopology": {"action": "ec2:DescribeInstanceTopology", "types": [], "resources": []},
"ec2:DescribeInstanceTypeOfferings": {"action": "ec2:DescribeInstanceTypeOfferings", "types": [], "resources": []},
"ec2:DescribeInstanceTypes": {"action": "ec2:DescribeInstanceTypes", "types": [], "resources": []},
"ec2:DescribeInstances": {"action": "ec2:DescribeInstances", "types": [], "resources": []},
"ec2:DescribeInternetGateways": {"action": "ec2:DescribeInternetGateways", "types": [], "resources": []},
"ec2:DescribeIpamByoasn": {"action": "ec2:DescribeIpamByoasn", "types": [], "resources": []},
"ec2:DescribeIpamExternalResourceVerificationTokens": {"action": "ec2:DescribeIpamExternalResourceVerificationTokens", "types": [], "resources": []},
"ec2:DescribeIpamInternetRegistryAssociations": {"action": "ec2:DescribeIpamInternetRegistryAssociations", "types": [], "resources": []},
"ec2:DescribeIpamPolicies": {"action": "ec2:DescribeIpamPolicies", "types": [], "resources": []},
"ec2:DescribeIpamPoolAllocations": {"action": "ec2:DescribeIpamPoolAllocations", "types": [], "resources": []},
"ec2:DescribeIpamPools": {"action": "ec2:DescribeIpamPools", "types": [], "resources": []},
"ec2:DescribeIpamPrefixListResolverTargets": {"action": "ec2:DescribeIpamPrefixListResolverTargets", "types": [], "resources": []},
"ec2:DescribeIpamPrefixListResolvers": {"action": "ec2:DescribeIpamPrefixListResolvers", "types": [], "resources": []},
"ec2:DescribeIpamResourceDiscoveries": {"action": "ec2:DescribeIpamResourceDiscoveries", "types": [], "resources": []},
"ec2:DescribeIpamResourceDiscoveryAssociations": {"action": "ec2:DescribeIpamResourceDiscoveryAssociations", "types": [], "resources": []},
"ec2:DescribeIpamScopes": {"action": "ec2:DescribeIpamScopes", "types": [], "resources": []},
"ec2:DescribeIpams": {"action": "ec2:DescribeIpams", "types": [], "resources": []},
"ec2:DescribeIpv6Pools": {"action": "ec2:DescribeIpv6Pools", "types": [], "resources": []},
"ec2:DescribeKeyPairs": {"action": "ec2:DescribeKeyPairs", "types": [], "resources": []},
"ec2:DescribeLaunchTemplateVersions": {"action": "ec2:DescribeLaunchTemplateVersions", "types": [], "resources": []},
"ec2:DescribeLaunchTemplates": {"action": "ec2:DescribeLaunchTemplates", "types": [], "resources": []},
"ec2:DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations": {"action": "ec2:DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations", "types": [], "resources": []},
"ec2:DescribeLocalGatewayRouteTableVpcAssociations": {"action": "ec2:DescribeLocalGatewayRouteTableVpcAssociations", "types": [], "resources": []},
"ec2:DescribeLocalGatewayRouteTables": {"action": "ec2:DescribeLocalGatewayRouteTables", "types": [], "resources": []},
"ec2:DescribeLocalGatewayVirtualInterfaceGroups": {"action": "ec2:DescribeLocalGatewayVirtualInterfaceGroups", "types": [], "resources": []},
"ec2:DescribeLocalGatewayVirtualInterfaces": {"action": "ec2:DescribeLocalGatewayVirtualInterfaces", "types": [], "resources": []},
"ec2:DescribeLocalGateways": {"action": "ec2:DescribeLocalGateways", "types": [], "resources": []},
"ec2:DescribeLockedSnapshots": {"action": "ec2:DescribeLockedSnapshots", "types": [], "resources": []},
"ec2:DescribeMacHosts": {"action": "ec2:DescribeMacHosts", "types": [], "resources": []},
"ec2:DescribeMacModificationTasks": {"action": "ec2:DescribeMacModificationTasks", "types": [], "resources": []},
"ec2:DescribeManagedPrefixLists": {"action": "ec2:DescribeManagedPrefixLists", "types": [], "resources": []},
"ec2:DescribeMovingAddresses": {"action": "ec2:DescribeMovingAddresses", "types": [], "resources": []},
"ec2:DescribeNatGateways": {"action": "ec2:DescribeNatGateways", "types": [], "resources": []},
"ec2:DescribeNetworkAcls": {"action": "ec2:DescribeNetworkAcls", "types": [], "resources": []},
"ec2:DescribeNetworkInsightsAccessScopeAnalyses": {"action": "ec2:DescribeNetworkInsightsAccessScopeAnalyses", "types": [], "resources": []},
"ec2:DescribeNetworkInsightsAccessScopes": {"action": "ec2:DescribeNetworkInsightsAccessScopes", "types": [], "resources": []},
"ec2:DescribeNetworkInsightsAnalyses": {"action": "ec2:DescribeNetworkInsightsAnalyses", "types": [], "resources": []},
"ec2:DescribeNetworkInsightsPaths": {"action": "ec2:DescribeNetworkInsightsPaths", "types": [], "resources": []},
"ec2:DescribeNetworkInterfaceAttribute": {"action": "ec2:DescribeNetworkInterfaceAttribute", "types": [], "resources": []},
"ec2:DescribeNetworkInterfacePermissions": {"action": "ec2:DescribeNetworkInterfacePermissions", "types": [], "resources": []},
"ec2:DescribeNetworkInterfaces": {"action": "ec2:DescribeNetworkInterfaces", "types": [], "resources": []},
"ec2:DescribeOutpostLags": {"action": "ec2:DescribeOutpostLags", "types": [], "resources": []},
"ec2:DescribePlacementGroups": {"action": "ec2:DescribePlacementGroups", "types": [], "resources": []},
"ec2:DescribePrefixLists": {"action": "ec2:DescribePrefixLists", "types": [], "resources": []},
"ec2:DescribePrincipalIdFormat": {"action": "ec2:DescribePrincipalIdFormat", "types": [], "resources": []},
"ec2:DescribePublicIpv4Pools": {"action": "ec2:DescribePublicIpv4Pools", "types": [], "resources": []},
"ec2:DescribeRegions": {"action": "ec2:DescribeRegions", "types": [], "resources": []},
"ec2:DescribeReplaceRootVolumeTasks": {"action": "ec2:DescribeReplaceRootVolumeTasks", "types": [], "resources": []},
"ec2:DescribeReservedInstances": {"action": "ec2:DescribeReservedInstances", "types": [], "resources": []},
"ec2:DescribeReservedInstancesListings": {"action": "ec2:DescribeReservedInstancesListings", "types": [], "resources": []},
"ec2:DescribeReservedInstancesModifications": {"action": "ec2:DescribeReservedInstancesModifications", "types": [], "resources": []},
"ec2:DescribeReservedInstancesOfferings": {"action": "ec2:DescribeReservedInstancesOfferings", "types": [], "resources": []},
"ec2:DescribeRouteServerEndpoints": {"action": "ec2:DescribeRouteServerEndpoints", "types": [], "resources": []},
"ec2:DescribeRouteServerPeers": {"action": "ec2:DescribeRouteServerPeers", "types": [], "resources": []},
"ec2:DescribeRouteServers": {"action": "ec2:DescribeRouteServers", "types": [], "resources": []},
"ec2:DescribeRouteTables": {"action": "ec2:DescribeRouteTables", "types": [], "resources": []},
"ec2:DescribeScheduledInstanceAvailability": {"action": "ec2:DescribeScheduledInstanceAvailability", "types": [], "resources": []},
"ec2:DescribeScheduledInstances": {"action": "ec2:DescribeScheduledInstances", "types": [], "resources": []},
"ec2:DescribeSecondaryInterfaces": {"action": "ec2:DescribeSecondaryInterfaces", "types": [], "resources": []},
"ec2:DescribeSecondaryNetworks": {"action": "ec2:DescribeSecondaryNetworks", "types": [], "resources": []},
"ec2:DescribeSecondarySubnets": {"action": "ec2:DescribeSecondarySubnets", "types": [], "resources": []},
"ec2:DescribeSecurityGroupReferences": {"action": "ec2:DescribeSecurityGroupReferences", "types": ["security-group"], "resources": []},
"ec2:DescribeSecurityGroupRules": {"action": "ec2:DescribeSecurityGroupRules", "types": [], "resources": []},
"ec2:DescribeSecurityGroupVpcAssociations": {"action": "ec2:DescribeSecurityGroupVpcAssociations", "types": [], "resources": []},
"ec2:DescribeSecurityGroups": {"action": "ec2:DescribeSecurityGroups", "types": [], "resources": []},
"ec2:DescribeServiceLinkVirtualInterfaces": {"action": "ec2:DescribeServiceLinkVirtualInterfaces", "types": [], "resources": []},
"ec2:DescribeSnapshotAttribute": {"action": "ec2:DescribeSnapshotAttribute", "types": ["snapshot"], "resources": []},
"ec2:DescribeSnapshotTierStatus": {"action": "ec2:DescribeSnapshotTierStatus", "types": [], "resources": []},
"ec2:DescribeSnapshots": {"action": "ec2:DescribeSnapshots", "types": [], "resources": []},
"ec2:DescribeSpotDatafeedSubscription": {"action": "ec2:DescribeSpotDatafeedSubscription", "types": [], "resources": []},
"ec2:DescribeSpotFleetInstances": {"action": "ec2:DescribeSpotFleetInstances", "types": ["spot-fleet-request"], "resources": []},
"ec2:DescribeSpotFleetRequestHistory": {"action": "ec2:DescribeSpotFleetRequestHistory", "types": ["spot-fleet-request"], "resources": []},
"ec2:DescribeSpotFleetRequests": {"action": "ec2:DescribeSpotFleetRequests", "types": [], "resources": []},
"ec2:DescribeSpotInstanceRequests": {"action": "ec2:DescribeSpotInstanceRequests", "types": [], "resources": []},
"ec2:DescribeSpotPriceHistory": {"action": "ec2:DescribeSpotPriceHistory", "types": [], "resources": []},
"ec2:DescribeStaleSecurityGroups": {"action": "ec2:DescribeStaleSecurityGroups", "types": [], "resources": []},
"ec2:DescribeStoreImageTasks": {"action": "ec2:DescribeStoreImageTasks", "types": [], "resources": []},
"ec2:DescribeSubnets": {"action": "ec2:DescribeSubnets", "types": [], "resources": []},
"ec2:DescribeTags": {"action": "ec2:DescribeTags", "types": [], "resources": []},
"ec2:DescribeTrafficMirrorFilterRules": {"action": "ec2:DescribeTrafficMirrorFilterRules", "types": [], "resources": []},
"ec2:DescribeTrafficMirrorFilters": {"action": "ec2:DescribeTrafficMirrorFilters", "types": [], "resources": []},
"ec2:DescribeTrafficMirrorSessions": {"action": "ec2:DescribeTrafficMirrorSessions", "types": [], "resources": []},
"ec2:DescribeTrafficMirrorTargets": {"action": "ec2:DescribeTrafficMirrorTargets", "types": [], "resources": []},
"ec2:DescribeTransitGatewayAttachments": {"action": "ec2:DescribeTransitGatewayAttachments", "types": [], "resources": []},
"ec2:DescribeTransitGatewayConnectPeers": {"action": "ec2:DescribeTransitGatewayConnectPeers", "types": [], "resources": []},
"ec2:DescribeTransitGatewayConnects": {"action": "ec2:DescribeTransitGatewayConnects", "types": [], "resources": []},
"ec2:DescribeTransitGatewayMeteringPolicies": {"action": "ec2:DescribeTransitGatewayMeteringPolicies", "types": [], "resources": []},
"ec2:DescribeTransitGatewayMulticastDomains": {"action": "ec2:DescribeTransitGatewayMulticastDomains", "types": [], "resources": []},
"ec2:DescribeTransitGatewayPeeringAttachments": {"action": "ec2:DescribeTransitGatewayPeeringAttachments", "types": [], "resources": []},
"ec2:DescribeTransitGatewayPolicyTables": {"action": "ec2:DescribeTransitGatewayPolicyTables", "types": [], "resources": []},
"ec2:DescribeTransitGatewayRouteTableAnnouncements": {"action": "ec2:DescribeTransitGatewayRouteTableAnnouncements", "types": [], "resources": []},
"ec2:DescribeTransitGatewayRouteTables": {"action": "ec2:DescribeTransitGatewayRouteTables", "types": [], "resources": []},
"ec2:DescribeTransitGatewayVpcAttachments": {"action": "ec2:DescribeTransitGatewayVpcAttachments", "types": [], "resources": []},
"ec2:DescribeTransitGateways": {"action": "ec2:DescribeTransitGateways", "types": [], "resources": []},
"ec2:DescribeTrunkInterfaceAssociations": {"action": "ec2:DescribeTrunkInterfaceAssociations", "types": [], "resources": []},
"ec2:DescribeVerifiedAccessEndpoints": {"action": "ec2:DescribeVerifiedAccessEndpoints", "types": [], "resources": []},
"ec2:DescribeVerifiedAccessGroups": {"action": "ec2:DescribeVerifiedAccessGroups", "types": [], "resources": []},
"ec2:DescribeVerifiedAccessInstanceLoggingConfigurations": {"action": "ec2:DescribeVerifiedAccessInstanceLoggingConfigurations", "types": [], "resources": []},
"ec2:DescribeVerifiedAccessInstances": {"action": "ec2:DescribeVerifiedAccessInstances", "types": [], "resources": []},
"ec2:DescribeVerifiedAccessTrustProviders": {"action": "ec2:DescribeVerifiedAccessTrustProviders", "types": [], "resources": []},
"ec2:DescribeVolumeAttribute": {"action": "ec2:DescribeVolumeAttribute", "types": ["volume"], "resources": []},
"ec2:DescribeVolumeStatus": {"action": "ec2:DescribeVolumeStatus", "types": [], "resources": []},
"ec2:DescribeVolumes": {"action": "ec2:DescribeVolumes", "types": [], "resources": []},
"ec2:DescribeVolumesModifications": {"action": "ec2:DescribeVolumesModifications", "types": [], "resources": []},
"ec2:DescribeVpcAttribute": {"action": "ec2:DescribeVpcAttribute", "types": ["vpc"], "resources": []},
"ec2:DescribeVpcBlockPublicAccessExclusions": {"action": "ec2:DescribeVpcBlockPublicAccessExclusions", "types": [], "resources": []},
"ec2:DescribeVpcBlockPublicAccessOptions": {"action": "ec2:DescribeVpcBlockPublicAccessOptions", "types": [], "resources": []},
"ec2:DescribeVpcClassicLink": {"action": "ec2:DescribeVpcClassicLink", "types": [], "resources": []},
"ec2:DescribeVpcClassicLinkDnsSupport": {"action": "ec2:DescribeVpcClassicLinkDnsSupport", "types": [], "resources": []},
"ec2:DescribeVpcEncryptionControls": {"action": "ec2:DescribeVpcEncryptionControls", "types": [], "resources": []},
"ec2:DescribeVpcEndpointAssociations": {"action": "ec2:DescribeVpcEndpointAssociations", "types": [], "resources": []},
"ec2:DescribeVpcEndpointConnectionNotifications": {"action": "ec2:DescribeVpcEndpointConnectionNotifications", "types": [], "resources": []},
"ec2:DescribeVpcEndpointConnections": {"action": "ec2:DescribeVpcEndpointConnections", "types": [], "resources": []},
"ec2:DescribeVpcEndpointServiceConfigurations": {"action": "ec2:DescribeVpcEndpointServiceConfigurations", "types": [], "resources": []},
"ec2:DescribeVpcEndpointServicePermissions": {"action": "ec2:DescribeVpcEndpointServicePermissions", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:DescribeVpcEndpointServices": {"action": "ec2:DescribeVpcEndpointServices", "types": [], "resources": []},
"ec2:DescribeVpcEndpoints": {"action": "ec2:DescribeVpcEndpoints", "types": [], "resources": []},
"ec2:DescribeVpcPeeringConnections": {"action": "ec2:DescribeVpcPeeringConnections", "types": [], "resources": []},
"ec2:DescribeVpcs": {"action": "ec2:DescribeVpcs", "types": [], "resources": []},
"ec2:DescribeVpnConcentrators": {"action": "ec2:DescribeVpnConcentrators", "types": [], "resources": []},
"ec2:DescribeVpnConnections": {"action": "ec2:DescribeVpnConnections", "types": [], "resources": []},
"ec2:DescribeVpnGateways": {"action": "ec2:DescribeVpnGateways", "types": [], "resources": []},
"ec2:DetachClassicLinkVpc": {"action": "ec2:DetachClassicLinkVpc", "types": ["instance", "vpc"], "resources": []},
"ec2:DetachImageWatermark": {"action": "ec2:DetachImageWatermark", "types": ["image"], "resources": []},
"ec2:DetachInternetGateway": {"action": "ec2:DetachInternetGateway", "types": ["internet-gateway", "vpc"], "resources": []},
"ec2:DetachNetworkInterface": {"action": "ec2:DetachNetworkInterface", "types": ["instance", "network-interface"], "resources": []},
"ec2:DetachVerifiedAccessTrustProvider": {"action": "ec2:DetachVerifiedAccessTrustProvider", "types": ["verified-access-instance", "verified-access-trust-provider"], "resources": []},
"ec2:DetachVolume": {"action": "ec2:DetachVolume", "types": ["instance", "volume"], "resources": []},
"ec2:DetachVpnGateway": {"action": "ec2:DetachVpnGateway", "types": ["vpc", "vpn-gateway"], "resources": []},
"ec2:DisableAddressTransfer": {"action": "ec2:DisableAddressTransfer", "types": ["elastic-ip"], "resources": []},
"ec2:DisableAllowedImagesSettings": {"action": "ec2:DisableAllowedImagesSettings", "types": [], "resources": []},
"ec2:DisableApplicationStatusCheckSuppression": {"action": "ec2:DisableApplicationStatusCheckSuppression", "types": ["instance"], "resources": []},
"ec2:DisableAwsNetworkPerformanceMetricSubscription": {"action": "ec2:DisableAwsNetworkPerformanceMetricSubscription", "types": [], "resources": []},
"ec2:DisableCapacityManager": {"action": "ec2:DisableCapacityManager", "types": [], "resources": []},
"ec2:DisableEbsEncryptionByDefault": {"action": "ec2:DisableEbsEncryptionByDefault", "types": [], "resources": []},
"ec2:DisableFastLaunch": {"action": "ec2:DisableFastLaunch", "types": ["image"], "resources": []},
"ec2:DisableFastSnapshotRestores": {"action": "ec2:DisableFastSnapshotRestores", "types": ["snapshot"], "resources": []},
"ec2:DisableImage": {"action": "ec2:DisableImage", "types": ["image"], "resources": []},
"ec2:DisableImageBlockPublicAccess": {"action": "ec2:DisableImageBlockPublicAccess", "types": [], "resources": []},
"ec2:DisableImageDeprecation": {"action": "ec2:DisableImageDeprecation", "types": ["image"], "resources": []},
"ec2:DisableImageDeregistrationProtection": {"action": "ec2:DisableImageDeregistrationProtection", "types": ["image"], "resources": []},
"ec2:DisableInstanceSqlHaStandbyDetections": {"action": "ec2:DisableInstanceSqlHaStandbyDetections", "types": ["instance"], "resources": []},
"ec2:DisableIpamOrganizationAdminAccount": {"action": "ec2:DisableIpamOrganizationAdminAccount", "types": [], "resources": []},
"ec2:DisableIpamPolicy": {"action": "ec2:DisableIpamPolicy", "types": ["ipam-policy"], "resources": []},
"ec2:DisableRouteServerPropagation": {"action": "ec2:DisableRouteServerPropagation", "types": ["route-server", "route-table"], "resources": []},
"ec2:DisableSerialConsoleAccess": {"action": "ec2:DisableSerialConsoleAccess", "types": [], "resources": []},
"ec2:DisableSnapshotBlockPublicAccess": {"action": "ec2:DisableSnapshotBlockPublicAccess", "types": [], "resources": []},
"ec2:DisableTransitGatewayRouteTablePropagation": {"action": "ec2:DisableTransitGatewayRouteTablePropagation", "types": ["transit-gateway-attachment", "transit-gateway-route-table", "transit-gateway-route-table-announcement"], "resources": []},
"ec2:DisableVgwRoutePropagation": {"action": "ec2:DisableVgwRoutePropagation", "types": ["route-table", "vpn-gateway"], "resources": []},
"ec2:DisableVpcClassicLink": {"action": "ec2:DisableVpcClassicLink", "types": ["vpc"], "resources": []},
"ec2:DisableVpcClassicLinkDnsSupport": {"action": "ec2:DisableVpcClassicLinkDnsSupport", "types": ["vpc"], "resources": []},
"ec2:DisassociateAddress": {"action": "ec2:DisassociateAddress", "types": ["elastic-ip", "network-interface"], "resources": []},
"ec2:DisassociateApplicationStatusCheck": {"action": "ec2:DisassociateApplicationStatusCheck", "types": ["application-status-check", "instance"], "resources": []},
"ec2:DisassociateCapacityReservationBillingOwner": {"action": "ec2:DisassociateCapacityReservationBillingOwner", "types": ["capacity-reservation"], "resources": []},
"ec2:DisassociateClientVpnTargetNetwork": {"action": "ec2:DisassociateClientVpnTargetNetwork", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:DisassociateEnclaveCertificateIamRole": {"action": "ec2:DisassociateEnclaveCertificateIamRole", "types": ["certificate", "role"], "resources": []},
"ec2:DisassociateIamInstanceProfile": {"action": "ec2:DisassociateIamInstanceProfile", "types": ["instance"], "resources": []},
"ec2:DisassociateInstanceEventWindow": {"action": "ec2:DisassociateInstanceEventWindow", "types": ["instance-event-window"], "resources": []},
"ec2:DisassociateIpamByoasn": {"action": "ec2:DisassociateIpamByoasn", "types": [], "resources": []},
"ec2:DisassociateIpamResourceDiscovery": {"action": "ec2:DisassociateIpamResourceDiscovery", "types": ["ipam-resource-discovery-association"], "resources": []},
"ec2:DisassociateNatGatewayAddress": {"action": "ec2:DisassociateNatGatewayAddress", "types": ["elastic-ip", "natgateway", "network-interface"], "resources": []},
"ec2:DisassociateRouteServer": {"action": "ec2:DisassociateRouteServer", "types": ["route-server", "vpc"], "resources": []},
"ec2:DisassociateRouteTable": {"action": "ec2:DisassociateRouteTable", "types": ["internet-gateway", "ipv4pool-ec2", "ipv6pool-ec2", "route-table", "subnet", "vpn-gateway"], "resources": []},
"ec2:DisassociateSecurityGroupVpc": {"action": "ec2:DisassociateSecurityGroupVpc", "types": ["security-group", "vpc"], "resources": []},
"ec2:DisassociateSubnetCidrBlock": {"action": "ec2:DisassociateSubnetCidrBlock", "types": ["subnet"], "resources": []},
"ec2:DisassociateTransitGatewayMulticastDomain": {"action": "ec2:DisassociateTransitGatewayMulticastDomain", "types": ["subnet", "transit-gateway-attachment", "transit-gateway-multicast-domain"], "resources": []},
"ec2:DisassociateTransitGatewayPolicyTable": {"action": "ec2:DisassociateTransitGatewayPolicyTable", "types": ["transit-gateway-attachment", "transit-gateway-policy-table"], "resources": []},
"ec2:DisassociateTransitGatewayRouteTable": {"action": "ec2:DisassociateTransitGatewayRouteTable", "types": ["transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:DisassociateTrunkInterface": {"action": "ec2:DisassociateTrunkInterface", "types": [], "resources": []},
"ec2:DisassociateVpcCidrBlock": {"action": "ec2:DisassociateVpcCidrBlock", "types": ["vpc"], "resources": []},
"ec2:EnableAddressTransfer": {"action": "ec2:EnableAddressTransfer", "types": ["elastic-ip"], "resources": []},
"ec2:EnableAllowedImagesSettings": {"action": "ec2:EnableAllowedImagesSettings", "types": [], "resources": []},
"ec2:EnableApplicationStatusCheckSuppression": {"action": "ec2:EnableApplicationStatusCheckSuppression", "types": ["instance"], "resources": []},
"ec2:EnableAwsNetworkPerformanceMetricSubscription": {"action": "ec2:EnableAwsNetworkPerformanceMetricSubscription", "types": [], "resources": []},
"ec2:EnableCapacityManager": {"action": "ec2:EnableCapacityManager", "types": [], "resources": []},
"ec2:EnableEbsEncryptionByDefault": {"action": "ec2:EnableEbsEncryptionByDefault", "types": [], "resources": []},
"ec2:EnableFastLaunch": {"action": "ec2:EnableFastLaunch", "types": ["image", "launch-template"], "resources": []},
"ec2:EnableFastSnapshotRestores": {"action": "ec2:EnableFastSnapshotRestores", "types": ["snapshot"], "resources": []},
"ec2:EnableImage": {"action": "ec2:EnableImage", "types": ["image"], "resources": []},
"ec2:EnableImageBlockPublicAccess": {"action": "ec2:EnableImageBlockPublicAccess", "types": [], "resources": []},
"ec2:EnableImageDeprecation": {"action": "ec2:EnableImageDeprecation", "types": ["image"], "resources": []},
"ec2:EnableImageDeregistrationProtection": {"action": "ec2:EnableImageDeregistrationProtection", "types": ["image"], "resources": []},
"ec2:EnableInstanceSqlHaStandbyDetections": {"action": "ec2:EnableInstanceSqlHaStandbyDetections", "types": ["instance"], "resources": []},
"ec2:EnableIpamInternetRegistryAssociation": {"action": "ec2:EnableIpamInternetRegistryAssociation", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:EnableIpamOrganizationAdminAccount": {"action": "ec2:EnableIpamOrganizationAdminAccount", "types": [], "resources": []},
"ec2:EnableIpamPolicy": {"action": "ec2:EnableIpamPolicy", "types": ["ipam-policy"], "resources": []},
"ec2:EnableReachabilityAnalyzerOrganizationSharing": {"action": "ec2:EnableReachabilityAnalyzerOrganizationSharing", "types": [], "resources": []},
"ec2:EnableRouteServerPropagation": {"action": "ec2:EnableRouteServerPropagation", "types": ["route-server", "route-table"], "resources": []},
"ec2:EnableSerialConsoleAccess": {"action": "ec2:EnableSerialConsoleAccess", "types": [], "resources": []},
"ec2:EnableSnapshotBlockPublicAccess": {"action": "ec2:EnableSnapshotBlockPublicAccess", "types": [], "resources": []},
"ec2:EnableTransitGatewayRouteTablePropagation": {"action": "ec2:EnableTransitGatewayRouteTablePropagation", "types": ["transit-gateway-attachment", "transit-gateway-route-table", "transit-gateway-route-table-announcement"], "resources": []},
"ec2:EnableVgwRoutePropagation": {"action": "ec2:EnableVgwRoutePropagation", "types": ["route-table", "vpn-gateway"], "resources": []},
"ec2:EnableVolumeIO": {"action": "ec2:EnableVolumeIO", "types": ["volume"], "resources": []},
"ec2:EnableVpcClassicLink": {"action": "ec2:EnableVpcClassicLink", "types": ["vpc"], "resources": []},
"ec2:EnableVpcClassicLinkDnsSupport": {"action": "ec2:EnableVpcClassicLinkDnsSupport", "types": ["vpc"], "resources": []},
"ec2:ExportClientVpnClientCertificateRevocationList": {"action": "ec2:ExportClientVpnClientCertificateRevocationList", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:ExportClientVpnClientConfiguration": {"action": "ec2:ExportClientVpnClientConfiguration", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:ExportImage": {"action": "ec2:ExportImage", "types": ["export-image-task", "image"], "resources": []},
"ec2:ExportTransitGatewayRoutes": {"action": "ec2:ExportTransitGatewayRoutes", "types": [], "resources": []},
"ec2:ExportVerifiedAccessInstanceClientConfiguration": {"action": "ec2:ExportVerifiedAccessInstanceClientConfiguration", "types": ["verified-access-instance"], "resources": []},
"ec2:GetActiveVpnTunnelStatus": {"action": "ec2:GetActiveVpnTunnelStatus", "types": ["vpn-connection"], "resources": []},
"ec2:GetAllowedImagesSettings": {"action": "ec2:GetAllowedImagesSettings", "types": [], "resources": []},
"ec2:GetAssociatedEnclaveCertificateIamRoles": {"action": "ec2:GetAssociatedEnclaveCertificateIamRoles", "types": ["certificate"], "resources": []},
"ec2:GetAssociatedIpv6PoolCidrs": {"action": "ec2:GetAssociatedIpv6PoolCidrs", "types": ["ipv6pool-ec2"], "resources": []},
"ec2:GetAwsNetworkPerformanceData": {"action": "ec2:GetAwsNetworkPerformanceData", "types": [], "resources": []},
"ec2:GetCapacityManagerAttributes": {"action": "ec2:GetCapacityManagerAttributes", "types": [], "resources": []},
"ec2:GetCapacityManagerMetricData": {"action": "ec2:GetCapacityManagerMetricData", "types": [], "resources": []},
"ec2:GetCapacityManagerMetricDimensions": {"action": "ec2:GetCapacityManagerMetricDimensions", "types": [], "resources": []},
"ec2:GetCapacityManagerMonitoredTagKeys": {"action": "ec2:GetCapacityManagerMonitoredTagKeys", "types": [], "resources": []},
"ec2:GetCapacityManagerSupportabilityScores": {"action": "ec2:GetCapacityManagerSupportabilityScores", "types": [], "resources": []},
"ec2:GetCapacityReservationUsage": {"action": "ec2:GetCapacityReservationUsage", "types": ["capacity-reservation"], "resources": []},
"ec2:GetClientVpnEndpointAuthorizationPolicy": {"action": "ec2:GetClientVpnEndpointAuthorizationPolicy", "types": [], "resources": []},
"ec2:GetCoipPoolUsage": {"action": "ec2:GetCoipPoolUsage", "types": ["coip-pool"], "resources": []},
"ec2:GetConsoleOutput": {"action": "ec2:GetConsoleOutput", "types": ["instance"], "resources": []},
"ec2:GetConsoleScreenshot": {"action": "ec2:GetConsoleScreenshot", "types": ["instance"], "resources": []},
"ec2:GetDeclarativePoliciesReportSummary": {"action": "ec2:GetDeclarativePoliciesReportSummary", "types": ["declarative-policies-report"], "resources": []},
"ec2:GetDefaultCreditSpecification": {"action": "ec2:GetDefaultCreditSpecification", "types": [], "resources": []},
"ec2:GetEbsDefaultKmsKeyId": {"action": "ec2:GetEbsDefaultKmsKeyId", "types": [], "resources": []},
"ec2:GetEbsEncryptionByDefault": {"action": "ec2:GetEbsEncryptionByDefault", "types": [], "resources": []},
"ec2:GetEnabledIpamPolicy": {"action": "ec2:GetEnabledIpamPolicy", "types": [], "resources": []},
"ec2:GetFlowLogsIntegrationTemplate": {"action": "ec2:GetFlowLogsIntegrationTemplate", "types": ["vpc-flow-log"], "resources": []},
"ec2:GetGroupsForCapacityReservation": {"action": "ec2:GetGroupsForCapacityReservation", "types": ["capacity-reservation"], "resources": []},
"ec2:GetHostReservationPurchasePreview": {"action": "ec2:GetHostReservationPurchasePreview", "types": [], "resources": []},
"ec2:GetImageAncestry": {"action": "ec2:GetImageAncestry", "types": ["image"], "resources": []},
"ec2:GetImageBlockPublicAccessState": {"action": "ec2:GetImageBlockPublicAccessState", "types": [], "resources": []},
"ec2:GetImageFindings": {"action": "ec2:GetImageFindings", "types": [], "resources": []},
"ec2:GetInstanceMetadataDefaults": {"action": "ec2:GetInstanceMetadataDefaults", "types": [], "resources": []},
"ec2:GetInstanceTpmEkPub": {"action": "ec2:GetInstanceTpmEkPub", "types": ["instance"], "resources": []},
"ec2:GetInstanceTypesFromInstanceRequirements": {"action": "ec2:GetInstanceTypesFromInstanceRequirements", "types": [], "resources": []},
"ec2:GetInstanceUefiData": {"action": "ec2:GetInstanceUefiData", "types": ["instance"], "resources": []},
"ec2:GetIpamAddressHistory": {"action": "ec2:GetIpamAddressHistory", "types": ["ipam-scope"], "resources": []},
"ec2:GetIpamDiscoveredAccounts": {"action": "ec2:GetIpamDiscoveredAccounts", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:GetIpamDiscoveredPublicAddresses": {"action": "ec2:GetIpamDiscoveredPublicAddresses", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:GetIpamDiscoveredResourceCidrs": {"action": "ec2:GetIpamDiscoveredResourceCidrs", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:GetIpamDiscoveredRoutes": {"action": "ec2:GetIpamDiscoveredRoutes", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:GetIpamInternetRegistryAssociationAsns": {"action": "ec2:GetIpamInternetRegistryAssociationAsns", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:GetIpamInternetRegistryAssociationCidrs": {"action": "ec2:GetIpamInternetRegistryAssociationCidrs", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:GetIpamPolicyAllocationRules": {"action": "ec2:GetIpamPolicyAllocationRules", "types": ["ipam-policy"], "resources": []},
"ec2:GetIpamPolicyOrganizationTargets": {"action": "ec2:GetIpamPolicyOrganizationTargets", "types": ["ipam-policy"], "resources": []},
"ec2:GetIpamPoolAllocations": {"action": "ec2:GetIpamPoolAllocations", "types": ["ipam-pool"], "resources": []},
"ec2:GetIpamPoolCidrs": {"action": "ec2:GetIpamPoolCidrs", "types": ["ipam-pool"], "resources": []},
"ec2:GetIpamPrefixListResolverRules": {"action": "ec2:GetIpamPrefixListResolverRules", "types": ["ipam-prefix-list-resolver"], "resources": []},
"ec2:GetIpamPrefixListResolverVersionEntries": {"action": "ec2:GetIpamPrefixListResolverVersionEntries", "types": ["ipam-prefix-list-resolver"], "resources": []},
"ec2:GetIpamPrefixListResolverVersions": {"action": "ec2:GetIpamPrefixListResolverVersions", "types": ["ipam-prefix-list-resolver"], "resources": []},
"ec2:GetIpamResourceCidrs": {"action": "ec2:GetIpamResourceCidrs", "types": ["ipam-pool", "ipam-scope"], "resources": []},
"ec2:GetIpamRouteOriginAuthorizations": {"action": "ec2:GetIpamRouteOriginAuthorizations", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:GetIpamRouteProtectionFindings": {"action": "ec2:GetIpamRouteProtectionFindings", "types": ["ipam"], "resources": []},
"ec2:GetIpamRoutingPolicyRegistrationDeltas": {"action": "ec2:GetIpamRoutingPolicyRegistrationDeltas", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:GetIpamRoutingPolicyRegistrations": {"action": "ec2:GetIpamRoutingPolicyRegistrations", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:GetLaunchTemplateData": {"action": "ec2:GetLaunchTemplateData", "types": ["instance"], "resources": []},
"ec2:GetManagedPrefixListAssociations": {"action": "ec2:GetManagedPrefixListAssociations", "types": ["prefix-list"], "resources": []},
"ec2:GetManagedPrefixListEntries": {"action": "ec2:GetManagedPrefixListEntries", "types": ["prefix-list"], "resources": []},
"ec2:GetManagedResourceVisibility": {"action": "ec2:GetManagedResourceVisibility", "types": [], "resources": []},
"ec2:GetNetworkInsightsAccessScopeAnalysisFindings": {"action": "ec2:GetNetworkInsightsAccessScopeAnalysisFindings", "types": ["network-insights-access-scope-analysis"], "resources": []},
"ec2:GetNetworkInsightsAccessScopeContent": {"action": "ec2:GetNetworkInsightsAccessScopeContent", "types": ["network-insights-access-scope"], "resources": []},
"ec2:GetPasswordData": {"action": "ec2:GetPasswordData", "types": ["instance"], "resources": []},
"ec2:GetReservedInstancesExchangeQuote": {"action": "ec2:GetReservedInstancesExchangeQuote", "types": ["reserved-instances"], "resources": []},
"ec2:GetRouteServerAssociations": {"action": "ec2:GetRouteServerAssociations", "types": ["route-server"], "resources": []},
"ec2:GetRouteServerPropagations": {"action": "ec2:GetRouteServerPropagations", "types": ["route-server", "route-table"], "resources": []},
"ec2:GetRouteServerRoutingDatabase": {"action": "ec2:GetRouteServerRoutingDatabase", "types": ["route-server"], "resources": []},
"ec2:GetSecurityGroupsForVpc": {"action": "ec2:GetSecurityGroupsForVpc", "types": ["vpc"], "resources": []},
"ec2:GetSerialConsoleAccessStatus": {"action": "ec2:GetSerialConsoleAccessStatus", "types": [], "resources": []},
"ec2:GetSnapshotBlockPublicAccessState": {"action": "ec2:GetSnapshotBlockPublicAccessState", "types": [], "resources": []},
"ec2:GetSpotPlacementScores": {"action": "ec2:GetSpotPlacementScores", "types": [], "resources": []},
"ec2:GetSubnetCidrReservations": {"action": "ec2:GetSubnetCidrReservations", "types": [], "resources": []},
"ec2:GetTransitGatewayAttachmentNatConfiguration": {"action": "ec2:GetTransitGatewayAttachmentNatConfiguration", "types": [], "resources": []},
"ec2:GetTransitGatewayAttachmentPropagations": {"action": "ec2:GetTransitGatewayAttachmentPropagations", "types": [], "resources": []},
"ec2:GetTransitGatewayMeteringPolicyEntries": {"action": "ec2:GetTransitGatewayMeteringPolicyEntries", "types": ["transit-gateway-metering-policy"], "resources": []},
"ec2:GetTransitGatewayMulticastDomainAssociations": {"action": "ec2:GetTransitGatewayMulticastDomainAssociations", "types": ["transit-gateway-multicast-domain"], "resources": []},
"ec2:GetTransitGatewayPolicyTableAssociations": {"action": "ec2:GetTransitGatewayPolicyTableAssociations", "types": ["transit-gateway-policy-table"], "resources": []},
"ec2:GetTransitGatewayPolicyTableEntries": {"action": "ec2:GetTransitGatewayPolicyTableEntries", "types": ["transit-gateway-policy-table"], "resources": []},
"ec2:GetTransitGatewayPrefixListReferences": {"action": "ec2:GetTransitGatewayPrefixListReferences", "types": [], "resources": []},
"ec2:GetTransitGatewayRouteTableAssociations": {"action": "ec2:GetTransitGatewayRouteTableAssociations", "types": [], "resources": []},
"ec2:GetTransitGatewayRouteTablePropagations": {"action": "ec2:GetTransitGatewayRouteTablePropagations", "types": [], "resources": []},
"ec2:GetVerifiedAccessEndpointPolicy": {"action": "ec2:GetVerifiedAccessEndpointPolicy", "types": ["verified-access-endpoint"], "resources": []},
"ec2:GetVerifiedAccessEndpointTargets": {"action": "ec2:GetVerifiedAccessEndpointTargets", "types": ["verified-access-endpoint"], "resources": []},
"ec2:GetVerifiedAccessGroupPolicy": {"action": "ec2:GetVerifiedAccessGroupPolicy", "types": ["verified-access-group"], "resources": []},
"ec2:GetVpcResourcesBlockingEncryptionEnforcement": {"action": "ec2:GetVpcResourcesBlockingEncryptionEnforcement", "types": ["vpc"], "resources": []},
"ec2:GetVpnConnectionDeviceSampleConfiguration": {"action": "ec2:GetVpnConnectionDeviceSampleConfiguration", "types": ["vpn-connection", "vpn-connection-device-type"], "resources": []},
"ec2:GetVpnConnectionDeviceTypes": {"action": "ec2:GetVpnConnectionDeviceTypes", "types": [], "resources": []},
"ec2:GetVpnTunnelReplacementStatus": {"action": "ec2:GetVpnTunnelReplacementStatus", "types": ["vpn-connection"], "resources": []},
"ec2:ImportClientVpnClientCertificateRevocationList": {"action": "ec2:ImportClientVpnClientCertificateRevocationList", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:ImportImage": {"action": "ec2:ImportImage", "types": ["image", "import-image-task", "snapshot"], "resources": []},
"ec2:ImportInstance": {"action": "ec2:ImportInstance", "types": ["instance", "security-group", "subnet", "volume"], "resources": []},
"ec2:ImportKeyPair": {"action": "ec2:ImportKeyPair", "types": ["key-pair"], "resources": []},
"ec2:ImportSnapshot": {"action": "ec2:ImportSnapshot", "types": ["import-snapshot-task", "snapshot"], "resources": []},
"ec2:ImportVolume": {"action": "ec2:ImportVolume", "types": ["volume"], "resources": []},
"ec2:ListImagesInRecycleBin": {"action": "ec2:ListImagesInRecycleBin", "types": [], "resources": []},
"ec2:ListSnapshotsInRecycleBin": {"action": "ec2:ListSnapshotsInRecycleBin", "types": [], "resources": []},
"ec2:ListVolumesInRecycleBin": {"action": "ec2:ListVolumesInRecycleBin", "types": [], "resources": []},
"ec2:LockSnapshot": {"action": "ec2:LockSnapshot", "types": ["snapshot"], "resources": []},
"ec2:ModifyAccountVpcEncryptionControl": {"action": "ec2:ModifyAccountVpcEncryptionControl", "types": [], "resources": []},
"ec2:ModifyAddressAttribute": {"action": "ec2:ModifyAddressAttribute", "types": ["elastic-ip"], "resources": []},
"ec2:ModifyApplicationStatusCheck": {"action": "ec2:ModifyApplicationStatusCheck", "types": ["application-status-check", "security-group", "subnet"], "resources": []},
"ec2:ModifyAvailabilityZoneGroup": {"action": "ec2:ModifyAvailabilityZoneGroup", "types": [], "resources": []},
"ec2:ModifyCapacityReservation": {"action": "ec2:ModifyCapacityReservation", "types": ["capacity-reservation"], "resources": []},
"ec2:ModifyCapacityReservationFleet": {"action": "ec2:ModifyCapacityReservationFleet", "types": ["capacity-reservation-fleet"], "resources": []},
"ec2:ModifyClientVpnEndpoint": {"action": "ec2:ModifyClientVpnEndpoint", "types": ["client-vpn-endpoint", "security-group", "transit-gateway", "vpc"], "resources": []},
"ec2:ModifyClientVpnEndpointAuthorizationPolicy": {"action": "ec2:ModifyClientVpnEndpointAuthorizationPolicy", "types": [], "resources": []},
"ec2:ModifyDefaultCreditSpecification": {"action": "ec2:ModifyDefaultCreditSpecification", "types": [], "resources": []},
"ec2:ModifyEbsDefaultKmsKeyId": {"action": "ec2:ModifyEbsDefaultKmsKeyId", "types": [], "resources": []},
"ec2:ModifyFleet": {"action": "ec2:ModifyFleet", "types": ["fleet", "image", "launch-template", "subnet"], "resources": []},
"ec2:ModifyFpgaImageAttribute": {"action": "ec2:ModifyFpgaImageAttribute", "types": ["fpga-image"], "resources": []},
"ec2:ModifyHosts": {"action": "ec2:ModifyHosts", "types": ["dedicated-host"], "resources": []},
"ec2:ModifyIdFormat": {"action": "ec2:ModifyIdFormat", "types": [], "resources": []},
"ec2:ModifyIdentityIdFormat": {"action": "ec2:ModifyIdentityIdFormat", "types": [], "resources": []},
"ec2:ModifyImageAttribute": {"action": "ec2:ModifyImageAttribute", "types": ["image"], "resources": []},
"ec2:ModifyInstanceAttribute": {"action": "ec2:ModifyInstanceAttribute", "types": ["instance", "security-group", "volume"], "resources": []},
"ec2:ModifyInstanceCapacityReservationAttributes": {"action": "ec2:ModifyInstanceCapacityReservationAttributes", "types": ["capacity-reservation", "instance"], "resources": []},
"ec2:ModifyInstanceConnectEndpoint": {"action": "ec2:ModifyInstanceConnectEndpoint", "types": ["instance-connect-endpoint", "security-group"], "resources": []},
"ec2:ModifyInstanceCpuOptions": {"action": "ec2:ModifyInstanceCpuOptions", "types": ["instance"], "resources": []},
"ec2:ModifyInstanceCreditSpecification": {"action": "ec2:ModifyInstanceCreditSpecification", "types": ["instance"], "resources": []},
"ec2:ModifyInstanceEventStartTime": {"action": "ec2:ModifyInstanceEventStartTime", "types": ["instance"], "resources": []},
"ec2:ModifyInstanceEventWindow": {"action": "ec2:ModifyInstanceEventWindow", "types": ["instance-event-window"], "resources": []},
"ec2:ModifyInstanceMaintenanceOptions": {"action": "ec2:ModifyInstanceMaintenanceOptions", "types": ["instance"], "resources": []},
"ec2:ModifyInstanceMetadataDefaults": {"action": "ec2:ModifyInstanceMetadataDefaults", "types": [], "resources": []},
"ec2:ModifyInstanceMetadataOptions": {"action": "ec2:ModifyInstanceMetadataOptions", "types": ["instance"], "resources": []},
"ec2:ModifyInstanceNetworkPerformanceOptions": {"action": "ec2:ModifyInstanceNetworkPerformanceOptions", "types": ["instance"], "resources": []},
"ec2:ModifyInstancePlacement": {"action": "ec2:ModifyInstancePlacement", "types": ["dedicated-host", "instance", "placement-group"], "resources": []},
"ec2:ModifyIpam": {"action": "ec2:ModifyIpam", "types": ["ipam"], "resources": []},
"ec2:ModifyIpamPolicyAllocationRules": {"action": "ec2:ModifyIpamPolicyAllocationRules", "types": ["ipam-policy", "ipam-pool"], "resources": []},
"ec2:ModifyIpamPool": {"action": "ec2:ModifyIpamPool", "types": ["ipam-pool"], "resources": []},
"ec2:ModifyIpamPoolAllocation": {"action": "ec2:ModifyIpamPoolAllocation", "types": ["ipam-pool-allocation"], "resources": []},
"ec2:ModifyIpamPrefixListResolver": {"action": "ec2:ModifyIpamPrefixListResolver", "types": ["ipam-prefix-list-resolver", "ipam-scope"], "resources": []},
"ec2:ModifyIpamPrefixListResolverTarget": {"action": "ec2:ModifyIpamPrefixListResolverTarget", "types": ["ipam-prefix-list-resolver-target"], "resources": []},
"ec2:ModifyIpamResourceCidr": {"action": "ec2:ModifyIpamResourceCidr", "types": ["ipam-scope"], "resources": []},
"ec2:ModifyIpamResourceDiscovery": {"action": "ec2:ModifyIpamResourceDiscovery", "types": ["ipam-resource-discovery"], "resources": []},
"ec2:ModifyIpamRoutingPolicyRegistration": {"action": "ec2:ModifyIpamRoutingPolicyRegistration", "types": ["ipam-internet-registry-association"], "resources": []},
"ec2:ModifyIpamScope": {"action": "ec2:ModifyIpamScope", "types": ["ipam-scope"], "resources": []},
"ec2:ModifyLaunchTemplate": {"action": "ec2:ModifyLaunchTemplate", "types": ["launch-template"], "resources": []},
"ec2:ModifyLocalGatewayRoute": {"action": "ec2:ModifyLocalGatewayRoute", "types": ["local-gateway-route-table", "local-gateway-virtual-interface-group", "network-interface", "prefix-list"], "resources": []},
"ec2:ModifyManagedPrefixList": {"action": "ec2:ModifyManagedPrefixList", "types": ["prefix-list"], "resources": []},
"ec2:ModifyManagedResourceVisibility": {"action": "ec2:ModifyManagedResourceVisibility", "types": [], "resources": []},
"ec2:ModifyNetworkInterfaceAttribute": {"action": "ec2:ModifyNetworkInterfaceAttribute", "types": ["instance", "network-interface", "security-group", "subnet"], "resources": []},
"ec2:ModifyPrivateDnsNameOptions": {"action": "ec2:ModifyPrivateDnsNameOptions", "types": ["instance"], "resources": []},
"ec2:ModifyPublicIpDnsNameOptions": {"action": "ec2:ModifyPublicIpDnsNameOptions", "types": ["network-interface"], "resources": []},
"ec2:ModifyReservedInstances": {"action": "ec2:ModifyReservedInstances", "types": ["reserved-instances"], "resources": []},
"ec2:ModifyRouteServer": {"action": "ec2:ModifyRouteServer", "types": ["route-server"], "resources": []},
"ec2:ModifySecurityGroupRules": {"action": "ec2:ModifySecurityGroupRules", "types": ["prefix-list", "security-group", "security-group-rule"], "resources": []},
"ec2:ModifySnapshotAttribute": {"action": "ec2:ModifySnapshotAttribute", "types": ["snapshot"], "resources": []},
"ec2:ModifySnapshotTier": {"action": "ec2:ModifySnapshotTier", "types": ["snapshot"], "resources": []},
"ec2:ModifySpotFleetRequest": {"action": "ec2:ModifySpotFleetRequest", "types": ["launch-template", "spot-fleet-request", "subnet"], "resources": []},
"ec2:ModifySubnetAttribute": {"action": "ec2:ModifySubnetAttribute", "types": ["subnet"], "resources": []},
"ec2:ModifyTrafficMirrorFilterNetworkServices": {"action": "ec2:ModifyTrafficMirrorFilterNetworkServices", "types": ["traffic-mirror-filter"], "resources": []},
"ec2:ModifyTrafficMirrorFilterRule": {"action": "ec2:ModifyTrafficMirrorFilterRule", "types": ["traffic-mirror-filter", "traffic-mirror-filter-rule"], "resources": []},
"ec2:ModifyTrafficMirrorSession": {"action": "ec2:ModifyTrafficMirrorSession", "types": ["traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target"], "resources": []},
"ec2:ModifyTransitGateway": {"action": "ec2:ModifyTransitGateway", "types": ["transit-gateway", "transit-gateway-route-table"], "resources": []},
"ec2:ModifyTransitGatewayAttachmentNatConfiguration": {"action": "ec2:ModifyTransitGatewayAttachmentNatConfiguration", "types": [], "resources": []},
"ec2:ModifyTransitGatewayMeteringPolicy": {"action": "ec2:ModifyTransitGatewayMeteringPolicy", "types": ["transit-gateway-attachment", "transit-gateway-metering-policy"], "resources": []},
"ec2:ModifyTransitGatewayPolicyTableEntry": {"action": "ec2:ModifyTransitGatewayPolicyTableEntry", "types": ["transit-gateway-policy-table", "transit-gateway-route-table"], "resources": []},
"ec2:ModifyTransitGatewayPrefixListReference": {"action": "ec2:ModifyTransitGatewayPrefixListReference", "types": ["prefix-list", "transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:ModifyTransitGatewayVpcAttachment": {"action": "ec2:ModifyTransitGatewayVpcAttachment", "types": ["subnet", "transit-gateway-attachment"], "resources": []},
"ec2:ModifyVerifiedAccessEndpoint": {"action": "ec2:ModifyVerifiedAccessEndpoint", "types": ["subnet", "verified-access-endpoint", "verified-access-group"], "resources": []},
"ec2:ModifyVerifiedAccessEndpointPolicy": {"action": "ec2:ModifyVerifiedAccessEndpointPolicy", "types": ["verified-access-endpoint"], "resources": []},
"ec2:ModifyVerifiedAccessGroup": {"action": "ec2:ModifyVerifiedAccessGroup", "types": ["verified-access-group", "verified-access-instance"], "resources": []},
"ec2:ModifyVerifiedAccessGroupPolicy": {"action": "ec2:ModifyVerifiedAccessGroupPolicy", "types": ["verified-access-group"], "resources": []},
"ec2:ModifyVerifiedAccessInstance": {"action": "ec2:ModifyVerifiedAccessInstance", "types": ["verified-access-instance"], "resources": []},
"ec2:ModifyVerifiedAccessInstanceLoggingConfiguration": {"action": "ec2:ModifyVerifiedAccessInstanceLoggingConfiguration", "types": ["verified-access-instance"], "resources": []},
"ec2:ModifyVerifiedAccessTrustProvider": {"action": "ec2:ModifyVerifiedAccessTrustProvider", "types": ["verified-access-trust-provider"], "resources": []},
"ec2:ModifyVolume": {"action": "ec2:ModifyVolume", "types": ["volume"], "resources": []},
"ec2:ModifyVolumeAttribute": {"action": "ec2:ModifyVolumeAttribute", "types": ["volume"], "resources": []},
"ec2:ModifyVpcAttribute": {"action": "ec2:ModifyVpcAttribute", "types": ["vpc"], "resources": []},
"ec2:ModifyVpcBlockPublicAccessExclusion": {"action": "ec2:ModifyVpcBlockPublicAccessExclusion", "types": ["vpc-block-public-access-exclusion"], "resources": []},
"ec2:ModifyVpcBlockPublicAccessOptions": {"action": "ec2:ModifyVpcBlockPublicAccessOptions", "types": [], "resources": []},
"ec2:ModifyVpcEncryptionControl": {"action": "ec2:ModifyVpcEncryptionControl", "types": ["vpc-encryption-control"], "resources": []},
"ec2:ModifyVpcEndpoint": {"action": "ec2:ModifyVpcEndpoint", "types": ["route-table", "security-group", "subnet", "vpc-endpoint"], "resources": []},
"ec2:ModifyVpcEndpointConnectionNotification": {"action": "ec2:ModifyVpcEndpointConnectionNotification", "types": ["vpc-endpoint", "vpc-endpoint-service"], "resources": []},
"ec2:ModifyVpcEndpointPayerResponsibility": {"action": "ec2:ModifyVpcEndpointPayerResponsibility", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:ModifyVpcEndpointServiceConfiguration": {"action": "ec2:ModifyVpcEndpointServiceConfiguration", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:ModifyVpcEndpointServicePayerResponsibility": {"action": "ec2:ModifyVpcEndpointServicePayerResponsibility", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:ModifyVpcEndpointServicePermissions": {"action": "ec2:ModifyVpcEndpointServicePermissions", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:ModifyVpcPeeringConnectionOptions": {"action": "ec2:ModifyVpcPeeringConnectionOptions", "types": ["vpc-peering-connection"], "resources": []},
"ec2:ModifyVpcTenancy": {"action": "ec2:ModifyVpcTenancy", "types": ["vpc"], "resources": []},
"ec2:ModifyVpnConnection": {"action": "ec2:ModifyVpnConnection", "types": ["vpn-connection"], "resources": []},
"ec2:ModifyVpnConnectionOptions": {"action": "ec2:ModifyVpnConnectionOptions", "types": ["vpn-connection"], "resources": []},
"ec2:ModifyVpnTunnelCertificate": {"action": "ec2:ModifyVpnTunnelCertificate", "types": ["vpn-connection"], "resources": []},
"ec2:ModifyVpnTunnelOptions": {"action": "ec2:ModifyVpnTunnelOptions", "types": ["vpn-connection"], "resources": []},
"ec2:MonitorInstances": {"action": "ec2:MonitorInstances", "types": ["instance"], "resources": []},
"ec2:MoveAddressToVpc": {"action": "ec2:MoveAddressToVpc", "types": [], "resources": []},
"ec2:MoveByoipCidrToIpam": {"action": "ec2:MoveByoipCidrToIpam", "types": ["ipam-pool"], "resources": []},
"ec2:MoveCapacityReservationInstances": {"action": "ec2:MoveCapacityReservationInstances", "types": ["capacity-reservation"], "resources": []},
"ec2:ProvisionByoipCidr": {"action": "ec2:ProvisionByoipCidr", "types": [], "resources": []},
"ec2:ProvisionIpamByoasn": {"action": "ec2:ProvisionIpamByoasn", "types": ["ipam"], "resources": []},
"ec2:ProvisionIpamPoolCidr": {"action": "ec2:ProvisionIpamPoolCidr", "types": ["ipam-external-resource-verification-token", "ipam-pool"], "resources": []},
"ec2:ProvisionPublicIpv4PoolCidr": {"action": "ec2:ProvisionPublicIpv4PoolCidr", "types": ["ipam-pool", "ipv4pool-ec2"], "resources": []},
"ec2:PurchaseCapacityBlock": {"action": "ec2:PurchaseCapacityBlock", "types": ["capacity-reservation"], "resources": []},
"ec2:PurchaseCapacityBlockExtension": {"action": "ec2:PurchaseCapacityBlockExtension", "types": ["capacity-reservation"], "resources": []},
"ec2:PurchaseHostReservation": {"action": "ec2:PurchaseHostReservation", "types": ["dedicated-host"], "resources": []},
"ec2:PurchaseReservedInstancesOffering": {"action": "ec2:PurchaseReservedInstancesOffering", "types": [], "resources": []},
"ec2:PurchaseScheduledInstances": {"action": "ec2:PurchaseScheduledInstances", "types": [], "resources": []},
"ec2:RebootInstances": {"action": "ec2:RebootInstances", "types": ["instance"], "resources": []},
"ec2:RegisterImage": {"action": "ec2:RegisterImage", "types": ["image", "snapshot"], "resources": []},
"ec2:RegisterInstanceEventNotificationAttributes": {"action": "ec2:RegisterInstanceEventNotificationAttributes", "types": [], "resources": []},
"ec2:RegisterTransitGatewayMulticastGroupMembers": {"action": "ec2:RegisterTransitGatewayMulticastGroupMembers", "types": ["network-interface", "transit-gateway-multicast-domain"], "resources": []},
"ec2:RegisterTransitGatewayMulticastGroupSources": {"action": "ec2:RegisterTransitGatewayMulticastGroupSources", "types": ["network-interface", "transit-gateway-multicast-domain"], "resources": []},
"ec2:RejectCapacityReservationBillingOwnership": {"action": "ec2:RejectCapacityReservationBillingOwnership", "types": ["capacity-reservation"], "resources": []},
"ec2:RejectTransitGatewayClientVpnAttachment": {"action": "ec2:RejectTransitGatewayClientVpnAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:RejectTransitGatewayMulticastDomainAssociations": {"action": "ec2:RejectTransitGatewayMulticastDomainAssociations", "types": ["transit-gateway-attachment", "transit-gateway-multicast-domain"], "resources": []},
"ec2:RejectTransitGatewayPeeringAttachment": {"action": "ec2:RejectTransitGatewayPeeringAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:RejectTransitGatewayVpcAttachment": {"action": "ec2:RejectTransitGatewayVpcAttachment", "types": ["transit-gateway-attachment"], "resources": []},
"ec2:RejectVpcEndpointConnections": {"action": "ec2:RejectVpcEndpointConnections", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:RejectVpcPeeringConnection": {"action": "ec2:RejectVpcPeeringConnection", "types": ["vpc-peering-connection"], "resources": []},
"ec2:ReleaseAddress": {"action": "ec2:ReleaseAddress", "types": ["elastic-ip"], "resources": []},
"ec2:ReleaseHosts": {"action": "ec2:ReleaseHosts", "types": ["dedicated-host"], "resources": []},
"ec2:ReleaseIpamPoolAllocation": {"action": "ec2:ReleaseIpamPoolAllocation", "types": ["ipam-pool"], "resources": []},
"ec2:ReplaceIamInstanceProfileAssociation": {"action": "ec2:ReplaceIamInstanceProfileAssociation", "types": ["instance"], "resources": []},
"ec2:ReplaceImageCriteriaInAllowedImagesSettings": {"action": "ec2:ReplaceImageCriteriaInAllowedImagesSettings", "types": [], "resources": []},
"ec2:ReplaceImageInstanceTypeSpecification": {"action": "ec2:ReplaceImageInstanceTypeSpecification", "types": ["image"], "resources": []},
"ec2:ReplaceNetworkAclAssociation": {"action": "ec2:ReplaceNetworkAclAssociation", "types": ["network-acl", "subnet"], "resources": []},
"ec2:ReplaceNetworkAclEntry": {"action": "ec2:ReplaceNetworkAclEntry", "types": ["network-acl"], "resources": []},
"ec2:ReplaceRoute": {"action": "ec2:ReplaceRoute", "types": ["route-table"], "resources": []},
"ec2:ReplaceRouteTableAssociation": {"action": "ec2:ReplaceRouteTableAssociation", "types": ["internet-gateway", "ipv4pool-ec2", "ipv6pool-ec2", "route-table", "subnet", "vpn-gateway"], "resources": []},
"ec2:ReplaceTransitGatewayRoute": {"action": "ec2:ReplaceTransitGatewayRoute", "types": ["transit-gateway-attachment", "transit-gateway-route-table"], "resources": []},
"ec2:ReplaceVpnTunnel": {"action": "ec2:ReplaceVpnTunnel", "types": ["vpn-connection"], "resources": []},
"ec2:ReportInstanceStatus": {"action": "ec2:ReportInstanceStatus", "types": ["instance"], "resources": []},
"ec2:RequestSpotFleet": {"action": "ec2:RequestSpotFleet", "types": ["image", "key-pair", "launch-template", "placement-group", "security-group", "snapshot", "spot-fleet-request", "subnet"], "resources": []},
"ec2:RequestSpotInstances": {"action": "ec2:RequestSpotInstances", "types": ["image", "key-pair", "network-interface", "placement-group", "security-group", "snapshot", "spot-instances-request", "subnet"], "resources": []},
"ec2:ResetAddressAttribute": {"action": "ec2:ResetAddressAttribute", "types": ["elastic-ip"], "resources": []},
"ec2:ResetEbsDefaultKmsKeyId": {"action": "ec2:ResetEbsDefaultKmsKeyId", "types": [], "resources": []},
"ec2:ResetFpgaImageAttribute": {"action": "ec2:ResetFpgaImageAttribute", "types": ["fpga-image"], "resources": []},
"ec2:ResetImageAttribute": {"action": "ec2:ResetImageAttribute", "types": ["image"], "resources": []},
"ec2:ResetInstanceAttribute": {"action": "ec2:ResetInstanceAttribute", "types": ["instance"], "resources": []},
"ec2:ResetNetworkInterfaceAttribute": {"action": "ec2:ResetNetworkInterfaceAttribute", "types": ["network-interface"], "resources": []},
"ec2:ResetSnapshotAttribute": {"action": "ec2:ResetSnapshotAttribute", "types": ["snapshot"], "resources": []},
"ec2:RestoreAddressToClassic": {"action": "ec2:RestoreAddressToClassic", "types": [], "resources": []},
"ec2:RestoreImageFromRecycleBin": {"action": "ec2:RestoreImageFromRecycleBin", "types": ["image"], "resources": []},
"ec2:RestoreManagedPrefixListVersion": {"action": "ec2:RestoreManagedPrefixListVersion", "types": ["prefix-list"], "resources": []},
"ec2:RestoreSnapshotFromRecycleBin": {"action": "ec2:RestoreSnapshotFromRecycleBin", "types": ["snapshot"], "resources": []},
"ec2:RestoreSnapshotTier": {"action": "ec2:RestoreSnapshotTier", "types": ["snapshot"], "resources": []},
"ec2:RestoreVolumeFromRecycleBin": {"action": "ec2:RestoreVolumeFromRecycleBin", "types": ["volume"], "resources": []},
"ec2:RevokeClientVpnIngress": {"action": "ec2:RevokeClientVpnIngress", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:RevokeSecurityGroupEgress": {"action": "ec2:RevokeSecurityGroupEgress", "types": ["security-group"], "resources": []},
"ec2:RevokeSecurityGroupIngress": {"action": "ec2:RevokeSecurityGroupIngress", "types": ["security-group"], "resources": []},
"ec2:RunInstances": {"action": "ec2:RunInstances", "types": ["capacity-reservation", "elastic-gpu", "elastic-inference", "group", "image", "instance", "key-pair", "launch-template", "license-configuration", "network-interface", "placement-group", "secondary-interface", "secondary-subnet", "security-group", "snapshot", "spot-instances-request", "subnet", "volume"], "resources": []},
"ec2:RunScheduledInstances": {"action": "ec2:RunScheduledInstances", "types": [], "resources": []},
"ec2:SearchLocalGatewayRoutes": {"action": "ec2:SearchLocalGatewayRoutes", "types": ["local-gateway-route-table"], "resources": []},
"ec2:SearchTransitGatewayMulticastGroups": {"action": "ec2:SearchTransitGatewayMulticastGroups", "types": ["transit-gateway-multicast-domain"], "resources": []},
"ec2:SearchTransitGatewayRoutes": {"action": "ec2:SearchTransitGatewayRoutes", "types": ["transit-gateway-route-table"], "resources": []},
"ec2:SendDiagnosticInterrupt": {"action": "ec2:SendDiagnosticInterrupt", "types": ["instance"], "resources": []},
"ec2:StartDeclarativePoliciesReport": {"action": "ec2:StartDeclarativePoliciesReport", "types": [], "resources": []},
"ec2:StartInstances": {"action": "ec2:StartInstances", "types": ["group", "instance", "license-configuration"], "resources": []},
"ec2:StartNetworkInsightsAccessScopeAnalysis": {"action": "ec2:StartNetworkInsightsAccessScopeAnalysis", "types": ["network-insights-access-scope", "network-insights-access-scope-analysis"], "resources": []},
"ec2:StartNetworkInsightsAnalysis": {"action": "ec2:StartNetworkInsightsAnalysis", "types": ["network-insights-analysis", "network-insights-path"], "resources": []},
"ec2:StartVpcEndpointServicePrivateDnsVerification": {"action": "ec2:StartVpcEndpointServicePrivateDnsVerification", "types": ["vpc-endpoint-service"], "resources": []},
"ec2:StopInstances": {"action": "ec2:StopInstances", "types": ["instance"], "resources": []},
"ec2:TerminateClientVpnConnections": {"action": "ec2:TerminateClientVpnConnections", "types": ["client-vpn-endpoint"], "resources": []},
"ec2:TerminateInstances": {"action": "ec2:TerminateInstances", "types": ["instance"], "resources": []},
"ec2:UnassignIpv6Addresses": {"action": "ec2:UnassignIpv6Addresses", "types": ["network-interface"], "resources": []},
"ec2:UnassignPrivateIpAddresses": {"action": "ec2:UnassignPrivateIpAddresses", "types": ["network-interface"], "resources": []},
"ec2:UnassignPrivateNatGatewayAddress": {"action": "ec2:UnassignPrivateNatGatewayAddress", "types": ["natgateway"], "resources": []},
"ec2:UnlockSnapshot": {"action": "ec2:UnlockSnapshot", "types": ["snapshot"], "resources": []},
"ec2:UnmonitorInstances": {"action": "ec2:UnmonitorInstances", "types": ["instance"], "resources": []},
"ec2:UpdateCapacityManagerMonitoredTagKeys": {"action": "ec2:UpdateCapacityManagerMonitoredTagKeys", "types": [], "resources": []},
"ec2:UpdateCapacityManagerOrganizationsAccess": {"action": "ec2:UpdateCapacityManagerOrganizationsAccess", "types": [], "resources": []},
"ec2:UpdateInterruptibleCapacityReservationAllocation": {"action": "ec2:UpdateInterruptibleCapacityReservationAllocation", "types": ["capacity-reservation"], "resources": []},
"ec2:UpdateSecurityGroupRuleDescriptionsEgress": {"action": "ec2:UpdateSecurityGroupRuleDescriptionsEgress", "types": ["security-group"], "resources": []},
"ec2:UpdateSecurityGroupRuleDescriptionsIngress": {"action": "ec2:UpdateSecurityGroupRuleDescriptionsIngress", "types": ["security-group"], "resources": []},
"ec2:ValidateSecurityGroupQuotasForInterface": {"action": "ec2:ValidateSecurityGroupQuotasForInterface", "types": ["security-group"], "resources": []},
"ec2:WithdrawByoipCidr": {"action": "ec2:WithdrawByoipCidr", "types": [], "resources": []},
"ecr:BatchCheckLayerAvailability": {"action": "ecr:BatchCheckLayerAvailability", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]},
"ecr:BatchDeleteImage": {"action": "ecr:BatchDeleteImage", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]},
"ecr:BatchGetImage": {"action": "ecr:BatchGetImage", "types": ["repository"], "resources": [{"type": "repository", "fill": {"RepositoryName": "repositoryName"}, "account": "registryId"}]},
@@ -42,6 +42,29 @@ class RequestResourceMembersTest {
private static final ObjectMapper MAPPER = new ObjectMapper();
@Test
void generatedIdTargetsValidateTheirMemberWireNameAndDiscriminators() throws Exception {
ObjectMapper mapper = new ObjectMapper();
ObjectNode document = (ObjectNode) mapper.readTree("""
{"namespaces":{"ec2":["ec2"]},"arnFormats":{"ec2":{
"instance":"arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}",
"volume":"arn:${Partition}:ec2:${Region}:${Account}:volume/${VolumeId}"}},
"operations":{"ec2:Tag":{"types":["instance","volume"],"resources":[],
"targets":{"member":"Resources[]","query":"ResourceId","prefixes":{"instance":"i-"}}}}}
""");
assertEquals("ResourceId", parse(document.toString()).targets().get("ec2:Tag").query());
for (String invalid : List.of(
"{\"member\":\"Resources\",\"query\":\"ResourceId\",\"prefixes\":{\"instance\":\"i-\"}}",
"{\"member\":\"Resources[]\",\"query\":\"ResourceId.member\",\"prefixes\":{\"instance\":\"i-\"}}",
"{\"member\":\"Resources[]\",\"query\":\"ResourceId\",\"prefixes\":{\"unknown\":\"i-\"}}",
"{\"member\":\"Resources[]\",\"query\":\"ResourceId\",\"prefixes\":{\"instance\":\"\"}}",
"{\"member\":\"Resources[]\",\"query\":\"ResourceId\",\"prefixes\":{\"instance\":\"i-\",\"volume\":\"i-\"}}")) {
ObjectNode changed = document.deepCopy();
((ObjectNode) changed.path("operations").path("ec2:Tag")).set("targets", mapper.readTree(invalid));
assertThrows(IllegalStateException.class, () -> parse(changed.toString()), invalid);
}
}
@Test
void theTableReadsItsNamespacesAndGivesEachTypeItNamesAnArnFormat() {
RequestResourceMembers.Table table = RequestResourceMembers.table();
@@ -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";
@Test
void generatedIdTargetsReadModelListsAndSerializedQueryNamesInOrder() throws Exception {
String instance = "arn:aws:ec2:us-east-1:000000000000:instance/i-one";
for (String operation : List.of("ec2:CreateTags", "ec2:DeleteTags")) {
assertTrue(RequestResources.hasIndividualTargets(operation));
assertFalse(RequestResources.actsOnNoResource(operation));
assertEquals(List.of(instance, "*", instance), of(operation,
json("{\"Resources\":[\"i-one\",\"vpc-one\",\"i-one\"]}")));
assertEquals(List.of(instance, "*", instance), RequestResources.ofBody(operation,
new ObjectMapper().readTree("{\"Resources\":[\"i-one\",\"vpc-one\",\"i-one\"]}"),
"aws", "us-east-1", "000000000000", null));
assertEquals(List.of(), of(operation, json("{\"Resources\":\"i-one\"}")));
}
assertFalse(RequestResources.hasIndividualTargets("ec2:DescribeInstances"));
assertEquals(List.of(), RequestResources.ofBody("ec2:TerminateInstances",
new ObjectMapper().readTree("{\"InstanceIds\":[\"i-one\"]}"), "aws", "us-east-1",
"000000000000", null));
}
@Test
void listTablesCorrectionReadsTheCollectionAndLeavesOtherDynamoOperationsHandBuilt() {
assertTrue(RequestResources.reads("dynamodb:ListTables"));
@@ -1,10 +1,13 @@
package io.floci.aws.services.iam;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.floci.aws.core.common.AwsProtocolClaimFilter;
import io.floci.aws.core.common.AwsRegions;
import io.floci.aws.core.common.ProtocolClaim;
import io.floci.aws.core.common.RegionResolver;
import io.floci.aws.core.common.RequestContext;
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.eks.EksService;
@@ -33,6 +36,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
@@ -44,8 +48,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
class ResourceArnBuilderTest {
@@ -635,6 +642,100 @@ class ResourceArnBuilderTest {
backedBy("old", stored).buildResources("iam", ctx, "us-east-1", "000000000000"));
}
@Test
void missingGetRoleUsesItsNameButCannotAcceptAnInjectedPath() {
setFormBody("Action=GetRole&RoleName=local-storage&Path=/injected/");
assertEquals("arn:aws:iam::000000000000:role/local-storage",
builder.build("iam", ctx, "us-east-1", ACCOUNT));
assertEquals("arn:aws-us-gov:iam::000000000000:role/local-storage",
builder.build("iam", ctx, "us-gov-west-1", ACCOUNT));
}
@Test
void ec2TagsAuthorizeEachInstanceAndKeepUnmodelledResourcesVisible() {
setFormBody("Action=CreateTags&ResourceId.1=i-first&ResourceId.2=i-second&Tag.1.Key=Owner&Tag.1.Value=a");
assertEquals(List.of("arn:aws:ec2:us-east-1:000000000000:instance/i-first",
"arn:aws:ec2:us-east-1:000000000000:instance/i-second"),
builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
setFormBody("Action=DeleteTags&ResourceId.1=i-first&ResourceId.2=vol-second");
assertEquals(List.of("arn:aws-us-gov:ec2:us-gov-west-1:000000000000:instance/i-first", "*"),
builder.buildResources("ec2", "ec2:DeleteTags", ctx, "us-gov-west-1", ACCOUNT, "aws-us-gov"));
assertEquals(List.of("*"), builder.buildResources("ec2", "ec2:DescribeInstances", ctx,
"us-east-1", ACCOUNT, "aws"));
}
@Test
void instanceTagTargetsUseHandlerOrderFirstDuplicatesAndStopAtTheFirstGap() {
queryParams.add("ResourceId.1", "i-query-decoy");
setFormBody("Action=CreateTags&ResourceId.1=i-first&ResourceId.1=i-duplicate"
+ "&ResourceId.2=i-second&ResourceId.4=i-gap");
assertEquals(List.of("arn:aws-cn:ec2:cn-north-1:111122223333:instance/i-first",
"arn:aws-cn:ec2:cn-north-1:111122223333:instance/i-second"),
builder.buildResources("ec2", "ec2:CreateTags", ctx, "cn-north-1", "111122223333", "aws-cn"));
setFormBody("Action=CreateTags&ResourceId.2=i-not-dispatched");
assertEquals(List.of("*"),
builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
setFormBody("Action=CreateTags&ResourceId.1=i-first&ResourceId.2=i-first");
assertEquals(List.of("arn:aws:ec2:us-east-1:000000000000:instance/i-first",
"arn:aws:ec2:us-east-1:000000000000:instance/i-first"),
builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
}
@Test
void largeTagBatchReusesTheDecodedFormAndLeavesTheBodyForTheHandler() throws IOException {
StringBuilder form = new StringBuilder("Action=CreateTags");
List<String> expected = new ArrayList<>();
for (int i = 1; i <= 1000; i++) {
form.append("&ResourceId.").append(i).append("=i-").append(i);
expected.add("arn:aws:ec2:us-east-1:000000000000:instance/i-" + i);
}
form.append("&ResourceId.1000=i-decoy&ResourceId.1002=i-gap&Tag.1.Key=Owner&Tag.1.Value=team%2Ba");
setFormBody(form.toString());
queryParams.add("ResourceId.1", "i-query-decoy");
assertEquals(expected, builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
clearInvocations(ctx);
assertEquals(expected, builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
assertEquals(expected, builder.buildResources("ec2", "ec2:DeleteTags", ctx, "us-east-1", ACCOUNT, "aws"));
verify(ctx, never()).getEntityStream();
assertEquals(form.toString(), new String(ctx.getEntityStream().readAllBytes(), StandardCharsets.UTF_8));
}
@Test
void missingRoleOperationsUseTheModelRatherThanAnInjectedPath() {
queryParams.add("RoleName", "query-decoy");
setFormBody("Operation=GetRole&RoleName=first&RoleName=duplicate&Path=/injected/");
assertEquals("arn:aws:iam::111122223333:role/first",
builder.build("iam", ctx, "us-east-1", "111122223333"));
for (String action : List.of("DeleteRole", "ListRolePolicies", "TagRole", "UpdateRole")) {
setFormBody("Action=" + action + "&RoleName=first&Path=/injected/");
assertEquals("arn:aws:iam::" + ACCOUNT + ":role/first",
builder.build("iam", ctx, "us-east-1", ACCOUNT), action);
}
setFormBody("Action=GetRole");
assertEquals("*", builder.build("iam", ctx, "us-east-1", ACCOUNT));
}
@Test
void queryGetUsesTheSameMissingRoleAndInstanceResources() {
when(ctx.getMethod()).thenReturn("GET");
contextProperties.put(AwsProtocolClaimFilter.CLAIM_PROPERTY,
new ProtocolClaim(WireProtocol.AWS_QUERY, null, null, null));
queryParams.add("Action", "GetRole");
queryParams.add("RoleName", "first");
queryParams.add("RoleName", "duplicate");
queryParams.add("Path", "/injected/");
assertEquals("arn:aws:iam::000000000000:role/first", builder.build("iam", ctx, "us-east-1", ACCOUNT));
queryParams.clear();
queryParams.add("Action", "CreateTags");
queryParams.add("ResourceId.1", "i-first");
queryParams.add("ResourceId.1", "i-duplicate");
queryParams.add("ResourceId.2", "i-second");
assertEquals(List.of("arn:aws:ec2:us-east-1:000000000000:instance/i-first",
"arn:aws:ec2:us-east-1:000000000000:instance/i-second"),
builder.buildResources("ec2", "ec2:CreateTags", ctx, "us-east-1", ACCOUNT, "aws"));
}
/**
* Nothing stored under that name means nothing to name: the operation fails as NoSuchEntity
* regardless, and minting an ARN for an absent resource would hand a policy something to match.
@@ -0,0 +1,295 @@
package io.floci.aws.services.iam;
import io.floci.aws.testing.AwsTestClients;
import io.floci.aws.testing.EnforcementFixtures;
import io.floci.aws.testing.EnforcementFixtures.UserCredentials;
import io.floci.aws.testing.IamEnforcementProfile;
import io.floci.aws.testing.PartitionCleanup;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.quarkus.test.junit.TestProfile;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.ec2.Ec2Client;
import software.amazon.awssdk.services.ec2.model.Ec2Exception;
import software.amazon.awssdk.services.ec2.model.Tag;
import software.amazon.awssdk.services.iam.IamClient;
import software.amazon.awssdk.services.iam.model.NoSuchEntityException;
import java.net.URI;
import java.util.List;
import java.util.UUID;
import static io.floci.aws.testing.EnforcementFixtures.auth;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@QuarkusTest
@TestProfile(IamEnforcementProfile.class)
class ResourceResolutionEnforcementIntegrationTest {
private static final String ACCOUNT = "111111111111";
private static final String TRUST = """
{"Version":"2012-10-17","Statement":[{"Effect":"Allow",
"Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}""";
@TestHTTPResource("/")
URI baseUri;
@RegisterExtension
final PartitionCleanup cleanup = new PartitionCleanup();
@Test
void scopedGetRoleCanProbeAnAbsentNameAndThenReadTheCreatedRole() {
String name = "resource-probe-" + suffix();
String arn = "arn:aws:iam::" + ACCOUNT + ":role/" + name;
UserCredentials keys = user("""
{"Version":"2012-10-17","Statement":[{"Effect":"Allow",
"Action":["iam:GetRole","iam:CreateRole"],"Resource":"%s"}]}""".formatted(arn));
try (IamClient caller = AwsTestClients.create(IamClient.builder(), keys.accessKeyId(), keys.secretAccessKey(),
Region.US_EAST_1)) {
NoSuchEntityException missing = assertThrows(NoSuchEntityException.class,
() -> caller.getRole(r -> r.roleName(name)));
assertEquals(404, missing.statusCode());
denied(() -> caller.getRole(r -> r.roleName(name + "-other")));
caller.createRole(r -> r.roleName(name).assumeRolePolicyDocument(TRUST));
cleanup.register(() -> EnforcementFixtures.removeRole(baseUri.getPort(), auth(ACCOUNT, "iam"), name));
assertEquals(arn, caller.getRole(r -> r.roleName(name)).role().arn());
}
}
@Test
void scopedRoleActionsWithoutAPathReachMissingEntityAndRespectExplicitDenies() {
String name = "resource-absent-" + suffix();
String arn = "arn:aws:iam::" + ACCOUNT + ":role/" + name;
UserCredentials keys = user("""
{"Version":"2012-10-17","Statement":[{"Effect":"Allow",
"Action":["iam:DeleteRole","iam:ListRolePolicies"],"Resource":"%s"}]}""".formatted(arn));
try (IamClient caller = AwsTestClients.create(IamClient.builder(), keys.accessKeyId(), keys.secretAccessKey(),
Region.US_EAST_1)) {
assertThrows(NoSuchEntityException.class, () -> caller.deleteRole(r -> r.roleName(name)));
assertThrows(NoSuchEntityException.class, () -> caller.listRolePolicies(r -> r.roleName(name)));
denied(() -> caller.deleteRole(r -> r.roleName(name + "-other")));
}
UserCredentials blocked = user("""
{"Version":"2012-10-17","Statement":[
{"Effect":"Allow","Action":"iam:DeleteRole","Resource":"*"},
{"Effect":"Deny","Action":"iam:DeleteRole","Resource":"%s"}]}""".formatted(arn));
try (IamClient caller = AwsTestClients.create(IamClient.builder(), blocked.accessKeyId(), blocked.secretAccessKey(),
Region.US_EAST_1)) {
denied(() -> caller.deleteRole(r -> r.roleName(name)));
}
}
@Test
void storedRolePathAndAnExplicitDenyStillApply() {
String name = "resource-path-" + suffix();
String rootArn = "arn:aws:iam::" + ACCOUNT + ":role/" + name;
try (IamClient admin = AwsTestClients.create(IamClient.builder(), ACCOUNT, Region.US_EAST_1)) {
String actual = admin.createRole(r -> r.roleName(name).path("/team/")
.assumeRolePolicyDocument(TRUST)).role().arn();
cleanup.register(() -> EnforcementFixtures.removeRole(baseUri.getPort(), auth(ACCOUNT, "iam"), name));
UserCredentials keys = user("""
{"Version":"2012-10-17","Statement":[
{"Effect":"Allow","Action":"iam:GetRole","Resource":["%s","%s-absent"]}]}"""
.formatted(rootArn, rootArn));
try (IamClient caller = AwsTestClients.create(IamClient.builder(), keys.accessKeyId(), keys.secretAccessKey(),
Region.US_EAST_1)) {
denied(() -> caller.getRole(r -> r.roleName(name)));
}
UserCredentials denied = user("""
{"Version":"2012-10-17","Statement":[
{"Effect":"Allow","Action":"iam:GetRole","Resource":"*"},
{"Effect":"Deny","Action":"iam:GetRole","Resource":["%s","%s-absent"]}]}"""
.formatted(actual, rootArn));
try (IamClient caller = AwsTestClients.create(IamClient.builder(), denied.accessKeyId(), denied.secretAccessKey(),
Region.US_EAST_1)) {
denied(() -> caller.getRole(r -> r.roleName(name)));
denied(() -> caller.getRole(r -> r.roleName(name + "-absent")));
}
}
}
@Test
void scopedInstanceTaggingRejectsAnUnauthorizedLaterTargetBeforeChangingAnyTags() {
try (Ec2Client admin = ec2Admin()) {
String first = instance(admin);
String second = instance(admin);
UserCredentials keys = user(policy(allow(instanceArn(first), null)));
try (Ec2Client caller = ec2Caller(keys)) {
caller.createTags(r -> r.resources(first).tags(tag("Owner", "first")));
denied(() -> caller.createTags(r -> r.resources(first, second).tags(tag("Owner", "changed"))));
assertTags(admin, first, List.of(tag("Owner", "first")));
assertTags(admin, second, List.of());
admin.createTags(r -> r.resources(second).tags(tag("Owner", "second")));
denied(() -> caller.deleteTags(r -> r.resources(first, second).tags(tag("Owner", null))));
assertTags(admin, first, List.of(tag("Owner", "first")));
assertTags(admin, second, List.of(tag("Owner", "second")));
caller.deleteTags(r -> r.resources(first).tags(tag("Owner", null)));
assertTags(admin, first, List.of());
}
}
}
@Test
void explicitDenyOnTheSecondInstanceIsNotLostBehindAWildcardAllow() {
try (Ec2Client admin = ec2Admin()) {
String first = instance(admin);
String second = instance(admin);
UserCredentials keys = user(policy(allow("*", null) + "," + """
{"Effect":"Deny","Action":["ec2:CreateTags","ec2:DeleteTags"],"Resource":"%s"}
""".formatted(instanceArn(second))));
try (Ec2Client caller = ec2Caller(keys)) {
denied(() -> caller.createTags(r -> r.resources(first, second).tags(tag("Owner", "x"))));
assertTags(admin, first, List.of());
assertTags(admin, second, List.of());
admin.createTags(r -> r.resources(first, second).tags(tag("Owner", "x")));
denied(() -> caller.deleteTags(r -> r.resources(first, second).tags(tag("Owner", null))));
assertTags(admin, first, List.of(tag("Owner", "x")));
assertTags(admin, second, List.of(tag("Owner", "x")));
}
}
}
@Test
void eachInstanceIsEvaluatedWithItsOwnStoredTags() {
try (Ec2Client admin = ec2Admin()) {
String first = instance(admin);
String second = instance(admin);
admin.createTags(r -> r.resources(first).tags(tag("Owner", "first")));
admin.createTags(r -> r.resources(second).tags(tag("Owner", "second")));
UserCredentials keys = user(policy(allow(instanceArn(first), "first") + ","
+ allow(instanceArn(second), "second")));
try (Ec2Client caller = ec2Caller(keys)) {
caller.createTags(r -> r.resources(first, second).tags(tag("Extra", "ok")));
caller.deleteTags(r -> r.resources(first, second).tags(tag("Extra", null)));
assertTags(admin, first, List.of(tag("Owner", "first")));
assertTags(admin, second, List.of(tag("Owner", "second")));
admin.createTags(r -> r.resources(second).tags(tag("Owner", "first")));
denied(() -> caller.createTags(r -> r.resources(first, second).tags(tag("Extra", "no"))));
assertTags(admin, first, List.of(tag("Owner", "first")));
assertTags(admin, second, List.of(tag("Owner", "first")));
}
}
}
@Test
void anUnmodelledResourceAfterAnInstanceStillRequiresPermission() {
try (Ec2Client admin = ec2Admin()) {
String first = instance(admin);
String vpc = admin.createVpc(r -> r.cidrBlock("10.98.0.0/16")).vpc().vpcId();
cleanup.register(() -> {
try (Ec2Client client = ec2Admin()) {
client.deleteVpc(r -> r.vpcId(vpc));
}
});
UserCredentials keys = user(policy(allow(instanceArn(first), null)));
try (Ec2Client caller = ec2Caller(keys)) {
denied(() -> caller.createTags(r -> r.resources(first, vpc).tags(tag("Owner", "x"))));
assertTags(admin, first, List.of());
assertEquals(List.of(), admin.describeVpcs(r -> r.vpcIds(vpc)).vpcs().getFirst().tags());
}
}
}
@ParameterizedTest
@CsvSource({"false,false", "false,true", "true,false", "true,true"})
void wildcardTagTargetsKeepEveryTargetContext(boolean explicitDeny, boolean wildcardFirst) {
try (Ec2Client admin = ec2Admin()) {
String instance = instance(admin);
String vpc = admin.createVpc(r -> r.cidrBlock("10.97.0.0/16")).vpc().vpcId();
cleanup.register(() -> {
try (Ec2Client client = ec2Admin()) {
client.deleteVpc(r -> r.vpcId(vpc));
}
});
admin.createTags(r -> r.resources(instance).tags(tag("Owner", "instance")));
admin.createTags(r -> r.resources(vpc).tags(tag("Owner", "vpc")));
admin.createTags(r -> r.resources(instance, vpc).tags(tag("Extra", "original")));
String statements = explicitDeny ? allow("*", null) + "," + """
{"Effect":"Deny","Action":["ec2:CreateTags","ec2:DeleteTags"],"NotResource":"%s",
"Condition":{"StringEquals":{"aws:ResourceTag/Owner":"instance"}}}
""".formatted(instanceArn(instance))
: allow(instanceArn(instance), null) + "," + allow("*", "vpc");
List<String> targets = wildcardFirst ? List.of(vpc, instance) : List.of(instance, vpc);
try (Ec2Client caller = ec2Caller(user(policy(statements)))) {
denied(() -> caller.createTags(r -> r.resources(targets).tags(tag("Extra", "changed"))));
denied(() -> caller.deleteTags(r -> r.resources(targets).tags(tag("Extra", null))));
assertTrue(admin.describeInstances(r -> r.instanceIds(instance)).reservations().getFirst()
.instances().getFirst().tags().contains(tag("Extra", "original")));
assertTrue(admin.describeVpcs(r -> r.vpcIds(vpc)).vpcs().getFirst().tags()
.contains(tag("Extra", "original")));
// Once every context satisfies the wildcard policy, the same batch can proceed.
admin.createTags(r -> r.resources(instance).tags(tag("Owner", "vpc")));
caller.createTags(r -> r.resources(targets).tags(tag("Extra", "changed")));
caller.deleteTags(r -> r.resources(targets).tags(tag("Extra", null)));
assertTags(admin, instance, List.of(tag("Owner", "vpc")));
assertEquals(List.of(tag("Owner", "vpc")), admin.describeVpcs(r -> r.vpcIds(vpc)).vpcs().getFirst().tags());
}
}
}
private UserCredentials user(String policy) {
String name = "resource-reader-" + suffix();
UserCredentials keys = EnforcementFixtures.createUser(cleanup, baseUri.getPort(), auth(ACCOUNT, "iam"), name);
EnforcementFixtures.putUserPolicy(baseUri.getPort(), auth(ACCOUNT, "iam"), name, "resources", policy);
return keys;
}
private String instance(Ec2Client admin) {
String id = admin.runInstances(r -> r.imageId("ami-0abcdef1234567890").instanceType("t3.micro")
.minCount(1).maxCount(1)).instances().getFirst().instanceId();
cleanup.register(() -> {
try (Ec2Client client = ec2Admin()) {
client.terminateInstances(r -> r.instanceIds(id));
}
});
return id;
}
private static String allow(String resource, String owner) {
String condition = owner == null ? "" : ",\"Condition\":{\"StringEquals\":{\"aws:ResourceTag/Owner\":\"" + owner + "\"}}";
return """
{"Effect":"Allow","Action":["ec2:CreateTags","ec2:DeleteTags"],"Resource":"%s"%s}
""".formatted(resource, condition);
}
private static String policy(String statements) {
return "{\"Version\":\"2012-10-17\",\"Statement\":[" + statements + "]}";
}
private static String instanceArn(String id) {
return "arn:aws:ec2:us-east-1:" + ACCOUNT + ":instance/" + id;
}
private static Ec2Client ec2Admin() {
return AwsTestClients.create(Ec2Client.builder(), ACCOUNT, Region.US_EAST_1);
}
private static Ec2Client ec2Caller(UserCredentials keys) {
return AwsTestClients.create(Ec2Client.builder(), keys.accessKeyId(), keys.secretAccessKey(), Region.US_EAST_1);
}
private static void assertTags(Ec2Client admin, String id, List<Tag> expected) {
assertEquals(expected, admin.describeInstances(r -> r.instanceIds(id))
.reservations().getFirst().instances().getFirst().tags());
}
private static void denied(Runnable call) {
AwsServiceException error = assertThrows(AwsServiceException.class, call::run);
assertEquals(403, error.statusCode());
assertEquals(error instanceof Ec2Exception ? "UnauthorizedOperation" : "AccessDenied",
error.awsErrorDetails().errorCode());
}
private static Tag tag(String key, String value) {
return Tag.builder().key(key).value(value).build();
}
private static String suffix() {
return UUID.randomUUID().toString().substring(0, 8);
}
}
+68 -3
View File
@@ -76,6 +76,11 @@ follow the rule unchanged: a family of a hand-built namespace whose requests nam
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;
`RequestResourceNamespacesIntegrationTest` fails for a served namespace in none of the three.
`ID_TARGETS` stages heterogeneous id-list namespaces separately: botocore supplies the list member
and its serialized EC2 Query name (including queryName and capitalization), and documented id
prefixes distinguish the supported resource types. 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
@@ -159,7 +164,7 @@ OUTPUT = REPO_ROOT / "src/main/resources/aws/iam-request-resources.json"
# are the ones its handlers mint.
NAMESPACES = ("access-analyzer", "acm", "application-autoscaling", "athena", "bcm-data-exports",
"bcm-pricing-calculator", "budgets", "ce", "cloudtrail", "codebuild", "codepipeline", "cognito-identity",
"cognito-idp", "cur", "datasync", "ecr", "elasticloadbalancing", "elasticmapreduce", "es", "events",
"cognito-idp", "cur", "datasync", "ec2", "ecr", "elasticloadbalancing", "elasticmapreduce", "es", "events",
"firehose", "globalaccelerator", "kinesisanalytics", "payment-cryptography", "quicksight", "redshift",
"redshift-data", "rekognition", "servicediscovery", "servicequotas", "sso", "states", "textract",
"timestream-influxdb", "translate", "signer")
@@ -234,7 +239,6 @@ NOT_COVERED: dict[str, str] = {
"detective": _REST,
"dlm": _REST,
"dms": _LATER,
"ec2": _LATER,
"ec2-instance-connect": _LATER,
"ecs": _LATER,
"elasticache": _LATER,
@@ -666,6 +670,13 @@ THROUGH: dict[str, tuple[list[str], str]] = {
# The variables of an ARN format the account, partition and Region fill.
KNOWN_VARIABLES = {"Partition", "Region", "Account"}
# A staged read of heterogeneous resource-id lists. The model supplies the member and its wire name;
# the Service Reference supplies the action's types and their ARN formats. EC2 documents instance ids
# with the i- prefix (EC2 User Guide, resource-ids). Only instances are covered here: other ids retain
# a wildcard entry, and other EC2 requests retain their existing wildcard authorization until their
# ARN resolution and condition contexts have coverage. No operation names select this read.
ID_TARGETS = {"ec2": {"member": "Resources", "prefixes": {"instance": "i-"}}}
# An ARN format's account given as `${AccountId}`, the account `${Account}` gives in every other format.
ACCOUNT_ID_SLOT_RE = re.compile(r"^(arn:[^:]*:[^:]*:[^:]*:)\$\{AccountId}:")
VARIABLE_RE = re.compile(r"\$\{(\w+)}")
@@ -1121,10 +1132,46 @@ def names_type(member: str, kind_stem: str) -> bool:
# --------------------------------------------------------------------------- #
# The vendored document
# --------------------------------------------------------------------------- #
def id_targets(operation: str, types: list[str], formats: dict[str, str], models: dict[str, dict]) -> dict | None:
"""A heterogeneous id list, in model and EC2 Query spelling, with each supported type's discriminator."""
configured = ID_TARGETS.get(namespace_of(operation))
if configured is None:
return None
found = None
for model in models.values():
spec = model["operations"].get(operation.split(":", 1)[1], {})
if "input" not in spec or "ec2" not in _protocols(model):
continue
member = model["shapes"][spec["input"]["shape"]].get("members", {}).get(configured["member"])
if member is None or _strings(model, model["shapes"][member["shape"]]) != "[]":
continue
prefixes = {kind: prefix for kind, prefix in configured["prefixes"].items()
if kind in types and kind in formats}
if not prefixes:
continue
for kind in prefixes:
variables = set(VARIABLE_RE.findall(formats[kind])) - KNOWN_VARIABLES
if len(variables) != 1:
raise ValueError(f"{operation}: id target {kind} must have exactly one ARN variable")
location = member.get("locationName", configured["member"])
query = member.get("queryName", location[:1].upper() + location[1:])
target = {"member": configured["member"] + "[]", "query": query, "prefixes": prefixes}
if found is not None and found != target:
raise ValueError(f"{operation}: clients disagree on the id target's serialization")
found = target
return found
def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: dict[str, dict]) -> dict:
"""What the file says for one operation."""
types = upstream["types"] or []
members = request_members(models, operation.split(":", 1)[1])
if namespace_of(operation) in ID_TARGETS:
entry = {"action": upstream["action"], "types": types, "resources": []}
targets = id_targets(operation, types, formats, models)
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()}
@@ -1402,7 +1449,7 @@ def validate(document: dict) -> list[str]:
if not OPERATION_RE.match(operation) or namespace not in namespaces:
problems.append(f"{operation!r} is not an operation of a namespace the file reads")
continue
if not isinstance(entry, dict) or not {"action", "types", "resources"} <= set(entry) <= {"action", "types", "resources", "creates", "located"}:
if not isinstance(entry, dict) or not {"action", "types", "resources"} <= set(entry) <= {"action", "types", "resources", "creates", "located", "targets"}:
problems.append(f"{operation} is not an action, its types and its resources")
continue
if not isinstance(entry["action"], str) or not OPERATION_RE.match(entry["action"]) \
@@ -1416,6 +1463,24 @@ def validate(document: dict) -> list[str]:
problems += _resource_problems(operation, resource, set(types), 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, {}))
targets = entry.get("targets")
if targets is not None:
if not isinstance(targets, dict) or set(targets) != {"member", "query", "prefixes"}:
problems.append(f"{operation} has malformed id targets")
elif not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*\[\]", str(targets["member"])) \
or not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*", str(targets["query"])) \
or not isinstance(targets["prefixes"], dict) or not targets["prefixes"]:
problems.append(f"{operation} has no list member, Query name or id prefixes")
else:
prefixes = targets["prefixes"]
for kind, prefix in prefixes.items():
arn = formats.get(namespace, {}).get(kind, "")
if kind not in types or not arn or len(set(VARIABLE_RE.findall(arn)) - KNOWN_VARIABLES) != 1 \
or not isinstance(prefix, str) or not prefix:
problems.append(f"{operation} has an invalid id target type or prefix: {kind}")
values = [p for p in prefixes.values() if isinstance(p, str)]
if any(a.startswith(b) for i, a in enumerate(values) for j, b in enumerate(values) if i != j):
problems.append(f"{operation} has ambiguous id prefixes")
located = entry.get("located", {})
if not isinstance(located, dict) or not located and "located" in entry or not all(
isinstance(member, str) and PATH_RE.match(member) and isinstance(where, str) and LOCATED_RE.match(where)
@@ -857,3 +857,48 @@ def test_verify_reports_a_rest_models_operation_whose_action_aws_no_longer_has(c
gone["Actions"] = [action for action in gone["Actions"] if action["Name"] != "DescribeThing"]
(sources / "svc.json").write_text(json.dumps(gone), encoding="utf-8")
assert r.main(["--verify", "--source-dir", str(sources), "--output", str(output)]) == 1
def test_id_targets_follow_the_model_and_resource_types_not_operation_names():
ec2 = model({"AnnotateResources": {"Resources": "Strings"}}, "ec2")
member = ec2["shapes"]["AnnotateResourcesIn"]["members"]["Resources"]
member["locationName"] = "resourceId"
formats = {"instance": "arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}"}
upstream = {"action": "ec2:AnnotateResources", "types": ["instance", "volume"]}
entry = r.entry_for("ec2:AnnotateResources", upstream, formats, {"ec2": ec2})
assert entry["targets"] == {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-"}}
member["queryName"] = "ExactWireName"
assert r.entry_for("ec2:AnnotateResources", upstream, formats, {"ec2": ec2})["targets"]["query"] == "ExactWireName"
# Neither a resource type the action does not authorize nor a scalar masquerading as a list is read.
assert "targets" not in r.entry_for("ec2:AnnotateResources", {**upstream, "types": ["volume"]}, formats, {"ec2": ec2})
member["shape"] = "String"
assert "targets" not in r.entry_for("ec2:AnnotateResources", upstream, formats, {"ec2": ec2})
def test_generated_ec2_targets_match_botocores_actual_serialization():
import botocore.session
from botocore.serialize import create_serializer
document = json.loads(r.OUTPUT.read_text())
model = botocore.session.get_session().get_service_model("ec2")
serializer = create_serializer("ec2")
for name in ("CreateTags", "DeleteTags"):
target = document["operations"]["ec2:" + name]["targets"]
request = serializer.serialize_to_request(
{"Resources": ["i-first", "vpc-second", "i-first"], "Tags": [{"Key": "Owner", "Value": "team+a"}]},
model.operation_model(name))
assert target["member"] == "Resources[]"
assert [request["body"][target["query"] + "." + str(i)] for i in range(1, 4)] == ["i-first", "vpc-second", "i-first"]
assert target["prefixes"] == {"instance": "i-"}
def test_id_targets_reject_unknown_types_ambiguous_prefixes_and_malformed_members():
import copy
document = json.loads(r.OUTPUT.read_text())
for field, value in (("member", "Resources"), ("query", "ResourceId.member"),
("prefixes", {"not-a-type": "i-"}), ("prefixes", {"instance": ""}),
("prefixes", {"instance": "i-", "volume": "i-"})):
invalid = copy.deepcopy(document)
invalid["operations"]["ec2:CreateTags"]["targets"][field] = value
assert r.validate(invalid), (field, value)