UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,111 lines 164 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; Object.defineProperty(exports, "__esModule", { value: true }); exports.LambdaCapacityProvider = exports.LambdaCapacityProviderVpcConfigList = exports.LambdaCapacityProviderVpcConfigOutputReference = exports.LambdaCapacityProviderTimeoutsOutputReference = exports.LambdaCapacityProviderPermissionsConfigList = exports.LambdaCapacityProviderPermissionsConfigOutputReference = exports.LambdaCapacityProviderInstanceRequirementsList = exports.LambdaCapacityProviderInstanceRequirementsOutputReference = exports.LambdaCapacityProviderCapacityProviderScalingConfigList = exports.LambdaCapacityProviderCapacityProviderScalingConfigOutputReference = exports.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList = exports.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference = void 0; exports.lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToTerraform = lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToTerraform; exports.lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToHclTerraform = lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToHclTerraform; exports.lambdaCapacityProviderCapacityProviderScalingConfigToTerraform = lambdaCapacityProviderCapacityProviderScalingConfigToTerraform; exports.lambdaCapacityProviderCapacityProviderScalingConfigToHclTerraform = lambdaCapacityProviderCapacityProviderScalingConfigToHclTerraform; exports.lambdaCapacityProviderInstanceRequirementsToTerraform = lambdaCapacityProviderInstanceRequirementsToTerraform; exports.lambdaCapacityProviderInstanceRequirementsToHclTerraform = lambdaCapacityProviderInstanceRequirementsToHclTerraform; exports.lambdaCapacityProviderPermissionsConfigToTerraform = lambdaCapacityProviderPermissionsConfigToTerraform; exports.lambdaCapacityProviderPermissionsConfigToHclTerraform = lambdaCapacityProviderPermissionsConfigToHclTerraform; exports.lambdaCapacityProviderTimeoutsToTerraform = lambdaCapacityProviderTimeoutsToTerraform; exports.lambdaCapacityProviderTimeoutsToHclTerraform = lambdaCapacityProviderTimeoutsToHclTerraform; exports.lambdaCapacityProviderVpcConfigToTerraform = lambdaCapacityProviderVpcConfigToTerraform; exports.lambdaCapacityProviderVpcConfigToHclTerraform = lambdaCapacityProviderVpcConfigToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToTerraform(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 { predefined_metric_type: cdktf.stringToTerraform(struct.predefinedMetricType), target_value: cdktf.numberToTerraform(struct.targetValue), }; } function lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToHclTerraform(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 = { predefined_metric_type: { value: cdktf.stringToHclTerraform(struct.predefinedMetricType), isBlock: false, type: "simple", storageClassType: "string", }, target_value: { value: cdktf.numberToHclTerraform(struct.targetValue), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._predefinedMetricType !== undefined) { hasAnyValues = true; internalValueResult.predefinedMetricType = this._predefinedMetricType; } if (this._targetValue !== undefined) { hasAnyValues = true; internalValueResult.targetValue = this._targetValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._predefinedMetricType = undefined; this._targetValue = 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._predefinedMetricType = value.predefinedMetricType; this._targetValue = value.targetValue; } } get predefinedMetricType() { return this.getStringAttribute('predefined_metric_type'); } set predefinedMetricType(value) { this._predefinedMetricType = value; } resetPredefinedMetricType() { this._predefinedMetricType = undefined; } // Temporarily expose input value. Use with caution. get predefinedMetricTypeInput() { return this._predefinedMetricType; } get targetValue() { return this.getNumberAttribute('target_value'); } set targetValue(value) { this._targetValue = value; } resetTargetValue() { this._targetValue = undefined; } // Temporarily expose input value. Use with caution. get targetValueInput() { return this._targetValue; } } exports.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference = LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference; _a = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference[_a] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference", version: "21.22.1" }; class LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList = LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList; _b = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList[_b] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList", version: "21.22.1" }; function lambdaCapacityProviderCapacityProviderScalingConfigToTerraform(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 { max_vcpu_count: cdktf.numberToTerraform(struct.maxVcpuCount), scaling_mode: cdktf.stringToTerraform(struct.scalingMode), scaling_policies: cdktf.listMapper(lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToTerraform, false)(struct.scalingPolicies), }; } function lambdaCapacityProviderCapacityProviderScalingConfigToHclTerraform(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 = { max_vcpu_count: { value: cdktf.numberToHclTerraform(struct.maxVcpuCount), isBlock: false, type: "simple", storageClassType: "number", }, scaling_mode: { value: cdktf.stringToHclTerraform(struct.scalingMode), isBlock: false, type: "simple", storageClassType: "string", }, scaling_policies: { value: cdktf.listMapperHcl(lambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesToHclTerraform, false)(struct.scalingPolicies), isBlock: true, type: "list", storageClassType: "LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LambdaCapacityProviderCapacityProviderScalingConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; // scaling_policies - computed: true, optional: true, required: false this._scalingPolicies = new LambdaCapacityProviderCapacityProviderScalingConfigScalingPoliciesList(this, "scaling_policies", false); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._maxVcpuCount !== undefined) { hasAnyValues = true; internalValueResult.maxVcpuCount = this._maxVcpuCount; } if (this._scalingMode !== undefined) { hasAnyValues = true; internalValueResult.scalingMode = this._scalingMode; } if (this._scalingPolicies?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.scalingPolicies = this._scalingPolicies?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._maxVcpuCount = undefined; this._scalingMode = undefined; this._scalingPolicies.internalValue = 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._maxVcpuCount = value.maxVcpuCount; this._scalingMode = value.scalingMode; this._scalingPolicies.internalValue = value.scalingPolicies; } } get maxVcpuCount() { return this.getNumberAttribute('max_vcpu_count'); } set maxVcpuCount(value) { this._maxVcpuCount = value; } resetMaxVcpuCount() { this._maxVcpuCount = undefined; } // Temporarily expose input value. Use with caution. get maxVcpuCountInput() { return this._maxVcpuCount; } get scalingMode() { return this.getStringAttribute('scaling_mode'); } set scalingMode(value) { this._scalingMode = value; } resetScalingMode() { this._scalingMode = undefined; } // Temporarily expose input value. Use with caution. get scalingModeInput() { return this._scalingMode; } get scalingPolicies() { return this._scalingPolicies; } putScalingPolicies(value) { this._scalingPolicies.internalValue = value; } resetScalingPolicies() { this._scalingPolicies.internalValue = undefined; } // Temporarily expose input value. Use with caution. get scalingPoliciesInput() { return this._scalingPolicies.internalValue; } } exports.LambdaCapacityProviderCapacityProviderScalingConfigOutputReference = LambdaCapacityProviderCapacityProviderScalingConfigOutputReference; _c = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderCapacityProviderScalingConfigOutputReference[_c] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderCapacityProviderScalingConfigOutputReference", version: "21.22.1" }; class LambdaCapacityProviderCapacityProviderScalingConfigList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new LambdaCapacityProviderCapacityProviderScalingConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LambdaCapacityProviderCapacityProviderScalingConfigList = LambdaCapacityProviderCapacityProviderScalingConfigList; _d = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderCapacityProviderScalingConfigList[_d] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderCapacityProviderScalingConfigList", version: "21.22.1" }; function lambdaCapacityProviderInstanceRequirementsToTerraform(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 { allowed_instance_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedInstanceTypes), architectures: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.architectures), excluded_instance_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.excludedInstanceTypes), }; } function lambdaCapacityProviderInstanceRequirementsToHclTerraform(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 = { allowed_instance_types: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedInstanceTypes), isBlock: false, type: "list", storageClassType: "stringList", }, architectures: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.architectures), isBlock: false, type: "list", storageClassType: "stringList", }, excluded_instance_types: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.excludedInstanceTypes), isBlock: false, type: "list", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LambdaCapacityProviderInstanceRequirementsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._allowedInstanceTypes !== undefined) { hasAnyValues = true; internalValueResult.allowedInstanceTypes = this._allowedInstanceTypes; } if (this._architectures !== undefined) { hasAnyValues = true; internalValueResult.architectures = this._architectures; } if (this._excludedInstanceTypes !== undefined) { hasAnyValues = true; internalValueResult.excludedInstanceTypes = this._excludedInstanceTypes; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._allowedInstanceTypes = undefined; this._architectures = undefined; this._excludedInstanceTypes = 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._allowedInstanceTypes = value.allowedInstanceTypes; this._architectures = value.architectures; this._excludedInstanceTypes = value.excludedInstanceTypes; } } get allowedInstanceTypes() { return this.getListAttribute('allowed_instance_types'); } set allowedInstanceTypes(value) { this._allowedInstanceTypes = value; } resetAllowedInstanceTypes() { this._allowedInstanceTypes = undefined; } // Temporarily expose input value. Use with caution. get allowedInstanceTypesInput() { return this._allowedInstanceTypes; } 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; } get excludedInstanceTypes() { return this.getListAttribute('excluded_instance_types'); } set excludedInstanceTypes(value) { this._excludedInstanceTypes = value; } resetExcludedInstanceTypes() { this._excludedInstanceTypes = undefined; } // Temporarily expose input value. Use with caution. get excludedInstanceTypesInput() { return this._excludedInstanceTypes; } } exports.LambdaCapacityProviderInstanceRequirementsOutputReference = LambdaCapacityProviderInstanceRequirementsOutputReference; _e = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderInstanceRequirementsOutputReference[_e] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderInstanceRequirementsOutputReference", version: "21.22.1" }; class LambdaCapacityProviderInstanceRequirementsList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new LambdaCapacityProviderInstanceRequirementsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LambdaCapacityProviderInstanceRequirementsList = LambdaCapacityProviderInstanceRequirementsList; _f = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderInstanceRequirementsList[_f] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderInstanceRequirementsList", version: "21.22.1" }; function lambdaCapacityProviderPermissionsConfigToTerraform(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 { capacity_provider_operator_role_arn: cdktf.stringToTerraform(struct.capacityProviderOperatorRoleArn), }; } function lambdaCapacityProviderPermissionsConfigToHclTerraform(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 = { capacity_provider_operator_role_arn: { value: cdktf.stringToHclTerraform(struct.capacityProviderOperatorRoleArn), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class LambdaCapacityProviderPermissionsConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._capacityProviderOperatorRoleArn !== undefined) { hasAnyValues = true; internalValueResult.capacityProviderOperatorRoleArn = this._capacityProviderOperatorRoleArn; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._capacityProviderOperatorRoleArn = 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._capacityProviderOperatorRoleArn = value.capacityProviderOperatorRoleArn; } } get capacityProviderOperatorRoleArn() { return this.getStringAttribute('capacity_provider_operator_role_arn'); } set capacityProviderOperatorRoleArn(value) { this._capacityProviderOperatorRoleArn = value; } // Temporarily expose input value. Use with caution. get capacityProviderOperatorRoleArnInput() { return this._capacityProviderOperatorRoleArn; } } exports.LambdaCapacityProviderPermissionsConfigOutputReference = LambdaCapacityProviderPermissionsConfigOutputReference; _g = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderPermissionsConfigOutputReference[_g] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderPermissionsConfigOutputReference", version: "21.22.1" }; class LambdaCapacityProviderPermissionsConfigList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new LambdaCapacityProviderPermissionsConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LambdaCapacityProviderPermissionsConfigList = LambdaCapacityProviderPermissionsConfigList; _h = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderPermissionsConfigList[_h] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderPermissionsConfigList", version: "21.22.1" }; function lambdaCapacityProviderTimeoutsToTerraform(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), }; } function lambdaCapacityProviderTimeoutsToHclTerraform(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)); } class LambdaCapacityProviderTimeoutsOutputReference 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.LambdaCapacityProviderTimeoutsOutputReference = LambdaCapacityProviderTimeoutsOutputReference; _j = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderTimeoutsOutputReference", version: "21.22.1" }; function lambdaCapacityProviderVpcConfigToTerraform(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 { security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds), subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds), }; } function lambdaCapacityProviderVpcConfigToHclTerraform(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 = { 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)); } class LambdaCapacityProviderVpcConfigOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; 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.resolvableValue = undefined; this._securityGroupIds = undefined; this._subnetIds = 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._securityGroupIds = value.securityGroupIds; this._subnetIds = value.subnetIds; } } 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; } } exports.LambdaCapacityProviderVpcConfigOutputReference = LambdaCapacityProviderVpcConfigOutputReference; _k = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderVpcConfigOutputReference[_k] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderVpcConfigOutputReference", version: "21.22.1" }; class LambdaCapacityProviderVpcConfigList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new LambdaCapacityProviderVpcConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.LambdaCapacityProviderVpcConfigList = LambdaCapacityProviderVpcConfigList; _l = JSII_RTTI_SYMBOL_1; LambdaCapacityProviderVpcConfigList[_l] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProviderVpcConfigList", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lambda_capacity_provider aws_lambda_capacity_provider} */ class LambdaCapacityProvider extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a LambdaCapacityProvider 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 LambdaCapacityProvider to import * @param importFromId The id of the existing LambdaCapacityProvider that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lambda_capacity_provider#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the LambdaCapacityProvider to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_lambda_capacity_provider", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/lambda_capacity_provider aws_lambda_capacity_provider} 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 LambdaCapacityProviderConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_lambda_capacity_provider', terraformGeneratorMetadata: { providerName: 'aws', providerVersion: '6.25.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // capacity_provider_scaling_config - computed: true, optional: true, required: false this._capacityProviderScalingConfig = new LambdaCapacityProviderCapacityProviderScalingConfigList(this, "capacity_provider_scaling_config", false); // instance_requirements - computed: true, optional: true, required: false this._instanceRequirements = new LambdaCapacityProviderInstanceRequirementsList(this, "instance_requirements", false); // tags_all - computed: true, optional: false, required: false this._tagsAll = new cdktf.StringMap(this, "tags_all"); // permissions_config - computed: false, optional: true, required: false this._permissionsConfig = new LambdaCapacityProviderPermissionsConfigList(this, "permissions_config", false); // timeouts - computed: false, optional: true, required: false this._timeouts = new LambdaCapacityProviderTimeoutsOutputReference(this, "timeouts"); // vpc_config - computed: false, optional: true, required: false this._vpcConfig = new LambdaCapacityProviderVpcConfigList(this, "vpc_config", false); this._capacityProviderScalingConfig.internalValue = config.capacityProviderScalingConfig; this._instanceRequirements.internalValue = config.instanceRequirements; this._kmsKeyArn = config.kmsKeyArn; this._name = config.name; this._region = config.region; this._tags = config.tags; this._permissionsConfig.internalValue = config.permissionsConfig; this._timeouts.internalValue = config.timeouts; this._vpcConfig.internalValue = config.vpcConfig; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } get capacityProviderScalingConfig() { return this._capacityProviderScalingConfig; } putCapacityProviderScalingConfig(value) { this._capacityProviderScalingConfig.internalValue = value; } resetCapacityProviderScalingConfig() { this._capacityProviderScalingConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get capacityProviderScalingConfigInput() { return this._capacityProviderScalingConfig.internalValue; } get instanceRequirements() { return this._instanceRequirements; } putInstanceRequirements(value) { this._instanceRequirements.internalValue = value; } resetInstanceRequirements() { this._instanceRequirements.internalValue = undefined; } // Temporarily expose input value. Use with caution. get instanceRequirementsInput() { return this._instanceRequirements.internalValue; } get kmsKeyArn() { return this.getStringAttribute('kms_key_arn'); } set kmsKeyArn(value) { this._kmsKeyArn = value; } resetKmsKeyArn() { this._kmsKeyArn = undefined; } // Temporarily expose input value. Use with caution. get kmsKeyArnInput() { return this._kmsKeyArn; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get region() { return this.getStringAttribute('region'); } set region(value) { this._region = value; } resetRegion() { this._region = undefined; } // Temporarily expose input value. Use with caution. get regionInput() { return this._region; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this._tagsAll; } get permissionsConfig() { return this._permissionsConfig; } putPermissionsConfig(value) { this._permissionsConfig.internalValue = value; } resetPermissionsConfig() { this._permissionsConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get permissionsConfigInput() { return this._permissionsConfig.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } get vpcConfig() { return this._vpcConfig; } putVpcConfig(value) { this._vpcConfig.internalValue = value; } resetVpcConfig() { this._vpcConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get vpcConfigInput() { return this._vpcConfig.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { capacity_provider_scaling_config: cdktf.listMapper(lambdaCapacityProviderCapacityProviderScalingConfigToTerraform, false)(this._capacityProviderScalingConfig.internalValue), instance_requirements: cdktf.listMapper(lambdaCapacityProviderInstanceRequirementsToTerraform, false)(this._instanceRequirements.internalValue), kms_key_arn: cdktf.stringToTerraform(this._kmsKeyArn), name: cdktf.stringToTerraform(this._name), region: cdktf.stringToTerraform(this._region), tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags), permissions_config: cdktf.listMapper(lambdaCapacityProviderPermissionsConfigToTerraform, true)(this._permissionsConfig.internalValue), timeouts: lambdaCapacityProviderTimeoutsToTerraform(this._timeouts.internalValue), vpc_config: cdktf.listMapper(lambdaCapacityProviderVpcConfigToTerraform, true)(this._vpcConfig.internalValue), }; } synthesizeHclAttributes() { const attrs = { capacity_provider_scaling_config: { value: cdktf.listMapperHcl(lambdaCapacityProviderCapacityProviderScalingConfigToHclTerraform, false)(this._capacityProviderScalingConfig.internalValue), isBlock: true, type: "list", storageClassType: "LambdaCapacityProviderCapacityProviderScalingConfigList", }, instance_requirements: { value: cdktf.listMapperHcl(lambdaCapacityProviderInstanceRequirementsToHclTerraform, false)(this._instanceRequirements.internalValue), isBlock: true, type: "list", storageClassType: "LambdaCapacityProviderInstanceRequirementsList", }, kms_key_arn: { value: cdktf.stringToHclTerraform(this._kmsKeyArn), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, region: { value: cdktf.stringToHclTerraform(this._region), isBlock: false, type: "simple", storageClassType: "string", }, tags: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._tags), isBlock: false, type: "map", storageClassType: "stringMap", }, permissions_config: { value: cdktf.listMapperHcl(lambdaCapacityProviderPermissionsConfigToHclTerraform, true)(this._permissionsConfig.internalValue), isBlock: true, type: "list", storageClassType: "LambdaCapacityProviderPermissionsConfigList", }, timeouts: { value: lambdaCapacityProviderTimeoutsToHclTerraform(this._timeouts.internalValue), isBlock: true, type: "struct", storageClassType: "LambdaCapacityProviderTimeouts", }, vpc_config: { value: cdktf.listMapperHcl(lambdaCapacityProviderVpcConfigToHclTerraform, true)(this._vpcConfig.internalValue), isBlock: true, type: "list", storageClassType: "LambdaCapacityProviderVpcConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.LambdaCapacityProvider = LambdaCapacityProvider; _m = JSII_RTTI_SYMBOL_1; LambdaCapacityProvider[_m] = { fqn: "@cdktf/provider-aws.lambdaCapacityProvider.LambdaCapacityProvider", version: "21.22.1" }; // ================= // STATIC PROPERTIES // ================= LambdaCapacityProvider.tfResourceType = "aws_lambda_capacity_provider"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbGFtYmRhLWNhcGFjaXR5LXByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFzRUEsc0tBU0M7QUF