UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

952 lines (951 loc) 282 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; Object.defineProperty(exports, "__esModule", { value: true }); exports.AppautoscalingPolicy = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationPredefinedMetricSpecificationToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsList = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToTerraform = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList = exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToHclTerraform = exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToTerraform = exports.AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference = exports.appautoscalingPolicyStepScalingPolicyConfigurationToHclTerraform = exports.appautoscalingPolicyStepScalingPolicyConfigurationToTerraform = exports.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList = exports.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference = exports.appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToHclTerraform = exports.appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToTerraform(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 { metric_interval_lower_bound: cdktf.stringToTerraform(struct.metricIntervalLowerBound), metric_interval_upper_bound: cdktf.stringToTerraform(struct.metricIntervalUpperBound), scaling_adjustment: cdktf.numberToTerraform(struct.scalingAdjustment), }; } exports.appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToTerraform = appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToTerraform; function appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToHclTerraform(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 = { metric_interval_lower_bound: { value: cdktf.stringToHclTerraform(struct.metricIntervalLowerBound), isBlock: false, type: "simple", storageClassType: "string", }, metric_interval_upper_bound: { value: cdktf.stringToHclTerraform(struct.metricIntervalUpperBound), isBlock: false, type: "simple", storageClassType: "string", }, scaling_adjustment: { value: cdktf.numberToHclTerraform(struct.scalingAdjustment), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToHclTerraform = appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToHclTerraform; class AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference 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._metricIntervalLowerBound !== undefined) { hasAnyValues = true; internalValueResult.metricIntervalLowerBound = this._metricIntervalLowerBound; } if (this._metricIntervalUpperBound !== undefined) { hasAnyValues = true; internalValueResult.metricIntervalUpperBound = this._metricIntervalUpperBound; } if (this._scalingAdjustment !== undefined) { hasAnyValues = true; internalValueResult.scalingAdjustment = this._scalingAdjustment; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._metricIntervalLowerBound = undefined; this._metricIntervalUpperBound = undefined; this._scalingAdjustment = 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._metricIntervalLowerBound = value.metricIntervalLowerBound; this._metricIntervalUpperBound = value.metricIntervalUpperBound; this._scalingAdjustment = value.scalingAdjustment; } } get metricIntervalLowerBound() { return this.getStringAttribute('metric_interval_lower_bound'); } set metricIntervalLowerBound(value) { this._metricIntervalLowerBound = value; } resetMetricIntervalLowerBound() { this._metricIntervalLowerBound = undefined; } // Temporarily expose input value. Use with caution. get metricIntervalLowerBoundInput() { return this._metricIntervalLowerBound; } get metricIntervalUpperBound() { return this.getStringAttribute('metric_interval_upper_bound'); } set metricIntervalUpperBound(value) { this._metricIntervalUpperBound = value; } resetMetricIntervalUpperBound() { this._metricIntervalUpperBound = undefined; } // Temporarily expose input value. Use with caution. get metricIntervalUpperBoundInput() { return this._metricIntervalUpperBound; } get scalingAdjustment() { return this.getNumberAttribute('scaling_adjustment'); } set scalingAdjustment(value) { this._scalingAdjustment = value; } // Temporarily expose input value. Use with caution. get scalingAdjustmentInput() { return this._scalingAdjustment; } } exports.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference = AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference; _a = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference[_a] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference", version: "19.50.0" }; class AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList 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 AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList = AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList; _b = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList[_b] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList", version: "19.50.0" }; function appautoscalingPolicyStepScalingPolicyConfigurationToTerraform(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 { adjustment_type: cdktf.stringToTerraform(struct.adjustmentType), cooldown: cdktf.numberToTerraform(struct.cooldown), metric_aggregation_type: cdktf.stringToTerraform(struct.metricAggregationType), min_adjustment_magnitude: cdktf.numberToTerraform(struct.minAdjustmentMagnitude), step_adjustment: cdktf.listMapper(appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToTerraform, true)(struct.stepAdjustment), }; } exports.appautoscalingPolicyStepScalingPolicyConfigurationToTerraform = appautoscalingPolicyStepScalingPolicyConfigurationToTerraform; function appautoscalingPolicyStepScalingPolicyConfigurationToHclTerraform(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 = { adjustment_type: { value: cdktf.stringToHclTerraform(struct.adjustmentType), isBlock: false, type: "simple", storageClassType: "string", }, cooldown: { value: cdktf.numberToHclTerraform(struct.cooldown), isBlock: false, type: "simple", storageClassType: "number", }, metric_aggregation_type: { value: cdktf.stringToHclTerraform(struct.metricAggregationType), isBlock: false, type: "simple", storageClassType: "string", }, min_adjustment_magnitude: { value: cdktf.numberToHclTerraform(struct.minAdjustmentMagnitude), isBlock: false, type: "simple", storageClassType: "number", }, step_adjustment: { value: cdktf.listMapperHcl(appautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentToHclTerraform, true)(struct.stepAdjustment), isBlock: true, type: "set", storageClassType: "AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyStepScalingPolicyConfigurationToHclTerraform = appautoscalingPolicyStepScalingPolicyConfigurationToHclTerraform; class AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference 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; // step_adjustment - computed: false, optional: true, required: false this._stepAdjustment = new AppautoscalingPolicyStepScalingPolicyConfigurationStepAdjustmentList(this, "step_adjustment", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._adjustmentType !== undefined) { hasAnyValues = true; internalValueResult.adjustmentType = this._adjustmentType; } if (this._cooldown !== undefined) { hasAnyValues = true; internalValueResult.cooldown = this._cooldown; } if (this._metricAggregationType !== undefined) { hasAnyValues = true; internalValueResult.metricAggregationType = this._metricAggregationType; } if (this._minAdjustmentMagnitude !== undefined) { hasAnyValues = true; internalValueResult.minAdjustmentMagnitude = this._minAdjustmentMagnitude; } if (this._stepAdjustment?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.stepAdjustment = this._stepAdjustment?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._adjustmentType = undefined; this._cooldown = undefined; this._metricAggregationType = undefined; this._minAdjustmentMagnitude = undefined; this._stepAdjustment.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._adjustmentType = value.adjustmentType; this._cooldown = value.cooldown; this._metricAggregationType = value.metricAggregationType; this._minAdjustmentMagnitude = value.minAdjustmentMagnitude; this._stepAdjustment.internalValue = value.stepAdjustment; } } get adjustmentType() { return this.getStringAttribute('adjustment_type'); } set adjustmentType(value) { this._adjustmentType = value; } resetAdjustmentType() { this._adjustmentType = undefined; } // Temporarily expose input value. Use with caution. get adjustmentTypeInput() { return this._adjustmentType; } get cooldown() { return this.getNumberAttribute('cooldown'); } set cooldown(value) { this._cooldown = value; } resetCooldown() { this._cooldown = undefined; } // Temporarily expose input value. Use with caution. get cooldownInput() { return this._cooldown; } get metricAggregationType() { return this.getStringAttribute('metric_aggregation_type'); } set metricAggregationType(value) { this._metricAggregationType = value; } resetMetricAggregationType() { this._metricAggregationType = undefined; } // Temporarily expose input value. Use with caution. get metricAggregationTypeInput() { return this._metricAggregationType; } get minAdjustmentMagnitude() { return this.getNumberAttribute('min_adjustment_magnitude'); } set minAdjustmentMagnitude(value) { this._minAdjustmentMagnitude = value; } resetMinAdjustmentMagnitude() { this._minAdjustmentMagnitude = undefined; } // Temporarily expose input value. Use with caution. get minAdjustmentMagnitudeInput() { return this._minAdjustmentMagnitude; } get stepAdjustment() { return this._stepAdjustment; } putStepAdjustment(value) { this._stepAdjustment.internalValue = value; } resetStepAdjustment() { this._stepAdjustment.internalValue = undefined; } // Temporarily expose input value. Use with caution. get stepAdjustmentInput() { return this._stepAdjustment.internalValue; } } exports.AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference = AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference; _c = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyStepScalingPolicyConfigurationOutputReference", version: "19.50.0" }; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToTerraform(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 { name: cdktf.stringToTerraform(struct.name), value: cdktf.stringToTerraform(struct.value), }; } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToTerraform; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToHclTerraform(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 = { name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.stringToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToHclTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsToHclTerraform; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = undefined; this._value = 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._name = value.name; this._value = value.value; } } 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 value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference; _d = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference[_d] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference", version: "19.50.0" }; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList 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 AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList; _e = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList[_e] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationDimensionsList", version: "19.50.0" }; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToTerraform(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 { name: cdktf.stringToTerraform(struct.name), value: cdktf.stringToTerraform(struct.value), }; } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToTerraform; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToHclTerraform(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 = { name: { value: cdktf.stringToHclTerraform(struct.name), isBlock: false, type: "simple", storageClassType: "string", }, value: { value: cdktf.stringToHclTerraform(struct.value), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToHclTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToHclTerraform; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference 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._name !== undefined) { hasAnyValues = true; internalValueResult.name = this._name; } if (this._value !== undefined) { hasAnyValues = true; internalValueResult.value = this._value; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._name = undefined; this._value = 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._name = value.name; this._value = value.value; } } 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 value() { return this.getStringAttribute('value'); } set value(value) { this._value = value; } // Temporarily expose input value. Use with caution. get valueInput() { return this._value; } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference; _f = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference[_f] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference", version: "19.50.0" }; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList 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 AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList; _g = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList[_g] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList", version: "19.50.0" }; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToTerraform(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 { metric_name: cdktf.stringToTerraform(struct.metricName), namespace: cdktf.stringToTerraform(struct.namespace), dimensions: cdktf.listMapper(appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToTerraform, true)(struct.dimensions), }; } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToTerraform; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToHclTerraform(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 = { metric_name: { value: cdktf.stringToHclTerraform(struct.metricName), isBlock: false, type: "simple", storageClassType: "string", }, namespace: { value: cdktf.stringToHclTerraform(struct.namespace), isBlock: false, type: "simple", storageClassType: "string", }, dimensions: { value: cdktf.listMapperHcl(appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsToHclTerraform, true)(struct.dimensions), isBlock: true, type: "set", storageClassType: "AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToHclTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToHclTerraform; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference 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; // dimensions - computed: false, optional: true, required: false this._dimensions = new AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricDimensionsList(this, "dimensions", true); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._metricName !== undefined) { hasAnyValues = true; internalValueResult.metricName = this._metricName; } if (this._namespace !== undefined) { hasAnyValues = true; internalValueResult.namespace = this._namespace; } if (this._dimensions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.dimensions = this._dimensions?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._metricName = undefined; this._namespace = undefined; this._dimensions.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._metricName = value.metricName; this._namespace = value.namespace; this._dimensions.internalValue = value.dimensions; } } get metricName() { return this.getStringAttribute('metric_name'); } set metricName(value) { this._metricName = value; } // Temporarily expose input value. Use with caution. get metricNameInput() { return this._metricName; } get namespace() { return this.getStringAttribute('namespace'); } set namespace(value) { this._namespace = value; } // Temporarily expose input value. Use with caution. get namespaceInput() { return this._namespace; } get dimensions() { return this._dimensions; } putDimensions(value) { this._dimensions.internalValue = value; } resetDimensions() { this._dimensions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get dimensionsInput() { return this._dimensions.internalValue; } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference; _h = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference[_h] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference", version: "19.50.0" }; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToTerraform(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 { stat: cdktf.stringToTerraform(struct.stat), unit: cdktf.stringToTerraform(struct.unit), metric: appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToTerraform(struct.metric), }; } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToTerraform; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToHclTerraform(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 = { stat: { value: cdktf.stringToHclTerraform(struct.stat), isBlock: false, type: "simple", storageClassType: "string", }, unit: { value: cdktf.stringToHclTerraform(struct.unit), isBlock: false, type: "simple", storageClassType: "string", }, metric: { value: appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricToHclTerraform(struct.metric), isBlock: true, type: "list", storageClassType: "AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToHclTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToHclTerraform; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference 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; // metric - computed: false, optional: false, required: true this._metric = new AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatMetricOutputReference(this, "metric"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._stat !== undefined) { hasAnyValues = true; internalValueResult.stat = this._stat; } if (this._unit !== undefined) { hasAnyValues = true; internalValueResult.unit = this._unit; } if (this._metric?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.metric = this._metric?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._stat = undefined; this._unit = undefined; this._metric.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._stat = value.stat; this._unit = value.unit; this._metric.internalValue = value.metric; } } get stat() { return this.getStringAttribute('stat'); } set stat(value) { this._stat = value; } // Temporarily expose input value. Use with caution. get statInput() { return this._stat; } get unit() { return this.getStringAttribute('unit'); } set unit(value) { this._unit = value; } resetUnit() { this._unit = undefined; } // Temporarily expose input value. Use with caution. get unitInput() { return this._unit; } get metric() { return this._metric; } putMetric(value) { this._metric.internalValue = value; } // Temporarily expose input value. Use with caution. get metricInput() { return this._metric.internalValue; } } exports.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference = AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference; _j = JSII_RTTI_SYMBOL_1; AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference[_j] = { fqn: "@cdktf/provider-aws.appautoscalingPolicy.AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference", version: "19.50.0" }; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToTerraform(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 { expression: cdktf.stringToTerraform(struct.expression), id: cdktf.stringToTerraform(struct.id), label: cdktf.stringToTerraform(struct.label), return_data: cdktf.booleanToTerraform(struct.returnData), metric_stat: appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToTerraform(struct.metricStat), }; } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToTerraform; function appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToHclTerraform(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 = { expression: { value: cdktf.stringToHclTerraform(struct.expression), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, label: { value: cdktf.stringToHclTerraform(struct.label), isBlock: false, type: "simple", storageClassType: "string", }, return_data: { value: cdktf.booleanToHclTerraform(struct.returnData), isBlock: false, type: "simple", storageClassType: "boolean", }, metric_stat: { value: appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatToHclTerraform(struct.metricStat), isBlock: true, type: "list", storageClassType: "AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToHclTerraform = appautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsToHclTerraform; class AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsOutputReference 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; // metric_stat - computed: false, optional: true, required: false this._metricStat = new AppautoscalingPolicyTargetTrackingScalingPolicyConfigurationCustomizedMetricSpecificationMetricsMetricStatOutputReference(this, "metric_stat"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._expression !== undefined) { hasAnyValues = true; internalValueResult.expression = this._expression; } if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._label !== undefined) { hasAnyValues = true; internalValueResult.label = this._label; } if (this._returnData !== undefined) { hasAnyValues = true; internalValueResult.returnData = this._returnData; } if (this._metricStat?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.metricStat = this._metricStat?.internalValue; } return hasAnyValues ? internalValueResult : undefined;