agent-claw: automated task changes
This commit is contained in:
13
cdk/node_modules/aws-cdk-lib/aws-lambda/.jsiirc.json
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-lambda/.jsiirc.json
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"targets": {
|
||||
"java": {
|
||||
"package": "software.amazon.awscdk.services.lambda"
|
||||
},
|
||||
"dotnet": {
|
||||
"namespace": "Amazon.CDK.AWS.Lambda"
|
||||
},
|
||||
"python": {
|
||||
"module": "aws_cdk.aws_lambda"
|
||||
}
|
||||
}
|
||||
}
|
||||
1886
cdk/node_modules/aws-cdk-lib/aws-lambda/README.md
generated
vendored
Normal file
1886
cdk/node_modules/aws-cdk-lib/aws-lambda/README.md
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
cdk/node_modules/aws-cdk-lib/aws-lambda/index.d.ts
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from './lib';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
353
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/adot-layers.d.ts
generated
vendored
Normal file
353
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/adot-layers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
import type { IConstruct } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* The type of ADOT Lambda layer
|
||||
*/
|
||||
declare enum AdotLambdaLayerType {
|
||||
/**
|
||||
* The Lambda layer for ADOT Java instrumentation library. This layer only auto-instruments AWS
|
||||
* SDK libraries.
|
||||
*/
|
||||
JAVA_SDK = "JAVA_SDK",
|
||||
/**
|
||||
* The Lambda layer for ADOT Java Auto-Instrumentation Agent. This layer automatically instruments
|
||||
* a large number of libraries and frameworks out of the box and has notable impact on startup
|
||||
* performance.
|
||||
*/
|
||||
JAVA_AUTO_INSTRUMENTATION = "JAVA_AUTO_INSTRUMENTATION",
|
||||
/**
|
||||
* The Lambda layer for ADOT Collector, OpenTelemetry for JavaScript and supported libraries.
|
||||
*/
|
||||
JAVASCRIPT_SDK = "JAVASCRIPT_SDK",
|
||||
/**
|
||||
* The Lambda layer for ADOT Collector, OpenTelemetry for Python and supported libraries.
|
||||
*/
|
||||
PYTHON_SDK = "PYTHON_SDK",
|
||||
/**
|
||||
* The generic Lambda layer that contains only ADOT Collector, used for manual instrumentation
|
||||
* use cases (such as Go or DotNet runtimes).
|
||||
*/
|
||||
GENERIC = "GENERIC"
|
||||
}
|
||||
/**
|
||||
* Config returned from `AdotLambdaLayerVersion._bind`
|
||||
*/
|
||||
interface AdotLambdaLayerBindConfig {
|
||||
/**
|
||||
* ARN of the ADOT Lambda layer version
|
||||
*/
|
||||
readonly arn: string;
|
||||
}
|
||||
/**
|
||||
* Properties for an ADOT instrumentation in Lambda
|
||||
*/
|
||||
export interface AdotInstrumentationConfig {
|
||||
/**
|
||||
* The ADOT Lambda layer.
|
||||
*/
|
||||
readonly layerVersion: AdotLayerVersion;
|
||||
/**
|
||||
* The startup script to run, see ADOT documentation to pick the right script for your use case: https://aws-otel.github.io/docs/getting-started/lambda
|
||||
*/
|
||||
readonly execWrapper: AdotLambdaExecWrapper;
|
||||
}
|
||||
/**
|
||||
* An ADOT Lambda layer version that's specific to a lambda layer type and an architecture.
|
||||
*/
|
||||
export declare abstract class AdotLayerVersion {
|
||||
/**
|
||||
* The ADOT Lambda layer for Java SDK
|
||||
*
|
||||
* @param version The version of the Lambda layer to use
|
||||
*/
|
||||
static fromJavaSdkLayerVersion(version: AdotLambdaLayerJavaSdkVersion): AdotLayerVersion;
|
||||
/**
|
||||
* The ADOT Lambda layer for Java auto instrumentation
|
||||
*
|
||||
* @param version The version of the Lambda layer to use
|
||||
*/
|
||||
static fromJavaAutoInstrumentationLayerVersion(version: AdotLambdaLayerJavaAutoInstrumentationVersion): AdotLayerVersion;
|
||||
/**
|
||||
* The ADOT Lambda layer for JavaScript SDK
|
||||
*
|
||||
* @param version The version of the Lambda layer to use
|
||||
*/
|
||||
static fromJavaScriptSdkLayerVersion(version: AdotLambdaLayerJavaScriptSdkVersion): AdotLayerVersion;
|
||||
/**
|
||||
* The ADOT Lambda layer for Python SDK
|
||||
*
|
||||
* @param version The version of the Lambda layer to use
|
||||
*/
|
||||
static fromPythonSdkLayerVersion(version: AdotLambdaLayerPythonSdkVersion): AdotLayerVersion;
|
||||
/**
|
||||
* The ADOT Lambda layer for generic use cases
|
||||
*
|
||||
* @param version The version of the Lambda layer to use
|
||||
*/
|
||||
static fromGenericLayerVersion(version: AdotLambdaLayerGenericVersion): AdotLayerVersion;
|
||||
private static fromAdotVersion;
|
||||
/**
|
||||
* Produce a `AdotLambdaLayerBindConfig` instance from this `AdotLayerVersion` instance.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
abstract _bind(_function: IFunction): AdotLambdaLayerBindConfig;
|
||||
}
|
||||
/**
|
||||
* The wrapper script to be used for the Lambda function in order to enable auto instrumentation
|
||||
* with ADOT.
|
||||
*/
|
||||
export declare enum AdotLambdaExecWrapper {
|
||||
/**
|
||||
* Wrapping regular Lambda handlers.
|
||||
*/
|
||||
REGULAR_HANDLER = "/opt/otel-handler",
|
||||
/**
|
||||
* Wrapping regular handlers (implementing RequestHandler) proxied through API Gateway, enabling
|
||||
* HTTP context propagation.
|
||||
*/
|
||||
PROXY_HANDLER = "/opt/otel-proxy-handler",
|
||||
/**
|
||||
* Wrapping streaming handlers (implementing RequestStreamHandler), enabling HTTP context
|
||||
* propagation for HTTP requests.
|
||||
*/
|
||||
STREAM_HANDLER = "/opt/otel-stream-handler",
|
||||
/**
|
||||
* Wrapping python lambda handlers see https://aws-otel.github.io/docs/getting-started/lambda/lambda-python
|
||||
*/
|
||||
INSTRUMENT_HANDLER = "/opt/otel-instrument",
|
||||
/**
|
||||
* Wrapping SQS-triggered function handlers (implementing RequestHandler)
|
||||
*/
|
||||
SQS_HANDLER = "/opt/otel-sqs-handler"
|
||||
}
|
||||
declare abstract class AdotLambdaLayerVersion {
|
||||
protected readonly type: AdotLambdaLayerType;
|
||||
protected readonly version: string;
|
||||
protected constructor(type: AdotLambdaLayerType, version: string);
|
||||
/**
|
||||
* The ARN of the Lambda layer
|
||||
*
|
||||
* @param scope The binding scope. Usually this is the stack where the Lambda layer is bound to
|
||||
* @param architecture The architecture of the Lambda layer (either X86_64 or ARM_64)
|
||||
*/
|
||||
layerArn(scope: IConstruct, architecture: Architecture): string;
|
||||
}
|
||||
/**
|
||||
* The collection of versions of the ADOT Lambda Layer for Java SDK
|
||||
*/
|
||||
export declare class AdotLambdaLayerJavaSdkVersion extends AdotLambdaLayerVersion {
|
||||
protected readonly layerVersion: string;
|
||||
/**
|
||||
* Version 1.32.0
|
||||
*/
|
||||
static readonly V1_32_0_1: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* Version 1.32.0
|
||||
*/
|
||||
static readonly V1_32_0: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* Version 1.31.0
|
||||
*/
|
||||
static readonly V1_31_0: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* Version 1.30.0
|
||||
*/
|
||||
static readonly V1_30_0: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* Version 1.28.1
|
||||
*/
|
||||
static readonly V1_28_1: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* Version 1.19.0
|
||||
*/
|
||||
static readonly V1_19_0: AdotLambdaLayerJavaSdkVersion;
|
||||
/**
|
||||
* The latest layer version available in this CDK version. New versions could
|
||||
* introduce incompatible changes. Make sure to test them before deploying to production.
|
||||
*/
|
||||
static readonly LATEST: AdotLambdaLayerJavaSdkVersion;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The collection of versions of the ADOT Lambda Layer for Java auto-instrumentation
|
||||
*/
|
||||
export declare class AdotLambdaLayerJavaAutoInstrumentationVersion extends AdotLambdaLayerVersion {
|
||||
protected readonly layerVersion: string;
|
||||
/**
|
||||
* Version 1.32.0
|
||||
*/
|
||||
static readonly V1_32_0_1: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* Version 1.32.0
|
||||
*/
|
||||
static readonly V1_32_0: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* Version 1.31.0
|
||||
*/
|
||||
static readonly V1_31_0: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* Version 1.30.0
|
||||
*/
|
||||
static readonly V1_30_0: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* Version 1.28.1
|
||||
*/
|
||||
static readonly V1_28_1: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* Version 1.19.2
|
||||
*/
|
||||
static readonly V1_19_2: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
/**
|
||||
* The latest layer version available in this CDK version. New versions could
|
||||
* introduce incompatible changes. Make sure to test them before deploying to production.
|
||||
*/
|
||||
static readonly LATEST: AdotLambdaLayerJavaAutoInstrumentationVersion;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The collection of versions of the ADOT Lambda Layer for Python SDK
|
||||
*/
|
||||
export declare class AdotLambdaLayerPythonSdkVersion extends AdotLambdaLayerVersion {
|
||||
protected readonly layerVersion: string;
|
||||
/**
|
||||
* Version 1.29.0
|
||||
*/
|
||||
static readonly V1_29_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.25.0
|
||||
*/
|
||||
static readonly V1_25_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.24.0
|
||||
*/
|
||||
static readonly V1_24_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.21.0
|
||||
*/
|
||||
static readonly V1_21_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.20.0
|
||||
*/
|
||||
static readonly V1_20_0_1: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.20.0
|
||||
*/
|
||||
static readonly V1_20_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.19.0
|
||||
*/
|
||||
static readonly V1_19_0_1: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.18.0
|
||||
*/
|
||||
static readonly V1_18_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.17.0
|
||||
*/
|
||||
static readonly V1_17_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.16.0
|
||||
*/
|
||||
static readonly V1_16_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.15.0
|
||||
*/
|
||||
static readonly V1_15_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.14.0
|
||||
*/
|
||||
static readonly V1_14_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* Version 1.13.0
|
||||
*/
|
||||
static readonly V1_13_0: AdotLambdaLayerPythonSdkVersion;
|
||||
/**
|
||||
* The latest layer version available in this CDK version. New versions could
|
||||
* introduce incompatible changes. Make sure to test them before deploying to production.
|
||||
*/
|
||||
static readonly LATEST: AdotLambdaLayerPythonSdkVersion;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The collection of versions of the ADOT Lambda Layer for JavaScript SDK
|
||||
*/
|
||||
export declare class AdotLambdaLayerJavaScriptSdkVersion extends AdotLambdaLayerVersion {
|
||||
protected readonly layerVersion: string;
|
||||
/**
|
||||
* Version 1.30.0
|
||||
*/
|
||||
static readonly V1_30_0: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* Version 1.18.1
|
||||
*/
|
||||
static readonly V1_18_1: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* Version 1.17.1
|
||||
*/
|
||||
static readonly V1_17_1: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* Version 1.16.0
|
||||
*/
|
||||
static readonly V1_16_0: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* Version 1.15.0
|
||||
*/
|
||||
static readonly V1_15_0_1: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* Version 1.7.0
|
||||
*/
|
||||
static readonly V1_7_0: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
/**
|
||||
* The latest layer version available in this CDK version. New versions could
|
||||
* introduce incompatible changes. Make sure to test them before deploying to production.
|
||||
*/
|
||||
static readonly LATEST: AdotLambdaLayerJavaScriptSdkVersion;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The collection of versions of the ADOT Lambda Layer for generic purpose
|
||||
*/
|
||||
export declare class AdotLambdaLayerGenericVersion extends AdotLambdaLayerVersion {
|
||||
protected readonly layerVersion: string;
|
||||
/**
|
||||
* Version 0.115.0
|
||||
*/
|
||||
static readonly V0_115_0: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.102.1
|
||||
*/
|
||||
static readonly V0_102_1: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.98.0
|
||||
*/
|
||||
static readonly V0_98_0: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.90.1
|
||||
*/
|
||||
static readonly V0_90_1: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.88.0
|
||||
*/
|
||||
static readonly V0_88_0: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.84.0
|
||||
*/
|
||||
static readonly V0_84_0: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.82.0
|
||||
*/
|
||||
static readonly V0_82_0: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* Version 0.62.1
|
||||
*/
|
||||
static readonly V0_62_1: AdotLambdaLayerGenericVersion;
|
||||
/**
|
||||
* The latest layer version available in this CDK version. New versions could
|
||||
* introduce incompatible changes. Make sure to test them before deploying to production.
|
||||
*/
|
||||
static readonly LATEST: AdotLambdaLayerGenericVersion;
|
||||
private constructor();
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/adot-layers.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/adot-layers.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
153
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/alias.d.ts
generated
vendored
Normal file
153
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/alias.d.ts
generated
vendored
Normal file
@@ -0,0 +1,153 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { EventInvokeConfigOptions } from './event-invoke-config';
|
||||
import type { IFunction } from './function-base';
|
||||
import { QualifiedFunctionBase } from './function-base';
|
||||
import type { IVersion } from './lambda-version';
|
||||
import type { AliasReference, IAliasRef } from './lambda.generated';
|
||||
import type { AutoScalingOptions, IScalableFunctionAttribute } from './scalable-attribute-api';
|
||||
import type * as cloudwatch from '../../aws-cloudwatch';
|
||||
import * as iam from '../../aws-iam';
|
||||
export interface IAlias extends IFunction, IAliasRef {
|
||||
/**
|
||||
* Name of this alias.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly aliasName: string;
|
||||
/**
|
||||
* The underlying Lambda function version.
|
||||
*/
|
||||
readonly version: IVersion;
|
||||
}
|
||||
/**
|
||||
* Options for `lambda.Alias`.
|
||||
*/
|
||||
export interface AliasOptions extends EventInvokeConfigOptions {
|
||||
/**
|
||||
* Description for the alias
|
||||
*
|
||||
* @default No description
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* Additional versions with individual weights this alias points to
|
||||
*
|
||||
* Individual additional version weights specified here should add up to
|
||||
* (less than) one. All remaining weight is routed to the default
|
||||
* version.
|
||||
*
|
||||
* For example, the config is
|
||||
*
|
||||
* version: "1"
|
||||
* additionalVersions: [{ version: "2", weight: 0.05 }]
|
||||
*
|
||||
* Then 5% of traffic will be routed to function version 2, while
|
||||
* the remaining 95% of traffic will be routed to function version 1.
|
||||
*
|
||||
* @default No additional versions
|
||||
*/
|
||||
readonly additionalVersions?: VersionWeight[];
|
||||
/**
|
||||
* Specifies a provisioned concurrency configuration for a function's alias.
|
||||
*
|
||||
* @default No provisioned concurrency
|
||||
*/
|
||||
readonly provisionedConcurrentExecutions?: number;
|
||||
}
|
||||
/**
|
||||
* Properties for a new Lambda alias
|
||||
*/
|
||||
export interface AliasProps extends AliasOptions {
|
||||
/**
|
||||
* Name of this alias
|
||||
*/
|
||||
readonly aliasName: string;
|
||||
/**
|
||||
* Function version this alias refers to
|
||||
*
|
||||
* Use lambda.currentVersion to reference a version with your latest changes.
|
||||
*/
|
||||
readonly version: IVersion;
|
||||
}
|
||||
export interface AliasAttributes {
|
||||
readonly aliasName: string;
|
||||
readonly aliasVersion: IVersion;
|
||||
}
|
||||
/**
|
||||
* A new alias to a particular version of a Lambda function.
|
||||
*/
|
||||
export declare class Alias extends QualifiedFunctionBase implements IAlias {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
static fromAliasAttributes(scope: Construct, id: string, attrs: AliasAttributes): IAlias;
|
||||
/**
|
||||
* Name of this alias.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly aliasName: string;
|
||||
private readonly alias;
|
||||
readonly lambda: IFunction;
|
||||
readonly architecture: Architecture;
|
||||
readonly version: IVersion;
|
||||
/**
|
||||
* ARN of this alias
|
||||
*
|
||||
* Used to be able to use Alias in place of a regular Lambda. Lambda accepts
|
||||
* ARNs everywhere it accepts function names.
|
||||
*/
|
||||
get functionArn(): string;
|
||||
/**
|
||||
* ARN of this alias
|
||||
*
|
||||
* Used to be able to use Alias in place of a regular Lambda. Lambda accepts
|
||||
* ARNs everywhere it accepts function names.
|
||||
*/
|
||||
get functionName(): string;
|
||||
protected readonly qualifier: string;
|
||||
protected readonly canCreatePermissions: boolean;
|
||||
private scalableAlias?;
|
||||
private readonly scalingRole;
|
||||
constructor(scope: Construct, id: string, props: AliasProps);
|
||||
get aliasRef(): AliasReference;
|
||||
get grantPrincipal(): iam.IPrincipal;
|
||||
get role(): iam.IRole | undefined;
|
||||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Configure provisioned concurrency autoscaling on a function alias. Returns a scalable attribute that can call
|
||||
* `scaleOnUtilization()` and `scaleOnSchedule()`.
|
||||
*
|
||||
* @param options Autoscaling options
|
||||
*/
|
||||
addAutoScaling(options: AutoScalingOptions): IScalableFunctionAttribute;
|
||||
/**
|
||||
* Calculate the routingConfig parameter from the input props
|
||||
*/
|
||||
private determineRoutingConfig;
|
||||
/**
|
||||
* Validate that the additional version weights make sense
|
||||
*
|
||||
* We validate that they are positive and add up to something <= 1.
|
||||
*/
|
||||
private validateAdditionalWeights;
|
||||
/**
|
||||
* Validate that the provisionedConcurrentExecutions makes sense
|
||||
*
|
||||
* Member must have value greater than or equal to 1
|
||||
*/
|
||||
private determineProvisionedConcurrency;
|
||||
}
|
||||
/**
|
||||
* A version/weight pair for routing traffic to Lambda functions
|
||||
*/
|
||||
export interface VersionWeight {
|
||||
/**
|
||||
* The version to route traffic to
|
||||
*/
|
||||
readonly version: IVersion;
|
||||
/**
|
||||
* How much weight to assign to this version (0..1)
|
||||
*/
|
||||
readonly weight: number;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/alias.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/alias.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
33
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/architecture.d.ts
generated
vendored
Normal file
33
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/architecture.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Architectures supported by AWS Lambda
|
||||
*/
|
||||
export declare class Architecture {
|
||||
/**
|
||||
* 64 bit architecture with x86 instruction set.
|
||||
*/
|
||||
static readonly X86_64: Architecture;
|
||||
/**
|
||||
* 64 bit architecture with the ARM instruction set.
|
||||
*/
|
||||
static readonly ARM_64: Architecture;
|
||||
/**
|
||||
* Used to specify a custom architecture name.
|
||||
* Use this if the architecture name is not yet supported by the CDK.
|
||||
* @param name the architecture name as recognized by AWS Lambda.
|
||||
* @param [dockerPlatform=linux/amd64] the platform to use for this architecture when building with Docker
|
||||
*/
|
||||
static custom(name: string, dockerPlatform?: string): Architecture;
|
||||
/**
|
||||
* The name of the architecture as recognized by the AWS Lambda service APIs.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* The platform to use for this architecture when building with Docker.
|
||||
*/
|
||||
readonly dockerPlatform: string;
|
||||
private constructor();
|
||||
/**
|
||||
* Returns a string representation of the architecture using the name
|
||||
*/
|
||||
toString(): string;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/architecture.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/architecture.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Architecture=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class Architecture{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.Architecture",version:"2.252.0"};static X86_64=new Architecture("x86_64","linux/amd64");static ARM_64=new Architecture("arm64","linux/arm64");static custom(name,dockerPlatform){return new Architecture(name,dockerPlatform??"linux/amd64")}name;dockerPlatform;constructor(archName,dockerPlatform){this.name=archName,this.dockerPlatform=dockerPlatform}toString(){return this.name}}exports.Architecture=Architecture;
|
||||
315
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/capacity-provider.d.ts
generated
vendored
Normal file
315
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/capacity-provider.d.ts
generated
vendored
Normal file
@@ -0,0 +1,315 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { IFunction } from './function-base';
|
||||
import type * as ec2 from '../../aws-ec2';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as kms from '../../aws-kms';
|
||||
import type { IResource } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
import type { CapacityProviderReference, ICapacityProviderRef } from '../../interfaces/generated/aws-lambda-interfaces.generated';
|
||||
/**
|
||||
* Represents a Lambda capacity provider.
|
||||
*/
|
||||
export interface ICapacityProvider extends IResource, ICapacityProviderRef {
|
||||
/**
|
||||
* The ARN of the capacity provider.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly capacityProviderArn: string;
|
||||
/**
|
||||
* The name of the capacity provider.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly capacityProviderName: string;
|
||||
}
|
||||
/**
|
||||
* Properties for creating a Lambda capacity provider.
|
||||
*/
|
||||
export interface CapacityProviderProps {
|
||||
/**
|
||||
* The name of the capacity provider. The name must be unique within the AWS account and region.
|
||||
*
|
||||
* @default - AWS CloudFormation generates a unique physical ID and uses that
|
||||
* ID for the capacity provider's name.
|
||||
*/
|
||||
readonly capacityProviderName?: string;
|
||||
/**
|
||||
* A list of security group IDs to associate with EC2 instances launched by the capacity provider.
|
||||
* Up to 5 security groups can be specified.
|
||||
*/
|
||||
readonly securityGroups: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* A list of subnets where the capacity provider can launch EC2 instances.
|
||||
* At least one subnet must be specified, and up to 16 subnets are supported.
|
||||
*/
|
||||
readonly subnets: ec2.ISubnet[];
|
||||
/**
|
||||
* The IAM role that the Lambda service assumes to manage the capacity provider.
|
||||
*
|
||||
* @default - A role will be generated containing the AWSLambdaManagedEC2ResourceOperator managed policy
|
||||
*/
|
||||
readonly operatorRole?: iam.IRole;
|
||||
/**
|
||||
* The instruction set architecture required for compute instances.
|
||||
* Only one architecture can be specified per capacity provider.
|
||||
*
|
||||
* @default - No architecture constraints specified
|
||||
*/
|
||||
readonly architectures?: Architecture[];
|
||||
/**
|
||||
* Configuration for filtering instance types that the capacity provider can use.
|
||||
*
|
||||
* @default - No instance type filtering applied
|
||||
*/
|
||||
readonly instanceTypeFilter?: InstanceTypeFilter;
|
||||
/**
|
||||
* The maximum number of vCPUs that the capacity provider can scale up to.
|
||||
*
|
||||
* @default - No maximum limit specified, service default is 400
|
||||
*/
|
||||
readonly maxVCpuCount?: number;
|
||||
/**
|
||||
* The options for scaling a capacity provider, including scaling policies.
|
||||
*
|
||||
* @default - The `Auto` option is applied by default
|
||||
*/
|
||||
readonly scalingOptions?: ScalingOptions;
|
||||
/**
|
||||
* The AWS Key Management Service (KMS) key used to encrypt data associated with the capacity provider.
|
||||
*
|
||||
* @default - No KMS key specified, uses an AWS-managed key instead
|
||||
*/
|
||||
readonly kmsKey?: kms.IKey;
|
||||
}
|
||||
/**
|
||||
* Configuration for filtering instance types that a capacity provider can use. Instances types can either be allowed or excluded, not both.
|
||||
*/
|
||||
export declare class InstanceTypeFilter {
|
||||
/**
|
||||
* Creates an instance type filter that allows only the specified instance types.
|
||||
*
|
||||
* @param instanceTypes A list of instance types that the capacity provider is allowed to use.
|
||||
*/
|
||||
static allow(instanceTypes: ec2.InstanceType[]): InstanceTypeFilter;
|
||||
/**
|
||||
* Creates an instance type filter that excludes the specified instance types.
|
||||
*
|
||||
* @param instanceTypes A list of instance types that the capacity provider should not use.
|
||||
*/
|
||||
static exclude(instanceTypes: ec2.InstanceType[]): InstanceTypeFilter;
|
||||
/**
|
||||
* A list of instance types that the capacity provider is allowed to use.
|
||||
*/
|
||||
readonly allowedInstanceTypes?: ec2.InstanceType[];
|
||||
/**
|
||||
* A list of instance types that the capacity provider should not use.
|
||||
*/
|
||||
readonly excludedInstanceTypes?: ec2.InstanceType[];
|
||||
/**
|
||||
* Creates a new InstanceTypeFilter.
|
||||
*
|
||||
* @param instanceTypes The instance type configuration
|
||||
*/
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Configuration options for scaling a capacity provider, including scaling mode and policies.
|
||||
*/
|
||||
export declare class ScalingOptions {
|
||||
/**
|
||||
* Creates scaling options where the capacity provider manages scaling automatically.
|
||||
*/
|
||||
static auto(): ScalingOptions;
|
||||
/**
|
||||
* Creates manual scaling options with custom target tracking scaling policies. At least one policy is required.
|
||||
*
|
||||
* @param scalingPolicies The target tracking scaling policies to use for manual scaling.
|
||||
*/
|
||||
static manual(scalingPolicies: TargetTrackingScalingPolicy[]): ScalingOptions;
|
||||
/**
|
||||
* The scaling mode for the capacity provider.
|
||||
*/
|
||||
readonly scalingMode: string;
|
||||
/**
|
||||
* The target tracking scaling policies used when scaling mode is 'Manual'.
|
||||
*/
|
||||
readonly scalingPolicies?: TargetTrackingScalingPolicy[];
|
||||
/**
|
||||
* Creates a new ScalingOptions.
|
||||
*
|
||||
* @param scalingMode The scaling mode for the capacity provider
|
||||
* @param scalingPolicies The target tracking scaling policies for manual scaling
|
||||
*/
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* A target tracking scaling policy that automatically adjusts the capacity provider's compute resources
|
||||
* to maintain a specified target value by tracking the required CloudWatch metric.
|
||||
*/
|
||||
export declare class TargetTrackingScalingPolicy {
|
||||
readonly metricType: string;
|
||||
readonly value: number;
|
||||
/**
|
||||
* Creates a target tracking scaling policy for CPU utilization.
|
||||
*
|
||||
* @param targetCpuUtilization The target value for CPU utilization. The capacity provider will scale resources to maintain this target value.
|
||||
*/
|
||||
static cpuUtilization(targetCpuUtilization: number): TargetTrackingScalingPolicy;
|
||||
/**
|
||||
* The predefined metric type for this scaling policy.
|
||||
*/
|
||||
readonly predefinedMetricType: string;
|
||||
/**
|
||||
* The target value for the specified metric as a percentage. The capacity provider will scale resources to maintain this target value.
|
||||
*/
|
||||
readonly targetValue: number;
|
||||
/**
|
||||
* Creates a new TargetTrackingScalingPolicy.
|
||||
*
|
||||
* @param metricType The predefined metric type
|
||||
* @param value The target value for the metric
|
||||
*/
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Base class for a Lambda capacity provider.
|
||||
*/
|
||||
declare abstract class CapacityProviderBase extends Resource implements ICapacityProvider {
|
||||
/**
|
||||
* The name of the capacity provider.
|
||||
*/
|
||||
abstract readonly capacityProviderName: string;
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the capacity provider.
|
||||
*/
|
||||
abstract readonly capacityProviderArn: string;
|
||||
get capacityProviderRef(): CapacityProviderReference;
|
||||
}
|
||||
/**
|
||||
* Attributes for importing an existing Lambda capacity provider.
|
||||
*/
|
||||
export interface CapacityProviderAttributes {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the capacity provider.
|
||||
*
|
||||
* Format: arn:<partition>:lambda:<region>:<account-id>:capacity-provider:<capacity-provider-name>
|
||||
*/
|
||||
readonly capacityProviderArn: string;
|
||||
}
|
||||
/**
|
||||
* Options for creating a function associated with a capacity provider.
|
||||
*/
|
||||
export interface CapacityProviderFunctionOptions {
|
||||
/**
|
||||
* Specifies the maximum number of concurrent invokes a single execution environment can handle.
|
||||
*
|
||||
* @default Maximum is set to 10
|
||||
*/
|
||||
readonly perExecutionEnvironmentMaxConcurrency?: number;
|
||||
/**
|
||||
* Specifies the execution environment memory per VCPU, in GiB.
|
||||
*
|
||||
* @default 2.0
|
||||
*/
|
||||
readonly executionEnvironmentMemoryGiBPerVCpu?: number;
|
||||
/**
|
||||
* A boolean determining whether or not to automatically publish to the $LATEST.PUBLISHED version.
|
||||
*
|
||||
* @default - True
|
||||
*/
|
||||
readonly publishToLatestPublished?: boolean;
|
||||
/**
|
||||
* The scaling options that are applied to the $LATEST.PUBLISHED version.
|
||||
*
|
||||
* @default - No scaling limitations are applied to the $LATEST.PUBLISHED version.
|
||||
*/
|
||||
readonly latestPublishedScalingConfig?: LatestPublishedScalingConfig;
|
||||
}
|
||||
/**
|
||||
* The scaling configuration that will be applied to the $LATEST.PUBLISHED version.
|
||||
*/
|
||||
export interface LatestPublishedScalingConfig {
|
||||
/**
|
||||
* The minimum number of execution environments to maintain for the $LATEST.PUBLISHED version
|
||||
* when published into a capacity provider.
|
||||
*
|
||||
* This setting ensures that at least this many execution environments are always
|
||||
* available to handle function invocations for this specific version, reducing cold start latency.
|
||||
*
|
||||
* @default - 3 execution environments are set to be the minimum
|
||||
*/
|
||||
readonly minExecutionEnvironments?: number;
|
||||
/**
|
||||
* The maximum number of execution environments allowed for the $LATEST.PUBLISHED version
|
||||
* when published into a capacity provider.
|
||||
*
|
||||
* This setting limits the total number of execution environments that can be created
|
||||
* to handle concurrent invocations of this specific version.
|
||||
*
|
||||
* @default - No maximum specified
|
||||
*/
|
||||
readonly maxExecutionEnvironments?: number;
|
||||
}
|
||||
/**
|
||||
* A Lambda capacity provider that manages compute resources for Lambda functions.
|
||||
*/
|
||||
export declare class CapacityProvider extends CapacityProviderBase {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Import an existing capacity provider by name.
|
||||
*
|
||||
* @param scope The parent construct
|
||||
* @param id The construct ID
|
||||
* @param capacityProviderName The name of the capacity provider to import
|
||||
*/
|
||||
static fromCapacityProviderName(scope: Construct, id: string, capacityProviderName: string): ICapacityProvider;
|
||||
/**
|
||||
* Import an existing capacity provider by ARN.
|
||||
*
|
||||
* @param scope The parent construct
|
||||
* @param id The construct ID
|
||||
* @param capacityProviderArn The ARN of the capacity provider to import
|
||||
*/
|
||||
static fromCapacityProviderArn(scope: Construct, id: string, capacityProviderArn: string): ICapacityProvider;
|
||||
/**
|
||||
* Import an existing capacity provider using its attributes.
|
||||
*
|
||||
* @param scope The parent construct
|
||||
* @param id The construct ID
|
||||
* @param attrs The capacity provider attributes
|
||||
*/
|
||||
static fromCapacityProviderAttributes(scope: Construct, id: string, attrs: CapacityProviderAttributes): ICapacityProvider;
|
||||
private readonly capacityProvider;
|
||||
/**
|
||||
* The name of the capacity provider.
|
||||
*/
|
||||
get capacityProviderName(): string;
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the capacity provider.
|
||||
*/
|
||||
get capacityProviderArn(): string;
|
||||
/**
|
||||
* Creates a new Lambda capacity provider.
|
||||
*
|
||||
* @param scope The parent construct
|
||||
* @param id The construct ID
|
||||
* @param props The capacity provider properties
|
||||
*/
|
||||
constructor(scope: Construct, id: string, props: CapacityProviderProps);
|
||||
private validateCapacityProviderProps;
|
||||
private validateCapacityProviderName;
|
||||
private validateScalingPolicies;
|
||||
private validateInstanceTypeFilter;
|
||||
/**
|
||||
* Configures a Lambda function to use this capacity provider.
|
||||
*
|
||||
* @param func The Lambda function to configure
|
||||
* @param options Optional configuration for the function's capacity provider settings
|
||||
*/
|
||||
addFunction(func: IFunction, options?: CapacityProviderFunctionOptions): void;
|
||||
private validateFunctionScalingConfig;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/capacity-provider.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/capacity-provider.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
83
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code-signing-config.d.ts
generated
vendored
Normal file
83
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code-signing-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { CodeSigningConfigReference, ICodeSigningConfigRef } from './lambda.generated';
|
||||
import type { ISigningProfile } from '../../aws-signer';
|
||||
import type { IResource } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
/**
|
||||
* Code signing configuration policy for deployment validation failure.
|
||||
*/
|
||||
export declare enum UntrustedArtifactOnDeployment {
|
||||
/**
|
||||
* Lambda blocks the deployment request if signature validation checks fail.
|
||||
*/
|
||||
ENFORCE = "Enforce",
|
||||
/**
|
||||
* Lambda allows the deployment of the code package, but issues a warning.
|
||||
* Lambda issues a new Amazon CloudWatch metric, called a signature validation error and also stores the warning in CloudTrail.
|
||||
*/
|
||||
WARN = "Warn"
|
||||
}
|
||||
/**
|
||||
* A Code Signing Config
|
||||
*/
|
||||
export interface ICodeSigningConfig extends IResource, ICodeSigningConfigRef {
|
||||
/**
|
||||
* The ARN of Code Signing Config
|
||||
* @attribute
|
||||
*/
|
||||
readonly codeSigningConfigArn: string;
|
||||
/**
|
||||
* The id of Code Signing Config
|
||||
* @attribute
|
||||
*/
|
||||
readonly codeSigningConfigId: string;
|
||||
}
|
||||
/**
|
||||
* Construction properties for a Code Signing Config object
|
||||
*/
|
||||
export interface CodeSigningConfigProps {
|
||||
/**
|
||||
* List of signing profiles that defines a
|
||||
* trusted user who can sign a code package.
|
||||
*/
|
||||
readonly signingProfiles: ISigningProfile[];
|
||||
/**
|
||||
* Code signing configuration policy for deployment validation failure.
|
||||
* If you set the policy to Enforce, Lambda blocks the deployment request
|
||||
* if signature validation checks fail.
|
||||
* If you set the policy to Warn, Lambda allows the deployment and
|
||||
* creates a CloudWatch log.
|
||||
*
|
||||
* @default UntrustedArtifactOnDeployment.WARN
|
||||
*/
|
||||
readonly untrustedArtifactOnDeployment?: UntrustedArtifactOnDeployment;
|
||||
/**
|
||||
* Code signing configuration description.
|
||||
*
|
||||
* @default - No description.
|
||||
*/
|
||||
readonly description?: string;
|
||||
}
|
||||
/**
|
||||
* Defines a Code Signing Config.
|
||||
*
|
||||
* @resource AWS::Lambda::CodeSigningConfig
|
||||
*/
|
||||
export declare class CodeSigningConfig extends Resource implements ICodeSigningConfig {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Creates a Signing Profile construct that represents an external Signing Profile.
|
||||
*
|
||||
* @param scope The parent creating construct (usually `this`).
|
||||
* @param id The construct's name.
|
||||
* @param codeSigningConfigArn The ARN of code signing config.
|
||||
*/
|
||||
static fromCodeSigningConfigArn(scope: Construct, id: string, codeSigningConfigArn: string): ICodeSigningConfig;
|
||||
readonly codeSigningConfigArn: string;
|
||||
readonly codeSigningConfigId: string;
|
||||
constructor(scope: Construct, id: string, props: CodeSigningConfigProps);
|
||||
get codeSigningConfigRef(): CodeSigningConfigReference;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code-signing-config.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code-signing-config.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
399
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts
generated
vendored
Normal file
399
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code.d.ts
generated
vendored
Normal file
@@ -0,0 +1,399 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type * as ecr from '../../aws-ecr';
|
||||
import * as ecr_assets from '../../aws-ecr-assets';
|
||||
import type { IKeyRef } from '../../aws-kms';
|
||||
import type * as s3 from '../../aws-s3';
|
||||
import * as s3_assets from '../../aws-s3-assets';
|
||||
import * as cdk from '../../core';
|
||||
/**
|
||||
* Represents the Lambda Handler Code.
|
||||
*/
|
||||
export declare abstract class Code {
|
||||
/**
|
||||
* Lambda handler code as an S3 object.
|
||||
*
|
||||
* Note: If `objectVersion` is not defined, the lambda will not be updated automatically if the code in the bucket is updated.
|
||||
* This is because CDK/Cloudformation does not track changes on the source S3 Bucket. It is recommended to either use S3Code.fromAsset() instead or set objectVersion.
|
||||
* @param bucket The S3 bucket
|
||||
* @param key The object key
|
||||
* @param objectVersion Optional S3 object version
|
||||
*/
|
||||
static fromBucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Code;
|
||||
/**
|
||||
* Lambda handler code as an S3 object.
|
||||
*
|
||||
* Note: If `options.objectVersion` is not defined, the lambda will not be updated automatically if the code in the bucket is updated.
|
||||
* This is because CDK/Cloudformation does not track changes on the source S3 Bucket. It is recommended to either use S3Code.fromAsset() instead or set objectVersion.
|
||||
* @param bucket The S3 bucket
|
||||
* @param key The object key
|
||||
* @param options Optional parameters for setting the code, current optional parameters to set here are
|
||||
* 1. `objectVersion` to set S3 object version
|
||||
* 2. `sourceKMSKey` to set KMS Key for encryption of code
|
||||
*/
|
||||
static fromBucketV2(bucket: s3.IBucket, key: string, options?: BucketOptions): S3CodeV2;
|
||||
/**
|
||||
* Inline code for Lambda handler
|
||||
* @returns `LambdaInlineCode` with inline code.
|
||||
* @param code The actual handler code (the resulting zip file cannot exceed 4MB)
|
||||
*/
|
||||
static fromInline(code: string): InlineCode;
|
||||
/**
|
||||
* Loads the function code from a local disk path.
|
||||
*
|
||||
* @param path Either a directory with the Lambda code bundle or a .zip file
|
||||
*/
|
||||
static fromAsset(path: string, options?: s3_assets.AssetOptions): AssetCode;
|
||||
/**
|
||||
* Runs a command to build the code asset that will be used.
|
||||
*
|
||||
* @param output Where the output of the command will be directed, either a directory or a .zip file with the output Lambda code bundle
|
||||
* * For example, if you use the command to run a build script (e.g., [ 'node', 'bundle_code.js' ]), and the build script generates a directory `/my/lambda/code`
|
||||
* containing code that should be ran in a Lambda function, then output should be set to `/my/lambda/code`
|
||||
* @param command The command which will be executed to generate the output, for example, [ 'node', 'bundle_code.js' ]
|
||||
* @param options options for the custom command, and other asset options -- but bundling options are not allowed.
|
||||
*/
|
||||
static fromCustomCommand(output: string, command: string[], options?: CustomCommandOptions): AssetCode;
|
||||
/**
|
||||
* Loads the function code from an asset created by a Docker build.
|
||||
*
|
||||
* By default, the asset is expected to be located at `/asset` in the
|
||||
* image.
|
||||
*
|
||||
* @param path The path to the directory containing the Docker file
|
||||
* @param options Docker build options
|
||||
*/
|
||||
static fromDockerBuild(path: string, options?: DockerBuildAssetOptions): AssetCode;
|
||||
/**
|
||||
* Creates a new Lambda source defined using CloudFormation parameters.
|
||||
*
|
||||
* @returns a new instance of `CfnParametersCode`
|
||||
* @param props optional construction properties of `CfnParametersCode`
|
||||
*/
|
||||
static fromCfnParameters(props?: CfnParametersCodeProps): CfnParametersCode;
|
||||
/**
|
||||
* Use an existing ECR image as the Lambda code.
|
||||
* @param repository the ECR repository that the image is in
|
||||
* @param props properties to further configure the selected image
|
||||
*/
|
||||
static fromEcrImage(repository: ecr.IRepository, props?: EcrImageCodeProps): EcrImageCode;
|
||||
/**
|
||||
* Create an ECR image from the specified asset and bind it as the Lambda code.
|
||||
* @param directory the directory from which the asset must be created
|
||||
* @param props properties to further configure the selected image
|
||||
*/
|
||||
static fromAssetImage(directory: string, props?: AssetImageCodeProps): AssetImageCode;
|
||||
/**
|
||||
* Called when the lambda or layer is initialized to allow this object to bind
|
||||
* to the stack, add resources and have fun.
|
||||
*
|
||||
* @param scope The binding scope. Don't be smart about trying to down-cast or
|
||||
* assume it's initialized. You may just use it as a construct scope.
|
||||
*/
|
||||
abstract bind(scope: Construct): CodeConfig;
|
||||
/**
|
||||
* Called after the CFN function resource has been created to allow the code
|
||||
* class to bind to it. Specifically it's required to allow assets to add
|
||||
* metadata for tooling like SAM CLI to be able to find their origins.
|
||||
*/
|
||||
bindToResource(_resource: cdk.CfnResource, _options?: ResourceBindOptions): void;
|
||||
}
|
||||
/**
|
||||
* Result of binding `Code` into a `Function`.
|
||||
*/
|
||||
export interface CodeConfig {
|
||||
/**
|
||||
* The location of the code in S3 (mutually exclusive with `inlineCode` and `image`).
|
||||
* @default - code is not an s3 location
|
||||
*/
|
||||
readonly s3Location?: s3.Location;
|
||||
/**
|
||||
* Inline code (mutually exclusive with `s3Location` and `image`).
|
||||
* @default - code is not inline code
|
||||
*/
|
||||
readonly inlineCode?: string;
|
||||
/**
|
||||
* Docker image configuration (mutually exclusive with `s3Location` and `inlineCode`).
|
||||
* @default - code is not an ECR container image
|
||||
*/
|
||||
readonly image?: CodeImageConfig;
|
||||
/**
|
||||
* The ARN of the KMS key used to encrypt the handler code.
|
||||
* @default - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.
|
||||
*/
|
||||
readonly sourceKMSKeyArn?: string;
|
||||
}
|
||||
/**
|
||||
* Result of the bind when an ECR image is used.
|
||||
*/
|
||||
export interface CodeImageConfig {
|
||||
/**
|
||||
* URI to the Docker image.
|
||||
*/
|
||||
readonly imageUri: string;
|
||||
/**
|
||||
* Specify or override the CMD on the specified Docker image or Dockerfile.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#cmd
|
||||
* @default - use the CMD specified in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly cmd?: string[];
|
||||
/**
|
||||
* Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
|
||||
* An ENTRYPOINT allows you to configure a container that will run as an executable.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#entrypoint
|
||||
* @default - use the ENTRYPOINT in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly entrypoint?: string[];
|
||||
/**
|
||||
* Specify or override the WORKDIR on the specified Docker image or Dockerfile.
|
||||
* A WORKDIR allows you to configure the working directory the container will use.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#workdir
|
||||
* @default - use the WORKDIR in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly workingDirectory?: string;
|
||||
}
|
||||
/**
|
||||
* Lambda code from an S3 archive.
|
||||
*/
|
||||
export declare class S3Code extends Code {
|
||||
private key;
|
||||
private objectVersion?;
|
||||
readonly isInline = false;
|
||||
private bucketName;
|
||||
constructor(bucket: s3.IBucket, key: string, objectVersion?: string | undefined);
|
||||
bind(_scope: Construct): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* Lambda code from an S3 archive. With option to set KMSKey for encryption.
|
||||
*/
|
||||
export declare class S3CodeV2 extends Code {
|
||||
private key;
|
||||
private options?;
|
||||
readonly isInline = false;
|
||||
private bucketName;
|
||||
constructor(bucket: s3.IBucket, key: string, options?: BucketOptions | undefined);
|
||||
bind(_scope: Construct): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* Lambda code from an inline string.
|
||||
*/
|
||||
export declare class InlineCode extends Code {
|
||||
private code;
|
||||
readonly isInline = true;
|
||||
constructor(code: string);
|
||||
bind(_scope: Construct): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* Lambda code from a local directory.
|
||||
*/
|
||||
export declare class AssetCode extends Code {
|
||||
readonly path: string;
|
||||
private readonly options;
|
||||
readonly isInline = false;
|
||||
private asset?;
|
||||
/**
|
||||
* @param path The path to the asset file or directory.
|
||||
*/
|
||||
constructor(path: string, options?: s3_assets.AssetOptions);
|
||||
bind(scope: Construct): CodeConfig;
|
||||
bindToResource(resource: cdk.CfnResource, options?: ResourceBindOptions): void;
|
||||
}
|
||||
export interface ResourceBindOptions {
|
||||
/**
|
||||
* The name of the CloudFormation property to annotate with asset metadata.
|
||||
* @see https://github.com/aws/aws-cdk/issues/1432
|
||||
* @default Code
|
||||
*/
|
||||
readonly resourceProperty?: string;
|
||||
}
|
||||
/**
|
||||
* Construction properties for `CfnParametersCode`.
|
||||
*/
|
||||
export interface CfnParametersCodeProps {
|
||||
/**
|
||||
* The CloudFormation parameter that represents the name of the S3 Bucket
|
||||
* where the Lambda code will be located in.
|
||||
* Must be of type 'String'.
|
||||
*
|
||||
* @default a new parameter will be created
|
||||
*/
|
||||
readonly bucketNameParam?: cdk.CfnParameter;
|
||||
/**
|
||||
* The CloudFormation parameter that represents the path inside the S3 Bucket
|
||||
* where the Lambda code will be located at.
|
||||
* Must be of type 'String'.
|
||||
*
|
||||
* @default a new parameter will be created
|
||||
*/
|
||||
readonly objectKeyParam?: cdk.CfnParameter;
|
||||
/**
|
||||
* The ARN of the KMS key used to encrypt the handler code.
|
||||
* @default - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.
|
||||
*/
|
||||
readonly sourceKMSKey?: IKeyRef;
|
||||
}
|
||||
/**
|
||||
* Lambda code defined using 2 CloudFormation parameters.
|
||||
* Useful when you don't have access to the code of your Lambda from your CDK code, so you can't use Assets,
|
||||
* and you want to deploy the Lambda in a CodePipeline, using CloudFormation Actions -
|
||||
* you can fill the parameters using the `#assign` method.
|
||||
*/
|
||||
export declare class CfnParametersCode extends Code {
|
||||
readonly isInline = false;
|
||||
private _bucketNameParam?;
|
||||
private _objectKeyParam?;
|
||||
private _sourceKMSKey?;
|
||||
constructor(props?: CfnParametersCodeProps);
|
||||
bind(scope: Construct): CodeConfig;
|
||||
/**
|
||||
* Create a parameters map from this instance's CloudFormation parameters.
|
||||
*
|
||||
* It returns a map with 2 keys that correspond to the names of the parameters defined in this Lambda code,
|
||||
* and as values it contains the appropriate expressions pointing at the provided S3 location
|
||||
* (most likely, obtained from a CodePipeline Artifact by calling the `artifact.s3Location` method).
|
||||
* The result should be provided to the CloudFormation Action
|
||||
* that is deploying the Stack that the Lambda with this code is part of,
|
||||
* in the `parameterOverrides` property.
|
||||
*
|
||||
* @param location the location of the object in S3 that represents the Lambda code
|
||||
*/
|
||||
assign(location: s3.Location): {
|
||||
[name: string]: any;
|
||||
};
|
||||
get bucketNameParam(): string;
|
||||
get objectKeyParam(): string;
|
||||
}
|
||||
/**
|
||||
* Properties to initialize a new EcrImageCode
|
||||
*/
|
||||
export interface EcrImageCodeProps {
|
||||
/**
|
||||
* Specify or override the CMD on the specified Docker image or Dockerfile.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#cmd
|
||||
* @default - use the CMD specified in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly cmd?: string[];
|
||||
/**
|
||||
* Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
|
||||
* An ENTRYPOINT allows you to configure a container that will run as an executable.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#entrypoint
|
||||
* @default - use the ENTRYPOINT in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly entrypoint?: string[];
|
||||
/**
|
||||
* Specify or override the WORKDIR on the specified Docker image or Dockerfile.
|
||||
* A WORKDIR allows you to configure the working directory the container will use.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#workdir
|
||||
* @default - use the WORKDIR in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly workingDirectory?: string;
|
||||
/**
|
||||
* The image tag to use when pulling the image from ECR.
|
||||
* @default 'latest'
|
||||
* @deprecated use `tagOrDigest`
|
||||
*/
|
||||
readonly tag?: string;
|
||||
/**
|
||||
* The image tag or digest to use when pulling the image from ECR (digests must start with `sha256:`).
|
||||
* @default 'latest'
|
||||
*/
|
||||
readonly tagOrDigest?: string;
|
||||
}
|
||||
/**
|
||||
* Represents a Docker image in ECR that can be bound as Lambda Code.
|
||||
*/
|
||||
export declare class EcrImageCode extends Code {
|
||||
private readonly repository;
|
||||
private readonly props;
|
||||
readonly isInline: boolean;
|
||||
constructor(repository: ecr.IRepository, props?: EcrImageCodeProps);
|
||||
bind(_scope: Construct): CodeConfig;
|
||||
}
|
||||
/**
|
||||
* Properties to initialize a new AssetImage
|
||||
*/
|
||||
export interface AssetImageCodeProps extends ecr_assets.DockerImageAssetOptions {
|
||||
/**
|
||||
* Specify or override the CMD on the specified Docker image or Dockerfile.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#cmd
|
||||
* @default - use the CMD specified in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly cmd?: string[];
|
||||
/**
|
||||
* Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
|
||||
* An ENTRYPOINT allows you to configure a container that will run as an executable.
|
||||
* This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#entrypoint
|
||||
* @default - use the ENTRYPOINT in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly entrypoint?: string[];
|
||||
/**
|
||||
* Specify or override the WORKDIR on the specified Docker image or Dockerfile.
|
||||
* A WORKDIR allows you to configure the working directory the container will use.
|
||||
* @see https://docs.docker.com/engine/reference/builder/#workdir
|
||||
* @default - use the WORKDIR in the docker image or Dockerfile.
|
||||
*/
|
||||
readonly workingDirectory?: string;
|
||||
}
|
||||
/**
|
||||
* Represents an ECR image that will be constructed from the specified asset and can be bound as Lambda code.
|
||||
*/
|
||||
export declare class AssetImageCode extends Code {
|
||||
private readonly directory;
|
||||
private readonly props;
|
||||
readonly isInline: boolean;
|
||||
private asset?;
|
||||
constructor(directory: string, props: AssetImageCodeProps);
|
||||
bind(scope: Construct): CodeConfig;
|
||||
bindToResource(resource: cdk.CfnResource, options?: ResourceBindOptions): void;
|
||||
}
|
||||
/**
|
||||
* Options when creating an asset from a Docker build.
|
||||
*/
|
||||
export interface DockerBuildAssetOptions extends cdk.DockerBuildOptions {
|
||||
/**
|
||||
* The path in the Docker image where the asset is located after the build
|
||||
* operation.
|
||||
*
|
||||
* @default /asset
|
||||
*/
|
||||
readonly imagePath?: string;
|
||||
/**
|
||||
* The path on the local filesystem where the asset will be copied
|
||||
* using `docker cp`.
|
||||
*
|
||||
* @default - a unique temporary directory in the system temp directory
|
||||
*/
|
||||
readonly outputPath?: string;
|
||||
}
|
||||
/**
|
||||
* Options for creating `AssetCode` with a custom command, such as running a buildfile.
|
||||
*/
|
||||
export interface CustomCommandOptions extends s3_assets.AssetOptions {
|
||||
/**
|
||||
* options that are passed to the spawned process, which determine the characteristics of the spawned process.
|
||||
*
|
||||
* @default: see `child_process.SpawnSyncOptions` (https://nodejs.org/api/child_process.html#child_processspawnsynccommand-args-options).
|
||||
*/
|
||||
readonly commandOptions?: {
|
||||
[options: string]: any;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Optional parameters for creating code using bucket
|
||||
*/
|
||||
export interface BucketOptions {
|
||||
/**
|
||||
* Optional S3 object version
|
||||
*/
|
||||
readonly objectVersion?: string;
|
||||
/**
|
||||
* The ARN of the KMS key used to encrypt the handler code.
|
||||
* @default - the default server-side encryption with Amazon S3 managed keys(SSE-S3) key will be used.
|
||||
*/
|
||||
readonly sourceKMSKey?: IKeyRef;
|
||||
}
|
||||
5
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code.js
generated
vendored
Normal file
5
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/code.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
42
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/destination.d.ts
generated
vendored
Normal file
42
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/destination.d.ts
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* A destination configuration
|
||||
*/
|
||||
export interface DestinationConfig {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the destination resource
|
||||
*/
|
||||
readonly destination: string;
|
||||
}
|
||||
/**
|
||||
* The type of destination
|
||||
*/
|
||||
export declare enum DestinationType {
|
||||
/**
|
||||
* Failure
|
||||
*/
|
||||
FAILURE = "Failure",
|
||||
/**
|
||||
* Success
|
||||
*/
|
||||
SUCCESS = "Success"
|
||||
}
|
||||
/**
|
||||
* Options when binding a destination to a function
|
||||
*/
|
||||
export interface DestinationOptions {
|
||||
/**
|
||||
* The destination type
|
||||
*/
|
||||
readonly type: DestinationType;
|
||||
}
|
||||
/**
|
||||
* A Lambda destination
|
||||
*/
|
||||
export interface IDestination {
|
||||
/**
|
||||
* Binds this destination to the Lambda function
|
||||
*/
|
||||
bind(scope: Construct, fn: IFunction, options?: DestinationOptions): DestinationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/destination.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/destination.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DestinationType=void 0;var DestinationType;(function(DestinationType2){DestinationType2.FAILURE="Failure",DestinationType2.SUCCESS="Success"})(DestinationType||(exports.DestinationType=DestinationType={}));
|
||||
20
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/dlq.d.ts
generated
vendored
Normal file
20
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/dlq.d.ts
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import type { IEventSourceMapping } from './event-source-mapping';
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* A destination configuration
|
||||
*/
|
||||
export interface DlqDestinationConfig {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the destination resource
|
||||
*/
|
||||
readonly destination: string;
|
||||
}
|
||||
/**
|
||||
* A DLQ for an event source
|
||||
*/
|
||||
export interface IEventSourceDlq {
|
||||
/**
|
||||
* Returns the DLQ destination config of the DLQ
|
||||
*/
|
||||
bind(target: IEventSourceMapping, targetHandler: IFunction): DlqDestinationConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/dlq.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/dlq.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
25
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/durable-config.d.ts
generated
vendored
Normal file
25
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/durable-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { Duration } from '../../core';
|
||||
/**
|
||||
* Configuration for durable functions.
|
||||
*
|
||||
* Lambda durable functions allow for long-running executions with persistent state.
|
||||
*/
|
||||
export interface DurableConfig {
|
||||
/**
|
||||
* The amount of time that Lambda allows a durable function to run before stopping it.
|
||||
*
|
||||
* Must be between 1 and 31,622,400 seconds (366 days).
|
||||
*/
|
||||
readonly executionTimeout: Duration;
|
||||
/**
|
||||
* The number of days after a durable execution is closed that Lambda retains its history.
|
||||
*
|
||||
* Must be between 1 and 90 days.
|
||||
*
|
||||
* The underlying configuration is expressed in whole numbers of days. Providing a Duration that
|
||||
* does not represent a whole number of days will result in a runtime or deployment error.
|
||||
*
|
||||
* @default Duration.days(14)
|
||||
*/
|
||||
readonly retentionPeriod?: Duration;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/durable-config.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/durable-config.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
69
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts
generated
vendored
Normal file
69
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IDestination } from './destination';
|
||||
import type { IFunction } from './function-base';
|
||||
import type { Duration } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
/**
|
||||
* Options to add an EventInvokeConfig to a function.
|
||||
*/
|
||||
export interface EventInvokeConfigOptions {
|
||||
/**
|
||||
* The destination for failed invocations.
|
||||
*
|
||||
* @default - no destination
|
||||
*/
|
||||
readonly onFailure?: IDestination;
|
||||
/**
|
||||
* The destination for successful invocations.
|
||||
*
|
||||
* @default - no destination
|
||||
*/
|
||||
readonly onSuccess?: IDestination;
|
||||
/**
|
||||
* The maximum age of a request that Lambda sends to a function for
|
||||
* processing.
|
||||
*
|
||||
* Minimum: 60 seconds
|
||||
* Maximum: 6 hours
|
||||
*
|
||||
* @default Duration.hours(6)
|
||||
*/
|
||||
readonly maxEventAge?: Duration;
|
||||
/**
|
||||
* The maximum number of times to retry when the function returns an error.
|
||||
*
|
||||
* Minimum: 0
|
||||
* Maximum: 2
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
readonly retryAttempts?: number;
|
||||
}
|
||||
/**
|
||||
* Properties for an EventInvokeConfig
|
||||
*/
|
||||
export interface EventInvokeConfigProps extends EventInvokeConfigOptions {
|
||||
/**
|
||||
* The Lambda function
|
||||
*/
|
||||
readonly function: IFunction;
|
||||
/**
|
||||
* The qualifier
|
||||
*
|
||||
* @default - latest version
|
||||
*/
|
||||
readonly qualifier?: string;
|
||||
}
|
||||
/**
|
||||
* Configure options for asynchronous invocation on a version or an alias
|
||||
*
|
||||
* By default, Lambda retries an asynchronous invocation twice if the function
|
||||
* returns an error. It retains events in a queue for up to six hours. When an
|
||||
* event fails all processing attempts or stays in the asynchronous invocation
|
||||
* queue for too long, Lambda discards it.
|
||||
*/
|
||||
export declare class EventInvokeConfig extends Resource {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
constructor(scope: Construct, id: string, props: EventInvokeConfigProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";var __esDecorate=exports&&exports.__esDecorate||function(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!="function")throw new TypeError("Function expected");return f}for(var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value",target=!descriptorIn&&ctor?contextIn.static?ctor:ctor.prototype:null,descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{}),_,done=!1,i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null))};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!="object")throw new TypeError("Object expected");(_=accept(result.get))&&(descriptor.get=_),(_=accept(result.set))&&(descriptor.set=_),(_=accept(result.init))&&initializers.unshift(_)}else(_=accept(result))&&(kind==="field"?initializers.unshift(_):descriptor[key]=_)}target&&Object.defineProperty(target,contextIn.name,descriptor),done=!0},__runInitializers=exports&&exports.__runInitializers||function(thisArg,initializers,value){for(var useValue=arguments.length>2,i=0;i<initializers.length;i++)value=useValue?initializers[i].call(thisArg,value):initializers[i].call(thisArg);return useValue?value:void 0};Object.defineProperty(exports,"__esModule",{value:!0}),exports.EventInvokeConfig=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var destination_1=()=>{var tmp=require("./destination");return destination_1=()=>tmp,tmp},lambda_generated_1=()=>{var tmp=require("./lambda.generated");return lambda_generated_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},metadata_resource_1=()=>{var tmp=require("../../core/lib/metadata-resource");return metadata_resource_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},prop_injectable_1=()=>{var tmp=require("../../core/lib/prop-injectable");return prop_injectable_1=()=>tmp,tmp};let EventInvokeConfig=(()=>{let _classDecorators=[prop_injectable_1().propertyInjectable],_classDescriptor,_classExtraInitializers=[],_classThis,_classSuper=core_1().Resource;var EventInvokeConfig2=class extends _classSuper{static{_classThis=this}static{const _metadata=typeof Symbol=="function"&&Symbol.metadata?Object.create(_classSuper[Symbol.metadata]??null):void 0;__esDecorate(null,_classDescriptor={value:_classThis},_classDecorators,{kind:"class",name:_classThis.name,metadata:_metadata},null,_classExtraInitializers),EventInvokeConfig2=_classThis=_classDescriptor.value,_metadata&&Object.defineProperty(_classThis,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:_metadata})}static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.EventInvokeConfig",version:"2.252.0"};static PROPERTY_INJECTION_ID="aws-cdk-lib.aws-lambda.EventInvokeConfig";constructor(scope,id,props){super(scope,id);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_EventInvokeConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,EventInvokeConfig2),error}if((0,metadata_resource_1().addConstructMetadata)(this,props),props.maxEventAge&&(props.maxEventAge.toSeconds()<60||props.maxEventAge.toSeconds()>21600))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`RepresentBetween21600Seconds`,"`maximumEventAge` must represent a `Duration` that is between 60 and 21600 seconds.",this);if(props.retryAttempts&&(props.retryAttempts<0||props.retryAttempts>2))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`MustBeBetween`,"`retryAttempts` must be between 0 and 2.",this);new(lambda_generated_1()).CfnEventInvokeConfig(this,"Resource",{destinationConfig:props.onFailure||props.onSuccess?{...props.onFailure?{onFailure:props.onFailure.bind(this,props.function,{type:destination_1().DestinationType.FAILURE})}:{},...props.onSuccess?{onSuccess:props.onSuccess.bind(this,props.function,{type:destination_1().DestinationType.SUCCESS})}:{}}:void 0,functionName:props.function.functionName,maximumEventAgeInSeconds:props.maxEventAge&&props.maxEventAge.toSeconds(),maximumRetryAttempts:props.retryAttempts??void 0,qualifier:props.qualifier||"$LATEST"})}static{__runInitializers(_classThis,_classExtraInitializers)}};return EventInvokeConfig2=_classThis})();exports.EventInvokeConfig=EventInvokeConfig;
|
||||
64
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-filter.d.ts
generated
vendored
Normal file
64
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-filter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* Filter rules for Lambda event filtering
|
||||
*/
|
||||
export declare class FilterRule {
|
||||
/**
|
||||
* Null comparison operator
|
||||
*/
|
||||
static null(): any;
|
||||
/**
|
||||
* Empty comparison operator
|
||||
*/
|
||||
static empty(): string[];
|
||||
/**
|
||||
* Equals comparison operator
|
||||
*/
|
||||
static isEqual(item: string | number | boolean): any;
|
||||
/**
|
||||
* Or comparison operator
|
||||
*/
|
||||
static or(...elem: string[]): string[];
|
||||
/**
|
||||
* Not equals comparison operator
|
||||
*/
|
||||
static notEquals(elem: string): {
|
||||
[key: string]: string[];
|
||||
}[];
|
||||
/**
|
||||
* Numeric range comparison operator
|
||||
*/
|
||||
static between(first: number, second: number): {
|
||||
[key: string]: any[];
|
||||
}[];
|
||||
/**
|
||||
* Exists comparison operator
|
||||
*/
|
||||
static exists(): {
|
||||
[key: string]: boolean;
|
||||
}[];
|
||||
/**
|
||||
* Not exists comparison operator
|
||||
*/
|
||||
static notExists(): {
|
||||
[key: string]: boolean;
|
||||
}[];
|
||||
/**
|
||||
* Begins with comparison operator
|
||||
*/
|
||||
static beginsWith(elem: string): {
|
||||
[key: string]: string;
|
||||
}[];
|
||||
}
|
||||
/**
|
||||
* Filter criteria for Lambda event filtering
|
||||
*/
|
||||
export declare class FilterCriteria {
|
||||
/**
|
||||
* Filter for event source
|
||||
*/
|
||||
static filter(filter: {
|
||||
[key: string]: any;
|
||||
}): {
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-filter.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-filter.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FilterCriteria=exports.FilterRule=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class FilterRule{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.FilterRule",version:"2.252.0"};static null(){return[null]}static empty(){return[""]}static isEqual(item){return typeof item=="number"?[{numeric:["=",item]}]:[item]}static or(...elem){return elem}static notEquals(elem){return[{"anything-but":[elem]}]}static between(first,second){return[{numeric:[">",first,"<=",second]}]}static exists(){return[{exists:!0}]}static notExists(){return[{exists:!1}]}static beginsWith(elem){return[{prefix:elem}]}}exports.FilterRule=FilterRule;class FilterCriteria{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.FilterCriteria",version:"2.252.0"};static filter(filter){return{pattern:JSON.stringify(filter)}}}exports.FilterCriteria=FilterCriteria;
|
||||
443
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-mapping.d.ts
generated
vendored
Normal file
443
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-mapping.d.ts
generated
vendored
Normal file
@@ -0,0 +1,443 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IEventSourceDlq } from './dlq';
|
||||
import type { IFunction } from './function-base';
|
||||
import type { EventSourceMappingReference, IEventSourceMappingRef } from './lambda.generated';
|
||||
import type { ISchemaRegistry } from './schema-registry';
|
||||
import type { IKey } from '../../aws-kms';
|
||||
import * as cdk from '../../core';
|
||||
/**
|
||||
* The type of authentication protocol or the VPC components for your event source's SourceAccessConfiguration
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/API_SourceAccessConfiguration.html#SSS-Type-SourceAccessConfiguration-Type
|
||||
*/
|
||||
export declare class SourceAccessConfigurationType {
|
||||
/**
|
||||
* (MQ) The Secrets Manager secret that stores your broker credentials.
|
||||
*/
|
||||
static readonly BASIC_AUTH: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your Self-Managed Apache Kafka cluster.
|
||||
*/
|
||||
static readonly VPC_SUBNET: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The VPC security group used to manage access to your Self-Managed Apache Kafka brokers.
|
||||
*/
|
||||
static readonly VPC_SECURITY_GROUP: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your Self-Managed Apache Kafka brokers.
|
||||
*/
|
||||
static readonly SASL_SCRAM_256_AUTH: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your Self-Managed Apache Kafka brokers.
|
||||
*/
|
||||
static readonly SASL_SCRAM_512_AUTH: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM),
|
||||
* and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.
|
||||
*/
|
||||
static readonly CLIENT_CERTIFICATE_TLS_AUTH: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.
|
||||
*/
|
||||
static readonly SERVER_ROOT_CA_CERTIFICATE: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source.
|
||||
*/
|
||||
static readonly VIRTUAL_HOST: SourceAccessConfigurationType;
|
||||
/** A custom source access configuration property */
|
||||
static of(name: string): SourceAccessConfigurationType;
|
||||
/**
|
||||
* The key to use in `SourceAccessConfigurationProperty.Type` property in CloudFormation
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type
|
||||
*/
|
||||
readonly type: string;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Specific settings like the authentication protocol or the VPC components to secure access to your event source.
|
||||
*/
|
||||
export interface SourceAccessConfiguration {
|
||||
/**
|
||||
* The type of authentication protocol or the VPC components for your event source. For example: "SASL_SCRAM_512_AUTH".
|
||||
*/
|
||||
readonly type: SourceAccessConfigurationType;
|
||||
/**
|
||||
* The value for your chosen configuration in type.
|
||||
* For example: "URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName".
|
||||
* The exact string depends on the type.
|
||||
* @see SourceAccessConfigurationType
|
||||
*/
|
||||
readonly uri: string;
|
||||
}
|
||||
/**
|
||||
* (Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the event source.
|
||||
*/
|
||||
export interface ProvisionedPollerConfig {
|
||||
/**
|
||||
* The minimum number of pollers that should be provisioned.
|
||||
*
|
||||
* @default - 1
|
||||
*/
|
||||
readonly minimumPollers?: number;
|
||||
/**
|
||||
* The maximum number of pollers that can be provisioned.
|
||||
*
|
||||
* @default - 200
|
||||
*/
|
||||
readonly maximumPollers?: number;
|
||||
/**
|
||||
* An optional identifier that groups multiple ESMs to share EPU capacity
|
||||
* and reduce costs. ESMs with the same PollerGroupName share compute
|
||||
* resources.
|
||||
*
|
||||
* @default - not set, dedicated compute resource per event source.
|
||||
*/
|
||||
readonly pollerGroupName?: string;
|
||||
}
|
||||
export interface EventSourceMappingOptions {
|
||||
/**
|
||||
* The Amazon Resource Name (ARN) of the event source. Any record added to
|
||||
* this stream can invoke the Lambda function.
|
||||
*
|
||||
* @default - not set if using a self managed Kafka cluster, throws an error otherwise
|
||||
*/
|
||||
readonly eventSourceArn?: string;
|
||||
/**
|
||||
* The largest number of records that AWS Lambda will retrieve from your event
|
||||
* source at the time of invoking your function. Your function receives an
|
||||
* event with all the retrieved records.
|
||||
*
|
||||
* Valid Range: Minimum value of 1. Maximum value of 10000.
|
||||
*
|
||||
* @default - Amazon Kinesis, Amazon DynamoDB, and Amazon MSK is 100 records.
|
||||
* The default for Amazon SQS is 10 messages. For standard SQS queues, the maximum is 10,000. For FIFO SQS queues, the maximum is 10.
|
||||
*/
|
||||
readonly batchSize?: number;
|
||||
/**
|
||||
* If the function returns an error, split the batch in two and retry.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly bisectBatchOnError?: boolean;
|
||||
/**
|
||||
* An Amazon S3, Amazon SQS queue or Amazon SNS topic destination for discarded records.
|
||||
*
|
||||
* @default discarded records are ignored
|
||||
*/
|
||||
readonly onFailure?: IEventSourceDlq;
|
||||
/**
|
||||
* Set to false to disable the event source upon creation.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly enabled?: boolean;
|
||||
/**
|
||||
* The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should
|
||||
* start reading.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html#Kinesis-GetShardIterator-request-ShardIteratorType
|
||||
*
|
||||
* @default - no starting position
|
||||
*/
|
||||
readonly startingPosition?: StartingPosition;
|
||||
/**
|
||||
* The time from which to start reading, in Unix time seconds.
|
||||
*
|
||||
* @default - no timestamp
|
||||
*/
|
||||
readonly startingPositionTimestamp?: number;
|
||||
/**
|
||||
* Allow functions to return partially successful responses for a batch of records.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-batchfailurereporting
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly reportBatchItemFailures?: boolean;
|
||||
/**
|
||||
* The maximum amount of time to gather records before invoking the function.
|
||||
* Maximum of Duration.minutes(5)
|
||||
*
|
||||
* @default Duration.seconds(0)
|
||||
*/
|
||||
readonly maxBatchingWindow?: cdk.Duration;
|
||||
/**
|
||||
* The maximum concurrency setting limits the number of concurrent instances of the function that an Amazon SQS event source can invoke.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency
|
||||
*
|
||||
* Valid Range: Minimum value of 2. Maximum value of 1000.
|
||||
*
|
||||
* @default - No specific limit.
|
||||
*/
|
||||
readonly maxConcurrency?: number;
|
||||
/**
|
||||
* The maximum age of a record that Lambda sends to a function for processing.
|
||||
* Valid Range:
|
||||
* * Minimum value of 60 seconds
|
||||
* * Maximum value of 7 days
|
||||
*
|
||||
* @default - infinite or until the record expires.
|
||||
*/
|
||||
readonly maxRecordAge?: cdk.Duration;
|
||||
/**
|
||||
* The maximum number of times to retry when the function returns an error.
|
||||
* Set to `undefined` if you want lambda to keep retrying infinitely or until
|
||||
* the record expires.
|
||||
*
|
||||
* Valid Range:
|
||||
* * Minimum value of 0
|
||||
* * Maximum value of 10000
|
||||
*
|
||||
* @default - infinite or until the record expires.
|
||||
*/
|
||||
readonly retryAttempts?: number;
|
||||
/**
|
||||
* The number of batches to process from each shard concurrently.
|
||||
* Valid Range:
|
||||
* * Minimum value of 1
|
||||
* * Maximum value of 10
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly parallelizationFactor?: number;
|
||||
/**
|
||||
* The name of the Kafka topic.
|
||||
*
|
||||
* @default - no topic
|
||||
*/
|
||||
readonly kafkaTopic?: string;
|
||||
/**
|
||||
* The size of the tumbling windows to group records sent to DynamoDB or Kinesis
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-ddb-windows
|
||||
*
|
||||
* Valid Range: 0 - 15 minutes
|
||||
*
|
||||
* @default - None
|
||||
*/
|
||||
readonly tumblingWindow?: cdk.Duration;
|
||||
/**
|
||||
* A list of host and port pairs that are the addresses of the Kafka brokers in a self managed "bootstrap" Kafka cluster
|
||||
* that a Kafka client connects to initially to bootstrap itself.
|
||||
* They are in the format `abc.example.com:9096`.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly kafkaBootstrapServers?: string[];
|
||||
/**
|
||||
* The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. The value must have a length between 1 and 200 and full the pattern '[a-zA-Z0-9-\/*:_+=.@-]*'. For more information, see [Customizable consumer group ID](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id).
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly kafkaConsumerGroupId?: string;
|
||||
/**
|
||||
* Specific settings like the authentication protocol or the VPC components to secure access to your event source.
|
||||
* @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly sourceAccessConfigurations?: SourceAccessConfiguration[];
|
||||
/**
|
||||
* Add filter criteria to Event Source
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly filters?: Array<{
|
||||
[key: string]: any;
|
||||
}>;
|
||||
/**
|
||||
* Add Customer managed KMS key to encrypt Filter Criteria.
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html
|
||||
* By default, Lambda will encrypt Filter Criteria using AWS managed keys
|
||||
* @see https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly filterEncryption?: IKey;
|
||||
/**
|
||||
* Check if support S3 onfailure destination(OFD). Kinesis, DynamoDB, MSK and self managed kafka event support S3 OFD
|
||||
* @default false
|
||||
*/
|
||||
readonly supportS3OnFailureDestination?: boolean;
|
||||
/**
|
||||
* Configuration for provisioned pollers that read from the event source.
|
||||
* When specified, allows control over the minimum and maximum number of pollers
|
||||
* that can be provisioned to process events from the source.
|
||||
* @default - no provisioned pollers
|
||||
*/
|
||||
readonly provisionedPollerConfig?: ProvisionedPollerConfig;
|
||||
/**
|
||||
* Configuration for enhanced monitoring metrics collection
|
||||
* When specified, enables collection of additional metrics for the stream event source
|
||||
*
|
||||
* @default - Enhanced monitoring is disabled
|
||||
*/
|
||||
readonly metricsConfig?: MetricsConfig;
|
||||
/**
|
||||
* Configuration for logging verbosity from the event source mapping poller
|
||||
*
|
||||
* This configuration controls the verbosity of the logs generated by the polling infrastructure
|
||||
* that reads events from the event source. The logs provide insights into the internal operations
|
||||
* of the event source mapping, including connection status, polling behavior, and error conditions.
|
||||
*
|
||||
* @default - No logging
|
||||
*/
|
||||
readonly logLevel?: EventSourceMappingLogLevel;
|
||||
/**
|
||||
* Specific configuration settings for a Kafka schema registry.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly schemaRegistryConfig?: ISchemaRegistry;
|
||||
}
|
||||
/**
|
||||
* The log level for the event source mapping poller
|
||||
*
|
||||
* Controls the verbosity of logs generated by the polling infrastructure.
|
||||
* Different log levels provide varying amounts of detail:
|
||||
*
|
||||
* - INFO: Standard operational information suitable for production monitoring
|
||||
* - DEBUG: Detailed diagnostic information for development and troubleshooting
|
||||
* - WARN: Warning messages and potential issues that don't prevent normal operation
|
||||
*
|
||||
* These logs are separate from your Lambda function's application logs and focus
|
||||
* on the event source mapping's internal operations such as connection management,
|
||||
* polling behavior, and infrastructure-level error conditions.
|
||||
*
|
||||
* // Configure INFO level logging for production monitoring
|
||||
* let func: lambda.IFunction;
|
||||
* const eventSourceMapping = func.addEventSourceMapping(`eventSourceMappingName`, {
|
||||
* logLevel: lambda.EventSourceMappingLogLevel.INFO
|
||||
* });
|
||||
*
|
||||
* // Configure DEBUG level logging for detailed troubleshooting
|
||||
* let func: lambda.IFunction;
|
||||
* const eventSourceMapping = func.addEventSourceMapping(`eventSourceMappingName`, {
|
||||
* logLevel: lambda.EventSourceMappingLogLevel.DEBUG
|
||||
* });
|
||||
*/
|
||||
export declare enum EventSourceMappingLogLevel {
|
||||
/**
|
||||
* Messages that record the normal operation of your poller.
|
||||
*/
|
||||
INFO = "INFO",
|
||||
/**
|
||||
* Detailed information for poller debugging.
|
||||
*/
|
||||
DEBUG = "DEBUG",
|
||||
/**
|
||||
* Messages about potential errors that may lead to unexpected behavior if unaddressed.
|
||||
*/
|
||||
WARN = "WARN"
|
||||
}
|
||||
export declare enum MetricType {
|
||||
/**
|
||||
* Event Count metrics provide insights into the processing behavior of your event source mapping,
|
||||
* including the number of events successfully processed, filtered out, or dropped.
|
||||
* These metrics help you monitor the flow and status of events through your event source mapping.
|
||||
*/
|
||||
EVENT_COUNT = "EventCount",
|
||||
/**
|
||||
* Error Count metrics provide insights into invocation errors and failures
|
||||
* in your event source mapping processing.
|
||||
*/
|
||||
ERROR_COUNT = "ErrorCount",
|
||||
/**
|
||||
* Kafka-specific metrics provide detailed insights into Kafka consumer behavior,
|
||||
* including lag, throughput, and partition-specific metrics.
|
||||
*/
|
||||
KAFKA_METRICS = "KafkaMetrics"
|
||||
}
|
||||
/**
|
||||
* Configuration for collecting metrics from the event source
|
||||
*/
|
||||
export interface MetricsConfig {
|
||||
/**
|
||||
* List of metric types to enable for this event source
|
||||
*/
|
||||
readonly metrics: MetricType[];
|
||||
}
|
||||
/**
|
||||
* Properties for declaring a new event source mapping.
|
||||
*/
|
||||
export interface EventSourceMappingProps extends EventSourceMappingOptions {
|
||||
/**
|
||||
* The target AWS Lambda function.
|
||||
*/
|
||||
readonly target: IFunction;
|
||||
}
|
||||
/**
|
||||
* Represents an event source mapping for a lambda function.
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html
|
||||
*/
|
||||
export interface IEventSourceMapping extends cdk.IResource, IEventSourceMappingRef {
|
||||
/**
|
||||
* The identifier for this EventSourceMapping
|
||||
* @attribute
|
||||
*/
|
||||
readonly eventSourceMappingId: string;
|
||||
/**
|
||||
* The ARN of the event source mapping (i.e. arn:aws:lambda:region:account-id:event-source-mapping/event-source-mapping-id)
|
||||
*/
|
||||
readonly eventSourceMappingArn: string;
|
||||
}
|
||||
/**
|
||||
* Defines a Lambda EventSourceMapping resource.
|
||||
*
|
||||
* Usually, you won't need to define the mapping yourself. This will usually be done by
|
||||
* event sources. For example, to add an SQS event source to a function:
|
||||
*
|
||||
* ```ts
|
||||
* import * as sqs from 'aws-cdk-lib/aws-sqs';
|
||||
* import * as eventsources from 'aws-cdk-lib/aws-lambda-event-sources';
|
||||
*
|
||||
* declare const handler: lambda.Function;
|
||||
* declare const queue: sqs.Queue;
|
||||
*
|
||||
* handler.addEventSource(new eventsources.SqsEventSource(queue));
|
||||
* ```
|
||||
*
|
||||
* The `SqsEventSource` class will automatically create the mapping, and will also
|
||||
* modify the Lambda's execution role so it can consume messages from the queue.
|
||||
*/
|
||||
export declare class EventSourceMapping extends cdk.Resource implements IEventSourceMapping {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Import an event source into this stack from its event source id.
|
||||
*/
|
||||
static fromEventSourceMappingId(scope: Construct, id: string, eventSourceMappingId: string): IEventSourceMapping;
|
||||
private static formatArn;
|
||||
readonly eventSourceMappingId: string;
|
||||
readonly eventSourceMappingArn: string;
|
||||
constructor(scope: Construct, id: string, props: EventSourceMappingProps);
|
||||
get eventSourceMappingRef(): EventSourceMappingReference;
|
||||
private validateKafkaConsumerGroupIdOrThrow;
|
||||
}
|
||||
/**
|
||||
* The position in the DynamoDB, Kinesis or MSK stream where AWS Lambda should start
|
||||
* reading.
|
||||
*/
|
||||
export declare enum StartingPosition {
|
||||
/**
|
||||
* Start reading at the last untrimmed record in the shard in the system,
|
||||
* which is the oldest data record in the shard.
|
||||
*/
|
||||
TRIM_HORIZON = "TRIM_HORIZON",
|
||||
/**
|
||||
* Start reading just after the most recent record in the shard, so that you
|
||||
* always read the most recent data in the shard
|
||||
*/
|
||||
LATEST = "LATEST",
|
||||
/**
|
||||
* Start reading from a position defined by a time stamp.
|
||||
* Only supported for Amazon Kinesis streams, otherwise an error will occur.
|
||||
* If supplied, `startingPositionTimestamp` must also be set.
|
||||
*/
|
||||
AT_TIMESTAMP = "AT_TIMESTAMP"
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-mapping.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source-mapping.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
13
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source.d.ts
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* An abstract class which represents an AWS Lambda event source.
|
||||
*/
|
||||
export interface IEventSource {
|
||||
/**
|
||||
* Called by `lambda.addEventSource` to allow the event source to bind to this
|
||||
* function.
|
||||
*
|
||||
* @param target That lambda function to bind to.
|
||||
*/
|
||||
bind(target: IFunction): void;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/event-source.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
59
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/filesystem.d.ts
generated
vendored
Normal file
59
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/filesystem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
import type { IDependable } from 'constructs';
|
||||
import type { Connections } from '../../aws-ec2';
|
||||
import type * as efs from '../../aws-efs';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as s3files from '../../aws-s3files';
|
||||
/**
|
||||
* FileSystem configurations for the Lambda function
|
||||
*/
|
||||
export interface FileSystemConfig {
|
||||
/**
|
||||
* mount path in the lambda runtime environment
|
||||
*/
|
||||
readonly localMountPath: string;
|
||||
/**
|
||||
* ARN of the access point
|
||||
*/
|
||||
readonly arn: string;
|
||||
/**
|
||||
* array of IDependable that lambda function depends on
|
||||
*
|
||||
* @default - no dependency
|
||||
*/
|
||||
readonly dependency?: IDependable[];
|
||||
/**
|
||||
* connections object used to allow ingress traffic from lambda function
|
||||
*
|
||||
* @default - no connections required to add extra ingress rules for Lambda function
|
||||
*/
|
||||
readonly connections?: Connections;
|
||||
/**
|
||||
* additional IAM policies required for the lambda function
|
||||
*
|
||||
* @default - no additional policies required
|
||||
*/
|
||||
readonly policies?: iam.PolicyStatement[];
|
||||
}
|
||||
/**
|
||||
* Represents the filesystem for the Lambda function
|
||||
*/
|
||||
export declare class FileSystem {
|
||||
readonly config: FileSystemConfig;
|
||||
/**
|
||||
* mount the filesystem from Amazon EFS
|
||||
* @param ap the Amazon EFS access point
|
||||
* @param mountPath the target path in the lambda runtime environment
|
||||
*/
|
||||
static fromEfsAccessPoint(ap: efs.IAccessPoint, mountPath: string): FileSystem;
|
||||
/**
|
||||
* Mount the filesystem from Amazon S3 Files
|
||||
* @param ap the S3 Files access point
|
||||
* @param mountPath the target path in the lambda runtime environment
|
||||
*/
|
||||
static fromS3FilesAccessPoint(ap: s3files.IAccessPointRef, mountPath: string): FileSystem;
|
||||
private static readonly NFS_PORT;
|
||||
/**
|
||||
* @param config the FileSystem configurations for the Lambda function
|
||||
*/
|
||||
protected constructor(config: FileSystemConfig);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/filesystem.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/filesystem.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileSystem=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var ec2=()=>{var tmp=require("../../aws-ec2");return ec2=()=>tmp,tmp},iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp},access_point_reflection_1=()=>{var tmp=require("../../aws-s3files/lib/private/access-point-reflection");return access_point_reflection_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp};class FileSystem{config;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.FileSystem",version:"2.252.0"};static fromEfsAccessPoint(ap,mountPath){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_efs_IAccessPoint(ap)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromEfsAccessPoint),error}return new FileSystem({localMountPath:mountPath,arn:ap.accessPointArn,dependency:[ap.fileSystem.mountTargetsAvailable],connections:ap.fileSystem.connections,policies:[new(iam()).PolicyStatement({actions:["elasticfilesystem:ClientMount"],resources:["*"],conditions:{StringEquals:{"elasticfilesystem:AccessPointArn":ap.accessPointArn}}}),new(iam()).PolicyStatement({actions:["elasticfilesystem:ClientWrite"],resources:[core_1().Stack.of(ap).formatArn({service:"elasticfilesystem",resource:"file-system",resourceName:ap.fileSystem.fileSystemId})]})]})}static fromS3FilesAccessPoint(ap,mountPath){try{jsiiDeprecationWarnings().aws_cdk_lib_interfaces_aws_s3files_IAccessPointRef(ap)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromS3FilesAccessPoint),error}const reflection=access_point_reflection_1().AccessPointReflection.of(ap);return new FileSystem({localMountPath:mountPath,arn:ap.accessPointRef.accessPointArn,dependency:reflection.mountTargets,connections:new(ec2()).Connections({securityGroups:reflection.mountTargetSecurityGroups.map((cfnSg,i)=>ec2().SecurityGroup.fromSecurityGroupId(ap,`MountTargetSG${i}`,cfnSg.attrGroupId)),defaultPort:ec2().Port.tcp(FileSystem.NFS_PORT)}),policies:[new(iam()).PolicyStatement({actions:["s3files:ClientMount"],resources:[ap.accessPointRef.accessPointArn]}),new(iam()).PolicyStatement({actions:["s3files:ClientMount","s3files:ClientWrite"],resources:[reflection.fileSystem.fileSystemRef.fileSystemArn]})]})}static NFS_PORT=2049;constructor(config){this.config=config;try{jsiiDeprecationWarnings().aws_cdk_lib_aws_lambda_FileSystemConfig(config)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FileSystem),error}}}exports.FileSystem=FileSystem;
|
||||
432
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-base.d.ts
generated
vendored
Normal file
432
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-base.d.ts
generated
vendored
Normal file
@@ -0,0 +1,432 @@
|
||||
import type { Construct, Node } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { EventInvokeConfigOptions } from './event-invoke-config';
|
||||
import type { IEventSource } from './event-source';
|
||||
import type { EventSourceMappingOptions } from './event-source-mapping';
|
||||
import { EventSourceMapping } from './event-source-mapping';
|
||||
import type { FunctionUrlOptions } from './function-url';
|
||||
import { FunctionUrl } from './function-url';
|
||||
import type { IVersion } from './lambda-version';
|
||||
import type { FunctionReference, IFunctionRef } from './lambda.generated';
|
||||
import type { Permission } from './permission';
|
||||
import type { TenancyConfig } from './tenancy-config';
|
||||
import type * as cloudwatch from '../../aws-cloudwatch';
|
||||
import type * as ec2 from '../../aws-ec2';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type { IResource } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
export interface IFunction extends IResource, ec2.IConnectable, iam.IGrantable, IFunctionRef {
|
||||
/**
|
||||
* The name of the function.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly functionName: string;
|
||||
/**
|
||||
* The ARN of the function.
|
||||
*
|
||||
* @attribute
|
||||
*/
|
||||
readonly functionArn: string;
|
||||
/**
|
||||
* The IAM role associated with this function.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* Whether or not this Lambda function was bound to a VPC
|
||||
*
|
||||
* If this is is `false`, trying to access the `connections` object will fail.
|
||||
*/
|
||||
readonly isBoundToVpc: boolean;
|
||||
/**
|
||||
* The `$LATEST` version of this function.
|
||||
*
|
||||
* Note that this is reference to a non-specific AWS Lambda version, which
|
||||
* means the function this version refers to can return different results in
|
||||
* different invocations.
|
||||
*
|
||||
* To obtain a reference to an explicit version which references the current
|
||||
* function configuration, use `lambdaFunction.currentVersion` instead.
|
||||
*/
|
||||
readonly latestVersion: IVersion;
|
||||
/**
|
||||
* The construct node where permissions are attached.
|
||||
*/
|
||||
readonly permissionsNode: Node;
|
||||
/**
|
||||
* The tenancy configuration for this function.
|
||||
*/
|
||||
readonly tenancyConfig?: TenancyConfig;
|
||||
/**
|
||||
* The system architectures compatible with this lambda function.
|
||||
*/
|
||||
readonly architecture: Architecture;
|
||||
/**
|
||||
* The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().
|
||||
*
|
||||
* This property is for cdk modules to consume only. You should not need to use this property.
|
||||
* Instead, use grantInvoke() directly.
|
||||
*/
|
||||
readonly resourceArnsForGrantInvoke: string[];
|
||||
/**
|
||||
* Adds an event source that maps to this AWS Lambda function.
|
||||
* @param id construct ID
|
||||
* @param options mapping options
|
||||
*/
|
||||
addEventSourceMapping(id: string, options: EventSourceMappingOptions): EventSourceMapping;
|
||||
/**
|
||||
* Adds a permission to the Lambda resource policy.
|
||||
* @param id The id for the permission construct
|
||||
* @param permission The permission to grant to this Lambda function. @see Permission for details.
|
||||
*/
|
||||
addPermission(id: string, permission: Permission): void;
|
||||
/**
|
||||
* Adds a statement to the IAM role assumed by the instance.
|
||||
*/
|
||||
addToRolePolicy(statement: iam.PolicyStatement): void;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke this Lambda
|
||||
*/
|
||||
grantInvoke(identity: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke the $LATEST version or
|
||||
* unqualified version of this Lambda
|
||||
*/
|
||||
grantInvokeLatestVersion(identity: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke the given version of this Lambda
|
||||
*/
|
||||
grantInvokeVersion(identity: iam.IGrantable, version: IVersion): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke this Lambda Function URL
|
||||
*/
|
||||
grantInvokeUrl(identity: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant multiple principals the ability to invoke this Lambda via CompositePrincipal
|
||||
*/
|
||||
grantInvokeCompositePrincipal(compositePrincipal: iam.CompositePrincipal): iam.Grant[];
|
||||
/**
|
||||
* Return the given named metric for this Lambda
|
||||
*/
|
||||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the Duration of this Lambda
|
||||
*
|
||||
* @default average over 5 minutes
|
||||
*/
|
||||
metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of invocations of this Lambda
|
||||
*
|
||||
* @default sum over 5 minutes
|
||||
*/
|
||||
metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of throttled invocations of this Lambda
|
||||
*
|
||||
* @default sum over 5 minutes
|
||||
*/
|
||||
metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Adds an event source to this function.
|
||||
*
|
||||
* Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module.
|
||||
*
|
||||
* The following example adds an SQS Queue as an event source:
|
||||
* ```
|
||||
* import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
|
||||
* myFunction.addEventSource(new SqsEventSource(myQueue));
|
||||
* ```
|
||||
*/
|
||||
addEventSource(source: IEventSource): void;
|
||||
/**
|
||||
* Configures options for asynchronous invocation.
|
||||
*/
|
||||
configureAsyncInvoke(options: EventInvokeConfigOptions): void;
|
||||
/**
|
||||
* Adds a url to this lambda function.
|
||||
*/
|
||||
addFunctionUrl(options?: FunctionUrlOptions): FunctionUrl;
|
||||
}
|
||||
/**
|
||||
* Represents a Lambda function defined outside of this stack.
|
||||
*/
|
||||
export interface FunctionAttributes {
|
||||
/**
|
||||
* The ARN of the Lambda function.
|
||||
*
|
||||
* Format: arn:<partition>:lambda:<region>:<account-id>:function:<function-name>
|
||||
*/
|
||||
readonly functionArn: string;
|
||||
/**
|
||||
* The IAM execution role associated with this function.
|
||||
*
|
||||
* If the role is not specified, any role-related operations will no-op.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* The security group of this Lambda, if in a VPC.
|
||||
*
|
||||
* This needs to be given in order to support allowing connections
|
||||
* to this Lambda.
|
||||
*/
|
||||
readonly securityGroup?: ec2.ISecurityGroup;
|
||||
/**
|
||||
* Setting this property informs the CDK that the imported function is in the same environment as the stack.
|
||||
* This affects certain behaviours such as, whether this function's permission can be modified.
|
||||
* When not configured, the CDK attempts to auto-determine this. For environment agnostic stacks, i.e., stacks
|
||||
* where the account is not specified with the `env` property, this is determined to be false.
|
||||
*
|
||||
* Set this to property *ONLY IF* the imported function is in the same account as the stack
|
||||
* it's imported in.
|
||||
* @default - depends: true, if the Stack is configured with an explicit `env` (account and region) and the account is the same as this function.
|
||||
* For environment-agnostic stacks this will default to `false`.
|
||||
*/
|
||||
readonly sameEnvironment?: boolean;
|
||||
/**
|
||||
* Setting this property informs the CDK that the imported function ALREADY HAS the necessary permissions
|
||||
* for what you are trying to do. When not configured, the CDK attempts to auto-determine whether or not
|
||||
* additional permissions are necessary on the function when grant APIs are used. If the CDK tried to add
|
||||
* permissions on an imported lambda, it will fail.
|
||||
*
|
||||
* Set this property *ONLY IF* you are committing to manage the imported function's permissions outside of
|
||||
* CDK. You are acknowledging that your CDK code alone will have insufficient permissions to access the
|
||||
* imported function.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly skipPermissions?: boolean;
|
||||
/**
|
||||
* The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).
|
||||
* @default - Architecture.X86_64
|
||||
*/
|
||||
readonly architecture?: Architecture;
|
||||
/**
|
||||
* The tenancy configuration of this Lambda Function.
|
||||
* @default - Tenant isolation is not enabled
|
||||
*/
|
||||
readonly tenancyConfig?: TenancyConfig;
|
||||
}
|
||||
export declare abstract class FunctionBase extends Resource implements IFunction, ec2.IClientVpnConnectionHandler {
|
||||
/**
|
||||
* The principal this Lambda Function is running as
|
||||
*/
|
||||
abstract readonly grantPrincipal: iam.IPrincipal;
|
||||
/**
|
||||
* The name of the function.
|
||||
*/
|
||||
abstract readonly functionName: string;
|
||||
/**
|
||||
* The ARN fo the function.
|
||||
*/
|
||||
abstract readonly functionArn: string;
|
||||
/**
|
||||
* The IAM role associated with this function.
|
||||
*
|
||||
* Undefined if the function was imported without a role.
|
||||
*/
|
||||
abstract readonly role?: iam.IRole;
|
||||
/**
|
||||
* The construct node where permissions are attached.
|
||||
*/
|
||||
abstract readonly permissionsNode: Node;
|
||||
/**
|
||||
* The architecture of this Lambda Function.
|
||||
*/
|
||||
abstract readonly architecture: Architecture;
|
||||
/**
|
||||
* The tenancy configuration for this function.
|
||||
*/
|
||||
abstract readonly tenancyConfig?: TenancyConfig;
|
||||
/**
|
||||
* Whether the addPermission() call adds any permissions
|
||||
*
|
||||
* True for new Lambdas, false for version $LATEST and imported Lambdas
|
||||
* from different accounts.
|
||||
*/
|
||||
protected abstract readonly canCreatePermissions: boolean;
|
||||
/**
|
||||
* The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke()
|
||||
*/
|
||||
abstract readonly resourceArnsForGrantInvoke: string[];
|
||||
/**
|
||||
* Whether the user decides to skip adding permissions.
|
||||
* The only use case is for cross-account, imported lambdas
|
||||
* where the user commits to modifying the permisssions
|
||||
* on the imported lambda outside CDK.
|
||||
* @internal
|
||||
*/
|
||||
protected readonly _skipPermissions?: boolean;
|
||||
/**
|
||||
* Actual connections object for this Lambda
|
||||
*
|
||||
* May be unset, in which case this Lambda is not configured use in a VPC.
|
||||
* @internal
|
||||
*/
|
||||
protected _connections?: ec2.Connections;
|
||||
private _latestVersion?;
|
||||
/**
|
||||
* Flag to delay adding a warning message until current version is invoked.
|
||||
* @internal
|
||||
*/
|
||||
protected _warnIfCurrentVersionCalled: boolean;
|
||||
/**
|
||||
* Mapping of invocation principals to grants. Used to de-dupe `grantInvoke()` calls.
|
||||
* @internal
|
||||
*/
|
||||
protected _invocationGrants: Record<string, iam.Grant>;
|
||||
/**
|
||||
* Mapping of function URL invocation principals to grants. Used to de-dupe `grantInvokeUrl()` calls.
|
||||
* @internal
|
||||
*/
|
||||
protected _functionUrlInvocationGrants: Record<string, iam.Grant>;
|
||||
/**
|
||||
* The number of permissions added to this function
|
||||
* @internal
|
||||
*/
|
||||
private _policyCounter;
|
||||
/**
|
||||
* Track whether we've added statements with literal resources to the role's default policy
|
||||
* @internal
|
||||
*/
|
||||
private _hasAddedLiteralStatements;
|
||||
/**
|
||||
* Track whether we've added statements with array token resources to the role's default policy
|
||||
* @internal
|
||||
*/
|
||||
private _hasAddedArrayTokenStatements;
|
||||
get functionRef(): FunctionReference;
|
||||
/**
|
||||
* A warning will be added to functions under the following conditions:
|
||||
* - permissions that include `lambda:InvokeFunction` are added to the unqualified function.
|
||||
* - function.currentVersion is invoked before or after the permission is created.
|
||||
*
|
||||
* This applies only to permissions on Lambda functions, not versions or aliases.
|
||||
* This function is overridden as a noOp for QualifiedFunctionBase.
|
||||
*/
|
||||
considerWarningOnInvokeFunctionPermissions(scope: Construct, action: string): void;
|
||||
protected warnInvokeFunctionPermissions(scope: Construct): void;
|
||||
/**
|
||||
* Adds a permission to the Lambda resource policy.
|
||||
* @param id The id for the permission construct
|
||||
* @param permission The permission to grant to this Lambda function. @see Permission for details.
|
||||
*/
|
||||
addPermission(id: string, permission: Permission): void;
|
||||
/**
|
||||
* Adds a statement to the IAM role assumed by the instance.
|
||||
*/
|
||||
addToRolePolicy(statement: iam.PolicyStatement): void;
|
||||
/**
|
||||
* Access the Connections object
|
||||
*
|
||||
* Will fail if not a VPC-enabled Lambda Function
|
||||
*/
|
||||
get connections(): ec2.Connections;
|
||||
get latestVersion(): IVersion;
|
||||
/**
|
||||
* Whether or not this Lambda function was bound to a VPC
|
||||
*
|
||||
* If this is is `false`, trying to access the `connections` object will fail.
|
||||
*/
|
||||
get isBoundToVpc(): boolean;
|
||||
addEventSourceMapping(id: string, options: EventSourceMappingOptions): EventSourceMapping;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke this Lambda
|
||||
*
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvoke(grantee: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke the $LATEST version or
|
||||
* unqualified version of this Lambda
|
||||
*
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvokeLatestVersion(grantee: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke the given version of this Lambda
|
||||
*
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvokeVersion(grantee: iam.IGrantable, version: IVersion): iam.Grant;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke this Lambda Function URL
|
||||
*
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvokeUrl(grantee: iam.IGrantable): iam.Grant;
|
||||
/**
|
||||
* Grant multiple principals the ability to invoke this Lambda via CompositePrincipal
|
||||
*
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvokeCompositePrincipal(compositePrincipal: iam.CompositePrincipal): iam.Grant[];
|
||||
addEventSource(source: IEventSource): void;
|
||||
configureAsyncInvoke(options: EventInvokeConfigOptions): void;
|
||||
addFunctionUrl(options?: FunctionUrlOptions): FunctionUrl;
|
||||
/**
|
||||
* Returns the construct tree node that corresponds to the lambda function.
|
||||
* For use internally for constructs, when the tree is set up in non-standard ways. Ex: SingletonFunction.
|
||||
* @internal
|
||||
*/
|
||||
protected _functionNode(): Node;
|
||||
/**
|
||||
* Given the function arn, check if the account id matches this account
|
||||
*
|
||||
* Function ARNs look like this:
|
||||
*
|
||||
* arn:aws:lambda:region:account-id:function:function-name
|
||||
*
|
||||
* ..which means that in order to extract the `account-id` component from the ARN, we can
|
||||
* split the ARN using ":" and select the component in index 4.
|
||||
*
|
||||
* @returns true if account id of function matches the account specified on the stack, false otherwise.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected _isStackAccount(): boolean;
|
||||
private grant;
|
||||
/**
|
||||
* Translate IPrincipal to something we can pass to AWS::Lambda::Permissions
|
||||
*
|
||||
* Do some nasty things because `Permission` supports a subset of what the
|
||||
* full IAM principal language supports, and we may not be able to parse strings
|
||||
* outright because they may be tokens.
|
||||
*
|
||||
* Try to recognize some specific Principal classes first, then try a generic
|
||||
* fallback.
|
||||
*/
|
||||
private parsePermissionPrincipal;
|
||||
private validateConditionCombinations;
|
||||
private validateConditions;
|
||||
private isPrincipalWithConditions;
|
||||
/**
|
||||
* Check if a policy statement contains array tokens that would cause CloudFormation
|
||||
* resolution conflicts when mixed with literal arrays in the same policy document.
|
||||
*
|
||||
* Array tokens are created by CloudFormation intrinsic functions that return arrays,
|
||||
* such as Fn::Split, Fn::GetAZs, etc. These cannot be safely merged with literal
|
||||
* resource arrays due to CloudFormation's token resolution limitations.
|
||||
*
|
||||
* Individual string tokens within literal arrays (e.g., `["arn:${token}:..."]`) are
|
||||
* safe and do not cause conflicts, so they are not detected by this method.
|
||||
* @internal
|
||||
*/
|
||||
private statementHasArrayTokens;
|
||||
}
|
||||
export declare abstract class QualifiedFunctionBase extends FunctionBase {
|
||||
/** The underlying `IFunction` */
|
||||
abstract readonly lambda: IFunction;
|
||||
readonly permissionsNode: Node;
|
||||
/**
|
||||
* The qualifier of the version or alias of this function.
|
||||
* A qualifier is the identifier that's appended to a version or alias ARN.
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/API_GetFunctionConfiguration.html#API_GetFunctionConfiguration_RequestParameters
|
||||
*/
|
||||
protected abstract readonly qualifier: string;
|
||||
get latestVersion(): IVersion;
|
||||
get tenancyConfig(): TenancyConfig | undefined;
|
||||
get resourceArnsForGrantInvoke(): string[];
|
||||
configureAsyncInvoke(options: EventInvokeConfigOptions): void;
|
||||
considerWarningOnInvokeFunctionPermissions(_scope: Construct, _action: string): void;
|
||||
}
|
||||
2
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-base.js
generated
vendored
Normal file
2
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-base.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-hash.d.ts
generated
vendored
Normal file
6
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-hash.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Function as LambdaFunction } from './function';
|
||||
export declare function calculateFunctionHash(fn: LambdaFunction, additional?: string): string;
|
||||
export declare function trimFromStart(s: string, maxLength: number): string;
|
||||
export declare const VERSION_LOCKED: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-hash.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-hash.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
207
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-url.d.ts
generated
vendored
Normal file
207
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-url.d.ts
generated
vendored
Normal file
@@ -0,0 +1,207 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IFunction } from './function-base';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type { Duration, IResource } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
import type { IUrlRef, UrlReference } from '../../interfaces/generated/aws-lambda-interfaces.generated';
|
||||
/**
|
||||
* The auth types for a function url
|
||||
*/
|
||||
export declare enum FunctionUrlAuthType {
|
||||
/**
|
||||
* Restrict access to authenticated IAM users only
|
||||
*/
|
||||
AWS_IAM = "AWS_IAM",
|
||||
/**
|
||||
* Bypass IAM authentication to create a public endpoint
|
||||
*/
|
||||
NONE = "NONE"
|
||||
}
|
||||
/**
|
||||
* The invoke modes for a Lambda function
|
||||
*/
|
||||
export declare enum InvokeMode {
|
||||
/**
|
||||
* Default option. Lambda invokes your function using the Invoke API operation.
|
||||
* Invocation results are available when the payload is complete.
|
||||
* The maximum payload size is 6 MB.
|
||||
*/
|
||||
BUFFERED = "BUFFERED",
|
||||
/**
|
||||
* Your function streams payload results as they become available.
|
||||
* Lambda invokes your function using the InvokeWithResponseStream API operation.
|
||||
* The maximum response payload size is 20 MB, however, you can request a quota increase.
|
||||
*/
|
||||
RESPONSE_STREAM = "RESPONSE_STREAM"
|
||||
}
|
||||
/**
|
||||
* All http request methods
|
||||
*/
|
||||
export declare enum HttpMethod {
|
||||
/**
|
||||
* The GET method requests a representation of the specified resource.
|
||||
*/
|
||||
GET = "GET",
|
||||
/**
|
||||
* The PUT method replaces all current representations of the target resource with the request payload.
|
||||
*/
|
||||
PUT = "PUT",
|
||||
/**
|
||||
* The HEAD method asks for a response identical to that of a GET request, but without the response body.
|
||||
*/
|
||||
HEAD = "HEAD",
|
||||
/**
|
||||
* The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
|
||||
*/
|
||||
POST = "POST",
|
||||
/**
|
||||
* The DELETE method deletes the specified resource.
|
||||
*/
|
||||
DELETE = "DELETE",
|
||||
/**
|
||||
* The PATCH method applies partial modifications to a resource.
|
||||
*/
|
||||
PATCH = "PATCH",
|
||||
/**
|
||||
* The OPTIONS method describes the communication options for the target resource.
|
||||
*/
|
||||
OPTIONS = "OPTIONS",
|
||||
/**
|
||||
* The wildcard entry to allow all methods.
|
||||
*/
|
||||
ALL = "*"
|
||||
}
|
||||
/**
|
||||
* Specifies a cross-origin access property for a function URL
|
||||
*/
|
||||
export interface FunctionUrlCorsOptions {
|
||||
/**
|
||||
* Whether to allow cookies or other credentials in requests to your function URL.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly allowCredentials?: boolean;
|
||||
/**
|
||||
* Headers that are specified in the Access-Control-Request-Headers header.
|
||||
*
|
||||
* @default - No headers allowed.
|
||||
*/
|
||||
readonly allowedHeaders?: string[];
|
||||
/**
|
||||
* An HTTP method that you allow the origin to execute.
|
||||
*
|
||||
* @default - [HttpMethod.ALL]
|
||||
*/
|
||||
readonly allowedMethods?: HttpMethod[];
|
||||
/**
|
||||
* One or more origins you want customers to be able to access the bucket from.
|
||||
*
|
||||
* @default - No origins allowed.
|
||||
*/
|
||||
readonly allowedOrigins?: string[];
|
||||
/**
|
||||
* One or more headers in the response that you want customers to be able to access from their applications.
|
||||
*
|
||||
* @default - No headers exposed.
|
||||
*/
|
||||
readonly exposedHeaders?: string[];
|
||||
/**
|
||||
* The time in seconds that your browser is to cache the preflight response for the specified resource.
|
||||
*
|
||||
* @default - Browser default of 5 seconds.
|
||||
*/
|
||||
readonly maxAge?: Duration;
|
||||
}
|
||||
/**
|
||||
* A Lambda function Url
|
||||
*/
|
||||
export interface IFunctionUrl extends IResource, IUrlRef {
|
||||
/**
|
||||
* The url of the Lambda function.
|
||||
*
|
||||
* @attribute FunctionUrl
|
||||
*/
|
||||
readonly url: string;
|
||||
/**
|
||||
* The ARN of the function this URL refers to
|
||||
*
|
||||
* @attribute FunctionArn
|
||||
*/
|
||||
readonly functionArn: string;
|
||||
/**
|
||||
* The authType of the function URL, used for access control
|
||||
*
|
||||
* @attribute AuthType
|
||||
*/
|
||||
readonly authType: FunctionUrlAuthType;
|
||||
/**
|
||||
* Grant the given identity permissions to invoke this Lambda Function URL
|
||||
*/
|
||||
grantInvokeUrl(identity: iam.IGrantable): iam.Grant;
|
||||
}
|
||||
/**
|
||||
* Options to add a url to a Lambda function
|
||||
*/
|
||||
export interface FunctionUrlOptions {
|
||||
/**
|
||||
* The type of authentication that your function URL uses.
|
||||
*
|
||||
* @default FunctionUrlAuthType.AWS_IAM
|
||||
*/
|
||||
readonly authType?: FunctionUrlAuthType;
|
||||
/**
|
||||
* The cross-origin resource sharing (CORS) settings for your function URL.
|
||||
*
|
||||
* @default - No CORS configuration.
|
||||
*/
|
||||
readonly cors?: FunctionUrlCorsOptions;
|
||||
/**
|
||||
* The type of invocation mode that your Lambda function uses.
|
||||
*
|
||||
* @default InvokeMode.BUFFERED
|
||||
*/
|
||||
readonly invokeMode?: InvokeMode;
|
||||
}
|
||||
/**
|
||||
* Properties for a FunctionUrl
|
||||
*/
|
||||
export interface FunctionUrlProps extends FunctionUrlOptions {
|
||||
/**
|
||||
* The function to which this url refers.
|
||||
* It can also be an `Alias` but not a `Version`.
|
||||
*/
|
||||
readonly function: IFunction;
|
||||
}
|
||||
/**
|
||||
* Defines a Lambda function url
|
||||
*
|
||||
* @resource AWS::Lambda::Url
|
||||
*/
|
||||
export declare class FunctionUrl extends Resource implements IFunctionUrl {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* The url of the Lambda function.
|
||||
*/
|
||||
readonly url: string;
|
||||
/**
|
||||
* The ARN of the function this URL refers to
|
||||
*/
|
||||
readonly functionArn: string;
|
||||
/**
|
||||
* The authentication type used for this Function URL
|
||||
*/
|
||||
readonly authType: FunctionUrlAuthType;
|
||||
private readonly function;
|
||||
constructor(scope: Construct, id: string, props: FunctionUrlProps);
|
||||
get urlRef(): UrlReference;
|
||||
/**
|
||||
* [disable-awslint:no-grants]
|
||||
*/
|
||||
grantInvokeUrl(grantee: iam.IGrantable): iam.Grant;
|
||||
private instanceOfVersion;
|
||||
private instanceOfAlias;
|
||||
private renderCors;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-url.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function-url.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
876
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts
generated
vendored
Normal file
876
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts
generated
vendored
Normal file
@@ -0,0 +1,876 @@
|
||||
import type { Construct, IConstruct } from 'constructs';
|
||||
import type { AdotInstrumentationConfig } from './adot-layers';
|
||||
import type { AliasOptions, Alias } from './alias';
|
||||
import { Architecture } from './architecture';
|
||||
import type { Code, CodeConfig } from './code';
|
||||
import type { DurableConfig } from './durable-config';
|
||||
import type { EventInvokeConfigOptions } from './event-invoke-config';
|
||||
import type { IEventSource } from './event-source';
|
||||
import type { FileSystem } from './filesystem';
|
||||
import type { FunctionAttributes, IFunction } from './function-base';
|
||||
import { FunctionBase } from './function-base';
|
||||
import type { LambdaInsightsVersion } from './lambda-insights';
|
||||
import type { VersionOptions } from './lambda-version';
|
||||
import { Version } from './lambda-version';
|
||||
import type { ICodeSigningConfigRef } from './lambda.generated';
|
||||
import type { ILayerVersion } from './layers';
|
||||
import type { LogRetentionRetryOptions } from './log-retention';
|
||||
import type { ParamsAndSecretsLayerVersion } from './params-and-secrets-layers';
|
||||
import { Runtime } from './runtime';
|
||||
import type { RuntimeManagementMode } from './runtime-management';
|
||||
import type { SnapStartConf } from './snapstart-config';
|
||||
import type { TenancyConfig } from './tenancy-config';
|
||||
import * as cloudwatch from '../../aws-cloudwatch';
|
||||
import type { IProfilingGroup } from '../../aws-codeguruprofiler';
|
||||
import * as ec2 from '../../aws-ec2';
|
||||
import * as iam from '../../aws-iam';
|
||||
import type * as kms from '../../aws-kms';
|
||||
import * as logs from '../../aws-logs';
|
||||
import type * as sns from '../../aws-sns';
|
||||
import * as sqs from '../../aws-sqs';
|
||||
import type { IAspect, RemovalPolicy, Size } from '../../core';
|
||||
import { Duration } from '../../core';
|
||||
/**
|
||||
* X-Ray Tracing Modes (https://docs.aws.amazon.com/lambda/latest/dg/API_TracingConfig.html)
|
||||
*/
|
||||
export declare enum Tracing {
|
||||
/**
|
||||
* Lambda will respect any tracing header it receives from an upstream service.
|
||||
* If no tracing header is received, Lambda will sample the request based on a fixed rate. Please see the [Using AWS Lambda with AWS X-Ray](https://docs.aws.amazon.com/lambda/latest/dg/services-xray.html) documentation for details on this sampling behavior.
|
||||
*/
|
||||
ACTIVE = "Active",
|
||||
/**
|
||||
* Lambda will only trace the request from an upstream service
|
||||
* if it contains a tracing header with "sampled=1"
|
||||
*/
|
||||
PASS_THROUGH = "PassThrough",
|
||||
/**
|
||||
* Lambda will not trace any request.
|
||||
*/
|
||||
DISABLED = "Disabled"
|
||||
}
|
||||
/**
|
||||
* Lambda service will automatically captures system logs about function invocation
|
||||
* generated by the Lambda service (known as system logs) and sends these logs to a
|
||||
* default CloudWatch log group named after the Lambda function.
|
||||
*/
|
||||
export declare enum SystemLogLevel {
|
||||
/**
|
||||
* Lambda will capture only logs at info level.
|
||||
*/
|
||||
INFO = "INFO",
|
||||
/**
|
||||
* Lambda will capture only logs at debug level.
|
||||
*/
|
||||
DEBUG = "DEBUG",
|
||||
/**
|
||||
* Lambda will capture only logs at warn level.
|
||||
*/
|
||||
WARN = "WARN"
|
||||
}
|
||||
/**
|
||||
* Lambda service automatically captures logs generated by the function code
|
||||
* (known as application logs) and sends these logs to a default CloudWatch
|
||||
* log group named after the Lambda function.
|
||||
*/
|
||||
export declare enum ApplicationLogLevel {
|
||||
/**
|
||||
* Lambda will capture only logs at info level.
|
||||
*/
|
||||
INFO = "INFO",
|
||||
/**
|
||||
* Lambda will capture only logs at debug level.
|
||||
*/
|
||||
DEBUG = "DEBUG",
|
||||
/**
|
||||
* Lambda will capture only logs at warn level.
|
||||
*/
|
||||
WARN = "WARN",
|
||||
/**
|
||||
* Lambda will capture only logs at trace level.
|
||||
*/
|
||||
TRACE = "TRACE",
|
||||
/**
|
||||
* Lambda will capture only logs at error level.
|
||||
*/
|
||||
ERROR = "ERROR",
|
||||
/**
|
||||
* Lambda will capture only logs at fatal level.
|
||||
*/
|
||||
FATAL = "FATAL"
|
||||
}
|
||||
/**
|
||||
* This field takes in 2 values either Text or JSON. By setting this value to Text,
|
||||
* will result in the current structure of logs format, whereas, by setting this value to JSON,
|
||||
* Lambda will print the logs as Structured JSON Logs, with the corresponding timestamp and log level
|
||||
* of each event. Selecting ‘JSON’ format will only allow customers to have different log level
|
||||
* Application log level and the System log level.
|
||||
*/
|
||||
export declare enum LogFormat {
|
||||
/**
|
||||
* Lambda Logs text format.
|
||||
*/
|
||||
TEXT = "Text",
|
||||
/**
|
||||
* Lambda structured logging in Json format.
|
||||
*/
|
||||
JSON = "JSON"
|
||||
}
|
||||
/**
|
||||
* This field takes in 2 values either Text or JSON. By setting this value to Text,
|
||||
* will result in the current structure of logs format, whereas, by setting this value to JSON,
|
||||
* Lambda will print the logs as Structured JSON Logs, with the corresponding timestamp and log level
|
||||
* of each event. Selecting ‘JSON’ format will only allow customers to have different log level
|
||||
* Application log level and the System log level.
|
||||
*/
|
||||
export declare enum LoggingFormat {
|
||||
/**
|
||||
* Lambda Logs text format.
|
||||
*/
|
||||
TEXT = "Text",
|
||||
/**
|
||||
* Lambda structured logging in Json format.
|
||||
*/
|
||||
JSON = "JSON"
|
||||
}
|
||||
export declare enum RecursiveLoop {
|
||||
/**
|
||||
* Allows the recursive loop to happen and does not terminate it.
|
||||
*/
|
||||
ALLOW = "Allow",
|
||||
/**
|
||||
* Terminates the recursive loop.
|
||||
*/
|
||||
TERMINATE = "Terminate"
|
||||
}
|
||||
/**
|
||||
* Non runtime options
|
||||
*/
|
||||
export interface FunctionOptions extends EventInvokeConfigOptions {
|
||||
/**
|
||||
* A description of the function.
|
||||
*
|
||||
* @default - No description.
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* The function execution time (in seconds) after which Lambda terminates
|
||||
* the function. Because the execution time affects cost, set this value
|
||||
* based on the function's expected execution time.
|
||||
*
|
||||
* @default Duration.seconds(3)
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
/**
|
||||
* Key-value pairs that Lambda caches and makes available for your Lambda
|
||||
* functions. Use environment variables to apply configuration changes, such
|
||||
* as test and production environment configurations, without changing your
|
||||
* Lambda function source code.
|
||||
*
|
||||
* @default - No environment variables.
|
||||
*/
|
||||
readonly environment?: {
|
||||
[key: string]: string;
|
||||
};
|
||||
/**
|
||||
* A name for the function.
|
||||
*
|
||||
* @default - AWS CloudFormation generates a unique physical ID and uses that
|
||||
* ID for the function's name. For more information, see Name Type.
|
||||
*/
|
||||
readonly functionName?: string;
|
||||
/**
|
||||
* The amount of memory, in MB, that is allocated to your Lambda function.
|
||||
* Lambda uses this value to proportionally allocate the amount of CPU
|
||||
* power. For more information, see Resource Model in the AWS Lambda
|
||||
* Developer Guide.
|
||||
*
|
||||
* @default 128
|
||||
*/
|
||||
readonly memorySize?: number;
|
||||
/**
|
||||
* The size of the function’s /tmp directory in MiB.
|
||||
*
|
||||
* @default 512 MiB
|
||||
*/
|
||||
readonly ephemeralStorageSize?: Size;
|
||||
/**
|
||||
* Initial policy statements to add to the created Lambda Role.
|
||||
*
|
||||
* You can call `addToRolePolicy` to the created lambda to add statements post creation.
|
||||
*
|
||||
* @default - No policy statements are added to the created Lambda role.
|
||||
*/
|
||||
readonly initialPolicy?: iam.PolicyStatement[];
|
||||
/**
|
||||
* Lambda execution role.
|
||||
*
|
||||
* This is the role that will be assumed by the function upon execution.
|
||||
* It controls the permissions that the function will have. The Role must
|
||||
* be assumable by the 'lambda.amazonaws.com' service principal.
|
||||
*
|
||||
* The default Role automatically has permissions granted for Lambda execution. If you
|
||||
* provide a Role, you must add the relevant AWS managed policies yourself.
|
||||
*
|
||||
* The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and
|
||||
* "service-role/AWSLambdaVPCAccessExecutionRole".
|
||||
*
|
||||
* @default - A unique role will be generated for this lambda function.
|
||||
* Both supplied and generated roles can always be changed by calling `addToRolePolicy`.
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* VPC network to place Lambda network interfaces
|
||||
*
|
||||
* Specify this if the Lambda function needs to access resources in a VPC.
|
||||
* This is required when `vpcSubnets` is specified.
|
||||
*
|
||||
* @default - Function is not placed within a VPC.
|
||||
*/
|
||||
readonly vpc?: ec2.IVpc;
|
||||
/**
|
||||
* Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
|
||||
*
|
||||
* Only used if 'vpc' is supplied.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly ipv6AllowedForDualStack?: boolean;
|
||||
/**
|
||||
* Where to place the network interfaces within the VPC.
|
||||
*
|
||||
* This requires `vpc` to be specified in order for interfaces to actually be
|
||||
* placed in the subnets. If `vpc` is not specify, this will raise an error.
|
||||
*
|
||||
* Note: Internet access for Lambda Functions requires a NAT Gateway, so picking
|
||||
* public subnets is not allowed (unless `allowPublicSubnet` is set to `true`).
|
||||
*
|
||||
* @default - the Vpc default strategy if not specified
|
||||
*/
|
||||
readonly vpcSubnets?: ec2.SubnetSelection;
|
||||
/**
|
||||
* The list of security groups to associate with the Lambda's network interfaces.
|
||||
*
|
||||
* Only used if 'vpc' is supplied.
|
||||
*
|
||||
* @default - If the function is placed within a VPC and a security group is
|
||||
* not specified, either by this or securityGroup prop, a dedicated security
|
||||
* group will be created for this function.
|
||||
*/
|
||||
readonly securityGroups?: ec2.ISecurityGroup[];
|
||||
/**
|
||||
* Whether to allow the Lambda to send all network traffic (except ipv6)
|
||||
*
|
||||
* If set to false, you must individually add traffic rules to allow the
|
||||
* Lambda to connect to network targets.
|
||||
*
|
||||
* Do not specify this property if the `securityGroups` or `securityGroup` property is set.
|
||||
* Instead, configure `allowAllOutbound` directly on the security group.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly allowAllOutbound?: boolean;
|
||||
/**
|
||||
* Whether to allow the Lambda to send all ipv6 network traffic
|
||||
*
|
||||
* If set to true, there will only be a single egress rule which allows all
|
||||
* outbound ipv6 traffic. If set to false, you must individually add traffic rules to allow the
|
||||
* Lambda to connect to network targets using ipv6.
|
||||
*
|
||||
* Do not specify this property if the `securityGroups` or `securityGroup` property is set.
|
||||
* Instead, configure `allowAllIpv6Outbound` directly on the security group.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly allowAllIpv6Outbound?: boolean;
|
||||
/**
|
||||
* Enabled DLQ. If `deadLetterQueue` is undefined,
|
||||
* an SQS queue with default options will be defined for your Function.
|
||||
*
|
||||
* @default - false unless `deadLetterQueue` is set, which implies DLQ is enabled.
|
||||
*/
|
||||
readonly deadLetterQueueEnabled?: boolean;
|
||||
/**
|
||||
* The SQS queue to use if DLQ is enabled.
|
||||
* If SNS topic is desired, specify `deadLetterTopic` property instead.
|
||||
*
|
||||
* @default - SQS queue with 14 day retention period if `deadLetterQueueEnabled` is `true`
|
||||
*/
|
||||
readonly deadLetterQueue?: sqs.IQueue;
|
||||
/**
|
||||
* The SNS topic to use as a DLQ.
|
||||
* Note that if `deadLetterQueueEnabled` is set to `true`, an SQS queue will be created
|
||||
* rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
|
||||
*
|
||||
* @default - no SNS topic
|
||||
*/
|
||||
readonly deadLetterTopic?: sns.ITopic;
|
||||
/**
|
||||
* Enable AWS X-Ray Tracing for Lambda Function.
|
||||
*
|
||||
* @default Tracing.Disabled
|
||||
*/
|
||||
readonly tracing?: Tracing;
|
||||
/**
|
||||
* Enable SnapStart for Lambda Function.
|
||||
* SnapStart is currently supported for Java 11, Java 17, Python 3.12, Python 3.13, and .NET 8 runtime
|
||||
*
|
||||
* @default - No snapstart
|
||||
*/
|
||||
readonly snapStart?: SnapStartConf;
|
||||
/**
|
||||
* Enable profiling.
|
||||
* @see https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
|
||||
*
|
||||
* @default - No profiling.
|
||||
*/
|
||||
readonly profiling?: boolean;
|
||||
/**
|
||||
* Profiling Group.
|
||||
* @see https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
|
||||
*
|
||||
* @default - A new profiling group will be created if `profiling` is set.
|
||||
*/
|
||||
readonly profilingGroup?: IProfilingGroup;
|
||||
/**
|
||||
* Specify the version of CloudWatch Lambda insights to use for monitoring
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights.html
|
||||
*
|
||||
* When used with `DockerImageFunction` or `DockerImageCode`, the Docker image should have
|
||||
* the Lambda insights agent installed.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started-docker.html
|
||||
*
|
||||
* @default - No Lambda Insights
|
||||
*/
|
||||
readonly insightsVersion?: LambdaInsightsVersion;
|
||||
/**
|
||||
* Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation
|
||||
* @see https://aws-otel.github.io/docs/getting-started/lambda
|
||||
*
|
||||
* @default - No ADOT instrumentation
|
||||
*/
|
||||
readonly adotInstrumentation?: AdotInstrumentationConfig;
|
||||
/**
|
||||
* Specify the configuration of Parameters and Secrets Extension
|
||||
* @see https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets_lambda.html
|
||||
* @see https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html
|
||||
*
|
||||
* @default - No Parameters and Secrets Extension
|
||||
*/
|
||||
readonly paramsAndSecrets?: ParamsAndSecretsLayerVersion;
|
||||
/**
|
||||
* A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in
|
||||
* additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies
|
||||
* that can be used by multiple functions.
|
||||
*
|
||||
* @default - No layers.
|
||||
*/
|
||||
readonly layers?: ILayerVersion[];
|
||||
/**
|
||||
* The maximum of concurrent executions you want to reserve for the function.
|
||||
*
|
||||
* @default - No specific limit - account limit.
|
||||
* @see https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
|
||||
*/
|
||||
readonly reservedConcurrentExecutions?: number;
|
||||
/**
|
||||
* Event sources for this function.
|
||||
*
|
||||
* You can also add event sources using `addEventSource`.
|
||||
*
|
||||
* @default - No event sources.
|
||||
*/
|
||||
readonly events?: IEventSource[];
|
||||
/**
|
||||
* The number of days log events are kept in CloudWatch Logs. When updating
|
||||
* this property, unsetting it doesn't remove the log retention policy. To
|
||||
* remove the retention policy, set the value to `INFINITE`.
|
||||
*
|
||||
* This is a legacy API and we strongly recommend you move away from it if you can.
|
||||
* Instead create a fully customizable log group with `logs.LogGroup` and use the `logGroup` property
|
||||
* to instruct the Lambda function to send logs to it.
|
||||
* Migrating from `logRetention` to `logGroup` will cause the name of the log group to change.
|
||||
* Users and code and referencing the name verbatim will have to adjust.
|
||||
*
|
||||
* In AWS CDK code, you can access the log group name directly from the LogGroup construct:
|
||||
* ```ts
|
||||
* import * as logs from 'aws-cdk-lib/aws-logs';
|
||||
*
|
||||
* declare const myLogGroup: logs.LogGroup;
|
||||
* myLogGroup.logGroupName;
|
||||
* ```
|
||||
*
|
||||
* @deprecated use `logGroup` instead
|
||||
* @default logs.RetentionDays.INFINITE
|
||||
*/
|
||||
readonly logRetention?: logs.RetentionDays;
|
||||
/**
|
||||
* Determine the removal policy of the log group that is auto-created by this construct.
|
||||
*
|
||||
* Normally you want to retain the log group so you can diagnose issues
|
||||
* from logs even after a deployment that no longer includes the log group.
|
||||
* In that case, use the normal date-based retention policy to age out your
|
||||
* logs.
|
||||
*
|
||||
* @deprecated use `logGroup` instead
|
||||
* @default RemovalPolicy.Retain
|
||||
*/
|
||||
readonly logRemovalPolicy?: RemovalPolicy;
|
||||
/**
|
||||
* The IAM role for the Lambda function associated with the custom resource
|
||||
* that sets the retention policy.
|
||||
*
|
||||
* This is a legacy API and we strongly recommend you migrate to `logGroup` if you can.
|
||||
* `logGroup` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
|
||||
*
|
||||
* @default - A new role is created.
|
||||
*/
|
||||
readonly logRetentionRole?: iam.IRole;
|
||||
/**
|
||||
* When log retention is specified, a custom resource attempts to create the CloudWatch log group.
|
||||
* These options control the retry policy when interacting with CloudWatch APIs.
|
||||
*
|
||||
* This is a legacy API and we strongly recommend you migrate to `logGroup` if you can.
|
||||
* `logGroup` allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
|
||||
*
|
||||
* @default - Default AWS SDK retry options.
|
||||
*/
|
||||
readonly logRetentionRetryOptions?: LogRetentionRetryOptions;
|
||||
/**
|
||||
* Options for the `lambda.Version` resource automatically created by the
|
||||
* `fn.currentVersion` method.
|
||||
* @default - default options as described in `VersionOptions`
|
||||
*/
|
||||
readonly currentVersionOptions?: VersionOptions;
|
||||
/**
|
||||
* The filesystem configuration for the lambda function
|
||||
*
|
||||
* @default - will not mount any filesystem
|
||||
*/
|
||||
readonly filesystem?: FileSystem;
|
||||
/**
|
||||
* Lambda Functions in a public subnet can NOT access the internet.
|
||||
* Use this property to acknowledge this limitation and still place the function in a public subnet.
|
||||
* @see https://stackoverflow.com/questions/52992085/why-cant-an-aws-lambda-function-inside-a-public-subnet-in-a-vpc-connect-to-the/52994841#52994841
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
readonly allowPublicSubnet?: boolean;
|
||||
/**
|
||||
* The AWS KMS key that's used to encrypt your function's environment variables.
|
||||
*
|
||||
* @default - AWS Lambda creates and uses an AWS managed customer master key (CMK).
|
||||
*/
|
||||
readonly environmentEncryption?: kms.IKeyRef;
|
||||
/**
|
||||
* Code signing config associated with this function
|
||||
*
|
||||
* @default - Not Sign the Code
|
||||
*/
|
||||
readonly codeSigningConfig?: ICodeSigningConfigRef;
|
||||
/**
|
||||
* The system architectures compatible with this lambda function.
|
||||
* @default Architecture.X86_64
|
||||
*/
|
||||
readonly architecture?: Architecture;
|
||||
/**
|
||||
* Sets the runtime management configuration for a function's version.
|
||||
* @default Auto
|
||||
*/
|
||||
readonly runtimeManagementMode?: RuntimeManagementMode;
|
||||
/**
|
||||
* The tenancy configuration for the function.
|
||||
*
|
||||
* @default - Tenant isolation is not enabled
|
||||
*/
|
||||
readonly tenancyConfig?: TenancyConfig;
|
||||
/**
|
||||
* The durable configuration for the function.
|
||||
*
|
||||
* If durability is added to an existing function, a resource replacement will be triggered.
|
||||
* See the 'durableConfig' section in the module README for more details.
|
||||
*
|
||||
* @default - No durable configuration
|
||||
*/
|
||||
readonly durableConfig?: DurableConfig;
|
||||
/**
|
||||
* The log group the function sends logs to.
|
||||
*
|
||||
* By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/\<function name\>.
|
||||
* However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention.
|
||||
*
|
||||
* Use the `logGroup` property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it.
|
||||
*
|
||||
* Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16.
|
||||
* If you are deploying to another type of region, please check regional availability first.
|
||||
*
|
||||
* @default `/aws/lambda/${this.functionName}` - default log group created by Lambda
|
||||
*/
|
||||
readonly logGroup?: logs.ILogGroupRef;
|
||||
/**
|
||||
* Sets the logFormat for the function.
|
||||
* @deprecated Use `loggingFormat` as a property instead.
|
||||
* @default "Text"
|
||||
*/
|
||||
readonly logFormat?: string;
|
||||
/**
|
||||
* Sets the loggingFormat for the function.
|
||||
* @default LoggingFormat.TEXT
|
||||
*/
|
||||
readonly loggingFormat?: LoggingFormat;
|
||||
/**
|
||||
* Sets the Recursive Loop Protection for Lambda Function.
|
||||
* It lets Lambda detect and terminate unintended recursive loops.
|
||||
*
|
||||
* @default RecursiveLoop.Terminate
|
||||
*/
|
||||
readonly recursiveLoop?: RecursiveLoop;
|
||||
/**
|
||||
* Sets the application log level for the function.
|
||||
* @deprecated Use `applicationLogLevelV2` as a property instead.
|
||||
* @default "INFO"
|
||||
*/
|
||||
readonly applicationLogLevel?: string;
|
||||
/**
|
||||
* Sets the application log level for the function.
|
||||
* @default ApplicationLogLevel.INFO
|
||||
*/
|
||||
readonly applicationLogLevelV2?: ApplicationLogLevel;
|
||||
/**
|
||||
* Sets the system log level for the function.
|
||||
* @deprecated Use `systemLogLevelV2` as a property instead.
|
||||
* @default "INFO"
|
||||
*/
|
||||
readonly systemLogLevel?: string;
|
||||
/**
|
||||
* Sets the system log level for the function.
|
||||
* @default SystemLogLevel.INFO
|
||||
*/
|
||||
readonly systemLogLevelV2?: SystemLogLevel;
|
||||
}
|
||||
export interface FunctionProps extends FunctionOptions {
|
||||
/**
|
||||
* The runtime environment for the Lambda function that you are uploading.
|
||||
* For valid values, see the Runtime property in the AWS Lambda Developer
|
||||
* Guide.
|
||||
*
|
||||
* Use `Runtime.FROM_IMAGE` when defining a function from a Docker image.
|
||||
*/
|
||||
readonly runtime: Runtime;
|
||||
/**
|
||||
* The source code of your Lambda function. You can point to a file in an
|
||||
* Amazon Simple Storage Service (Amazon S3) bucket or specify your source
|
||||
* code as inline text.
|
||||
*/
|
||||
readonly code: Code;
|
||||
/**
|
||||
* The name of the method within your code that Lambda calls to execute
|
||||
* your function. The format includes the file name. It can also include
|
||||
* namespaces and other qualifiers, depending on the runtime.
|
||||
* For more information, see https://docs.aws.amazon.com/lambda/latest/dg/foundation-progmodel.html.
|
||||
*
|
||||
* Use `Handler.FROM_IMAGE` when defining a function from a Docker image.
|
||||
*
|
||||
* NOTE: If you specify your source code as inline text by specifying the
|
||||
* ZipFile property within the Code property, specify index.function_name as
|
||||
* the handler.
|
||||
*/
|
||||
readonly handler: string;
|
||||
}
|
||||
/**
|
||||
* Deploys a file from inside the construct library as a function.
|
||||
*
|
||||
* The supplied file is subject to the 4096 bytes limit of being embedded in a
|
||||
* CloudFormation template.
|
||||
*
|
||||
* The construct includes an associated role with the lambda.
|
||||
*/
|
||||
/**
|
||||
* This construct does not yet reproduce all features from the underlying resource
|
||||
* library.
|
||||
*/
|
||||
export declare class Function extends FunctionBase {
|
||||
/**
|
||||
* Uniquely identifies this class.
|
||||
*/
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Returns a `lambda.Version` which represents the current version of this
|
||||
* Lambda function. A new version will be created every time the function's
|
||||
* configuration changes.
|
||||
*
|
||||
* You can specify options for this version using the `currentVersionOptions`
|
||||
* prop when initializing the `lambda.Function`.
|
||||
*/
|
||||
get currentVersion(): Version;
|
||||
get resourceArnsForGrantInvoke(): string[];
|
||||
/** @internal */
|
||||
static _VER_PROPS: {
|
||||
[key: string]: boolean;
|
||||
};
|
||||
/**
|
||||
* Record whether specific properties in the `AWS::Lambda::Function` resource should
|
||||
* also be associated to the Version resource.
|
||||
* See 'currentVersion' section in the module README for more details.
|
||||
* @param propertyName The property to classify
|
||||
* @param locked whether the property should be associated to the version or not.
|
||||
*/
|
||||
static classifyVersionProperty(propertyName: string, locked: boolean): void;
|
||||
/**
|
||||
* Import a lambda function into the CDK using its name
|
||||
*/
|
||||
static fromFunctionName(scope: Construct, id: string, functionName: string): IFunction;
|
||||
/**
|
||||
* Import a lambda function into the CDK using its ARN.
|
||||
*
|
||||
* For `Function.addPermissions()` to work on this imported lambda, make sure that is
|
||||
* in the same account and region as the stack you are importing it into.
|
||||
*/
|
||||
static fromFunctionArn(scope: Construct, id: string, functionArn: string): IFunction;
|
||||
/**
|
||||
* Creates a Lambda function object which represents a function not defined
|
||||
* within this stack.
|
||||
*
|
||||
* For `Function.addPermissions()` to work on this imported lambda, set the sameEnvironment property to true
|
||||
* if this imported lambda is in the same account and region as the stack you are importing it into.
|
||||
*
|
||||
* @param scope The parent construct
|
||||
* @param id The name of the lambda construct
|
||||
* @param attrs the attributes of the function to import
|
||||
*/
|
||||
static fromFunctionAttributes(scope: Construct, id: string, attrs: FunctionAttributes): IFunction;
|
||||
/**
|
||||
* Return the given named metric for this Lambda
|
||||
*/
|
||||
static metricAll(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of Errors executing all Lambdas
|
||||
*
|
||||
* @default sum over 5 minutes
|
||||
*/
|
||||
static metricAllErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the Duration executing all Lambdas
|
||||
*
|
||||
* @default average over 5 minutes
|
||||
*/
|
||||
static metricAllDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of invocations of all Lambdas
|
||||
*
|
||||
* @default sum over 5 minutes
|
||||
*/
|
||||
static metricAllInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of throttled invocations of all Lambdas
|
||||
*
|
||||
* @default sum over 5 minutes
|
||||
*/
|
||||
static metricAllThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of concurrent executions across all Lambdas
|
||||
*
|
||||
* @default max over 5 minutes
|
||||
*/
|
||||
static metricAllConcurrentExecutions(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Metric for the number of unreserved concurrent executions across all Lambdas
|
||||
*
|
||||
* @default max over 5 minutes
|
||||
*/
|
||||
static metricAllUnreservedConcurrentExecutions(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
private readonly resource;
|
||||
/**
|
||||
* Execution role associated with this function
|
||||
*/
|
||||
readonly role?: iam.IRole;
|
||||
/**
|
||||
* The runtime configured for this lambda.
|
||||
*/
|
||||
readonly runtime: Runtime;
|
||||
/**
|
||||
* The principal this Lambda Function is running as
|
||||
*/
|
||||
readonly grantPrincipal: iam.IPrincipal;
|
||||
/**
|
||||
* The DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
|
||||
*/
|
||||
readonly deadLetterQueue?: sqs.IQueue;
|
||||
/**
|
||||
* The DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
|
||||
*/
|
||||
readonly deadLetterTopic?: sns.ITopic;
|
||||
/**
|
||||
* The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).
|
||||
*/
|
||||
readonly architecture: Architecture;
|
||||
/**
|
||||
* The timeout configured for this lambda.
|
||||
*/
|
||||
readonly timeout?: Duration;
|
||||
readonly permissionsNode: import("constructs").Node;
|
||||
protected readonly canCreatePermissions = true;
|
||||
/** @internal */
|
||||
readonly _layers: ILayerVersion[];
|
||||
/** @internal */
|
||||
_logRetention?: logs.LogRetention;
|
||||
private _logGroup?;
|
||||
/**
|
||||
* Name of this function
|
||||
*/
|
||||
get functionName(): string;
|
||||
/**
|
||||
* ARN of this function
|
||||
*/
|
||||
get functionArn(): string;
|
||||
/**
|
||||
* Environment variables for this function
|
||||
*/
|
||||
private environment;
|
||||
private readonly currentVersionOptions?;
|
||||
private _currentVersion?;
|
||||
private _architecture?;
|
||||
private hashMixins;
|
||||
/**
|
||||
* The tenancy configuration for this function.
|
||||
*/
|
||||
readonly tenancyConfig?: TenancyConfig;
|
||||
constructor(scope: Construct, id: string, props: FunctionProps);
|
||||
/**
|
||||
* Adds an environment variable to this Lambda function.
|
||||
* If this is a ref to a Lambda function, this operation results in a no-op.
|
||||
* @param key The environment variable key.
|
||||
* @param value The environment variable's value.
|
||||
* @param options Environment variable options.
|
||||
*/
|
||||
addEnvironment(key: string, value: string, options?: EnvironmentOptions): this;
|
||||
/**
|
||||
* Get Logging Config property for the function.
|
||||
* This method returns the function LoggingConfig Property if the property is set on the
|
||||
* function and undefined if not.
|
||||
*/
|
||||
private getLoggingConfig;
|
||||
/**
|
||||
* Mix additional information into the hash of the Version object
|
||||
*
|
||||
* The Lambda Function construct does its best to automatically create a new
|
||||
* Version when anything about the Function changes (its code, its layers,
|
||||
* any of the other properties).
|
||||
*
|
||||
* However, you can sometimes source information from places that the CDK cannot
|
||||
* look into, like the deploy-time values of SSM parameters. In those cases,
|
||||
* the CDK would not force the creation of a new Version object when it actually
|
||||
* should.
|
||||
*
|
||||
* This method can be used to invalidate the current Version object. Pass in
|
||||
* any string into this method, and make sure the string changes when you know
|
||||
* a new Version needs to be created.
|
||||
*
|
||||
* This method may be called more than once.
|
||||
*/
|
||||
invalidateVersionBasedOn(x: string): void;
|
||||
/**
|
||||
* Adds one or more Lambda Layers to this Lambda function.
|
||||
*
|
||||
* @param layers the layers to be added.
|
||||
*
|
||||
* @throws if there are already 5 layers on this function, or the layer is incompatible with this function's runtime.
|
||||
*/
|
||||
addLayers(...layers: ILayerVersion[]): void;
|
||||
/**
|
||||
* Defines an alias for this function.
|
||||
*
|
||||
* The alias will automatically be updated to point to the latest version of
|
||||
* the function as it is being updated during a deployment.
|
||||
*
|
||||
* ```ts
|
||||
* declare const fn: lambda.Function;
|
||||
*
|
||||
* fn.addAlias('Live');
|
||||
*
|
||||
* // Is equivalent to
|
||||
*
|
||||
* new lambda.Alias(this, 'AliasLive', {
|
||||
* aliasName: 'Live',
|
||||
* version: fn.currentVersion,
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @param aliasName The name of the alias
|
||||
* @param options Alias options
|
||||
*/
|
||||
addAlias(aliasName: string, options?: AliasOptions): Alias;
|
||||
/**
|
||||
* The LogGroup where the Lambda function's logs are made available.
|
||||
*
|
||||
* If either `logRetention` is set or this property is called, a CloudFormation custom resource is added to the stack that
|
||||
* pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
|
||||
* period (never expire, by default).
|
||||
*
|
||||
* Further, if the log group already exists and the `logRetention` is not set, the custom resource will reset the log retention
|
||||
* to never expire even if it was configured with a different value.
|
||||
*/
|
||||
get logGroup(): logs.ILogGroup;
|
||||
/** @internal */
|
||||
_checkEdgeCompatibility(): void;
|
||||
/**
|
||||
* Configured lambda insights on the function if specified. This is achieved by adding an imported layer which is added to the
|
||||
* list of lambda layers on synthesis.
|
||||
*
|
||||
* https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versions.html
|
||||
*/
|
||||
private configureLambdaInsights;
|
||||
/**
|
||||
* Add an AWS Distro for OpenTelemetry Lambda layer.
|
||||
*
|
||||
* @param props properties for the ADOT instrumentation
|
||||
*/
|
||||
private configureAdotInstrumentation;
|
||||
/**
|
||||
* Add a Parameters and Secrets Extension Lambda layer.
|
||||
*/
|
||||
private configureParamsAndSecretsExtension;
|
||||
private renderLayers;
|
||||
private renderEnvironment;
|
||||
/**
|
||||
* If configured, set up the VPC-related properties
|
||||
*
|
||||
* Returns the VpcConfig that should be added to the
|
||||
* Lambda creation properties.
|
||||
*/
|
||||
private configureVpc;
|
||||
private renderDurableConfig;
|
||||
private configureSnapStart;
|
||||
private isQueue;
|
||||
private buildDeadLetterQueue;
|
||||
private buildDeadLetterConfig;
|
||||
private buildTracingConfig;
|
||||
private validateProfiling;
|
||||
}
|
||||
/**
|
||||
* Environment variables options
|
||||
*/
|
||||
export interface EnvironmentOptions {
|
||||
/**
|
||||
* When used in Lambda@Edge via edgeArn() API, these environment
|
||||
* variables will be removed. If not set, an error will be thrown.
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html#lambda-requirements-lambda-function-configuration
|
||||
*
|
||||
* @default false - using the function in Lambda@Edge will throw
|
||||
*/
|
||||
readonly removeInEdge?: boolean;
|
||||
}
|
||||
export declare function verifyCodeConfig(code: CodeConfig, props: FunctionProps): void;
|
||||
/**
|
||||
* Aspect for upgrading function versions when the provided feature flag
|
||||
* is enabled. This can be necessary when the feature flag
|
||||
* changes the function hash, as such changes must be associated with a new
|
||||
* version. This aspect will change the function description in these cases,
|
||||
* which "validates" the new function hash.
|
||||
*/
|
||||
export declare class FunctionVersionUpgrade implements IAspect {
|
||||
private readonly featureFlag;
|
||||
private readonly enabled;
|
||||
constructor(featureFlag: string, enabled?: boolean);
|
||||
visit(node: IConstruct): void;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/function.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
10
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/handler.d.ts
generated
vendored
Normal file
10
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/handler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Lambda function handler
|
||||
*/
|
||||
export declare class Handler {
|
||||
/**
|
||||
* A special handler when the function handler is part of a Docker image.
|
||||
*/
|
||||
static readonly FROM_IMAGE = "FROM_IMAGE";
|
||||
private constructor();
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/handler.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/handler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Handler=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class Handler{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.Handler",version:"2.252.0"};static FROM_IMAGE="FROM_IMAGE";constructor(){}}exports.Handler=Handler;
|
||||
47
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/image-function.d.ts
generated
vendored
Normal file
47
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/image-function.d.ts
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { AssetImageCodeProps, EcrImageCodeProps, Code } from './code';
|
||||
import type { FunctionOptions } from './function';
|
||||
import { Function } from './function';
|
||||
import type * as ecr from '../../aws-ecr';
|
||||
/**
|
||||
* Properties to configure a new DockerImageFunction construct.
|
||||
*/
|
||||
export interface DockerImageFunctionProps extends FunctionOptions {
|
||||
/**
|
||||
* The source code of your Lambda function. You can point to a file in an
|
||||
* Amazon Simple Storage Service (Amazon S3) bucket or specify your source
|
||||
* code as inline text.
|
||||
*/
|
||||
readonly code: DockerImageCode;
|
||||
}
|
||||
/**
|
||||
* Code property for the DockerImageFunction construct
|
||||
*/
|
||||
export declare abstract class DockerImageCode {
|
||||
/**
|
||||
* Use an existing ECR image as the Lambda code.
|
||||
* @param repository the ECR repository that the image is in
|
||||
* @param props properties to further configure the selected image
|
||||
*/
|
||||
static fromEcr(repository: ecr.IRepository, props?: EcrImageCodeProps): DockerImageCode;
|
||||
/**
|
||||
* Create an ECR image from the specified asset and bind it as the Lambda code.
|
||||
* @param directory the directory from which the asset must be created
|
||||
* @param props properties to further configure the selected image
|
||||
*/
|
||||
static fromImageAsset(directory: string, props?: AssetImageCodeProps): DockerImageCode;
|
||||
/**
|
||||
* Produce a `Code` instance from this `DockerImageCode`.
|
||||
* @internal
|
||||
*/
|
||||
abstract _bind(architecture?: Architecture): Code;
|
||||
}
|
||||
/**
|
||||
* Create a lambda function where the handler is a docker image
|
||||
*/
|
||||
export declare class DockerImageFunction extends Function {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
constructor(scope: Construct, id: string, props: DockerImageFunctionProps);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/image-function.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/image-function.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
34
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/index.d.ts
generated
vendored
Normal file
34
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
export * from './adot-layers';
|
||||
export * from './alias';
|
||||
export * from './dlq';
|
||||
export * from './function-base';
|
||||
export * from './function';
|
||||
export * from './handler';
|
||||
export * from './image-function';
|
||||
export * from './layers';
|
||||
export * from './permission';
|
||||
export * from './runtime';
|
||||
export * from './code';
|
||||
export * from './filesystem';
|
||||
export * from './lambda-version';
|
||||
export * from './singleton-lambda';
|
||||
export * from './event-source';
|
||||
export * from './event-source-mapping';
|
||||
export * from './event-source-filter';
|
||||
export * from './destination';
|
||||
export * from './event-invoke-config';
|
||||
export * from './scalable-attribute-api';
|
||||
export * from './code-signing-config';
|
||||
export * from './lambda-insights';
|
||||
export * from './log-retention';
|
||||
export * from './architecture';
|
||||
export * from './function-url';
|
||||
export * from './runtime-management';
|
||||
export * from './tenancy-config';
|
||||
export * from './durable-config';
|
||||
export * from './params-and-secrets-layers';
|
||||
export * from './snapstart-config';
|
||||
export * from './schema-registry';
|
||||
export * from './capacity-provider';
|
||||
export * from './lambda.generated';
|
||||
import './lambda-augmentations.generated';
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/index.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/index.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
65
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-augmentations.generated.d.ts
generated
vendored
Normal file
65
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-augmentations.generated.d.ts
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
import * as cw from "../../aws-cloudwatch";
|
||||
declare module "./function-base" {
|
||||
interface IFunction {
|
||||
/**
|
||||
* Return the given named metric for this Function
|
||||
*/
|
||||
metric(metricName: string, props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How often this Lambda is throttled
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricThrottles(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How often this Lambda is invoked
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricInvocations(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How many invocations of this Lambda fail
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricErrors(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How long execution of this Lambda takes
|
||||
*
|
||||
* Average over 5 minutes
|
||||
*/
|
||||
metricDuration(props?: cw.MetricOptions): cw.Metric;
|
||||
}
|
||||
}
|
||||
declare module "./function-base" {
|
||||
interface FunctionBase {
|
||||
/**
|
||||
* Return the given named metric for this Function
|
||||
*/
|
||||
metric(metricName: string, props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How often this Lambda is throttled
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricThrottles(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How often this Lambda is invoked
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricInvocations(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How many invocations of this Lambda fail
|
||||
*
|
||||
* Sum over 5 minutes
|
||||
*/
|
||||
metricErrors(props?: cw.MetricOptions): cw.Metric;
|
||||
/**
|
||||
* How long execution of this Lambda takes
|
||||
*
|
||||
* Average over 5 minutes
|
||||
*/
|
||||
metricDuration(props?: cw.MetricOptions): cw.Metric;
|
||||
}
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-augmentations.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-augmentations.generated.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var cw=()=>{var tmp=require("../../aws-cloudwatch");return cw=()=>tmp,tmp},function_base_1=()=>{var tmp=require("./function-base");return function_base_1=()=>tmp,tmp};function_base_1().FunctionBase.prototype.metric=function(metricName,props){return new(cw()).Metric({namespace:"AWS/Lambda",metricName,dimensionsMap:{FunctionName:this.functionName},...props}).attachTo(this)},function_base_1().FunctionBase.prototype.metricThrottles=function(props){return this.metric("Throttles",{statistic:"Sum",...props})},function_base_1().FunctionBase.prototype.metricInvocations=function(props){return this.metric("Invocations",{statistic:"Sum",...props})},function_base_1().FunctionBase.prototype.metricErrors=function(props){return this.metric("Errors",{statistic:"Sum",...props})},function_base_1().FunctionBase.prototype.metricDuration=function(props){return this.metric("Duration",{statistic:"Average",...props})};
|
||||
263
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-canned-metrics.generated.d.ts
generated
vendored
Normal file
263
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-canned-metrics.generated.d.ts
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
export interface MetricWithDims<D> {
|
||||
readonly namespace: string;
|
||||
readonly metricName: string;
|
||||
readonly statistic: string;
|
||||
readonly dimensionsMap: D;
|
||||
}
|
||||
export declare class LambdaMetrics {
|
||||
static concurrentExecutionsMaximum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static concurrentExecutionsMaximum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static concurrentExecutionsMaximum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static concurrentExecutionsMaximum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static deadLetterErrorsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static deadLetterErrorsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static deadLetterErrorsSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static destinationDeliveryFailuresSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static destinationDeliveryFailuresSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static destinationDeliveryFailuresSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static durationAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static durationAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static durationAverage(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static durationAverage(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static errorsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static errorsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static errorsSum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static errorsSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static invocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static invocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static invocationsSum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static invocationsSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static iteratorAgeAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static iteratorAgeAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static iteratorAgeAverage(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static postRuntimeExtensionsDurationAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static postRuntimeExtensionsDurationAverage(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static postRuntimeExtensionsDurationAverage(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static postRuntimeExtensionsDurationAverage(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static provisionedConcurrencyInvocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static provisionedConcurrencyInvocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencyInvocationsSum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencyInvocationsSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static provisionedConcurrencySpilloverInvocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static provisionedConcurrencySpilloverInvocationsSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencySpilloverInvocationsSum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencySpilloverInvocationsSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static provisionedConcurrentExecutionsMaximum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static provisionedConcurrentExecutionsMaximum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrentExecutionsMaximum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrentExecutionsMaximum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static throttlesSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
}>;
|
||||
static throttlesSum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static throttlesSum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static throttlesSum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static provisionedConcurrencyUtilizationMaximum(this: void, dimensions: {
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencyUtilizationMaximum(this: void, dimensions: {
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}): MetricWithDims<{
|
||||
ExecutedVersion: string;
|
||||
FunctionName: string;
|
||||
Resource: string;
|
||||
}>;
|
||||
static provisionedConcurrencyUtilizationMaximum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
static unreservedConcurrentExecutionsMaximum(this: void, dimensions: {}): MetricWithDims<{}>;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-canned-metrics.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-canned-metrics.generated.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaMetrics=void 0;class LambdaMetrics{static concurrentExecutionsMaximum(dimensions){return{namespace:"AWS/Lambda",metricName:"ConcurrentExecutions",dimensionsMap:dimensions,statistic:"Maximum"}}static deadLetterErrorsSum(dimensions){return{namespace:"AWS/Lambda",metricName:"DeadLetterErrors",dimensionsMap:dimensions,statistic:"Sum"}}static destinationDeliveryFailuresSum(dimensions){return{namespace:"AWS/Lambda",metricName:"DestinationDeliveryFailures",dimensionsMap:dimensions,statistic:"Sum"}}static durationAverage(dimensions){return{namespace:"AWS/Lambda",metricName:"Duration",dimensionsMap:dimensions,statistic:"Average"}}static errorsSum(dimensions){return{namespace:"AWS/Lambda",metricName:"Errors",dimensionsMap:dimensions,statistic:"Sum"}}static invocationsSum(dimensions){return{namespace:"AWS/Lambda",metricName:"Invocations",dimensionsMap:dimensions,statistic:"Sum"}}static iteratorAgeAverage(dimensions){return{namespace:"AWS/Lambda",metricName:"IteratorAge",dimensionsMap:dimensions,statistic:"Average"}}static postRuntimeExtensionsDurationAverage(dimensions){return{namespace:"AWS/Lambda",metricName:"PostRuntimeExtensionsDuration",dimensionsMap:dimensions,statistic:"Average"}}static provisionedConcurrencyInvocationsSum(dimensions){return{namespace:"AWS/Lambda",metricName:"ProvisionedConcurrencyInvocations",dimensionsMap:dimensions,statistic:"Sum"}}static provisionedConcurrencySpilloverInvocationsSum(dimensions){return{namespace:"AWS/Lambda",metricName:"ProvisionedConcurrencySpilloverInvocations",dimensionsMap:dimensions,statistic:"Sum"}}static provisionedConcurrentExecutionsMaximum(dimensions){return{namespace:"AWS/Lambda",metricName:"ProvisionedConcurrentExecutions",dimensionsMap:dimensions,statistic:"Maximum"}}static throttlesSum(dimensions){return{namespace:"AWS/Lambda",metricName:"Throttles",dimensionsMap:dimensions,statistic:"Sum"}}static provisionedConcurrencyUtilizationMaximum(dimensions){return{namespace:"AWS/Lambda",metricName:"ProvisionedConcurrencyUtilization",dimensionsMap:dimensions,statistic:"Maximum"}}static unreservedConcurrentExecutionsMaximum(dimensions){return{namespace:"AWS/Lambda",metricName:"UnreservedConcurrentExecutions",dimensionsMap:dimensions,statistic:"Maximum"}}}exports.LambdaMetrics=LambdaMetrics;
|
||||
103
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-insights.d.ts
generated
vendored
Normal file
103
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-insights.d.ts
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* Config returned from `LambdaInsightsVersion._bind`
|
||||
*/
|
||||
interface InsightsBindConfig {
|
||||
/**
|
||||
* ARN of the Lambda Insights Layer Version
|
||||
*/
|
||||
readonly arn: string;
|
||||
}
|
||||
/**
|
||||
* Version of CloudWatch Lambda Insights
|
||||
*/
|
||||
export declare abstract class LambdaInsightsVersion {
|
||||
/**
|
||||
* Version 1.0.54.0
|
||||
*/
|
||||
static readonly VERSION_1_0_54_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.86.0
|
||||
*/
|
||||
static readonly VERSION_1_0_86_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.89.0
|
||||
*/
|
||||
static readonly VERSION_1_0_89_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.98.0
|
||||
*/
|
||||
static readonly VERSION_1_0_98_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.119.0
|
||||
*/
|
||||
static readonly VERSION_1_0_119_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.135.0
|
||||
*/
|
||||
static readonly VERSION_1_0_135_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.143.0
|
||||
*/
|
||||
static readonly VERSION_1_0_143_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.178.0
|
||||
*/
|
||||
static readonly VERSION_1_0_178_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.229.0
|
||||
*/
|
||||
static readonly VERSION_1_0_229_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.273.0
|
||||
*/
|
||||
static readonly VERSION_1_0_273_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.275.0
|
||||
*/
|
||||
static readonly VERSION_1_0_275_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.295.0
|
||||
*/
|
||||
static readonly VERSION_1_0_295_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.317.0
|
||||
*/
|
||||
static readonly VERSION_1_0_317_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.333.0
|
||||
*/
|
||||
static readonly VERSION_1_0_333_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.391.0
|
||||
*/
|
||||
static readonly VERSION_1_0_391_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.404.0
|
||||
*/
|
||||
static readonly VERSION_1_0_404_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Version 1.0.498.0
|
||||
*/
|
||||
static readonly VERSION_1_0_498_0: LambdaInsightsVersion;
|
||||
/**
|
||||
* Use the insights extension associated with the provided ARN. Make sure the ARN is associated
|
||||
* with same region as your function
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-extension-versions.html
|
||||
*/
|
||||
static fromInsightVersionArn(arn: string): LambdaInsightsVersion;
|
||||
private static fromInsightsVersion;
|
||||
/**
|
||||
* The arn of the Lambda Insights extension
|
||||
*/
|
||||
readonly layerVersionArn: string;
|
||||
/**
|
||||
* Returns the arn of the Lambda Insights extension based on the
|
||||
* Lambda architecture
|
||||
* @internal
|
||||
*/
|
||||
abstract _bind(_scope: Construct, _function: IFunction): InsightsBindConfig;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-insights.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-insights.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LambdaInsightsVersion=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var architecture_1=()=>{var tmp=require("./architecture");return architecture_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp},region_info_1=()=>{var tmp=require("../../region-info");return region_info_1=()=>tmp,tmp};class LambdaInsightsVersion{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.LambdaInsightsVersion",version:"2.252.0"};static VERSION_1_0_54_0=LambdaInsightsVersion.fromInsightsVersion("1.0.54.0");static VERSION_1_0_86_0=LambdaInsightsVersion.fromInsightsVersion("1.0.86.0");static VERSION_1_0_89_0=LambdaInsightsVersion.fromInsightsVersion("1.0.89.0");static VERSION_1_0_98_0=LambdaInsightsVersion.fromInsightsVersion("1.0.98.0");static VERSION_1_0_119_0=LambdaInsightsVersion.fromInsightsVersion("1.0.119.0");static VERSION_1_0_135_0=LambdaInsightsVersion.fromInsightsVersion("1.0.135.0");static VERSION_1_0_143_0=LambdaInsightsVersion.fromInsightsVersion("1.0.143.0");static VERSION_1_0_178_0=LambdaInsightsVersion.fromInsightsVersion("1.0.178.0");static VERSION_1_0_229_0=LambdaInsightsVersion.fromInsightsVersion("1.0.229.0");static VERSION_1_0_273_0=LambdaInsightsVersion.fromInsightsVersion("1.0.273.0");static VERSION_1_0_275_0=LambdaInsightsVersion.fromInsightsVersion("1.0.275.0");static VERSION_1_0_295_0=LambdaInsightsVersion.fromInsightsVersion("1.0.295.0");static VERSION_1_0_317_0=LambdaInsightsVersion.fromInsightsVersion("1.0.317.0");static VERSION_1_0_333_0=LambdaInsightsVersion.fromInsightsVersion("1.0.333.0");static VERSION_1_0_391_0=LambdaInsightsVersion.fromInsightsVersion("1.0.391.0");static VERSION_1_0_404_0=LambdaInsightsVersion.fromInsightsVersion("1.0.404.0");static VERSION_1_0_498_0=LambdaInsightsVersion.fromInsightsVersion("1.0.498.0");static fromInsightVersionArn(arn){class InsightsArn extends LambdaInsightsVersion{layerVersionArn=arn;_bind(_scope,_function){return{arn}}}return new InsightsArn}static fromInsightsVersion(insightsVersion){class InsightsVersion extends LambdaInsightsVersion{layerVersionArn=core_1().Lazy.uncachedString({produce:context=>getVersionArn(context.scope,insightsVersion)});_bind(scope,fn){const arch=fn.architecture?.name??architecture_1().Architecture.X86_64.name;if(!region_info_1().RegionInfo.regions.some(regionInfo=>regionInfo.cloudwatchLambdaInsightsArn(insightsVersion,arch)))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`InsightsVersion`,`Insights version ${insightsVersion} does not exist.`,fn);return{arn:getVersionArn(scope,insightsVersion,arch)}}}return new InsightsVersion}layerVersionArn=""}exports.LambdaInsightsVersion=LambdaInsightsVersion;function getVersionArn(scope,insightsVersion,architecture){const scopeStack=core_1().Stack.of(scope),region=scopeStack.region,arch=architecture??architecture_1().Architecture.X86_64.name;if(region!==void 0&&!core_1().Token.isUnresolved(region)){const arn=region_info_1().RegionInfo.get(region).cloudwatchLambdaInsightsArn(insightsVersion,arch);if(arn===void 0)throw new(errors_1()).ValidationError((0,literal_string_1().lit)`InsightsVersion`,`Insights version ${insightsVersion} is not supported in region ${region}`,scope);return arn}return scopeStack.regionalFact(region_info_1().FactName.cloudwatchLambdaInsightsVersion(insightsVersion,arch))}
|
||||
188
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-version.d.ts
generated
vendored
Normal file
188
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-version.d.ts
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Alias, AliasOptions } from './alias';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { EventInvokeConfigOptions } from './event-invoke-config';
|
||||
import type { IFunction } from './function-base';
|
||||
import { QualifiedFunctionBase } from './function-base';
|
||||
import type { IVersionRef, VersionReference } from './lambda.generated';
|
||||
import type * as cloudwatch from '../../aws-cloudwatch';
|
||||
import { RemovalPolicy } from '../../core';
|
||||
export interface IVersion extends IFunction, IVersionRef {
|
||||
/**
|
||||
* The most recently deployed version of this function.
|
||||
* @attribute
|
||||
*/
|
||||
readonly version: string;
|
||||
/**
|
||||
* The underlying AWS Lambda function.
|
||||
*/
|
||||
readonly lambda: IFunction;
|
||||
/**
|
||||
* The ARN of the version for Lambda@Edge.
|
||||
*/
|
||||
readonly edgeArn: string;
|
||||
/**
|
||||
* Defines an alias for this version.
|
||||
* @param aliasName The name of the alias
|
||||
* @param options Alias options
|
||||
*
|
||||
* @deprecated Calling `addAlias` on a `Version` object will cause the Alias to be replaced on every function update. Call `function.addAlias()` or `new Alias()` instead.
|
||||
*/
|
||||
addAlias(aliasName: string, options?: AliasOptions): Alias;
|
||||
}
|
||||
/**
|
||||
* Options for `lambda.Version`
|
||||
*/
|
||||
export interface VersionOptions extends EventInvokeConfigOptions {
|
||||
/**
|
||||
* SHA256 of the version of the Lambda source code
|
||||
*
|
||||
* Specify to validate that you're deploying the right version.
|
||||
*
|
||||
* @default No validation is performed
|
||||
*/
|
||||
readonly codeSha256?: string;
|
||||
/**
|
||||
* Description of the version
|
||||
*
|
||||
* @default Description of the Lambda
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* Specifies a provisioned concurrency configuration for a function's version.
|
||||
*
|
||||
* @default No provisioned concurrency
|
||||
*/
|
||||
readonly provisionedConcurrentExecutions?: number;
|
||||
/**
|
||||
* Whether to retain old versions of this function when a new version is
|
||||
* created.
|
||||
*
|
||||
* @default RemovalPolicy.DESTROY
|
||||
*/
|
||||
readonly removalPolicy?: RemovalPolicy;
|
||||
/**
|
||||
* The minimum number of execution environments to maintain for this version
|
||||
* when published into a capacity provider.
|
||||
*
|
||||
* This setting ensures that at least this many execution environments are always
|
||||
* available to handle function invocations for this specific version, reducing cold start latency.
|
||||
*
|
||||
* @default - 3 execution environments are set to be the minimum
|
||||
*/
|
||||
readonly minExecutionEnvironments?: number;
|
||||
/**
|
||||
* The maximum number of execution environments allowed for this version
|
||||
* when published into a capacity provider.
|
||||
*
|
||||
* This setting limits the total number of execution environments that can be created
|
||||
* to handle concurrent invocations of this specific version.
|
||||
*
|
||||
* @default - No maximum specified
|
||||
*/
|
||||
readonly maxExecutionEnvironments?: number;
|
||||
}
|
||||
/**
|
||||
* Properties for a new Lambda version
|
||||
*/
|
||||
export interface VersionProps extends VersionOptions {
|
||||
/**
|
||||
* Function to get the value of
|
||||
*/
|
||||
readonly lambda: IFunction;
|
||||
}
|
||||
export interface VersionAttributes {
|
||||
/**
|
||||
* The version.
|
||||
*/
|
||||
readonly version: string;
|
||||
/**
|
||||
* The lambda function.
|
||||
*/
|
||||
readonly lambda: IFunction;
|
||||
}
|
||||
/**
|
||||
* Tag the current state of a Function with a Version number
|
||||
*
|
||||
* Avoid using this resource directly. If you need a Version object, use
|
||||
* `function.currentVersion` instead. That will add a Version object to your
|
||||
* template, and make sure the Version is invalidated whenever the Function
|
||||
* object changes. If you use the `Version` resource directly, you are
|
||||
* responsible for making sure it is invalidated (by changing its
|
||||
* logical ID) whenever necessary.
|
||||
*
|
||||
* Version resources can then be used in `Alias` resources to refer to a
|
||||
* particular deployment of a Lambda.
|
||||
*
|
||||
* If you want to ensure that you're associating the right version with
|
||||
* the right deployment, specify the `codeSha256` property while
|
||||
* creating the `Version.
|
||||
*/
|
||||
export declare class Version extends QualifiedFunctionBase implements IVersion {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Construct a Version object from a Version ARN.
|
||||
*
|
||||
* @param scope The cdk scope creating this resource
|
||||
* @param id The cdk id of this resource
|
||||
* @param versionArn The version ARN to create this version from
|
||||
*/
|
||||
static fromVersionArn(scope: Construct, id: string, versionArn: string): IVersion;
|
||||
static fromVersionAttributes(scope: Construct, id: string, attrs: VersionAttributes): IVersion;
|
||||
/** @jsii suppress JSII5019 For historic reasons */
|
||||
readonly version: string;
|
||||
readonly lambda: IFunction;
|
||||
readonly functionArn: string;
|
||||
readonly functionName: string;
|
||||
readonly architecture: Architecture;
|
||||
protected readonly qualifier: string;
|
||||
protected readonly canCreatePermissions = true;
|
||||
constructor(scope: Construct, id: string, props: VersionProps);
|
||||
get versionRef(): VersionReference;
|
||||
get grantPrincipal(): import("../../aws-iam").IPrincipal;
|
||||
get role(): import("../../aws-iam").IRole | undefined;
|
||||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
|
||||
/**
|
||||
* Defines an alias for this version.
|
||||
* @param aliasName The name of the alias (e.g. "live")
|
||||
* @param options Alias options
|
||||
* @deprecated Calling `addAlias` on a `Version` object will cause the Alias to be replaced on every function update. Call `function.addAlias()` or `new Alias()` instead.
|
||||
*/
|
||||
addAlias(aliasName: string, options?: AliasOptions): Alias;
|
||||
get edgeArn(): string;
|
||||
/**
|
||||
* Validate that the provisionedConcurrentExecutions makes sense
|
||||
*
|
||||
* Member must have value greater than or equal to 1
|
||||
*/
|
||||
private determineProvisionedConcurrency;
|
||||
private getFunctionScalingConfig;
|
||||
}
|
||||
/**
|
||||
* Given an opaque (token) ARN, returns a CloudFormation expression that extracts the
|
||||
* qualifier (= version or alias) from the ARN.
|
||||
*
|
||||
* Version ARNs look like this:
|
||||
*
|
||||
* arn:aws:lambda:region:account-id:function:function-name:qualifier
|
||||
*
|
||||
* ..which means that in order to extract the `qualifier` component from the ARN, we can
|
||||
* split the ARN using ":" and select the component in index 7.
|
||||
*
|
||||
* @returns `FnSelect(7, FnSplit(':', arn))`
|
||||
*/
|
||||
export declare function extractQualifierFromArn(arn: string): string;
|
||||
/**
|
||||
* Given an opaque (token) ARN, returns a CloudFormation expression that extracts the
|
||||
* function ARN (excluding qualifier) from the ARN.
|
||||
*
|
||||
* Version ARNs look like this:
|
||||
*
|
||||
* arn:aws:lambda:region:account-id:function:function-name:qualifier
|
||||
*
|
||||
* ..which means that in order to extract the function arn component from the ARN, we can
|
||||
* split the ARN using ":" and join the first 7 components.
|
||||
*
|
||||
*/
|
||||
export declare function extractLambdaFunctionArn(arn: string): string;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-version.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda-version.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
4221
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda.generated.d.ts
generated
vendored
Normal file
4221
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda.generated.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda.generated.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/lambda.generated.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
142
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/layers.d.ts
generated
vendored
Normal file
142
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/layers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { Code } from './code';
|
||||
import type { ILayerVersionRef, LayerVersionReference } from './lambda.generated';
|
||||
import { Runtime } from './runtime';
|
||||
import type { IResource, RemovalPolicy } from '../../core';
|
||||
import { Resource } from '../../core';
|
||||
/**
|
||||
* Non runtime options
|
||||
*/
|
||||
export interface LayerVersionOptions {
|
||||
/**
|
||||
* The description the this Lambda Layer.
|
||||
*
|
||||
* @default - No description.
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* The SPDX licence identifier or URL to the license file for this layer.
|
||||
*
|
||||
* @default - No license information will be recorded.
|
||||
*/
|
||||
readonly license?: string;
|
||||
/**
|
||||
* The name of the layer.
|
||||
*
|
||||
* @default - A name will be generated.
|
||||
*/
|
||||
readonly layerVersionName?: string;
|
||||
/**
|
||||
* Whether to retain this version of the layer when a new version is added
|
||||
* or when the stack is deleted.
|
||||
*
|
||||
* @default RemovalPolicy.DESTROY
|
||||
*/
|
||||
readonly removalPolicy?: RemovalPolicy;
|
||||
}
|
||||
export interface LayerVersionProps extends LayerVersionOptions {
|
||||
/**
|
||||
* The runtimes compatible with this Layer.
|
||||
*
|
||||
* @default - All runtimes are supported.
|
||||
*/
|
||||
readonly compatibleRuntimes?: Runtime[];
|
||||
/**
|
||||
* The system architectures compatible with this layer.
|
||||
* @default [Architecture.X86_64]
|
||||
*/
|
||||
readonly compatibleArchitectures?: Architecture[];
|
||||
/**
|
||||
* The content of this Layer.
|
||||
*
|
||||
* Using `Code.fromInline` is not supported.
|
||||
*/
|
||||
readonly code: Code;
|
||||
}
|
||||
export interface ILayerVersion extends IResource, ILayerVersionRef {
|
||||
/**
|
||||
* The ARN of the Lambda Layer version that this Layer defines.
|
||||
* @attribute
|
||||
*/
|
||||
readonly layerVersionArn: string;
|
||||
/**
|
||||
* The runtimes compatible with this Layer.
|
||||
*
|
||||
* @default - All supported runtimes. Setting this to Runtime.ALL is equivalent to leaving it undefined.
|
||||
*/
|
||||
readonly compatibleRuntimes?: Runtime[];
|
||||
/**
|
||||
* Add permission for this layer version to specific entities. Usage within
|
||||
* the same account where the layer is defined is always allowed and does not
|
||||
* require calling this method. Note that the principal that creates the
|
||||
* Lambda function using the layer (for example, a CloudFormation changeset
|
||||
* execution role) also needs to have the ``lambda:GetLayerVersion``
|
||||
* permission on the layer version.
|
||||
*
|
||||
* @param id the ID of the grant in the construct tree.
|
||||
* @param permission the identification of the grantee.
|
||||
*/
|
||||
addPermission(id: string, permission: LayerVersionPermission): void;
|
||||
}
|
||||
/**
|
||||
* A reference to a Lambda Layer version.
|
||||
*/
|
||||
declare abstract class LayerVersionBase extends Resource implements ILayerVersion {
|
||||
abstract readonly layerVersionArn: string;
|
||||
abstract readonly compatibleRuntimes?: Runtime[];
|
||||
get layerVersionRef(): LayerVersionReference;
|
||||
addPermission(id: string, permission: LayerVersionPermission): void;
|
||||
}
|
||||
/**
|
||||
* Identification of an account (or organization) that is allowed to access a Lambda Layer Version.
|
||||
*/
|
||||
export interface LayerVersionPermission {
|
||||
/**
|
||||
* The AWS Account id of the account that is authorized to use a Lambda Layer Version. The wild-card ``'*'`` can be
|
||||
* used to grant access to "any" account (or any account in an organization when ``organizationId`` is specified).
|
||||
*/
|
||||
readonly accountId: string;
|
||||
/**
|
||||
* The ID of the AWS Organization to which the grant is restricted.
|
||||
*
|
||||
* Can only be specified if ``accountId`` is ``'*'``
|
||||
*/
|
||||
readonly organizationId?: string;
|
||||
}
|
||||
/**
|
||||
* Properties necessary to import a LayerVersion.
|
||||
*/
|
||||
export interface LayerVersionAttributes {
|
||||
/**
|
||||
* The ARN of the LayerVersion.
|
||||
*/
|
||||
readonly layerVersionArn: string;
|
||||
/**
|
||||
* The list of compatible runtimes with this Layer.
|
||||
*/
|
||||
readonly compatibleRuntimes?: Runtime[];
|
||||
}
|
||||
/**
|
||||
* Defines a new Lambda Layer version.
|
||||
*/
|
||||
export declare class LayerVersion extends LayerVersionBase {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
/**
|
||||
* Imports a layer version by ARN. Assumes it is compatible with all Lambda runtimes.
|
||||
*/
|
||||
static fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string): ILayerVersion;
|
||||
/**
|
||||
* Imports a Layer that has been defined externally.
|
||||
*
|
||||
* @param scope the parent Construct that will use the imported layer.
|
||||
* @param id the id of the imported layer in the construct tree.
|
||||
* @param attrs the properties of the imported layer.
|
||||
*/
|
||||
static fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes): ILayerVersion;
|
||||
readonly layerVersionArn: string;
|
||||
readonly compatibleRuntimes?: Runtime[];
|
||||
constructor(scope: Construct, id: string, props: LayerVersionProps);
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/layers.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/layers.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/log-retention.d.ts
generated
vendored
Normal file
7
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/log-retention.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import * as logs from '../../aws-logs';
|
||||
/**
|
||||
* Retry options for all AWS API calls.
|
||||
*/
|
||||
export interface LogRetentionRetryOptions extends logs.LogRetentionRetryOptions {
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/log-retention.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/log-retention.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LogRetention=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var logs=()=>{var tmp=require("../../aws-logs");return logs=()=>tmp,tmp};class LogRetention extends logs().LogRetention{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.LogRetention",version:"2.252.0"};constructor(scope,id,props){super(scope,id,{...props})}}exports.LogRetention=LogRetention;
|
||||
170
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/params-and-secrets-layers.d.ts
generated
vendored
Normal file
170
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/params-and-secrets-layers.d.ts
generated
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { IFunction } from './function-base';
|
||||
import type { Duration } from '../../core';
|
||||
/**
|
||||
* Config returned from `ParamsAndSecretsVersion._bind`
|
||||
*/
|
||||
interface ParamsAndSecretsBindConfig {
|
||||
/**
|
||||
* ARN of the Parameters and Secrets layer version
|
||||
*/
|
||||
readonly arn: string;
|
||||
/**
|
||||
* Environment variables for the Parameters and Secrets layer configuration
|
||||
*/
|
||||
readonly environmentVars: {
|
||||
[key: string]: string;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Parameters and Secrets Extension versions
|
||||
*/
|
||||
export declare enum ParamsAndSecretsVersions {
|
||||
/**
|
||||
* Version 1.0.103
|
||||
*
|
||||
* Note: This is the latest version
|
||||
*/
|
||||
V1_0_103 = "1.0.103"
|
||||
}
|
||||
/**
|
||||
* Logging levels for the Parametes and Secrets Extension
|
||||
*/
|
||||
export declare enum ParamsAndSecretsLogLevel {
|
||||
/**
|
||||
* Debug
|
||||
*/
|
||||
DEBUG = "debug",
|
||||
/**
|
||||
* Info
|
||||
*/
|
||||
INFO = "info",
|
||||
/**
|
||||
* Warn
|
||||
*/
|
||||
WARN = "warn",
|
||||
/**
|
||||
* Error
|
||||
*/
|
||||
ERROR = "error",
|
||||
/**
|
||||
* No logging
|
||||
*/
|
||||
NONE = "none"
|
||||
}
|
||||
/**
|
||||
* Parameters and Secrets Extension configuration options
|
||||
*/
|
||||
export interface ParamsAndSecretsOptions {
|
||||
/**
|
||||
* Whether the Parameters and Secrets Extension will cache parameters and
|
||||
* secrets.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
readonly cacheEnabled?: boolean;
|
||||
/**
|
||||
* The maximum number of secrets and parameters to cache. Must be a value
|
||||
* from 0 to 1000. A value of 0 means there is no caching.
|
||||
*
|
||||
* Note: This variable is ignored if parameterStoreTtl and secretsManagerTtl
|
||||
* are 0.
|
||||
*
|
||||
* @default 1000
|
||||
*/
|
||||
readonly cacheSize?: number;
|
||||
/**
|
||||
* The port for the local HTTP server. Valid port numbers are 1 - 65535.
|
||||
*
|
||||
* @default 2773
|
||||
*/
|
||||
readonly httpPort?: number;
|
||||
/**
|
||||
* The level of logging provided by the Parameters and Secrets Extension.
|
||||
*
|
||||
* Note: Set to debug to see the cache configuration.
|
||||
*
|
||||
* @default - Logging level will be `info`
|
||||
*/
|
||||
readonly logLevel?: ParamsAndSecretsLogLevel;
|
||||
/**
|
||||
* The maximum number of connection for HTTP clients that the Parameters and
|
||||
* Secrets Extension uses to make requests to Parameter Store or Secrets
|
||||
* Manager. There is no maximum limit. Minimum is 1.
|
||||
*
|
||||
* Note: Every running copy of this Lambda function may open the number of
|
||||
* connections specified by this property. Thus, the total number of connections
|
||||
* may exceed this number.
|
||||
*
|
||||
* @default 3
|
||||
*/
|
||||
readonly maxConnections?: number;
|
||||
/**
|
||||
* The timeout for requests to Secrets Manager. A value of 0 means that there is
|
||||
* no timeout.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
readonly secretsManagerTimeout?: Duration;
|
||||
/**
|
||||
* The time-to-live of a secret in the cache. A value of 0 means there is no caching.
|
||||
* The maximum time-to-live is 300 seconds.
|
||||
*
|
||||
* Note: This variable is ignored if cacheSize is 0.
|
||||
*
|
||||
* @default 300 seconds
|
||||
*/
|
||||
readonly secretsManagerTtl?: Duration;
|
||||
/**
|
||||
* The timeout for requests to Parameter Store. A value of 0 means that there is no
|
||||
* timeout.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
readonly parameterStoreTimeout?: Duration;
|
||||
/**
|
||||
* The time-to-live of a parameter in the cache. A value of 0 means there is no caching.
|
||||
* The maximum time-to-live is 300 seconds.
|
||||
*
|
||||
* Note: This variable is ignored if cacheSize is 0.
|
||||
*
|
||||
* @default 300 seconds
|
||||
*/
|
||||
readonly parameterStoreTtl?: Duration;
|
||||
}
|
||||
/**
|
||||
* Parameters and Secrets Extension layer version
|
||||
*/
|
||||
export declare abstract class ParamsAndSecretsLayerVersion {
|
||||
private readonly options;
|
||||
/**
|
||||
* Use the Parameters and Secrets Extension associated with the provided ARN. Make sure the ARN is associated
|
||||
* with the same region and architecture as your function.
|
||||
*
|
||||
* @see https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets_lambda.html#retrieving-secrets_lambda_ARNs
|
||||
*/
|
||||
static fromVersionArn(arn: string, options?: ParamsAndSecretsOptions): ParamsAndSecretsLayerVersion;
|
||||
/**
|
||||
* Use a specific version of the Parameters and Secrets Extension to generate a layer version.
|
||||
*/
|
||||
static fromVersion(version: ParamsAndSecretsVersions, options?: ParamsAndSecretsOptions): ParamsAndSecretsLayerVersion;
|
||||
private constructor();
|
||||
/**
|
||||
* Returns the ARN of the Parameters and Secrets Extension
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
abstract _bind(scope: Construct, fn: IFunction): ParamsAndSecretsBindConfig;
|
||||
/**
|
||||
* Configure environment variables for Parameters and Secrets Extension based on configuration options
|
||||
*/
|
||||
private environmentVariablesFromOptions;
|
||||
/**
|
||||
* Retrieve the correct Parameters and Secrets Extension Lambda ARN from RegionInfo,
|
||||
* or create a mapping to look it up at stack deployment time.
|
||||
*
|
||||
* This function is run on CDK synthesis.
|
||||
*/
|
||||
private getVersionArn;
|
||||
}
|
||||
export {};
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/params-and-secrets-layers.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/params-and-secrets-layers.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
90
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/permission.d.ts
generated
vendored
Normal file
90
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/permission.d.ts
generated
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { FunctionUrlAuthType } from './function-url';
|
||||
import type * as iam from '../../aws-iam';
|
||||
/**
|
||||
* Represents a permission statement that can be added to a Lambda function's
|
||||
* resource policy via the `addPermission()` method.
|
||||
*/
|
||||
export interface Permission {
|
||||
/**
|
||||
* The Lambda actions that you want to allow in this statement. For example,
|
||||
* you can specify lambda:CreateFunction to specify a certain action, or use
|
||||
* a wildcard (``lambda:*``) to grant permission to all Lambda actions. For a
|
||||
* list of actions, see Actions and Condition Context Keys for AWS Lambda in
|
||||
* the IAM User Guide.
|
||||
*
|
||||
* @default 'lambda:InvokeFunction'
|
||||
*/
|
||||
readonly action?: string;
|
||||
/**
|
||||
* A unique token that must be supplied by the principal invoking the
|
||||
* function.
|
||||
*
|
||||
* @default - The caller would not need to present a token.
|
||||
*/
|
||||
readonly eventSourceToken?: string;
|
||||
/**
|
||||
* The entity for which you are granting permission to invoke the Lambda
|
||||
* function. This entity can be any of the following:
|
||||
*
|
||||
* - a valid AWS service principal, such as `s3.amazonaws.com` or `sns.amazonaws.com`
|
||||
* - an AWS account ID for cross-account permissions. For example, you might want
|
||||
* to allow a custom application in another AWS account to push events to
|
||||
* Lambda by invoking your function.
|
||||
* - an AWS organization principal to grant permissions to an entire organization.
|
||||
*
|
||||
* The principal can be an AccountPrincipal, an ArnPrincipal, a ServicePrincipal,
|
||||
* or an OrganizationPrincipal.
|
||||
*/
|
||||
readonly principal: iam.IPrincipal;
|
||||
/**
|
||||
* The scope to which the permission constructs be attached. The default is
|
||||
* the Lambda function construct itself, but this would need to be different
|
||||
* in cases such as cross-stack references where the Permissions would need
|
||||
* to sit closer to the consumer of this permission (i.e., the caller).
|
||||
*
|
||||
* @default - The instance of lambda.IFunction
|
||||
*/
|
||||
readonly scope?: Construct;
|
||||
/**
|
||||
* The AWS account ID (without hyphens) of the source owner. For example, if
|
||||
* you specify an S3 bucket in the SourceArn property, this value is the
|
||||
* bucket owner's account ID. You can use this property to ensure that all
|
||||
* source principals are owned by a specific account.
|
||||
*/
|
||||
readonly sourceAccount?: string;
|
||||
/**
|
||||
* The ARN of a resource that is invoking your function. When granting
|
||||
* Amazon Simple Storage Service (Amazon S3) permission to invoke your
|
||||
* function, specify this property with the bucket ARN as its value. This
|
||||
* ensures that events generated only from the specified bucket, not just
|
||||
* any bucket from any AWS account that creates a mapping to your function,
|
||||
* can invoke the function.
|
||||
*/
|
||||
readonly sourceArn?: string;
|
||||
/**
|
||||
* The organization you want to grant permissions to. Use this ONLY if you
|
||||
* need to grant permissions to a subset of the organization. If you want to
|
||||
* grant permissions to the entire organization, sending the organization principal
|
||||
* through the `principal` property will suffice.
|
||||
*
|
||||
* You can use this property to ensure that all source principals are owned by
|
||||
* a specific organization.
|
||||
*
|
||||
* @default - No organizationId
|
||||
*/
|
||||
readonly organizationId?: string;
|
||||
/**
|
||||
* The authType for the function URL that you are granting permissions for.
|
||||
*
|
||||
* @default - No functionUrlAuthType
|
||||
*/
|
||||
readonly functionUrlAuthType?: FunctionUrlAuthType;
|
||||
/**
|
||||
* The condition key for limiting the scope of lambda:InvokeFunction action to Function URL only.
|
||||
* When set to true, it restricts the principal in this policy to perform invokes for the resource only via Function URLs.
|
||||
*
|
||||
* @default - false
|
||||
*/
|
||||
readonly invokedViaFunctionUrl?: boolean;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/permission.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/permission.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
24
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/private/scalable-function-attribute.d.ts
generated
vendored
Normal file
24
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/private/scalable-function-attribute.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import * as appscaling from '../../../aws-applicationautoscaling';
|
||||
import type { IScalableFunctionAttribute, UtilizationScalingOptions } from '../scalable-attribute-api';
|
||||
/**
|
||||
* A scalable lambda alias attribute
|
||||
*/
|
||||
export declare class ScalableFunctionAttribute extends appscaling.BaseScalableAttribute implements IScalableFunctionAttribute {
|
||||
constructor(scope: Construct, id: string, props: ScalableFunctionAttributeProps);
|
||||
/**
|
||||
* Scale out or in to keep utilization at a given level. The utilization is tracked by the
|
||||
* LambdaProvisionedConcurrencyUtilization metric, emitted by lambda. See:
|
||||
* https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html#monitoring-metrics-concurrency
|
||||
*/
|
||||
scaleOnUtilization(options: UtilizationScalingOptions): void;
|
||||
/**
|
||||
* Scale out or in based on schedule.
|
||||
*/
|
||||
scaleOnSchedule(id: string, action: appscaling.ScalingSchedule): void;
|
||||
}
|
||||
/**
|
||||
* Properties of a scalable function attribute
|
||||
*/
|
||||
export interface ScalableFunctionAttributeProps extends appscaling.BaseScalableAttributeProps {
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/private/scalable-function-attribute.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/private/scalable-function-attribute.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ScalableFunctionAttribute=void 0;var appscaling=()=>{var tmp=require("../../../aws-applicationautoscaling");return appscaling=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},errors_1=()=>{var tmp=require("../../../core/lib/errors");return errors_1=()=>tmp,tmp},literal_string_1=()=>{var tmp=require("../../../core/lib/private/literal-string");return literal_string_1=()=>tmp,tmp};class ScalableFunctionAttribute extends appscaling().BaseScalableAttribute{constructor(scope,id,props){super(scope,id,props)}scaleOnUtilization(options){if(!core_1().Token.isUnresolved(options.utilizationTarget)&&(options.utilizationTarget<.1||options.utilizationTarget>.9))throw new(errors_1()).ValidationError((0,literal_string_1().lit)`UtilizationTargetFound`,`Utilization Target should be between 0.1 and 0.9. Found ${options.utilizationTarget}.`,this);super.doScaleToTrackMetric("Tracking",{targetValue:options.utilizationTarget,predefinedMetric:appscaling().PredefinedMetric.LAMBDA_PROVISIONED_CONCURRENCY_UTILIZATION,...options})}scaleOnSchedule(id,action){super.doScaleOnSchedule(id,action)}}exports.ScalableFunctionAttribute=ScalableFunctionAttribute;
|
||||
33
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime-management.d.ts
generated
vendored
Normal file
33
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime-management.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import type { CfnFunction } from './lambda.generated';
|
||||
/**
|
||||
* Specify the runtime update mode.
|
||||
*/
|
||||
export declare class RuntimeManagementMode {
|
||||
readonly mode: string;
|
||||
readonly arn?: string | undefined;
|
||||
/**
|
||||
* Automatically update to the most recent and secure runtime version using Two-phase runtime version rollout.
|
||||
* We recommend this mode for most customers so that you always benefit from runtime updates.
|
||||
*/
|
||||
static readonly AUTO: RuntimeManagementMode;
|
||||
/**
|
||||
* When you update your function, Lambda updates the runtime of your function to the most recent and secure runtime version.
|
||||
* This approach synchronizes runtime updates with function deployments,
|
||||
* giving you control over when Lambda applies runtime updates.
|
||||
* With this mode, you can detect and mitigate rare runtime update incompatibilities early.
|
||||
* When using this mode, you must regularly update your functions to keep their runtime up to date.
|
||||
*/
|
||||
static readonly FUNCTION_UPDATE: RuntimeManagementMode;
|
||||
/**
|
||||
* You specify a runtime version in your function configuration.
|
||||
* The function uses this runtime version indefinitely.
|
||||
* In the rare case in which a new runtime version is incompatible with an existing function,
|
||||
* you can use this mode to roll back your function to an earlier runtime version.
|
||||
*/
|
||||
static manual(arn: string): RuntimeManagementMode;
|
||||
/**
|
||||
* https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-runtimemanagementconfig.html
|
||||
*/
|
||||
readonly runtimeManagementConfig: CfnFunction.RuntimeManagementConfigProperty;
|
||||
protected constructor(mode: string, arn?: string | undefined);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime-management.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime-management.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RuntimeManagementMode=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class RuntimeManagementMode{mode;arn;static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.RuntimeManagementMode",version:"2.252.0"};static AUTO=new RuntimeManagementMode("Auto");static FUNCTION_UPDATE=new RuntimeManagementMode("FunctionUpdate");static manual(arn){return new RuntimeManagementMode("Manual",arn)}runtimeManagementConfig;constructor(mode,arn){this.mode=mode,this.arn=arn,arn?this.runtimeManagementConfig={runtimeVersionArn:arn,updateRuntimeOn:mode}:this.runtimeManagementConfig={updateRuntimeOn:mode}}}exports.RuntimeManagementMode=RuntimeManagementMode;
|
||||
312
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime.d.ts
generated
vendored
Normal file
312
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime.d.ts
generated
vendored
Normal file
@@ -0,0 +1,312 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import '../../core';
|
||||
import { DockerImage } from '../../core';
|
||||
export interface LambdaRuntimeProps {
|
||||
/**
|
||||
* Whether the ``ZipFile`` (aka inline code) property can be used with this runtime.
|
||||
* @default false
|
||||
*/
|
||||
readonly supportsInlineCode?: boolean;
|
||||
/**
|
||||
* Whether the runtime enum is meant to change over time, IE NODEJS_LATEST.
|
||||
* @default false
|
||||
*/
|
||||
readonly isVariable?: boolean;
|
||||
/**
|
||||
* The Docker image name to be used for bundling in this runtime.
|
||||
* @default - the latest docker image "amazon/public.ecr.aws/sam/build-<runtime>" from https://gallery.ecr.aws
|
||||
*/
|
||||
readonly bundlingDockerImage?: string;
|
||||
/**
|
||||
* Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
|
||||
* @default false
|
||||
*/
|
||||
readonly supportsCodeGuruProfiling?: boolean;
|
||||
/**
|
||||
* Whether this runtime supports SnapStart.
|
||||
* @default false
|
||||
*/
|
||||
readonly supportsSnapStart?: boolean;
|
||||
}
|
||||
export declare enum RuntimeFamily {
|
||||
NODEJS = 0,
|
||||
JAVA = 1,
|
||||
PYTHON = 2,
|
||||
DOTNET_CORE = 3,
|
||||
GO = 4,
|
||||
RUBY = 5,
|
||||
OTHER = 6
|
||||
}
|
||||
/**
|
||||
* Lambda function runtime environment.
|
||||
*
|
||||
* If you need to use a runtime name that doesn't exist as a static member, you
|
||||
* can instantiate a `Runtime` object, e.g: `new Runtime('nodejs99.99')`.
|
||||
*
|
||||
* For NodeJS lambda functions, it is recommended to use the latest LTS NodeJS runtime available
|
||||
* (`Runtime.NODEJS_LATEST`) to keep the lambda function up-to-date.
|
||||
*/
|
||||
export declare class Runtime {
|
||||
/** A list of all known `Runtime`'s. */
|
||||
static readonly ALL: Runtime[];
|
||||
/**
|
||||
* The NodeJS runtime (nodejs)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS: Runtime;
|
||||
/**
|
||||
* The NodeJS 4.3 runtime (nodejs4.3)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_4_3: Runtime;
|
||||
/**
|
||||
* The NodeJS 6.10 runtime (nodejs6.10)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_6_10: Runtime;
|
||||
/**
|
||||
* The NodeJS 8.10 runtime (nodejs8.10)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_8_10: Runtime;
|
||||
/**
|
||||
* The NodeJS 10.x runtime (nodejs10.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_10_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 12.x runtime (nodejs12.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_12_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 14.x runtime (nodejs14.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_14_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 16.x runtime (nodejs16.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_16_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 18.x runtime (nodejs18.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest NodeJS runtime.
|
||||
*/
|
||||
static readonly NODEJS_18_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 20.x runtime (nodejs20.x)
|
||||
*/
|
||||
static readonly NODEJS_20_X: Runtime;
|
||||
/**
|
||||
* The latest NodeJS version currently available in ALL regions (not necessarily the latest NodeJS version
|
||||
* available in YOUR region).
|
||||
*/
|
||||
static readonly NODEJS_LATEST: Runtime;
|
||||
/**
|
||||
* The NodeJS 22.x runtime (nodejs22.x)
|
||||
*/
|
||||
static readonly NODEJS_22_X: Runtime;
|
||||
/**
|
||||
* The NodeJS 24.x runtime (nodejs24.x)
|
||||
*/
|
||||
static readonly NODEJS_24_X: Runtime;
|
||||
/**
|
||||
* The Python 2.7 runtime (python2.7)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
|
||||
*/
|
||||
static readonly PYTHON_2_7: Runtime;
|
||||
/**
|
||||
* The Python 3.6 runtime (python3.6) (not recommended)
|
||||
*
|
||||
* The Python 3.6 runtime is deprecated as of July 2022.
|
||||
*
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
|
||||
*/
|
||||
static readonly PYTHON_3_6: Runtime;
|
||||
/**
|
||||
* The Python 3.7 runtime (python3.7)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
|
||||
*/
|
||||
static readonly PYTHON_3_7: Runtime;
|
||||
/**
|
||||
* The Python 3.8 runtime (python3.8)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
|
||||
*/
|
||||
static readonly PYTHON_3_8: Runtime;
|
||||
/**
|
||||
* The Python 3.9 runtime (python3.9)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Python runtime.
|
||||
*/
|
||||
static readonly PYTHON_3_9: Runtime;
|
||||
/**
|
||||
* The Python 3.10 runtime (python3.10)
|
||||
*/
|
||||
static readonly PYTHON_3_10: Runtime;
|
||||
/**
|
||||
* The Python 3.11 runtime (python3.11)
|
||||
*/
|
||||
static readonly PYTHON_3_11: Runtime;
|
||||
/**
|
||||
* The Python 3.12 runtime (python3.12)
|
||||
*/
|
||||
static readonly PYTHON_3_12: Runtime;
|
||||
/**
|
||||
* The Python 3.13 runtime (python3.13)
|
||||
*/
|
||||
static readonly PYTHON_3_13: Runtime;
|
||||
/**
|
||||
* The Python 3.14 runtime (python3.14)
|
||||
*/
|
||||
static readonly PYTHON_3_14: Runtime;
|
||||
/**
|
||||
* The Java 8 runtime (java8)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Java runtime.
|
||||
*/
|
||||
static readonly JAVA_8: Runtime;
|
||||
/**
|
||||
* The Java 8 Corretto runtime (java8.al2)
|
||||
*/
|
||||
static readonly JAVA_8_CORRETTO: Runtime;
|
||||
/**
|
||||
* The Java 11 runtime (java11)
|
||||
*/
|
||||
static readonly JAVA_11: Runtime;
|
||||
/**
|
||||
* The Java 17 runtime (java17)
|
||||
*/
|
||||
static readonly JAVA_17: Runtime;
|
||||
/**
|
||||
* The Java 21 runtime (java21)
|
||||
*/
|
||||
static readonly JAVA_21: Runtime;
|
||||
/**
|
||||
* The Java 25 runtime (java25)
|
||||
*/
|
||||
static readonly JAVA_25: Runtime;
|
||||
/**
|
||||
* The .NET 6 runtime (dotnet6)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET runtime.
|
||||
*/
|
||||
static readonly DOTNET_6: Runtime;
|
||||
/**
|
||||
* The .NET 8 runtime (dotnet8)
|
||||
*/
|
||||
static readonly DOTNET_8: Runtime;
|
||||
/**
|
||||
* The .NET 9 runtime (dotnet9)
|
||||
*/
|
||||
static readonly DOTNET_9: Runtime;
|
||||
/**
|
||||
* The .NET 10 runtime (dotnet10)
|
||||
*/
|
||||
static readonly DOTNET_10: Runtime;
|
||||
/**
|
||||
* The .NET Core 1.0 runtime (dotnetcore1.0)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
|
||||
*/
|
||||
static readonly DOTNET_CORE_1: Runtime;
|
||||
/**
|
||||
* The .NET Core 2.0 runtime (dotnetcore2.0)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
|
||||
*/
|
||||
static readonly DOTNET_CORE_2: Runtime;
|
||||
/**
|
||||
* The .NET Core 2.1 runtime (dotnetcore2.1)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
|
||||
*/
|
||||
static readonly DOTNET_CORE_2_1: Runtime;
|
||||
/**
|
||||
* The .NET Core 3.1 runtime (dotnetcore3.1)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest .NET Core runtime.
|
||||
*/
|
||||
static readonly DOTNET_CORE_3_1: Runtime;
|
||||
/**
|
||||
* The Go 1.x runtime (go1.x)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the PROVIDED_AL2023 runtime.
|
||||
*/
|
||||
static readonly GO_1_X: Runtime;
|
||||
/**
|
||||
* The Ruby 2.5 runtime (ruby2.5)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
|
||||
*/
|
||||
static readonly RUBY_2_5: Runtime;
|
||||
/**
|
||||
* The Ruby 2.7 runtime (ruby2.7)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest Ruby runtime.
|
||||
*/
|
||||
static readonly RUBY_2_7: Runtime;
|
||||
/**
|
||||
* The Ruby 3.2 runtime (ruby3.2)
|
||||
*/
|
||||
static readonly RUBY_3_2: Runtime;
|
||||
/**
|
||||
* The Ruby 3.3 runtime (ruby3.3)
|
||||
*/
|
||||
static readonly RUBY_3_3: Runtime;
|
||||
/**
|
||||
* The Ruby 3.4 runtime (ruby3.4)
|
||||
*/
|
||||
static readonly RUBY_3_4: Runtime;
|
||||
/**
|
||||
* The Ruby 4.0 runtime (ruby4.0)
|
||||
*/
|
||||
static readonly RUBY_4_0: Runtime;
|
||||
/**
|
||||
* The custom provided runtime (provided)
|
||||
* @deprecated Legacy runtime no longer supported by AWS Lambda. Migrate to the latest provided.al2023 runtime.
|
||||
*/
|
||||
static readonly PROVIDED: Runtime;
|
||||
/**
|
||||
* The custom provided runtime with Amazon Linux 2 (provided.al2)
|
||||
*/
|
||||
static readonly PROVIDED_AL2: Runtime;
|
||||
/**
|
||||
* The custom provided runtime with Amazon Linux 2023 (provided.al2023)
|
||||
*/
|
||||
static readonly PROVIDED_AL2023: Runtime;
|
||||
/**
|
||||
* A special runtime entry to be used when function is using a docker image.
|
||||
*/
|
||||
static readonly FROM_IMAGE: Runtime;
|
||||
/**
|
||||
* The latest Python version currently available
|
||||
*/
|
||||
static determineLatestPythonRuntime(scope: Construct): Runtime;
|
||||
/**
|
||||
* The name of this runtime, as expected by the Lambda resource.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Whether the ``ZipFile`` (aka inline code) property can be used with this
|
||||
* runtime.
|
||||
*/
|
||||
readonly supportsInlineCode: boolean;
|
||||
/**
|
||||
* Whether this runtime is integrated with and supported for profiling using Amazon CodeGuru Profiler.
|
||||
*/
|
||||
readonly supportsCodeGuruProfiling: boolean;
|
||||
/**
|
||||
* Whether this runtime supports snapstart.
|
||||
*/
|
||||
readonly supportsSnapStart: boolean;
|
||||
/**
|
||||
* The runtime family.
|
||||
*/
|
||||
readonly family?: RuntimeFamily;
|
||||
/**
|
||||
* The bundling Docker image for this runtime.
|
||||
*/
|
||||
readonly bundlingImage: DockerImage;
|
||||
/**
|
||||
* Enabled for runtime enums that always target the latest available.
|
||||
*/
|
||||
readonly isVariable: boolean;
|
||||
constructor(name: string, family?: RuntimeFamily, props?: LambdaRuntimeProps);
|
||||
toString(): string;
|
||||
runtimeEquals(other: Runtime): boolean;
|
||||
}
|
||||
/**
|
||||
* The latest Lambda node runtime available by AWS region.
|
||||
*/
|
||||
export declare function determineLatestNodeRuntime(scope: Construct): Runtime;
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/runtime.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
41
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/scalable-attribute-api.d.ts
generated
vendored
Normal file
41
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/scalable-attribute-api.d.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
import type { IConstruct } from 'constructs';
|
||||
import type * as appscaling from '../../aws-applicationautoscaling';
|
||||
/**
|
||||
* Interface for scalable attributes
|
||||
*/
|
||||
export interface IScalableFunctionAttribute extends IConstruct {
|
||||
/**
|
||||
* Scale out or in to keep utilization at a given level. The utilization is tracked by the
|
||||
* LambdaProvisionedConcurrencyUtilization metric, emitted by lambda. See:
|
||||
* https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics.html#monitoring-metrics-concurrency
|
||||
*/
|
||||
scaleOnUtilization(options: UtilizationScalingOptions): void;
|
||||
/**
|
||||
* Scale out or in based on schedule.
|
||||
*/
|
||||
scaleOnSchedule(id: string, actions: appscaling.ScalingSchedule): void;
|
||||
}
|
||||
/**
|
||||
* Options for enabling Lambda utilization tracking
|
||||
*/
|
||||
export interface UtilizationScalingOptions extends appscaling.BaseTargetTrackingProps {
|
||||
/**
|
||||
* Utilization target for the attribute. For example, .5 indicates that 50 percent of allocated provisioned concurrency is in use.
|
||||
*/
|
||||
readonly utilizationTarget: number;
|
||||
}
|
||||
/**
|
||||
* Properties for enabling Lambda autoscaling
|
||||
*/
|
||||
export interface AutoScalingOptions {
|
||||
/**
|
||||
* Minimum capacity to scale to
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
readonly minCapacity?: number;
|
||||
/**
|
||||
* Maximum capacity to scale to
|
||||
*/
|
||||
readonly maxCapacity: number;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/scalable-attribute-api.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/scalable-attribute-api.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});
|
||||
173
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/schema-registry.d.ts
generated
vendored
Normal file
173
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/schema-registry.d.ts
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
import type { IEventSourceMapping } from './event-source-mapping';
|
||||
import type { IFunction } from './function-base';
|
||||
/**
|
||||
* The format target function should receive record in.
|
||||
*/
|
||||
export declare class EventRecordFormat {
|
||||
/**
|
||||
* The target function will receive records as json objects.
|
||||
*/
|
||||
static readonly JSON: EventRecordFormat;
|
||||
/**
|
||||
* The target function will receive records in same format as the schema source.
|
||||
*/
|
||||
static readonly SOURCE: EventRecordFormat;
|
||||
/** A custom event record format */
|
||||
static of(name: string): EventRecordFormat;
|
||||
/**
|
||||
* The enum to use in `SchemaRegistryConfig.EventRecordFormat` property in CloudFormation
|
||||
*/
|
||||
readonly value: string;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* The type of authentication protocol for your schema registry.
|
||||
*/
|
||||
export declare class KafkaSchemaRegistryAccessConfigType {
|
||||
/**
|
||||
* The Secrets Manager secret that stores your broker credentials.
|
||||
*/
|
||||
static readonly BASIC_AUTH: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM),
|
||||
* and private key password (optional) used for mutual TLS authentication of your schema registry.
|
||||
*/
|
||||
static readonly CLIENT_CERTIFICATE_TLS_AUTH: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your schema registry.
|
||||
*/
|
||||
static readonly SERVER_ROOT_CA_CERTIFICATE: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The name of the virtual host in your schema registry. Lambda uses this broker host as the event source.
|
||||
*/
|
||||
static readonly VIRTUAL_HOST: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed broker.
|
||||
*/
|
||||
static readonly SASL_SCRAM_256_AUTH: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed broker.
|
||||
*/
|
||||
static readonly SASL_SCRAM_512_AUTH: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The VPC security group used to manage access to your self-managed brokers.
|
||||
*/
|
||||
static readonly VPC_SECURITY_GROUP: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed cluster.
|
||||
*/
|
||||
static readonly VPC_SUBNET: KafkaSchemaRegistryAccessConfigType;
|
||||
/** A custom source access configuration property for schema registry */
|
||||
static of(name: string): KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The key to use in `SchemaRegistryConfig.AccessConfig.Type` property in CloudFormation
|
||||
*/
|
||||
readonly type: string;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Specific access configuration settings that tell Lambda how to authenticate with your schema registry.
|
||||
*
|
||||
* If you're working with an AWS Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.
|
||||
*
|
||||
* If you're working with a Confluent schema registry, choose the authentication method in the Type field, and provide the AWS Secrets Manager secret ARN in the URI field.
|
||||
*/
|
||||
export interface KafkaSchemaRegistryAccessConfig {
|
||||
/**
|
||||
* The type of authentication Lambda uses to access your schema registry.
|
||||
*/
|
||||
readonly type: KafkaSchemaRegistryAccessConfigType;
|
||||
/**
|
||||
* The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry.
|
||||
* @see KafkaSchemaRegistryAccessConfigType
|
||||
*/
|
||||
readonly uri: string;
|
||||
}
|
||||
/**
|
||||
* Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.
|
||||
*/
|
||||
export declare class KafkaSchemaValidationAttribute {
|
||||
/**
|
||||
* De-serialize the key field of the parload to target function.
|
||||
*/
|
||||
static readonly KEY: KafkaSchemaValidationAttribute;
|
||||
/**
|
||||
* De-serialize the value field of the parload to target function.
|
||||
*/
|
||||
static readonly VALUE: KafkaSchemaValidationAttribute;
|
||||
/** A custom schema validation attribute property */
|
||||
static of(name: string): KafkaSchemaValidationAttribute;
|
||||
/**
|
||||
* The enum to use in `SchemaRegistryConfig.SchemaValidationConfigs.Attribute` property in CloudFormation
|
||||
*/
|
||||
readonly value: string;
|
||||
private constructor();
|
||||
}
|
||||
/**
|
||||
* Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.
|
||||
*/
|
||||
export interface KafkaSchemaValidationConfig {
|
||||
/**
|
||||
* The attributes you want your schema registry to validate and filter for. If you selected JSON as the EventRecordFormat, Lambda also deserializes the selected message attributes.
|
||||
*/
|
||||
readonly attribute: KafkaSchemaValidationAttribute;
|
||||
}
|
||||
/**
|
||||
* (Amazon MSK and self-managed Apache Kafka only) Specific configuration settings for a Kafka schema registry.
|
||||
*/
|
||||
export interface KafkaSchemaRegistryConfig {
|
||||
/**
|
||||
* The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly schemaRegistryUri: string;
|
||||
/**
|
||||
* The record format that Lambda delivers to your function after schema validation.
|
||||
* - Choose JSON to have Lambda deliver the record to your function as a standard JSON object.
|
||||
* - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly eventRecordFormat: EventRecordFormat;
|
||||
/**
|
||||
* An array of access configuration objects that tell Lambda how to authenticate with your schema registry.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly accessConfigs?: KafkaSchemaRegistryAccessConfig[];
|
||||
/**
|
||||
* An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly schemaValidationConfigs: KafkaSchemaValidationConfig[];
|
||||
}
|
||||
/**
|
||||
* Properties for schema registry configuration.
|
||||
*/
|
||||
export interface SchemaRegistryProps {
|
||||
/**
|
||||
* The record format that Lambda delivers to your function after schema validation.
|
||||
* - Choose JSON to have Lambda deliver the record to your function as a standard JSON object.
|
||||
* - Choose SOURCE to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly eventRecordFormat: EventRecordFormat;
|
||||
/**
|
||||
* An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.
|
||||
*
|
||||
* @default - none
|
||||
*/
|
||||
readonly schemaValidationConfigs: KafkaSchemaValidationConfig[];
|
||||
}
|
||||
/**
|
||||
* A schema registry for an event source
|
||||
*/
|
||||
export interface ISchemaRegistry {
|
||||
/**
|
||||
* Returns the schema registry config of the event source
|
||||
*/
|
||||
bind(target: IEventSourceMapping, targetHandler: IFunction): KafkaSchemaRegistryConfig;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/schema-registry.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/schema-registry.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.KafkaSchemaValidationAttribute=exports.KafkaSchemaRegistryAccessConfigType=exports.EventRecordFormat=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class EventRecordFormat{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.EventRecordFormat",version:"2.252.0"};static JSON=new EventRecordFormat("JSON");static SOURCE=new EventRecordFormat("SOURCE");static of(name){return new EventRecordFormat(name)}value;constructor(value){this.value=value}}exports.EventRecordFormat=EventRecordFormat;class KafkaSchemaRegistryAccessConfigType{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.KafkaSchemaRegistryAccessConfigType",version:"2.252.0"};static BASIC_AUTH=new KafkaSchemaRegistryAccessConfigType("BASIC_AUTH");static CLIENT_CERTIFICATE_TLS_AUTH=new KafkaSchemaRegistryAccessConfigType("CLIENT_CERTIFICATE_TLS_AUTH");static SERVER_ROOT_CA_CERTIFICATE=new KafkaSchemaRegistryAccessConfigType("SERVER_ROOT_CA_CERTIFICATE");static VIRTUAL_HOST=new KafkaSchemaRegistryAccessConfigType("VIRTUAL_HOST");static SASL_SCRAM_256_AUTH=new KafkaSchemaRegistryAccessConfigType("SASL_SCRAM_256_AUTH");static SASL_SCRAM_512_AUTH=new KafkaSchemaRegistryAccessConfigType("SASL_SCRAM_512_AUTH");static VPC_SECURITY_GROUP=new KafkaSchemaRegistryAccessConfigType("VPC_SECURITY_GROUP");static VPC_SUBNET=new KafkaSchemaRegistryAccessConfigType("VPC_SUBNET");static of(name){return new KafkaSchemaRegistryAccessConfigType(name)}type;constructor(type){this.type=type}}exports.KafkaSchemaRegistryAccessConfigType=KafkaSchemaRegistryAccessConfigType;class KafkaSchemaValidationAttribute{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.KafkaSchemaValidationAttribute",version:"2.252.0"};static KEY=new KafkaSchemaValidationAttribute("KEY");static VALUE=new KafkaSchemaValidationAttribute("VALUE");static of(name){return new KafkaSchemaValidationAttribute(name)}value;constructor(value){this.value=value}}exports.KafkaSchemaValidationAttribute=KafkaSchemaValidationAttribute;
|
||||
136
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/singleton-lambda.d.ts
generated
vendored
Normal file
136
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/singleton-lambda.d.ts
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
import type { Construct, IConstruct, IDependable, Node, MetadataOptions } from 'constructs';
|
||||
import type { Architecture } from './architecture';
|
||||
import type { FunctionProps, EnvironmentOptions } from './function';
|
||||
import { Function as LambdaFunction } from './function';
|
||||
import { FunctionBase } from './function-base';
|
||||
import type { Version } from './lambda-version';
|
||||
import type { ILayerVersion } from './layers';
|
||||
import type { Permission } from './permission';
|
||||
import type { Runtime } from './runtime';
|
||||
import type { TenancyConfig } from './tenancy-config';
|
||||
import type * as ec2 from '../../aws-ec2';
|
||||
import type * as iam from '../../aws-iam';
|
||||
import type * as logs from '../../aws-logs';
|
||||
/**
|
||||
* Properties for a newly created singleton Lambda
|
||||
*/
|
||||
export interface SingletonFunctionProps extends FunctionProps {
|
||||
/**
|
||||
* A unique identifier to identify this lambda
|
||||
*
|
||||
* The identifier should be unique across all custom resource providers.
|
||||
* We recommend generating a UUID per provider.
|
||||
*/
|
||||
readonly uuid: string;
|
||||
/**
|
||||
* A descriptive name for the purpose of this Lambda.
|
||||
*
|
||||
* If the Lambda does not have a physical name, this string will be
|
||||
* reflected its generated name. The combination of lambdaPurpose
|
||||
* and uuid must be unique.
|
||||
*
|
||||
* @default SingletonLambda
|
||||
*/
|
||||
readonly lambdaPurpose?: string;
|
||||
}
|
||||
/**
|
||||
* A Lambda that will only ever be added to a stack once.
|
||||
*
|
||||
* This construct is a way to guarantee that the lambda function will be guaranteed to be part of the stack,
|
||||
* once and only once, irrespective of how many times the construct is declared to be part of the stack.
|
||||
* This is guaranteed as long as the `uuid` property and the optional `lambdaPurpose` property stay the same
|
||||
* whenever they're declared into the stack.
|
||||
*
|
||||
* @resource AWS::Lambda::Function
|
||||
*/
|
||||
export declare class SingletonFunction extends FunctionBase {
|
||||
/** Uniquely identifies this class. */
|
||||
static readonly PROPERTY_INJECTION_ID: string;
|
||||
readonly tenancyConfig?: TenancyConfig;
|
||||
readonly grantPrincipal: iam.IPrincipal;
|
||||
readonly functionName: string;
|
||||
readonly functionArn: string;
|
||||
readonly role?: iam.IRole;
|
||||
readonly permissionsNode: Node;
|
||||
readonly architecture: Architecture;
|
||||
/**
|
||||
* The runtime environment for the Lambda function.
|
||||
*/
|
||||
readonly runtime: Runtime;
|
||||
/**
|
||||
* The name of the singleton function. It acts as a unique ID within its CDK stack.
|
||||
* */
|
||||
readonly constructName: string;
|
||||
protected readonly canCreatePermissions: boolean;
|
||||
private lambdaFunction;
|
||||
constructor(scope: Construct, id: string, props: SingletonFunctionProps);
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
get isBoundToVpc(): boolean;
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
get connections(): ec2.Connections;
|
||||
/**
|
||||
* The LogGroup where the Lambda function's logs are made available.
|
||||
*
|
||||
* If either `logRetention` is set or this property is called, a CloudFormation custom resource is added to the stack that
|
||||
* pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
|
||||
* period (never expire, by default).
|
||||
*
|
||||
* Further, if the log group already exists and the `logRetention` is not set, the custom resource will reset the log retention
|
||||
* to never expire even if it was configured with a different value.
|
||||
*/
|
||||
get logGroup(): logs.ILogGroup;
|
||||
/**
|
||||
* Returns a `lambda.Version` which represents the current version of this
|
||||
* singleton Lambda function. A new version will be created every time the
|
||||
* function's configuration changes.
|
||||
*
|
||||
* You can specify options for this version using the `currentVersionOptions`
|
||||
* prop when initializing the `lambda.SingletonFunction`.
|
||||
*/
|
||||
get currentVersion(): Version;
|
||||
get resourceArnsForGrantInvoke(): string[];
|
||||
/**
|
||||
* Adds an environment variable to this Lambda function.
|
||||
* If this is a ref to a Lambda function, this operation results in a no-op.
|
||||
* @param key The environment variable key.
|
||||
* @param value The environment variable's value.
|
||||
* @param options Environment variable options.
|
||||
*/
|
||||
addEnvironment(key: string, value: string, options?: EnvironmentOptions): LambdaFunction;
|
||||
/**
|
||||
* Adds one or more Lambda Layers to this Lambda function.
|
||||
*
|
||||
* @param layers the layers to be added.
|
||||
*
|
||||
* @throws if there are already 5 layers on this function, or the layer is incompatible with this function's runtime.
|
||||
*/
|
||||
addLayers(...layers: ILayerVersion[]): void;
|
||||
addPermission(name: string, permission: Permission): void;
|
||||
/**
|
||||
* Using node.addDependency() does not work on this method as the underlying lambda function is modeled
|
||||
* as a singleton across the stack. Use this method instead to declare dependencies.
|
||||
*/
|
||||
addDependency(...up: IDependable[]): void;
|
||||
/**
|
||||
* Use this method to write to the construct tree.
|
||||
* The metadata entries are written to the Cloud Assembly Manifest if the `treeMetadata` property is specified in the props of the App that contains this Construct.
|
||||
*/
|
||||
addMetadata(type: string, data: any, options?: MetadataOptions): void;
|
||||
/**
|
||||
* The SingletonFunction construct cannot be added as a dependency of another construct using
|
||||
* node.addDependency(). Use this method instead to declare this as a dependency of another construct.
|
||||
*/
|
||||
dependOn(down: IConstruct): void;
|
||||
/** @internal */
|
||||
_checkEdgeCompatibility(): void;
|
||||
/**
|
||||
* Returns the construct tree node that corresponds to the lambda function.
|
||||
* @internal
|
||||
*/
|
||||
protected _functionNode(): Node;
|
||||
private ensureLambda;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/singleton-lambda.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/singleton-lambda.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/snapstart-config.d.ts
generated
vendored
Normal file
8
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/snapstart-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export declare abstract class SnapStartConf {
|
||||
static readonly ON_PUBLISHED_VERSIONS: SnapStartConf;
|
||||
private static applyOn;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
abstract _render(): any;
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/snapstart-config.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/snapstart-config.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SnapStartConf=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class SnapStartConf{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.SnapStartConf",version:"2.252.0"};static ON_PUBLISHED_VERSIONS=SnapStartConf.applyOn("PublishedVersions");static applyOn(applyValue){return new class extends SnapStartConf{_render(){return{applyOn:applyValue}}}}}exports.SnapStartConf=SnapStartConf;
|
||||
23
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/tenancy-config.d.ts
generated
vendored
Normal file
23
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/tenancy-config.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { CfnFunction } from './lambda.generated';
|
||||
/**
|
||||
* Specify the tenant isolation mode for Lambda functions.
|
||||
*
|
||||
* This is incompatible with:
|
||||
* - SnapStart
|
||||
* - Provisioned Concurrency
|
||||
* - Function URLs
|
||||
* - Most Event sources (only API Gateway is supported)
|
||||
*/
|
||||
export declare class TenancyConfig {
|
||||
/**
|
||||
* Each tenant gets a dedicated execution environment.
|
||||
* Execution environments are not shared between different tenants,
|
||||
* but can be reused for the same tenant to avoid cold starts.
|
||||
*/
|
||||
static readonly PER_TENANT: TenancyConfig;
|
||||
/**
|
||||
* The CloudFormation property for tenancy configuration.
|
||||
*/
|
||||
readonly tenancyConfigProperty: CfnFunction.TenancyConfigProperty;
|
||||
protected constructor(mode: string);
|
||||
}
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/tenancy-config.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/tenancy-config.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TenancyConfig=void 0;const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");class TenancyConfig{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_lambda.TenancyConfig",version:"2.252.0"};static PER_TENANT=new TenancyConfig("PER_TENANT");tenancyConfigProperty;constructor(mode){this.tenancyConfigProperty={tenantIsolationMode:mode}}}exports.TenancyConfig=TenancyConfig;
|
||||
13
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/util.d.ts
generated
vendored
Normal file
13
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type { Construct } from 'constructs';
|
||||
import type { AliasOptions } from './alias';
|
||||
import { Alias } from './alias';
|
||||
import type { IVersion } from './lambda-version';
|
||||
export declare function addAlias(scope: Construct, version: IVersion, aliasName: string, options?: AliasOptions): Alias;
|
||||
/**
|
||||
* Map a function over an array and concatenate the results
|
||||
*/
|
||||
export declare function flatMap<T, U>(xs: T[], fn: ((x: T, i: number) => U[])): U[];
|
||||
/**
|
||||
* Flatten a list of lists into a list of elements
|
||||
*/
|
||||
export declare function flatten<T>(xs: T[][]): T[];
|
||||
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/util.js
generated
vendored
Normal file
1
cdk/node_modules/aws-cdk-lib/aws-lambda/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addAlias=addAlias,exports.flatMap=flatMap,exports.flatten=flatten;var alias_1=()=>{var tmp=require("./alias");return alias_1=()=>tmp,tmp};function addAlias(scope,version,aliasName,options={}){return new(alias_1()).Alias(scope,`Alias${aliasName}`,{aliasName,version,...options})}function flatMap(xs,fn){return flatten(xs.map(fn))}function flatten(xs){return Array.prototype.concat.apply([],xs)}
|
||||
Reference in New Issue
Block a user