ocean
ocean copied to clipboard
feat: Add AWS API Gateway REST API support to AWS-v3 integration
Summary
This PR adds comprehensive support for AWS API Gateway REST APIs to the AWS-v3 integration following the established patterns and guidelines.
Changes Made
- Core Types: Added
API_GATEWAY_REST_APItoObjectKindenum andapigatewaytoSupportedServices - Models: Created
RestApiPropertiesandRestApimodels with all relevant API Gateway attributes - Actions: Implemented three core actions:
ListRestApisAction: Processes initial list of REST APIsGetRestApiDetailsAction: Fetches detailed API information with concurrent processingGetRestApiTagsAction: Retrieves tags for REST APIs with proper error handling
- Exporter: Created
RestApiExporterwith properResourceInspectorintegration and paginated resource fetching - Integration: Added resync handler in
main.pyusing the standardResyncAWSServicepattern - Port Configuration:
- Updated
.port/spec.yamlto include the new kind - Added comprehensive blueprint with all API Gateway properties
- Configured default mapping with proper ARN construction
- Updated
Implementation Highlights
✅ Follows AWS-v3 Guidelines: Implemented following the exact patterns outlined in ADDING_NEW_KINDS.md
✅ Concurrent Processing: Uses asyncio.gather for efficient API calls
✅ Error Handling: Proper exception handling with graceful degradation
✅ ResourceInspector Integration: Leverages the existing action orchestration framework
✅ Complete Port Integration: Full blueprint and mapping configuration
✅ ARN Construction: Proper API Gateway ARN format: arn:aws:apigateway:region::/restapis/{id}
API Gateway Properties Supported
- API ID, Name, Description, Version
- Creation date and endpoint configuration
- API key source and binary media types
- Compression settings and execute API endpoint configuration
- Policy and tags support
- Regional deployment with account relationships
Test Plan
- [ ] Integration testing with real AWS API Gateway resources
- [ ] Verify proper resource discovery and data mapping
- [ ] Test error handling with invalid/missing resources
- [ ] Confirm Port entity creation and relationships
🤖 Generated with Claude Code