@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,234 lines • 258 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LambdaFunction = exports.LambdaFunctionVpcConfigOutputReference = exports.lambdaFunctionVpcConfigToHclTerraform = exports.lambdaFunctionVpcConfigToTerraform = exports.LambdaFunctionTracingConfigOutputReference = exports.lambdaFunctionTracingConfigToHclTerraform = exports.lambdaFunctionTracingConfigToTerraform = exports.LambdaFunctionTimeoutsOutputReference = exports.lambdaFunctionTimeoutsToHclTerraform = exports.lambdaFunctionTimeoutsToTerraform = exports.LambdaFunctionSnapStartOutputReference = exports.lambdaFunctionSnapStartToHclTerraform = exports.lambdaFunctionSnapStartToTerraform = exports.LambdaFunctionLoggingConfigOutputReference = exports.lambdaFunctionLoggingConfigToHclTerraform = exports.lambdaFunctionLoggingConfigToTerraform = exports.LambdaFunctionImageConfigOutputReference = exports.lambdaFunctionImageConfigToHclTerraform = exports.lambdaFunctionImageConfigToTerraform = exports.LambdaFunctionFileSystemConfigOutputReference = exports.lambdaFunctionFileSystemConfigToHclTerraform = exports.lambdaFunctionFileSystemConfigToTerraform = exports.LambdaFunctionEphemeralStorageOutputReference = exports.lambdaFunctionEphemeralStorageToHclTerraform = exports.lambdaFunctionEphemeralStorageToTerraform = exports.LambdaFunctionEnvironmentOutputReference = exports.lambdaFunctionEnvironmentToHclTerraform = exports.lambdaFunctionEnvironmentToTerraform = exports.LambdaFunctionDeadLetterConfigOutputReference = exports.lambdaFunctionDeadLetterConfigToHclTerraform = exports.lambdaFunctionDeadLetterConfigToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function lambdaFunctionDeadLetterConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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),
};
}
exports.lambdaFunctionDeadLetterConfigToTerraform = lambdaFunctionDeadLetterConfigToTerraform;
function lambdaFunctionDeadLetterConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
target_arn: {
value: cdktf.stringToHclTerraform(struct.targetArn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionDeadLetterConfigToHclTerraform = lambdaFunctionDeadLetterConfigToHclTerraform;
class LambdaFunctionDeadLetterConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._targetArn !== undefined) {
hasAnyValues = true;
internalValueResult.targetArn = this._targetArn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._targetArn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._targetArn = value.targetArn;
}
}
get targetArn() {
return this.getStringAttribute('target_arn');
}
set targetArn(value) {
this._targetArn = value;
}
// Temporarily expose input value. Use with caution.
get targetArnInput() {
return this._targetArn;
}
}
exports.LambdaFunctionDeadLetterConfigOutputReference = LambdaFunctionDeadLetterConfigOutputReference;
_a = JSII_RTTI_SYMBOL_1;
LambdaFunctionDeadLetterConfigOutputReference[_a] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionDeadLetterConfigOutputReference", version: "19.50.0" };
function lambdaFunctionEnvironmentToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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.stringToTerraform)(struct.variables),
};
}
exports.lambdaFunctionEnvironmentToTerraform = lambdaFunctionEnvironmentToTerraform;
function lambdaFunctionEnvironmentToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
variables: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.variables),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionEnvironmentToHclTerraform = lambdaFunctionEnvironmentToHclTerraform;
class LambdaFunctionEnvironmentOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._variables !== undefined) {
hasAnyValues = true;
internalValueResult.variables = this._variables;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._variables = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._variables = value.variables;
}
}
get variables() {
return this.getStringMapAttribute('variables');
}
set variables(value) {
this._variables = value;
}
resetVariables() {
this._variables = undefined;
}
// Temporarily expose input value. Use with caution.
get variablesInput() {
return this._variables;
}
}
exports.LambdaFunctionEnvironmentOutputReference = LambdaFunctionEnvironmentOutputReference;
_b = JSII_RTTI_SYMBOL_1;
LambdaFunctionEnvironmentOutputReference[_b] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionEnvironmentOutputReference", version: "19.50.0" };
function lambdaFunctionEphemeralStorageToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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 {
size: cdktf.numberToTerraform(struct.size),
};
}
exports.lambdaFunctionEphemeralStorageToTerraform = lambdaFunctionEphemeralStorageToTerraform;
function lambdaFunctionEphemeralStorageToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
size: {
value: cdktf.numberToHclTerraform(struct.size),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionEphemeralStorageToHclTerraform = lambdaFunctionEphemeralStorageToHclTerraform;
class LambdaFunctionEphemeralStorageOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._size !== undefined) {
hasAnyValues = true;
internalValueResult.size = this._size;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._size = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._size = value.size;
}
}
get size() {
return this.getNumberAttribute('size');
}
set size(value) {
this._size = value;
}
resetSize() {
this._size = undefined;
}
// Temporarily expose input value. Use with caution.
get sizeInput() {
return this._size;
}
}
exports.LambdaFunctionEphemeralStorageOutputReference = LambdaFunctionEphemeralStorageOutputReference;
_c = JSII_RTTI_SYMBOL_1;
LambdaFunctionEphemeralStorageOutputReference[_c] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionEphemeralStorageOutputReference", version: "19.50.0" };
function lambdaFunctionFileSystemConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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),
};
}
exports.lambdaFunctionFileSystemConfigToTerraform = lambdaFunctionFileSystemConfigToTerraform;
function lambdaFunctionFileSystemConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
arn: {
value: cdktf.stringToHclTerraform(struct.arn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
local_mount_path: {
value: cdktf.stringToHclTerraform(struct.localMountPath),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionFileSystemConfigToHclTerraform = lambdaFunctionFileSystemConfigToHclTerraform;
class LambdaFunctionFileSystemConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._arn !== undefined) {
hasAnyValues = true;
internalValueResult.arn = this._arn;
}
if (this._localMountPath !== undefined) {
hasAnyValues = true;
internalValueResult.localMountPath = this._localMountPath;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
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;
}
}
get arn() {
return this.getStringAttribute('arn');
}
set arn(value) {
this._arn = value;
}
// Temporarily expose input value. Use with caution.
get arnInput() {
return this._arn;
}
get localMountPath() {
return this.getStringAttribute('local_mount_path');
}
set localMountPath(value) {
this._localMountPath = value;
}
// Temporarily expose input value. Use with caution.
get localMountPathInput() {
return this._localMountPath;
}
}
exports.LambdaFunctionFileSystemConfigOutputReference = LambdaFunctionFileSystemConfigOutputReference;
_d = JSII_RTTI_SYMBOL_1;
LambdaFunctionFileSystemConfigOutputReference[_d] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionFileSystemConfigOutputReference", version: "19.50.0" };
function lambdaFunctionImageConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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, false)(struct.command),
entry_point: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.entryPoint),
working_directory: cdktf.stringToTerraform(struct.workingDirectory),
};
}
exports.lambdaFunctionImageConfigToTerraform = lambdaFunctionImageConfigToTerraform;
function lambdaFunctionImageConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
command: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.command),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
entry_point: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.entryPoint),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
working_directory: {
value: cdktf.stringToHclTerraform(struct.workingDirectory),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionImageConfigToHclTerraform = lambdaFunctionImageConfigToHclTerraform;
class LambdaFunctionImageConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
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;
}
set internalValue(value) {
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;
}
}
get command() {
return this.getListAttribute('command');
}
set command(value) {
this._command = value;
}
resetCommand() {
this._command = undefined;
}
// Temporarily expose input value. Use with caution.
get commandInput() {
return this._command;
}
get entryPoint() {
return this.getListAttribute('entry_point');
}
set entryPoint(value) {
this._entryPoint = value;
}
resetEntryPoint() {
this._entryPoint = undefined;
}
// Temporarily expose input value. Use with caution.
get entryPointInput() {
return this._entryPoint;
}
get workingDirectory() {
return this.getStringAttribute('working_directory');
}
set workingDirectory(value) {
this._workingDirectory = value;
}
resetWorkingDirectory() {
this._workingDirectory = undefined;
}
// Temporarily expose input value. Use with caution.
get workingDirectoryInput() {
return this._workingDirectory;
}
}
exports.LambdaFunctionImageConfigOutputReference = LambdaFunctionImageConfigOutputReference;
_e = JSII_RTTI_SYMBOL_1;
LambdaFunctionImageConfigOutputReference[_e] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionImageConfigOutputReference", version: "19.50.0" };
function lambdaFunctionLoggingConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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 {
application_log_level: cdktf.stringToTerraform(struct.applicationLogLevel),
log_format: cdktf.stringToTerraform(struct.logFormat),
log_group: cdktf.stringToTerraform(struct.logGroup),
system_log_level: cdktf.stringToTerraform(struct.systemLogLevel),
};
}
exports.lambdaFunctionLoggingConfigToTerraform = lambdaFunctionLoggingConfigToTerraform;
function lambdaFunctionLoggingConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
application_log_level: {
value: cdktf.stringToHclTerraform(struct.applicationLogLevel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
log_format: {
value: cdktf.stringToHclTerraform(struct.logFormat),
isBlock: false,
type: "simple",
storageClassType: "string",
},
log_group: {
value: cdktf.stringToHclTerraform(struct.logGroup),
isBlock: false,
type: "simple",
storageClassType: "string",
},
system_log_level: {
value: cdktf.stringToHclTerraform(struct.systemLogLevel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionLoggingConfigToHclTerraform = lambdaFunctionLoggingConfigToHclTerraform;
class LambdaFunctionLoggingConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._applicationLogLevel !== undefined) {
hasAnyValues = true;
internalValueResult.applicationLogLevel = this._applicationLogLevel;
}
if (this._logFormat !== undefined) {
hasAnyValues = true;
internalValueResult.logFormat = this._logFormat;
}
if (this._logGroup !== undefined) {
hasAnyValues = true;
internalValueResult.logGroup = this._logGroup;
}
if (this._systemLogLevel !== undefined) {
hasAnyValues = true;
internalValueResult.systemLogLevel = this._systemLogLevel;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._applicationLogLevel = undefined;
this._logFormat = undefined;
this._logGroup = undefined;
this._systemLogLevel = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._applicationLogLevel = value.applicationLogLevel;
this._logFormat = value.logFormat;
this._logGroup = value.logGroup;
this._systemLogLevel = value.systemLogLevel;
}
}
get applicationLogLevel() {
return this.getStringAttribute('application_log_level');
}
set applicationLogLevel(value) {
this._applicationLogLevel = value;
}
resetApplicationLogLevel() {
this._applicationLogLevel = undefined;
}
// Temporarily expose input value. Use with caution.
get applicationLogLevelInput() {
return this._applicationLogLevel;
}
get logFormat() {
return this.getStringAttribute('log_format');
}
set logFormat(value) {
this._logFormat = value;
}
// Temporarily expose input value. Use with caution.
get logFormatInput() {
return this._logFormat;
}
get logGroup() {
return this.getStringAttribute('log_group');
}
set logGroup(value) {
this._logGroup = value;
}
resetLogGroup() {
this._logGroup = undefined;
}
// Temporarily expose input value. Use with caution.
get logGroupInput() {
return this._logGroup;
}
get systemLogLevel() {
return this.getStringAttribute('system_log_level');
}
set systemLogLevel(value) {
this._systemLogLevel = value;
}
resetSystemLogLevel() {
this._systemLogLevel = undefined;
}
// Temporarily expose input value. Use with caution.
get systemLogLevelInput() {
return this._systemLogLevel;
}
}
exports.LambdaFunctionLoggingConfigOutputReference = LambdaFunctionLoggingConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
LambdaFunctionLoggingConfigOutputReference[_f] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionLoggingConfigOutputReference", version: "19.50.0" };
function lambdaFunctionSnapStartToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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 {
apply_on: cdktf.stringToTerraform(struct.applyOn),
};
}
exports.lambdaFunctionSnapStartToTerraform = lambdaFunctionSnapStartToTerraform;
function lambdaFunctionSnapStartToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
apply_on: {
value: cdktf.stringToHclTerraform(struct.applyOn),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionSnapStartToHclTerraform = lambdaFunctionSnapStartToHclTerraform;
class LambdaFunctionSnapStartOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._applyOn !== undefined) {
hasAnyValues = true;
internalValueResult.applyOn = this._applyOn;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._applyOn = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._applyOn = value.applyOn;
}
}
get applyOn() {
return this.getStringAttribute('apply_on');
}
set applyOn(value) {
this._applyOn = value;
}
// Temporarily expose input value. Use with caution.
get applyOnInput() {
return this._applyOn;
}
// optimization_status - computed: true, optional: false, required: false
get optimizationStatus() {
return this.getStringAttribute('optimization_status');
}
}
exports.LambdaFunctionSnapStartOutputReference = LambdaFunctionSnapStartOutputReference;
_g = JSII_RTTI_SYMBOL_1;
LambdaFunctionSnapStartOutputReference[_g] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionSnapStartOutputReference", version: "19.50.0" };
function lambdaFunctionTimeoutsToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.lambdaFunctionTimeoutsToTerraform = lambdaFunctionTimeoutsToTerraform;
function lambdaFunctionTimeoutsToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionTimeoutsToHclTerraform = lambdaFunctionTimeoutsToHclTerraform;
class LambdaFunctionTimeoutsOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false);
this.isEmptyObject = false;
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._create !== undefined) {
hasAnyValues = true;
internalValueResult.create = this._create;
}
if (this._delete !== undefined) {
hasAnyValues = true;
internalValueResult.delete = this._delete;
}
if (this._update !== undefined) {
hasAnyValues = true;
internalValueResult.update = this._update;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = undefined;
this._update = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._create = value.create;
this._delete = value.delete;
this._update = value.update;
}
}
get create() {
return this.getStringAttribute('create');
}
set create(value) {
this._create = value;
}
resetCreate() {
this._create = undefined;
}
// Temporarily expose input value. Use with caution.
get createInput() {
return this._create;
}
get delete() {
return this.getStringAttribute('delete');
}
set delete(value) {
this._delete = value;
}
resetDelete() {
this._delete = undefined;
}
// Temporarily expose input value. Use with caution.
get deleteInput() {
return this._delete;
}
get update() {
return this.getStringAttribute('update');
}
set update(value) {
this._update = value;
}
resetUpdate() {
this._update = undefined;
}
// Temporarily expose input value. Use with caution.
get updateInput() {
return this._update;
}
}
exports.LambdaFunctionTimeoutsOutputReference = LambdaFunctionTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
LambdaFunctionTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionTimeoutsOutputReference", version: "19.50.0" };
function lambdaFunctionTracingConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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),
};
}
exports.lambdaFunctionTracingConfigToTerraform = lambdaFunctionTracingConfigToTerraform;
function lambdaFunctionTracingConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
mode: {
value: cdktf.stringToHclTerraform(struct.mode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionTracingConfigToHclTerraform = lambdaFunctionTracingConfigToHclTerraform;
class LambdaFunctionTracingConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._mode !== undefined) {
hasAnyValues = true;
internalValueResult.mode = this._mode;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._mode = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._mode = value.mode;
}
}
get mode() {
return this.getStringAttribute('mode');
}
set mode(value) {
this._mode = value;
}
// Temporarily expose input value. Use with caution.
get modeInput() {
return this._mode;
}
}
exports.LambdaFunctionTracingConfigOutputReference = LambdaFunctionTracingConfigOutputReference;
_j = JSII_RTTI_SYMBOL_1;
LambdaFunctionTracingConfigOutputReference[_j] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionTracingConfigOutputReference", version: "19.50.0" };
function lambdaFunctionVpcConfigToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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 {
ipv6_allowed_for_dual_stack: cdktf.booleanToTerraform(struct.ipv6AllowedForDualStack),
security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds),
subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds),
};
}
exports.lambdaFunctionVpcConfigToTerraform = lambdaFunctionVpcConfigToTerraform;
function lambdaFunctionVpcConfigToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(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");
}
const attrs = {
ipv6_allowed_for_dual_stack: {
value: cdktf.booleanToHclTerraform(struct.ipv6AllowedForDualStack),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
security_group_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
subnet_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnetIds),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.lambdaFunctionVpcConfigToHclTerraform = lambdaFunctionVpcConfigToHclTerraform;
class LambdaFunctionVpcConfigOutputReference extends cdktf.ComplexObject {
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
*/
constructor(terraformResource, terraformAttribute) {
super(terraformResource, terraformAttribute, false, 0);
this.isEmptyObject = false;
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._ipv6AllowedForDualStack !== undefined) {
hasAnyValues = true;
internalValueResult.ipv6AllowedForDualStack = this._ipv6AllowedForDualStack;
}
if (this._securityGroupIds !== undefined) {
hasAnyValues = true;
internalValueResult.securityGroupIds = this._securityGroupIds;
}
if (this._subnetIds !== undefined) {
hasAnyValues = true;
internalValueResult.subnetIds = this._subnetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._ipv6AllowedForDualStack = undefined;
this._securityGroupIds = undefined;
this._subnetIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._ipv6AllowedForDualStack = value.ipv6AllowedForDualStack;
this._securityGroupIds = value.securityGroupIds;
this._subnetIds = value.subnetIds;
}
}
get ipv6AllowedForDualStack() {
return this.getBooleanAttribute('ipv6_allowed_for_dual_stack');
}
set ipv6AllowedForDualStack(value) {
this._ipv6AllowedForDualStack = value;
}
resetIpv6AllowedForDualStack() {
this._ipv6AllowedForDualStack = undefined;
}
// Temporarily expose input value. Use with caution.
get ipv6AllowedForDualStackInput() {
return this._ipv6AllowedForDualStack;
}
get securityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('security_group_ids'));
}
set securityGroupIds(value) {
this._securityGroupIds = value;
}
// Temporarily expose input value. Use with caution.
get securityGroupIdsInput() {
return this._securityGroupIds;
}
get subnetIds() {
return cdktf.Fn.tolist(this.getListAttribute('subnet_ids'));
}
set subnetIds(value) {
this._subnetIds = value;
}
// Temporarily expose input value. Use with caution.
get subnetIdsInput() {
return this._subnetIds;
}
// vpc_id - computed: true, optional: false, required: false
get vpcId() {
return this.getStringAttribute('vpc_id');
}
}
exports.LambdaFunctionVpcConfigOutputReference = LambdaFunctionVpcConfigOutputReference;
_k = JSII_RTTI_SYMBOL_1;
LambdaFunctionVpcConfigOutputReference[_k] = { fqn: "@cdktf/provider-aws.lambdaFunction.LambdaFunctionVpcConfigOutputReference", version: "19.50.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lambda_function aws_lambda_function}
*/
class LambdaFunction extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a LambdaFunction resource upon running "cdktf plan <stack-name>"
* @param scope The scope in which to define this construct
* @param importToId The construct id used in the generated config for the LambdaFunction to import
* @param importFromId The id of the existing LambdaFunction that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lambda_function#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the LambdaFunction to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_lambda_function", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/lambda_function 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
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'aws_lambda_function',
terraformGeneratorMetadata: {
providerName: 'aws',
providerVersion: '5.84.0',
providerVersionConstraint: '~> 5.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// dead_letter_config - computed: false, optional: true, required: false
this._deadLetterConfig = new LambdaFunctionDeadLetterConfigOutputReference(this, "dead_letter_config");
// environment - computed: false, optional: true, required: false
this._environment = new LambdaFunctionEnvironmentOutputReference(this, "environment");
// ephemeral_storage - computed: false, optional: true, required: false
this._ephemeralStorage = new LambdaFunctionEphemeralStorageOutputReference(this, "ephemeral_storage");
// file_system_config - computed: false, optional: true, required: false
this._fileSystemConfig = new LambdaFunctionFileSystemConfigOutputReference(this, "file_system_config");
// image_config - computed: false, optional: true, required: false
this._imageConfig = new LambdaFunctionImageConfigOutputReference(this, "image_config");
// logging_config - computed: false, optional: true, required: false
this._loggingConfig = new LambdaFunctionLoggingConfigOutputReference(this, "logging_config");
// snap_start - computed: false, optional: true, required: false
this._snapStart = new LambdaFunctionSnapStartOutputReference(this, "snap_start");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new LambdaFunctionTimeoutsOutputReference(this, "timeouts");
// tracing_config - computed: false, optional: true, required: false
this._tracingConfig = new LambdaFunctionTracingConfigOutputReference(this, "tracing_config");
// vpc_config - computed: false, optional: true, required: false
this._vpcConfig = new LambdaFunctionVpcConfigOutputReference(this, "vpc_config");
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._id = config.id;
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._replaceSecurityGroupsOnDestroy = config.replaceSecurityGroupsOnDestroy;
this._replacementSecurityGroupIds = config.replacementSecurityGroupIds;
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._skipDestroy = config.skipDestroy;
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._ephemeralStorage.internalValue = config.ephemeralStorage;
this._fileSystemConfig.internalValue = config.fileSystemConfig;
this._imageConfig.internalValue = config.imageConfig;
this._loggingConfig.internalValue = config.loggingConfig;
this._snapStart.internalValue = config.snapStart;
this._timeouts.internalValue = config.timeouts;
this._tracingConfig.internalValue = config.tracingConfig;
this._vpcConfig.internalValue = config.vpcConfig;
}
get architectures() {
return this.getListAttribute('architectures');
}
set architectures(value) {
this._architectures = value;
}
resetArchitectures() {
this._architectures = undefined;
}
// Temporarily expose input value. Use with caution.
get architecturesInput() {
return this._architectures;
}
// arn - computed: true, optional: false, required: false
get arn() {
return this.getStringAttribute('arn');
}
// code_sha256 - computed: true, optional: false, required: false
get codeSha256() {
return this.getStringAttribute('code_sha256');
}
get codeSigningConfigArn() {
return this.getStringAttribute('code_signing_config_arn');
}
set codeSigningConfigArn(value) {
this._codeSigningConfigArn = value;
}
resetCodeSigningConfigArn() {
this._codeSigningConfigArn = undefined;
}
// Temporarily expose input value. Use with caution.
get codeSigningConfigArnInput() {
return this._codeSigningConfigArn;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get filename() {
return this.getStringAttribute('filename');
}
set filename(value) {
this._filename = value;
}
resetFilename() {
this._filename = undefined;
}
// Temporarily expose input value. Use with caution.
get filenameInput() {
return this._filename;
}
get functionName() {
return this.getStringAttribute('function_name');
}
set functionName(value) {
this._functionName = value;
}
// Temporarily expose input value. Use with caution.
get functionNameInput() {
return this._functionName;
}
get handler() {
return this.getStringAttribute('handler');
}
set handler(value) {
this._handler = value;
}
resetHandler() {
this._handler = undefined;
}
// Temporarily expose input value. Use with caution.
get handlerInput() {
return this._handler;
}
get id() {
return this.getStringAttribute('id');
}
set id(value) {
this._id = value;
}
resetId() {
this._id = undefined;
}
// Temporarily expose input value. Use with caution.
get idInput() {
return this._id;
}
get imageUri() {
return this.getStringAttribute('image_uri');
}
set imageUri(value) {
this._imageUri = value;
}
resetImageUri() {
this._imageUri = undefined;
}
// Temporarily expose input value. Use with caution.
get imageUriInput() {
return this._imageUri;
}
// invoke_arn - computed: true, optional: false, required: false
get invokeArn() {
return this.getStringAttribute('invoke_arn');
}
get kmsKeyArn() {
return t