feat(iam): read AWS Config from the generated tables (#9296)

Move `config` from NOT_COVERED to NAMESPACES in
regen_iam_request_resources.py, so Config requests are checked on the
resources they name instead of `*`. A config rule's, configuration
recorder's and conformance pack's ARN ends in an id Config mints, which a
request naming one by its name does not carry, so ConfigStoredResourceArns
answers the table's lookups with the ARN Config stores it under; one Config
holds none of is checked on its name with the id open. The tag calls are
read from ResourceArn.

Two generic readings are added to the generator, changing Config's
PutAggregationAuthorization and PutConfigurationRecorder rows and no other
operation's: a format naming an account or a Region of its own beside the
ARN's takes them from the request's one account id member and its one
Region member, and a member filling one of the format's variables is no
longer also the ARN's account; and a type the request names but fills no
variable of takes its one name variable from the request's structure named
after the type (ConfigurationRecorder.name).

PutConfigRule now updates the rule its ConfigRuleArn names, else its
ConfigRuleId, else its ConfigRuleName, as the PutConfigRule reference lets
an update name its rule by any of the three, and refuses an ARN or id that
names no rule with InvalidParameterValueException. Finding the rule by name
alone let a request carrying one rule's id and another rule's name be
checked on the first and change the second.
This commit is contained in:
Priamo Germosen authored and GitHub committed 2026-11-23 17:28:33 -04:00
1 parent 0dd02aed44
commit 422c78866d
13 files changed
+648 -10

No files matched your search

+24
View File
@@ -87,6 +87,26 @@ An omitted or empty list selects all recorders; one unknown name returns
| `UntagResource` | Remove tags from a Config resource |
| `ListTagsForResource` | List tags on a Config resource |
## IAM enforcement
With IAM enforcement on, each action is checked on the resources the AWS Service Authorization
Reference lists for it, read from the request. A config rule, a configuration recorder and a
conformance pack carry an id Config mints in their ARNs (`config-rule/<id>`,
`configuration-recorder/<name>/<id>`, `conformance-pack/<name>/<id>`), so a request naming one by
its name is checked on the ARN Config stores it under. One Config holds none of is checked on its
name with the id open (`conformance-pack/<name>/*`), or on `config-rule/*` for a rule. The tag
calls are checked on their `ResourceArn`.
A `PutConfigRule` is checked on the rule its `ConfigRuleArn` or `ConfigRuleId` names, which is the
rule it updates (below), and on `*` when it names neither, as a new rule does and an update by
`ConfigRuleName` alone does. `PutConfigurationRecorder` is checked on the recorder its
`ConfigurationRecorder` structure's `name` names, the ARN Config stores it under, or
`configuration-recorder/<name>/*` for a new one. `PutAggregationAuthorization` is checked on
`arn:aws:config:<region>:<account>:aggregation-authorization/<AuthorizedAccountId>/<AuthorizedAwsRegion>`,
in the caller's account, the ARN Config gives the authorization. `DeleteAggregationAuthorization`,
`StartConfigRulesEvaluation`, the delivery channel and retention calls and the Describe and
compliance summaries that name no single rule are checked on `*`.
## Configuration
| Variable | Default | Description |
@@ -205,6 +225,10 @@ aws configservice delete-config-rule --config-rule-name s3-bucket-versioning
authorization or configuration recorder ARN that does not name an existing resource in the
caller's account and region. ARNs of resource kinds Floci does not model (configuration
aggregators, stored queries, organization rules and packs) are accepted without an existence check.
- `PutConfigRule` updates the rule its `ConfigRuleArn` names, else the one its `ConfigRuleId`
names, else the one its `ConfigRuleName` names, as the PutConfigRule reference lets an update
name its rule by any of the three; a rule named by its ARN or id keeps its name. An ARN or id
that names no rule answers `InvalidParameterValueException`, in Floci's wording.
- `PutConfigRule` applies its `Tags` only when it creates the rule; a later
`PutConfigRule` for the same rule leaves its tags unchanged, as AWS documents. Use
`TagResource` and `UntagResource` to change them. `DeleteConfigRule` drops the rule's tags.
+1 -1
View File
@@ -2542,7 +2542,7 @@ AWS Data Exports, AWS Pricing Calculator, Cost Explorer, CloudTrail, Global Acce
Timestream for InfluxDB, Amazon Redshift, the Amazon Redshift Data API, AWS Payment Cryptography, AWS DataSync, Amazon EMR,
Amazon Rekognition, IAM Identity Center, Amazon Inspector, Amazon Macie, AWS Fault Injection Service, AWS Resource
Access Manager, CloudWatch Observability Access Manager, AWS Resource Explorer, AWS Account Management, AWS Control
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS, Amazon SNS, Amazon Kinesis Data Streams, Amazon EventBridge Pipes, Aurora DSQL, STS, Amazon EKS, AWS Resource Groups, Amazon CloudWatch Logs, Amazon CloudWatch and Amazon Comprehend they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
Catalog, Amazon OpenSearch Service, IAM Access Analyzer, AWS Security Hub, Amazon GuardDuty, Lambda, AWS Glue, Amazon SQS, Amazon SNS, Amazon Kinesis Data Streams, Amazon EventBridge Pipes, Aurora DSQL, STS, Amazon EKS, AWS Resource Groups, Amazon CloudWatch Logs, Amazon CloudWatch, Amazon Comprehend and AWS Config they come from a table generated from AWS's Service Reference and botocore, `src/main/resources/aws/iam-request-resources.json`, which gives each
operation's action, the resource types that action acts on with their ARN formats, and the request
members that name them: a member holding a resource's ARN, which counts when it matches the format
of a type the action acts on, or members filling the variables of a type's format. Nothing in it is
@@ -69,7 +69,8 @@ import java.util.Optional;
* association or an access entry; Resource Groups, for the tags of a group; CloudWatch Logs, for a delivery, the
* delivery destinations of a delivery source and the tags of a log group, a destination, a delivery source, a
* delivery destination or a delivery; Pricing Calculator, for the tags of a workload estimate; Amazon Managed Service
* for Prometheus, for the tags of a workspace or a rule groups namespace); looked up lazily by
* for Prometheus, for the tags of a workspace or a rule groups namespace; AWS Config, for the config rule,
* configuration recorder or conformance pack a name names, whose id it minted); looked up lazily by
* {@code ResourceArnBuilder} and {@code IamConditionContextResolver} through {@code Instance<StoredResourceArns>} for
* the namespace a request or an ARN is of, so IAM never depends on that service directly.</p>
*
@@ -37,6 +37,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BooleanSupplier;
@@ -177,7 +178,7 @@ public class AwsConfigService {
* the tags alone, which TagResource/UntagResource change instead. The get-then-put runs under
* the lock delete takes, so a delete cannot land between them and orphan the creation tags. */
public ConfigRule putConfigRule(String region, ConfigRule requested, List<Map<String, String>> tagList) {
String ruleName = requested.configRuleName();
String ruleName = ruleNamed(region, requested);
if (ruleName == null) {
throw new AwsException("InvalidParameterValueException",
"ConfigRuleName must be specified.", 400);
@@ -187,6 +188,29 @@ public class AwsConfigService {
}
}
/**
* The name of the rule a put acts on. The PutConfigRule reference lets an update name its rule by
* {@code ConfigRuleName}, {@code ConfigRuleId} or {@code ConfigRuleArn}, and requires the name only of a new
* rule: a put giving an ARN or an id acts on the stored rule it names, the ARN first, and that rule keeps its
* name; one giving neither is the rule of its name. An ARN or id naming no rule is refused, so a put never acts
* on another rule than the one it names.
*/
private String ruleNamed(String region, ConfigRule requested) {
String arn = requested.configRuleArn();
String id = requested.configRuleId();
if (isBlank(arn) && isBlank(id)) {
return requested.configRuleName();
}
boolean byArn = !isBlank(arn);
return configRules.getOrDefault(region, Map.of()).values().stream()
.filter(rule -> byArn ? arn.equals(rule.configRuleArn()) : id.equals(rule.configRuleId()))
.map(ConfigRule::configRuleName)
.findFirst()
.orElseThrow(() -> new AwsException("InvalidParameterValueException", byArn
? "The ConfigRuleArn " + arn + " does not name a config rule in this account and Region."
: "The ConfigRuleId " + id + " does not name a config rule in this account and Region.", 400));
}
private ConfigRule storeConfigRule(String region, ConfigRule requested, String ruleName,
List<Map<String, String>> tagList) {
Map<String, ConfigRule> store = rulesFor(region);
@@ -1070,6 +1094,23 @@ public class AwsConfigService {
return new Paged<>(page, end < items.size() ? String.valueOf(end) : null);
}
/**
* The ARN the Region's config rule, configuration recorder or conformance pack of the name is stored under, which
* carries the id the service minted for it; empty for a name it holds none of, any other type, or a recorder saved
* before recorders had an ARN. Reads the stores without adding a Region to them.
*/
public Optional<String> storedArn(String type, String region, String name) {
return switch (type) {
case "ConfigRule" -> Optional.ofNullable(configRules.getOrDefault(region, Map.of()).get(name))
.map(ConfigRule::configRuleArn);
case "ConfigurationRecorder" -> Optional.ofNullable(configurationRecorders.get(region))
.filter(recorder -> recorder.name().equals(name)).map(ConfigurationRecorder::arn);
case "ConformancePack" -> Optional.ofNullable(conformancePacks.getOrDefault(region, Map.of()).get(name))
.map(ConformancePack::conformancePackArn);
default -> Optional.empty();
};
}
// --- Helpers ---
private Map<String, ConfigRule> rulesFor(String region) {
@@ -0,0 +1,37 @@
package io.floci.aws.services.configservice;
import io.floci.aws.core.common.StoredResourceArns;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import java.util.List;
import java.util.Optional;
/**
* What IAM asks AWS Config of the resources a request names: the ARN the caller's config rule, configuration recorder
* or conformance pack of the name a request gives is stored under, whose last part is the id Config minted for it,
* which the name alone does not carry.
*/
@ApplicationScoped
public class ConfigStoredResourceArns implements StoredResourceArns {
private final AwsConfigService config;
@Inject
public ConfigStoredResourceArns(AwsConfigService config) {
this.config = config;
}
@Override
public String namespace() {
return "config";
}
@Override
public Optional<String> find(String type, List<String> names, String region) {
if (names.size() != 1 || names.getFirst() == null) {
return Optional.empty();
}
return config.storedArn(type, region, names.getFirst()).filter(arn -> !arn.isBlank());
}
}
@@ -1,11 +1,11 @@
{
"_source": {"generator": "tools/aws/regen_iam_request_resources.py", "reference": "https://servicereference.us-east-1.amazonaws.com/", "botocore": "botocore 1.44.9 (local/aws/botocore)", "retrieved": "2026-11-23", "note": "make iam-request-resources-check re-derives every operation's resources from botocore; make iam-request-resources-verify checks every action, type and format against AWS."},
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam", "iam-toolbox"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<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", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "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", "config": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resourcesLine truncated
"namespaces": {"access-analyzer": ["accessanalyzer"], "account": ["account"], "acm": ["acm"], "apigateway": ["apigateway", "apigatewayv2"], "application-autoscaling": ["application-autoscaling"], "aps": ["amp"], "athena": ["athena"], "bcm-data-exports": ["bcm-data-exports"], "bcm-pricing-calculator": ["bcm-pricing-calculator"], "bedrock": ["bedrock", "bedrock-agent", "bedrock-agent-runtime", "bedrock-data-automation", "bedrock-data-automation-runtime", "bedrock-runtime"], "budgets": ["budgets"], "ce": ["ce"], "cloudformation": ["cloudcontrol", "cloudformation"], "cloudfront": ["cloudfront"], "cloudfront-keyvaluestore": ["cloudfront-keyvaluestore"], "cloudtrail": ["cloudtrail"], "cloudwatch": ["cloudwatch", "cloudwatchomni"], "codebuild": ["codebuild"], "codepipeline": ["codepipeline"], "cognito-identity": ["cognito-identity"], "cognito-idp": ["cognito-idp"], "comprehend": ["comprehend"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticloadbalancing": ["elb", "elbv2"], "elasticmapreduce": ["emr"], "emr-containers": ["emr-containers"], "emr-serverless": ["emr-serverless"], "es": ["es", "opensearch"], "events": ["eventbridgev2", "events"], "firehose": ["firehose"], "fis": ["fis"], "globalaccelerator": ["globalaccelerator"], "glue": ["glue"], "guardduty": ["guardduty"], "iam": ["iam", "iam-toolbox"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "oam": ["oam"], "payment-cryptography": ["payment-cryptography", "payment-cryptography-data"], "pipes": ["pipes"], "quicksight": ["quicksight"], "ram": ["ram"], "rds": ["docdb", "neptune", "rds"], "redshift": ["redshift"], "redshift-data": ["redshift-data"], "redshift-serverless": ["redshift-serverless"], "rekognition": ["rekognition"], "resource-explorer-2": ["resource-explorer-2"], "resource-groups": ["resource-groups"], "route53": ["route53"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "scheduler": ["scheduler"], "secretsmanager": ["secretsmanager"], "securityhub": ["securityhub"], "servicediscovery": ["servicediscovery"], "servicequotas": ["service-quotas"], "signer": ["signer", "signer-data"], "sns": ["sns"], "sqs": ["sqs"], "ssm": ["ssm"], "sso": ["sso", "sso-admin"], "states": ["stepfunctions"], "sts": ["sts"], "textract": ["textract"], "timestream-influxdb": ["timestream-influxdb"], "translate": ["translate"], "xray": ["xray"]},
"notCovered": {"airflow": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "app-integrations": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appconfig": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "appsync": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "autoscaling": "not read yet: AWS's group and launch configuration ARNs carry an id the service mints, `autoScalingGroup:<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", "cloudhsm": "not read yet: its ARN formats end in ${CloudHsmClusterInstanceName} and ${CloudHsmBackupInstanceName}, names, while its requests give ClusterId and BackupId, ids, which the rules do not fill a name from, so nearly every operation's resource would be left open", "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", "connect": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "detective": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dlm": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "dms": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticache": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "elasticbeanstalk": "not read yet: an environment's ARN carries its application's name, `environment/<application>/<name>`, while most of its requests name it by EnvironmentName or EnvironmentId alone, so reading it needs the stored environment those find", "elasticfilesystem": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "execute-api": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "identitystore": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (reLine truncated
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifyuibuilder", "aoss", "apiportal", "appfabric", "appflow", "application-signals", "application-signals-mcp", "appmesh", "appmesh-preview", "apprunner", "appstream", "apptest", "arc-region-switch", "arc-zonal-shift", "artifact", "assurance", "auditmanager", "aws-external-anthropic", "b2bi", "backup-gateway", "backup-search", "bcm-data-hub", "bedrock-mantle", "bedrock-websearch", "billing", "billingconductor", "braket", "bugbust", "cases", "cassandra", "chatbot", "chime", "cleanrooms", "cleanrooms-ml", "cloud9", "clouddirectory", "cloudsearch", "cloudshell", "cloudtrail-data", "codecatalyst", "codecommit", "codeconnections", "codeguru-profiler", "codeguru-security", "codestar-connections", "codestar-notifications", "codewhisperer", "cognito-sync", "connect-campaigns", "consoleapp", "continuum", "databrew", "dataexchange", "datapipeline", "datazone", "dax", "deadline", "devicefarm", "devops-guru", "directconnect", "docdb-elastic", "drs", "ds", "ds-data", "ebs", "ecr-public", "eks-auth", "elastictranscoder", "elemental-appliances-software", "elemental-inference", "elemental-support-cases", "end-user-messaging", "entityresolution", "evs", "finspace", "finspace-api", "fms", "forecast", "frauddetector", "freertos", "fsx", "gamelift", "gameliftstreams", "geo", "geo-maps", "geo-places", "geo-routes", "glacier", "grafana", "greengrass", "groundstation", "health", "health-agent", "healthlake", "honeycode", "identity-sync", "imagebuilder", "interconnect", "internetmonitor", "invoicing", "iotanalytics", "iotdeviceadvisor", "iotfleethub", "iotfleetwise", "iotjobsdata", "iotmanagedintegrations", "iotsitewise", "iottwinmaker", "iotwireless", "iq", "iq-permission", "ivs", "ivschat", "kafka-cluster", "kafkaconnect", "kendra", "kendra-ranking", "kinesisvideo", "launchwizard", "lex", "license-manager", "license-manager-linux-subscriptions", "license-manager-user-subscriptions", "lookoutequipment", "lookoutmetrics", "lookoutvision", "m2", "machinelearning", "managedblockchain", "mapcredits", "mediaconnect", "mediaconvert", "medialive", "mediapackage", "mediapackage-vod", "mediapackagev2", "mediastore", "mediatailor", "medical-imaging", "mgh", "mgn", "migrationhub-orchestrator", "mobiletargeting", "monitron", "mpa", "neptune-db", "neptune-graph", "network-security-manager", "networkflowmonitor", "networkmanager", "networkmonitor", "nimble", "notifications", "notifications-contacts", "nova-act", "observabilityadmin", "odb", "omics", "one", "opensearch", "opsworks", "osis", "osm", "outposts", "panorama", "partnercentral", "payments", "pca-connector-ad", "pca-connector-scep", "pcs", "personalize", "pi", "polly", "private-networks", "profile", "proton", "purchase-orders", "q", "qapps", "qbusiness", "qdeveloper", "qldb", "rbin", "rds-db", "refactor-spaces", "repostspace", "resiliencehub", "robomaker", "rolesanywhere", "route53-recovery-cluster", "route53-recovery-control-config", "route53-recovery-readiness", "route53globalresolver", "route53profiles", "rtbfabric", "s3-object-lambda", "s3-outposts", "s3express", "s3files", "sagemaker-geospatial", "sagemaker-mlflow", "savingsplans", "schemas", "scn", "sdb", "security-ir", "securityagent", "securitylake", "serverlessrepo", "shield", "simspaceweaver", "sms-voice", "snow-device-management", "social-messaging", "sqlworkbench", "ssm-contacts", "ssm-incidents", "ssm-quicksetup", "ssm-sap", "ssmmessages", "storagegateway", "supportauthz", "synthetics", "thinclient", "timestream", "tnb", "transform", "transform-custom", "trustedadvisor", "ts", "vendor-insights", "voiceid", "vpc-lattice", "vpc-lattice-svcs", "vpce", "waf", "waf-regional", "wellarchitected", "wickr", "wisdom", "workdocs", "worklink", "workmail", "workmailmessageflow", "workspaces", "workspaces-instances", "workspaces-web"],
"arnFormats": {"access-analyzer": {"Analyzer": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}", "ArchiveRule": "arn:${Partition}:access-analyzer:${Region}:${Account}:analyzer/${AnalyzerName}/archive-rule/${RuleName}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line 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}"}, "account": {"account": "arn:${Partition}:account::${Account}:account", "accountInOrganization": "arn:${Partition}:account::${ManagementAccountId}:account/o-${OrganizationId}/${MemberAccountId}"}, "acm": {"acme-domain-validation": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-domain-validation/${AcmeDomainValidationId}", "acme-endpoint": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}", "acme-external-account-binding": "arn:${Partition}:acm:${Region}:${Account}:acme-endpoint/${AcmeEndpointId}/acme-external-account-binding/${ExternalAccountBindingId}", "certificate": "arn:${Partition}:acm:${Region}:${Account}:certificate/${CertificateId}"}, "apigateway": {"AccessLogSettings": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/accesslogsettings", "Account": "arn:${Partition}:apigateway:${Region}::/account", "Api": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}", "ApiKey": "arn:${Partition}:apigateway:${Region}::/apikeys/${ApiKeyId}", "ApiKeys": "arn:${Partition}:apigateway:${Region}::/apikeys", "ApiMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings/${ApiMappingId}", "ApiMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/apimappings", "Apis": "arn:${Partition}:apigateway:${Region}::/apis", "Authorizer": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers/${AuthorizerId}", "Authorizers": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/authorizers", "AuthorizersCache": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/stages/${StageName}/cache/authorizers", "BasePathMapping": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings/${BasePath}", "BasePathMappings": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}/basepathmappings", "ClientCertificate": "arn:${Partition}:apigateway:${Region}::/clientcertificates/${ClientCertificateId}", "ClientCertificates": "arn:${Partition}:apigateway:${Region}::/clientcertificates", "Cors": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/cors", "Deployment": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments/${DeploymentId}", "Deployments": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/deployments", "DocumentationPart": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts/${DocumentationPartId}", "DocumentationParts": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/parts", "DocumentationVersion": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions/${DocumentationVersionId}", "DocumentationVersions": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/documentation/versions", "DomainName": "arn:${Partition}:apigateway:${Region}::/domainnames/${DomainName}", "DomainNameAccessAssociation": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations/domainname/${DomainName}/${SourceType}/${SourceId}", "DomainNameAccessAssociations": "arn:${Partition}:apigateway:${Region}:${Account}:/domainnameaccessassociations", "DomainNames": "arn:${Partition}:apigateway:${Region}::/domainnames", "ExportedAPI": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/exports/${Specification}", "GatewayResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses/${ResponseType}", "GatewayResponses": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/gatewayresponses", "Integration": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}", "IntegrationResponse": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses/${IntegrationResponseId}", "IntegrationResponses": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations/${IntegrationId}/integrationresponses", "Integrations": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/integrations", "Method": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}", "MethodResponse": "arn:${Partition}:apigateway:${Region}::/restapis/${RestApiId}/resources/${ResourceId}/methods/${HttpMethodType}/responses/${StatusCode}", "Model": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}", "ModelTemplate": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models/${ModelId}/template", "Models": "arn:${Partition}:apigateway:${Region}::/apis/${ApiId}/models", "Portal": "arn:${Partition}:apigateway:${Region}:${Account}:/portals/${PortalId}", "PortalProduct": "arn:${Partition}:apigateway:${Region}:${Account}:/portalproducts/$Line truncated
"pathFormats": {"apigateway": {"/restapis/{restapi_id}/models/{model_name}/default_template (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/models/${ModelName}/default_template", "/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/authorizers", "/restapis/{restapi_id}/stages/{stage_name}/cache/data (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/cache/data", "/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/restapis/${RestapiId}/stages/${StageName}/exports/${ExportType}", "/sdktypes (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes", "/sdktypes/{sdktype_id} (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/sdktypes/${SdktypeId}", "/usageplans/{usageplanId}/keys/{keyId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/keys/${KeyId}/usage", "/usageplans/{usageplanId}/usage (resource-path-specifier)": "arn:${Partition}:apigateway:${Region}::/usageplans/${UsageplanId}/usage", "Authorizer (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers/${Id}", "Authorizers (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/authorizers", "Deployment (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments/${Id}", "Deployments (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/deployments", "Integration (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration", "IntegrationResponse (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/resources/${ResourceId}/methods/${HttpMethod}/integration/responses/${StatusCode}", "Model (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models/${ModelName}", "Models (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/models", "Stage (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages/${StageName}", "Stages (REST API resources)": "arn:${Partition}:apigateway:${Region}::/restapis/${ApiId}/stages"}},
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job": ["aws:ResourceTag/"], "model-import-job": ["aws:ResourceTag/"], "model-invocation-job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "prompt": ["aws:ResourceTag/"], "prompt-router": ["aws:ResourceTag/"], "prompt-version": ["aws:ResourceTag/"], "provisioned-model": ["aws:ResourceTag/"], "retrieval-instruction": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/Line truncated
"resourceTagKeys": {"access-analyzer": {"Analyzer": ["aws:ResourceTag/"]}, "acm": {"acme-domain-validation": ["aws:ResourceTag/"], "acme-endpoint": ["aws:ResourceTag/"], "acme-external-account-binding": ["aws:ResourceTag/"], "certificate": ["aws:ResourceTag/"]}, "apigateway": {"AccessLogSettings": ["aws:ResourceTag/"], "Api": ["aws:ResourceTag/"], "ApiKey": ["aws:ResourceTag/"], "ApiKeys": ["aws:ResourceTag/"], "ApiMapping": ["aws:ResourceTag/"], "ApiMappings": ["aws:ResourceTag/"], "Apis": ["aws:ResourceTag/"], "Authorizer": ["aws:ResourceTag/"], "Authorizers": ["aws:ResourceTag/"], "AuthorizersCache": ["aws:ResourceTag/"], "BasePathMapping": ["aws:ResourceTag/"], "BasePathMappings": ["aws:ResourceTag/"], "ClientCertificate": ["aws:ResourceTag/"], "ClientCertificates": ["aws:ResourceTag/"], "Cors": ["aws:ResourceTag/"], "Deployment": ["aws:ResourceTag/"], "Deployments": ["aws:ResourceTag/"], "DocumentationPart": ["aws:ResourceTag/"], "DocumentationParts": ["aws:ResourceTag/"], "DocumentationVersion": ["aws:ResourceTag/"], "DocumentationVersions": ["aws:ResourceTag/"], "DomainName": ["aws:ResourceTag/"], "DomainNameAccessAssociations": ["aws:ResourceTag/"], "DomainNames": ["aws:ResourceTag/"], "ExportedAPI": ["aws:ResourceTag/"], "GatewayResponse": ["aws:ResourceTag/"], "GatewayResponses": ["aws:ResourceTag/"], "Integration": ["aws:ResourceTag/"], "IntegrationResponse": ["aws:ResourceTag/"], "IntegrationResponses": ["aws:ResourceTag/"], "Integrations": ["aws:ResourceTag/"], "Method": ["aws:ResourceTag/"], "MethodResponse": ["aws:ResourceTag/"], "Model": ["aws:ResourceTag/"], "ModelTemplate": ["aws:ResourceTag/"], "Models": ["aws:ResourceTag/"], "Portal": ["aws:ResourceTag/"], "PortalProduct": ["aws:ResourceTag/"], "PrivateBasePathMapping": ["aws:ResourceTag/"], "PrivateBasePathMappings": ["aws:ResourceTag/"], "PrivateDomainName": ["aws:ResourceTag/"], "ProductPage": ["aws:ResourceTag/"], "ProductRestEndpointPage": ["aws:ResourceTag/"], "RequestValidator": ["aws:ResourceTag/"], "RequestValidators": ["aws:ResourceTag/"], "Resource": ["aws:ResourceTag/"], "Resources": ["aws:ResourceTag/"], "RestApi": ["aws:ResourceTag/"], "RestApis": ["aws:ResourceTag/"], "Route": ["aws:ResourceTag/"], "RouteRequestParameter": ["aws:ResourceTag/"], "RouteResponse": ["aws:ResourceTag/"], "RouteResponses": ["aws:ResourceTag/"], "RouteSettings": ["aws:ResourceTag/"], "Routes": ["aws:ResourceTag/"], "RoutingRule": ["aws:ResourceTag/"], "Sdk": ["aws:ResourceTag/"], "Stage": ["aws:ResourceTag/"], "Stages": ["aws:ResourceTag/"], "Template": ["aws:ResourceTag/"], "UsagePlan": ["aws:ResourceTag/"], "UsagePlanKey": ["aws:ResourceTag/"], "UsagePlanKeys": ["aws:ResourceTag/"], "UsagePlans": ["aws:ResourceTag/"], "VpcLink": ["aws:ResourceTag/"], "VpcLinks": ["aws:ResourceTag/"]}, "application-autoscaling": {"ScalableTarget": ["aws:ResourceTag/"]}, "aps": {"anomalydetector": ["aws:ResourceTag/"], "cluster": ["aws:ResourceTag/"], "rulegroupsnamespace": ["aws:ResourceTag/"], "scraper": ["aws:ResourceTag/"], "workspace": ["aws:ResourceTag/"]}, "athena": {"capacity-reservation": ["aws:ResourceTag/"], "datacatalog": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"], "system-table": ["aws:ResourceTag/"], "workgroup": ["aws:ResourceTag/"]}, "bcm-data-exports": {"billingview": ["aws:ResourceTag/"], "export": ["aws:ResourceTag/"]}, "bcm-pricing-calculator": {"bill-estimate": ["aws:ResourceTag/"], "bill-scenario": ["aws:ResourceTag/"], "workload-estimate": ["aws:ResourceTag/"]}, "bedrock": {"advanced-prompt-optimization-job": ["aws:ResourceTag/"], "agent": ["aws:ResourceTag/"], "agent-alias": ["aws:ResourceTag/"], "application-inference-profile": ["aws:ResourceTag/"], "async-invoke": ["aws:ResourceTag/"], "automated-reasoning-policy": ["aws:ResourceTag/"], "automated-reasoning-policy-version": ["aws:ResourceTag/"], "blueprint": ["aws:ResourceTag/"], "blueprint-optimization-invocation": ["aws:ResourceTag/"], "custom-model": ["aws:ResourceTag/"], "custom-model-deployment": ["aws:ResourceTag/"], "data-automation-invocation-job": ["aws:ResourceTag/"], "data-automation-library": ["aws:ResourceTag/"], "data-automation-library-ingestion-job": ["aws:ResourceTag/"], "data-automation-project": ["aws:ResourceTag/"], "evaluation-job": ["aws:ResourceTag/"], "flow": ["aws:ResourceTag/"], "flow-alias": ["aws:ResourceTag/"], "guardrail": ["aws:ResourceTag/"], "imported-model": ["aws:ResourceTag/"], "knowledge-base": ["aws:ResourceTag/"], "model-copy-job": ["aws:ResourceTag/"], "model-customization-job": ["aws:ResourceTag/"], "model-evaluation-job": ["aws:ResourceTag/"], "model-import-job": ["aws:ResourceTag/"], "model-invocation-job": ["aws:ResourceTag/"], "project": ["aws:ResourceTag/"], "prompt": ["aws:ResourceTag/"], "prompt-router": ["aws:ResourceTag/"], "prompt-version": ["aws:ResourceTag/"], "provisioned-model": ["aws:ResourceTag/"], "retrieval-instruction": ["aws:ResourceTag/"], "session": ["aws:ResourceTag/"]}, "budgets": {"budget": ["aws:ResourceTag/Line truncated
"resourceKeys": {"ec2": {"capacity-reservation": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:CapacityReservationFleet": {"member": "CapacityReservationFleetId", "arn": "capacity-reservation-fleet"}, "ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:EndDateType": {"member": "EndDateType"}, "ec2:EphemeralStorage": {"member": "EphemeralStorage"}, "ec2:InstanceMatchCriteria": {"member": "InstanceMatchCriteria"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:Tenancy": {"member": "Tenancy"}}, "carrier-gateway": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "dhcp-options": {"ec2:DhcpOptionsID": {"member": "DhcpOptionsId"}}, "fpga-image": {"ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}}, "image": {"ec2:ImageID": {"member": "ImageId"}, "ec2:ImageType": {"member": "ImageType"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:Public": {"member": "Public"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "instance": {"ec2:EbsOptimized": {"member": "EbsOptimized"}, "ec2:InstanceID": {"member": "InstanceId"}, "ec2:InstanceType": {"member": "InstanceType"}, "ec2:RootDeviceType": {"member": "RootDeviceType"}}, "internet-gateway": {"ec2:InternetGatewayID": {"member": "InternetGatewayId"}}, "launch-template": {"ec2:LaunchTemplate": {"member": "LaunchTemplateId", "arn": "launch-template"}}, "network-acl": {"ec2:NetworkAclID": {"member": "NetworkAclId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "network-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:NetworkInterfaceID": {"member": "NetworkInterfaceId"}, "ec2:Subnet": {"member": "SubnetId", "arn": "subnet"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "reserved-instances": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:InstanceType": {"member": "InstanceType"}}, "route-table": {"ec2:RouteTableID": {"member": "RouteTableId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "secondary-interface": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}}, "security-group": {"ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "snapshot": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:Owner": {"member": "OwnerId"}, "ec2:SnapshotID": {"member": "SnapshotId"}, "ec2:VolumeSize": {"member": "VolumeSize"}}, "subnet": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:SubnetID": {"member": "SubnetId"}, "ec2:Vpc": {"member": "VpcId", "arn": "vpc"}}, "transit-gateway": {"ec2:transitGatewayId": {"member": "TransitGatewayId"}}, "transit-gateway-attachment": {"ec2:transitGatewayAttachmentId": {"member": "TransitGatewayAttachmentId"}}, "transit-gateway-connect-peer": {"ec2:transitGatewayConnectPeerId": {"member": "TransitGatewayConnectPeerId"}}, "transit-gateway-metering-policy": {"ec2:transitGatewayMeteringPolicyId": {"member": "TransitGatewayMeteringPolicyId"}}, "transit-gateway-multicast-domain": {"ec2:transitGatewayMulticastDomainId": {"member": "TransitGatewayMulticastDomainId"}}, "transit-gateway-policy-table": {"ec2:transitGatewayPolicyTableId": {"member": "TransitGatewayPolicyTableId"}}, "transit-gateway-route-table": {"ec2:transitGatewayRouteTableId": {"member": "TransitGatewayRouteTableId"}}, "transit-gateway-route-table-announcement": {"ec2:transitGatewayRouteTableAnnouncementId": {"member": "TransitGatewayRouteTableAnnouncementId"}}, "volume": {"ec2:AvailabilityZone": {"member": "AvailabilityZone"}, "ec2:AvailabilityZoneId": {"member": "AvailabilityZoneId"}, "ec2:Encrypted": {"member": "Encrypted"}, "ec2:KmsKeyId": {"member": "KmsKeyId"}, "ec2:VolumeID": {"member": "VolumeId"}, "ec2:VolumeInitializationRate": {"member": "VolumeInitializationRate"}, "ec2:VolumeType": {"member": "VolumeType"}}, "vpc": {"ec2:VpcID": {"member": "VpcId"}}, "vpc-peering-connection": {"ec2:VpcPeeringConnectionID": {"member": "VpcPeeringConnectionId"}}}},
"unqualified": {"ssm": ["parameter"], "states": ["statemachine"]},
"mintedIds": {"events": ["api-destination", "connection"]},
@@ -1656,6 +1656,108 @@
"comprehend:UntagResource": {"action": "comprehend:UntagResource", "types": ["document-classification-job", "document-classifier", "document-classifier-endpoint", "dominant-language-detection-job", "entities-detection-job", "entity-recognizer", "entity-recognizer-endpoint", "events-detection-job", "flywheel", "flywheel-dataset", "key-phrases-detection-job", "pii-entities-detection-job", "sentiment-detection-job", "targeted-sentiment-detection-job", "topics-detection-job"], "resources": [{"types": ["document-classification-job", "document-classifier", "document-classifier-endpoint", "dominant-language-detection-job", "entities-detection-job", "entity-recognizer", "entity-recognizer-endpoint", "events-detection-job", "flywheel", "flywheel-dataset", "key-phrases-detection-job", "pii-entities-detection-job", "sentiment-detection-job", "targeted-sentiment-detection-job", "topics-detection-job"], "arn": "ResourceArn"}]},
"comprehend:UpdateEndpoint": {"action": "comprehend:UpdateEndpoint", "types": ["document-classifier-endpoint", "entity-recognizer-endpoint", "flywheel"], "resources": [{"types": ["document-classifier-endpoint", "entity-recognizer-endpoint", "flywheel"], "arn": "DesiredDataAccessRoleArn"}, {"types": ["document-classifier-endpoint", "entity-recognizer-endpoint", "flywheel"], "arn": "DesiredModelArn"}, {"types": ["document-classifier-endpoint", "entity-recognizer-endpoint", "flywheel"], "arn": "EndpointArn"}, {"types": ["document-classifier-endpoint", "entity-recognizer-endpoint", "flywheel"], "arn": "FlywheelArn"}, {"type": "flywheel", "fill": {}, "when": {"FlywheelArn": [null]}, "default": true}]},
"comprehend:UpdateFlywheel": {"action": "comprehend:UpdateFlywheel", "types": ["document-classifier", "entity-recognizer", "flywheel"], "resources": [{"types": ["document-classifier", "entity-recognizer", "flywheel"], "arn": "ActiveModelArn"}, {"types": ["document-classifier", "entity-recognizer", "flywheel"], "arn": "DataAccessRoleArn"}, {"types": ["document-classifier", "entity-recognizer", "flywheel"], "arn": "FlywheelArn"}]},
"config:AssociateResourceTypes": {"action": "config:AssociateResourceTypes", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "ConfigurationRecorderArn"}]},
"config:BatchGetAggregateResourceConfig": {"action": "config:BatchGetAggregateResourceConfig", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:BatchGetResourceConfig": {"action": "config:BatchGetResourceConfig", "types": [], "resources": []},
"config:DeleteAggregationAuthorization": {"action": "config:DeleteAggregationAuthorization", "types": ["AggregationAuthorization"], "resources": []},
"config:DeleteConfigRule": {"action": "config:DeleteConfigRule", "types": ["ConfigRule"], "resources": [{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]},
"config:DeleteConfigurationAggregator": {"action": "config:DeleteConfigurationAggregator", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:DeleteConfigurationRecorder": {"action": "config:DeleteConfigurationRecorder", "types": ["ConfigurationRecorder"], "resources": [{"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorderName"}}]},
"config:DeleteConformancePack": {"action": "config:DeleteConformancePack", "types": ["ConformancePack"], "resources": [{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackName"}}]},
"config:DeleteConnector": {"action": "config:DeleteConnector", "types": ["Connector"], "resources": [{"types": ["Connector"], "arn": "Arn"}]},
"config:DeleteDeliveryChannel": {"action": "config:DeleteDeliveryChannel", "types": [], "resources": []},
"config:DeleteEvaluationResults": {"action": "config:DeleteEvaluationResults", "types": ["ConfigRule"], "resources": [{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]},
"config:DeleteOrganizationConfigRule": {"action": "config:DeleteOrganizationConfigRule", "types": ["OrganizationConfigRule"], "resources": [{"type": "OrganizationConfigRule", "fill": {}, "find": ["OrganizationConfigRuleName"]}]},
"config:DeleteOrganizationConformancePack": {"action": "config:DeleteOrganizationConformancePack", "types": ["OrganizationConformancePack"], "resources": [{"type": "OrganizationConformancePack", "fill": {}, "find": ["OrganizationConformancePackName"]}]},
"config:DeletePendingAggregationRequest": {"action": "config:DeletePendingAggregationRequest", "types": [], "resources": []},
"config:DeleteRemediationConfiguration": {"action": "config:DeleteRemediationConfiguration", "types": ["RemediationConfiguration"], "resources": []},
"config:DeleteRemediationExceptions": {"action": "config:DeleteRemediationExceptions", "types": [], "resources": []},
"config:DeleteResourceConfig": {"action": "config:DeleteResourceConfig", "types": [], "resources": []},
"config:DeleteRetentionConfiguration": {"action": "config:DeleteRetentionConfiguration", "types": [], "resources": []},
"config:DeleteServiceLinkedConfigurationRecorder": {"action": "config:DeleteServiceLinkedConfigurationRecorder", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "Arn"}]},
"config:DeleteStoredQuery": {"action": "config:DeleteStoredQuery", "types": ["StoredQuery"], "resources": [{"type": "StoredQuery", "fill": {"StoredQueryName": "QueryName"}}]},
"config:DeliverConfigSnapshot": {"action": "config:DeliverConfigSnapshot", "types": [], "resources": []},
"config:DescribeAggregateComplianceByConfigRules": {"action": "config:DescribeAggregateComplianceByConfigRules", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:DescribeAggregateComplianceByConformancePacks": {"action": "config:DescribeAggregateComplianceByConformancePacks", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:DescribeAggregationAuthorizations": {"action": "config:DescribeAggregationAuthorizations", "types": [], "resources": []},
"config:DescribeComplianceByConfigRule": {"action": "config:DescribeComplianceByConfigRule", "types": [], "resources": []},
"config:DescribeComplianceByResource": {"action": "config:DescribeComplianceByResource", "types": [], "resources": []},
"config:DescribeConfigRuleEvaluationStatus": {"action": "config:DescribeConfigRuleEvaluationStatus", "types": [], "resources": []},
"config:DescribeConfigRules": {"action": "config:DescribeConfigRules", "types": [], "resources": []},
"config:DescribeConfigurationAggregatorSourcesStatus": {"action": "config:DescribeConfigurationAggregatorSourcesStatus", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:DescribeConfigurationAggregators": {"action": "config:DescribeConfigurationAggregators", "types": [], "resources": []},
"config:DescribeConfigurationRecorderStatus": {"action": "config:DescribeConfigurationRecorderStatus", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "Arn"}, {"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorderNames[]"}}]},
"config:DescribeConfigurationRecorders": {"action": "config:DescribeConfigurationRecorders", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "Arn"}, {"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorderNames[]"}}]},
"config:DescribeConformancePackCompliance": {"action": "config:DescribeConformancePackCompliance", "types": ["ConformancePack"], "resources": [{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackName"}}]},
"config:DescribeConformancePackStatus": {"action": "config:DescribeConformancePackStatus", "types": [], "resources": []},
"config:DescribeConformancePacks": {"action": "config:DescribeConformancePacks", "types": [], "resources": []},
"config:DescribeDeliveryChannelStatus": {"action": "config:DescribeDeliveryChannelStatus", "types": [], "resources": []},
"config:DescribeDeliveryChannels": {"action": "config:DescribeDeliveryChannels", "types": [], "resources": []},
"config:DescribeOrganizationConfigRuleStatuses": {"action": "config:DescribeOrganizationConfigRuleStatuses", "types": [], "resources": []},
"config:DescribeOrganizationConfigRules": {"action": "config:DescribeOrganizationConfigRules", "types": [], "resources": []},
"config:DescribeOrganizationConformancePackStatuses": {"action": "config:DescribeOrganizationConformancePackStatuses", "types": [], "resources": []},
"config:DescribeOrganizationConformancePacks": {"action": "config:DescribeOrganizationConformancePacks", "types": [], "resources": []},
"config:DescribePendingAggregationRequests": {"action": "config:DescribePendingAggregationRequests", "types": [], "resources": []},
"config:DescribeRemediationConfigurations": {"action": "config:DescribeRemediationConfigurations", "types": ["RemediationConfiguration"], "resources": []},
"config:DescribeRemediationExceptions": {"action": "config:DescribeRemediationExceptions", "types": [], "resources": []},
"config:DescribeRemediationExecutionStatus": {"action": "config:DescribeRemediationExecutionStatus", "types": ["RemediationConfiguration"], "resources": []},
"config:DescribeRetentionConfigurations": {"action": "config:DescribeRetentionConfigurations", "types": [], "resources": []},
"config:DisassociateResourceTypes": {"action": "config:DisassociateResourceTypes", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "ConfigurationRecorderArn"}]},
"config:GetAggregateComplianceDetailsByConfigRule": {"action": "config:GetAggregateComplianceDetailsByConfigRule", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"], "account": "AccountId"}]},
"config:GetAggregateConfigRuleComplianceSummary": {"action": "config:GetAggregateConfigRuleComplianceSummary", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:GetAggregateConformancePackComplianceSummary": {"action": "config:GetAggregateConformancePackComplianceSummary", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:GetAggregateDiscoveredResourceCounts": {"action": "config:GetAggregateDiscoveredResourceCounts", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:GetAggregateResourceConfig": {"action": "config:GetAggregateResourceConfig", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:GetComplianceDetailsByConfigRule": {"action": "config:GetComplianceDetailsByConfigRule", "types": ["ConfigRule"], "resources": [{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]},
"config:GetComplianceDetailsByResource": {"action": "config:GetComplianceDetailsByResource", "types": [], "resources": []},
"config:GetComplianceSummaryByConfigRule": {"action": "config:GetComplianceSummaryByConfigRule", "types": [], "resources": []},
"config:GetComplianceSummaryByResourceType": {"action": "config:GetComplianceSummaryByResourceType", "types": [], "resources": []},
"config:GetConformancePackComplianceDetails": {"action": "config:GetConformancePackComplianceDetails", "types": ["ConformancePack"], "resources": [{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackName"}}]},
"config:GetConformancePackComplianceSummary": {"action": "config:GetConformancePackComplianceSummary", "types": ["ConformancePack"], "resources": [{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackNames[]"}}]},
"config:GetConnector": {"action": "config:GetConnector", "types": ["Connector"], "resources": [{"types": ["Connector"], "arn": "Arn"}]},
"config:GetCustomRulePolicy": {"action": "config:GetCustomRulePolicy", "types": ["ConfigRule"], "resources": [{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]},
"config:GetDiscoveredResourceCounts": {"action": "config:GetDiscoveredResourceCounts", "types": [], "resources": []},
"config:GetOrganizationConfigRuleDetailedStatus": {"action": "config:GetOrganizationConfigRuleDetailedStatus", "types": ["OrganizationConfigRule"], "resources": [{"type": "OrganizationConfigRule", "fill": {}, "find": ["OrganizationConfigRuleName"]}]},
"config:GetOrganizationConformancePackDetailedStatus": {"action": "config:GetOrganizationConformancePackDetailedStatus", "types": ["OrganizationConformancePack"], "resources": [{"type": "OrganizationConformancePack", "fill": {}, "find": ["OrganizationConformancePackName"]}]},
"config:GetOrganizationCustomRulePolicy": {"action": "config:GetOrganizationCustomRulePolicy", "types": ["OrganizationConfigRule"], "resources": [{"type": "OrganizationConfigRule", "fill": {}, "find": ["OrganizationConfigRuleName"]}]},
"config:GetResourceConfigHistory": {"action": "config:GetResourceConfigHistory", "types": [], "resources": []},
"config:GetResourceEvaluationSummary": {"action": "config:GetResourceEvaluationSummary", "types": [], "resources": []},
"config:GetStoredQuery": {"action": "config:GetStoredQuery", "types": ["StoredQuery"], "resources": [{"type": "StoredQuery", "fill": {"StoredQueryName": "QueryName"}}]},
"config:ListAggregateDiscoveredResources": {"action": "config:ListAggregateDiscoveredResources", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:ListConfigurationRecorders": {"action": "config:ListConfigurationRecorders", "types": [], "resources": []},
"config:ListConformancePackComplianceScores": {"action": "config:ListConformancePackComplianceScores", "types": [], "resources": []},
"config:ListConnectors": {"action": "config:ListConnectors", "types": [], "resources": []},
"config:ListDiscoveredResources": {"action": "config:ListDiscoveredResources", "types": [], "resources": []},
"config:ListResourceEvaluations": {"action": "config:ListResourceEvaluations", "types": [], "resources": []},
"config:ListStoredQueries": {"action": "config:ListStoredQueries", "types": [], "resources": []},
"config:ListTagsForResource": {"action": "config:ListTagsForResource", "types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "resources": [{"types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "arn": "ResourceArn"}]},
"config:PutAggregationAuthorization": {"action": "config:PutAggregationAuthorization", "types": ["AggregationAuthorization"], "resources": [{"type": "AggregationAuthorization", "fill": {"AggregatorAccount": "AuthorizedAccountId", "AggregatorRegion": "AuthorizedAwsRegion"}}]},
"config:PutConfigRule": {"action": "config:PutConfigRule", "types": ["ConfigRule"], "resources": [{"types": ["ConfigRule"], "arn": "ConfigRule.ConfigRuleArn"}, {"type": "ConfigRule", "fill": {"ConfigRuleId": "ConfigRule.ConfigRuleId"}}]},
"config:PutConfigurationAggregator": {"action": "config:PutConfigurationAggregator", "types": ["ConfigurationAggregator"], "resources": [{"types": ["ConfigurationAggregator"], "arn": "OrganizationAggregationSource.RoleArn"}, {"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:PutConfigurationRecorder": {"action": "config:PutConfigurationRecorder", "types": ["ConfigurationRecorder"], "resources": [{"types": ["ConfigurationRecorder"], "arn": "ConfigurationRecorder.arn"}, {"types": ["ConfigurationRecorder"], "arn": "ConfigurationRecorder.roleARN"}, {"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorder.name"}}]},
"config:PutConformancePack": {"action": "config:PutConformancePack", "types": ["ConformancePack"], "resources": [{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackName"}}]},
"config:PutConnector": {"action": "config:PutConnector", "types": ["Connector"], "resources": [{"type": "Connector", "fill": {}}]},
"config:PutDeliveryChannel": {"action": "config:PutDeliveryChannel", "types": [], "resources": []},
"config:PutEvaluations": {"action": "config:PutEvaluations", "types": [], "resources": []},
"config:PutExternalEvaluation": {"action": "config:PutExternalEvaluation", "types": ["ConfigRule"], "resources": [{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]},
"config:PutOrganizationConfigRule": {"action": "config:PutOrganizationConfigRule", "types": ["OrganizationConfigRule"], "resources": [{"types": ["OrganizationConfigRule"], "arn": "OrganizationCustomRuleMetadata.LambdaFunctionArn"}, {"type": "OrganizationConfigRule", "fill": {}, "find": ["OrganizationConfigRuleName"]}, {"type": "OrganizationConfigRule", "fill": {"OrganizationConfigRuleId": "OrganizationManagedRuleMetadata.RuleIdentifier"}}]},
"config:PutOrganizationConformancePack": {"action": "config:PutOrganizationConformancePack", "types": ["OrganizationConformancePack"], "resources": [{"type": "OrganizationConformancePack", "fill": {}, "find": ["OrganizationConformancePackName"]}]},
"config:PutRemediationConfigurations": {"action": "config:PutRemediationConfigurations", "types": ["RemediationConfiguration"], "resources": [{"types": ["RemediationConfiguration"], "arn": "RemediationConfigurations[].Arn"}, {"type": "RemediationConfiguration", "fill": {}}]},
"config:PutRemediationExceptions": {"action": "config:PutRemediationExceptions", "types": [], "resources": []},
"config:PutResourceConfig": {"action": "config:PutResourceConfig", "types": [], "resources": []},
"config:PutRetentionConfiguration": {"action": "config:PutRetentionConfiguration", "types": [], "resources": []},
"config:PutServiceLinkedConfigurationRecorder": {"action": "config:PutServiceLinkedConfigurationRecorder", "types": [], "resources": [], "makes": [{"type": "ConfigurationRecorder", "fill": {}}]},
"config:PutStoredQuery": {"action": "config:PutStoredQuery", "types": ["StoredQuery"], "resources": [{"types": ["StoredQuery"], "arn": "StoredQuery.QueryArn"}, {"type": "StoredQuery", "fill": {}}]},
"config:PutThirdPartyServiceLinkedConfigurationRecorder": {"action": "config:PutThirdPartyServiceLinkedConfigurationRecorder", "types": ["Connector"], "resources": [{"types": ["Connector"], "arn": "ConnectorArn"}]},
"config:SelectAggregateResourceConfig": {"action": "config:SelectAggregateResourceConfig", "types": ["ConfigurationAggregator"], "resources": [{"type": "ConfigurationAggregator", "fill": {}, "find": ["ConfigurationAggregatorName"]}]},
"config:SelectResourceConfig": {"action": "config:SelectResourceConfig", "types": [], "resources": []},
"config:StartConfigRulesEvaluation": {"action": "config:StartConfigRulesEvaluation", "types": ["ConfigRule"], "resources": []},
"config:StartConfigurationRecorder": {"action": "config:StartConfigurationRecorder", "types": ["ConfigurationRecorder"], "resources": [{"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorderName"}}]},
"config:StartRemediationExecution": {"action": "config:StartRemediationExecution", "types": [], "resources": []},
"config:StartResourceEvaluation": {"action": "config:StartResourceEvaluation", "types": [], "resources": []},
"config:StopConfigurationRecorder": {"action": "config:StopConfigurationRecorder", "types": ["ConfigurationRecorder"], "resources": [{"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorderName"}}]},
"config:TagResource": {"action": "config:TagResource", "types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "resources": [{"types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "arn": "ResourceArn"}]},
"config:UntagResource": {"action": "config:UntagResource", "types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "resources": [{"types": ["AggregationAuthorization", "ConfigRule", "ConfigurationAggregator", "ConfigurationRecorder", "ConformancePack", "Connector", "OrganizationConfigRule", "OrganizationConformancePack", "StoredQuery"], "arn": "ResourceArn"}]},
"controlcatalog:GetControl": {"action": "controlcatalog:GetControl", "types": ["control"], "resources": [{"types": ["control"], "arn": "ControlArn"}]},
"controlcatalog:ListCommonControls": {"action": "controlcatalog:ListCommonControls", "types": [], "resources": []},
"controlcatalog:ListControlMappings": {"action": "controlcatalog:ListControlMappings", "types": [], "resources": []},
@@ -0,0 +1,59 @@
package io.floci.aws.services.configservice;
import io.floci.aws.core.common.AwsException;
import io.floci.aws.core.common.RegionResolver;
import io.floci.aws.services.configservice.model.ConfigRule;
import io.floci.aws.services.configservice.model.ConfigRuleSource;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
/**
* PutConfigRule updates the rule its request names: the PutConfigRule reference lets an update name its rule by
* ConfigRuleName, ConfigRuleId or ConfigRuleArn and requires the name only of a new rule.
*/
class AwsConfigServicePutConfigRuleTest {
private static final String REGION = "us-east-1";
private static final ConfigRuleSource SOURCE = new ConfigRuleSource("AWS", "S3_BUCKET_VERSIONING_ENABLED", null,
null);
private final AwsConfigService config = new AwsConfigService(new RegionResolver(REGION, "000000000000"), null);
@Test
void anUpdateNamingItsRuleByIdOrArnUpdatesThatRuleWhichKeepsItsName() {
ConfigRule first = put("first", null, null, "one");
ConfigRule second = put("second", null, null, "two");
ConfigRule updated = put("second", first.configRuleId(), null, "by id");
assertEquals("first", updated.configRuleName());
assertEquals(first.configRuleArn(), updated.configRuleArn());
assertEquals(List.of("by id", "two"), descriptions());
put(null, null, second.configRuleArn(), "by arn");
assertEquals(List.of("by id", "by arn"), descriptions());
}
@Test
void anIdOrArnNamingNoRuleIsRefused() {
put("first", null, null, "one");
assertEquals("InvalidParameterValueException",
assertThrows(AwsException.class, () -> put("first", "config-rule-missing", null, "x")).getErrorCode());
assertEquals("InvalidParameterValueException", assertThrows(AwsException.class,
() -> put("first", null, "arn:aws:config:us-east-1:000000000000:config-rule/config-rule-missing", "x"))
.getErrorCode());
assertEquals(List.of("one"), descriptions());
}
private ConfigRule put(String name, String id, String arn, String description) {
return config.putConfigRule(REGION, new ConfigRule(name, arn, id, description, null, SOURCE, null, null, null,
null, null));
}
private List<String> descriptions() {
return config.describeConfigRules(REGION, null).stream().map(ConfigRule::description).toList();
}
}
@@ -0,0 +1,33 @@
package io.floci.aws.services.configservice;
import io.floci.aws.services.configservice.model.ConfigRule;
import io.floci.aws.services.configservice.model.ConfigRuleSource;
import io.floci.aws.services.configservice.model.ConfigurationRecorder;
import java.util.List;
/**
* An AWS Config holding the resources whose ARNs carry an id it mints: the config rule {@code versioning}, the
* configuration recorder {@code default} and the conformance pack {@code pack}.
*/
public final class ConfigFixtures {
/** The ARNs Config stored the rule, the recorder and the conformance pack under. */
public record Stored(String rule, String recorder, String pack) {
}
private ConfigFixtures() {
}
/** Puts the rule, the recorder and the conformance pack in {@code region} and returns the ARNs they are under. */
public static Stored stored(AwsConfigService config, String region) {
String rule = config.putConfigRule(region, new ConfigRule("versioning", null, null, null, null,
new ConfigRuleSource("AWS", "S3_BUCKET_VERSIONING_ENABLED", null, null), null, null, null, null, null))
.configRuleArn();
config.putConfigurationRecorder(region, new ConfigurationRecorder(null, "default", "role", null, null),
List.of());
String recorder = config.describeConfigurationRecorders(region, null, null).getFirst().arn();
String pack = config.putConformancePack(region, "pack", "s3://bucket/template.yaml", null).conformancePackArn();
return new Stored(rule, recorder, pack);
}
}
@@ -0,0 +1,42 @@
package io.floci.aws.services.configservice;
import io.floci.aws.core.common.RegionResolver;
import io.floci.aws.services.configservice.model.ConfigurationRecorder;
import org.junit.jupiter.api.Test;
import java.util.List;
import java.util.Optional;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* What AWS Config gives the request-resources table of its own resources: the ARN a config rule, a configuration
* recorder or a conformance pack of a name is stored under, the id Config minted for it included.
*/
class ConfigStoredResourceArnsTest {
private static final String REGION = "us-east-1";
private final AwsConfigService config = new AwsConfigService(new RegionResolver(REGION, "000000000000"), null);
private final ConfigStoredResourceArns stored = new ConfigStoredResourceArns(config);
@Test
void aNameFindsTheArnItsResourceIsStoredUnderItsMintedIdIncluded() {
ConfigFixtures.Stored arns = ConfigFixtures.stored(config, REGION);
assertEquals(Optional.of(arns.rule()), stored.find("ConfigRule", List.of("versioning"), REGION));
assertEquals(Optional.of(arns.recorder()), stored.find("ConfigurationRecorder", List.of("default"), REGION));
assertEquals(Optional.of(arns.pack()), stored.find("ConformancePack", List.of("pack"), REGION));
}
@Test
void aNameItHoldsNoneOfFindsNothing() {
config.putConfigurationRecorder(REGION, new ConfigurationRecorder(null, "default", "role", null, null),
List.of());
assertEquals(Optional.empty(), stored.find("ConfigRule", List.of("missing"), REGION));
assertEquals(Optional.empty(), stored.find("ConfigurationRecorder", List.of("other"), REGION));
assertEquals(Optional.empty(), stored.find("ConformancePack", List.of("pack"), REGION));
assertEquals(Optional.empty(), stored.find("ConfigurationRecorder", List.of("default"), "eu-west-1"));
assertEquals(Optional.empty(), stored.find("AggregationAuthorization", List.of("default"), REGION));
}
}
@@ -3309,6 +3309,135 @@ class IamRequestResourceEnforcementIntegrationTest {
.formParam("DashboardName", name).formParam("DashboardBody", "{\"widgets\":[]}").post("/").then();
}
/**
* An AWS Config rule is checked on the ARN Config stores it under, which ends in the id Config minted for it and
* not in its name, so a grant on that ARN lets the caller act on the rule a request names by name, and not on
* another.
*/
@Test
void aConfigRuleIsCheckedOnTheArnConfigStoresItUnder() {
String rule = "res-rule-" + suffix();
config("PutConfigRule", "{\"ConfigRule\":{\"ConfigRuleName\":\"" + rule + "\",\"Source\":{\"Owner\":\"AWS\","
+ "\"SourceIdentifier\":\"S3_BUCKET_VERSIONING_ENABLED\"}}}").statusCode(200);
cleanup.register(() -> config("DeleteConfigRule", "{\"ConfigRuleName\":\"" + rule + "\"}"));
String arn = config("DescribeConfigRules", "{\"ConfigRuleNames\":[\"" + rule + "\"]}").statusCode(200)
.extract().jsonPath().getString("ConfigRules[0].ConfigRuleArn");
assertTrue(arn.startsWith("arn:aws:config:" + REGION + ":" + ACCOUNT + ":config-rule/config-rule-"), arn);
User user = user("res-config-rule");
user.policy(allowOn("config:GetComplianceDetailsByConfigRule", arn));
send(user, "config", "StarlingDoveService.GetComplianceDetailsByConfigRule", "1.1",
"{\"ConfigRuleName\":\"" + rule + "\"}").statusCode(200);
refusedJson(send(user, "config", "StarlingDoveService.GetComplianceDetailsByConfigRule", "1.1",
"{\"ConfigRuleName\":\"" + rule + "-other\"}"), "config:GetComplianceDetailsByConfigRule");
}
/**
* A PutConfigRule naming one rule by its id and another by its name updates the rule its id names, as the
* PutConfigRule reference lets an update name its rule by id, so the rule it is checked on is the one it changes:
* a grant on the first rule does not let the caller change the second.
*/
@Test
void aConfigRulePutUpdatesTheRuleItsIdNames() {
String first = configRule("res-rule-a-" + suffix());
String second = configRule("res-rule-b-" + suffix());
JsonNode firstRule = describeConfigRule(first);
User user = user("res-config-put");
user.policy(allowOn("config:PutConfigRule", firstRule.path("ConfigRuleArn").asText()));
send(user, "config", "StarlingDoveService.PutConfigRule", "1.1", "{\"ConfigRule\":{\"ConfigRuleId\":\""
+ firstRule.path("ConfigRuleId").asText() + "\",\"ConfigRuleName\":\"" + second + "\","
+ "\"Description\":\"changed\",\"Source\":{\"Owner\":\"AWS\","
+ "\"SourceIdentifier\":\"S3_BUCKET_VERSIONING_ENABLED\"}}}").statusCode(200);
assertEquals("changed", describeConfigRule(first).path("Description").asText());
assertTrue(!"changed".equals(describeConfigRule(second).path("Description").asText()));
}
/**
* An AWS Config aggregation authorization is checked on the ARN Config gives it, in the caller's account with the
* account and Region it authorizes in its path, so a grant on that ARN lets the caller put it and not another.
*/
@Test
void aConfigAggregationAuthorizationIsCheckedOnTheArnConfigGivesIt() {
String region = "eu-west-" + (1 + (int) (System.nanoTime() % 3));
cleanup.register(() -> config("DeleteAggregationAuthorization",
"{\"AuthorizedAccountId\":\"111122223333\",\"AuthorizedAwsRegion\":\"" + region + "\"}"));
User user = user("res-config-aggregation");
user.policy(allowOn("config:PutAggregationAuthorization", "arn:aws:config:" + REGION + ":" + ACCOUNT
+ ":aggregation-authorization/111122223333/" + region));
String arn = send(user, "config", "StarlingDoveService.PutAggregationAuthorization", "1.1",
"{\"AuthorizedAccountId\":\"111122223333\",\"AuthorizedAwsRegion\":\"" + region + "\"}")
.statusCode(200).extract().jsonPath().getString("AggregationAuthorization.AggregationAuthorizationArn");
assertEquals("arn:aws:config:" + REGION + ":" + ACCOUNT + ":aggregation-authorization/111122223333/" + region,
arn);
refusedJson(send(user, "config", "StarlingDoveService.PutAggregationAuthorization", "1.1",
"{\"AuthorizedAccountId\":\"444455556666\",\"AuthorizedAwsRegion\":\"" + region + "\"}"),
"config:PutAggregationAuthorization");
}
/**
* An AWS Config recorder put is checked on the recorder its ConfigurationRecorder structure names, the ARN Config
* stores it under, so a grant on that ARN lets the caller update it, and a grant on another refuses it.
*/
@Test
void aConfigRecorderPutIsCheckedOnTheRecorderItsStructureNames() {
String role = "arn:aws:iam::" + ACCOUNT + ":role/res-config-role";
String body = "{\"ConfigurationRecorder\":{\"name\":\"default\",\"roleARN\":\"" + role + "\"}}";
config("PutConfigurationRecorder", body).statusCode(200);
cleanup.register(() -> config("DeleteConfigurationRecorder", "{\"ConfigurationRecorderName\":\"default\"}"));
String arn = config("DescribeConfigurationRecorders", "{}").statusCode(200).extract().jsonPath()
.getString("ConfigurationRecorders[0].arn");
User user = user("res-config-recorder");
user.policy(allowOn("config:PutConfigurationRecorder", arn) + "," + allowOn("iam:PassRole", role));
send(user, "config", "StarlingDoveService.PutConfigurationRecorder", "1.1", body).statusCode(200);
user.policy(allowOn("config:PutConfigurationRecorder", arn + "0") + "," + allowOn("iam:PassRole", role));
refusedJson(send(user, "config", "StarlingDoveService.PutConfigurationRecorder", "1.1", body),
"config:PutConfigurationRecorder");
}
/** A config rule of the name, created as the admin and deleted after the test; its name. */
private String configRule(String name) {
config("PutConfigRule", "{\"ConfigRule\":{\"ConfigRuleName\":\"" + name + "\",\"Source\":{\"Owner\":\"AWS\","
+ "\"SourceIdentifier\":\"S3_BUCKET_VERSIONING_ENABLED\"}}}").statusCode(200);
cleanup.register(() -> config("DeleteConfigRule", "{\"ConfigRuleName\":\"" + name + "\"}"));
return name;
}
private static JsonNode describeConfigRule(String name) {
try {
return new ObjectMapper().readTree(config("DescribeConfigRules", "{\"ConfigRuleNames\":[\"" + name
+ "\"]}").statusCode(200).extract().asString()).path("ConfigRules").path(0);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
/**
* An AWS Config conformance pack is checked on the ARN Config stores it under, its name followed by the id Config
* minted for it, so a grant on that ARN lets the caller update the pack, and a pack Config holds none of is checked
* on its name with the id open.
*/
@Test
void aConfigConformancePackIsCheckedOnTheArnConfigStoresItUnder() {
String pack = "res-pack-" + suffix();
String body = "\",\"TemplateS3Uri\":\"s3://templates/pack.yaml\"}";
config("PutConformancePack", "{\"ConformancePackName\":\"" + pack + body).statusCode(200);
cleanup.register(() -> config("DeleteConformancePack", "{\"ConformancePackName\":\"" + pack + "\"}"));
String arn = config("DescribeConformancePacks", "{\"ConformancePackNames\":[\"" + pack + "\"]}")
.statusCode(200).extract().jsonPath().getString("ConformancePackDetails[0].ConformancePackArn");
User user = user("res-config-pack");
user.policy(allowOn("config:PutConformancePack", arn));
send(user, "config", "StarlingDoveService.PutConformancePack", "1.1",
"{\"ConformancePackName\":\"" + pack + body).statusCode(200);
refusedJson(send(user, "config", "StarlingDoveService.PutConformancePack", "1.1",
"{\"ConformancePackName\":\"" + pack + "-other" + body), "config:PutConformancePack");
}
private static ValidatableResponse config(String operation, String body) {
return adminJson("config", "StarlingDoveService." + operation).body(body).post("/").then();
}
private static ValidatableResponse glue(String operation, String body) {
return adminJson("glue", "AWSGlue." + operation).body(body).post("/").then();
}
@@ -16,6 +16,9 @@ import io.floci.aws.core.storage.InMemoryStorage;
import io.floci.aws.services.cloudwatch.logs.CloudWatchLogsDeliveryService;
import io.floci.aws.services.cloudwatch.logs.CloudWatchLogsStoredResourceArns;
import io.floci.aws.services.cloudwatch.logs.model.Delivery;
import io.floci.aws.services.configservice.AwsConfigService;
import io.floci.aws.services.configservice.ConfigFixtures;
import io.floci.aws.services.configservice.ConfigStoredResourceArns;
import io.floci.aws.services.dynamodb.DynamoDbStoredResourceArns;
import io.floci.aws.services.dynamodb.backend.DynamoDbTableAccess;
import io.floci.aws.services.eks.EksService;
@@ -1876,6 +1879,47 @@ class ResourceArnBuilderTest {
builder.buildResources("cloudwatch", "cloudwatch:PutMetricData", ctx, "us-west-2", ACCOUNT, "aws"));
}
// ── AWS Config ──────────────────────────────────────────────────────────────
/**
* A config rule, a configuration recorder and a conformance pack carry an id Config mints in their ARNs, which a
* request naming them by name does not give, so each is checked on the ARN Config stores it under; one Config holds
* none of is checked on its name with that id open, or on every rule for a rule.
*/
@Test
void configChecksARuleARecorderAndAConformancePackOnTheArnsConfigStoresThemUnder() {
AwsConfigService config = new AwsConfigService(new RegionResolver("us-east-1", ACCOUNT), null);
ConfigFixtures.Stored stored = ConfigFixtures.stored(config, "us-east-1");
ResourceArnBuilder reading = reading(new ConfigStoredResourceArns(config));
setJsonBody("{\"ConfigRuleName\":\"versioning\"}");
assertEquals(List.of(stored.rule()), config(reading, "DeleteEvaluationResults"));
setJsonBody("{\"ConfigurationRecorderName\":\"default\"}");
assertEquals(List.of(stored.recorder()), config(reading, "StopConfigurationRecorder"));
setJsonBody("{\"ConformancePackName\":\"pack\"}");
assertEquals(List.of(stored.pack()), config(reading, "DeleteConformancePack"));
setJsonBody("{\"ConfigRuleName\":\"missing\"}");
assertEquals(List.of("arn:aws:config:us-east-1:000000000000:config-rule/*"),
config(reading, "DeleteEvaluationResults"));
setJsonBody("{\"ConformancePackName\":\"other\"}");
assertEquals(List.of("arn:aws:config:us-east-1:000000000000:conformance-pack/other/*"),
config(reading, "DeleteConformancePack"));
// A recorder put names its recorder in its ConfigurationRecorder structure, the stored one when it exists.
setJsonBody("{\"ConfigurationRecorder\":{\"name\":\"default\",\"roleARN\":\"arn:aws:iam::000000000000:role/r\"}}");
assertEquals(List.of(stored.recorder()), config(reading, "PutConfigurationRecorder"));
// An aggregation authorization is the caller's, its path the account and Region it authorizes.
setJsonBody("{\"AuthorizedAccountId\":\"111122223333\",\"AuthorizedAwsRegion\":\"eu-west-1\"}");
assertEquals(List.of("arn:aws:config:us-east-1:000000000000:aggregation-authorization/111122223333/eu-west-1"),
config(reading, "PutAggregationAuthorization"));
}
/** The resources an AWS Config request is checked on, as the table reads {@code operation}. */
private List<String> config(ResourceArnBuilder builder, String operation) {
return builder.buildResources("config", "config:" + operation, ctx, "us-east-1", ACCOUNT, "aws");
}
// ── S3 and S3 Control ───────────────────────────────────────────────────────
/** The resources an S3 or S3 Control request names, read from the generated table on the route it matches. */
+78 -3
View File
@@ -353,7 +353,7 @@ NAMESPACES = ("access-analyzer", "account", "acm", "application-autoscaling", "a
"servicequotas", "ssm", "sso", "states", "textract", "timestream-influxdb", "translate", "signer", "xray",
"securityhub", "guardduty", "secretsmanager", "scheduler", "lambda", "cloudformation", "glue",
"sqs", "sns", "kinesis", "pipes", "dsql", "sts", "eks", "resource-groups", "logs", "cloudwatch",
"comprehend",
"comprehend", "config",
"ec2-instance-connect", "s3", "bedrock", "apigateway", "kms", "dynamodb", "iam")
# ---------------------------------------------------------------------------------------------------------------------
@@ -596,7 +596,6 @@ NOT_COVERED: dict[str, str] = {
"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",
"config": _LATER,
"connect": _REST,
"detective": _REST,
"dlm": _REST,
@@ -1900,17 +1899,91 @@ def with_parent_ids(resources: list[dict], formats: dict[str, str], types: list[
return found
def region_members(models: dict[str, dict], operation: str) -> list[str]:
"""The top-level string members of the operation's request named as a Region (`AuthorizedAwsRegion`), by name."""
found: set[str] = set()
for model in models.values():
spec = model["operations"].get(operation)
if spec is None or "input" not in spec or not READ_PROTOCOLS & _protocols(model):
continue
found.update(name for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items()
if member.get("location") in BODY_LOCATIONS and re.search(r"region$", name, re.IGNORECASE)
and model["shapes"][member["shape"]]["type"] == "string")
return sorted(found)
def with_account_variables(resources: list[dict], formats: dict[str, str], accounts: list[str],
regions: list[str]) -> list[dict]:
"""The resources, each a type named by its variables whose format names an account or a Region of its own beside
the ARN's (Config's `aggregation-authorization/${AggregatorAccount}/${AggregatorRegion}`), taking that account
from the request's one account id member and that Region from its one Region member; the ARN's own account then
stays the caller's (`with_account`)."""
found = []
for resource in resources:
if "fill" not in resource or "default" in resource:
found.append(resource)
continue
fill = dict(resource["fill"])
for variable in VARIABLE_RE.findall(formats.get(resource["type"], "")):
if variable in fill:
continue
if variable != "Account" and variable.endswith("Account") and len(accounts) == 1:
fill[variable] = accounts[0]
elif variable != "Region" and variable.endswith("Region") and len(regions) == 1:
fill[variable] = regions[0]
found.append(dict(resource, fill=dict(sorted(fill.items()))) if fill != resource["fill"] else resource)
return found
def with_account(resources: list[dict], formats: dict[str, str], accounts: list[str]) -> list[dict]:
"""The resources, each a type named by its variables taking its account from the request's one account id
member, when it has exactly one and the type's format has an account, unless the resource applies only when that
member is absent."""
member is absent or the member fills one of the type's own variables, the account of something its ARN names."""
if len(accounts) != 1:
return resources
return [dict(resource, account=accounts[0]) if "fill" in resource and "default" not in resource
and "${Account}" in formats.get(resource["type"], "")
and accounts[0] not in resource["fill"].values()
and resource.get("when", {}).get(accounts[0]) != [None] else resource for resource in resources]
def structure_name_fields(models: dict[str, dict], operation: str, types: list[str]) -> dict[str, str]:
"""By type, the `name` field of the operation's request's top-level structure member named after the type
(PutConfigurationRecorder's `ConfigurationRecorder.name`), the name the structure gives the resource; a type with
no such structure, or two, is left out."""
found: dict[str, set[str]] = {}
for model in models.values():
spec = model["operations"].get(operation)
if spec is None or "input" not in spec or not READ_PROTOCOLS & _protocols(model):
continue
for name, member in model["shapes"][spec["input"]["shape"]].get("members", {}).items():
shape = model["shapes"][member["shape"]]
if member.get("location") not in BODY_LOCATIONS or shape["type"] != "structure":
continue
fields = [field for field, inner in shape.get("members", {}).items()
if field.lower() == "name" and model["shapes"][inner["shape"]]["type"] == "string"]
for kind in types:
if stem(name) == stem(kind) and len(fields) == 1:
found.setdefault(kind, set()).add(f"{name}.{fields[0]}")
return {kind: next(iter(paths)) for kind, paths in sorted(found.items()) if len(paths) == 1}
def with_structure_names(resources: list[dict], formats: dict[str, str], names: dict[str, str]) -> list[dict]:
"""The resources of a type the request names but fills no variable of, whose format has one variable that is a
name (`configuration-recorder/${RecorderName}/${RecorderId}`), taking it from the request's structure named after
the type."""
found = []
for resource in resources:
kind = resource.get("type")
variables = [variable for variable in VARIABLE_RE.findall(formats.get(kind, "")) if variable.endswith("Name")
and variable not in KNOWN_VARIABLES] if isinstance(kind, str) else []
if "fill" in resource and not resource["fill"] and kind in names and len(variables) == 1:
found.append(dict(resource, fill={variables[0]: names[kind]}))
else:
found.append(resource)
return found
def structure_account_members(models: dict[str, dict], operation: str, types: list[str]) -> dict[str, str]:
"""The top-level members of the operation's request whose name ends in `Account`, by the type whose botocore
structure (the one named after the type, `Snapshot` for `snapshot`) has a member of that same name; a type
@@ -3479,8 +3552,10 @@ def read_resources(operation: str, types: list[str], formats: dict[str, str], mo
resources = with_absent_arn(resources, formats, optional)
resources = with_absent_account(resources, formats, account_members(models, name), optional)
resources = with_map_fields(resources, types, formats, map_fields(models, name))
resources = with_account_variables(resources, formats, account_members(models, name), region_members(models, name))
resources = with_account(resources, formats, account_members(models, name))
resources = with_structure_account(resources, formats, structure_account_members(models, name, types))
resources = with_structure_names(resources, formats, structure_name_fields(models, name, types))
resources = with_arn_of(resources, formats, name_or_arn_members(models, name),
documented_name_or_arn_members(models, name))
resources = with_default_pairs(resources, formats, optional)
@@ -549,6 +549,43 @@ def test_a_member_holding_an_account_id_gives_the_account_of_the_types_named_by_
assert r.with_account([{"type": "thing", "fill": {}}], FORMATS, ["a", "b"]) == [{"type": "thing", "fill": {}}]
def test_an_account_and_a_region_a_format_names_beside_its_own_take_the_requests_members(tmp_path):
# Config's aggregation authorization: arn:...:<caller>:aggregation-authorization/<authorized account>/<Region>.
formats = {"grant": "arn:${Partition}:svc:${Region}:${Account}:grant/${GranteeAccount}/${GranteeRegion}"}
write_models(tmp_path, {"svc": model({"PutGrant": {"AuthorizedAccountId": "AccountId",
"AuthorizedAwsRegion": "String"}})})
models = r.load_models(tmp_path, {"svc"})
assert r.region_members(models, "PutGrant") == ["AuthorizedAwsRegion"]
filled = r.with_account_variables([{"type": "grant", "fill": {}}], formats,
r.account_members(models, "PutGrant"), r.region_members(models, "PutGrant"))
assert filled == [{"type": "grant", "fill": {"GranteeAccount": "AuthorizedAccountId",
"GranteeRegion": "AuthorizedAwsRegion"}}]
# The member that fills the format's own account variable is not also the ARN's account, which stays the caller's.
assert r.with_account(filled, formats, ["AuthorizedAccountId"]) == filled
# A format naming no other account or Region is left as it is.
assert r.with_account_variables([{"type": "thing", "fill": {}}], FORMATS, ["registryId"], ["Region"]) == [
{"type": "thing", "fill": {}}]
def test_a_structure_named_after_the_type_gives_its_name_to_a_type_named_by_nothing_else(tmp_path):
# Config's PutConfigurationRecorder names its recorder in ConfigurationRecorder.name.
service = model({"PutRecorder": {"Recorder": "Recorder"}})
service["shapes"]["Recorder"] = {"type": "structure", "members": {"name": {"shape": "String"},
"roleARN": {"shape": "String"}}}
write_models(tmp_path, {"svc": service})
models = r.load_models(tmp_path, {"svc"})
assert r.structure_name_fields(models, "PutRecorder", ["recorder"]) == {"recorder": "Recorder.name"}
formats = {"recorder": "arn:${Partition}:svc:${Region}:${Account}:recorder/${RecorderName}/${RecorderId}"}
assert r.with_structure_names([{"type": "recorder", "fill": {}}], formats, {"recorder": "Recorder.name"}) == [
{"type": "recorder", "fill": {"RecorderName": "Recorder.name"}}]
# A row another rule filled keeps its fill, and a format of two names says nothing about which one it is.
given = [{"type": "recorder", "fill": {"RecorderId": "Id"}}]
assert r.with_structure_names(given, formats, {"recorder": "Recorder.name"}) == given
two = {"recorder": "arn:${Partition}:svc:${Region}:${Account}:recorder/${GroupName}/${RecorderName}"}
assert r.with_structure_names([{"type": "recorder", "fill": {}}], two, {"recorder": "Recorder.name"}) == [
{"type": "recorder", "fill": {}}]
def test_an_account_member_of_a_types_own_structure_gives_that_types_account_alone(tmp_path):
service = model({"RestoreThing": {"ThingName": "String", "PoolId": "String", "OwnerAccount": "String"}})
service["shapes"]["Thing"] = {"type": "structure", "members": {"OwnerAccount": {"shape": "String"}}}
@@ -1241,6 +1278,20 @@ def test_the_vendored_file_is_well_formed():
"action": "comprehend:DetectSentiment", "types": [], "resources": []}
assert operations["comprehend:DescribeDocumentClassifier"]["resources"] == [
{"types": ["document-classifier"], "arn": "DocumentClassifierArn"}]
# Config is read whole: a rule is found by its name, its ARN ending in the id Config mints; a conformance pack is
# its name, the id it mints after it found the same way when Config holds the pack.
assert "config" in document["namespaces"] and "config" not in document["notCovered"]
assert operations["config:DeleteConfigRule"]["resources"] == [
{"type": "ConfigRule", "fill": {}, "find": ["ConfigRuleName"]}]
assert operations["config:DeleteConformancePack"]["resources"] == [
{"type": "ConformancePack", "fill": {"ConformancePackName": "ConformancePackName"}}]
# An aggregation authorization is the caller's, its path the account and Region it authorizes; a recorder put
# names its recorder in the ConfigurationRecorder structure.
assert operations["config:PutAggregationAuthorization"]["resources"] == [
{"type": "AggregationAuthorization",
"fill": {"AggregatorAccount": "AuthorizedAccountId", "AggregatorRegion": "AuthorizedAwsRegion"}}]
assert {"type": "ConfigurationRecorder", "fill": {"RecorderName": "ConfigurationRecorder.name"}} in operations[
"config:PutConfigurationRecorder"]["resources"]
# A scalable target is found by the three members naming it, its ARN ending in the id the service mints.
assert operations["application-autoscaling:DeregisterScalableTarget"]["resources"] == [
{"type": "ScalableTarget", "fill": {}, "find": ["ServiceNamespace", "ResourceId", "ScalableDimension"]}]