UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,250 lines 274 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.OpsworksCustomLayer = exports.OpsworksCustomLayerLoadBasedAutoScalingOutputReference = exports.opsworksCustomLayerLoadBasedAutoScalingToHclTerraform = exports.opsworksCustomLayerLoadBasedAutoScalingToTerraform = exports.OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference = exports.opsworksCustomLayerLoadBasedAutoScalingUpscalingToHclTerraform = exports.opsworksCustomLayerLoadBasedAutoScalingUpscalingToTerraform = exports.OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference = exports.opsworksCustomLayerLoadBasedAutoScalingDownscalingToHclTerraform = exports.opsworksCustomLayerLoadBasedAutoScalingDownscalingToTerraform = exports.OpsworksCustomLayerEbsVolumeList = exports.OpsworksCustomLayerEbsVolumeOutputReference = exports.opsworksCustomLayerEbsVolumeToHclTerraform = exports.opsworksCustomLayerEbsVolumeToTerraform = exports.OpsworksCustomLayerCloudwatchConfigurationOutputReference = exports.opsworksCustomLayerCloudwatchConfigurationToHclTerraform = exports.opsworksCustomLayerCloudwatchConfigurationToTerraform = exports.OpsworksCustomLayerCloudwatchConfigurationLogStreamsList = exports.OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference = exports.opsworksCustomLayerCloudwatchConfigurationLogStreamsToHclTerraform = exports.opsworksCustomLayerCloudwatchConfigurationLogStreamsToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function opsworksCustomLayerCloudwatchConfigurationLogStreamsToTerraform(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 { batch_count: cdktf.numberToTerraform(struct.batchCount), batch_size: cdktf.numberToTerraform(struct.batchSize), buffer_duration: cdktf.numberToTerraform(struct.bufferDuration), datetime_format: cdktf.stringToTerraform(struct.datetimeFormat), encoding: cdktf.stringToTerraform(struct.encoding), file: cdktf.stringToTerraform(struct.file), file_fingerprint_lines: cdktf.stringToTerraform(struct.fileFingerprintLines), initial_position: cdktf.stringToTerraform(struct.initialPosition), log_group_name: cdktf.stringToTerraform(struct.logGroupName), multiline_start_pattern: cdktf.stringToTerraform(struct.multilineStartPattern), time_zone: cdktf.stringToTerraform(struct.timeZone), }; } exports.opsworksCustomLayerCloudwatchConfigurationLogStreamsToTerraform = opsworksCustomLayerCloudwatchConfigurationLogStreamsToTerraform; function opsworksCustomLayerCloudwatchConfigurationLogStreamsToHclTerraform(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 = { batch_count: { value: cdktf.numberToHclTerraform(struct.batchCount), isBlock: false, type: "simple", storageClassType: "number", }, batch_size: { value: cdktf.numberToHclTerraform(struct.batchSize), isBlock: false, type: "simple", storageClassType: "number", }, buffer_duration: { value: cdktf.numberToHclTerraform(struct.bufferDuration), isBlock: false, type: "simple", storageClassType: "number", }, datetime_format: { value: cdktf.stringToHclTerraform(struct.datetimeFormat), isBlock: false, type: "simple", storageClassType: "string", }, encoding: { value: cdktf.stringToHclTerraform(struct.encoding), isBlock: false, type: "simple", storageClassType: "string", }, file: { value: cdktf.stringToHclTerraform(struct.file), isBlock: false, type: "simple", storageClassType: "string", }, file_fingerprint_lines: { value: cdktf.stringToHclTerraform(struct.fileFingerprintLines), isBlock: false, type: "simple", storageClassType: "string", }, initial_position: { value: cdktf.stringToHclTerraform(struct.initialPosition), isBlock: false, type: "simple", storageClassType: "string", }, log_group_name: { value: cdktf.stringToHclTerraform(struct.logGroupName), isBlock: false, type: "simple", storageClassType: "string", }, multiline_start_pattern: { value: cdktf.stringToHclTerraform(struct.multilineStartPattern), isBlock: false, type: "simple", storageClassType: "string", }, time_zone: { value: cdktf.stringToHclTerraform(struct.timeZone), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerCloudwatchConfigurationLogStreamsToHclTerraform = opsworksCustomLayerCloudwatchConfigurationLogStreamsToHclTerraform; class OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference 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._batchCount !== undefined) { hasAnyValues = true; internalValueResult.batchCount = this._batchCount; } if (this._batchSize !== undefined) { hasAnyValues = true; internalValueResult.batchSize = this._batchSize; } if (this._bufferDuration !== undefined) { hasAnyValues = true; internalValueResult.bufferDuration = this._bufferDuration; } if (this._datetimeFormat !== undefined) { hasAnyValues = true; internalValueResult.datetimeFormat = this._datetimeFormat; } if (this._encoding !== undefined) { hasAnyValues = true; internalValueResult.encoding = this._encoding; } if (this._file !== undefined) { hasAnyValues = true; internalValueResult.file = this._file; } if (this._fileFingerprintLines !== undefined) { hasAnyValues = true; internalValueResult.fileFingerprintLines = this._fileFingerprintLines; } if (this._initialPosition !== undefined) { hasAnyValues = true; internalValueResult.initialPosition = this._initialPosition; } if (this._logGroupName !== undefined) { hasAnyValues = true; internalValueResult.logGroupName = this._logGroupName; } if (this._multilineStartPattern !== undefined) { hasAnyValues = true; internalValueResult.multilineStartPattern = this._multilineStartPattern; } if (this._timeZone !== undefined) { hasAnyValues = true; internalValueResult.timeZone = this._timeZone; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._batchCount = undefined; this._batchSize = undefined; this._bufferDuration = undefined; this._datetimeFormat = undefined; this._encoding = undefined; this._file = undefined; this._fileFingerprintLines = undefined; this._initialPosition = undefined; this._logGroupName = undefined; this._multilineStartPattern = undefined; this._timeZone = 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._batchCount = value.batchCount; this._batchSize = value.batchSize; this._bufferDuration = value.bufferDuration; this._datetimeFormat = value.datetimeFormat; this._encoding = value.encoding; this._file = value.file; this._fileFingerprintLines = value.fileFingerprintLines; this._initialPosition = value.initialPosition; this._logGroupName = value.logGroupName; this._multilineStartPattern = value.multilineStartPattern; this._timeZone = value.timeZone; } } get batchCount() { return this.getNumberAttribute('batch_count'); } set batchCount(value) { this._batchCount = value; } resetBatchCount() { this._batchCount = undefined; } // Temporarily expose input value. Use with caution. get batchCountInput() { return this._batchCount; } get batchSize() { return this.getNumberAttribute('batch_size'); } set batchSize(value) { this._batchSize = value; } resetBatchSize() { this._batchSize = undefined; } // Temporarily expose input value. Use with caution. get batchSizeInput() { return this._batchSize; } get bufferDuration() { return this.getNumberAttribute('buffer_duration'); } set bufferDuration(value) { this._bufferDuration = value; } resetBufferDuration() { this._bufferDuration = undefined; } // Temporarily expose input value. Use with caution. get bufferDurationInput() { return this._bufferDuration; } get datetimeFormat() { return this.getStringAttribute('datetime_format'); } set datetimeFormat(value) { this._datetimeFormat = value; } resetDatetimeFormat() { this._datetimeFormat = undefined; } // Temporarily expose input value. Use with caution. get datetimeFormatInput() { return this._datetimeFormat; } get encoding() { return this.getStringAttribute('encoding'); } set encoding(value) { this._encoding = value; } resetEncoding() { this._encoding = undefined; } // Temporarily expose input value. Use with caution. get encodingInput() { return this._encoding; } get file() { return this.getStringAttribute('file'); } set file(value) { this._file = value; } // Temporarily expose input value. Use with caution. get fileInput() { return this._file; } get fileFingerprintLines() { return this.getStringAttribute('file_fingerprint_lines'); } set fileFingerprintLines(value) { this._fileFingerprintLines = value; } resetFileFingerprintLines() { this._fileFingerprintLines = undefined; } // Temporarily expose input value. Use with caution. get fileFingerprintLinesInput() { return this._fileFingerprintLines; } get initialPosition() { return this.getStringAttribute('initial_position'); } set initialPosition(value) { this._initialPosition = value; } resetInitialPosition() { this._initialPosition = undefined; } // Temporarily expose input value. Use with caution. get initialPositionInput() { return this._initialPosition; } get logGroupName() { return this.getStringAttribute('log_group_name'); } set logGroupName(value) { this._logGroupName = value; } // Temporarily expose input value. Use with caution. get logGroupNameInput() { return this._logGroupName; } get multilineStartPattern() { return this.getStringAttribute('multiline_start_pattern'); } set multilineStartPattern(value) { this._multilineStartPattern = value; } resetMultilineStartPattern() { this._multilineStartPattern = undefined; } // Temporarily expose input value. Use with caution. get multilineStartPatternInput() { return this._multilineStartPattern; } get timeZone() { return this.getStringAttribute('time_zone'); } set timeZone(value) { this._timeZone = value; } resetTimeZone() { this._timeZone = undefined; } // Temporarily expose input value. Use with caution. get timeZoneInput() { return this._timeZone; } } exports.OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference = OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference; _a = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference[_a] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference", version: "19.50.0" }; class OpsworksCustomLayerCloudwatchConfigurationLogStreamsList 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 OpsworksCustomLayerCloudwatchConfigurationLogStreamsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.OpsworksCustomLayerCloudwatchConfigurationLogStreamsList = OpsworksCustomLayerCloudwatchConfigurationLogStreamsList; _b = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerCloudwatchConfigurationLogStreamsList[_b] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerCloudwatchConfigurationLogStreamsList", version: "19.50.0" }; function opsworksCustomLayerCloudwatchConfigurationToTerraform(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 { enabled: cdktf.booleanToTerraform(struct.enabled), log_streams: cdktf.listMapper(opsworksCustomLayerCloudwatchConfigurationLogStreamsToTerraform, true)(struct.logStreams), }; } exports.opsworksCustomLayerCloudwatchConfigurationToTerraform = opsworksCustomLayerCloudwatchConfigurationToTerraform; function opsworksCustomLayerCloudwatchConfigurationToHclTerraform(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 = { enabled: { value: cdktf.booleanToHclTerraform(struct.enabled), isBlock: false, type: "simple", storageClassType: "boolean", }, log_streams: { value: cdktf.listMapperHcl(opsworksCustomLayerCloudwatchConfigurationLogStreamsToHclTerraform, true)(struct.logStreams), isBlock: true, type: "list", storageClassType: "OpsworksCustomLayerCloudwatchConfigurationLogStreamsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerCloudwatchConfigurationToHclTerraform = opsworksCustomLayerCloudwatchConfigurationToHclTerraform; class OpsworksCustomLayerCloudwatchConfigurationOutputReference 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; // log_streams - computed: false, optional: true, required: false this._logStreams = new OpsworksCustomLayerCloudwatchConfigurationLogStreamsList(this, "log_streams", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._logStreams?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.logStreams = this._logStreams?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; this._logStreams.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; this._logStreams.internalValue = value.logStreams; } } get enabled() { return this.getBooleanAttribute('enabled'); } set enabled(value) { this._enabled = value; } resetEnabled() { this._enabled = undefined; } // Temporarily expose input value. Use with caution. get enabledInput() { return this._enabled; } get logStreams() { return this._logStreams; } putLogStreams(value) { this._logStreams.internalValue = value; } resetLogStreams() { this._logStreams.internalValue = undefined; } // Temporarily expose input value. Use with caution. get logStreamsInput() { return this._logStreams.internalValue; } } exports.OpsworksCustomLayerCloudwatchConfigurationOutputReference = OpsworksCustomLayerCloudwatchConfigurationOutputReference; _c = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerCloudwatchConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerCloudwatchConfigurationOutputReference", version: "19.50.0" }; function opsworksCustomLayerEbsVolumeToTerraform(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 { encrypted: cdktf.booleanToTerraform(struct.encrypted), iops: cdktf.numberToTerraform(struct.iops), mount_point: cdktf.stringToTerraform(struct.mountPoint), number_of_disks: cdktf.numberToTerraform(struct.numberOfDisks), raid_level: cdktf.stringToTerraform(struct.raidLevel), size: cdktf.numberToTerraform(struct.size), type: cdktf.stringToTerraform(struct.type), }; } exports.opsworksCustomLayerEbsVolumeToTerraform = opsworksCustomLayerEbsVolumeToTerraform; function opsworksCustomLayerEbsVolumeToHclTerraform(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 = { encrypted: { value: cdktf.booleanToHclTerraform(struct.encrypted), isBlock: false, type: "simple", storageClassType: "boolean", }, iops: { value: cdktf.numberToHclTerraform(struct.iops), isBlock: false, type: "simple", storageClassType: "number", }, mount_point: { value: cdktf.stringToHclTerraform(struct.mountPoint), isBlock: false, type: "simple", storageClassType: "string", }, number_of_disks: { value: cdktf.numberToHclTerraform(struct.numberOfDisks), isBlock: false, type: "simple", storageClassType: "number", }, raid_level: { value: cdktf.stringToHclTerraform(struct.raidLevel), isBlock: false, type: "simple", storageClassType: "string", }, size: { value: cdktf.numberToHclTerraform(struct.size), isBlock: false, type: "simple", storageClassType: "number", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerEbsVolumeToHclTerraform = opsworksCustomLayerEbsVolumeToHclTerraform; class OpsworksCustomLayerEbsVolumeOutputReference 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._encrypted !== undefined) { hasAnyValues = true; internalValueResult.encrypted = this._encrypted; } if (this._iops !== undefined) { hasAnyValues = true; internalValueResult.iops = this._iops; } if (this._mountPoint !== undefined) { hasAnyValues = true; internalValueResult.mountPoint = this._mountPoint; } if (this._numberOfDisks !== undefined) { hasAnyValues = true; internalValueResult.numberOfDisks = this._numberOfDisks; } if (this._raidLevel !== undefined) { hasAnyValues = true; internalValueResult.raidLevel = this._raidLevel; } if (this._size !== undefined) { hasAnyValues = true; internalValueResult.size = this._size; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._encrypted = undefined; this._iops = undefined; this._mountPoint = undefined; this._numberOfDisks = undefined; this._raidLevel = undefined; this._size = undefined; this._type = 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._encrypted = value.encrypted; this._iops = value.iops; this._mountPoint = value.mountPoint; this._numberOfDisks = value.numberOfDisks; this._raidLevel = value.raidLevel; this._size = value.size; this._type = value.type; } } get encrypted() { return this.getBooleanAttribute('encrypted'); } set encrypted(value) { this._encrypted = value; } resetEncrypted() { this._encrypted = undefined; } // Temporarily expose input value. Use with caution. get encryptedInput() { return this._encrypted; } get iops() { return this.getNumberAttribute('iops'); } set iops(value) { this._iops = value; } resetIops() { this._iops = undefined; } // Temporarily expose input value. Use with caution. get iopsInput() { return this._iops; } get mountPoint() { return this.getStringAttribute('mount_point'); } set mountPoint(value) { this._mountPoint = value; } // Temporarily expose input value. Use with caution. get mountPointInput() { return this._mountPoint; } get numberOfDisks() { return this.getNumberAttribute('number_of_disks'); } set numberOfDisks(value) { this._numberOfDisks = value; } // Temporarily expose input value. Use with caution. get numberOfDisksInput() { return this._numberOfDisks; } get raidLevel() { return this.getStringAttribute('raid_level'); } set raidLevel(value) { this._raidLevel = value; } resetRaidLevel() { this._raidLevel = undefined; } // Temporarily expose input value. Use with caution. get raidLevelInput() { return this._raidLevel; } get size() { return this.getNumberAttribute('size'); } set size(value) { this._size = value; } // Temporarily expose input value. Use with caution. get sizeInput() { return this._size; } get type() { return this.getStringAttribute('type'); } set type(value) { this._type = value; } resetType() { this._type = undefined; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } } exports.OpsworksCustomLayerEbsVolumeOutputReference = OpsworksCustomLayerEbsVolumeOutputReference; _d = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerEbsVolumeOutputReference[_d] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerEbsVolumeOutputReference", version: "19.50.0" }; class OpsworksCustomLayerEbsVolumeList 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 OpsworksCustomLayerEbsVolumeOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.OpsworksCustomLayerEbsVolumeList = OpsworksCustomLayerEbsVolumeList; _e = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerEbsVolumeList[_e] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerEbsVolumeList", version: "19.50.0" }; function opsworksCustomLayerLoadBasedAutoScalingDownscalingToTerraform(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 { alarms: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.alarms), cpu_threshold: cdktf.numberToTerraform(struct.cpuThreshold), ignore_metrics_time: cdktf.numberToTerraform(struct.ignoreMetricsTime), instance_count: cdktf.numberToTerraform(struct.instanceCount), load_threshold: cdktf.numberToTerraform(struct.loadThreshold), memory_threshold: cdktf.numberToTerraform(struct.memoryThreshold), thresholds_wait_time: cdktf.numberToTerraform(struct.thresholdsWaitTime), }; } exports.opsworksCustomLayerLoadBasedAutoScalingDownscalingToTerraform = opsworksCustomLayerLoadBasedAutoScalingDownscalingToTerraform; function opsworksCustomLayerLoadBasedAutoScalingDownscalingToHclTerraform(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 = { alarms: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.alarms), isBlock: false, type: "list", storageClassType: "stringList", }, cpu_threshold: { value: cdktf.numberToHclTerraform(struct.cpuThreshold), isBlock: false, type: "simple", storageClassType: "number", }, ignore_metrics_time: { value: cdktf.numberToHclTerraform(struct.ignoreMetricsTime), isBlock: false, type: "simple", storageClassType: "number", }, instance_count: { value: cdktf.numberToHclTerraform(struct.instanceCount), isBlock: false, type: "simple", storageClassType: "number", }, load_threshold: { value: cdktf.numberToHclTerraform(struct.loadThreshold), isBlock: false, type: "simple", storageClassType: "number", }, memory_threshold: { value: cdktf.numberToHclTerraform(struct.memoryThreshold), isBlock: false, type: "simple", storageClassType: "number", }, thresholds_wait_time: { value: cdktf.numberToHclTerraform(struct.thresholdsWaitTime), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerLoadBasedAutoScalingDownscalingToHclTerraform = opsworksCustomLayerLoadBasedAutoScalingDownscalingToHclTerraform; class OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference 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._alarms !== undefined) { hasAnyValues = true; internalValueResult.alarms = this._alarms; } if (this._cpuThreshold !== undefined) { hasAnyValues = true; internalValueResult.cpuThreshold = this._cpuThreshold; } if (this._ignoreMetricsTime !== undefined) { hasAnyValues = true; internalValueResult.ignoreMetricsTime = this._ignoreMetricsTime; } if (this._instanceCount !== undefined) { hasAnyValues = true; internalValueResult.instanceCount = this._instanceCount; } if (this._loadThreshold !== undefined) { hasAnyValues = true; internalValueResult.loadThreshold = this._loadThreshold; } if (this._memoryThreshold !== undefined) { hasAnyValues = true; internalValueResult.memoryThreshold = this._memoryThreshold; } if (this._thresholdsWaitTime !== undefined) { hasAnyValues = true; internalValueResult.thresholdsWaitTime = this._thresholdsWaitTime; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._alarms = undefined; this._cpuThreshold = undefined; this._ignoreMetricsTime = undefined; this._instanceCount = undefined; this._loadThreshold = undefined; this._memoryThreshold = undefined; this._thresholdsWaitTime = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._alarms = value.alarms; this._cpuThreshold = value.cpuThreshold; this._ignoreMetricsTime = value.ignoreMetricsTime; this._instanceCount = value.instanceCount; this._loadThreshold = value.loadThreshold; this._memoryThreshold = value.memoryThreshold; this._thresholdsWaitTime = value.thresholdsWaitTime; } } get alarms() { return this.getListAttribute('alarms'); } set alarms(value) { this._alarms = value; } resetAlarms() { this._alarms = undefined; } // Temporarily expose input value. Use with caution. get alarmsInput() { return this._alarms; } get cpuThreshold() { return this.getNumberAttribute('cpu_threshold'); } set cpuThreshold(value) { this._cpuThreshold = value; } resetCpuThreshold() { this._cpuThreshold = undefined; } // Temporarily expose input value. Use with caution. get cpuThresholdInput() { return this._cpuThreshold; } get ignoreMetricsTime() { return this.getNumberAttribute('ignore_metrics_time'); } set ignoreMetricsTime(value) { this._ignoreMetricsTime = value; } resetIgnoreMetricsTime() { this._ignoreMetricsTime = undefined; } // Temporarily expose input value. Use with caution. get ignoreMetricsTimeInput() { return this._ignoreMetricsTime; } get instanceCount() { return this.getNumberAttribute('instance_count'); } set instanceCount(value) { this._instanceCount = value; } resetInstanceCount() { this._instanceCount = undefined; } // Temporarily expose input value. Use with caution. get instanceCountInput() { return this._instanceCount; } get loadThreshold() { return this.getNumberAttribute('load_threshold'); } set loadThreshold(value) { this._loadThreshold = value; } resetLoadThreshold() { this._loadThreshold = undefined; } // Temporarily expose input value. Use with caution. get loadThresholdInput() { return this._loadThreshold; } get memoryThreshold() { return this.getNumberAttribute('memory_threshold'); } set memoryThreshold(value) { this._memoryThreshold = value; } resetMemoryThreshold() { this._memoryThreshold = undefined; } // Temporarily expose input value. Use with caution. get memoryThresholdInput() { return this._memoryThreshold; } get thresholdsWaitTime() { return this.getNumberAttribute('thresholds_wait_time'); } set thresholdsWaitTime(value) { this._thresholdsWaitTime = value; } resetThresholdsWaitTime() { this._thresholdsWaitTime = undefined; } // Temporarily expose input value. Use with caution. get thresholdsWaitTimeInput() { return this._thresholdsWaitTime; } } exports.OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference = OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference; _f = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference[_f] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference", version: "19.50.0" }; function opsworksCustomLayerLoadBasedAutoScalingUpscalingToTerraform(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 { alarms: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.alarms), cpu_threshold: cdktf.numberToTerraform(struct.cpuThreshold), ignore_metrics_time: cdktf.numberToTerraform(struct.ignoreMetricsTime), instance_count: cdktf.numberToTerraform(struct.instanceCount), load_threshold: cdktf.numberToTerraform(struct.loadThreshold), memory_threshold: cdktf.numberToTerraform(struct.memoryThreshold), thresholds_wait_time: cdktf.numberToTerraform(struct.thresholdsWaitTime), }; } exports.opsworksCustomLayerLoadBasedAutoScalingUpscalingToTerraform = opsworksCustomLayerLoadBasedAutoScalingUpscalingToTerraform; function opsworksCustomLayerLoadBasedAutoScalingUpscalingToHclTerraform(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 = { alarms: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.alarms), isBlock: false, type: "list", storageClassType: "stringList", }, cpu_threshold: { value: cdktf.numberToHclTerraform(struct.cpuThreshold), isBlock: false, type: "simple", storageClassType: "number", }, ignore_metrics_time: { value: cdktf.numberToHclTerraform(struct.ignoreMetricsTime), isBlock: false, type: "simple", storageClassType: "number", }, instance_count: { value: cdktf.numberToHclTerraform(struct.instanceCount), isBlock: false, type: "simple", storageClassType: "number", }, load_threshold: { value: cdktf.numberToHclTerraform(struct.loadThreshold), isBlock: false, type: "simple", storageClassType: "number", }, memory_threshold: { value: cdktf.numberToHclTerraform(struct.memoryThreshold), isBlock: false, type: "simple", storageClassType: "number", }, thresholds_wait_time: { value: cdktf.numberToHclTerraform(struct.thresholdsWaitTime), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerLoadBasedAutoScalingUpscalingToHclTerraform = opsworksCustomLayerLoadBasedAutoScalingUpscalingToHclTerraform; class OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference 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._alarms !== undefined) { hasAnyValues = true; internalValueResult.alarms = this._alarms; } if (this._cpuThreshold !== undefined) { hasAnyValues = true; internalValueResult.cpuThreshold = this._cpuThreshold; } if (this._ignoreMetricsTime !== undefined) { hasAnyValues = true; internalValueResult.ignoreMetricsTime = this._ignoreMetricsTime; } if (this._instanceCount !== undefined) { hasAnyValues = true; internalValueResult.instanceCount = this._instanceCount; } if (this._loadThreshold !== undefined) { hasAnyValues = true; internalValueResult.loadThreshold = this._loadThreshold; } if (this._memoryThreshold !== undefined) { hasAnyValues = true; internalValueResult.memoryThreshold = this._memoryThreshold; } if (this._thresholdsWaitTime !== undefined) { hasAnyValues = true; internalValueResult.thresholdsWaitTime = this._thresholdsWaitTime; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._alarms = undefined; this._cpuThreshold = undefined; this._ignoreMetricsTime = undefined; this._instanceCount = undefined; this._loadThreshold = undefined; this._memoryThreshold = undefined; this._thresholdsWaitTime = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._alarms = value.alarms; this._cpuThreshold = value.cpuThreshold; this._ignoreMetricsTime = value.ignoreMetricsTime; this._instanceCount = value.instanceCount; this._loadThreshold = value.loadThreshold; this._memoryThreshold = value.memoryThreshold; this._thresholdsWaitTime = value.thresholdsWaitTime; } } get alarms() { return this.getListAttribute('alarms'); } set alarms(value) { this._alarms = value; } resetAlarms() { this._alarms = undefined; } // Temporarily expose input value. Use with caution. get alarmsInput() { return this._alarms; } get cpuThreshold() { return this.getNumberAttribute('cpu_threshold'); } set cpuThreshold(value) { this._cpuThreshold = value; } resetCpuThreshold() { this._cpuThreshold = undefined; } // Temporarily expose input value. Use with caution. get cpuThresholdInput() { return this._cpuThreshold; } get ignoreMetricsTime() { return this.getNumberAttribute('ignore_metrics_time'); } set ignoreMetricsTime(value) { this._ignoreMetricsTime = value; } resetIgnoreMetricsTime() { this._ignoreMetricsTime = undefined; } // Temporarily expose input value. Use with caution. get ignoreMetricsTimeInput() { return this._ignoreMetricsTime; } get instanceCount() { return this.getNumberAttribute('instance_count'); } set instanceCount(value) { this._instanceCount = value; } resetInstanceCount() { this._instanceCount = undefined; } // Temporarily expose input value. Use with caution. get instanceCountInput() { return this._instanceCount; } get loadThreshold() { return this.getNumberAttribute('load_threshold'); } set loadThreshold(value) { this._loadThreshold = value; } resetLoadThreshold() { this._loadThreshold = undefined; } // Temporarily expose input value. Use with caution. get loadThresholdInput() { return this._loadThreshold; } get memoryThreshold() { return this.getNumberAttribute('memory_threshold'); } set memoryThreshold(value) { this._memoryThreshold = value; } resetMemoryThreshold() { this._memoryThreshold = undefined; } // Temporarily expose input value. Use with caution. get memoryThresholdInput() { return this._memoryThreshold; } get thresholdsWaitTime() { return this.getNumberAttribute('thresholds_wait_time'); } set thresholdsWaitTime(value) { this._thresholdsWaitTime = value; } resetThresholdsWaitTime() { this._thresholdsWaitTime = undefined; } // Temporarily expose input value. Use with caution. get thresholdsWaitTimeInput() { return this._thresholdsWaitTime; } } exports.OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference = OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference; _g = JSII_RTTI_SYMBOL_1; OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference[_g] = { fqn: "@cdktf/provider-aws.opsworksCustomLayer.OpsworksCustomLayerLoadBasedAutoScalingUpscalingOutputReference", version: "19.50.0" }; function opsworksCustomLayerLoadBasedAutoScalingToTerraform(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 { enable: cdktf.booleanToTerraform(struct.enable), downscaling: opsworksCustomLayerLoadBasedAutoScalingDownscalingToTerraform(struct.downscaling), upscaling: opsworksCustomLayerLoadBasedAutoScalingUpscalingToTerraform(struct.upscaling), }; } exports.opsworksCustomLayerLoadBasedAutoScalingToTerraform = opsworksCustomLayerLoadBasedAutoScalingToTerraform; function opsworksCustomLayerLoadBasedAutoScalingToHclTerraform(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 = { enable: { value: cdktf.booleanToHclTerraform(struct.enable), isBlock: false, type: "simple", storageClassType: "boolean", }, downscaling: { value: opsworksCustomLayerLoadBasedAutoScalingDownscalingToHclTerraform(struct.downscaling), isBlock: true, type: "list", storageClassType: "OpsworksCustomLayerLoadBasedAutoScalingDownscalingList", }, upscaling: { value: opsworksCustomLayerLoadBasedAutoScalingUpscalingToHclTerraform(struct.upscaling), isBlock: true, type: "list", storageClassType: "OpsworksCustomLayerLoadBasedAutoScalingUpscalingList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.opsworksCustomLayerLoadBasedAutoScalingToHclTerraform = opsworksCustomLayerLoadBasedAutoScalingToHclTerraform; class OpsworksCustomLayerLoadBasedAutoScalingOutputReference 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; // downscaling - computed: false, optional: true, required: false this._downscaling = new OpsworksCustomLayerLoadBasedAutoScalingDownscalingOutputReference(this, "downscaling"); // upscaling - computed: false, optional: true, required: false this._upscaling = new OpsworksCustomLayerLoadBasedA