@aws-cdk/aws-lambda-python-alpha 2.1.0-alpha.0 → 2.5.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.
@@ -0,0 +1,595 @@
1
+ {
2
+ "version": "2",
3
+ "toolVersion": "1.50.0",
4
+ "snippets": {
5
+ "5044db3aa2cbd19f8d92b0e4571533d0c3964a4debb73355fc0b1849f831db50": {
6
+ "translations": {
7
+ "python": {
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
+ "version": "1"
10
+ },
11
+ "csharp": {
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
+ "version": "1"
14
+ },
15
+ "java": {
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
+ "version": "1"
18
+ },
19
+ "$": {
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
+ "version": "0"
22
+ }
23
+ },
24
+ "location": {
25
+ "api": {
26
+ "api": "moduleReadme",
27
+ "moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
28
+ },
29
+ "field": {
30
+ "field": "markdown",
31
+ "line": 27
32
+ }
33
+ },
34
+ "didCompile": true,
35
+ "fqnsReferenced": [
36
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunction",
37
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
38
+ "aws-cdk-lib.aws_lambda.Runtime",
39
+ "aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
40
+ ],
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
+ "syntaxKindCounter": {
43
+ "10": 4,
44
+ "75": 8,
45
+ "104": 1,
46
+ "193": 1,
47
+ "194": 2,
48
+ "197": 1,
49
+ "226": 1,
50
+ "281": 4
51
+ },
52
+ "fqnsFingerprint": "5e69e8edabbd682e49994175d22e01c2131977b2a121b195e864567619541789"
53
+ },
54
+ "53686c43ad7160036474e74010ea12f31c3ff817524e232264f2795823254c1a": {
55
+ "translations": {
56
+ "python": {
57
+ "source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
58
+ "version": "1"
59
+ },
60
+ "csharp": {
61
+ "source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
62
+ "version": "1"
63
+ },
64
+ "java": {
65
+ "source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
66
+ "version": "1"
67
+ },
68
+ "$": {
69
+ "source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
70
+ "version": "0"
71
+ }
72
+ },
73
+ "location": {
74
+ "api": {
75
+ "api": "moduleReadme",
76
+ "moduleFqn": "@aws-cdk/aws-lambda-python-alpha"
77
+ },
78
+ "field": {
79
+ "field": "markdown",
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
128
+ }
129
+ },
130
+ "didCompile": true,
131
+ "fqnsReferenced": [
132
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunction",
133
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
134
+ "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
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"
138
+ ],
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",
140
+ "syntaxKindCounter": {
141
+ "10": 4,
142
+ "75": 10,
143
+ "104": 2,
144
+ "192": 1,
145
+ "193": 2,
146
+ "194": 3,
147
+ "197": 2,
148
+ "226": 1,
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
207
+ },
208
+ "fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
209
+ },
210
+ "7300f4badf25be82206db2ddea0d127c48665c4ca57e1030819c01fd03375d05": {
211
+ "translations": {
212
+ "python": {
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)",
214
+ "version": "1"
215
+ },
216
+ "csharp": {
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});",
218
+ "version": "1"
219
+ },
220
+ "java": {
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();",
222
+ "version": "1"
223
+ },
224
+ "$": {
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});",
406
+ "version": "0"
407
+ }
408
+ },
409
+ "location": {
410
+ "api": {
411
+ "api": "type",
412
+ "fqn": "@aws-cdk/aws-lambda-python-alpha.PythonFunction"
413
+ },
414
+ "field": {
415
+ "field": "example"
416
+ }
417
+ },
418
+ "didCompile": true,
419
+ "fqnsReferenced": [
420
+ "@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
421
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunction",
422
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
423
+ "aws-cdk-lib.DockerImage",
424
+ "aws-cdk-lib.DockerImage#fromBuild",
425
+ "aws-cdk-lib.aws_lambda.Runtime",
426
+ "aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
427
+ ],
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",
429
+ "syntaxKindCounter": {
430
+ "10": 4,
431
+ "75": 15,
432
+ "104": 1,
433
+ "193": 3,
434
+ "194": 3,
435
+ "196": 1,
436
+ "197": 1,
437
+ "225": 2,
438
+ "226": 1,
439
+ "242": 2,
440
+ "243": 2,
441
+ "281": 5,
442
+ "282": 1
443
+ },
444
+ "fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
445
+ },
446
+ "1487ff584727a1589c5476ca3c4df23801dbe200acd7d18d1bda015d3ea3244c": {
447
+ "translations": {
448
+ "python": {
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)",
450
+ "version": "1"
451
+ },
452
+ "csharp": {
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});",
454
+ "version": "1"
455
+ },
456
+ "java": {
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();",
458
+ "version": "1"
459
+ },
460
+ "$": {
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});",
462
+ "version": "0"
463
+ }
464
+ },
465
+ "location": {
466
+ "api": {
467
+ "api": "type",
468
+ "fqn": "@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps"
469
+ },
470
+ "field": {
471
+ "field": "example"
472
+ }
473
+ },
474
+ "didCompile": true,
475
+ "fqnsReferenced": [
476
+ "@aws-cdk/aws-lambda-python-alpha.BundlingOptions",
477
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunction",
478
+ "@aws-cdk/aws-lambda-python-alpha.PythonFunctionProps",
479
+ "aws-cdk-lib.DockerImage",
480
+ "aws-cdk-lib.DockerImage#fromBuild",
481
+ "aws-cdk-lib.aws_lambda.Runtime",
482
+ "aws-cdk-lib.aws_lambda.Runtime#PYTHON_3_8"
483
+ ],
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",
485
+ "syntaxKindCounter": {
486
+ "10": 4,
487
+ "75": 15,
488
+ "104": 1,
489
+ "193": 3,
490
+ "194": 3,
491
+ "196": 1,
492
+ "197": 1,
493
+ "225": 2,
494
+ "226": 1,
495
+ "242": 2,
496
+ "243": 2,
497
+ "281": 5,
498
+ "282": 1
499
+ },
500
+ "fqnsFingerprint": "96109daeb46b402867fb5b9f80695363ab0a6349595f4d5e339e4786513d70d7"
501
+ },
502
+ "2577bd631c6ca99528df5a0dcc24cc3934fd1629688eaf608a382ff7bc1b6a0f": {
503
+ "translations": {
504
+ "python": {
505
+ "source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
506
+ "version": "1"
507
+ },
508
+ "csharp": {
509
+ "source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
510
+ "version": "1"
511
+ },
512
+ "java": {
513
+ "source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
514
+ "version": "1"
515
+ },
516
+ "$": {
517
+ "source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
518
+ "version": "0"
519
+ }
520
+ },
521
+ "location": {
522
+ "api": {
523
+ "api": "type",
524
+ "fqn": "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion"
525
+ },
526
+ "field": {
527
+ "field": "example"
528
+ }
529
+ },
530
+ "didCompile": true,
531
+ "fqnsReferenced": [
532
+ "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
533
+ "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
534
+ ],
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",
536
+ "syntaxKindCounter": {
537
+ "10": 2,
538
+ "75": 3,
539
+ "104": 1,
540
+ "193": 1,
541
+ "194": 1,
542
+ "197": 1,
543
+ "226": 1,
544
+ "281": 1
545
+ },
546
+ "fqnsFingerprint": "53bf1d93ec833d865949647787c10b9d63377be0706586f2fea0614198be0e59"
547
+ },
548
+ "e3289a04dc8d758a99b631eb6f19978e241b633977bdc01f803ce3b8bf56da73": {
549
+ "translations": {
550
+ "python": {
551
+ "source": "lambda_.PythonLayerVersion(self, \"MyLayer\",\n entry=\"/path/to/my/layer\"\n)",
552
+ "version": "1"
553
+ },
554
+ "csharp": {
555
+ "source": "new PythonLayerVersion(this, \"MyLayer\", new PythonLayerVersionProps {\n Entry = \"/path/to/my/layer\"\n});",
556
+ "version": "1"
557
+ },
558
+ "java": {
559
+ "source": "PythonLayerVersion.Builder.create(this, \"MyLayer\")\n .entry(\"/path/to/my/layer\")\n .build();",
560
+ "version": "1"
561
+ },
562
+ "$": {
563
+ "source": "new lambda.PythonLayerVersion(this, 'MyLayer', {\n entry: '/path/to/my/layer', // point this to your library's directory\n})",
564
+ "version": "0"
565
+ }
566
+ },
567
+ "location": {
568
+ "api": {
569
+ "api": "type",
570
+ "fqn": "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
571
+ },
572
+ "field": {
573
+ "field": "example"
574
+ }
575
+ },
576
+ "didCompile": true,
577
+ "fqnsReferenced": [
578
+ "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersion",
579
+ "@aws-cdk/aws-lambda-python-alpha.PythonLayerVersionProps"
580
+ ],
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",
582
+ "syntaxKindCounter": {
583
+ "10": 2,
584
+ "75": 3,
585
+ "104": 1,
586
+ "193": 1,
587
+ "194": 1,
588
+ "197": 1,
589
+ "226": 1,
590
+ "281": 1
591
+ },
592
+ "fqnsFingerprint": "53bf1d93ec833d865949647787c10b9d63377be0706586f2fea0614198be0e59"
593
+ }
594
+ }
595
+ }