Created
April 25, 2020 16:56
-
-
Save joandvgv/8d20367143b16bf2c07c7915583dfabc to your computer and use it in GitHub Desktop.
Get Api gateway export from AWS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as AWS from "aws-sdk"; | |
AWS.config.region = "us-east-1"; | |
export const getExport = async (restApiId: string) => { | |
const apiGateway = new AWS.APIGateway(); | |
const parameters = { | |
exportType: "oas30", | |
restApiId, | |
stageName: "v1", | |
accepts: "application/json" | |
}; | |
return apiGateway.getExport(parameters).promise(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment