sparse-intern-71089
07/13/2020, 3:04 PMbillowy-army-68599
limited-solstice-34584
07/13/2020, 3:15 PMlimited-solstice-34584
07/13/2020, 3:15 PMonst api = new awsx.apigateway.API("macs-" + environment, {
stageName: environment,
routes: [
{
path: "/getmiscdata",
method: "GET",
eventHandler: getmiscdata,
apiKeyRequired: true,
},
{
path: "/getmiscdata",
method: "OPTIONS",
eventHandler: handlecors,
apiKeyRequired: true,
},
{
path: "/getallgames",
method: "GET",
eventHandler: getallgames,
apiKeyRequired: true,
},
{
path: "/getgamecategories",
method: "GET",
eventHandler: getgamecategories,
apiKeyRequired: true,
},
{
path: "/getcreditusagereport",
method: "GET",
eventHandler: getcreditusagereport,
apiKeyRequired: true,
},
{
path: "/getcreditvaluereport",
method: "GET",
eventHandler: getcreditvaluereport,
apiKeyRequired: true,
},
{
path: "/getuserbykey/{sessionkey}",
method: "GET",
eventHandler: getuserbykey,
apiKeyRequired: true,
},
{
path: "/getgameinfobyid/{gameid}",
method: "GET",
eventHandler: getgameinfobyid,
apiKeyRequired: true,
},
{
path: "/getheartbeatinfo/{sessionkey}",
method: "GET",
eventHandler: getheartbeatinfo,
apiKeyRequired: true,
},
{
path: "/getallmembers",
method: "GET",
eventHandler: getallmembers,
apiKeyRequired: true,
},
{
path: "/getlocationbypostalcode/{postalcode}",
method: "GET",
eventHandler: getlocationinfobypostalcode,
apiKeyRequired: true,
},
{
path: "/getversion",
method: "GET",
eventHandler: getversion,
apiKeyRequired: true,
},
],
gatewayResponses: {
DEFAULT_4XX: {
statusCode: 400,
responseTemplates: {
"application/json": '{"message":$context.error.messageString}',
},
responseParameters: {
"gatewayresponse.header.Access-Control-Allow-Origin": "'*'",
"gatewayresponse.header.Access-Control-Allow-Headers": "'*'",
"gatewayresponse.header.Access-Control-Allow-Methods": "'*'",
"gatewayresponse.header.Access-Control-Allow-Credentials": "'*'",
},
},
},
apiKeySource: "HEADER",
});
limited-solstice-34584
07/13/2020, 3:15 PMbillowy-army-68599
awsx
library because it's a more opinionated method. You might have to rewrite it using the lower level aws library, see the second link I postedlimited-solstice-34584
07/13/2020, 3:25 PMbillowy-army-68599
import
mechanism
https://www.pulumi.com/docs/guides/adopting/import/
It won't generate the code for you, but running pulumi preview will help you understand what you need to add as a resourcelimited-solstice-34584
07/13/2020, 3:27 PMlimited-solstice-34584
07/13/2020, 3:28 PMlimited-solstice-34584
07/13/2020, 3:33 PMbillowy-army-68599
limited-solstice-34584
07/13/2020, 3:38 PM