UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

966 lines 142 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * The `AWS::Lambda::Alias` resource creates an [alias](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) for a Lambda function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version. * * You can also map an alias to split invocation requests between two versions. Use the `RoutingConfig` parameter to specify a second version and the percentage of invocation requests that it receives. * * @cloudformationResource AWS::Lambda::Alias * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html */ export declare class CfnAlias extends cdk.CfnResource implements cdk.IInspectable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnAlias from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAlias; /** * The Amazon Resource Name (ARN) of the alias. * * @cloudformationAttribute AliasArn */ readonly attrAliasArn: string; /** * A description of the alias. */ description?: string; /** * The name or ARN of the Lambda function. */ functionName: string; /** * The function version that the alias invokes. */ functionVersion: string; /** * The name of the alias. */ name: string; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. */ provisionedConcurrencyConfig?: cdk.IResolvable | CfnAlias.ProvisionedConcurrencyConfigurationProperty; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. */ routingConfig?: CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnAliasProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnAlias { /** * A provisioned concurrency configuration for a function's alias. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-provisionedconcurrencyconfiguration.html */ interface ProvisionedConcurrencyConfigurationProperty { /** * The amount of provisioned concurrency to allocate for the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-provisionedconcurrencyconfiguration.html#cfn-lambda-alias-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions */ readonly provisionedConcurrentExecutions: number; } /** * The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html */ interface AliasRoutingConfigurationProperty { /** * The second version, and the percentage of traffic that's routed to it. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights */ readonly additionalVersionWeights?: Array<cdk.IResolvable | CfnAlias.VersionWeightProperty> | cdk.IResolvable; } /** * The [traffic-shifting](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) configuration of a Lambda function alias. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html */ interface VersionWeightProperty { /** * The qualifier of the second version. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html#cfn-lambda-alias-versionweight-functionversion */ readonly functionVersion: string; /** * The percentage of traffic that the alias routes to the second version. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html#cfn-lambda-alias-versionweight-functionweight */ readonly functionWeight: number; } } /** * Properties for defining a `CfnAlias` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html */ export interface CfnAliasProps { /** * A description of the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description */ readonly description?: string; /** * The name or ARN of the Lambda function. * * **Name formats** - *Function name* - `MyFunction` . * - *Function ARN* - `arn:aws:lambda:us-west-2:123456789012:function:MyFunction` . * - *Partial ARN* - `123456789012:function:MyFunction` . * * The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionname */ readonly functionName: string; /** * The function version that the alias invokes. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionversion */ readonly functionVersion: string; /** * The name of the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name */ readonly name: string; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-provisionedconcurrencyconfig */ readonly provisionedConcurrencyConfig?: cdk.IResolvable | CfnAlias.ProvisionedConcurrencyConfigurationProperty; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig */ readonly routingConfig?: CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable; } /** * Details about a [Code signing configuration](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html) . * * @cloudformationResource AWS::Lambda::CodeSigningConfig * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html */ export declare class CfnCodeSigningConfig extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnCodeSigningConfig from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnCodeSigningConfig; /** * The Amazon Resource Name (ARN) of the code signing configuration. * * @cloudformationAttribute CodeSigningConfigArn */ readonly attrCodeSigningConfigArn: string; /** * The code signing configuration ID. * * @cloudformationAttribute CodeSigningConfigId */ readonly attrCodeSigningConfigId: string; /** * List of allowed publishers. */ allowedPublishers: CfnCodeSigningConfig.AllowedPublishersProperty | cdk.IResolvable; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * The code signing policy controls the validation failure action for signature mismatch or expiry. */ codeSigningPolicies?: CfnCodeSigningConfig.CodeSigningPoliciesProperty | cdk.IResolvable; /** * Code signing configuration description. */ description?: string; /** * A list of tags to add to the code signing configuration. */ tags?: Array<cdk.CfnTag>; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnCodeSigningConfigProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnCodeSigningConfig { /** * List of signing profiles that can sign a code package. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-allowedpublishers.html */ interface AllowedPublishersProperty { /** * The Amazon Resource Name (ARN) for each of the signing profiles. * * A signing profile defines a trusted user who can sign a code package. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-allowedpublishers.html#cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns */ readonly signingProfileVersionArns: Array<string>; } /** * Code signing configuration [policies](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html#config-codesigning-policies) specify the validation failure action for signature mismatch or expiry. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-codesigningpolicies.html */ interface CodeSigningPoliciesProperty { /** * 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 value: `Warn` * * @default - "Warn" * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-codesigningpolicies.html#cfn-lambda-codesigningconfig-codesigningpolicies-untrustedartifactondeployment */ readonly untrustedArtifactOnDeployment: string; } } /** * Properties for defining a `CfnCodeSigningConfig` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html */ export interface CfnCodeSigningConfigProps { /** * List of allowed publishers. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-allowedpublishers */ readonly allowedPublishers: CfnCodeSigningConfig.AllowedPublishersProperty | cdk.IResolvable; /** * The code signing policy controls the validation failure action for signature mismatch or expiry. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-codesigningpolicies */ readonly codeSigningPolicies?: CfnCodeSigningConfig.CodeSigningPoliciesProperty | cdk.IResolvable; /** * Code signing configuration description. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-description */ readonly description?: string; /** * A list of tags to add to the code signing configuration. * * > You must have the `lambda:TagResource` , `lambda:UntagResource` , and `lambda:ListTags` permissions for your [IAM principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html) to manage the AWS CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-tags */ readonly tags?: Array<cdk.CfnTag>; } /** * The `AWS::Lambda::EventInvokeConfig` resource configures options for [asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html) 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. * * @cloudformationResource AWS::Lambda::EventInvokeConfig * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html */ export declare class CfnEventInvokeConfig extends cdk.CfnResource implements cdk.IInspectable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnEventInvokeConfig from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnEventInvokeConfig; /** * A destination for events after they have been sent to a function for processing. */ destinationConfig?: CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable; /** * The name of the Lambda function. */ functionName: string; /** * The maximum age of a request that Lambda sends to a function for processing. */ maximumEventAgeInSeconds?: number; /** * The maximum number of times to retry when the function returns an error. */ maximumRetryAttempts?: number; /** * The identifier of a version or alias. */ qualifier: string; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnEventInvokeConfigProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnEventInvokeConfig { /** * A configuration object that specifies the destination of an event after Lambda processes it. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html */ interface DestinationConfigProperty { /** * The destination configuration for failed invocations. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure */ readonly onFailure?: cdk.IResolvable | CfnEventInvokeConfig.OnFailureProperty; /** * The destination configuration for successful invocations. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess */ readonly onSuccess?: cdk.IResolvable | CfnEventInvokeConfig.OnSuccessProperty; } /** * A destination for events that were processed successfully. * * To retain records of successful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations) , you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onsuccess.html */ interface OnSuccessProperty { /** * The Amazon Resource Name (ARN) of the destination resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onsuccess.html#cfn-lambda-eventinvokeconfig-onsuccess-destination */ readonly destination: string; } /** * A destination for events that failed processing. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onfailure.html */ interface OnFailureProperty { /** * The Amazon Resource Name (ARN) of the destination resource. * * To retain records of unsuccessful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations) , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination. * * To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html) , [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html) , [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination) , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-onfailure.html#cfn-lambda-eventinvokeconfig-onfailure-destination */ readonly destination: string; } } /** * Properties for defining a `CfnEventInvokeConfig` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html */ export interface CfnEventInvokeConfigProps { /** * A destination for events after they have been sent to a function for processing. * * **Destinations** - *Function* - The Amazon Resource Name (ARN) of a Lambda function. * - *Queue* - The ARN of a standard SQS queue. * - *Bucket* - The ARN of an Amazon S3 bucket. * - *Topic* - The ARN of a standard SNS topic. * - *Event Bus* - The ARN of an Amazon EventBridge event bus. * * > S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig */ readonly destinationConfig?: CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable; /** * The name of the Lambda function. * * *Minimum* : `1` * * *Maximum* : `64` * * *Pattern* : `([a-zA-Z0-9-_]+)` * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-functionname */ readonly functionName: string; /** * The maximum age of a request that Lambda sends to a function for processing. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumeventageinseconds */ readonly maximumEventAgeInSeconds?: number; /** * The maximum number of times to retry when the function returns an error. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumretryattempts */ readonly maximumRetryAttempts?: number; /** * The identifier of a version or alias. * * - *Version* - A version number. * - *Alias* - An alias name. * - *Latest* - To specify the unpublished version, use `$LATEST` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-qualifier */ readonly qualifier: string; } /** * The `AWS::Lambda::EventSourceMapping` resource creates a mapping between an event source and an AWS Lambda function. * * Lambda reads items from the event source and triggers the function. * * For details about each event source type, see the following topics. In particular, each of the topics describes the required and optional parameters for the specific event source. * * - [Configuring a Dynamo DB stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html#services-dynamodb-eventsourcemapping) * - [Configuring a Kinesis stream as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-eventsourcemapping) * - [Configuring an SQS queue as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-eventsource) * - [Configuring an MQ broker as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-mq.html#services-mq-eventsourcemapping) * - [Configuring MSK as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html) * - [Configuring Self-Managed Apache Kafka as an event source](https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html) * - [Configuring Amazon DocumentDB as an event source](https://docs.aws.amazon.com/lambda/latest/dg/with-documentdb.html) * * @cloudformationResource AWS::Lambda::EventSourceMapping * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html */ export declare class CfnEventSourceMapping extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggableV2 { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnEventSourceMapping from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnEventSourceMapping; /** * The Amazon Resource Name (ARN) of the event source mapping. * * @cloudformationAttribute EventSourceMappingArn */ readonly attrEventSourceMappingArn: string; /** * The event source mapping's ID. * * @cloudformationAttribute Id */ readonly attrId: string; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. */ amazonManagedKafkaEventSourceConfig?: CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty | cdk.IResolvable; /** * The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. */ batchSize?: number; /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. */ bisectBatchOnFunctionError?: boolean | cdk.IResolvable; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it. */ destinationConfig?: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable; /** * Specific configuration settings for a DocumentDB event source. */ documentDbEventSourceConfig?: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable; /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. */ enabled?: boolean | cdk.IResolvable; /** * The Amazon Resource Name (ARN) of the event source. */ eventSourceArn?: string; /** * An object that defines the filter criteria that determine whether Lambda should process an event. */ filterCriteria?: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable; /** * The name or ARN of the Lambda function. */ functionName: string; /** * (Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping. */ functionResponseTypes?: Array<string>; /** * The ARN of the AWS Key Management Service ( AWS KMS ) customer managed key that Lambda uses to encrypt your function's [filter criteria](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics) . */ kmsKeyArn?: string; /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. */ maximumBatchingWindowInSeconds?: number; /** * (Kinesis and DynamoDB Streams only) Discard records older than the specified age. */ maximumRecordAgeInSeconds?: number; /** * (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. */ maximumRetryAttempts?: number; /** * The metrics configuration for your event source. */ metricsConfig?: cdk.IResolvable | CfnEventSourceMapping.MetricsConfigProperty; /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. */ parallelizationFactor?: number; /** * (Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the event source. */ provisionedPollerConfig?: cdk.IResolvable | CfnEventSourceMapping.ProvisionedPollerConfigProperty; /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. */ queues?: Array<string>; /** * (Amazon SQS only) The scaling configuration for the event source. */ scalingConfig?: cdk.IResolvable | CfnEventSourceMapping.ScalingConfigProperty; /** * The self-managed Apache Kafka cluster for your event source. */ selfManagedEventSource?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedEventSourceProperty; /** * Specific configuration settings for a self-managed Apache Kafka event source. */ selfManagedKafkaEventSourceConfig?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty; /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. */ sourceAccessConfigurations?: Array<cdk.IResolvable | CfnEventSourceMapping.SourceAccessConfigurationProperty> | cdk.IResolvable; /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. */ startingPosition?: string; /** * With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds. */ startingPositionTimestamp?: number; /** * A list of tags to add to the event source mapping. */ tags?: Array<cdk.CfnTag>; /** * The name of the Kafka topic. */ topics?: Array<string>; /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. */ tumblingWindowInSeconds?: number; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnEventSourceMappingProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnEventSourceMapping { /** * (Amazon SQS only) The scaling configuration for the event source. * * To remove the configuration, pass an empty value. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html */ interface ScalingConfigProperty { /** * Limits the number of concurrent instances that the Amazon SQS event source can invoke. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html#cfn-lambda-eventsourcemapping-scalingconfig-maximumconcurrency */ readonly maximumConcurrency?: number; } /** * The self-managed Apache Kafka cluster for your event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html */ interface SelfManagedEventSourceProperty { /** * The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource-endpoints */ readonly endpoints?: CfnEventSourceMapping.EndpointsProperty | cdk.IResolvable; } /** * The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]` . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html */ interface EndpointsProperty { /** * The list of bootstrap servers for your Kafka brokers in the following format: `"KafkaBootstrapServers": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers */ readonly kafkaBootstrapServers?: Array<string>; } /** * An object that contains the filters for an event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.html */ interface FilterCriteriaProperty { /** * A list of filters. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.html#cfn-lambda-eventsourcemapping-filtercriteria-filters */ readonly filters?: Array<CfnEventSourceMapping.FilterProperty | cdk.IResolvable> | cdk.IResolvable; } /** * A structure within a `FilterCriteria` object that defines an event filtering pattern. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html */ interface FilterProperty { /** * A filter pattern. * * For more information on the syntax of a filter pattern, see [Filter rule syntax](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html#cfn-lambda-eventsourcemapping-filter-pattern */ readonly pattern?: string; } /** * Specific configuration settings for a self-managed Apache Kafka event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html */ interface SelfManagedKafkaEventSourceConfigProperty { /** * 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. 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 http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid */ readonly consumerGroupId?: string; } /** * Specific configuration settings for a DocumentDB event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html */ interface DocumentDBEventSourceConfigProperty { /** * The name of the collection to consume within the database. * * If you do not specify a collection, Lambda consumes all collections. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname */ readonly collectionName?: string; /** * The name of the database to consume within the DocumentDB cluster. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename */ readonly databaseName?: string; /** * Determines what DocumentDB sends to your event stream during document update operations. * * If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-fulldocument */ readonly fullDocument?: string; } /** * A configuration object that specifies the destination of an event after Lambda processes it. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.html */ interface DestinationConfigProperty { /** * The destination configuration for failed invocations. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-destinationconfig.html#cfn-lambda-eventsourcemapping-destinationconfig-onfailure */ readonly onFailure?: cdk.IResolvable | CfnEventSourceMapping.OnFailureProperty; } /** * A destination for events that failed processing. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.html */ interface OnFailureProperty { /** * The Amazon Resource Name (ARN) of the destination resource. * * To retain records of unsuccessful [asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations) , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination. * * To retain records of failed invocations from [Kinesis](https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html) , [DynamoDB](https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html) , [self-managed Kafka](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination) or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination) , you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-onfailure.html#cfn-lambda-eventsourcemapping-onfailure-destination */ readonly destination?: string; } /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html */ interface AmazonManagedKafkaEventSourceConfigProperty { /** * 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. 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 http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid */ readonly consumerGroupId?: string; } /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html */ interface SourceAccessConfigurationProperty { /** * The type of authentication protocol, VPC components, or virtual host for your event source. For example: `"Type":"SASL_SCRAM_512_AUTH"` . * * - `BASIC_AUTH` – (Amazon MQ) The AWS Secrets Manager secret that stores your broker credentials. * - `BASIC_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers. * - `VPC_SUBNET` – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster. * - `VPC_SECURITY_GROUP` – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers. * - `SASL_SCRAM_256_AUTH` – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers. * - `SASL_SCRAM_512_AUTH` – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers. * - `VIRTUAL_HOST` –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call. * - `CLIENT_CERTIFICATE_TLS_AUTH` – (Amazon MSK, self-managed Apache Kafka) 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. * - `SERVER_ROOT_CA_CERTIFICATE` – (Self-managed Apache Kafka) 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. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type */ readonly type?: string; /** * The value for your chosen configuration in `Type` . * * For example: `"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri */ readonly uri?: string; } /** * The [provisioned mode](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode) configuration for the event source. Use provisioned mode to customize the minimum and maximum number of event pollers for your event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html */ interface ProvisionedPollerConfigProperty { /** * The maximum number of event pollers this event source can scale up to. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers */ readonly maximumPollers?: number; /** * The minimum number of event pollers this event source can scale down to. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers */ readonly minimumPollers?: number; } /** * The metrics configuration for your event source. * * Use this configuration object to define which metrics you want your event source mapping to produce. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-metricsconfig.html */ interface MetricsConfigProperty { /** * The metrics you want your event source mapping to produce. * * Include `EventCount` to receive event source mapping metrics related to the number of events processed by your event source mapping. For more information about these metrics, see [Event source mapping metrics](https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-metricsconfig.html#cfn-lambda-eventsourcemapping-metricsconfig-metrics */ readonly metrics?: Array<string>; } } /** * Properties for defining a `CfnEventSourceMapping` * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html */ export interface CfnEventSourceMappingProps { /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig */ readonly amazonManagedKafkaEventSourceConfig?: CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty | cdk.IResolvable; /** * The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. * * Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB). * * - *Amazon Kinesis* – Default 100. Max 10,000. * - *Amazon DynamoDB Streams* – Default 100. Max 10,000. * - *Amazon Simple Queue Service* – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10. * - *Amazon Managed Streaming for Apache Kafka* – Default 100. Max 10,000. * - *Self-managed Apache Kafka* – Default 100. Max 10,000. * - *Amazon MQ (ActiveMQ and RabbitMQ)* – Default 100. Max 10,000. * - *DocumentDB* – Default 100. Max 10,000. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize */ readonly batchSize?: number; /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. * * The default value is false. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror */ readonly bisectBatchOnFunctionError?: boolean | cdk.IResolvable; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka event sources only) A configuration object that specifies the destination of an event after Lambda processes it. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-destinationconfig */ readonly destinationConfig?: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable; /** * Specific c