@pulumi/aws-apigateway 1.0.0 → 1.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -57
- package/package.json +4 -3
- package/provider.js +1 -1
- package/provider.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
|
+
[](https://github.com/pulumi/pulumi-aws-apigateway/actions)
|
|
2
|
+
[](https://slack.pulumi.com)
|
|
3
|
+
[](https://www.npmjs.com/package/@pulumi/aws-apigateway)
|
|
4
|
+
[](https://pypi.org/project/pulumi-aws-apigateway)
|
|
5
|
+
[](https://badge.fury.io/nu/pulumi.awsapigateway)
|
|
6
|
+
[](https://pkg.go.dev/github.com/pulumi/pulumi-aws-apigateway/sdk/go)
|
|
7
|
+
[](https://github.com/pulumi/pulumi-aws-apigateway/blob/master/LICENSE)
|
|
8
|
+
|
|
1
9
|
# Pulumi AWS API Gateway Component
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
The Pulumi AWS API Gateway library provides a Pulumi component that easily creates AWS API Gateway REST APIs. This component exposes the Crosswalk for AWS functionality documented in the [Pulumi AWS API Gateway guide](https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/) as a package available in all Pulumi languages.
|
|
12
|
+
|
|
13
|
+
<div>
|
|
14
|
+
<a href="https://www.pulumi.com/templates/serverless-application/aws/" title="Get Started">
|
|
15
|
+
<img src="https://www.pulumi.com/images/get-started.svg?" width="120">
|
|
16
|
+
</a>
|
|
17
|
+
</div>
|
|
4
18
|
|
|
5
19
|
## Installing
|
|
6
20
|
|
|
7
21
|
This package is available in many languages in the standard packaging formats.
|
|
8
22
|
|
|
9
|
-
### Node.js (
|
|
23
|
+
### Node.js (JavaScript/TypeScript)
|
|
10
24
|
|
|
11
25
|
To use from JavaScript or TypeScript in Node.js, install using either `npm`:
|
|
12
26
|
|
|
@@ -34,58 +48,9 @@ To use from .NET, install using `dotnet add package`:
|
|
|
34
48
|
|
|
35
49
|
dotnet add package Pulumi.AwsApiGateway
|
|
36
50
|
|
|
37
|
-
##
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
apigateway.RouteArgs(path="/", method="GET", event_handler=f),
|
|
44
|
-
apigateway.RouteArgs(path="/www", method="GET", local_path="www", index=False),
|
|
45
|
-
apigateway.RouteArgs(path="/integration", target=apigateway.TargetArgs(uri="https://www.google.com", type="http_proxy"))
|
|
46
|
-
])
|
|
47
|
-
|
|
48
|
-
pulumi.export('url', api.url)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Go:
|
|
52
|
-
|
|
53
|
-
```go
|
|
54
|
-
getMethod := apigateway.MethodGET
|
|
55
|
-
restAPI, err := apigateway.NewRestAPI(ctx, "api", &apigateway.RestAPIArgs{
|
|
56
|
-
Routes: []apigateway.RouteArgs{
|
|
57
|
-
apigateway.RouteArgs{
|
|
58
|
-
Path: "/",
|
|
59
|
-
Method: &getMethod,
|
|
60
|
-
EventHandler: f,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
})
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
TypeScript:
|
|
67
|
-
|
|
68
|
-
```ts
|
|
69
|
-
import * as apigateway from "@pulumi/aws-apigateway";
|
|
70
|
-
import * as aws from "@pulumi/aws";
|
|
71
|
-
|
|
72
|
-
const f = new aws.lambda.CallbackFunction("f", {
|
|
73
|
-
callback: async (ev, ctx) => {
|
|
74
|
-
console.log(JSON.stringify(ev));
|
|
75
|
-
return {
|
|
76
|
-
statusCode: 200,
|
|
77
|
-
body: "goodbye",
|
|
78
|
-
};
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
const api = new apigateway.RestAPI("api", {
|
|
83
|
-
routes: [{
|
|
84
|
-
path: "/",
|
|
85
|
-
method: "GET",
|
|
86
|
-
eventHandler: f,
|
|
87
|
-
}],
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
export const url = api.url;
|
|
91
|
-
```
|
|
51
|
+
## References
|
|
52
|
+
|
|
53
|
+
* [Tutorial](https://www.pulumi.com/templates/serverless-application/aws/)
|
|
54
|
+
* [API Reference Documentation](https://www.pulumi.com/registry/packages/aws-apigateway/api-docs/)
|
|
55
|
+
* [Examples](./examples)
|
|
56
|
+
* [Crosswalk for AWS - API Gateway Guide](https://www.pulumi.com/docs/guides/crosswalk/aws/api-gateway/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pulumi/aws-apigateway",
|
|
3
|
-
"version": "v1.0.
|
|
3
|
+
"version": "v1.1.0-alpha.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"pulumi",
|
|
6
6
|
"aws",
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
"category/cloud",
|
|
9
9
|
"kind/component"
|
|
10
10
|
],
|
|
11
|
+
"repository": "https://github.com/pulumi/pulumi-aws-apigateway",
|
|
11
12
|
"license": "Apache-2.0",
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsc",
|
|
14
|
-
"install": "node scripts/install-pulumi-plugin.js resource aws-apigateway v1.0.
|
|
15
|
+
"install": "node scripts/install-pulumi-plugin.js resource aws-apigateway v1.1.0-alpha.1"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@pulumi/aws": "^
|
|
18
|
+
"@pulumi/aws": "^6.0.0",
|
|
18
19
|
"@pulumi/pulumi": "^3.42.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
package/provider.js
CHANGED
|
@@ -14,7 +14,7 @@ class Provider extends pulumi.ProviderResource {
|
|
|
14
14
|
if (obj === undefined || obj === null) {
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
|
-
return obj['__pulumiType'] === Provider.__pulumiType;
|
|
17
|
+
return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Create a Provider resource with the given unique name, arguments, and options.
|
package/provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,QAAQ,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../provider.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,QAAS,SAAQ,MAAM,CAAC,gBAAgB;IAIjD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC;IAC/E,CAAC;IAGD;;;;;;OAMG;IACH,YAAY,IAAY,EAAE,IAAmB,EAAE,IAA6B;QACxE,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB;SACC;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC7D,CAAC;;AA9BL,4BA+BC;AA9BG,gBAAgB;AACO,qBAAY,GAAG,gBAAgB,CAAC"}
|