in global-apigw/global_apigw/global_apigw_stack.py [0:0]
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
vpc = self._create_vpc()
global_http_api = http_api.HttpApi(self, 'global-api', api_name='global-http-api')
core.CfnOutput(self, "HttpApiEndpoint", value=global_http_api.url)
vpc_link = http_api.VpcLink(self, 'http-api-vpc-link', vpc=vpc)
dogname_vpce_service_name = helpers.get_env('DOGNAME_SERVICE_NAME')
vpce_helpers.setup_vpce_integration(
self,
name="dog-svc",
vpc=vpc,
vpc_endpoint_service_name=dogname_vpce_service_name,
vpc_link=vpc_link,
http_api=global_http_api,
health_check_path="/dogs",
integration_port=8080,
routes=["/dogs/females", "/dogs/males", "/dogs"],
)
todo_vpce_service_name = helpers.get_env('TODO_SERVICE_NAME')
vpce_helpers.setup_vpce_integration(
self,
name="todo-svc",
vpc=vpc,
vpc_endpoint_service_name=todo_vpce_service_name,
vpc_link=vpc_link,
http_api=global_http_api,
health_check_path="/todo",
integration_port=8080,
routes=["/todo", "/todo/{todoId}"],
)