feat: add API Gateway route testing and discovery

This commit is contained in:
Zakaria
2026-09-24 08:56:22 -04:00
parent 7e49be27f1
commit 9bbe80b5f2
10 changed files with 802 additions and 6 deletions
@@ -22,6 +22,9 @@ import type {
AppConfigHostedConfigurationVersion,
ApiGatewayLambdaRouteInput,
ApiGatewayLambdaRouteResult,
ApiGatewayTestRouteInput,
ApiGatewayTestRouteResult,
ApiGatewayRoutesResult,
DatabaseSnapshot,
KubernetesFargateProfile,
KubernetesNodegroup,
@@ -242,6 +245,22 @@ export class CloudProxyService {
return adapter.createApiGatewayLambdaRoute(apiId, input)
}
async testApiGatewayRoute(cloud: CloudProvider, apiId: string, input: ApiGatewayTestRouteInput): Promise<ApiGatewayTestRouteResult> {
const adapter = this.requireAdapter(cloud, 'apigateway')
if (!adapter.testApiGatewayRoute) {
throw new NotSupportedError(`API Gateway route testing is not supported for ${cloud}`)
}
return adapter.testApiGatewayRoute(apiId, input)
}
async listApiGatewayRoutes(cloud: CloudProvider, apiId: string): Promise<ApiGatewayRoutesResult> {
const adapter = this.requireAdapter(cloud, 'apigateway')
if (!adapter.listApiGatewayRoutes) {
throw new NotSupportedError(`API Gateway route discovery is not supported for ${cloud}`)
}
return adapter.listApiGatewayRoutes(apiId)
}
async updateResource(cloud: CloudProvider, service: CloudServiceType, id: string, input: UpdateResourceInput): Promise<CloudResource> {
const adapter = this.requireAdapter(cloud, service)
if (!adapter.update) throw new NotSupportedError(`Resource updates are not supported for ${cloud}/${service}`)