import * as core from "@terrascript/core"; export interface OnFailureArgs extends core.SchemaArgs { destination: string | core.StringOut; } export class OnFailure extends core.Schema { @core.attr(String) public destination!: string | core.StringOut; } export interface OnSuccessArgs extends core.SchemaArgs { destination: string | core.StringOut; } export class OnSuccess extends core.Schema { @core.attr(String) public destination!: string | core.StringOut; } export interface DestinationConfigArgs extends core.SchemaArgs { onFailure?: OnFailure; onSuccess?: OnSuccess; } export class DestinationConfig extends core.Schema { @core.attr(OnFailure) public onFailure?: OnFailure; @core.attr(OnSuccess) public onSuccess?: OnSuccess; } export interface FunctionEventInvokeConfigArgs extends core.ResourceArgs { /** * (Optional) Configuration block with destination configuration. See below for details. */ destinationConfig?: DestinationConfig; /** * (Required) Name or Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias * qualifier. */ functionName: string | core.StringOut; /** * (Optional) Maximum age of a request that Lambda sends to a function for processing in seconds. Valid * values between 60 and 21600. */ maximumEventAgeInSeconds?: number | core.NumberOut; /** * (Optional) Maximum number of times to retry when the function returns an error. Valid values between * 0 and 2. Defaults to 2. */ maximumRetryAttempts?: number | core.NumberOut; /** * (Optional) Lambda Function published version, `$LATEST`, or Lambda Alias name. */ qualifier?: string | core.StringOut; } export class FunctionEventInvokeConfig extends core.Resource { /** * (Optional) Configuration block with destination configuration. See below for details. */ @core.attr(DestinationConfig) public destinationConfig?: DestinationConfig; /** * (Required) Name or Amazon Resource Name (ARN) of the Lambda Function, omitting any version or alias * qualifier. */ @core.attr(String) public functionName!: string | core.StringOut; /** * Fully qualified Lambda Function name or Amazon Resource Name (ARN) */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) Maximum age of a request that Lambda sends to a function for processing in seconds. Valid * values between 60 and 21600. */ @core.attr(Number) public maximumEventAgeInSeconds?: number | core.NumberOut; /** * (Optional) Maximum number of times to retry when the function returns an error. Valid values between * 0 and 2. Defaults to 2. */ @core.attr(Number) public maximumRetryAttempts?: number | core.NumberOut; /** * (Optional) Lambda Function published version, `$LATEST`, or Lambda Alias name. */ @core.attr(String) public qualifier?: string | core.StringOut; constructor(name: string, args?: FunctionEventInvokeConfigArgs) { super(name, "aws_lambda_function_event_invoke_config", args); } public override getNamespace(): string { return "aws_lambda"; } }