UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1,058 lines (1,057 loc) 130 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. * * @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 [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. * * To retain records of failed invocations from [Kinesis and DynamoDB event sources](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#event-source-mapping-destinations) , you can configure an Amazon SNS topic or Amazon SQS queue as the destination. * * To retain records of failed invocations from [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. * - *Topic* - The ARN of a standard SNS topic. * - *Event Bus* - The ARN of an Amazon EventBridge event bus. * * @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 resource. * * @cloudformationAttribute EventSourceMappingArn */ readonly attrEventSourceMappingArn: string; /** * Event Source Mapping Identifier UUID. * * @cloudformationAttribute Id */ readonly attrId: string; /** * Specific configuration settings for an MSK event source. */ amazonManagedKafkaEventSourceConfig?: CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty | cdk.IResolvable; /** * The maximum number of items to retrieve in a single batch. */ batchSize?: number; /** * (Streams) 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; /** * A configuration object that specifies the destination of an event after Lambda processes it. */ destinationConfig?: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable; /** * Document db event source config. */ documentDbEventSourceConfig?: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable; /** * Disables the event source mapping to pause polling and invocation. */ enabled?: boolean | cdk.IResolvable; /** * The Amazon Resource Name (ARN) of the event source. */ eventSourceArn?: string; /** * The filter criteria to control event filtering. */ filterCriteria?: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable; /** * The name of the Lambda function. */ functionName: string; /** * (Streams) A list of response types supported by the function. */ functionResponseTypes?: Array<string>; /** * The Amazon Resource Name (ARN) of the KMS key. */ kmsKeyArn?: string; /** * (Streams) The maximum amount of time to gather records before invoking the function, in seconds. */ maximumBatchingWindowInSeconds?: number; /** * (Streams) The maximum age of a record that Lambda sends to a function for processing. */ maximumRecordAgeInSeconds?: number; /** * (Streams) The maximum number of times to retry when the function returns an error. */ maximumRetryAttempts?: number; /** * Metrics config for Event Source Mapping Metrics. */ metricsConfig?: cdk.IResolvable | CfnEventSourceMapping.MetricsConfigProperty; /** * (Streams) The number of batches to process from each shard concurrently. */ parallelizationFactor?: number; /** * ProvisionedPollerConfig. */ provisionedPollerConfig?: cdk.IResolvable | CfnEventSourceMapping.ProvisionedPollerConfigProperty; /** * (ActiveMQ) A list of ActiveMQ queues. */ queues?: Array<string>; /** * The scaling configuration for the event source. */ scalingConfig?: cdk.IResolvable | CfnEventSourceMapping.ScalingConfigProperty; /** * The configuration used by AWS Lambda to access a self-managed event source. */ selfManagedEventSource?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedEventSourceProperty; /** * Specific configuration settings for a Self-Managed Apache Kafka event source. */ selfManagedKafkaEventSourceConfig?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty; /** * A list of SourceAccessConfiguration. */ sourceAccessConfigurations?: Array<cdk.IResolvable | CfnEventSourceMapping.SourceAccessConfigurationProperty> | cdk.IResolvable; /** * The position in a stream from which to start reading. */ 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 apply to event source mapping resource. */ tags?: Array<cdk.CfnTag>; /** * (Kafka) A list of Kafka topics. */ topics?: Array<string>; /** * (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations. */ 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 { /** * The scaling configuration for the event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-scalingconfig.html */ interface ScalingConfigProperty { /** * The maximum number of concurrent functions that an 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 configuration used by AWS Lambda to access a self-managed event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedeventsource.html */ interface SelfManagedEventSourceProperty { /** * The endpoints used by AWS Lambda to access a self-managed event source. * * @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 endpoints used by AWS Lambda to access a self-managed event source. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html */ interface EndpointsProperty { /** * A list of Kafka server endpoints. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-endpoints.html#cfn-lambda-eventsourcemapping-endpoints-kafkabootstrapservers */ readonly kafkaBootstrapServers?: Array<string>; } /** * The filter criteria to control event filtering. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filtercriteria.html */ interface FilterCriteriaProperty { /** * List of filters of this FilterCriteria. * * @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; } /** * The filter object that defines parameters for ESM filtering. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-filter.html */ interface FilterProperty { /** * The filter pattern that defines which events should be passed for invocations. * * @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. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig-consumergroupid */ readonly consumerGroupId?: string; } /** * Document db event source config. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html */ interface DocumentDBEventSourceConfigProperty { /** * The collection name to connect to. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-collectionname */ readonly collectionName?: string; /** * The database name to connect to. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-documentdbeventsourceconfig.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig-databasename */ readonly databaseName?: string; /** * Include full document in change stream response. * * The default option will only send the changes made to documents to Lambda. If you want the complete document sent to Lambda, set this to UpdateLookup. * * @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 { /** * A destination for records of invocations that failed processing. * * @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 records of invocations 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. * * @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 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. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig-consumergroupid */ readonly consumerGroupId?: string; } /** * The configuration used by AWS Lambda to access 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 source access configuration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-type */ readonly type?: string; /** * The URI for the source access configuration resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-sourceaccessconfiguration.html#cfn-lambda-eventsourcemapping-sourceaccessconfiguration-uri */ readonly uri?: string; } /** * Metrics config for Event Source Mapping Metrics. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-metricsconfig.html */ interface MetricsConfigProperty { /** * Metric groups to enable. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-metricsconfig.html#cfn-lambda-eventsourcemapping-metricsconfig-metrics */ readonly metrics?: Array<string>; } /** * ProvisionedPollerConfig. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html */ interface ProvisionedPollerConfigProperty { /** * Maximum poller count. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig-maximumpollers */ readonly maximumPollers?: number; /** * Minimum poller count. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventsourcemapping-provisionedpollerconfig.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig-minimumpollers */ readonly minimumPollers?: number; } } /** * 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 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 items to retrieve in a single batch. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize */ readonly batchSize?: number; /** * (Streams) If the function returns an error, split the batch in two and retry. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror */ readonly bisectBatchOnFunctionError?: boolean | cdk.IResolvable; /** * 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; /** * Document db event source config. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig */ readonly documentDbEventSourceConfig?: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable; /** * Disables the event source mapping to pause polling and invocation. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled */ readonly enabled?: boolean | cdk.IResolvable; /** * The Amazon Resource Name (ARN) of the event source. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn */ readonly eventSourceArn?: string; /** * The filter criteria to control event filtering. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-filtercriteria */ readonly filterCriteria?: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable; /** * The name of the Lambda function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname */ readonly functionName: string; /** * (Streams) A list of response types supported by the function. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes */ readonly functionResponseTypes?: Array<string>; /** * The Amazon Resource Name (ARN) of the KMS key. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-kmskeyarn */ readonly kmsKeyArn?: string; /** * (Streams) The maximum amount of time to gather records before invoking the function, in seconds. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds */ readonly maximumBatchingWindowInSeconds?: number; /** * (Streams) The maximum age of a record that Lambda sends to a function for processing. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumrecordageinseconds */ readonly maximumRecordAgeInSeconds?: number; /** * (Streams) 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-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumretryattempts */ readonly maximumRetryAttempts?: number; /** * Metrics config for Event Source Mapping Metrics. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-metricsconfig */ readonly metricsConfig?: cdk.IResolvable | CfnEventSourceMapping.MetricsConfigProperty; /** * (Streams) The number of batches to process from each shard concurrently. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-parallelizationfactor */ readonly parallelizationFactor?: number; /** * ProvisionedPollerConfig. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-provisionedpollerconfig */ readonly provisionedPollerConfig?: cdk.IResolvable | CfnEventSourceMapping.ProvisionedPollerConfigProperty; /** * (ActiveMQ) A list of ActiveMQ queues. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues */ readonly queues?: Array<string>; /** * The scaling configuration for the event source. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig */ readonly scalingConfig?: cdk.IResolvable | CfnEventSourceMapping.ScalingConfigProperty; /** * The configuration used by AWS Lambda to access a self-managed event source. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource */ readonly selfManagedEventSource?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedEventSourceProperty; /** * Specific configuration settings for a Self-Managed Apache Kafka event source. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig */ readonly selfManagedKafkaEventSourceConfig?: cdk.IResolvable | CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty; /** * A list of SourceAccessConfiguration. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations */ readonly 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 Streams sources. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition */ readonly startingPosition?: string; /** * With StartingPosition set to AT_TIMESTAMP, the time from which to start reading, in Unix time seconds. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingpositiontimestamp */ readonly startingPositionTimestamp?: number; /** * A list of tags to apply to event source mapping resource. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tags */ readonly tags?: Array<cdk.CfnTag>; /** * (Kafka) A list of Kafka topics. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-topics */ readonly topics?: Array<string>; /** * (Streams) Tumbling window (non-overlapping time window) duration to perform aggregations. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds