runtime.d.ts
  1  import { BundlingDockerImage, DockerImage } from '@aws-cdk/core';
  2  /**
  3   * @stability stable
  4   */
  5  export interface LambdaRuntimeProps {
  6      /**
  7       * Whether the ``ZipFile`` (aka inline code) property can be used with this runtime.
  8       *
  9       * @default false
 10       * @stability stable
 11       */
 12      readonly supportsInlineCode?: boolean;
 13      /**
 14       * The Docker image name to be used for bundling in this runtime.
 15       *
 16       * @default - the latest docker image "amazon/public.ecr.aws/sam/build-<runtime>" from https://gallery.ecr.aws
 17       * @stability stable
 18       */
 19      readonly bundlingDockerImage?: string;
 20      /**
 21       * Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
 22       *
 23       * @default false
 24       * @stability stable
 25       */
 26      readonly supportsCodeGuruProfiling?: boolean;
 27  }
 28  /**
 29   * @stability stable
 30   */
 31  export declare enum RuntimeFamily {
 32      /**
 33       * @stability stable
 34       */
 35      NODEJS = 0,
 36      /**
 37       * @stability stable
 38       */
 39      JAVA = 1,
 40      /**
 41       * @stability stable
 42       */
 43      PYTHON = 2,
 44      /**
 45       * @stability stable
 46       */
 47      DOTNET_CORE = 3,
 48      /**
 49       * @stability stable
 50       */
 51      GO = 4,
 52      /**
 53       * @stability stable
 54       */
 55      RUBY = 5,
 56      /**
 57       * @stability stable
 58       */
 59      OTHER = 6
 60  }
 61  /**
 62   * Lambda function runtime environment.
 63   *
 64   * If you need to use a runtime name that doesn't exist as a static member, you
 65   * can instantiate a `Runtime` object, e.g: `new Runtime('nodejs99.99')`.
 66   *
 67   * @stability stable
 68   */
 69  export declare class Runtime {
 70      /**
 71       * A list of all known `Runtime`'s.
 72       *
 73       * @stability stable
 74       */
 75      static readonly ALL: Runtime[];
 76      /**
 77       * The NodeJS runtime (nodejs) Legacy runtime no longer supported by AWS Lambda.
 78       *
 79       * @stability stable
 80       */
 81      static readonly NODEJS: Runtime;
 82      /**
 83       * The NodeJS 4.3 runtime (nodejs4.3) Legacy runtime no longer supported by AWS Lambda.
 84       *
 85       * @stability stable
 86       */
 87      static readonly NODEJS_4_3: Runtime;
 88      /**
 89       * The NodeJS 6.10 runtime (nodejs6.10) Legacy runtime no longer supported by AWS Lambda.
 90       *
 91       * @stability stable
 92       */
 93      static readonly NODEJS_6_10: Runtime;
 94      /**
 95       * The NodeJS 8.10 runtime (nodejs8.10) Legacy runtime no longer supported by AWS Lambda.
 96       *
 97       * @stability stable
 98       */
 99      static readonly NODEJS_8_10: Runtime;
100      /**
101       * The NodeJS 10.x runtime (nodejs10.x).
102       *
103       * @stability stable
104       */
105      static readonly NODEJS_10_X: Runtime;
106      /**
107       * The NodeJS 12.x runtime (nodejs12.x).
108       *
109       * @stability stable
110       */
111      static readonly NODEJS_12_X: Runtime;
112      /**
113       * The NodeJS 14.x runtime (nodejs14.x).
114       *
115       * @stability stable
116       */
117      static readonly NODEJS_14_X: Runtime;
118      /**
119       * The Python 2.7 runtime (python2.7).
120       *
121       * @stability stable
122       */
123      static readonly PYTHON_2_7: Runtime;
124      /**
125       * The Python 3.6 runtime (python3.6).
126       *
127       * @stability stable
128       */
129      static readonly PYTHON_3_6: Runtime;
130      /**
131       * The Python 3.7 runtime (python3.7).
132       *
133       * @stability stable
134       */
135      static readonly PYTHON_3_7: Runtime;
136      /**
137       * The Python 3.8 runtime (python3.8).
138       *
139       * @stability stable
140       */
141      static readonly PYTHON_3_8: Runtime;
142      /**
143       * The Python 3.9 runtime (python3.9).
144       *
145       * @stability stable
146       */
147      static readonly PYTHON_3_9: Runtime;
148      /**
149       * The Java 8 runtime (java8).
150       *
151       * @stability stable
152       */
153      static readonly JAVA_8: Runtime;
154      /**
155       * The Java 8 Corretto runtime (java8.al2).
156       *
157       * @stability stable
158       */
159      static readonly JAVA_8_CORRETTO: Runtime;
160      /**
161       * The Java 11 runtime (java11).
162       *
163       * @stability stable
164       */
165      static readonly JAVA_11: Runtime;
166      /**
167       * The .NET Core 1.0 runtime (dotnetcore1.0) Legacy runtime no longer supported by AWS Lambda.
168       *
169       * @stability stable
170       */
171      static readonly DOTNET_CORE_1: Runtime;
172      /**
173       * The .NET Core 2.0 runtime (dotnetcore2.0) Legacy runtime no longer supported by AWS Lambda.
174       *
175       * @stability stable
176       */
177      static readonly DOTNET_CORE_2: Runtime;
178      /**
179       * The .NET Core 2.1 runtime (dotnetcore2.1).
180       *
181       * @stability stable
182       */
183      static readonly DOTNET_CORE_2_1: Runtime;
184      /**
185       * The .NET Core 3.1 runtime (dotnetcore3.1).
186       *
187       * @stability stable
188       */
189      static readonly DOTNET_CORE_3_1: Runtime;
190      /**
191       * The Go 1.x runtime (go1.x).
192       *
193       * @stability stable
194       */
195      static readonly GO_1_X: Runtime;
196      /**
197       * The Ruby 2.5 runtime (ruby2.5).
198       *
199       * @stability stable
200       */
201      static readonly RUBY_2_5: Runtime;
202      /**
203       * The Ruby 2.7 runtime (ruby2.7).
204       *
205       * @stability stable
206       */
207      static readonly RUBY_2_7: Runtime;
208      /**
209       * The custom provided runtime (provided).
210       *
211       * @stability stable
212       */
213      static readonly PROVIDED: Runtime;
214      /**
215       * The custom provided runtime (provided).
216       *
217       * @stability stable
218       */
219      static readonly PROVIDED_AL2: Runtime;
220      /**
221       * A special runtime entry to be used when function is using a docker image.
222       *
223       * @stability stable
224       */
225      static readonly FROM_IMAGE: Runtime;
226      /**
227       * The name of this runtime, as expected by the Lambda resource.
228       *
229       * @stability stable
230       */
231      readonly name: string;
232      /**
233       * Whether the ``ZipFile`` (aka inline code) property can be used with this runtime.
234       *
235       * @stability stable
236       */
237      readonly supportsInlineCode: boolean;
238      /**
239       * Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
240       *
241       * @stability stable
242       */
243      readonly supportsCodeGuruProfiling: boolean;
244      /**
245       * The runtime family.
246       *
247       * @stability stable
248       */
249      readonly family?: RuntimeFamily;
250      /**
251       * (deprecated) DEPRECATED.
252       *
253       * @deprecated use `bundlingImage`
254       */
255      readonly bundlingDockerImage: BundlingDockerImage;
256      /**
257       * The bundling Docker image for this runtime.
258       *
259       * @stability stable
260       */
261      readonly bundlingImage: DockerImage;
262      /**
263       * @stability stable
264       */
265      constructor(name: string, family?: RuntimeFamily, props?: LambdaRuntimeProps);
266      /**
267       * @stability stable
268       */
269      toString(): string;
270      /**
271       * @stability stable
272       */
273      runtimeEquals(other: Runtime): boolean;
274  }