UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,122 lines 175 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; Object.defineProperty(exports, "__esModule", { value: true }); exports.EmrInstanceFleet = exports.EmrInstanceFleetLaunchSpecificationsOutputReference = exports.EmrInstanceFleetLaunchSpecificationsSpotSpecificationList = exports.EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference = exports.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList = exports.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference = exports.EmrInstanceFleetInstanceTypeConfigsList = exports.EmrInstanceFleetInstanceTypeConfigsOutputReference = exports.EmrInstanceFleetInstanceTypeConfigsEbsConfigList = exports.EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference = exports.EmrInstanceFleetInstanceTypeConfigsConfigurationsList = exports.EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference = void 0; exports.emrInstanceFleetInstanceTypeConfigsConfigurationsToTerraform = emrInstanceFleetInstanceTypeConfigsConfigurationsToTerraform; exports.emrInstanceFleetInstanceTypeConfigsConfigurationsToHclTerraform = emrInstanceFleetInstanceTypeConfigsConfigurationsToHclTerraform; exports.emrInstanceFleetInstanceTypeConfigsEbsConfigToTerraform = emrInstanceFleetInstanceTypeConfigsEbsConfigToTerraform; exports.emrInstanceFleetInstanceTypeConfigsEbsConfigToHclTerraform = emrInstanceFleetInstanceTypeConfigsEbsConfigToHclTerraform; exports.emrInstanceFleetInstanceTypeConfigsToTerraform = emrInstanceFleetInstanceTypeConfigsToTerraform; exports.emrInstanceFleetInstanceTypeConfigsToHclTerraform = emrInstanceFleetInstanceTypeConfigsToHclTerraform; exports.emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToTerraform = emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToTerraform; exports.emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToHclTerraform = emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToHclTerraform; exports.emrInstanceFleetLaunchSpecificationsSpotSpecificationToTerraform = emrInstanceFleetLaunchSpecificationsSpotSpecificationToTerraform; exports.emrInstanceFleetLaunchSpecificationsSpotSpecificationToHclTerraform = emrInstanceFleetLaunchSpecificationsSpotSpecificationToHclTerraform; exports.emrInstanceFleetLaunchSpecificationsToTerraform = emrInstanceFleetLaunchSpecificationsToTerraform; exports.emrInstanceFleetLaunchSpecificationsToHclTerraform = emrInstanceFleetLaunchSpecificationsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function emrInstanceFleetInstanceTypeConfigsConfigurationsToTerraform(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 { classification: cdktf.stringToTerraform(struct.classification), properties: cdktf.hashMapper(cdktf.stringToTerraform)(struct.properties), }; } function emrInstanceFleetInstanceTypeConfigsConfigurationsToHclTerraform(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 = { classification: { value: cdktf.stringToHclTerraform(struct.classification), isBlock: false, type: "simple", storageClassType: "string", }, properties: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.properties), isBlock: false, type: "map", storageClassType: "stringMap", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference 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._classification !== undefined) { hasAnyValues = true; internalValueResult.classification = this._classification; } if (this._properties !== undefined) { hasAnyValues = true; internalValueResult.properties = this._properties; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._classification = undefined; this._properties = 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._classification = value.classification; this._properties = value.properties; } } get classification() { return this.getStringAttribute('classification'); } set classification(value) { this._classification = value; } resetClassification() { this._classification = undefined; } // Temporarily expose input value. Use with caution. get classificationInput() { return this._classification; } get properties() { return this.getStringMapAttribute('properties'); } set properties(value) { this._properties = value; } resetProperties() { this._properties = undefined; } // Temporarily expose input value. Use with caution. get propertiesInput() { return this._properties; } } exports.EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference = EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference; _a = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference[_a] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference", version: "21.22.1" }; class EmrInstanceFleetInstanceTypeConfigsConfigurationsList 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 EmrInstanceFleetInstanceTypeConfigsConfigurationsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrInstanceFleetInstanceTypeConfigsConfigurationsList = EmrInstanceFleetInstanceTypeConfigsConfigurationsList; _b = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsConfigurationsList[_b] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsConfigurationsList", version: "21.22.1" }; function emrInstanceFleetInstanceTypeConfigsEbsConfigToTerraform(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 { iops: cdktf.numberToTerraform(struct.iops), size: cdktf.numberToTerraform(struct.size), type: cdktf.stringToTerraform(struct.type), volumes_per_instance: cdktf.numberToTerraform(struct.volumesPerInstance), }; } function emrInstanceFleetInstanceTypeConfigsEbsConfigToHclTerraform(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 = { iops: { value: cdktf.numberToHclTerraform(struct.iops), isBlock: false, type: "simple", storageClassType: "number", }, size: { value: cdktf.numberToHclTerraform(struct.size), isBlock: false, type: "simple", storageClassType: "number", }, type: { value: cdktf.stringToHclTerraform(struct.type), isBlock: false, type: "simple", storageClassType: "string", }, volumes_per_instance: { value: cdktf.numberToHclTerraform(struct.volumesPerInstance), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference 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._iops !== undefined) { hasAnyValues = true; internalValueResult.iops = this._iops; } if (this._size !== undefined) { hasAnyValues = true; internalValueResult.size = this._size; } if (this._type !== undefined) { hasAnyValues = true; internalValueResult.type = this._type; } if (this._volumesPerInstance !== undefined) { hasAnyValues = true; internalValueResult.volumesPerInstance = this._volumesPerInstance; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._iops = undefined; this._size = undefined; this._type = undefined; this._volumesPerInstance = 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._iops = value.iops; this._size = value.size; this._type = value.type; this._volumesPerInstance = value.volumesPerInstance; } } 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 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; } // Temporarily expose input value. Use with caution. get typeInput() { return this._type; } get volumesPerInstance() { return this.getNumberAttribute('volumes_per_instance'); } set volumesPerInstance(value) { this._volumesPerInstance = value; } resetVolumesPerInstance() { this._volumesPerInstance = undefined; } // Temporarily expose input value. Use with caution. get volumesPerInstanceInput() { return this._volumesPerInstance; } } exports.EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference = EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference; _c = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference[_c] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference", version: "21.22.1" }; class EmrInstanceFleetInstanceTypeConfigsEbsConfigList 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 EmrInstanceFleetInstanceTypeConfigsEbsConfigOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrInstanceFleetInstanceTypeConfigsEbsConfigList = EmrInstanceFleetInstanceTypeConfigsEbsConfigList; _d = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsEbsConfigList[_d] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsEbsConfigList", version: "21.22.1" }; function emrInstanceFleetInstanceTypeConfigsToTerraform(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 { bid_price: cdktf.stringToTerraform(struct.bidPrice), bid_price_as_percentage_of_on_demand_price: cdktf.numberToTerraform(struct.bidPriceAsPercentageOfOnDemandPrice), instance_type: cdktf.stringToTerraform(struct.instanceType), weighted_capacity: cdktf.numberToTerraform(struct.weightedCapacity), configurations: cdktf.listMapper(emrInstanceFleetInstanceTypeConfigsConfigurationsToTerraform, true)(struct.configurations), ebs_config: cdktf.listMapper(emrInstanceFleetInstanceTypeConfigsEbsConfigToTerraform, true)(struct.ebsConfig), }; } function emrInstanceFleetInstanceTypeConfigsToHclTerraform(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 = { bid_price: { value: cdktf.stringToHclTerraform(struct.bidPrice), isBlock: false, type: "simple", storageClassType: "string", }, bid_price_as_percentage_of_on_demand_price: { value: cdktf.numberToHclTerraform(struct.bidPriceAsPercentageOfOnDemandPrice), isBlock: false, type: "simple", storageClassType: "number", }, instance_type: { value: cdktf.stringToHclTerraform(struct.instanceType), isBlock: false, type: "simple", storageClassType: "string", }, weighted_capacity: { value: cdktf.numberToHclTerraform(struct.weightedCapacity), isBlock: false, type: "simple", storageClassType: "number", }, configurations: { value: cdktf.listMapperHcl(emrInstanceFleetInstanceTypeConfigsConfigurationsToHclTerraform, true)(struct.configurations), isBlock: true, type: "set", storageClassType: "EmrInstanceFleetInstanceTypeConfigsConfigurationsList", }, ebs_config: { value: cdktf.listMapperHcl(emrInstanceFleetInstanceTypeConfigsEbsConfigToHclTerraform, true)(struct.ebsConfig), isBlock: true, type: "set", storageClassType: "EmrInstanceFleetInstanceTypeConfigsEbsConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetInstanceTypeConfigsOutputReference 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; // configurations - computed: false, optional: true, required: false this._configurations = new EmrInstanceFleetInstanceTypeConfigsConfigurationsList(this, "configurations", true); // ebs_config - computed: false, optional: true, required: false this._ebsConfig = new EmrInstanceFleetInstanceTypeConfigsEbsConfigList(this, "ebs_config", true); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._bidPrice !== undefined) { hasAnyValues = true; internalValueResult.bidPrice = this._bidPrice; } if (this._bidPriceAsPercentageOfOnDemandPrice !== undefined) { hasAnyValues = true; internalValueResult.bidPriceAsPercentageOfOnDemandPrice = this._bidPriceAsPercentageOfOnDemandPrice; } if (this._instanceType !== undefined) { hasAnyValues = true; internalValueResult.instanceType = this._instanceType; } if (this._weightedCapacity !== undefined) { hasAnyValues = true; internalValueResult.weightedCapacity = this._weightedCapacity; } if (this._configurations?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.configurations = this._configurations?.internalValue; } if (this._ebsConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.ebsConfig = this._ebsConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._bidPrice = undefined; this._bidPriceAsPercentageOfOnDemandPrice = undefined; this._instanceType = undefined; this._weightedCapacity = undefined; this._configurations.internalValue = undefined; this._ebsConfig.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._bidPrice = value.bidPrice; this._bidPriceAsPercentageOfOnDemandPrice = value.bidPriceAsPercentageOfOnDemandPrice; this._instanceType = value.instanceType; this._weightedCapacity = value.weightedCapacity; this._configurations.internalValue = value.configurations; this._ebsConfig.internalValue = value.ebsConfig; } } get bidPrice() { return this.getStringAttribute('bid_price'); } set bidPrice(value) { this._bidPrice = value; } resetBidPrice() { this._bidPrice = undefined; } // Temporarily expose input value. Use with caution. get bidPriceInput() { return this._bidPrice; } get bidPriceAsPercentageOfOnDemandPrice() { return this.getNumberAttribute('bid_price_as_percentage_of_on_demand_price'); } set bidPriceAsPercentageOfOnDemandPrice(value) { this._bidPriceAsPercentageOfOnDemandPrice = value; } resetBidPriceAsPercentageOfOnDemandPrice() { this._bidPriceAsPercentageOfOnDemandPrice = undefined; } // Temporarily expose input value. Use with caution. get bidPriceAsPercentageOfOnDemandPriceInput() { return this._bidPriceAsPercentageOfOnDemandPrice; } get instanceType() { return this.getStringAttribute('instance_type'); } set instanceType(value) { this._instanceType = value; } // Temporarily expose input value. Use with caution. get instanceTypeInput() { return this._instanceType; } get weightedCapacity() { return this.getNumberAttribute('weighted_capacity'); } set weightedCapacity(value) { this._weightedCapacity = value; } resetWeightedCapacity() { this._weightedCapacity = undefined; } // Temporarily expose input value. Use with caution. get weightedCapacityInput() { return this._weightedCapacity; } get configurations() { return this._configurations; } putConfigurations(value) { this._configurations.internalValue = value; } resetConfigurations() { this._configurations.internalValue = undefined; } // Temporarily expose input value. Use with caution. get configurationsInput() { return this._configurations.internalValue; } get ebsConfig() { return this._ebsConfig; } putEbsConfig(value) { this._ebsConfig.internalValue = value; } resetEbsConfig() { this._ebsConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get ebsConfigInput() { return this._ebsConfig.internalValue; } } exports.EmrInstanceFleetInstanceTypeConfigsOutputReference = EmrInstanceFleetInstanceTypeConfigsOutputReference; _e = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsOutputReference[_e] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsOutputReference", version: "21.22.1" }; class EmrInstanceFleetInstanceTypeConfigsList 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 EmrInstanceFleetInstanceTypeConfigsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrInstanceFleetInstanceTypeConfigsList = EmrInstanceFleetInstanceTypeConfigsList; _f = JSII_RTTI_SYMBOL_1; EmrInstanceFleetInstanceTypeConfigsList[_f] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetInstanceTypeConfigsList", version: "21.22.1" }; function emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToTerraform(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 { allocation_strategy: cdktf.stringToTerraform(struct.allocationStrategy), }; } function emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToHclTerraform(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 = { allocation_strategy: { value: cdktf.stringToHclTerraform(struct.allocationStrategy), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference 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._allocationStrategy !== undefined) { hasAnyValues = true; internalValueResult.allocationStrategy = this._allocationStrategy; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._allocationStrategy = 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._allocationStrategy = value.allocationStrategy; } } get allocationStrategy() { return this.getStringAttribute('allocation_strategy'); } set allocationStrategy(value) { this._allocationStrategy = value; } // Temporarily expose input value. Use with caution. get allocationStrategyInput() { return this._allocationStrategy; } } exports.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference = EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference; _g = JSII_RTTI_SYMBOL_1; EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference[_g] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference", version: "21.22.1" }; class EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList 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 EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList = EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList; _h = JSII_RTTI_SYMBOL_1; EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList[_h] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList", version: "21.22.1" }; function emrInstanceFleetLaunchSpecificationsSpotSpecificationToTerraform(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 { allocation_strategy: cdktf.stringToTerraform(struct.allocationStrategy), block_duration_minutes: cdktf.numberToTerraform(struct.blockDurationMinutes), timeout_action: cdktf.stringToTerraform(struct.timeoutAction), timeout_duration_minutes: cdktf.numberToTerraform(struct.timeoutDurationMinutes), }; } function emrInstanceFleetLaunchSpecificationsSpotSpecificationToHclTerraform(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 = { allocation_strategy: { value: cdktf.stringToHclTerraform(struct.allocationStrategy), isBlock: false, type: "simple", storageClassType: "string", }, block_duration_minutes: { value: cdktf.numberToHclTerraform(struct.blockDurationMinutes), isBlock: false, type: "simple", storageClassType: "number", }, timeout_action: { value: cdktf.stringToHclTerraform(struct.timeoutAction), isBlock: false, type: "simple", storageClassType: "string", }, timeout_duration_minutes: { value: cdktf.numberToHclTerraform(struct.timeoutDurationMinutes), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference 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._allocationStrategy !== undefined) { hasAnyValues = true; internalValueResult.allocationStrategy = this._allocationStrategy; } if (this._blockDurationMinutes !== undefined) { hasAnyValues = true; internalValueResult.blockDurationMinutes = this._blockDurationMinutes; } if (this._timeoutAction !== undefined) { hasAnyValues = true; internalValueResult.timeoutAction = this._timeoutAction; } if (this._timeoutDurationMinutes !== undefined) { hasAnyValues = true; internalValueResult.timeoutDurationMinutes = this._timeoutDurationMinutes; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._allocationStrategy = undefined; this._blockDurationMinutes = undefined; this._timeoutAction = undefined; this._timeoutDurationMinutes = 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._allocationStrategy = value.allocationStrategy; this._blockDurationMinutes = value.blockDurationMinutes; this._timeoutAction = value.timeoutAction; this._timeoutDurationMinutes = value.timeoutDurationMinutes; } } get allocationStrategy() { return this.getStringAttribute('allocation_strategy'); } set allocationStrategy(value) { this._allocationStrategy = value; } // Temporarily expose input value. Use with caution. get allocationStrategyInput() { return this._allocationStrategy; } get blockDurationMinutes() { return this.getNumberAttribute('block_duration_minutes'); } set blockDurationMinutes(value) { this._blockDurationMinutes = value; } resetBlockDurationMinutes() { this._blockDurationMinutes = undefined; } // Temporarily expose input value. Use with caution. get blockDurationMinutesInput() { return this._blockDurationMinutes; } get timeoutAction() { return this.getStringAttribute('timeout_action'); } set timeoutAction(value) { this._timeoutAction = value; } // Temporarily expose input value. Use with caution. get timeoutActionInput() { return this._timeoutAction; } get timeoutDurationMinutes() { return this.getNumberAttribute('timeout_duration_minutes'); } set timeoutDurationMinutes(value) { this._timeoutDurationMinutes = value; } // Temporarily expose input value. Use with caution. get timeoutDurationMinutesInput() { return this._timeoutDurationMinutes; } } exports.EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference = EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference; _j = JSII_RTTI_SYMBOL_1; EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference[_j] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference", version: "21.22.1" }; class EmrInstanceFleetLaunchSpecificationsSpotSpecificationList 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 EmrInstanceFleetLaunchSpecificationsSpotSpecificationOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrInstanceFleetLaunchSpecificationsSpotSpecificationList = EmrInstanceFleetLaunchSpecificationsSpotSpecificationList; _k = JSII_RTTI_SYMBOL_1; EmrInstanceFleetLaunchSpecificationsSpotSpecificationList[_k] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetLaunchSpecificationsSpotSpecificationList", version: "21.22.1" }; function emrInstanceFleetLaunchSpecificationsToTerraform(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 { on_demand_specification: cdktf.listMapper(emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToTerraform, true)(struct.onDemandSpecification), spot_specification: cdktf.listMapper(emrInstanceFleetLaunchSpecificationsSpotSpecificationToTerraform, true)(struct.spotSpecification), }; } function emrInstanceFleetLaunchSpecificationsToHclTerraform(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 = { on_demand_specification: { value: cdktf.listMapperHcl(emrInstanceFleetLaunchSpecificationsOnDemandSpecificationToHclTerraform, true)(struct.onDemandSpecification), isBlock: true, type: "list", storageClassType: "EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList", }, spot_specification: { value: cdktf.listMapperHcl(emrInstanceFleetLaunchSpecificationsSpotSpecificationToHclTerraform, true)(struct.spotSpecification), isBlock: true, type: "list", storageClassType: "EmrInstanceFleetLaunchSpecificationsSpotSpecificationList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class EmrInstanceFleetLaunchSpecificationsOutputReference 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; // on_demand_specification - computed: false, optional: true, required: false this._onDemandSpecification = new EmrInstanceFleetLaunchSpecificationsOnDemandSpecificationList(this, "on_demand_specification", false); // spot_specification - computed: false, optional: true, required: false this._spotSpecification = new EmrInstanceFleetLaunchSpecificationsSpotSpecificationList(this, "spot_specification", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._onDemandSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.onDemandSpecification = this._onDemandSpecification?.internalValue; } if (this._spotSpecification?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.spotSpecification = this._spotSpecification?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._onDemandSpecification.internalValue = undefined; this._spotSpecification.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._onDemandSpecification.internalValue = value.onDemandSpecification; this._spotSpecification.internalValue = value.spotSpecification; } } get onDemandSpecification() { return this._onDemandSpecification; } putOnDemandSpecification(value) { this._onDemandSpecification.internalValue = value; } resetOnDemandSpecification() { this._onDemandSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. get onDemandSpecificationInput() { return this._onDemandSpecification.internalValue; } get spotSpecification() { return this._spotSpecification; } putSpotSpecification(value) { this._spotSpecification.internalValue = value; } resetSpotSpecification() { this._spotSpecification.internalValue = undefined; } // Temporarily expose input value. Use with caution. get spotSpecificationInput() { return this._spotSpecification.internalValue; } } exports.EmrInstanceFleetLaunchSpecificationsOutputReference = EmrInstanceFleetLaunchSpecificationsOutputReference; _l = JSII_RTTI_SYMBOL_1; EmrInstanceFleetLaunchSpecificationsOutputReference[_l] = { fqn: "@cdktf/provider-aws.emrInstanceFleet.EmrInstanceFleetLaunchSpecificationsOutputReference", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/emr_instance_fleet aws_emr_instance_fleet} */ class EmrInstanceFleet extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a EmrInstanceFleet 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 EmrInstanceFleet to import * @param importFromId The id of the existing EmrInstanceFleet that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/emr_instance_fleet#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the EmrInstanceFleet to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_emr_instance_fleet", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/emr_instance_fleet aws_emr_instance_fleet} 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 EmrInstanceFleetConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_emr_instance_fleet', 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 }); // instance_type_configs - computed: false, optional: true, required: false this._instanceTypeConfigs = new EmrInstanceFleetInstanceTypeConfigsList(this, "instance_type_configs", true); // launch_specifications - computed: false, optional: true, required: false this._launchSpecifications = new EmrInstanceFleetLaunchSpecificationsOutputReference(this, "launch_specifications"); this._clusterId = config.clusterId; this._id = config.id; this._name = config.name; this._region = config.region; this._targetOnDemandCapacity = config.targetOnDemandCapacity; this._targetSpotCapacity = config.targetSpotCapacity; this._instanceTypeConfigs.internalValue = config.instanceTypeConfigs; this._launchSpecifications.internalValue = config.launchSpecifications; } get clusterId() { return this.getStringAttribute('cluster_id'); } set clusterId(value) { this._clusterId = value; } // Temporarily expose input value. Use with caution. get clusterIdInput() { return this._clusterId; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } resetName() { this._name = undefined; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } // provisioned_on_demand_capacity - computed: true, optional: false, required: false get provisionedOnDemandCapacity() { return this.getNumberAttribute('provisioned_on_demand_capacity'); } // provisioned_spot_capacity - computed: true, optional: false, required: false get provisionedSpotCapacity() { return this.getNumberAttribute('provisioned_spot_capacity'); } 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 targetOnDemandCapacity() { return this.getNumberAttribute('target_on_demand_capacity'); } set targetOnDemandCapacity(value) { this._targetOnDemandCapacity = value; } resetTargetOnDemandCapacity() { this._targetOnDemandCapacity = undefined; } // Temporarily expose input value. Use with caution. get targetOnDemandCapacityInput() { return this._targetOnDemandCapacity; } get targetSpotCapacity() { return this.getNumberAttribute('target_spot_capacity'); } set targetSpotCapacity(value) { this._targetSpotCapacity = value; } resetTargetSpotCapacity() { this._targetSpotCapacity = undefined; } // Temporarily expose input value. Use with caution. get targetSpotCapacityInput() { return this._targetSpotCapacity; } get instanceTypeConfigs() { return this._instanceTypeConfigs; } putInstanceTypeConfigs(value) { this._instanceTypeConfigs.internalValue = value; } resetInstanceTypeConfigs() { this._instanceTypeConfigs.internalValue = undefined; } // Temporarily expose input value. Use with caution. get instanceTypeConfigsInput() { return this._instanceTypeConfigs.internalValue; } get launchSpecifications() { return this._launchSpecifications; } putLaunchSpecifications(value) { this._launchSpecifications.internalValue = value; } resetLaunchSpecifications() { this._launchSpecifications.internalValue = undefined; } // Temporarily expose input value. Use with caution. get launchSpecificationsInput() { return this._launchSpecifications.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { r