1 | import * as ecr from '@aws-cdk/aws-ecr';
|
2 | import { Construct } from 'constructs';
|
3 | import { AssetImageCodeProps, EcrImageCodeProps, Code } from './code';
|
4 | import { Function, FunctionOptions } from './function';
|
5 | /**
|
6 | * Properties to configure a new DockerImageFunction construct.
|
7 | */
|
8 | export interface DockerImageFunctionProps extends FunctionOptions {
|
9 | /**
|
10 | * The source code of your Lambda function. You can point to a file in an
|
11 | * Amazon Simple Storage Service (Amazon S3) bucket or specify your source
|
12 | * code as inline text.
|
13 | */
|
14 | readonly code: DockerImageCode;
|
15 | }
|
16 | /**
|
17 | * Code property for the DockerImageFunction construct
|
18 | */
|
19 | export declare abstract class DockerImageCode {
|
20 | /**
|
21 | * Use an existing ECR image as the Lambda code.
|
22 | * @param repository the ECR repository that the image is in
|
23 | * @param props properties to further configure the selected image
|
24 | */
|
25 | static fromEcr(repository: ecr.IRepository, props?: EcrImageCodeProps): DockerImageCode;
|
26 | /**
|
27 | * Create an ECR image from the specified asset and bind it as the Lambda code.
|
28 | * @param directory the directory from which the asset must be created
|
29 | * @param props properties to further configure the selected image
|
30 | */
|
31 | static fromImageAsset(directory: string, props?: AssetImageCodeProps): DockerImageCode;
|
32 | /**
|
33 | * Produce a `Code` instance from this `DockerImageCode`.
|
34 | * @internal
|
35 | */
|
36 | abstract _bind(): Code;
|
37 | }
|
38 | /**
|
39 | * Create a lambda function where the handler is a docker image
|
40 | */
|
41 | export declare class DockerImageFunction extends Function {
|
42 | constructor(scope: Construct, id: string, props: DockerImageFunctionProps);
|
43 | }
|