mirror of
https://github.com/awslabs/iam-policy-autopilot.git
synced 2026-04-26 00:15:57 +03:00
[PR #70] [MERGED] Use SDK info to find operation from method name #216
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/iam-policy-autopilot#216
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/awslabs/iam-policy-autopilot/pull/70
Author: @mschlaipfer
Created: 12/11/2025
Status: ✅ Merged
Merged: 12/11/2025
Merged by: @mschlaipfer
Base:
main← Head:fixes-66📝 Commits (1)
ee1c152fix: use SDK info to find operation from method name📊 Changes
9 files changed (+132 additions, -62 deletions)
View changed files
📝
iam-policy-autopilot-policy-generation/src/api/generate_policies.rs(+11 -1)📝
iam-policy-autopilot-policy-generation/src/enrichment/engine.rs(+10 -4)📝
iam-policy-autopilot-policy-generation/src/enrichment/resource_matcher.rs(+56 -27)📝
iam-policy-autopilot-policy-generation/src/enrichment/service_reference.rs(+28 -21)📝
iam-policy-autopilot-policy-generation/src/extraction/mod.rs(+1 -0)📝
iam-policy-autopilot-policy-generation/src/lib.rs(+17 -0)📝
iam-policy-autopilot-policy-generation/tests/go_extraction_integration_test.rs(+2 -2)📝
iam-policy-autopilot-policy-generation/tests/go_sdk_features_test.rs(+3 -3)📝
iam-policy-autopilot-policy-generation/tests/public_api_integration_test.rs(+4 -4)📄 Description
Issue #, if available: https://github.com/awslabs/iam-policy-autopilot/issues/66
Description of changes:
We now look up method names in the service reference when we detect the SDK type is boto3 (i.e., when the input files are Python). This fixes an issue where we wrongly converted method names to operation names via
convert_case'sto_case(Case::PascalCase)before, which fails for operations likeModifyDBCluster, where the snake_case method name ismodify_db_clusterand the conversion results inModifyDbCluster.For other SDKs we use the extracted method names as-is as the operation name. The conversion to PascalCase, also changed
ModifyDBClustertoModifyDbCluster, leading to the same error for Go, Typescript and Javascript.I introduced
SdkType::Boto3to follow the data the service reference provides, such asBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.