import { FunctionDefinition, FunctionDefinitionHandler } from "serverless"; import Service from "serverless/classes/Service"; import { Configuration } from "./env"; export declare enum RuntimeType { NODE = "node", PYTHON = "python", DOTNET = "dotnet", CUSTOM = "custom", JAVA = "java", RUBY = "ruby", GO = "go", UNSUPPORTED = "unsupported" } export interface FunctionInfo { name: string; type: RuntimeType; handler: ExtendedFunctionDefinition; runtime?: string; } export interface ExtendedFunctionDefinition extends FunctionDefinition { architecture?: string; layers?: string[]; } export interface LayerJSON { regions: { [region: string]: { [runtime: string]: string | undefined; } | undefined; }; } export declare const runtimeLookup: Record; export declare const ARM_RUNTIME_KEYS: Record; export declare function findHandlers(service: Service, exclude: string[], defaultRuntime?: string): FunctionInfo[]; /** * Normalize the runtime in the yml to match our layers.json keys * For most runtimes the key in layers.json is the same as the string set in the * serverless.yml, but for dotnet and java they are not * * @param runtimeSetting string set in serverless.yml ex: "dotnet6", "nodejs18.x" * @returns normalized runtime key */ export declare function normalizeRuntimeKey(runtimeSetting: string): string; /** * Add library layers for the given runtime and architecture * * @param service Serverless framework service * @param handlers Lambda functions to add layers to * @param layers layers.json file read into an object * @param accountId optional account ID that the layers live in - undefined * unless the customer sets a value for useLayersFromAccount in yaml * @param isUsingExtension whether to install the Datadog Lambda Extension as a layer */ export declare function applyLambdaLibraryLayers(service: Service, handlers: FunctionInfo[], layers: LayerJSON, accountId?: string, isUsingExtension?: boolean): void; export declare function applyExtensionLayer(service: Service, handlers: FunctionInfo[], layers: LayerJSON, accountId?: string, isFIPSEnabled?: boolean): void; export declare function pushLayerARN(layerARN: string, currentLayers: string[]): string[]; export declare function isFunctionDefinitionHandler(funcDef: FunctionDefinition): funcDef is FunctionDefinitionHandler; /** * The isFIPSEnabled flag defaults to `true` if `addExtension` is `true` and region * starts with "us-gov-". It defaults to `false` otherwise. */ export declare function getDefaultIsFIPSEnabledFlag(config: Configuration, region: string): boolean; //# sourceMappingURL=layer.d.ts.map