UNPKG

@aws-sdk/client-lambda

Version:

AWS SDK for JavaScript Lambda Client for Node.js, Browser and React Native

1,161 lines 227 kB
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client"; import { StreamingBlobTypes } from "@smithy/types"; import { LambdaServiceException as __BaseException } from "./LambdaServiceException"; /** * <p>Limits that are related to concurrency and storage. All file and storage sizes are in bytes.</p> * @public */ export interface AccountLimit { /** * <p>The amount of storage space that you can use for all deployment packages and layer archives.</p> * @public */ TotalCodeSize?: number | undefined; /** * <p>The maximum size of a function's deployment package and layers when they're extracted.</p> * @public */ CodeSizeUnzipped?: number | undefined; /** * <p>The maximum size of a deployment package when it's uploaded directly to Lambda. Use Amazon S3 for larger files.</p> * @public */ CodeSizeZipped?: number | undefined; /** * <p>The maximum number of simultaneous function executions.</p> * @public */ ConcurrentExecutions?: number | undefined; /** * <p>The maximum number of simultaneous function executions, minus the capacity that's reserved for individual functions with <a>PutFunctionConcurrency</a>.</p> * @public */ UnreservedConcurrentExecutions?: number | undefined; } /** * <p>The number of functions and amount of storage in use.</p> * @public */ export interface AccountUsage { /** * <p>The amount of storage space, in bytes, that's being used by deployment packages and layer archives.</p> * @public */ TotalCodeSize?: number | undefined; /** * <p>The number of Lambda functions.</p> * @public */ FunctionCount?: number | undefined; } /** * @public */ export interface AddLayerVersionPermissionRequest { /** * <p>The name or Amazon Resource Name (ARN) of the layer.</p> * @public */ LayerName: string | undefined; /** * <p>The version number.</p> * @public */ VersionNumber: number | undefined; /** * <p>An identifier that distinguishes the policy from others on the same layer version.</p> * @public */ StatementId: string | undefined; /** * <p>The API action that grants access to the layer. For example, <code>lambda:GetLayerVersion</code>.</p> * @public */ Action: string | undefined; /** * <p>An account ID, or <code>*</code> to grant layer usage permission to all accounts in an organization, or all Amazon Web Services accounts (if <code>organizationId</code> is not specified). For the last case, make sure that you really do want all Amazon Web Services accounts to have usage permission to this layer. </p> * @public */ Principal: string | undefined; /** * <p>With the principal set to <code>*</code>, grant permission to all accounts in the specified organization.</p> * @public */ OrganizationId?: string | undefined; /** * <p>Only update the policy if the revision ID matches the ID specified. Use this option to avoid modifying a policy that has changed since you last read it.</p> * @public */ RevisionId?: string | undefined; } /** * @public */ export interface AddLayerVersionPermissionResponse { /** * <p>The permission statement.</p> * @public */ Statement?: string | undefined; /** * <p>A unique identifier for the current revision of the policy.</p> * @public */ RevisionId?: string | undefined; } /** * <p>One of the parameters in the request is not valid.</p> * @public */ export declare class InvalidParameterValueException extends __BaseException { readonly name: "InvalidParameterValueException"; readonly $fault: "client"; /** * <p>The exception type.</p> * @public */ Type?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<InvalidParameterValueException, __BaseException>); } /** * <p>The permissions policy for the resource is too large. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html">Lambda quotas</a>.</p> * @public */ export declare class PolicyLengthExceededException extends __BaseException { readonly name: "PolicyLengthExceededException"; readonly $fault: "client"; Type?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<PolicyLengthExceededException, __BaseException>); } /** * <p>The RevisionId provided does not match the latest RevisionId for the Lambda function or alias.</p> <ul> <li> <p> <b>For AddPermission and RemovePermission API operations:</b> Call <code>GetPolicy</code> to retrieve the latest RevisionId for your resource.</p> </li> <li> <p> <b>For all other API operations:</b> Call <code>GetFunction</code> or <code>GetAlias</code> to retrieve the latest RevisionId for your resource.</p> </li> </ul> * @public */ export declare class PreconditionFailedException extends __BaseException { readonly name: "PreconditionFailedException"; readonly $fault: "client"; /** * <p>The exception type.</p> * @public */ Type?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<PreconditionFailedException, __BaseException>); } /** * <p>The resource already exists, or another operation is in progress.</p> * @public */ export declare class ResourceConflictException extends __BaseException { readonly name: "ResourceConflictException"; readonly $fault: "client"; /** * <p>The exception type.</p> * @public */ Type?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<ResourceConflictException, __BaseException>); } /** * <p>The resource specified in the request does not exist.</p> * @public */ export declare class ResourceNotFoundException extends __BaseException { readonly name: "ResourceNotFoundException"; readonly $fault: "client"; Type?: string | undefined; Message?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>); } /** * <p>The Lambda service encountered an internal error.</p> * @public */ export declare class ServiceException extends __BaseException { readonly name: "ServiceException"; readonly $fault: "server"; Type?: string | undefined; Message?: string | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<ServiceException, __BaseException>); } /** * @public * @enum */ export declare const ThrottleReason: { readonly CallerRateLimitExceeded: "CallerRateLimitExceeded"; readonly ConcurrentInvocationLimitExceeded: "ConcurrentInvocationLimitExceeded"; readonly ConcurrentSnapshotCreateLimitExceeded: "ConcurrentSnapshotCreateLimitExceeded"; readonly FunctionInvocationRateLimitExceeded: "FunctionInvocationRateLimitExceeded"; readonly ReservedFunctionConcurrentInvocationLimitExceeded: "ReservedFunctionConcurrentInvocationLimitExceeded"; readonly ReservedFunctionInvocationRateLimitExceeded: "ReservedFunctionInvocationRateLimitExceeded"; }; /** * @public */ export type ThrottleReason = (typeof ThrottleReason)[keyof typeof ThrottleReason]; /** * <p>The request throughput limit was exceeded. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html#api-requests">Lambda quotas</a>.</p> * @public */ export declare class TooManyRequestsException extends __BaseException { readonly name: "TooManyRequestsException"; readonly $fault: "client"; /** * <p>The number of seconds the caller should wait before retrying.</p> * @public */ retryAfterSeconds?: string | undefined; Type?: string | undefined; Reason?: ThrottleReason | undefined; /** * @internal */ constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>); } /** * @public * @enum */ export declare const FunctionUrlAuthType: { readonly AWS_IAM: "AWS_IAM"; readonly NONE: "NONE"; }; /** * @public */ export type FunctionUrlAuthType = (typeof FunctionUrlAuthType)[keyof typeof FunctionUrlAuthType]; /** * @public */ export interface AddPermissionRequest { /** * <p>The name or ARN of the Lambda function, version, or alias.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>my-function</code> (name-only), <code>my-function:v1</code> (with alias).</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:my-function</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:my-function</code>.</p> </li> </ul> <p>You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p> * @public */ FunctionName: string | undefined; /** * <p>A statement identifier that differentiates the statement from others in the same policy.</p> * @public */ StatementId: string | undefined; /** * <p>The action that the principal can use on the function. For example, <code>lambda:InvokeFunction</code> or <code>lambda:GetFunction</code>.</p> * @public */ Action: string | undefined; /** * <p>The Amazon Web Services service, Amazon Web Services account, IAM user, or IAM role that invokes the function. If you specify a service, use <code>SourceArn</code> or <code>SourceAccount</code> to limit who can invoke the function through that service.</p> * @public */ Principal: string | undefined; /** * <p>For Amazon Web Services services, the ARN of the Amazon Web Services resource that invokes the function. For example, an Amazon S3 bucket or Amazon SNS topic.</p> <p>Note that Lambda configures the comparison using the <code>StringLike</code> operator.</p> * @public */ SourceArn?: string | undefined; /** * <p>For Amazon Web Services service, the ID of the Amazon Web Services account that owns the resource. Use this together with <code>SourceArn</code> to ensure that the specified account owns the resource. It is possible for an Amazon S3 bucket to be deleted by its owner and recreated by another account.</p> * @public */ SourceAccount?: string | undefined; /** * <p>For Alexa Smart Home functions, a token that the invoker must supply.</p> * @public */ EventSourceToken?: string | undefined; /** * <p>Specify a version or alias to add permissions to a published version of the function.</p> * @public */ Qualifier?: string | undefined; /** * <p>Update the policy only if the revision ID matches the ID that's specified. Use this option to avoid modifying a policy that has changed since you last read it.</p> * @public */ RevisionId?: string | undefined; /** * <p>The identifier for your organization in Organizations. Use this to grant permissions to all the Amazon Web Services accounts under this organization.</p> * @public */ PrincipalOrgID?: string | undefined; /** * <p>The type of authentication that your function URL uses. Set to <code>AWS_IAM</code> if you want to restrict access to authenticated users only. Set to <code>NONE</code> if you want to bypass IAM authentication to create a public endpoint. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html">Security and auth model for Lambda function URLs</a>.</p> * @public */ FunctionUrlAuthType?: FunctionUrlAuthType | undefined; } /** * @public */ export interface AddPermissionResponse { /** * <p>The permission statement that's added to the function policy.</p> * @public */ Statement?: string | undefined; } /** * <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">traffic-shifting</a> configuration of a Lambda function alias.</p> * @public */ export interface AliasRoutingConfiguration { /** * <p>The second version, and the percentage of traffic that's routed to it.</p> * @public */ AdditionalVersionWeights?: Record<string, number> | undefined; } /** * <p>Provides configuration information about a Lambda function <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html">alias</a>.</p> * @public */ export interface AliasConfiguration { /** * <p>The Amazon Resource Name (ARN) of the alias.</p> * @public */ AliasArn?: string | undefined; /** * <p>The name of the alias.</p> * @public */ Name?: string | undefined; /** * <p>The function version that the alias invokes.</p> * @public */ FunctionVersion?: string | undefined; /** * <p>A description of the alias.</p> * @public */ Description?: string | undefined; /** * <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html">routing configuration</a> of the alias.</p> * @public */ RoutingConfig?: AliasRoutingConfiguration | undefined; /** * <p>A unique identifier that changes when you update the alias.</p> * @public */ RevisionId?: string | undefined; } /** * <p>List of signing profiles that can sign a code package. </p> * @public */ export interface AllowedPublishers { /** * <p>The Amazon Resource Name (ARN) for each of the signing profiles. A signing profile defines a trusted user who can sign a code package. </p> * @public */ SigningProfileVersionArns: string[] | undefined; } /** * @public * @enum */ export declare const KafkaSchemaRegistryAuthType: { readonly BASIC_AUTH: "BASIC_AUTH"; readonly CLIENT_CERTIFICATE_TLS_AUTH: "CLIENT_CERTIFICATE_TLS_AUTH"; readonly SERVER_ROOT_CA_CERTIFICATE: "SERVER_ROOT_CA_CERTIFICATE"; }; /** * @public */ export type KafkaSchemaRegistryAuthType = (typeof KafkaSchemaRegistryAuthType)[keyof typeof KafkaSchemaRegistryAuthType]; /** * <p>Specific access configuration settings that tell Lambda how to authenticate with your schema registry.</p> <p>If you're working with an Glue schema registry, don't provide authentication details in this object. Instead, ensure that your execution role has the required permissions for Lambda to access your cluster.</p> <p>If you're working with a Confluent schema registry, choose the authentication method in the <code>Type</code> field, and provide the Secrets Manager secret ARN in the <code>URI</code> field.</p> * @public */ export interface KafkaSchemaRegistryAccessConfig { /** * <p> The type of authentication Lambda uses to access your schema registry. </p> * @public */ Type?: KafkaSchemaRegistryAuthType | undefined; /** * <p> The URI of the secret (Secrets Manager secret ARN) to authenticate with your schema registry. </p> * @public */ URI?: string | undefined; } /** * @public * @enum */ export declare const SchemaRegistryEventRecordFormat: { readonly JSON: "JSON"; readonly SOURCE: "SOURCE"; }; /** * @public */ export type SchemaRegistryEventRecordFormat = (typeof SchemaRegistryEventRecordFormat)[keyof typeof SchemaRegistryEventRecordFormat]; /** * @public * @enum */ export declare const KafkaSchemaValidationAttribute: { readonly KEY: "KEY"; readonly VALUE: "VALUE"; }; /** * @public */ export type KafkaSchemaValidationAttribute = (typeof KafkaSchemaValidationAttribute)[keyof typeof KafkaSchemaValidationAttribute]; /** * <p>Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.</p> * @public */ export interface KafkaSchemaValidationConfig { /** * <p> The attributes you want your schema registry to validate and filter for. If you selected <code>JSON</code> as the <code>EventRecordFormat</code>, Lambda also deserializes the selected message attributes. </p> * @public */ Attribute?: KafkaSchemaValidationAttribute | undefined; } /** * <p>Specific configuration settings for a Kafka schema registry.</p> * @public */ export interface KafkaSchemaRegistryConfig { /** * <p>The URI for your schema registry. The correct URI format depends on the type of schema registry you're using.</p> <ul> <li> <p>For Glue schema registries, use the ARN of the registry.</p> </li> <li> <p>For Confluent schema registries, use the URL of the registry.</p> </li> </ul> * @public */ SchemaRegistryURI?: string | undefined; /** * <p>The record format that Lambda delivers to your function after schema validation.</p> <ul> <li> <p>Choose <code>JSON</code> to have Lambda deliver the record to your function as a standard JSON object.</p> </li> <li> <p>Choose <code>SOURCE</code> to have Lambda deliver the record to your function in its original source format. Lambda removes all schema metadata, such as the schema ID, before sending the record to your function.</p> </li> </ul> * @public */ EventRecordFormat?: SchemaRegistryEventRecordFormat | undefined; /** * <p>An array of access configuration objects that tell Lambda how to authenticate with your schema registry.</p> * @public */ AccessConfigs?: KafkaSchemaRegistryAccessConfig[] | undefined; /** * <p>An array of schema validation configuration objects, which tell Lambda the message attributes you want to validate and filter using your schema registry.</p> * @public */ SchemaValidationConfigs?: KafkaSchemaValidationConfig[] | undefined; } /** * <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p> * @public */ export interface AmazonManagedKafkaEventSourceConfig { /** * <p>The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id">Customizable consumer group ID</a>.</p> * @public */ ConsumerGroupId?: string | undefined; /** * <p>Specific configuration settings for a Kafka schema registry.</p> * @public */ SchemaRegistryConfig?: KafkaSchemaRegistryConfig | undefined; } /** * @public * @enum */ export declare const ApplicationLogLevel: { readonly Debug: "DEBUG"; readonly Error: "ERROR"; readonly Fatal: "FATAL"; readonly Info: "INFO"; readonly Trace: "TRACE"; readonly Warn: "WARN"; }; /** * @public */ export type ApplicationLogLevel = (typeof ApplicationLogLevel)[keyof typeof ApplicationLogLevel]; /** * @public * @enum */ export declare const Architecture: { readonly arm64: "arm64"; readonly x86_64: "x86_64"; }; /** * @public */ export type Architecture = (typeof Architecture)[keyof typeof Architecture]; /** * @public * @enum */ export declare const CodeSigningPolicy: { readonly Enforce: "Enforce"; readonly Warn: "Warn"; }; /** * @public */ export type CodeSigningPolicy = (typeof CodeSigningPolicy)[keyof typeof CodeSigningPolicy]; /** * <p>Code signing configuration <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html#config-codesigning-policies">policies</a> specify the validation failure action for signature mismatch or expiry.</p> * @public */ export interface CodeSigningPolicies { /** * <p>Code signing configuration policy for deployment validation failure. If you set the policy to <code>Enforce</code>, Lambda blocks the deployment request if signature validation checks fail. If you set the policy to <code>Warn</code>, Lambda allows the deployment and creates a CloudWatch log. </p> <p>Default value: <code>Warn</code> </p> * @public */ UntrustedArtifactOnDeployment?: CodeSigningPolicy | undefined; } /** * @public */ export interface CreateCodeSigningConfigRequest { /** * <p>Descriptive name for this code signing configuration.</p> * @public */ Description?: string | undefined; /** * <p>Signing profiles for this code signing configuration.</p> * @public */ AllowedPublishers: AllowedPublishers | undefined; /** * <p>The code signing policies define the actions to take if the validation checks fail. </p> * @public */ CodeSigningPolicies?: CodeSigningPolicies | undefined; /** * <p>A list of tags to add to the code signing configuration.</p> * @public */ Tags?: Record<string, string> | undefined; } /** * <p>Details about a <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html">Code signing configuration</a>. </p> * @public */ export interface CodeSigningConfig { /** * <p>Unique identifer for the Code signing configuration.</p> * @public */ CodeSigningConfigId: string | undefined; /** * <p>The Amazon Resource Name (ARN) of the Code signing configuration.</p> * @public */ CodeSigningConfigArn: string | undefined; /** * <p>Code signing configuration description.</p> * @public */ Description?: string | undefined; /** * <p>List of allowed publishers.</p> * @public */ AllowedPublishers: AllowedPublishers | undefined; /** * <p>The code signing policy controls the validation failure action for signature mismatch or expiry.</p> * @public */ CodeSigningPolicies: CodeSigningPolicies | undefined; /** * <p>The date and time that the Code signing configuration was last modified, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). </p> * @public */ LastModified: string | undefined; } /** * @public */ export interface CreateCodeSigningConfigResponse { /** * <p>The code signing configuration.</p> * @public */ CodeSigningConfig: CodeSigningConfig | undefined; } /** * @public */ export interface DeleteCodeSigningConfigRequest { /** * <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p> * @public */ CodeSigningConfigArn: string | undefined; } /** * @public */ export interface DeleteCodeSigningConfigResponse { } /** * @public */ export interface GetCodeSigningConfigRequest { /** * <p>The The Amazon Resource Name (ARN) of the code signing configuration. </p> * @public */ CodeSigningConfigArn: string | undefined; } /** * @public */ export interface GetCodeSigningConfigResponse { /** * <p>The code signing configuration</p> * @public */ CodeSigningConfig: CodeSigningConfig | undefined; } /** * @public */ export interface ListCodeSigningConfigsRequest { /** * <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p> * @public */ Marker?: string | undefined; /** * <p>Maximum number of items to return.</p> * @public */ MaxItems?: number | undefined; } /** * @public */ export interface ListCodeSigningConfigsResponse { /** * <p>The pagination token that's included if more results are available.</p> * @public */ NextMarker?: string | undefined; /** * <p>The code signing configurations</p> * @public */ CodeSigningConfigs?: CodeSigningConfig[] | undefined; } /** * @public */ export interface ListFunctionsByCodeSigningConfigRequest { /** * <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p> * @public */ CodeSigningConfigArn: string | undefined; /** * <p>Specify the pagination token that's returned by a previous request to retrieve the next page of results.</p> * @public */ Marker?: string | undefined; /** * <p>Maximum number of items to return.</p> * @public */ MaxItems?: number | undefined; } /** * @public */ export interface ListFunctionsByCodeSigningConfigResponse { /** * <p>The pagination token that's included if more results are available.</p> * @public */ NextMarker?: string | undefined; /** * <p>The function ARNs. </p> * @public */ FunctionArns?: string[] | undefined; } /** * @public */ export interface UpdateCodeSigningConfigRequest { /** * <p>The The Amazon Resource Name (ARN) of the code signing configuration.</p> * @public */ CodeSigningConfigArn: string | undefined; /** * <p>Descriptive name for this code signing configuration.</p> * @public */ Description?: string | undefined; /** * <p>Signing profiles for this code signing configuration.</p> * @public */ AllowedPublishers?: AllowedPublishers | undefined; /** * <p>The code signing policy.</p> * @public */ CodeSigningPolicies?: CodeSigningPolicies | undefined; } /** * @public */ export interface UpdateCodeSigningConfigResponse { /** * <p>The code signing configuration</p> * @public */ CodeSigningConfig: CodeSigningConfig | undefined; } /** * <p>A destination for events that failed processing. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations">Adding a destination</a>.</p> * @public */ export interface OnFailure { /** * <p>The Amazon Resource Name (ARN) of the destination resource.</p> <p>To retain records of unsuccessful <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations">asynchronous invocations</a>, you can configure an Amazon SNS topic, Amazon SQS queue, Amazon S3 bucket, Lambda function, or Amazon EventBridge event bus as the destination.</p> <p>To retain records of failed invocations from <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html">Kinesis</a>, <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html">DynamoDB</a>, <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-onfailure-destination">self-managed Kafka</a> or <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-onfailure-destination">Amazon MSK</a>, you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.</p> * @public */ Destination?: string | undefined; } /** * <p>A destination for events that were processed successfully.</p> <p>To retain records of successful <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations">asynchronous invocations</a>, you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.</p> <note> <p> <code>OnSuccess</code> is not supported in <code>CreateEventSourceMapping</code> or <code>UpdateEventSourceMapping</code> requests.</p> </note> * @public */ export interface OnSuccess { /** * <p>The Amazon Resource Name (ARN) of the destination resource.</p> * @public */ Destination?: string | undefined; } /** * <p>A configuration object that specifies the destination of an event after Lambda processes it. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-async-retain-records.html#invocation-async-destinations">Adding a destination</a>.</p> * @public */ export interface DestinationConfig { /** * <p>The destination configuration for successful invocations. Not supported in <code>CreateEventSourceMapping</code> or <code>UpdateEventSourceMapping</code>.</p> * @public */ OnSuccess?: OnSuccess | undefined; /** * <p>The destination configuration for failed invocations.</p> * @public */ OnFailure?: OnFailure | undefined; } /** * @public * @enum */ export declare const FullDocument: { readonly Default: "Default"; readonly UpdateLookup: "UpdateLookup"; }; /** * @public */ export type FullDocument = (typeof FullDocument)[keyof typeof FullDocument]; /** * <p> Specific configuration settings for a DocumentDB event source. </p> * @public */ export interface DocumentDBEventSourceConfig { /** * <p> The name of the database to consume within the DocumentDB cluster. </p> * @public */ DatabaseName?: string | undefined; /** * <p> The name of the collection to consume within the database. If you do not specify a collection, Lambda consumes all collections. </p> * @public */ CollectionName?: string | undefined; /** * <p> Determines what DocumentDB sends to your event stream during document update operations. If set to UpdateLookup, DocumentDB sends a delta describing the changes, along with a copy of the entire document. Otherwise, DocumentDB sends only a partial document that contains the changes. </p> * @public */ FullDocument?: FullDocument | undefined; } /** * <p> A structure within a <code>FilterCriteria</code> object that defines an event filtering pattern. </p> * @public */ export interface Filter { /** * <p> A filter pattern. For more information on the syntax of a filter pattern, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-syntax"> Filter rule syntax</a>. </p> * @public */ Pattern?: string | undefined; } /** * <p> An object that contains the filters for an event source. </p> * @public */ export interface FilterCriteria { /** * <p> A list of filters. </p> * @public */ Filters?: Filter[] | undefined; } /** * @public * @enum */ export declare const FunctionResponseType: { readonly ReportBatchItemFailures: "ReportBatchItemFailures"; }; /** * @public */ export type FunctionResponseType = (typeof FunctionResponseType)[keyof typeof FunctionResponseType]; /** * @public * @enum */ export declare const EventSourceMappingMetric: { readonly EventCount: "EventCount"; }; /** * @public */ export type EventSourceMappingMetric = (typeof EventSourceMappingMetric)[keyof typeof EventSourceMappingMetric]; /** * <p>The metrics configuration for your event source. Use this configuration object to define which metrics you want your event source mapping to produce.</p> * @public */ export interface EventSourceMappingMetricsConfig { /** * <p> The metrics you want your event source mapping to produce. Include <code>EventCount</code> to receive event source mapping metrics related to the number of events processed by your event source mapping. For more information about these metrics, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics"> Event source mapping metrics</a>. </p> * @public */ Metrics?: EventSourceMappingMetric[] | undefined; } /** * <p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode"> provisioned mode</a> configuration for the event source. Use Provisioned Mode to customize the minimum and maximum number of event pollers for your event source. An event poller is a compute unit that provides approximately 5 MBps of throughput.</p> * @public */ export interface ProvisionedPollerConfig { /** * <p>The minimum number of event pollers this event source can scale down to.</p> * @public */ MinimumPollers?: number | undefined; /** * <p>The maximum number of event pollers this event source can scale up to.</p> * @public */ MaximumPollers?: number | undefined; } /** * <p>(Amazon SQS only) The scaling configuration for the event source. To remove the configuration, pass an empty value.</p> * @public */ export interface ScalingConfig { /** * <p>Limits the number of concurrent instances that the Amazon SQS event source can invoke.</p> * @public */ MaximumConcurrency?: number | undefined; } /** * @public * @enum */ export declare const EndPointType: { readonly KAFKA_BOOTSTRAP_SERVERS: "KAFKA_BOOTSTRAP_SERVERS"; }; /** * @public */ export type EndPointType = (typeof EndPointType)[keyof typeof EndPointType]; /** * <p>The self-managed Apache Kafka cluster for your event source.</p> * @public */ export interface SelfManagedEventSource { /** * <p>The list of bootstrap servers for your Kafka brokers in the following format: <code>"KAFKA_BOOTSTRAP_SERVERS": ["abc.xyz.com:xxxx","abc2.xyz.com:xxxx"]</code>.</p> * @public */ Endpoints?: Partial<Record<EndPointType, string[]>> | undefined; } /** * <p>Specific configuration settings for a self-managed Apache Kafka event source.</p> * @public */ export interface SelfManagedKafkaEventSourceConfig { /** * <p> The identifier for the Kafka consumer group to join. The consumer group ID must be unique among all your Kafka event sources. After creating a Kafka event source mapping with the consumer group ID specified, you cannot update this value. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-kafka-process.html#services-smaa-topic-add">Customizable consumer group ID</a>.</p> * @public */ ConsumerGroupId?: string | undefined; /** * <p>Specific configuration settings for a Kafka schema registry.</p> * @public */ SchemaRegistryConfig?: KafkaSchemaRegistryConfig | undefined; } /** * @public * @enum */ export declare const SourceAccessType: { readonly BASIC_AUTH: "BASIC_AUTH"; readonly CLIENT_CERTIFICATE_TLS_AUTH: "CLIENT_CERTIFICATE_TLS_AUTH"; readonly SASL_SCRAM_256_AUTH: "SASL_SCRAM_256_AUTH"; readonly SASL_SCRAM_512_AUTH: "SASL_SCRAM_512_AUTH"; readonly SERVER_ROOT_CA_CERTIFICATE: "SERVER_ROOT_CA_CERTIFICATE"; readonly VIRTUAL_HOST: "VIRTUAL_HOST"; readonly VPC_SECURITY_GROUP: "VPC_SECURITY_GROUP"; readonly VPC_SUBNET: "VPC_SUBNET"; }; /** * @public */ export type SourceAccessType = (typeof SourceAccessType)[keyof typeof SourceAccessType]; /** * <p>To secure and define access to your event source, you can specify the authentication protocol, VPC components, or virtual host.</p> * @public */ export interface SourceAccessConfiguration { /** * <p>The type of authentication protocol, VPC components, or virtual host for your event source. For example: <code>"Type":"SASL_SCRAM_512_AUTH"</code>.</p> <ul> <li> <p> <code>BASIC_AUTH</code> – (Amazon MQ) The Secrets Manager secret that stores your broker credentials.</p> </li> <li> <p> <code>BASIC_AUTH</code> – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL/PLAIN authentication of your Apache Kafka brokers.</p> </li> <li> <p> <code>VPC_SUBNET</code> – (Self-managed Apache Kafka) The subnets associated with your VPC. Lambda connects to these subnets to fetch data from your self-managed Apache Kafka cluster.</p> </li> <li> <p> <code>VPC_SECURITY_GROUP</code> – (Self-managed Apache Kafka) The VPC security group used to manage access to your self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>SASL_SCRAM_256_AUTH</code> – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>SASL_SCRAM_512_AUTH</code> – (Amazon MSK, Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers.</p> </li> <li> <p> <code>VIRTUAL_HOST</code> –- (RabbitMQ) The name of the virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the event source. This property cannot be specified in an UpdateEventSourceMapping API call.</p> </li> <li> <p> <code>CLIENT_CERTIFICATE_TLS_AUTH</code> – (Amazon MSK, self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.</p> </li> <li> <p> <code>SERVER_ROOT_CA_CERTIFICATE</code> – (Self-managed Apache Kafka) The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers. </p> </li> </ul> * @public */ Type?: SourceAccessType | undefined; /** * <p>The value for your chosen configuration in <code>Type</code>. For example: <code>"URI": "arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName"</code>.</p> * @public */ URI?: string | undefined; } /** * @public * @enum */ export declare const EventSourcePosition: { readonly AT_TIMESTAMP: "AT_TIMESTAMP"; readonly LATEST: "LATEST"; readonly TRIM_HORIZON: "TRIM_HORIZON"; }; /** * @public */ export type EventSourcePosition = (typeof EventSourcePosition)[keyof typeof EventSourcePosition]; /** * @public */ export interface CreateEventSourceMappingRequest { /** * <p>The Amazon Resource Name (ARN) of the event source.</p> <ul> <li> <p> <b>Amazon Kinesis</b> – The ARN of the data stream or a stream consumer.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – The ARN of the stream.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – The ARN of the queue.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – The ARN of the cluster or the ARN of the VPC connection (for <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#msk-multi-vpc">cross-account event source mappings</a>).</p> </li> <li> <p> <b>Amazon MQ</b> – The ARN of the broker.</p> </li> <li> <p> <b>Amazon DocumentDB</b> – The ARN of the DocumentDB change stream.</p> </li> </ul> * @public */ EventSourceArn?: string | undefined; /** * <p>The name or ARN of the Lambda function.</p> <p class="title"> <b>Name formats</b> </p> <ul> <li> <p> <b>Function name</b> – <code>MyFunction</code>.</p> </li> <li> <p> <b>Function ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction</code>.</p> </li> <li> <p> <b>Version or Alias ARN</b> – <code>arn:aws:lambda:us-west-2:123456789012:function:MyFunction:PROD</code>.</p> </li> <li> <p> <b>Partial ARN</b> – <code>123456789012:function:MyFunction</code>.</p> </li> </ul> <p>The length constraint applies only to the full ARN. If you specify only the function name, it's limited to 64 characters in length.</p> * @public */ FunctionName: string | undefined; /** * <p>When true, the event source mapping is active. When false, Lambda pauses polling and invocation.</p> <p>Default: True</p> * @public */ Enabled?: boolean | undefined; /** * <p>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).</p> <ul> <li> <p> <b>Amazon Kinesis</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon DynamoDB Streams</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon Simple Queue Service</b> – Default 10. For standard queues the max is 10,000. For FIFO queues the max is 10.</p> </li> <li> <p> <b>Amazon Managed Streaming for Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Self-managed Apache Kafka</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>Amazon MQ (ActiveMQ and RabbitMQ)</b> – Default 100. Max 10,000.</p> </li> <li> <p> <b>DocumentDB</b> – Default 100. Max 10,000.</p> </li> </ul> * @public */ BatchSize?: number | undefined; /** * <p>An object that defines the filter criteria that determine whether Lambda should process an event. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html">Lambda event filtering</a>.</p> * @public */ FilterCriteria?: FilterCriteria | undefined; /** * <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For Kinesis, DynamoDB, and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For Kinesis, DynamoDB, and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p> * @public */ MaximumBatchingWindowInSeconds?: number | undefined; /** * <p>(Kinesis and DynamoDB Streams only) The number of batches to process from each shard concurrently.</p> * @public */ ParallelizationFactor?: number | undefined; /** * <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p> * @public */ StartingPosition?: EventSourcePosition | undefined; /** * <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p> * @public */ StartingPositionTimestamp?: Date | undefined; /** * <p>(Kinesis, DynamoDB Streams, Amazon MSK, and self-managed Kafka only) A configuration object that specifies the destination of an event after Lambda processes it.</p> * @public */ DestinationConfig?: DestinationConfig | undefined; /** * <p>(Kinesis and DynamoDB Streams only) Discard records older than the specified age. The default value is infinite (-1).</p> * @public */ MaximumRecordAgeInSeconds?: number | undefined; /** * <p>(Kinesis and DynamoDB Streams only) If the function returns an error, split the batch in two and retry.</p> * @public */ BisectBatchOnFunctionError?: boolean | undefined; /** * <p>(Kinesis and DynamoDB Streams only) Discard records after the specified number of retries. The default value is infinite (-1). When set to infinite (-1), failed records are retried until the record expires.</p> * @public */ MaximumRetryAttempts?: number | undefined; /** * <p>A list of tags to apply to the event source mapping.</p> * @public */ Tags?: Record<string, string> | undefined; /** * <p>(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.</p> * @public */ TumblingWindowInSeconds?: number | undefined; /** * <p>The name of the Kafka topic.</p> * @public */ Topics?: string[] | undefined; /** * <p> (MQ) The name of the Amazon MQ broker destination queue to consume. </p> * @public */ Queues?: string[] | undefined; /** * <p>An array of authentication protocols or VPC components required to secure your event source.</p> * @public */ SourceAccessConfigurations?: SourceAccessConfiguration[] | undefined; /** * <p>The self-managed Apache Kafka cluster to receive records from.</p> * @public */ SelfManagedEventSource?: SelfManagedEventSource | undefined; /** * <p>(Kinesis, DynamoDB Streams, and Amazon SQS) A list of current response type enums applied to the event source mapping.</p> * @public */ FunctionResponseTypes?: FunctionResponseType[] | undefined; /** * <p>Specific configuration settings for an Amazon Managed Streaming for Apache Kafka (Amazon MSK) event source.</p> * @public */ AmazonManagedKafkaEventSourceConfig?: AmazonManagedKafkaEventSourceConfig | undefined; /** * <p>Specific configuration settings for a self-managed Apache Kafka event source.</p> * @public */ SelfManagedKafkaEventSourceConfig?: SelfManagedKafkaEventSourceConfig | undefined; /** * <p>(Amazon SQS only) The scaling configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#events-sqs-max-concurrency">Configuring maximum concurrency for Amazon SQS event sources</a>.</p> * @public */ ScalingConfig?: ScalingConfig | undefined; /** * <p>Specific configuration settings for a DocumentDB event source.</p> * @public */ DocumentDBEventSourceConfig?: DocumentDBEventSourceConfig | undefined; /** * <p> The ARN of the Key Management Service (KMS) customer managed key that Lambda uses to encrypt your function's <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventfiltering.html#filtering-basics">filter criteria</a>. By default, Lambda does not encrypt your filter criteria object. Specify this property to encrypt data using your own customer managed key. </p> * @public */ KMSKeyArn?: string | undefined; /** * <p>The metrics configuration for your event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/monitoring-metrics-types.html#event-source-mapping-metrics">Event source mapping metrics</a>.</p> * @public */ MetricsConfig?: EventSourceMappingMetricsConfig | undefined; /** * <p>(Amazon MSK and self-managed Apache Kafka only) The provisioned mode configuration for the event source. For more information, see <a href="https://docs.aws.amazon.com/lambda/latest/dg/invocation-eventsourcemapping.html#invocation-eventsourcemapping-provisioned-mode">provisioned mode</a>.</p> * @public */ ProvisionedPollerConfig?: ProvisionedPollerConfig | undefined; } /** * <p>An object that contains details about an error related to filter criteria encryption.</p> * @public */ export interface FilterCriteriaError { /** * <p>The KMS exception that resulted from filter criteria encryption or decryption.</p> * @public */ ErrorCode?: string | undefined; /** * <p>The error message.</p> * @public */ Message?: string | undefined; } /** * <p>A mapping between an Amazon Web Services resource and a Lambda function. For details, see <a>CreateEventSourceMapping</a>.</p> * @public */ export interface EventSourceMappingConfiguration { /** * <p>The identifier of the event source mapping.</p> * @public */ UUID?: string | undefined; /** * <p>The position in a stream from which to start reading. Required for Amazon Kinesis and Amazon DynamoDB Stream event sources. <code>AT_TIMESTAMP</code> is supported only for Amazon Kinesis streams, Amazon DocumentDB, Amazon MSK, and self-managed Apache Kafka.</p> * @public */ StartingPosition?: EventSourcePosition | undefined; /** * <p>With <code>StartingPosition</code> set to <code>AT_TIMESTAMP</code>, the time from which to start reading. <code>StartingPositionTimestamp</code> cannot be in the future.</p> * @public */ StartingPositionTimestamp?: Date | undefined; /** * <p>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).</p> <p>Default value: Varies by service. For Amazon SQS, the default is 10. For all other services, the default is 100.</p> <p>Related setting: When you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p> * @public */ BatchSize?: number | undefined; /** * <p>The maximum amount of time, in seconds, that Lambda spends gathering records before invoking the function. You can configure <code>MaximumBatchingWindowInSeconds</code> to any value from 0 seconds to 300 seconds in increments of seconds.</p> <p>For streams and Amazon SQS event sources, the default batching window is 0 seconds. For Amazon MSK, Self-managed Apache Kafka, Amazon MQ, and DocumentDB event sources, the default batching window is 500 ms. Note that because you can only change <code>MaximumBatchingWindowInSeconds</code> in increments of seconds, you cannot revert back to the 500 ms default batching window after you have changed it. To restore the default batching window, you must create a new event source mapping.</p> <p>Related setting: For streams and Amazon SQS event sources, when you set <code>BatchSize</code> to a value greater than 10, you must set <code>MaximumBatchingWindowInSeconds</code> to at least 1.</p> * @public */ MaximumBatchingWindowInSeconds?: number | undefined; /** * <p>(Kinesis and DynamoDB Streams only) The number of