No project description provided
Project description
Pulumi AWS API Gateway Component
Easily create AWS API Gateway Rest APIs using Pulumi. This component exposes the Crosswalk for AWS functionality documented at https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/ as a multi-language Pulumi Package available in all Pulumi languages.
Note: This package is not yet published to package managers, so SDKs must be bulilt and installed locally.
Python:
api = apigateway.RestAPI('api', routes=[
apigateway.RouteArgs(path="/", method="GET", event_handler=f),
apigateway.RouteArgs(path="/www", method="GET", local_path="www", index=False),
apigateway.RouteArgs(path="/integration", target=apigateway.TargetArgs(uri="https://www.google.com", type="http_proxy"))
])
pulumi.export('url', api.url)
Go:
getMethod := apigateway.MethodGET
restAPI, err := apigateway.NewRestAPI(ctx, "api", &apigateway.RestAPIArgs{
Routes: []apigateway.RouteArgs{
apigateway.RouteArgs{
Path: "/",
Method: &getMethod,
EventHandler: f,
},
},
})
TypeScript:
import * as apigateway from "@pulumi/aws-apigateway";
import * as aws from "@pulumi/aws";
const f = new aws.lambda.CallbackFunction("f", {
callback: async (ev, ctx) => {
console.log(JSON.stringify(ev));
return {
statusCode: 200,
body: "goodbye",
};
},
});
const api = new apigateway.RestAPI("api", {
routes: [{
path: "/",
method: "GET",
eventHandler: f,
}],
});
export const url = api.url;
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for pulumi_aws_apigateway-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a4fe739603a73fa323fedd8ef2b141c7eac8fcd5214408576684a9e4d9b25a0 |
|
MD5 | 2617f132930c4288df20b4d3f0716713 |
|
BLAKE2b-256 | 10e8d30e51d501de2c4db42493e165aa3081f981b46908e78a09f9bb92bf03c2 |