@aws-cdk/aws-lambda-python-alpha 2.3.0-alpha.0 → 2.4.0-alpha.0
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/.jsii +184 -52
- package/.jsii.tabl.json +375 -79
- package/.warnings.jsii.js +18 -12
- package/LICENSE +1 -1
- package/NOTICE +1 -1
- package/README.md +103 -23
- package/lib/Dockerfile +7 -2
- package/lib/bundling.d.ts +15 -53
- package/lib/bundling.js +47 -60
- package/lib/function.d.ts +20 -50
- package/lib/function.js +14 -20
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/layer.d.ts +12 -1
- package/lib/layer.js +4 -3
- package/lib/packaging.d.ts +40 -0
- package/lib/packaging.js +61 -0
- package/lib/types.d.ts +79 -0
- package/lib/types.js +3 -0
- package/package.json +6 -6
- package/rosetta/default.ts-fixture +1 -1
- package/lib/Dockerfile.dependencies +0 -22
package/.jsii.tabl.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2",
|
|
3
|
-
"toolVersion": "1.
|
|
3
|
+
"toolVersion": "1.50.0",
|
|
4
4
|
"snippets": {
|
|
5
|
-
"
|
|
5
|
+
"5044db3aa2cbd19f8d92b0e4571533d0c3964a4debb73355fc0b1849f831db50": {
|
|
6
6
|
"translations": {
|
|
7
7
|
"python": {
|
|
8
|
-
"source": "lambda_.PythonFunction(self, \"MyFunction\",\n entry=\"/path/to/my/function\", # required\n index=\"my_index.py\", # optional, defaults to 'index.py'\n handler=\"my_exported_func\"
|
|
8
|
+
"source": "lambda_.PythonFunction(self, \"MyFunction\",\n entry=\"/path/to/my/function\", # required\n runtime=Runtime.PYTHON_3_8, # required\n index=\"my_index.py\", # optional, defaults to 'index.py'\n handler=\"my_exported_func\"\n)",
|
|
9
9
|
"version": "1"
|
|
10
10
|
},
|
|
11
11
|
"csharp": {
|
|
12
|
-
"source": "new PythonFunction(this, \"MyFunction\", new PythonFunctionProps {\n Entry = \"/path/to/my/function\", // required\n Index = \"my_index.py\", // optional, defaults to 'index.py'\n Handler = \"my_exported_func\"
|
|
12
|
+
"source": "new PythonFunction(this, \"MyFunction\", new PythonFunctionProps {\n Entry = \"/path/to/my/function\", // required\n Runtime = Runtime.PYTHON_3_8, // required\n Index = \"my_index.py\", // optional, defaults to 'index.py'\n Handler = \"my_exported_func\"\n});",
|
|
13
13
|
"version": "1"
|
|
14
14
|
},
|
|
15
15
|
"java": {
|
|
16
|
-
"source": "PythonFunction.Builder.create(this, \"MyFunction\")\n .entry(\"/path/to/my/function\") // required\n .index(\"my_index.py\") // optional, defaults to 'index.py'\n .handler(\"my_exported_func\")
|
|
16
|
+
"source": "PythonFunction.Builder.create(this, \"MyFunction\")\n .entry(\"/path/to/my/function\") // required\n .runtime(Runtime.PYTHON_3_8) // required\n .index(\"my_index.py\") // optional, defaults to 'index.py'\n .handler(\"my_exported_func\")\n .build();",
|
|
17
17
|
"version": "1"
|
|
18
18
|
},
|
|
19
19
|
"$": {
|
|
20
|
-
"source": "new lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n
|
|
20
|
+
"source": "new lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n runtime: Runtime.PYTHON_3_8, // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n});",
|
|
21
21
|
"version": "0"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
37
37
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
38
38
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
39
|
-
"aws-cdk-lib.aws_lambda.Runtime#
|
|
39
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
40
40
|
],
|
|
41
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n
|
|
41
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function', // required\n runtime: Runtime.PYTHON_3_8, // required\n index: 'my_index.py', // optional, defaults to 'index.py'\n handler: 'my_exported_func', // optional, defaults to 'handler'\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
42
42
|
"syntaxKindCounter": {
|
|
43
43
|
"10": 4,
|
|
44
44
|
"75": 8,
|
|
@@ -49,24 +49,24 @@
|
|
|
49
49
|
"226": 1,
|
|
50
50
|
"281": 4
|
|
51
51
|
},
|
|
52
|
-
"fqnsFingerprint": "
|
|
52
|
+
"fqnsFingerprint": "5e69e8edabbd682e49994175d22e01c2131977b2a121b195e864567619541789"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"53686c43ad7160036474e74010ea12f31c3ff817524e232264f2795823254c1a": {
|
|
55
55
|
"translations": {
|
|
56
56
|
"python": {
|
|
57
|
-
"source": "lambda_.
|
|
57
|
+
"source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
|
|
58
58
|
"version": "1"
|
|
59
59
|
},
|
|
60
60
|
"csharp": {
|
|
61
|
-
"source": "new
|
|
61
|
+
"source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
|
|
62
62
|
"version": "1"
|
|
63
63
|
},
|
|
64
64
|
"java": {
|
|
65
|
-
"source": "
|
|
65
|
+
"source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
|
|
66
66
|
"version": "1"
|
|
67
67
|
},
|
|
68
68
|
"$": {
|
|
69
|
-
"source": "new lambda.
|
|
69
|
+
"source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
|
|
70
70
|
"version": "0"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
@@ -77,7 +77,54 @@
|
|
|
77
77
|
},
|
|
78
78
|
"field": {
|
|
79
79
|
"field": "markdown",
|
|
80
|
-
"line":
|
|
80
|
+
"line": 46
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"didCompile": true,
|
|
84
|
+
"fqnsReferenced": [
|
|
85
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
86
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
87
|
+
],
|
|
88
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
89
|
+
"syntaxKindCounter": {
|
|
90
|
+
"10": 2,
|
|
91
|
+
"75": 3,
|
|
92
|
+
"104": 1,
|
|
93
|
+
"193": 1,
|
|
94
|
+
"194": 1,
|
|
95
|
+
"197": 1,
|
|
96
|
+
"226": 1,
|
|
97
|
+
"281": 1
|
|
98
|
+
},
|
|
99
|
+
"fqnsFingerprint": "53bf1d93ec833d865949647787c10b9d63377be0706586f2fea0614198be0e59"
|
|
100
|
+
},
|
|
101
|
+
"5607c1746237addcc7a2cfa766894235cce9b700cdd5ea97a7e88222560655b7": {
|
|
102
|
+
"translations": {
|
|
103
|
+
"python": {
|
|
104
|
+
"source": "lambda_.PythonFunction(self, \"MyFunction\",\n entry=\"/path/to/my/function\",\n runtime=Runtime.PYTHON_3_8,\n layers=[\n lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n )\n ]\n)",
|
|
105
|
+
"version": "1"
|
|
106
|
+
},
|
|
107
|
+
"csharp": {
|
|
108
|
+
"source": "new PythonFunction(this, \"MyFunction\", new PythonFunctionProps {\n Entry = \"/path/to/my/function\",\n Runtime = Runtime.PYTHON_3_8,\n Layers = new [] {\n new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n }) }\n});",
|
|
109
|
+
"version": "1"
|
|
110
|
+
},
|
|
111
|
+
"java": {
|
|
112
|
+
"source": "PythonFunction.Builder.create(this, \"MyFunction\")\n .entry(\"/path/to/my/function\")\n .runtime(Runtime.PYTHON_3_8)\n .layers(List.of(\n PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build()))\n .build();",
|
|
113
|
+
"version": "1"
|
|
114
|
+
},
|
|
115
|
+
"$": {
|
|
116
|
+
"source": "new lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});",
|
|
117
|
+
"version": "0"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"location": {
|
|
121
|
+
"api": {
|
|
122
|
+
"api": "moduleReadme",
|
|
123
|
+
"moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
|
|
124
|
+
},
|
|
125
|
+
"field": {
|
|
126
|
+
"field": "markdown",
|
|
127
|
+
"line": 54
|
|
81
128
|
}
|
|
82
129
|
},
|
|
83
130
|
"didCompile": true,
|
|
@@ -85,38 +132,277 @@
|
|
|
85
132
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
86
133
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
87
134
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
88
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
135
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps",
|
|
136
|
+
"aws-cdk-lib.aws_lambda.Runtime",
|
|
137
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
89
138
|
],
|
|
90
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
139
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, 'MyFunction', {\n entry: '/path/to/my/function',\n runtime: Runtime.PYTHON_3_8,\n layers: [\n new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n }),\n ],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
91
140
|
"syntaxKindCounter": {
|
|
92
141
|
"10": 4,
|
|
93
|
-
"75":
|
|
142
|
+
"75": 10,
|
|
94
143
|
"104": 2,
|
|
95
144
|
"192": 1,
|
|
96
145
|
"193": 2,
|
|
97
|
-
"194":
|
|
146
|
+
"194": 3,
|
|
98
147
|
"197": 2,
|
|
99
148
|
"226": 1,
|
|
100
|
-
"281":
|
|
149
|
+
"281": 4
|
|
150
|
+
},
|
|
151
|
+
"fqnsFingerprint": "038b8cc32540da13c6c471651e4f84bc0b82970ac90b00438f9024d2395a7a89"
|
|
152
|
+
},
|
|
153
|
+
"f263241052727b50b49ec356568b7a69019d835dfc04249cef6b843690d6a71c": {
|
|
154
|
+
"translations": {
|
|
155
|
+
"python": {
|
|
156
|
+
"source": "entry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(\n build_args={\"PIP_INDEX_URL\": \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\": \"https://your.extra-index.url/simple/\"}\n )\n)",
|
|
157
|
+
"version": "1"
|
|
158
|
+
},
|
|
159
|
+
"csharp": {
|
|
160
|
+
"source": "string entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions {\n BuildArgs = new Dictionary<string, string> { { \"PIP_INDEX_URL\", \"https://your.index.url/simple/\" }, { \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\" } }\n }\n});",
|
|
161
|
+
"version": "1"
|
|
162
|
+
},
|
|
163
|
+
"java": {
|
|
164
|
+
"source": "String entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder()\n .buildArgs(Map.of(\"PIP_INDEX_URL\", \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\"))\n .build())\n .build();",
|
|
165
|
+
"version": "1"
|
|
166
|
+
},
|
|
167
|
+
"$": {
|
|
168
|
+
"source": "const entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});",
|
|
169
|
+
"version": "0"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"location": {
|
|
173
|
+
"api": {
|
|
174
|
+
"api": "moduleReadme",
|
|
175
|
+
"moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
|
|
176
|
+
},
|
|
177
|
+
"field": {
|
|
178
|
+
"field": "markdown",
|
|
179
|
+
"line": 122
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"didCompile": true,
|
|
183
|
+
"fqnsReferenced": [
|
|
184
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
185
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
186
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
187
|
+
"aws-cdk-lib.DockerImage",
|
|
188
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
189
|
+
"aws-cdk-lib.aws_lambda.Runtime",
|
|
190
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
191
|
+
],
|
|
192
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
193
|
+
"syntaxKindCounter": {
|
|
194
|
+
"10": 4,
|
|
195
|
+
"75": 15,
|
|
196
|
+
"104": 1,
|
|
197
|
+
"193": 3,
|
|
198
|
+
"194": 3,
|
|
199
|
+
"196": 1,
|
|
200
|
+
"197": 1,
|
|
201
|
+
"225": 2,
|
|
202
|
+
"226": 1,
|
|
203
|
+
"242": 2,
|
|
204
|
+
"243": 2,
|
|
205
|
+
"281": 5,
|
|
206
|
+
"282": 1
|
|
101
207
|
},
|
|
102
|
-
"fqnsFingerprint": "
|
|
208
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
103
209
|
},
|
|
104
|
-
"
|
|
210
|
+
"7300f4badf25be82206db2ddea0d127c48665c4ca57e1030819c01fd03375d05": {
|
|
105
211
|
"translations": {
|
|
106
212
|
"python": {
|
|
107
|
-
"source": "
|
|
213
|
+
"source": "entry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(image=image)\n)",
|
|
108
214
|
"version": "1"
|
|
109
215
|
},
|
|
110
216
|
"csharp": {
|
|
111
|
-
"source": "
|
|
217
|
+
"source": "string entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions { Image = image }\n});",
|
|
112
218
|
"version": "1"
|
|
113
219
|
},
|
|
114
220
|
"java": {
|
|
115
|
-
"source": "
|
|
221
|
+
"source": "String entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder().image(image).build())\n .build();",
|
|
116
222
|
"version": "1"
|
|
117
223
|
},
|
|
118
224
|
"$": {
|
|
119
|
-
"source": "
|
|
225
|
+
"source": "const entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: { image },\n});",
|
|
226
|
+
"version": "0"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"location": {
|
|
230
|
+
"api": {
|
|
231
|
+
"api": "moduleReadme",
|
|
232
|
+
"moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
|
|
233
|
+
},
|
|
234
|
+
"field": {
|
|
235
|
+
"field": "markdown",
|
|
236
|
+
"line": 137
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"didCompile": true,
|
|
240
|
+
"fqnsReferenced": [
|
|
241
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
242
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
243
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
244
|
+
"aws-cdk-lib.DockerImage",
|
|
245
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
246
|
+
"aws-cdk-lib.aws_lambda.Runtime",
|
|
247
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
248
|
+
],
|
|
249
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: { image },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
250
|
+
"syntaxKindCounter": {
|
|
251
|
+
"10": 2,
|
|
252
|
+
"75": 13,
|
|
253
|
+
"104": 1,
|
|
254
|
+
"193": 2,
|
|
255
|
+
"194": 3,
|
|
256
|
+
"196": 1,
|
|
257
|
+
"197": 1,
|
|
258
|
+
"225": 2,
|
|
259
|
+
"226": 1,
|
|
260
|
+
"242": 2,
|
|
261
|
+
"243": 2,
|
|
262
|
+
"281": 2,
|
|
263
|
+
"282": 2
|
|
264
|
+
},
|
|
265
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
266
|
+
},
|
|
267
|
+
"3b28361dfadd6daca165162a42c06bce31bc977911dc6cb37fd4212bf3c53fba": {
|
|
268
|
+
"translations": {
|
|
269
|
+
"python": {
|
|
270
|
+
"source": "from child_process import exec_sync\n\n\nentry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\ndomain = \"my-domain\"\ndomain_owner = \"111122223333\"\nrepo_name = \"my_repo\"\nregion = \"us-east-1\"\ncode_artifact_auth_token = exec_sync(f\"aws codeartifact get-authorization-token --domain {domain} --domain-owner {domainOwner} --query authorizationToken --output text\").to_string().trim()\n\nindex_url = f\"https://aws:{codeArtifactAuthToken}@{domain}-{domainOwner}.d.codeartifact.{region}.amazonaws.com/pypi/{repoName}/simple/\"\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(\n build_args={\"PIP_INDEX_URL\": index_url}\n )\n)",
|
|
271
|
+
"version": "1"
|
|
272
|
+
},
|
|
273
|
+
"csharp": {
|
|
274
|
+
"source": "using Child.Process;\n\n\nstring entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nstring domain = \"my-domain\";\nstring domainOwner = \"111122223333\";\nstring repoName = \"my_repo\";\nstring region = \"us-east-1\";\nstring codeArtifactAuthToken = ExecSync($\"aws codeartifact get-authorization-token --domain {domain} --domain-owner {domainOwner} --query authorizationToken --output text\").ToString().Trim();\n\nstring indexUrl = $\"https://aws:{codeArtifactAuthToken}@{domain}-{domainOwner}.d.codeartifact.{region}.amazonaws.com/pypi/{repoName}/simple/\";\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions {\n BuildArgs = new Dictionary<string, string> { { \"PIP_INDEX_URL\", indexUrl } }\n }\n});",
|
|
275
|
+
"version": "1"
|
|
276
|
+
},
|
|
277
|
+
"java": {
|
|
278
|
+
"source": "import child.process.execSync;\n\n\nString entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nString domain = \"my-domain\";\nString domainOwner = \"111122223333\";\nString repoName = \"my_repo\";\nString region = \"us-east-1\";\nString codeArtifactAuthToken = execSync(String.format(\"aws codeartifact get-authorization-token --domain %s --domain-owner %s --query authorizationToken --output text\", domain, domainOwner)).toString().trim();\n\nString indexUrl = String.format(\"https://aws:%s@%s-%s.d.codeartifact.%s.amazonaws.com/pypi/%s/simple/\", codeArtifactAuthToken, domain, domainOwner, region, repoName);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder()\n .buildArgs(Map.of(\"PIP_INDEX_URL\", indexUrl))\n .build())\n .build();",
|
|
279
|
+
"version": "1"
|
|
280
|
+
},
|
|
281
|
+
"$": {
|
|
282
|
+
"source": "import { execSync } from 'child_process';\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});",
|
|
283
|
+
"version": "0"
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"location": {
|
|
287
|
+
"api": {
|
|
288
|
+
"api": "moduleReadme",
|
|
289
|
+
"moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
|
|
290
|
+
},
|
|
291
|
+
"field": {
|
|
292
|
+
"field": "markdown",
|
|
293
|
+
"line": 152
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"didCompile": true,
|
|
297
|
+
"fqnsReferenced": [
|
|
298
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
299
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
300
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
301
|
+
"aws-cdk-lib.DockerImage",
|
|
302
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
303
|
+
"aws-cdk-lib.aws_lambda.Runtime",
|
|
304
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
305
|
+
],
|
|
306
|
+
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport { execSync } from 'child_process';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nconst domain = 'my-domain';\nconst domainOwner = '111122223333';\nconst repoName = 'my_repo';\nconst region = 'us-east-1';\nconst codeArtifactAuthToken = execSync(`aws codeartifact get-authorization-token --domain ${domain} --domain-owner ${domainOwner} --query authorizationToken --output text`).toString().trim();\n\nconst indexUrl = `https://aws:${codeArtifactAuthToken}@${domain}-${domainOwner}.d.codeartifact.${region}.amazonaws.com/pypi/${repoName}/simple/`;\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: indexUrl },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
307
|
+
"syntaxKindCounter": {
|
|
308
|
+
"10": 7,
|
|
309
|
+
"15": 2,
|
|
310
|
+
"16": 5,
|
|
311
|
+
"17": 2,
|
|
312
|
+
"75": 32,
|
|
313
|
+
"104": 1,
|
|
314
|
+
"193": 3,
|
|
315
|
+
"194": 5,
|
|
316
|
+
"196": 4,
|
|
317
|
+
"197": 1,
|
|
318
|
+
"211": 2,
|
|
319
|
+
"221": 7,
|
|
320
|
+
"225": 8,
|
|
321
|
+
"226": 1,
|
|
322
|
+
"242": 8,
|
|
323
|
+
"243": 8,
|
|
324
|
+
"254": 1,
|
|
325
|
+
"255": 1,
|
|
326
|
+
"257": 1,
|
|
327
|
+
"258": 1,
|
|
328
|
+
"281": 4,
|
|
329
|
+
"282": 1,
|
|
330
|
+
"290": 1
|
|
331
|
+
},
|
|
332
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
333
|
+
},
|
|
334
|
+
"8c6e45181f0dbc7b76c7757eb559a6a2e14089f3c0d142067ef510dac8445b89": {
|
|
335
|
+
"translations": {
|
|
336
|
+
"python": {
|
|
337
|
+
"source": "entry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(\n build_args={\"PIP_INDEX_URL\": \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\": \"https://your.extra-index.url/simple/\"}\n )\n)",
|
|
338
|
+
"version": "1"
|
|
339
|
+
},
|
|
340
|
+
"csharp": {
|
|
341
|
+
"source": "string entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions {\n BuildArgs = new Dictionary<string, string> { { \"PIP_INDEX_URL\", \"https://your.index.url/simple/\" }, { \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\" } }\n }\n});",
|
|
342
|
+
"version": "1"
|
|
343
|
+
},
|
|
344
|
+
"java": {
|
|
345
|
+
"source": "String entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder()\n .buildArgs(Map.of(\"PIP_INDEX_URL\", \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\"))\n .build())\n .build();",
|
|
346
|
+
"version": "1"
|
|
347
|
+
},
|
|
348
|
+
"$": {
|
|
349
|
+
"source": "const entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});",
|
|
350
|
+
"version": "0"
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"location": {
|
|
354
|
+
"api": {
|
|
355
|
+
"api": "type",
|
|
356
|
+
"fqn": "@aws-cdk/aws-lambda-python-alpha.BundlingOptions"
|
|
357
|
+
},
|
|
358
|
+
"field": {
|
|
359
|
+
"field": "example"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"didCompile": true,
|
|
363
|
+
"fqnsReferenced": [
|
|
364
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
365
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
366
|
+
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
367
|
+
"aws-cdk-lib.DockerImage",
|
|
368
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
369
|
+
"aws-cdk-lib.aws_lambda.Runtime",
|
|
370
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
371
|
+
],
|
|
372
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
373
|
+
"syntaxKindCounter": {
|
|
374
|
+
"10": 4,
|
|
375
|
+
"75": 15,
|
|
376
|
+
"104": 1,
|
|
377
|
+
"193": 3,
|
|
378
|
+
"194": 3,
|
|
379
|
+
"196": 1,
|
|
380
|
+
"197": 1,
|
|
381
|
+
"225": 2,
|
|
382
|
+
"226": 1,
|
|
383
|
+
"242": 2,
|
|
384
|
+
"243": 2,
|
|
385
|
+
"281": 5,
|
|
386
|
+
"282": 1
|
|
387
|
+
},
|
|
388
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
389
|
+
},
|
|
390
|
+
"1fe68738b650f042a6ca8c4370a73d0a12f94c263535d18a6fcf558138da45b9": {
|
|
391
|
+
"translations": {
|
|
392
|
+
"python": {
|
|
393
|
+
"source": "entry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(\n build_args={\"PIP_INDEX_URL\": \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\": \"https://your.extra-index.url/simple/\"}\n )\n)",
|
|
394
|
+
"version": "1"
|
|
395
|
+
},
|
|
396
|
+
"csharp": {
|
|
397
|
+
"source": "string entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions {\n BuildArgs = new Dictionary<string, string> { { \"PIP_INDEX_URL\", \"https://your.index.url/simple/\" }, { \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\" } }\n }\n});",
|
|
398
|
+
"version": "1"
|
|
399
|
+
},
|
|
400
|
+
"java": {
|
|
401
|
+
"source": "String entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder()\n .buildArgs(Map.of(\"PIP_INDEX_URL\", \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\"))\n .build())\n .build();",
|
|
402
|
+
"version": "1"
|
|
403
|
+
},
|
|
404
|
+
"$": {
|
|
405
|
+
"source": "const entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});",
|
|
120
406
|
"version": "0"
|
|
121
407
|
}
|
|
122
408
|
},
|
|
@@ -131,40 +417,48 @@
|
|
|
131
417
|
},
|
|
132
418
|
"didCompile": true,
|
|
133
419
|
"fqnsReferenced": [
|
|
420
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
134
421
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
135
422
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
423
|
+
"aws-cdk-lib.DockerImage",
|
|
424
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
136
425
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
137
|
-
"aws-cdk-lib.aws_lambda.Runtime#
|
|
426
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
138
427
|
],
|
|
139
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, '
|
|
428
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
140
429
|
"syntaxKindCounter": {
|
|
141
430
|
"10": 4,
|
|
142
|
-
"75":
|
|
431
|
+
"75": 15,
|
|
143
432
|
"104": 1,
|
|
144
|
-
"193":
|
|
145
|
-
"194":
|
|
433
|
+
"193": 3,
|
|
434
|
+
"194": 3,
|
|
435
|
+
"196": 1,
|
|
146
436
|
"197": 1,
|
|
437
|
+
"225": 2,
|
|
147
438
|
"226": 1,
|
|
148
|
-
"
|
|
439
|
+
"242": 2,
|
|
440
|
+
"243": 2,
|
|
441
|
+
"281": 5,
|
|
442
|
+
"282": 1
|
|
149
443
|
},
|
|
150
|
-
"fqnsFingerprint": "
|
|
444
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
151
445
|
},
|
|
152
|
-
"
|
|
446
|
+
"1487ff584727a1589c5476ca3c4df23801dbe200acd7d18d1bda015d3ea3244c": {
|
|
153
447
|
"translations": {
|
|
154
448
|
"python": {
|
|
155
|
-
"source": "
|
|
449
|
+
"source": "entry = \"/path/to/function\"\nimage = DockerImage.from_build(entry)\n\nlambda_.PythonFunction(self, \"function\",\n entry=entry,\n runtime=Runtime.PYTHON_3_8,\n bundling=lambda.BundlingOptions(\n build_args={\"PIP_INDEX_URL\": \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\": \"https://your.extra-index.url/simple/\"}\n )\n)",
|
|
156
450
|
"version": "1"
|
|
157
451
|
},
|
|
158
452
|
"csharp": {
|
|
159
|
-
"source": "
|
|
453
|
+
"source": "string entry = \"/path/to/function\";\nDockerImage image = DockerImage.FromBuild(entry);\n\nnew PythonFunction(this, \"function\", new PythonFunctionProps {\n Entry = entry,\n Runtime = Runtime.PYTHON_3_8,\n Bundling = new BundlingOptions {\n BuildArgs = new Dictionary<string, string> { { \"PIP_INDEX_URL\", \"https://your.index.url/simple/\" }, { \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\" } }\n }\n});",
|
|
160
454
|
"version": "1"
|
|
161
455
|
},
|
|
162
456
|
"java": {
|
|
163
|
-
"source": "
|
|
457
|
+
"source": "String entry = \"/path/to/function\";\nDockerImage image = DockerImage.fromBuild(entry);\n\nPythonFunction.Builder.create(this, \"function\")\n .entry(entry)\n .runtime(Runtime.PYTHON_3_8)\n .bundling(BundlingOptions.builder()\n .buildArgs(Map.of(\"PIP_INDEX_URL\", \"https://your.index.url/simple/\", \"PIP_EXTRA_INDEX_URL\", \"https://your.extra-index.url/simple/\"))\n .build())\n .build();",
|
|
164
458
|
"version": "1"
|
|
165
459
|
},
|
|
166
460
|
"$": {
|
|
167
|
-
"source": "
|
|
461
|
+
"source": "const entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});",
|
|
168
462
|
"version": "0"
|
|
169
463
|
}
|
|
170
464
|
},
|
|
@@ -179,40 +473,48 @@
|
|
|
179
473
|
},
|
|
180
474
|
"didCompile": true,
|
|
181
475
|
"fqnsReferenced": [
|
|
476
|
+
"@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
|
|
182
477
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
183
478
|
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
479
|
+
"aws-cdk-lib.DockerImage",
|
|
480
|
+
"aws-cdk-lib.DockerImage#fromBuild",
|
|
184
481
|
"aws-cdk-lib.aws_lambda.Runtime",
|
|
185
|
-
"aws-cdk-lib.aws_lambda.Runtime#
|
|
482
|
+
"aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
|
|
186
483
|
],
|
|
187
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonFunction(this, '
|
|
484
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst entry = '/path/to/function';\nconst image = DockerImage.fromBuild(entry);\n\nnew lambda.PythonFunction(this, 'function', {\n entry,\n runtime: Runtime.PYTHON_3_8,\n bundling: {\n buildArgs: { PIP_INDEX_URL: \"https://your.index.url/simple/\", PIP_EXTRA_INDEX_URL: \"https://your.extra-index.url/simple/\" },\n },\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
188
485
|
"syntaxKindCounter": {
|
|
189
486
|
"10": 4,
|
|
190
|
-
"75":
|
|
487
|
+
"75": 15,
|
|
191
488
|
"104": 1,
|
|
192
|
-
"193":
|
|
193
|
-
"194":
|
|
489
|
+
"193": 3,
|
|
490
|
+
"194": 3,
|
|
491
|
+
"196": 1,
|
|
194
492
|
"197": 1,
|
|
493
|
+
"225": 2,
|
|
195
494
|
"226": 1,
|
|
196
|
-
"
|
|
495
|
+
"242": 2,
|
|
496
|
+
"243": 2,
|
|
497
|
+
"281": 5,
|
|
498
|
+
"282": 1
|
|
197
499
|
},
|
|
198
|
-
"fqnsFingerprint": "
|
|
500
|
+
"fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
|
|
199
501
|
},
|
|
200
|
-
"
|
|
502
|
+
"2577bd631c6ca99528df5a0dcc24cc3934fd1629688eaf608a382ff7bc1b6a0f": {
|
|
201
503
|
"translations": {
|
|
202
504
|
"python": {
|
|
203
|
-
"source": "lambda_.
|
|
505
|
+
"source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
|
|
204
506
|
"version": "1"
|
|
205
507
|
},
|
|
206
508
|
"csharp": {
|
|
207
|
-
"source": "new
|
|
509
|
+
"source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
|
|
208
510
|
"version": "1"
|
|
209
511
|
},
|
|
210
512
|
"java": {
|
|
211
|
-
"source": "
|
|
513
|
+
"source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
|
|
212
514
|
"version": "1"
|
|
213
515
|
},
|
|
214
516
|
"$": {
|
|
215
|
-
"source": "new lambda.
|
|
517
|
+
"source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
|
|
216
518
|
"version": "0"
|
|
217
519
|
}
|
|
218
520
|
},
|
|
@@ -227,41 +529,38 @@
|
|
|
227
529
|
},
|
|
228
530
|
"didCompile": true,
|
|
229
531
|
"fqnsReferenced": [
|
|
230
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
231
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
232
532
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
233
533
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
234
534
|
],
|
|
235
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.
|
|
535
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
236
536
|
"syntaxKindCounter": {
|
|
237
|
-
"10":
|
|
238
|
-
"75":
|
|
239
|
-
"104":
|
|
240
|
-
"
|
|
241
|
-
"
|
|
242
|
-
"
|
|
243
|
-
"197": 2,
|
|
537
|
+
"10": 2,
|
|
538
|
+
"75": 3,
|
|
539
|
+
"104": 1,
|
|
540
|
+
"193": 1,
|
|
541
|
+
"194": 1,
|
|
542
|
+
"197": 1,
|
|
244
543
|
"226": 1,
|
|
245
|
-
"281":
|
|
544
|
+
"281": 1
|
|
246
545
|
},
|
|
247
|
-
"fqnsFingerprint": "
|
|
546
|
+
"fqnsFingerprint": "53bf1d93ec833d865949647787c10b9d63377be0706586f2fea0614198be0e59"
|
|
248
547
|
},
|
|
249
|
-
"
|
|
548
|
+
"e3289a04dc8d758a99b631eb6f19978e241b633977bdc01f803ce3b8bf56da73": {
|
|
250
549
|
"translations": {
|
|
251
550
|
"python": {
|
|
252
|
-
"source": "lambda_.
|
|
551
|
+
"source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
|
|
253
552
|
"version": "1"
|
|
254
553
|
},
|
|
255
554
|
"csharp": {
|
|
256
|
-
"source": "new
|
|
555
|
+
"source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
|
|
257
556
|
"version": "1"
|
|
258
557
|
},
|
|
259
558
|
"java": {
|
|
260
|
-
"source": "
|
|
559
|
+
"source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
|
|
261
560
|
"version": "1"
|
|
262
561
|
},
|
|
263
562
|
"$": {
|
|
264
|
-
"source": "new lambda.
|
|
563
|
+
"source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
|
|
265
564
|
"version": "0"
|
|
266
565
|
}
|
|
267
566
|
},
|
|
@@ -276,24 +575,21 @@
|
|
|
276
575
|
},
|
|
277
576
|
"didCompile": true,
|
|
278
577
|
"fqnsReferenced": [
|
|
279
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonFunction",
|
|
280
|
-
"@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
|
|
281
578
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
|
|
282
579
|
"@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
|
|
283
580
|
],
|
|
284
|
-
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.
|
|
581
|
+
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { DockerImage, Stack } from 'aws-cdk-lib';\nimport { Runtime } from 'aws-cdk-lib/aws-lambda';\nimport * as lambda from '@aws-cdk/aws-lambda-python-alpha';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
|
|
285
582
|
"syntaxKindCounter": {
|
|
286
|
-
"10":
|
|
287
|
-
"75":
|
|
288
|
-
"104":
|
|
289
|
-
"
|
|
290
|
-
"
|
|
291
|
-
"
|
|
292
|
-
"197": 2,
|
|
583
|
+
"10": 2,
|
|
584
|
+
"75": 3,
|
|
585
|
+
"104": 1,
|
|
586
|
+
"193": 1,
|
|
587
|
+
"194": 1,
|
|
588
|
+
"197": 1,
|
|
293
589
|
"226": 1,
|
|
294
|
-
"281":
|
|
590
|
+
"281": 1
|
|
295
591
|
},
|
|
296
|
-
"fqnsFingerprint": "
|
|
592
|
+
"fqnsFingerprint": "53bf1d93ec833d865949647787c10b9d63377be0706586f2fea0614198be0e59"
|
|
297
593
|
}
|
|
298
594
|
}
|
|
299
595
|
}
|