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 in the Pulumi AWS API Gateway guide as a package available in all Pulumi languages.
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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a8becefa7294e6a4df8851ea80d8d8e532f3ee68fe0d0d7c12127312e5758e9 |
|
MD5 | 58d75253fae281920f30dbc5a65e4f5a |
|
BLAKE2b-256 | bb62b9673bf408dd68152d45f8a57214172ddcd1b2a086cda967a26fc2a9aa93 |