https://pulumi.com logo
#typescript
Title
# typescript
e

echoing-zebra-28421

07/20/2021, 4:56 PM
I have this example. It's one route with a method type post
Copy code
new aws.apigatewayv2.Route(
     test-route,
    {
      apiId: apigw.id,
      routeKey: "POST /api/pets",
      target: pulumi.interpolate`integrations/${integration.id}`,
    },
    { provider },
  );
But, I need to create a route to pass a parameter to the endpoint
Copy code
new aws.apigatewayv2.Route(
     test-route,
    {
      apiId: apigw.id,
      routeKey: "GET /api/pets/3",
      target: pulumi.interpolate`integrations/${integration.id}`,
    },
    { provider },
  );