fix(iam): check VPC endpoint IDs in EC2 tag calls on their endpoint ARN (#9467)

CreateTags and DeleteTags checked a vpce- ID in their Resources list on `*`, because the generated table learns
each ID prefix from botocore's examples and botocore gives none for VPC endpoints. A grant on one endpoint was
refused and a deny on it never applied.

fetch_ec2_id_examples.py copies the identifier examples of the EC2 API reference's CreateVpcEndpoint page into
tools/aws/sources/ec2-id-examples.json, and the generator matches their XML paths to botocore's output shapes,
which gives VpcEndpointId the vpce- prefix. That prefix joins botocore's in the one prefix map and reads only the
tagging calls' generic list, so DeleteVpcEndpoints keeps its typed reader. The source names its namespace and
pages, and the shared source verifier checks it against the live page.

The regenerated table also takes in what the Service Reference added on 2026-11-25: CloudWatch's omni-slo,
experiment and lookup types, which its tag operations now act on, Elastic Load Balancing's proxy type and the
amplifygen3 namespace.

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
Priamo GermosenandAndre Kurait authored and GitHub committed 2026-11-25 17:22:55 -04:00
1 parent 1206d32a03
commit b012f4d6bf
12 files changed
+526 -38

No files matched your search

+3
View File
@@ -61,6 +61,9 @@ on:
- 'src/main/resources/aws/iam-request-resources.json'
- 'tools/aws/regen_iam_request_resources.py'
- 'tools/aws/test_regen_iam_request_resources.py'
- 'tools/aws/sources/ec2-id-examples.json'
- 'tools/aws/fetch_ec2_id_examples.py'
- 'tools/aws/test_fetch_ec2_id_examples.py'
- 'src/main/resources/aws/dynamodb-condition-keys.json'
- 'tools/aws/regen_dynamodb_condition_keys.py'
- 'tools/aws/test_regen_dynamodb_condition_keys.py'
+2 -1
View File
@@ -653,6 +653,7 @@ IAM_REQUEST_RESOURCES_PATHS := src/main/resources/aws/iam-request-resources.json
tools/aws/test_fetch_kms_api_permissions.py tools/aws/sources/dynamodb-permissions.json \
tools/aws/fetch_dynamodb_permissions.py tools/aws/test_fetch_dynamodb_permissions.py \
tools/aws/sources/iam-identifiers.json tools/aws/fetch_iam_identifiers.py tools/aws/test_fetch_iam_identifiers.py \
tools/aws/sources/ec2-id-examples.json tools/aws/fetch_ec2_id_examples.py tools/aws/test_fetch_ec2_id_examples.py \
tools/aws/sources/required-resource-types.json tools/aws/fetch_required_resource_types.py \
tools/aws/test_fetch_required_resource_types.py
CLOUDTRAIL_S3_DATA_EVENTS_PATHS := src/main/resources/aws/cloudtrail-s3-data-events.json \
@@ -886,7 +887,7 @@ iam-request-resources-verify: ## CI gate (online): every vendored operation must
fi
iam-request-resources-test: ## Run the IAM request resource generator's unit tests
$(PYTHON) -m pytest tools/aws/test_regen_iam_request_resources.py -q
$(PYTHON) -m pytest tools/aws/test_regen_iam_request_resources.py tools/aws/test_fetch_ec2_id_examples.py -q
cfn-property-types-sync: ## Regenerate src/main/resources/aws/cfn-property-types.json from AWS's resource schemas (commit the result)
$(PYTHON) tools/aws/regen_cfn_property_types.py
+6
View File
@@ -11,6 +11,12 @@ its botocore shape each comes from, are generated from the Service Reference and
every interface is checked against its own keys and tags before any tag changes; another
interface's VPC or tags cannot authorize it. Authorization reads do not create default resources.
With IAM enforcement enabled, `CreateTags` and `DeleteTags` check every VPC endpoint ID
against its endpoint ARN before changing any batch member. botocore gives no `vpce-` example,
so the generated request resource table takes the prefix from the response examples of the
EC2 API reference's `CreateVpcEndpoint` page, which `tools/aws/fetch_ec2_id_examples.py`
copies, matched to botocore's output shapes.
## Instance IAM authorization
With IAM enforcement enabled, modeled instance-list operations, including `StartInstances`, `StopInstances`, `TerminateInstances`, and `RebootInstances`, authorize each requested instance ARN before changing any instance state.
@@ -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-24", "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."},
"_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-25", "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"], "config": ["config"], "controlcatalog": ["controlcatalog"], "controltower": ["controltower"], "cur": ["cur"], "datasync": ["datasync"], "dms": ["dms"], "dsql": ["dsql"], "dynamodb": ["dynamodb", "dynamodbstreams"], "ec2": ["ec2"], "ec2-instance-connect": ["ec2-instance-connect"], "ecr": ["ecr"], "ecs": ["ecs"], "eks": ["eks"], "elasticache": ["elasticache"], "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"], "identitystore": ["identitystore"], "inspector2": ["inspector2"], "kinesis": ["kinesis"], "kinesisanalytics": ["kinesisanalytics", "kinesisanalyticsv2"], "kms": ["kms"], "lambda": ["lambda", "lambda-core", "lambda-microvms", "lambda-web"], "logs": ["logs"], "macie2": ["macie2"], "memorydb": ["memorydb"], "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"], "route53resolver": ["route53resolver"], "s3": ["s3", "s3control"], "s3tables": ["s3tables"], "s3vectors": ["s3vectors"], "sagemaker": ["sagemaker", "sagemaker-a2i-runtime", "sagemaker-edge", "sagemaker-featurestore-runtime", "sagemaker-gateway-runtime", "sagemaker-inference-router-runtime", "sagemaker-metrics", "sagemaker-runtime", "sagemakerjobruntime", "sagemakertrainingsessionruntime"], "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"], "transcribe": ["transcribe"], "transfer": ["transfer"], "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", "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", "iot": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "kafka": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_rest_routes.MODELS), which do not have its model yet", "lightsail": "not read yet: a later batch, with the tests that show its ARNs are the ones its handlers mint", "mq": "REST: its requests name their resources in the path, which RequestResources reads from the route a request matched in the vendored REST routes (regen_restLine 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", "finops-agent", "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
"otherNamespaces": ["a4b", "account-access", "acm-pca", "aco-automation", "agent-registry", "aidevops", "aiops", "airflow-serverless", "amplify", "amplifybackend", "amplifygen3", "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", "finops-agent", "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
"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"]},
@@ -1254,7 +1254,7 @@
"cloudwatch:ListOmniDashboards": {"action": "cloudwatch:ListOmniDashboards", "types": [], "resources": []},
"cloudwatch:ListSpaces": {"action": "cloudwatch:ListSpaces", "types": [], "resources": []},
"cloudwatch:ListSpacesForOrganization": {"action": "cloudwatch:ListSpacesForOrganization", "types": [], "resources": []},
"cloudwatch:ListTagsForResource": {"action": "cloudwatch:ListTagsForResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:ListTagsForResource": {"action": "cloudwatch:ListTagsForResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:ListTelemetryFields": {"action": "cloudwatch:ListTelemetryFields", "types": [], "resources": []},
"cloudwatch:ListTelemetryQuerySessions": {"action": "cloudwatch:ListTelemetryQuerySessions", "types": [], "resources": []},
"cloudwatch:ListViews": {"action": "cloudwatch:ListViews", "types": [], "resources": []},
@@ -1280,8 +1280,8 @@
"cloudwatch:StopOTelEnrichment": {"action": "cloudwatch:StopOTelEnrichment", "types": [], "resources": []},
"cloudwatch:StopTelemetryQuery": {"action": "cloudwatch:StopTelemetryQuery", "types": [], "resources": []},
"cloudwatch:StopTelemetryQuerySession": {"action": "cloudwatch:StopTelemetryQuerySession", "types": [], "resources": []},
"cloudwatch:TagResource": {"action": "cloudwatch:TagResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:UntagResource": {"action": "cloudwatch:UntagResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "insight-rule", "metric-query-definition", "metric-stream", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:TagResource": {"action": "cloudwatch:TagResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:UntagResource": {"action": "cloudwatch:UntagResource", "types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "resources": [{"types": ["alarm", "alarm-mute-rule", "dashboard", "dataset", "experiment", "insight-rule", "lookup", "metric-query-definition", "metric-stream", "omni-slo", "service", "slo"], "arn": "ResourceARN"}]},
"cloudwatch:UpdateAccessProfile": {"action": "cloudwatch:UpdateAccessProfile", "types": ["access-profile"], "resources": [{"type": "access-profile", "fill": {"ProfileId": "profileId"}}]},
"cloudwatch:UpdateAlert": {"action": "cloudwatch:UpdateAlert", "types": ["alert"], "resources": [{"type": "alert", "fill": {"AlertId": "alertId"}}]},
"cloudwatch:UpdateDomain": {"action": "cloudwatch:UpdateDomain", "types": ["domain"], "resources": [{"type": "domain", "fill": {"DomainId": "domainId"}}]},
@@ -2199,7 +2199,7 @@
"ec2:CreateStoreImageTask": {"action": "ec2:CreateStoreImageTask", "types": ["image"], "resources": [{"type": "image", "fill": {"ImageId": "ImageId"}}]},
"ec2:CreateSubnet": {"action": "ec2:CreateSubnet", "types": ["ipam-pool", "subnet", "vpc"], "resources": [{"types": ["ipam-pool", "subnet", "vpc"], "arn": "OutpostArn"}, {"type": "ipam-pool", "fill": {"IpamPoolId": "Ipv4IpamPoolId"}}, {"type": "subnet", "fill": {}, "made": true}, {"type": "vpc", "fill": {"VpcId": "VpcId"}}, {"type": "ipam-pool", "fill": {"IpamPoolId": "Ipv6IpamPoolId"}}]},
"ec2:CreateSubnetCidrReservation": {"action": "ec2:CreateSubnetCidrReservation", "types": ["subnet"], "resources": [{"type": "subnet", "fill": {"SubnetId": "SubnetId"}}]},
"ec2:CreateTags": {"action": "ec2:CreateTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-", "network-acl": "acl-", "network-interface": "eni-", "route-table": "rtb-", "security-group": "sg-"}}},
"ec2:CreateTags": {"action": "ec2:CreateTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-", "network-acl": "acl-", "network-interface": "eni-", "route-table": "rtb-", "security-group": "sg-", "vpc-endpoint": "vpce-"}}},
"ec2:CreateTrafficMirrorFilter": {"action": "ec2:CreateTrafficMirrorFilter", "types": ["traffic-mirror-filter"], "resources": [{"type": "traffic-mirror-filter", "fill": {}}]},
"ec2:CreateTrafficMirrorFilterRule": {"action": "ec2:CreateTrafficMirrorFilterRule", "types": ["traffic-mirror-filter", "traffic-mirror-filter-rule"], "resources": [{"type": "traffic-mirror-filter", "fill": {"TrafficMirrorFilterId": "TrafficMirrorFilterId"}}, {"type": "traffic-mirror-filter-rule", "fill": {}, "made": true}]},
"ec2:CreateTrafficMirrorSession": {"action": "ec2:CreateTrafficMirrorSession", "types": ["network-interface", "traffic-mirror-filter", "traffic-mirror-session", "traffic-mirror-target"], "resources": [{"type": "network-interface", "fill": {"NetworkInterfaceId": "NetworkInterfaceId"}}, {"type": "traffic-mirror-filter", "fill": {"TrafficMirrorFilterId": "TrafficMirrorFilterId"}}, {"type": "traffic-mirror-session", "fill": {}, "made": true}, {"type": "traffic-mirror-target", "fill": {"TrafficMirrorTargetId": "TrafficMirrorTargetId"}}]},
@@ -2299,7 +2299,7 @@
"ec2:DeleteSpotDatafeedSubscription": {"action": "ec2:DeleteSpotDatafeedSubscription", "types": [], "resources": []},
"ec2:DeleteSubnet": {"action": "ec2:DeleteSubnet", "types": ["subnet"], "resources": [{"type": "subnet", "fill": {"SubnetId": "SubnetId"}}]},
"ec2:DeleteSubnetCidrReservation": {"action": "ec2:DeleteSubnetCidrReservation", "types": [], "resources": []},
"ec2:DeleteTags": {"action": "ec2:DeleteTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-", "network-acl": "acl-", "network-interface": "eni-", "route-table": "rtb-", "security-group": "sg-"}}},
"ec2:DeleteTags": {"action": "ec2:DeleteTags", "types": ["application-status-check", "capacity-block", "capacity-manager-data-export", "capacity-reservation", "capacity-reservation-cancellation-quote", "capacity-reservation-fleet", "carrier-gateway", "client-vpn-endpoint", "coip-pool", "customer-gateway", "declarative-policies-report", "dedicated-host", "dhcp-options", "egress-only-internet-gateway", "elastic-gpu", "elastic-ip", "export-image-task", "export-instance-task", "fleet", "fpga-image", "host-reservation", "image", "image-usage-report", "import-image-task", "import-snapshot-task", "instance", "instance-connect-endpoint", "instance-event-window", "internet-gateway", "ipam", "ipam-external-resource-verification-token", "ipam-internet-registry-association", "ipam-policy", "ipam-pool", "ipam-pool-allocation", "ipam-prefix-list-resolver", "ipam-prefix-list-resolver-target", "ipam-resource-discovery", "ipam-resource-discovery-association", "ipam-scope", "ipv4pool-ec2", "ipv6pool-ec2", "key-pair", "launch-template", "local-gateway", "local-gateway-route-table", "local-gateway-route-table-virtual-interface-group-association", "local-gateway-route-table-vpc-association", "local-gateway-virtual-interface", "local-gateway-virtual-interface-group", "natgateway", "network-acl", "network-insights-access-scope", "network-insights-access-scope-analysis", "network-insights-analysis", "network-insights-path", "network-interface", "placement-group", "prefix-list", "replace-root-volume-task", "reserved-instances", "route-server", "route-server-endpoint", "route-server-peer", "route-table", "secondary-interface", "secondary-network", "secondary-subnet", "security-group", "security-group-rule", "snapshot", "spot-fleet-request", "spot-instances-request", "subnet", "subnet-cidr-reservation", "traffic-mirror-filter", "traffic-mirror-filter-rule", "traffic-mirror-session", "traffic-mirror-target", "transit-gateway", "transit-gateway-attachment", "transit-gateway-connect-peer", "transit-gateway-metering-policy", "transit-gateway-multicast-domain", "transit-gateway-policy-table", "transit-gateway-route-table", "transit-gateway-route-table-announcement", "verified-access-endpoint", "verified-access-endpoint-target", "verified-access-group", "verified-access-instance", "verified-access-policy", "verified-access-trust-provider", "volume", "vpc", "vpc-block-public-access-exclusion", "vpc-encryption-control", "vpc-endpoint", "vpc-endpoint-connection", "vpc-endpoint-service", "vpc-endpoint-service-permission", "vpc-flow-log", "vpc-peering-connection", "vpn-concentrator", "vpn-connection", "vpn-gateway"], "resources": [], "targets": {"member": "Resources[]", "query": "ResourceId", "prefixes": {"instance": "i-", "network-acl": "acl-", "network-interface": "eni-", "route-table": "rtb-", "security-group": "sg-", "vpc-endpoint": "vpce-"}}},
"ec2:DeleteTrafficMirrorFilter": {"action": "ec2:DeleteTrafficMirrorFilter", "types": ["traffic-mirror-filter"], "resources": [{"type": "traffic-mirror-filter", "fill": {"TrafficMirrorFilterId": "TrafficMirrorFilterId"}}]},
"ec2:DeleteTrafficMirrorFilterRule": {"action": "ec2:DeleteTrafficMirrorFilterRule", "types": ["traffic-mirror-filter", "traffic-mirror-filter-rule"], "resources": [{"type": "traffic-mirror-filter-rule", "fill": {"TrafficMirrorFilterRuleId": "TrafficMirrorFilterRuleId"}}]},
"ec2:DeleteTrafficMirrorSession": {"action": "ec2:DeleteTrafficMirrorSession", "types": ["traffic-mirror-session"], "resources": [{"type": "traffic-mirror-session", "fill": {"TrafficMirrorSessionId": "TrafficMirrorSessionId"}}]},
@@ -219,7 +219,7 @@ class RequestResourcesTest {
for (String operation : List.of("ec2:CreateTags", "ec2:DeleteTags")) {
List<String> expected = List.of(
"arn:aws-us-gov:ec2:us-gov-west-1:111111111111:network-interface/eni-11111111",
"*");
"arn:aws-us-gov:ec2:us-gov-west-1:111111111111:vpc-endpoint/vpce-22222222");
assertEquals(expected, RequestResources.ofBody(operation,
new ObjectMapper().readTree("{\"Resources\":[\"eni-11111111\",\"vpce-22222222\"]}"),
"aws-us-gov", "us-gov-west-1", "111111111111", null));
@@ -78,8 +78,8 @@ class Ec2NetworkInterfaceResourceArnTest {
}
@Test
void tagRequestsNameKnownInterfacesAndLeaveUncoveredEndpointIdsOnTheWildcard() {
assertResources(List.of(PREFIX + "network-interface/eni-11111111", "*"),
void tagRequestsNameKnownInterfacesAndEndpoints() {
assertResources(List.of(PREFIX + "network-interface/eni-11111111", PREFIX + "vpc-endpoint/vpce-11111111"),
resources("CreateTags", "ResourceId.1=eni-11111111&ResourceId.2=vpce-11111111"
+ "&Tag.1.Key=Name&Tag.1.Value=web"));
}
@@ -1181,6 +1181,56 @@ class IamRequestResourceEnforcementIntegrationTest {
+ "user@host\"}").post("/").then();
}
/**
* CreateTags and DeleteTags check each VPC endpoint their {@code ResourceId} list names on the endpoint's ARN, its
* {@code vpce-} prefix taken from the EC2 API reference, so a grant on one endpoint does not reach another in the
* batch, and a deny on it holds against a grant on {@code *} before any member of the batch is tagged.
*/
@Test
void aVpcEndpointIsTaggedOnItsArn() {
String vpc = admin("ec2").formParam("Action", "CreateVpc").formParam("Version", "2016-11-15")
.formParam("CidrBlock", "10.71.0.0/16").post("/").then().statusCode(200).extract()
.path("CreateVpcResponse.vpc.vpcId");
cleanup.register(() -> admin("ec2").formParam("Action", "DeleteVpc").formParam("Version", "2016-11-15")
.formParam("VpcId", vpc).post("/"));
String endpoint = vpcEndpoint(vpc);
String other = vpcEndpoint(vpc);
String arn = "arn:aws:ec2:" + REGION + ":" + ACCOUNT + ":vpc-endpoint/" + endpoint;
User user = user("res-vpce");
user.policy(allowOn("ec2:CreateTags", arn) + "," + allowOn("ec2:DeleteTags", arn));
ec2Tags(user, "CreateTags", endpoint).statusCode(200);
ec2Tags(user, "DeleteTags", endpoint).statusCode(200);
refused(ec2Tags(user, "CreateTags", endpoint, other), "ec2:CreateTags");
refused(ec2Tags(user, "DeleteTags", other), "ec2:DeleteTags");
user.policy(allowOn("ec2:CreateTags", "*") + "," + denyOn("ec2:CreateTags", arn));
refused(ec2Tags(user, "CreateTags", other, endpoint), "ec2:CreateTags");
admin("ec2").formParam("Action", "DescribeTags").formParam("Version", "2016-11-15")
.formParam("Filter.1.Name", "resource-id").formParam("Filter.1.Value.1", other).post("/").then()
.statusCode(200).body(not(containsString("<key>team</key>")));
ec2Tags(user, "CreateTags", other).statusCode(200);
}
private String vpcEndpoint(String vpc) {
String id = admin("ec2").formParam("Action", "CreateVpcEndpoint").formParam("Version", "2016-11-15")
.formParam("VpcId", vpc).formParam("ServiceName", "com.amazonaws." + REGION + ".s3")
.formParam("VpcEndpointType", "Gateway").post("/").then().statusCode(200).extract()
.path("CreateVpcEndpointResponse.vpcEndpoint.vpcEndpointId");
cleanup.register(() -> admin("ec2").formParam("Action", "DeleteVpcEndpoints").formParam("Version", "2016-11-15")
.formParam("VpcEndpointId.1", id).post("/"));
return id;
}
private static ValidatableResponse ec2Tags(User user, String operation, String... ids) {
RequestSpecification request = user.query("ec2", operation).formParam("Version", "2016-11-15")
.formParam("Tag.1.Key", "team").formParam("Tag.1.Value", "data");
for (int i = 0; i < ids.length; i++) {
request.formParam("ResourceId." + (i + 1), ids[i]);
}
return request.post("/").then();
}
@Test
void aCloudMapNamespaceAndServiceAreCheckedOnTheArnsTheirIdsGive() {
String namespaceId = cloudMapNamespace("res-ns-" + suffix());
+98
View File
@@ -0,0 +1,98 @@
#!/usr/bin/env python3
"""Copy identifier examples and their XML member paths from the EC2 API reference.
The generator matches these response paths against botocore's output shapes to learn
identifier prefixes. The fetched data supplies no handwritten resource-type mapping.
"""
from __future__ import annotations
import argparse
import html
import json
import re
import sys
import urllib.request
import xml.etree.ElementTree as ET
from datetime import datetime, timezone
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[2]
OUTPUT = REPO_ROOT / "tools/aws/sources/ec2-id-examples.json"
PAGES = {"CreateVpcEndpoint": "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpoint.html"}
ID_RE = re.compile(r"[a-z0-9]+-[0-9a-f]{8,17}")
def read_examples(operation: str, page: str) -> list[dict]:
"""Copy ID-valued leaves of response examples, retaining their serialized paths."""
found = []
responses = 0
def walk(node: ET.Element, path: list[str]) -> None:
if not len(node) and ID_RE.fullmatch((node.text or "").strip()):
found.append({"path": path, "value": node.text.strip()})
for child in node:
walk(child, path + [child.tag.rsplit("}", 1)[-1]])
for block in re.findall(r"<pre\b[^>]*>(.*?)</pre>", page, re.S):
text = html.unescape(re.sub(r"<[^>]+>", "", block)).strip()
if not re.match(r"<" + re.escape(operation) + r"Response(?:\s|>)", text):
continue
try:
root = ET.fromstring(text)
except ET.ParseError as error:
raise ValueError(f"{operation} has a malformed XML response example") from error
responses += 1
walk(root, [])
if not responses or not found:
raise ValueError(f"{operation} has no response identifier examples: the page layout changed")
return found
def fetch_url(url: str) -> str:
request = urllib.request.Request(url, headers={"User-Agent": "floci-tools"})
with urllib.request.urlopen(request, timeout=60) as response:
return response.read().decode("utf-8")
def build(pages: dict[str, str]) -> dict:
return {
"_source": {"fetcher": "tools/aws/fetch_ec2_id_examples.py",
"retrieved": datetime.now(timezone.utc).strftime("%Y-%m-%d"),
"pages": list(PAGES.values())},
"namespace": "ec2",
"operations": {operation: {"page": url, "examples": read_examples(operation, pages[url])}
for operation, url in PAGES.items()},
}
def stale(vendored: dict, pages: dict[str, str]) -> bool:
built = build(pages)
return any(vendored.get(key) != built[key] for key in ("namespace", "operations"))
def fetch_all(fetch=None) -> tuple[dict[str, str]]:
fetch = fetch or fetch_url
return ({url: fetch(url) for url in PAGES.values()},)
def main(argv: list[str] | None = None, fetch=fetch_url) -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--verify", action="store_true")
args = parser.parse_args(argv)
try:
pages, = fetch_all(fetch)
result = build(pages)
if args.verify:
if stale(json.loads(OUTPUT.read_text()), pages):
print("error: EC2 identifier examples changed; rerun tools/aws/fetch_ec2_id_examples.py", file=sys.stderr)
return 1
else:
OUTPUT.write_text(json.dumps(result, indent=2) + "\n")
except (OSError, ValueError, ET.ParseError) as error:
print(f"error: could not read EC2 identifier examples ({error})", file=sys.stderr)
return 2
return 0
if __name__ == "__main__":
sys.exit(main())
+101 -15
View File
@@ -16,6 +16,10 @@ builds their ARNs from the request. It comes from two sources, each answering wh
- botocore's model of each SDK client the reference lists the operation for (Apache-2.0,
https://github.com/boto/botocore, the pinned release), which gives the request's members.
Where botocore gives no identifier example, tools/aws/fetch_ec2_id_examples.py copies examples
from the EC2 API reference. Their XML paths are matched to modeled response members or shapes
to derive prefixes, without a handwritten prefix-to-resource mapping.
An operation is checked as its own action, or as the action of another name the reference gives it
(`regen_iam_authorized_actions.py` vendors that mapping). For each resource type that action acts
on, the request names a resource when one of its top-level members holds a string or a list of
@@ -322,12 +326,14 @@ import argparse
import json
import re
import sys
from dataclasses import dataclass
from datetime import datetime, timezone
from pathlib import Path
import fetch_apigateway_arn_formats
import fetch_athena_glue_ddl_permissions
import fetch_dynamodb_permissions
import fetch_ec2_id_examples
import fetch_iam_identifiers
import fetch_kms_api_permissions
import fetch_required_resource_types
@@ -548,13 +554,17 @@ PERMISSION_SOURCES: dict[str, Path] = {
"dynamodb": REPO_ROOT / "tools/aws/sources/dynamodb-permissions.json",
"iam": REPO_ROOT / "tools/aws/sources/iam-identifiers.json",
}
# The script that writes each namespace's permission source, whose pages `verify_permission_sources` reads it against.
# The script that writes each namespace's permission source, whose pages `verify_sources` reads it against.
PERMISSION_FETCHERS = {
"kms": fetch_kms_api_permissions,
"dynamodb": fetch_dynamodb_permissions,
"iam": fetch_iam_identifiers,
}
# Fetched API response examples supplement the identifier prefixes in botocore.
ID_EXAMPLE_SOURCES = {"ec2": fetch_ec2_id_examples.OUTPUT}
ID_EXAMPLE_FETCHERS = {"ec2": fetch_ec2_id_examples}
# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED_TYPE_SOURCE: which resource types each action of a granted namespace always acts on, as its page of the
# Service Authorization Reference marks them ("Resource types (*required)": DeleteGroupMembership's `Group*`,
@@ -2710,6 +2720,74 @@ def id_prefixes(models: dict[str, dict], kinds: tuple[str, ...],
return {kind: max(found, key=found.get) for kind, found in sorted(counts.items())}
def reference_id_prefixes(models: dict[str, dict], kinds: tuple[str, ...], source: dict) -> dict[str, str]:
"""Match copied response paths to modeled members or shapes, then read each ID's prefix.
EC2 response IDs often use the generic String shape: the model's VpcEndpointId
member still names the type, while its locationName matches the copied XML path.
"""
found: dict[str, str] = {}
model = models.get(source["namespace"])
if model is None:
return found
for operation, record in source["operations"].items():
output = model["operations"].get(operation, {}).get("output", {}).get("shape")
if output is None:
raise ValueError(f"{operation} has no modeled output for its reference examples")
for example in record["examples"]:
shape_name = output
member_name = None
for part in example["path"]:
shape = model["shapes"].get(shape_name, {})
if shape.get("type") == "structure":
matches = [(name, member["shape"]) for name, member in shape.get("members", {}).items()
if member.get("locationName", name) == part]
member_name, shape_name = matches[0] if len(matches) == 1 else (None, None)
elif shape.get("type") == "list" and part == shape["member"].get("locationName", "item"):
shape_name = shape["member"]["shape"]
else:
shape_name = None
if shape_name is None:
raise ValueError(f"{operation} reference path {example['path']} is not in botocore")
if model["shapes"].get(shape_name, {}).get("type") != "string":
raise ValueError(f"{operation} reference ID {example['path']} is not a string")
match = EXAMPLE_ID_RE.fullmatch(example["value"])
if not match:
raise ValueError(f"{operation} reference value is not an identifier: {example['value']}")
kind = next((kind for kind in kinds if stem(kind) in {
stem(shape_name), stem(member_name or "")}), None)
if kind:
prefix = match.group(1)
if kind in found and found[kind] != prefix:
raise ValueError(f"conflicting reference prefixes for {kind}")
found[kind] = prefix
return found
@dataclass(frozen=True)
class IdPrefixes:
prefixes: dict[str, str]
typed: frozenset[str]
def documented_id_prefixes(namespace: str, models: dict[str, dict],
examples: dict[str, dict] | None = None) -> IdPrefixes | None:
"""One prefix map, retaining which types botocore supports for typed-list readers."""
known = namespace_id_prefixes(namespace, models, examples)
if known is None:
return None
typed = frozenset(known)
path = ID_EXAMPLE_SOURCES.get(namespace)
if path is None:
return IdPrefixes(known, typed)
source = json.loads(path.read_text(encoding="utf-8"))
for kind, prefix in reference_id_prefixes(models, ID_TARGETS[namespace], source).items():
if kind in known and known[kind] != prefix:
raise ValueError(f"botocore and API reference prefixes disagree for {kind}")
known[kind] = prefix
return IdPrefixes(known, typed)
def namespace_id_prefixes(namespace: str, models: dict[str, dict],
examples: dict[str, dict] | None = None) -> dict[str, str] | None:
"""`id_prefixes` of the types `ID_TARGETS` reads by id in the namespace; None for a namespace it reads none of."""
@@ -2719,22 +2797,28 @@ def namespace_id_prefixes(namespace: str, models: dict[str, dict],
def id_targets(operation: str, types: list[str], formats: dict[str, str], models: dict[str, dict],
known: dict[str, str] | None = None) -> dict | None:
known: dict[str, str] | IdPrefixes | None = None) -> dict | None:
"""An id list, in model and EC2 Query spelling, with each type `ID_TARGETS` reads by id's discriminator, the prefix
botocore gives its ids (`id_prefixes`): the list a type's ARN variable names, when the request names nothing else
the action acts on, or else the request's list of whatever resources it acts on (`Resources`, of the tagging
calls). None when the request has neither, and the ordinary rules read it."""
calls). None when the request has neither, and the ordinary rules read it. A prefix only the vendored API
reference examples give (`documented_id_prefixes`) reads the tagging calls' generic list, never a typed list."""
configured = ID_TARGETS.get(namespace_of(operation))
if configured is None:
return None
known = known if known is not None else namespace_id_prefixes(namespace_of(operation), models)
if isinstance(known, IdPrefixes):
typed = known.typed
known = known.prefixes
else:
typed = frozenset(known)
found = None
for model in models.values():
spec = model["operations"].get(operation.split(":", 1)[1], {})
if "input" not in spec or "ec2" not in _protocols(model):
continue
members = model["shapes"][spec["input"]["shape"]].get("members", {})
variables = {variable for kind in known if kind in types and kind in formats
variables = {variable for kind in typed if kind in types and kind in formats
for variable in set(VARIABLE_RE.findall(formats[kind])) - KNOWN_VARIABLES}
candidates = [name for name, member in members.items()
if _strings(model, model["shapes"][member["shape"]]) == "[]"
@@ -2749,7 +2833,8 @@ def id_targets(operation: str, types: list[str], formats: dict[str, str], models
member = members.get(member_name) if member_name else None
if member is None or _strings(model, model["shapes"][member["shape"]]) != "[]":
continue
prefixes = {kind: prefix for kind, prefix in known.items() if kind in types and kind in formats}
prefixes = {kind: prefix for kind, prefix in known.items()
if kind in types and kind in formats and (not candidates or kind in typed)}
if candidates:
# A list a type's ARN variable names holds that type's ids alone, and it is all the request acts on only
# when the request names nothing else the action acts on: a launch's `SecurityGroupIds` sit beside its
@@ -2802,7 +2887,7 @@ def ec2_query_members(operation: str, models: dict[str, dict], named: set[str])
def entry_for(operation: str, upstream: dict, formats: dict[str, str], models: dict[str, dict],
known: dict[str, str] | None = None, forwarded: dict[str, dict] | None = None,
known: dict[str, str] | IdPrefixes | None = None, forwarded: dict[str, dict] | None = None,
routed: list[dict] | None = None) -> dict:
"""What the file says for one operation, `forwarded` being what the file records of each action a `MEASURED` entry
names, and `routed` the resources its routes name where AWS authorizes them as their method (`routed_resources`),
@@ -4606,8 +4691,8 @@ def build(documents: list[dict], provenance: str, data: Path, botocore: str) ->
for action in document.get("Actions", [])}
for document in documents if document["Name"] in PERMISSION_SOURCES}
operations = {}
prefixes = {namespace: namespace_id_prefixes(namespace, load_models(data, set(namespaces[namespace])),
load_examples(data, set(namespaces[namespace])))
prefixes = {namespace: documented_id_prefixes(namespace, load_models(data, set(namespaces[namespace])),
load_examples(data, set(namespaces[namespace])))
for namespace in ID_TARGETS if namespace in namespaces}
for operation, value in sorted(covered.items()):
models = load_models(data, set(namespaces[namespace_of(operation)]))
@@ -5260,8 +5345,8 @@ def derive(document: dict, data: Path) -> list[str]:
if document.get("pathFormats", {}) != path_formats:
problems.append(f"the file gives {json.dumps(document.get('pathFormats', {}))} as route types, the path "
f"sources and botocore give {json.dumps(path_formats)}")
prefixes = {namespace: namespace_id_prefixes(namespace, load_models(data, set(document["namespaces"][namespace])),
load_examples(data, set(document["namespaces"][namespace])))
prefixes = {namespace: documented_id_prefixes(namespace, load_models(data, set(document["namespaces"][namespace])),
load_examples(data, set(document["namespaces"][namespace])))
for namespace in ID_TARGETS if namespace in document["namespaces"]}
for operation, entry in document["operations"].items():
namespace = namespace_of(operation)
@@ -5332,12 +5417,12 @@ def verify_path_sources() -> list[str]:
return untrue
def verify_permission_sources() -> list[str]:
"""A vendored permission source whose pages AWS has changed."""
def verify_sources(sources: dict[str, Path], fetchers: dict) -> list[str]:
"""A vendored source whose pages AWS has changed."""
untrue: list[str] = []
for namespace, path in sorted(PERMISSION_SOURCES.items()):
for namespace, path in sorted(sources.items()):
source = json.loads(path.read_text(encoding="utf-8"))
fetcher = PERMISSION_FETCHERS[namespace]
fetcher = fetchers[namespace]
try:
changed = fetcher.stale(source, *fetcher.fetch_all())
except (OSError, ValueError) as e:
@@ -5444,7 +5529,8 @@ def main(argv: list[str] | None = None) -> int:
try:
untrue += verify_statements(document, documents)
untrue += verify_path_sources()
untrue += verify_permission_sources()
untrue += verify_sources({**PERMISSION_SOURCES, **ID_EXAMPLE_SOURCES},
{**PERMISSION_FETCHERS, **ID_EXAMPLE_FETCHERS})
untrue += verify_required_type_source()
except OSError as e:
print(f"error: {e}", file=sys.stderr)
+108
View File
@@ -0,0 +1,108 @@
{
"_source": {
"fetcher": "tools/aws/fetch_ec2_id_examples.py",
"retrieved": "2026-11-25",
"pages": [
"https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpoint.html"
]
},
"namespace": "ec2",
"operations": {
"CreateVpcEndpoint": {
"page": "https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpoint.html",
"examples": [
{
"path": [
"vpcEndpoint",
"vpcId"
],
"value": "vpc-1a2b3c4d"
},
{
"path": [
"vpcEndpoint",
"routeTableIdSet",
"item"
],
"value": "rtb-11aa22bb"
},
{
"path": [
"vpcEndpoint",
"vpcEndpointId"
],
"value": "vpce-abc12345"
},
{
"path": [
"vpcEndpoint",
"groupSet",
"item",
"groupId"
],
"value": "sg-11aa22bb"
},
{
"path": [
"vpcEndpoint",
"vpcEndpointId"
],
"value": "vpce-0324151a02f327ff5"
},
{
"path": [
"vpcEndpoint",
"subnetIdSet",
"item"
],
"value": "subnet-1a2b3c4d"
},
{
"path": [
"vpcEndpoint",
"networkInterfaceIdSet",
"item"
],
"value": "eni-cd1a3319"
},
{
"path": [
"vpcEndpoint",
"vpcId"
],
"value": "vpc-1a2b3c4d"
},
{
"path": [
"vpcEndpoint",
"vpcEndpointId"
],
"value": "vpce-bbbbbb2222222333"
},
{
"path": [
"vpcEndpoint",
"subnetIdSet",
"item"
],
"value": "subnet-aaaa1111bbbb22233"
},
{
"path": [
"vpcEndpoint",
"networkInterfaceIdSet",
"item"
],
"value": "eni-11111111222222aaa"
},
{
"path": [
"vpcEndpoint",
"vpcId"
],
"value": "vpc-11122223333344445"
}
]
}
}
}
+62
View File
@@ -0,0 +1,62 @@
import html
import json
import pytest
import fetch_ec2_id_examples as f
def page(xml):
return '<pre class="programlisting"><code>' + html.escape(xml) + '</code></pre>'
RESPONSE = '''<CreateVpcEndpointResponse xmlns="https://example.test/ec2">
<vpcEndpoint><vpcEndpointId>vpce-abc12345</vpcEndpointId>
<networkInterfaceIdSet><item>eni-cd1a3319</item></networkInterfaceIdSet>
<serviceName>com.amazonaws.us-east-1.s3</serviceName></vpcEndpoint>
</CreateVpcEndpointResponse>'''
def test_copies_response_paths_and_values_without_assigning_resource_types():
assert f.read_examples("CreateVpcEndpoint", page(RESPONSE)) == [
{"path": ["vpcEndpoint", "vpcEndpointId"], "value": "vpce-abc12345"},
{"path": ["vpcEndpoint", "networkInterfaceIdSet", "item"], "value": "eni-cd1a3319"},
]
def test_ignores_request_blocks_and_other_operations():
other = page(RESPONSE.replace("CreateVpcEndpointResponse", "OtherResponse"))
assert f.read_examples("CreateVpcEndpoint", other + page("VpcEndpointId=vpce-ffffffff") + page(RESPONSE)) == \
f.read_examples("CreateVpcEndpoint", page(RESPONSE))
@pytest.mark.parametrize("source", ["", page("not XML"), page(RESPONSE.replace("vpce-abc12345", "none")
.replace("eni-cd1a3319", "none"))])
def test_missing_response_identifiers_fail_closed(source):
with pytest.raises(ValueError):
f.read_examples("CreateVpcEndpoint", source)
def test_malformed_response_is_not_silently_omitted():
with pytest.raises(ValueError, match="malformed XML"):
f.read_examples("CreateVpcEndpoint", page(RESPONSE.replace("</vpcEndpoint>", "")))
def test_verification_detects_changed_examples_and_ignores_retrieval_date(tmp_path, monkeypatch):
output = tmp_path / "examples.json"
monkeypatch.setattr(f, "OUTPUT", output)
fetch = lambda url: page(RESPONSE)
assert f.main([], fetch) == 0
source = json.loads(output.read_text())
source["_source"]["retrieved"] = "2000-01-01"
output.write_text(json.dumps(source))
assert f.main(["--verify"], fetch) == 0
assert f.main(["--verify"], lambda url: page(RESPONSE.replace("vpce-abc12345", "vpce-ffffffff"))) == 1
def test_source_declares_namespace_and_pages_for_shared_verification():
source = f.build({url: page(RESPONSE) for url in f.PAGES.values()})
assert source["namespace"] == "ec2"
assert source["_source"]["pages"] == list(f.PAGES.values())
source["namespace"] = "other"
assert f.stale(source, {url: page(RESPONSE) for url in f.PAGES.values()})
+84 -10
View File
@@ -3426,12 +3426,14 @@ def test_an_operation_checked_as_several_actions_checks_each_resource_as_one_of_
def test_every_permission_source_is_written_by_its_own_fetcher():
assert set(r.PERMISSION_FETCHERS) == set(r.PERMISSION_SOURCES)
for namespace, path in r.PERMISSION_SOURCES.items():
assert r.PERMISSION_FETCHERS[namespace].OUTPUT == path, namespace
for sources, fetchers in ((r.PERMISSION_SOURCES, r.PERMISSION_FETCHERS),
(r.ID_EXAMPLE_SOURCES, r.ID_EXAMPLE_FETCHERS)):
assert set(fetchers) == set(sources)
for namespace, path in sources.items():
assert fetchers[namespace].OUTPUT == path, namespace
def test_each_permission_source_is_verified_against_the_pages_its_own_fetcher_reads(isolated, tmp_path):
def test_each_permission_source_is_verified_against_the_pages_its_own_fetcher_reads(tmp_path):
class Fetcher:
def __init__(self, page: str):
self.page = page
@@ -3447,12 +3449,10 @@ def test_each_permission_source_is_verified_against_the_pages_its_own_fetcher_re
sources[namespace] = tmp_path / f"{namespace}.json"
sources[namespace].write_text(json.dumps({"_source": {"pages": [f"https://{namespace}"],
"fetcher": f"fetch_{namespace}.py"}, "says": says}))
isolated.setattr(r, "PERMISSION_SOURCES", sources)
isolated.setattr(r, "PERMISSION_FETCHERS", {"first": Fetcher("kept"), "second": Fetcher("kept")})
assert r.verify_permission_sources() == []
isolated.setattr(r, "PERMISSION_FETCHERS", {"first": Fetcher("kept"), "second": Fetcher("changed")})
assert r.verify_permission_sources() == ["https://second and the pages they link to no longer give what "
"second.json holds for second: run fetch_second.py"]
assert r.verify_sources(sources, {"first": Fetcher("kept"), "second": Fetcher("kept")}) == []
assert r.verify_sources(sources, {"first": Fetcher("kept"), "second": Fetcher("changed")}) == [
"https://second and the pages they link to no longer give what second.json holds for second: run "
"fetch_second.py"]
# --------------------------------------------------------------------------- #
@@ -3673,3 +3673,77 @@ def test_a_resource_named_after_its_path_or_signed_for_is_checked():
{"type": "group", "fill": {"GroupNameWithPath": "NewGroupName"}, "renames": "GroupName"},
dict(signer, signer="yes"), dict(signer, types=["user", "group"]), dict(signer, fill={})):
assert r._resource_problems("iam:Op", bad, types, USERS_FORMATS), bad
def reference_endpoint_model():
return {"ec2": {"operations": {"CreateVpcEndpoint": {"output": {"shape": "Result"}}}, "shapes": {
"Result": {"type": "structure", "members": {"VpcEndpoint": {
"shape": "VpcEndpoint", "locationName": "vpcEndpoint"}}},
"VpcEndpoint": {"type": "structure", "members": {"VpcEndpointId": {
"shape": "VpcEndpointId", "locationName": "vpcEndpointId"}}},
"VpcEndpointId": {"type": "string"},
}}}
def reference_endpoint_source(value="vpce-abc12345"):
return {"namespace": "ec2", "operations": {"CreateVpcEndpoint": {"examples": [
{"path": ["vpcEndpoint", "vpcEndpointId"], "value": value}]}}}
def test_reference_prefix_comes_from_the_response_value_and_modeled_shape():
models = reference_endpoint_model()
assert r.reference_id_prefixes(models, ("vpc-endpoint",), reference_endpoint_source()) == {
"vpc-endpoint": "vpce-"}
assert r.reference_id_prefixes(models, ("vpc-endpoint",), reference_endpoint_source("changed-12345678")) == {
"vpc-endpoint": "changed-"}
# EC2 often gives an id the generic String shape: the member's name still names the type.
models["ec2"]["shapes"]["VpcEndpoint"]["members"]["VpcEndpointId"]["shape"] = "String"
models["ec2"]["shapes"]["String"] = {"type": "string"}
assert r.reference_id_prefixes(models, ("vpc-endpoint",), reference_endpoint_source()) == {
"vpc-endpoint": "vpce-"}
members = models["ec2"]["shapes"]["VpcEndpoint"]["members"]
members["UnrelatedId"] = members.pop("VpcEndpointId")
assert r.reference_id_prefixes(models, ("vpc-endpoint",), reference_endpoint_source()) == {}
def test_reference_example_path_drift_and_conflicting_prefixes_fail_closed():
models = reference_endpoint_model()
source = reference_endpoint_source()
source["operations"]["CreateVpcEndpoint"]["examples"][0]["path"] = ["missing"]
with pytest.raises(ValueError, match="not in botocore"):
r.reference_id_prefixes(models, ("vpc-endpoint",), source)
source = reference_endpoint_source()
source["operations"]["CreateVpcEndpoint"]["examples"] += reference_endpoint_source("other-12345678")[
"operations"]["CreateVpcEndpoint"]["examples"]
with pytest.raises(ValueError, match="conflicting"):
r.reference_id_prefixes(models, ("vpc-endpoint",), source)
def test_a_reference_prefix_joins_botocores_without_making_a_typed_list(monkeypatch, tmp_path):
source = tmp_path / "examples.json"
source.write_text(json.dumps(reference_endpoint_source()))
monkeypatch.setattr(r, "ID_EXAMPLE_SOURCES", {"ec2": source})
monkeypatch.setattr(r, "namespace_id_prefixes", lambda *args: {"instance": "i-"})
found = r.documented_id_prefixes("ec2", reference_endpoint_model())
assert found.prefixes == {"instance": "i-", "vpc-endpoint": "vpce-"}
assert found.typed == frozenset({"instance"})
monkeypatch.setattr(r, "namespace_id_prefixes", lambda *args: {"vpc-endpoint": "other-"})
with pytest.raises(ValueError, match="disagree"):
r.documented_id_prefixes("ec2", reference_endpoint_model())
def test_the_vendored_ec2_examples_give_tag_calls_the_endpoint_prefix_and_leave_endpoint_deletion_typed():
data, _ = r.resolve_botocore_data(None)
models = r.load_models(data, {"ec2"})
examples = r.load_examples(data, {"ec2"})
known = r.namespace_id_prefixes("ec2", models, examples)
merged = r.documented_id_prefixes("ec2", models, examples)
assert "vpc-endpoint" not in known
assert merged.prefixes["vpc-endpoint"] == "vpce-"
formats = {"vpc-endpoint": "arn:${Partition}:ec2:${Region}:${Account}:vpc-endpoint/${VpcEndpointId}"}
for operation in ("ec2:CreateTags", "ec2:DeleteTags"):
assert r.id_targets(operation, ["vpc-endpoint"], formats, models, merged)["prefixes"] == {
"vpc-endpoint": "vpce-"}
assert r.id_targets("ec2:DeleteVpcEndpoints", ["vpc-endpoint"], formats, models, merged) == \
r.id_targets("ec2:DeleteVpcEndpoints", ["vpc-endpoint"], formats, models, known)