feat: add API Gateway route testing and discovery
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user