UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

962 lines 145 kB
import * as constructs from 'constructs'; import * as cdk from '../../core'; import * as cfn_parse from '../../core/lib/helpers-internal'; /** * Properties for defining a `CfnAlias` * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html */ export interface CfnAliasProps { /** * The name 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. * * @link 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. * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name */ readonly name: string; /** * A description of the alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description */ readonly description?: string; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-provisionedconcurrencyconfig */ readonly provisionedConcurrencyConfig?: CfnAlias.ProvisionedConcurrencyConfigurationProperty | cdk.IResolvable; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig */ readonly routingConfig?: CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable; } /** * A CloudFormation `AWS::Lambda::Alias` * * 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 * * @link 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 = "AWS::Lambda::Alias"; /** * 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 name 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionname */ functionName: string; /** * The function version that the alias invokes. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionversion */ functionVersion: string; /** * The name of the alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name */ name: string; /** * A description of the alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description */ description: string | undefined; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-provisionedconcurrencyconfig */ provisionedConcurrencyConfig: CfnAlias.ProvisionedConcurrencyConfigurationProperty | cdk.IResolvable | undefined; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig */ routingConfig: CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable | undefined; /** * Create a new `AWS::Lambda::Alias`. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource * @param props - resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnAliasProps); /** * Examines the CloudFormation resource and discloses attributes. * * @param inspector - tree inspector to collect and process attributes * */ inspect(inspector: cdk.TreeInspector): void; protected get cfnProperties(): { [key: string]: any; }; protected renderProperties(props: { [key: string]: any; }): { [key: string]: any; }; } export declare namespace CfnAlias { /** * 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 * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights */ readonly additionalVersionWeights: Array<CfnAlias.VersionWeightProperty | cdk.IResolvable> | cdk.IResolvable; } } export declare namespace CfnAlias { /** * A provisioned concurrency configuration for a function's alias. * * @struct * @stability external * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-provisionedconcurrencyconfiguration.html#cfn-lambda-alias-provisionedconcurrencyconfiguration-provisionedconcurrentexecutions */ readonly provisionedConcurrentExecutions: number; } } export declare namespace CfnAlias { /** * 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 * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html */ interface VersionWeightProperty { /** * The qualifier of the second version. * * @link 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. * * @link 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 `CfnCodeSigningConfig` * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html */ export interface CfnCodeSigningConfigProps { /** * List of allowed publishers. * * @link 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. * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-description */ readonly description?: string; } /** * A CloudFormation `AWS::Lambda::CodeSigningConfig` * * Details about a [Code signing configuration](https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html) . * * @cloudformationResource AWS::Lambda::CodeSigningConfig * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html */ export declare class CfnCodeSigningConfig extends cdk.CfnResource implements cdk.IInspectable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME = "AWS::Lambda::CodeSigningConfig"; /** * 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-allowedpublishers */ allowedPublishers: CfnCodeSigningConfig.AllowedPublishersProperty | cdk.IResolvable; /** * The code signing policy controls the validation failure action for signature mismatch or expiry. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-codesigningpolicies */ codeSigningPolicies: CfnCodeSigningConfig.CodeSigningPoliciesProperty | cdk.IResolvable | undefined; /** * Code signing configuration description. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-codesigningconfig.html#cfn-lambda-codesigningconfig-description */ description: string | undefined; /** * Create a new `AWS::Lambda::CodeSigningConfig`. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource * @param props - resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnCodeSigningConfigProps); /** * Examines the CloudFormation resource and discloses attributes. * * @param inspector - tree inspector to collect and process attributes * */ inspect(inspector: cdk.TreeInspector): void; protected get cfnProperties(): { [key: string]: any; }; protected renderProperties(props: { [key: string]: any; }): { [key: string]: any; }; } export declare namespace CfnCodeSigningConfig { /** * List of signing profiles that can sign a code package. * * @struct * @stability external * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-codesigningconfig-allowedpublishers.html#cfn-lambda-codesigningconfig-allowedpublishers-signingprofileversionarns */ readonly signingProfileVersionArns: string[]; } } export declare namespace CfnCodeSigningConfig { /** * 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 * * @link 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` * * @link 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 `CfnEventInvokeConfig` * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html */ export interface CfnEventInvokeConfigProps { /** * The name of the Lambda function. * * *Minimum* : `1` * * *Maximum* : `64` * * *Pattern* : `([a-zA-Z0-9-_]+)` * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-functionname */ readonly functionName: string; /** * The identifier of a version or alias. * * - *Version* - A version number. * - *Alias* - An alias name. * - *Latest* - To specify the unpublished version, use `$LATEST` . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-qualifier */ readonly qualifier: string; /** * 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig */ readonly destinationConfig?: CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable; /** * The maximum age of a request that Lambda sends to a function for processing. * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumretryattempts */ readonly maximumRetryAttempts?: number; } /** * A CloudFormation `AWS::Lambda::EventInvokeConfig` * * 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 * * @link 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 = "AWS::Lambda::EventInvokeConfig"; /** * 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; /** * The name of the Lambda function. * * *Minimum* : `1` * * *Maximum* : `64` * * *Pattern* : `([a-zA-Z0-9-_]+)` * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-functionname */ functionName: string; /** * The identifier of a version or alias. * * - *Version* - A version number. * - *Alias* - An alias name. * - *Latest* - To specify the unpublished version, use `$LATEST` . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-qualifier */ qualifier: string; /** * 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig */ destinationConfig: CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable | undefined; /** * The maximum age of a request that Lambda sends to a function for processing. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumeventageinseconds */ maximumEventAgeInSeconds: number | undefined; /** * The maximum number of times to retry when the function returns an error. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventinvokeconfig.html#cfn-lambda-eventinvokeconfig-maximumretryattempts */ maximumRetryAttempts: number | undefined; /** * Create a new `AWS::Lambda::EventInvokeConfig`. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource * @param props - resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnEventInvokeConfigProps); /** * Examines the CloudFormation resource and discloses attributes. * * @param inspector - tree inspector to collect and process attributes * */ inspect(inspector: cdk.TreeInspector): void; protected get cfnProperties(): { [key: string]: any; }; protected renderProperties(props: { [key: string]: any; }): { [key: string]: any; }; } export declare namespace CfnEventInvokeConfig { /** * A configuration object that specifies the destination of an event after Lambda processes it. * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html */ interface DestinationConfigProperty { /** * The destination configuration for failed invocations. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure */ readonly onFailure?: CfnEventInvokeConfig.OnFailureProperty | cdk.IResolvable; /** * The destination configuration for successful invocations. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig.html#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess */ readonly onSuccess?: CfnEventInvokeConfig.OnSuccessProperty | cdk.IResolvable; } } export declare namespace CfnEventInvokeConfig { /** * A destination for events that failed processing. * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig-onfailure.html */ interface OnFailureProperty { /** * The Amazon Resource Name (ARN) of the destination resource. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig-onfailure.html#cfn-lambda-eventinvokeconfig-destinationconfig-onfailure-destination */ readonly destination: string; } } export declare namespace CfnEventInvokeConfig { /** * A destination for events that were processed successfully. * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig-onsuccess.html */ interface OnSuccessProperty { /** * The Amazon Resource Name (ARN) of the destination resource. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-eventinvokeconfig-destinationconfig-onsuccess.html#cfn-lambda-eventinvokeconfig-destinationconfig-onsuccess-destination */ readonly destination: string; } } /** * Properties for defining a `CfnEventSourceMapping` * * @struct * @stability external * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html */ export interface CfnEventSourceMappingProps { /** * The name of the Lambda function. * * **Name formats** - *Function name* – `MyFunction` . * - *Function ARN* – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction` . * - *Version or Alias ARN* – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD` . * - *Partial ARN* – `123456789012:function:MyFunction` . * * The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname */ readonly functionName: string; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. * * @link 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. * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror */ readonly bisectBatchOnFunctionError?: boolean | cdk.IResolvable; /** * (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-destinationconfig */ readonly destinationConfig?: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable; /** * Specific configuration settings for a DocumentDB event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig */ readonly documentDbEventSourceConfig?: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable; /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. * * Default: True * * @link 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. * * - *Amazon Kinesis* – The ARN of the data stream or a stream consumer. * - *Amazon DynamoDB Streams* – The ARN of the stream. * - *Amazon Simple Queue Service* – The ARN of the queue. * - *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster. * - *Amazon MQ* – The ARN of the broker. * - *Amazon DocumentDB* – The ARN of the DocumentDB change stream. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn */ readonly eventSourceArn?: string; /** * An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-filtercriteria */ readonly filterCriteria?: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable; /** * (Streams and SQS) A list of current response type enums applied to the event source mapping. * * Valid Values: `ReportBatchItemFailures` * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes */ readonly functionResponseTypes?: string[]; /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. * * *Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0 * * *Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms * * *Related setting:* For Amazon SQS event sources, when you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds */ readonly maximumBatchingWindowInSeconds?: number; /** * (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, * which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumrecordageinseconds */ readonly maximumRecordAgeInSeconds?: number; /** * (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, * which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumretryattempts */ readonly maximumRetryAttempts?: number; /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-parallelizationfactor */ readonly parallelizationFactor?: number; /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues */ readonly queues?: string[]; /** * ( Amazon Simple Queue Service only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency) . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig */ readonly scalingConfig?: CfnEventSourceMapping.ScalingConfigProperty | cdk.IResolvable; /** * The self-managed Apache Kafka cluster for your event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource */ readonly selfManagedEventSource?: CfnEventSourceMapping.SelfManagedEventSourceProperty | cdk.IResolvable; /** * Specific configuration settings for a self-managed Apache Kafka event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig */ readonly selfManagedKafkaEventSourceConfig?: CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty | cdk.IResolvable; /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations */ readonly sourceAccessConfigurations?: Array<CfnEventSourceMapping.SourceAccessConfigurationProperty | cdk.IResolvable> | cdk.IResolvable; /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. * * - *LATEST* - Read only new records. * - *TRIM_HORIZON* - Process all available records. * - *AT_TIMESTAMP* - Specify a time from which to start reading records. * * @link 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingpositiontimestamp */ readonly startingPositionTimestamp?: number; /** * The name of the Kafka topic. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-topics */ readonly topics?: string[]; /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds */ readonly tumblingWindowInSeconds?: number; } /** * A CloudFormation `AWS::Lambda::EventSourceMapping` * * 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 * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html */ export declare class CfnEventSourceMapping extends cdk.CfnResource implements cdk.IInspectable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME = "AWS::Lambda::EventSourceMapping"; /** * 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 event source mapping's ID. * @cloudformationAttribute Id */ readonly attrId: string; /** * The name of the Lambda function. * * **Name formats** - *Function name* – `MyFunction` . * - *Function ARN* – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction` . * - *Version or Alias ARN* – `arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD` . * - *Partial ARN* – `123456789012:function:MyFunction` . * * The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname */ functionName: string; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-amazonmanagedkafkaeventsourceconfig */ amazonManagedKafkaEventSourceConfig: CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty | cdk.IResolvable | undefined; /** * 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. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize */ batchSize: number | undefined; /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. The default value is false. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-bisectbatchonfunctionerror */ bisectBatchOnFunctionError: boolean | cdk.IResolvable | undefined; /** * (Kinesis and DynamoDB Streams only) An Amazon SQS queue or Amazon SNS topic destination for discarded records. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-destinationconfig */ destinationConfig: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable | undefined; /** * Specific configuration settings for a DocumentDB event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-documentdbeventsourceconfig */ documentDbEventSourceConfig: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable | undefined; /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. * * Default: True * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled */ enabled: boolean | cdk.IResolvable | undefined; /** * The Amazon Resource Name (ARN) of the event source. * * - *Amazon Kinesis* – The ARN of the data stream or a stream consumer. * - *Amazon DynamoDB Streams* – The ARN of the stream. * - *Amazon Simple Queue Service* – The ARN of the queue. * - *Amazon Managed Streaming for Apache Kafka* – The ARN of the cluster. * - *Amazon MQ* – The ARN of the broker. * - *Amazon DocumentDB* – The ARN of the DocumentDB change stream. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn */ eventSourceArn: string | undefined; /** * An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see [Lambda event filtering](https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html) . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-filtercriteria */ filterCriteria: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable | undefined; /** * (Streams and SQS) A list of current response type enums applied to the event source mapping. * * Valid Values: `ReportBatchItemFailures` * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionresponsetypes */ functionResponseTypes: string[] | undefined; /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. * * *Default ( Kinesis , DynamoDB , Amazon SQS event sources)* : 0 * * *Default ( Amazon MSK , Kafka, Amazon MQ , Amazon DocumentDB event sources)* : 500 ms * * *Related setting:* For Amazon SQS event sources, when you set `BatchSize` to a value greater than 10, you must set `MaximumBatchingWindowInSeconds` to at least 1. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumbatchingwindowinseconds */ maximumBatchingWindowInSeconds: number | undefined; /** * (Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is -1, * which sets the maximum age to infinite. When the value is set to infinite, Lambda never discards old records. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumrecordageinseconds */ maximumRecordAgeInSeconds: number | undefined; /** * (Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is -1, * which sets the maximum number of retries to infinite. When MaximumRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-maximumretryattempts */ maximumRetryAttempts: number | undefined; /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. The default value is 1. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-parallelizationfactor */ parallelizationFactor: number | undefined; /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-queues */ queues: string[] | undefined; /** * ( Amazon Simple Queue Service only) The scaling configuration for the event source. For more information, see [Configuring maximum concurrency for Amazon SQS event sources](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency) . * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-scalingconfig */ scalingConfig: CfnEventSourceMapping.ScalingConfigProperty | cdk.IResolvable | undefined; /** * The self-managed Apache Kafka cluster for your event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedeventsource */ selfManagedEventSource: CfnEventSourceMapping.SelfManagedEventSourceProperty | cdk.IResolvable | undefined; /** * Specific configuration settings for a self-managed Apache Kafka event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-selfmanagedkafkaeventsourceconfig */ selfManagedKafkaEventSourceConfig: CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty | cdk.IResolvable | undefined; /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-sourceaccessconfigurations */ sourceAccessConfigurations: Array<CfnEventSourceMapping.SourceAccessConfigurationProperty | cdk.IResolvable> | cdk.IResolvable | undefined; /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. * * - *LATEST* - Read only new records. * - *TRIM_HORIZON* - Process all available records. * - *AT_TIMESTAMP* - Specify a time from which to start reading records. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition */ startingPosition: string | undefined; /** * With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingpositiontimestamp */ startingPositionTimestamp: number | undefined; /** * The name of the Kafka topic. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-topics */ topics: string[] | undefined; /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. A value of 0 seconds indicates no tumbling window. * * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-tumblingwindowinseconds */ tumblingWindowInSeconds: number | undefined; /** * Create a new `AWS::Lambda::EventSourceMapping`. * * @param scope - scope in which this resource is defined * @param id - scoped id of the resource * @param pro