ocean icon indicating copy to clipboard operation
ocean copied to clipboard

feat: Add AWS API Gateway REST API support to AWS-v3 integration

Open github-actions[bot] opened this issue 4 weeks ago • 0 comments

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_API to ObjectKind enum and apigateway to SupportedServices
  • Models: Created RestApiProperties and RestApi models with all relevant API Gateway attributes
  • Actions: Implemented three core actions:
    • ListRestApisAction: Processes initial list of REST APIs
    • GetRestApiDetailsAction: Fetches detailed API information with concurrent processing
    • GetRestApiTagsAction: Retrieves tags for REST APIs with proper error handling
  • Exporter: Created RestApiExporter with proper ResourceInspector integration and paginated resource fetching
  • Integration: Added resync handler in main.py using the standard ResyncAWSService pattern
  • Port Configuration:
    • Updated .port/spec.yaml to include the new kind
    • Added comprehensive blueprint with all API Gateway properties
    • Configured default mapping with proper ARN construction

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

github-actions[bot] avatar Oct 30 '25 12:10 github-actions[bot]