// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS Lambda */ export interface LambdaFunctionConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#architectures LambdaFunction#architectures} */ readonly architectures?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#code_signing_config_arn LambdaFunction#code_signing_config_arn} */ readonly codeSigningConfigArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#description LambdaFunction#description} */ readonly description?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#filename LambdaFunction#filename} */ readonly filename?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#function_name LambdaFunction#function_name} */ readonly functionName: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#handler LambdaFunction#handler} */ readonly handler?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#image_uri LambdaFunction#image_uri} */ readonly imageUri?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#kms_key_arn LambdaFunction#kms_key_arn} */ readonly kmsKeyArn?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#layers LambdaFunction#layers} */ readonly layers?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#memory_size LambdaFunction#memory_size} */ readonly memorySize?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#package_type LambdaFunction#package_type} */ readonly packageType?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#publish LambdaFunction#publish} */ readonly publish?: boolean | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#reserved_concurrent_executions LambdaFunction#reserved_concurrent_executions} */ readonly reservedConcurrentExecutions?: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#role LambdaFunction#role} */ readonly role: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#runtime LambdaFunction#runtime} */ readonly runtime?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#s3_bucket LambdaFunction#s3_bucket} */ readonly s3Bucket?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#s3_key LambdaFunction#s3_key} */ readonly s3Key?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#s3_object_version LambdaFunction#s3_object_version} */ readonly s3ObjectVersion?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#source_code_hash LambdaFunction#source_code_hash} */ readonly sourceCodeHash?: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#tags LambdaFunction#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#tags_all LambdaFunction#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#timeout LambdaFunction#timeout} */ readonly timeout?: number; /** * dead_letter_config block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#dead_letter_config LambdaFunction#dead_letter_config} */ readonly deadLetterConfig?: LambdaFunctionDeadLetterConfig; /** * environment block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#environment LambdaFunction#environment} */ readonly environment?: LambdaFunctionEnvironment; /** * file_system_config block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#file_system_config LambdaFunction#file_system_config} */ readonly fileSystemConfig?: LambdaFunctionFileSystemConfig; /** * image_config block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#image_config LambdaFunction#image_config} */ readonly imageConfig?: LambdaFunctionImageConfig; /** * timeouts block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#timeouts LambdaFunction#timeouts} */ readonly timeouts?: LambdaFunctionTimeouts; /** * tracing_config block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#tracing_config LambdaFunction#tracing_config} */ readonly tracingConfig?: LambdaFunctionTracingConfig; /** * vpc_config block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#vpc_config LambdaFunction#vpc_config} */ readonly vpcConfig?: LambdaFunctionVpcConfig; } export interface LambdaFunctionDeadLetterConfig { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#target_arn LambdaFunction#target_arn} */ readonly targetArn: string; } export function lambdaFunctionDeadLetterConfigToTerraform(struct?: LambdaFunctionDeadLetterConfigOutputReference | LambdaFunctionDeadLetterConfig): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { target_arn: cdktf.stringToTerraform(struct!.targetArn), } } export class LambdaFunctionDeadLetterConfigOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionDeadLetterConfig | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._targetArn !== undefined) { hasAnyValues = true; internalValueResult.targetArn = this._targetArn; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionDeadLetterConfig | undefined) { if (value === undefined) { this.isEmptyObject = false; this._targetArn = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._targetArn = value.targetArn; } } // target_arn - computed: false, optional: false, required: true private _targetArn?: string; public get targetArn() { return this.getStringAttribute('target_arn'); } public set targetArn(value: string) { this._targetArn = value; } // Temporarily expose input value. Use with caution. public get targetArnInput() { return this._targetArn; } } export interface LambdaFunctionEnvironment { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#variables LambdaFunction#variables} */ readonly variables?: { [key: string]: string } | cdktf.IResolvable; } export function lambdaFunctionEnvironmentToTerraform(struct?: LambdaFunctionEnvironmentOutputReference | LambdaFunctionEnvironment): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { variables: cdktf.hashMapper(cdktf.anyToTerraform)(struct!.variables), } } export class LambdaFunctionEnvironmentOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionEnvironment | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._variables !== undefined) { hasAnyValues = true; internalValueResult.variables = this._variables; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionEnvironment | undefined) { if (value === undefined) { this.isEmptyObject = false; this._variables = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._variables = value.variables; } } // variables - computed: false, optional: true, required: false private _variables?: { [key: string]: string } | cdktf.IResolvable; public get variables() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('variables') as any; } public set variables(value: { [key: string]: string } | cdktf.IResolvable) { this._variables = value; } public resetVariables() { this._variables = undefined; } // Temporarily expose input value. Use with caution. public get variablesInput() { return this._variables; } } export interface LambdaFunctionFileSystemConfig { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#arn LambdaFunction#arn} */ readonly arn: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#local_mount_path LambdaFunction#local_mount_path} */ readonly localMountPath: string; } export function lambdaFunctionFileSystemConfigToTerraform(struct?: LambdaFunctionFileSystemConfigOutputReference | LambdaFunctionFileSystemConfig): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { arn: cdktf.stringToTerraform(struct!.arn), local_mount_path: cdktf.stringToTerraform(struct!.localMountPath), } } export class LambdaFunctionFileSystemConfigOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionFileSystemConfig | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._arn !== undefined) { hasAnyValues = true; internalValueResult.arn = this._arn; } if (this._localMountPath !== undefined) { hasAnyValues = true; internalValueResult.localMountPath = this._localMountPath; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionFileSystemConfig | undefined) { if (value === undefined) { this.isEmptyObject = false; this._arn = undefined; this._localMountPath = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._arn = value.arn; this._localMountPath = value.localMountPath; } } // arn - computed: false, optional: false, required: true private _arn?: string; public get arn() { return this.getStringAttribute('arn'); } public set arn(value: string) { this._arn = value; } // Temporarily expose input value. Use with caution. public get arnInput() { return this._arn; } // local_mount_path - computed: false, optional: false, required: true private _localMountPath?: string; public get localMountPath() { return this.getStringAttribute('local_mount_path'); } public set localMountPath(value: string) { this._localMountPath = value; } // Temporarily expose input value. Use with caution. public get localMountPathInput() { return this._localMountPath; } } export interface LambdaFunctionImageConfig { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#command LambdaFunction#command} */ readonly command?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#entry_point LambdaFunction#entry_point} */ readonly entryPoint?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#working_directory LambdaFunction#working_directory} */ readonly workingDirectory?: string; } export function lambdaFunctionImageConfigToTerraform(struct?: LambdaFunctionImageConfigOutputReference | LambdaFunctionImageConfig): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { command: cdktf.listMapper(cdktf.stringToTerraform)(struct!.command), entry_point: cdktf.listMapper(cdktf.stringToTerraform)(struct!.entryPoint), working_directory: cdktf.stringToTerraform(struct!.workingDirectory), } } export class LambdaFunctionImageConfigOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionImageConfig | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._command !== undefined) { hasAnyValues = true; internalValueResult.command = this._command; } if (this._entryPoint !== undefined) { hasAnyValues = true; internalValueResult.entryPoint = this._entryPoint; } if (this._workingDirectory !== undefined) { hasAnyValues = true; internalValueResult.workingDirectory = this._workingDirectory; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionImageConfig | undefined) { if (value === undefined) { this.isEmptyObject = false; this._command = undefined; this._entryPoint = undefined; this._workingDirectory = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._command = value.command; this._entryPoint = value.entryPoint; this._workingDirectory = value.workingDirectory; } } // command - computed: false, optional: true, required: false private _command?: string[]; public get command() { return this.getListAttribute('command'); } public set command(value: string[]) { this._command = value; } public resetCommand() { this._command = undefined; } // Temporarily expose input value. Use with caution. public get commandInput() { return this._command; } // entry_point - computed: false, optional: true, required: false private _entryPoint?: string[]; public get entryPoint() { return this.getListAttribute('entry_point'); } public set entryPoint(value: string[]) { this._entryPoint = value; } public resetEntryPoint() { this._entryPoint = undefined; } // Temporarily expose input value. Use with caution. public get entryPointInput() { return this._entryPoint; } // working_directory - computed: false, optional: true, required: false private _workingDirectory?: string; public get workingDirectory() { return this.getStringAttribute('working_directory'); } public set workingDirectory(value: string) { this._workingDirectory = value; } public resetWorkingDirectory() { this._workingDirectory = undefined; } // Temporarily expose input value. Use with caution. public get workingDirectoryInput() { return this._workingDirectory; } } export interface LambdaFunctionTimeouts { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#create LambdaFunction#create} */ readonly create?: string; } export function lambdaFunctionTimeoutsToTerraform(struct?: LambdaFunctionTimeoutsOutputReference | LambdaFunctionTimeouts): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct!.create), } } export class LambdaFunctionTimeoutsOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionTimeouts | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionTimeouts | undefined) { if (value === undefined) { this.isEmptyObject = false; this._create = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._create = value.create; } } // create - computed: false, optional: true, required: false private _create?: string; public get create() { return this.getStringAttribute('create'); } public set create(value: string) { this._create = value; } public resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. public get createInput() { return this._create; } } export interface LambdaFunctionTracingConfig { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#mode LambdaFunction#mode} */ readonly mode: string; } export function lambdaFunctionTracingConfigToTerraform(struct?: LambdaFunctionTracingConfigOutputReference | LambdaFunctionTracingConfig): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { mode: cdktf.stringToTerraform(struct!.mode), } } export class LambdaFunctionTracingConfigOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionTracingConfig | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._mode !== undefined) { hasAnyValues = true; internalValueResult.mode = this._mode; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionTracingConfig | undefined) { if (value === undefined) { this.isEmptyObject = false; this._mode = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._mode = value.mode; } } // mode - computed: false, optional: false, required: true private _mode?: string; public get mode() { return this.getStringAttribute('mode'); } public set mode(value: string) { this._mode = value; } // Temporarily expose input value. Use with caution. public get modeInput() { return this._mode; } } export interface LambdaFunctionVpcConfig { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#security_group_ids LambdaFunction#security_group_ids} */ readonly securityGroupIds: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html#subnet_ids LambdaFunction#subnet_ids} */ readonly subnetIds: string[]; } export function lambdaFunctionVpcConfigToTerraform(struct?: LambdaFunctionVpcConfigOutputReference | LambdaFunctionVpcConfig): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { security_group_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct!.securityGroupIds), subnet_ids: cdktf.listMapper(cdktf.stringToTerraform)(struct!.subnetIds), } } export class LambdaFunctionVpcConfigOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): LambdaFunctionVpcConfig | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._securityGroupIds !== undefined) { hasAnyValues = true; internalValueResult.securityGroupIds = this._securityGroupIds; } if (this._subnetIds !== undefined) { hasAnyValues = true; internalValueResult.subnetIds = this._subnetIds; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: LambdaFunctionVpcConfig | undefined) { if (value === undefined) { this.isEmptyObject = false; this._securityGroupIds = undefined; this._subnetIds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._securityGroupIds = value.securityGroupIds; this._subnetIds = value.subnetIds; } } // security_group_ids - computed: false, optional: false, required: true private _securityGroupIds?: string[]; public get securityGroupIds() { return this.getListAttribute('security_group_ids'); } public set securityGroupIds(value: string[]) { this._securityGroupIds = value; } // Temporarily expose input value. Use with caution. public get securityGroupIdsInput() { return this._securityGroupIds; } // subnet_ids - computed: false, optional: false, required: true private _subnetIds?: string[]; public get subnetIds() { return this.getListAttribute('subnet_ids'); } public set subnetIds(value: string[]) { this._subnetIds = value; } // Temporarily expose input value. Use with caution. public get subnetIdsInput() { return this._subnetIds; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html aws_lambda_function} */ export class LambdaFunction extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_lambda_function"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/lambda_function.html aws_lambda_function} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options LambdaFunctionConfig */ public constructor(scope: Construct, id: string, config: LambdaFunctionConfig) { super(scope, id, { terraformResourceType: 'aws_lambda_function', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._architectures = config.architectures; this._codeSigningConfigArn = config.codeSigningConfigArn; this._description = config.description; this._filename = config.filename; this._functionName = config.functionName; this._handler = config.handler; this._imageUri = config.imageUri; this._kmsKeyArn = config.kmsKeyArn; this._layers = config.layers; this._memorySize = config.memorySize; this._packageType = config.packageType; this._publish = config.publish; this._reservedConcurrentExecutions = config.reservedConcurrentExecutions; this._role = config.role; this._runtime = config.runtime; this._s3Bucket = config.s3Bucket; this._s3Key = config.s3Key; this._s3ObjectVersion = config.s3ObjectVersion; this._sourceCodeHash = config.sourceCodeHash; this._tags = config.tags; this._tagsAll = config.tagsAll; this._timeout = config.timeout; this._deadLetterConfig.internalValue = config.deadLetterConfig; this._environment.internalValue = config.environment; this._fileSystemConfig.internalValue = config.fileSystemConfig; this._imageConfig.internalValue = config.imageConfig; this._timeouts.internalValue = config.timeouts; this._tracingConfig.internalValue = config.tracingConfig; this._vpcConfig.internalValue = config.vpcConfig; } // ========== // ATTRIBUTES // ========== // architectures - computed: true, optional: true, required: false private _architectures?: string[]; public get architectures() { return this.getListAttribute('architectures'); } public set architectures(value: string[]) { this._architectures = value; } public resetArchitectures() { this._architectures = undefined; } // Temporarily expose input value. Use with caution. public get architecturesInput() { return this._architectures; } // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // code_signing_config_arn - computed: false, optional: true, required: false private _codeSigningConfigArn?: string; public get codeSigningConfigArn() { return this.getStringAttribute('code_signing_config_arn'); } public set codeSigningConfigArn(value: string) { this._codeSigningConfigArn = value; } public resetCodeSigningConfigArn() { this._codeSigningConfigArn = undefined; } // Temporarily expose input value. Use with caution. public get codeSigningConfigArnInput() { return this._codeSigningConfigArn; } // description - computed: false, optional: true, required: false private _description?: string; public get description() { return this.getStringAttribute('description'); } public set description(value: string) { this._description = value; } public resetDescription() { this._description = undefined; } // Temporarily expose input value. Use with caution. public get descriptionInput() { return this._description; } // filename - computed: false, optional: true, required: false private _filename?: string; public get filename() { return this.getStringAttribute('filename'); } public set filename(value: string) { this._filename = value; } public resetFilename() { this._filename = undefined; } // Temporarily expose input value. Use with caution. public get filenameInput() { return this._filename; } // function_name - computed: false, optional: false, required: true private _functionName?: string; public get functionName() { return this.getStringAttribute('function_name'); } public set functionName(value: string) { this._functionName = value; } // Temporarily expose input value. Use with caution. public get functionNameInput() { return this._functionName; } // handler - computed: false, optional: true, required: false private _handler?: string; public get handler() { return this.getStringAttribute('handler'); } public set handler(value: string) { this._handler = value; } public resetHandler() { this._handler = undefined; } // Temporarily expose input value. Use with caution. public get handlerInput() { return this._handler; } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // image_uri - computed: false, optional: true, required: false private _imageUri?: string; public get imageUri() { return this.getStringAttribute('image_uri'); } public set imageUri(value: string) { this._imageUri = value; } public resetImageUri() { this._imageUri = undefined; } // Temporarily expose input value. Use with caution. public get imageUriInput() { return this._imageUri; } // invoke_arn - computed: true, optional: false, required: false public get invokeArn() { return this.getStringAttribute('invoke_arn'); } // kms_key_arn - computed: false, optional: true, required: false private _kmsKeyArn?: string; public get kmsKeyArn() { return this.getStringAttribute('kms_key_arn'); } public set kmsKeyArn(value: string) { this._kmsKeyArn = value; } public resetKmsKeyArn() { this._kmsKeyArn = undefined; } // Temporarily expose input value. Use with caution. public get kmsKeyArnInput() { return this._kmsKeyArn; } // last_modified - computed: true, optional: false, required: false public get lastModified() { return this.getStringAttribute('last_modified'); } // layers - computed: false, optional: true, required: false private _layers?: string[]; public get layers() { return this.getListAttribute('layers'); } public set layers(value: string[]) { this._layers = value; } public resetLayers() { this._layers = undefined; } // Temporarily expose input value. Use with caution. public get layersInput() { return this._layers; } // memory_size - computed: false, optional: true, required: false private _memorySize?: number; public get memorySize() { return this.getNumberAttribute('memory_size'); } public set memorySize(value: number) { this._memorySize = value; } public resetMemorySize() { this._memorySize = undefined; } // Temporarily expose input value. Use with caution. public get memorySizeInput() { return this._memorySize; } // package_type - computed: false, optional: true, required: false private _packageType?: string; public get packageType() { return this.getStringAttribute('package_type'); } public set packageType(value: string) { this._packageType = value; } public resetPackageType() { this._packageType = undefined; } // Temporarily expose input value. Use with caution. public get packageTypeInput() { return this._packageType; } // publish - computed: false, optional: true, required: false private _publish?: boolean | cdktf.IResolvable; public get publish() { return this.getBooleanAttribute('publish') as any; } public set publish(value: boolean | cdktf.IResolvable) { this._publish = value; } public resetPublish() { this._publish = undefined; } // Temporarily expose input value. Use with caution. public get publishInput() { return this._publish; } // qualified_arn - computed: true, optional: false, required: false public get qualifiedArn() { return this.getStringAttribute('qualified_arn'); } // reserved_concurrent_executions - computed: false, optional: true, required: false private _reservedConcurrentExecutions?: number; public get reservedConcurrentExecutions() { return this.getNumberAttribute('reserved_concurrent_executions'); } public set reservedConcurrentExecutions(value: number) { this._reservedConcurrentExecutions = value; } public resetReservedConcurrentExecutions() { this._reservedConcurrentExecutions = undefined; } // Temporarily expose input value. Use with caution. public get reservedConcurrentExecutionsInput() { return this._reservedConcurrentExecutions; } // role - computed: false, optional: false, required: true private _role?: string; public get role() { return this.getStringAttribute('role'); } public set role(value: string) { this._role = value; } // Temporarily expose input value. Use with caution. public get roleInput() { return this._role; } // runtime - computed: false, optional: true, required: false private _runtime?: string; public get runtime() { return this.getStringAttribute('runtime'); } public set runtime(value: string) { this._runtime = value; } public resetRuntime() { this._runtime = undefined; } // Temporarily expose input value. Use with caution. public get runtimeInput() { return this._runtime; } // s3_bucket - computed: false, optional: true, required: false private _s3Bucket?: string; public get s3Bucket() { return this.getStringAttribute('s3_bucket'); } public set s3Bucket(value: string) { this._s3Bucket = value; } public resetS3Bucket() { this._s3Bucket = undefined; } // Temporarily expose input value. Use with caution. public get s3BucketInput() { return this._s3Bucket; } // s3_key - computed: false, optional: true, required: false private _s3Key?: string; public get s3Key() { return this.getStringAttribute('s3_key'); } public set s3Key(value: string) { this._s3Key = value; } public resetS3Key() { this._s3Key = undefined; } // Temporarily expose input value. Use with caution. public get s3KeyInput() { return this._s3Key; } // s3_object_version - computed: false, optional: true, required: false private _s3ObjectVersion?: string; public get s3ObjectVersion() { return this.getStringAttribute('s3_object_version'); } public set s3ObjectVersion(value: string) { this._s3ObjectVersion = value; } public resetS3ObjectVersion() { this._s3ObjectVersion = undefined; } // Temporarily expose input value. Use with caution. public get s3ObjectVersionInput() { return this._s3ObjectVersion; } // signing_job_arn - computed: true, optional: false, required: false public get signingJobArn() { return this.getStringAttribute('signing_job_arn'); } // signing_profile_version_arn - computed: true, optional: false, required: false public get signingProfileVersionArn() { return this.getStringAttribute('signing_profile_version_arn'); } // source_code_hash - computed: true, optional: true, required: false private _sourceCodeHash?: string; public get sourceCodeHash() { return this.getStringAttribute('source_code_hash'); } public set sourceCodeHash(value: string) { this._sourceCodeHash = value; } public resetSourceCodeHash() { this._sourceCodeHash = undefined; } // Temporarily expose input value. Use with caution. public get sourceCodeHashInput() { return this._sourceCodeHash; } // source_code_size - computed: true, optional: false, required: false public get sourceCodeSize() { return this.getNumberAttribute('source_code_size'); } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // timeout - computed: false, optional: true, required: false private _timeout?: number; public get timeout() { return this.getNumberAttribute('timeout'); } public set timeout(value: number) { this._timeout = value; } public resetTimeout() { this._timeout = undefined; } // Temporarily expose input value. Use with caution. public get timeoutInput() { return this._timeout; } // version - computed: true, optional: false, required: false public get version() { return this.getStringAttribute('version'); } // dead_letter_config - computed: false, optional: true, required: false private _deadLetterConfig = new LambdaFunctionDeadLetterConfigOutputReference(this as any, "dead_letter_config", true); public get deadLetterConfig() { return this._deadLetterConfig; } public putDeadLetterConfig(value: LambdaFunctionDeadLetterConfig) { this._deadLetterConfig.internalValue = value; } public resetDeadLetterConfig() { this._deadLetterConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get deadLetterConfigInput() { return this._deadLetterConfig.internalValue; } // environment - computed: false, optional: true, required: false private _environment = new LambdaFunctionEnvironmentOutputReference(this as any, "environment", true); public get environment() { return this._environment; } public putEnvironment(value: LambdaFunctionEnvironment) { this._environment.internalValue = value; } public resetEnvironment() { this._environment.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get environmentInput() { return this._environment.internalValue; } // file_system_config - computed: false, optional: true, required: false private _fileSystemConfig = new LambdaFunctionFileSystemConfigOutputReference(this as any, "file_system_config", true); public get fileSystemConfig() { return this._fileSystemConfig; } public putFileSystemConfig(value: LambdaFunctionFileSystemConfig) { this._fileSystemConfig.internalValue = value; } public resetFileSystemConfig() { this._fileSystemConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get fileSystemConfigInput() { return this._fileSystemConfig.internalValue; } // image_config - computed: false, optional: true, required: false private _imageConfig = new LambdaFunctionImageConfigOutputReference(this as any, "image_config", true); public get imageConfig() { return this._imageConfig; } public putImageConfig(value: LambdaFunctionImageConfig) { this._imageConfig.internalValue = value; } public resetImageConfig() { this._imageConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get imageConfigInput() { return this._imageConfig.internalValue; } // timeouts - computed: false, optional: true, required: false private _timeouts = new LambdaFunctionTimeoutsOutputReference(this as any, "timeouts", true); public get timeouts() { return this._timeouts; } public putTimeouts(value: LambdaFunctionTimeouts) { this._timeouts.internalValue = value; } public resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get timeoutsInput() { return this._timeouts.internalValue; } // tracing_config - computed: false, optional: true, required: false private _tracingConfig = new LambdaFunctionTracingConfigOutputReference(this as any, "tracing_config", true); public get tracingConfig() { return this._tracingConfig; } public putTracingConfig(value: LambdaFunctionTracingConfig) { this._tracingConfig.internalValue = value; } public resetTracingConfig() { this._tracingConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get tracingConfigInput() { return this._tracingConfig.internalValue; } // vpc_config - computed: false, optional: true, required: false private _vpcConfig = new LambdaFunctionVpcConfigOutputReference(this as any, "vpc_config", true); public get vpcConfig() { return this._vpcConfig; } public putVpcConfig(value: LambdaFunctionVpcConfig) { this._vpcConfig.internalValue = value; } public resetVpcConfig() { this._vpcConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. public get vpcConfigInput() { return this._vpcConfig.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { architectures: cdktf.listMapper(cdktf.stringToTerraform)(this._architectures), code_signing_config_arn: cdktf.stringToTerraform(this._codeSigningConfigArn), description: cdktf.stringToTerraform(this._description), filename: cdktf.stringToTerraform(this._filename), function_name: cdktf.stringToTerraform(this._functionName), handler: cdktf.stringToTerraform(this._handler), image_uri: cdktf.stringToTerraform(this._imageUri), kms_key_arn: cdktf.stringToTerraform(this._kmsKeyArn), layers: cdktf.listMapper(cdktf.stringToTerraform)(this._layers), memory_size: cdktf.numberToTerraform(this._memorySize), package_type: cdktf.stringToTerraform(this._packageType), publish: cdktf.booleanToTerraform(this._publish), reserved_concurrent_executions: cdktf.numberToTerraform(this._reservedConcurrentExecutions), role: cdktf.stringToTerraform(this._role), runtime: cdktf.stringToTerraform(this._runtime), s3_bucket: cdktf.stringToTerraform(this._s3Bucket), s3_key: cdktf.stringToTerraform(this._s3Key), s3_object_version: cdktf.stringToTerraform(this._s3ObjectVersion), source_code_hash: cdktf.stringToTerraform(this._sourceCodeHash), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), timeout: cdktf.numberToTerraform(this._timeout), dead_letter_config: lambdaFunctionDeadLetterConfigToTerraform(this._deadLetterConfig.internalValue), environment: lambdaFunctionEnvironmentToTerraform(this._environment.internalValue), file_system_config: lambdaFunctionFileSystemConfigToTerraform(this._fileSystemConfig.internalValue), image_config: lambdaFunctionImageConfigToTerraform(this._imageConfig.internalValue), timeouts: lambdaFunctionTimeoutsToTerraform(this._timeouts.internalValue), tracing_config: lambdaFunctionTracingConfigToTerraform(this._tracingConfig.internalValue), vpc_config: lambdaFunctionVpcConfigToTerraform(this._vpcConfig.internalValue), }; } }