UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

1,045 lines 222 kB
import * as cdk from "../../core/lib"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; import { aws_cognito as cognitoRefs, aws_events as eventsRefs, aws_iam as iamRefs, aws_iot as ioTRefs, aws_kinesis as kinesisRefs, aws_kinesisfirehose as kinesisFirehoseRefs, aws_kms as kmsRefs, aws_lambda as lambdaRefs, aws_logs as logsRefs, aws_msk as mskRefs, aws_s3 as s3Refs, aws_sns as snsRefs, aws_sqs as sqsRefs } from "../../interfaces"; import { AliasReference, CapacityProviderReference, CodeSigningConfigReference, EventInvokeConfigReference, EventSourceMappingReference, FunctionReference, IAliasRef, ICapacityProviderRef, ICodeSigningConfigRef, IEventInvokeConfigRef, IEventSourceMappingRef, IFunctionRef, ILayerVersionPermissionRef, ILayerVersionRef, IPermissionRef, IUrlRef, IVersionRef, LayerVersionPermissionReference, LayerVersionReference, PermissionReference, UrlReference, VersionReference } from "../../interfaces/generated/aws-lambda-interfaces.generated"; /** * 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, IAliasRef { /** * 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; /** * Checks whether the given object is a CfnAlias */ static isCfnAlias(x: any): x is CfnAlias; static arnForAlias(resource: IAliasRef): string; /** * A description of the alias. */ private _description?; /** * The name or ARN of the Lambda function. */ private _functionName; /** * The function version that the alias invokes. */ private _functionVersion; /** * The name of the alias. */ private _name; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. */ private _provisionedConcurrencyConfig?; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. */ private _routingConfig?; /** * Create a new `AWS::Lambda::Alias`. * * @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); get aliasRef(): AliasReference; /** * A description of the alias. */ get description(): string | undefined; /** * A description of the alias. */ set description(value: string | undefined); /** * The name or ARN of the Lambda function. */ get functionName(): string; /** * The name or ARN of the Lambda function. */ set functionName(value: string); /** * The function version that the alias invokes. */ get functionVersion(): string; /** * The function version that the alias invokes. */ set functionVersion(value: string); /** * The name of the alias. */ get name(): string; /** * The name of the alias. */ set name(value: string); /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. */ get provisionedConcurrencyConfig(): cdk.IResolvable | CfnAlias.ProvisionedConcurrencyConfigurationProperty | undefined; /** * Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias. */ set provisionedConcurrencyConfig(value: cdk.IResolvable | CfnAlias.ProvisionedConcurrencyConfigurationProperty | undefined); /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. */ get routingConfig(): CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable | undefined; /** * The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias. */ set routingConfig(value: CfnAlias.AliasRoutingConfigurationProperty | cdk.IResolvable | undefined); /** * The Amazon Resource Name (ARN) of the alias. * * @cloudformationAttribute AliasArn */ get attrAliasArn(): string; 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: lambdaRefs.IFunctionRef | 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, ICodeSigningConfigRef, 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; /** * Checks whether the given object is a CfnCodeSigningConfig */ static isCfnCodeSigningConfig(x: any): x is CfnCodeSigningConfig; static arnForCodeSigningConfig(resource: ICodeSigningConfigRef): string; /** * List of allowed publishers. */ private _allowedPublishers; /** * 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. */ private _codeSigningPolicies?; /** * Code signing configuration description. */ private _description?; /** * A list of tags to add to the code signing configuration. */ private _tags?; /** * Create a new `AWS::Lambda::CodeSigningConfig`. * * @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); get codeSigningConfigRef(): CodeSigningConfigReference; /** * List of allowed publishers. */ get allowedPublishers(): CfnCodeSigningConfig.AllowedPublishersProperty | cdk.IResolvable; /** * List of allowed publishers. */ set allowedPublishers(value: CfnCodeSigningConfig.AllowedPublishersProperty | cdk.IResolvable); /** * The code signing policy controls the validation failure action for signature mismatch or expiry. */ get codeSigningPolicies(): CfnCodeSigningConfig.CodeSigningPoliciesProperty | cdk.IResolvable | undefined; /** * The code signing policy controls the validation failure action for signature mismatch or expiry. */ set codeSigningPolicies(value: CfnCodeSigningConfig.CodeSigningPoliciesProperty | cdk.IResolvable | undefined); /** * Code signing configuration description. */ get description(): string | undefined; /** * Code signing configuration description. */ set description(value: string | undefined); /** * A list of tags to add to the code signing configuration. */ get tags(): Array<cdk.CfnTag> | undefined; /** * A list of tags to add to the code signing configuration. */ set tags(value: Array<cdk.CfnTag> | undefined); /** * The Amazon Resource Name (ARN) of the code signing configuration. * * @cloudformationAttribute CodeSigningConfigArn */ get attrCodeSigningConfigArn(): string; /** * The code signing configuration ID. * * @cloudformationAttribute CodeSigningConfigId */ get attrCodeSigningConfigId(): string; 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 issues a new Amazon CloudWatch metric ( `SignatureValidationErrors` ) and also stores the warning in the CloudTrail 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 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, IEventInvokeConfigRef { /** * 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; /** * Checks whether the given object is a CfnEventInvokeConfig */ static isCfnEventInvokeConfig(x: any): x is CfnEventInvokeConfig; /** * A destination for events after they have been sent to a function for processing. */ private _destinationConfig?; /** * The name of the Lambda function. */ private _functionName; /** * The maximum age of a request that Lambda sends to a function for processing. */ private _maximumEventAgeInSeconds?; /** * The maximum number of times to retry when the function returns an error. */ private _maximumRetryAttempts?; /** * The identifier of a version or alias. */ private _qualifier; /** * Create a new `AWS::Lambda::EventInvokeConfig`. * * @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); get eventInvokeConfigRef(): EventInvokeConfigReference; /** * A destination for events after they have been sent to a function for processing. */ get destinationConfig(): CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable | undefined; /** * A destination for events after they have been sent to a function for processing. */ set destinationConfig(value: CfnEventInvokeConfig.DestinationConfigProperty | cdk.IResolvable | undefined); /** * The name of the Lambda function. */ get functionName(): string; /** * The name of the Lambda function. */ set functionName(value: string); /** * The maximum age of a request that Lambda sends to a function for processing. */ get maximumEventAgeInSeconds(): number | undefined; /** * The maximum age of a request that Lambda sends to a function for processing. */ set maximumEventAgeInSeconds(value: number | undefined); /** * The maximum number of times to retry when the function returns an error. */ get maximumRetryAttempts(): number | undefined; /** * The maximum number of times to retry when the function returns an error. */ set maximumRetryAttempts(value: number | undefined); /** * The identifier of a version or alias. */ get qualifier(): string; /** * The identifier of a version or alias. */ set qualifier(value: string); 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. * * For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations) . * * @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. * * > When using an Amazon SQS queue as a destination, FIFO queues cannot be used. * * @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. * * > When using an Amazon SQS queue as a destination, FIFO queues cannot be used. * * @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. * * > `OnSuccess` is not supported in `CreateEventSourceMapping` or `UpdateEventSourceMapping` requests. * * @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. * * > Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html) . * * @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. * * For more information, see [Adding a destination](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations) . * * @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 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 Apache Kafka](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html) , or [Amazon MSK](https://docs.aws.amazon.com/lambda/latest/dg/kafka-on-failure.html) , you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, or Kafka topic as the destination. * * > Amazon SNS destinations have a message size limit of 256 KB. If the combined size of the function request and response payload exceeds the limit, Lambda will drop the payload when sending `OnFailure` event to the destination. For details on this behavior, refer to [Retaining records of asynchronous invocations](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html) . * * 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: lambdaRefs.IFunctionRef | 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, IEventSourceMappingRef, 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; /** * Checks whether the given object is a CfnEventSourceMapping */ static isCfnEventSourceMapping(x: any): x is CfnEventSourceMapping; static arnForEventSourceMapping(resource: IEventSourceMappingRef): string; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. */ private _amazonManagedKafkaEventSourceConfig?; /** * The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. */ private _batchSize?; /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. */ private _bisectBatchOnFunctionError?; /** * Tag Manager which manages the tags for this resource */ readonly cdkTagManager: cdk.TagManager; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it. */ private _destinationConfig?; /** * Specific configuration settings for a DocumentDB event source. */ private _documentDbEventSourceConfig?; /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. */ private _enabled?; /** * The Amazon Resource Name (ARN) of the event source. */ private _eventSourceArn?; /** * An object that defines the filter criteria that determine whether Lambda should process an event. */ private _filterCriteria?; /** * The name or ARN of the Lambda function. */ private _functionName; /** * (Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping. */ private _functionResponseTypes?; /** * The ARN of the AWS Key Management Service ( AWS ) 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) . */ private _kmsKeyArn?; /** * The function's Amazon CloudWatch Logs configuration settings. */ private _loggingConfig?; /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. */ private _maximumBatchingWindowInSeconds?; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. */ private _maximumRecordAgeInSeconds?; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. */ private _maximumRetryAttempts?; /** * The metrics configuration for your event source. */ private _metricsConfig?; /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. */ private _parallelizationFactor?; /** * (Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. */ private _provisionedPollerConfig?; /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. */ private _queues?; /** * This property is for Amazon SQS event sources only. */ private _scalingConfig?; /** * The self-managed Apache Kafka cluster for your event source. */ private _selfManagedEventSource?; /** * Specific configuration settings for a self-managed Apache Kafka event source. */ private _selfManagedKafkaEventSourceConfig?; /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. */ private _sourceAccessConfigurations?; /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. */ private _startingPosition?; /** * With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds. */ private _startingPositionTimestamp?; /** * A list of tags to add to the event source mapping. */ private _tags?; /** * The name of the Kafka topic. */ private _topics?; /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. */ private _tumblingWindowInSeconds?; /** * Create a new `AWS::Lambda::EventSourceMapping`. * * @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); get eventSourceMappingRef(): EventSourceMappingReference; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. */ get amazonManagedKafkaEventSourceConfig(): CfnEventSourceMapping.AmazonManagedKafkaEventSourceConfigProperty | cdk.IResolvable | undefined; /** * Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source. */ set amazonManagedKafkaEventSourceConfig(value: 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. */ get batchSize(): number | undefined; /** * The maximum number of records in each batch that Lambda pulls from your stream or queue and sends to your function. */ set batchSize(value: number | undefined); /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. */ get bisectBatchOnFunctionError(): boolean | cdk.IResolvable | undefined; /** * (Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry. */ set bisectBatchOnFunctionError(value: boolean | cdk.IResolvable | undefined); /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it. */ get destinationConfig(): CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable | undefined; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) A configuration object that specifies the destination of an event after Lambda processes it. */ set destinationConfig(value: CfnEventSourceMapping.DestinationConfigProperty | cdk.IResolvable | undefined); /** * Specific configuration settings for a DocumentDB event source. */ get documentDbEventSourceConfig(): CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable | undefined; /** * Specific configuration settings for a DocumentDB event source. */ set documentDbEventSourceConfig(value: CfnEventSourceMapping.DocumentDBEventSourceConfigProperty | cdk.IResolvable | undefined); /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. */ get enabled(): boolean | cdk.IResolvable | undefined; /** * When true, the event source mapping is active. When false, Lambda pauses polling and invocation. */ set enabled(value: boolean | cdk.IResolvable | undefined); /** * The Amazon Resource Name (ARN) of the event source. */ get eventSourceArn(): string | undefined; /** * The Amazon Resource Name (ARN) of the event source. */ set eventSourceArn(value: string | undefined); /** * An object that defines the filter criteria that determine whether Lambda should process an event. */ get filterCriteria(): CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable | undefined; /** * An object that defines the filter criteria that determine whether Lambda should process an event. */ set filterCriteria(value: CfnEventSourceMapping.FilterCriteriaProperty | cdk.IResolvable | undefined); /** * The name or ARN of the Lambda function. */ get functionName(): string; /** * The name or ARN of the Lambda function. */ set functionName(value: string); /** * (Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping. */ get functionResponseTypes(): Array<string> | undefined; /** * (Kinesis, DynamoDB Streams, and SQS) A list of current response type enums applied to the event source mapping. */ set functionResponseTypes(value: Array<string> | undefined); /** * The ARN of the AWS Key Management Service ( AWS ) 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) . */ get kmsKeyArn(): string | undefined; /** * The ARN of the AWS Key Management Service ( AWS ) 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) . */ set kmsKeyArn(value: string | undefined); /** * The function's Amazon CloudWatch Logs configuration settings. */ get loggingConfig(): cdk.IResolvable | CfnEventSourceMapping.LoggingConfigProperty | undefined; /** * The function's Amazon CloudWatch Logs configuration settings. */ set loggingConfig(value: cdk.IResolvable | CfnEventSourceMapping.LoggingConfigProperty | undefined); /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. */ get maximumBatchingWindowInSeconds(): number | undefined; /** * The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. */ set maximumBatchingWindowInSeconds(value: number | undefined); /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. */ get maximumRecordAgeInSeconds(): number | undefined; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records older than the specified age. */ set maximumRecordAgeInSeconds(value: number | undefined); /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. */ get maximumRetryAttempts(): number | undefined; /** * (Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Apache Kafka) Discard records after the specified number of retries. */ set maximumRetryAttempts(value: number | undefined); /** * The metrics configuration for your event source. */ get metricsConfig(): cdk.IResolvable | CfnEventSourceMapping.MetricsConfigProperty | undefined; /** * The metrics configuration for your event source. */ set metricsConfig(value: cdk.IResolvable | CfnEventSourceMapping.MetricsConfigProperty | undefined); /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. */ get parallelizationFactor(): number | undefined; /** * (Kinesis and DynamoDB Streams only) The number of batches to process concurrently from each shard. */ set parallelizationFactor(value: number | undefined); /** * (Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. */ get provisionedPollerConfig(): cdk.IResolvable | CfnEventSourceMapping.ProvisionedPollerConfigProperty | undefined; /** * (Amazon SQS, Amazon MSK, and self-managed Apache Kafka only) The provisioned mode configuration for the event source. */ set provisionedPollerConfig(value: cdk.IResolvable | CfnEventSourceMapping.ProvisionedPollerConfigProperty | undefined); /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. */ get queues(): Array<string> | undefined; /** * (Amazon MQ) The name of the Amazon MQ broker destination queue to consume. */ set queues(value: Array<string> | undefined); /** * This property is for Amazon SQS event sources only. */ get scalingConfig(): cdk.IResolvable | CfnEventSourceMapping.ScalingConfigProperty | undefined; /** * This property is for Amazon SQS event sources only. */ set scalingConfig(value: cdk.IResolvable | CfnEventSourceMapping.ScalingConfigProperty | undefined); /** * The self-managed Apache Kafka cluster for your event source. */ get selfManagedEventSource(): cdk.IResolvable | CfnEventSourceMapping.SelfManagedEventSourceProperty | undefined; /** * The self-managed Apache Kafka cluster for your event source. */ set selfManagedEventSource(value: cdk.IResolvable | CfnEventSourceMapping.SelfManagedEventSourceProperty | undefined); /** * Specific configuration settings for a self-managed Apache Kafka event source. */ get selfManagedKafkaEventSourceConfig(): cdk.IResolvable | CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty | undefined; /** * Specific configuration settings for a self-managed Apache Kafka event source. */ set selfManagedKafkaEventSourceConfig(value: cdk.IResolvable | CfnEventSourceMapping.SelfManagedKafkaEventSourceConfigProperty | undefined); /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. */ get sourceAccessConfigurations(): Array<cdk.IResolvable | CfnEventSourceMapping.SourceAccessConfigurationProperty> | cdk.IResolvable | undefined; /** * An array of the authentication protocol, VPC components, or virtual host to secure and define your event source. */ set sourceAccessConfigurations(value: Array<cdk.IResolvable | CfnEventSourceMapping.SourceAccessConfigurationProperty> | cdk.IResolvable | undefined); /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. */ get startingPosition(): string | undefined; /** * The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB. */ set startingPosition(value: string | undefined); /** * With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds. */ get startingPositionTimestamp(): number | undefined; /** * With `StartingPosition` set to `AT_TIMESTAMP` , the time from which to start reading, in Unix time seconds. */ set startingPositionTimestamp(value: number | undefined); /** * A list of tags to add to the event source mapping. */ get tags(): Array<cdk.CfnTag> | undefined; /** * A list of tags to add to the event source mapping. */ set tags(value: Array<cdk.CfnTag> | undefined); /** * The name of the Kafka topic. */ get topics(): Array<string> | undefined; /** * The name of the Kafka topic. */ set topics(value: Array<string> | undefined); /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. */ get tumblingWindowInSeconds(): number | undefined; /** * (Kinesis and DynamoDB Streams only) The duration in seconds of a processing window for DynamoDB and Kinesis Streams event sources. */ set tumblingWindowInSeconds(value: number | undefined); /** * The Amazon Resource Name (ARN) of the event source mapping. * * @cloudformationAttribute EventSourceMappingA