UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,123 lines 193 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l; Object.defineProperty(exports, "__esModule", { value: true }); exports.EmrserverlessApplication = exports.EmrserverlessApplicationNetworkConfigurationOutputReference = exports.emrserverlessApplicationNetworkConfigurationToHclTerraform = exports.emrserverlessApplicationNetworkConfigurationToTerraform = exports.EmrserverlessApplicationMaximumCapacityOutputReference = exports.emrserverlessApplicationMaximumCapacityToHclTerraform = exports.emrserverlessApplicationMaximumCapacityToTerraform = exports.EmrserverlessApplicationInteractiveConfigurationOutputReference = exports.emrserverlessApplicationInteractiveConfigurationToHclTerraform = exports.emrserverlessApplicationInteractiveConfigurationToTerraform = exports.EmrserverlessApplicationInitialCapacityList = exports.EmrserverlessApplicationInitialCapacityOutputReference = exports.emrserverlessApplicationInitialCapacityToHclTerraform = exports.emrserverlessApplicationInitialCapacityToTerraform = exports.EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference = exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigToHclTerraform = exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigToTerraform = exports.EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference = exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToHclTerraform = exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToTerraform = exports.EmrserverlessApplicationImageConfigurationOutputReference = exports.emrserverlessApplicationImageConfigurationToHclTerraform = exports.emrserverlessApplicationImageConfigurationToTerraform = exports.EmrserverlessApplicationAutoStopConfigurationOutputReference = exports.emrserverlessApplicationAutoStopConfigurationToHclTerraform = exports.emrserverlessApplicationAutoStopConfigurationToTerraform = exports.EmrserverlessApplicationAutoStartConfigurationOutputReference = exports.emrserverlessApplicationAutoStartConfigurationToHclTerraform = exports.emrserverlessApplicationAutoStartConfigurationToTerraform = void 0; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function emrserverlessApplicationAutoStartConfigurationToTerraform(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), }; } exports.emrserverlessApplicationAutoStartConfigurationToTerraform = emrserverlessApplicationAutoStartConfigurationToTerraform; function emrserverlessApplicationAutoStartConfigurationToHclTerraform(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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationAutoStartConfigurationToHclTerraform = emrserverlessApplicationAutoStartConfigurationToHclTerraform; class EmrserverlessApplicationAutoStartConfigurationOutputReference 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._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; } } 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; } } exports.EmrserverlessApplicationAutoStartConfigurationOutputReference = EmrserverlessApplicationAutoStartConfigurationOutputReference; _a = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationAutoStartConfigurationOutputReference[_a] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationAutoStartConfigurationOutputReference", version: "19.50.0" }; function emrserverlessApplicationAutoStopConfigurationToTerraform(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), idle_timeout_minutes: cdktf.numberToTerraform(struct.idleTimeoutMinutes), }; } exports.emrserverlessApplicationAutoStopConfigurationToTerraform = emrserverlessApplicationAutoStopConfigurationToTerraform; function emrserverlessApplicationAutoStopConfigurationToHclTerraform(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", }, idle_timeout_minutes: { value: cdktf.numberToHclTerraform(struct.idleTimeoutMinutes), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationAutoStopConfigurationToHclTerraform = emrserverlessApplicationAutoStopConfigurationToHclTerraform; class EmrserverlessApplicationAutoStopConfigurationOutputReference 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._enabled !== undefined) { hasAnyValues = true; internalValueResult.enabled = this._enabled; } if (this._idleTimeoutMinutes !== undefined) { hasAnyValues = true; internalValueResult.idleTimeoutMinutes = this._idleTimeoutMinutes; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._enabled = undefined; this._idleTimeoutMinutes = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._enabled = value.enabled; this._idleTimeoutMinutes = value.idleTimeoutMinutes; } } 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 idleTimeoutMinutes() { return this.getNumberAttribute('idle_timeout_minutes'); } set idleTimeoutMinutes(value) { this._idleTimeoutMinutes = value; } resetIdleTimeoutMinutes() { this._idleTimeoutMinutes = undefined; } // Temporarily expose input value. Use with caution. get idleTimeoutMinutesInput() { return this._idleTimeoutMinutes; } } exports.EmrserverlessApplicationAutoStopConfigurationOutputReference = EmrserverlessApplicationAutoStopConfigurationOutputReference; _b = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationAutoStopConfigurationOutputReference[_b] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationAutoStopConfigurationOutputReference", version: "19.50.0" }; function emrserverlessApplicationImageConfigurationToTerraform(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 { image_uri: cdktf.stringToTerraform(struct.imageUri), }; } exports.emrserverlessApplicationImageConfigurationToTerraform = emrserverlessApplicationImageConfigurationToTerraform; function emrserverlessApplicationImageConfigurationToHclTerraform(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 = { image_uri: { value: cdktf.stringToHclTerraform(struct.imageUri), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationImageConfigurationToHclTerraform = emrserverlessApplicationImageConfigurationToHclTerraform; class EmrserverlessApplicationImageConfigurationOutputReference 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._imageUri !== undefined) { hasAnyValues = true; internalValueResult.imageUri = this._imageUri; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._imageUri = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._imageUri = value.imageUri; } } get imageUri() { return this.getStringAttribute('image_uri'); } set imageUri(value) { this._imageUri = value; } // Temporarily expose input value. Use with caution. get imageUriInput() { return this._imageUri; } } exports.EmrserverlessApplicationImageConfigurationOutputReference = EmrserverlessApplicationImageConfigurationOutputReference; _c = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationImageConfigurationOutputReference[_c] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationImageConfigurationOutputReference", version: "19.50.0" }; function emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToTerraform(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 { cpu: cdktf.stringToTerraform(struct.cpu), disk: cdktf.stringToTerraform(struct.disk), memory: cdktf.stringToTerraform(struct.memory), }; } exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToTerraform = emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToTerraform; function emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToHclTerraform(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 = { cpu: { value: cdktf.stringToHclTerraform(struct.cpu), isBlock: false, type: "simple", storageClassType: "string", }, disk: { value: cdktf.stringToHclTerraform(struct.disk), isBlock: false, type: "simple", storageClassType: "string", }, memory: { value: cdktf.stringToHclTerraform(struct.memory), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToHclTerraform = emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToHclTerraform; class EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference 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._cpu !== undefined) { hasAnyValues = true; internalValueResult.cpu = this._cpu; } if (this._disk !== undefined) { hasAnyValues = true; internalValueResult.disk = this._disk; } if (this._memory !== undefined) { hasAnyValues = true; internalValueResult.memory = this._memory; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cpu = undefined; this._disk = undefined; this._memory = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cpu = value.cpu; this._disk = value.disk; this._memory = value.memory; } } get cpu() { return this.getStringAttribute('cpu'); } set cpu(value) { this._cpu = value; } // Temporarily expose input value. Use with caution. get cpuInput() { return this._cpu; } get disk() { return this.getStringAttribute('disk'); } set disk(value) { this._disk = value; } resetDisk() { this._disk = undefined; } // Temporarily expose input value. Use with caution. get diskInput() { return this._disk; } get memory() { return this.getStringAttribute('memory'); } set memory(value) { this._memory = value; } // Temporarily expose input value. Use with caution. get memoryInput() { return this._memory; } } exports.EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference = EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference; _d = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference[_d] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference", version: "19.50.0" }; function emrserverlessApplicationInitialCapacityInitialCapacityConfigToTerraform(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 { worker_count: cdktf.numberToTerraform(struct.workerCount), worker_configuration: emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToTerraform(struct.workerConfiguration), }; } exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigToTerraform = emrserverlessApplicationInitialCapacityInitialCapacityConfigToTerraform; function emrserverlessApplicationInitialCapacityInitialCapacityConfigToHclTerraform(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 = { worker_count: { value: cdktf.numberToHclTerraform(struct.workerCount), isBlock: false, type: "simple", storageClassType: "number", }, worker_configuration: { value: emrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationToHclTerraform(struct.workerConfiguration), isBlock: true, type: "list", storageClassType: "EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationInitialCapacityInitialCapacityConfigToHclTerraform = emrserverlessApplicationInitialCapacityInitialCapacityConfigToHclTerraform; class EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference 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; // worker_configuration - computed: false, optional: true, required: false this._workerConfiguration = new EmrserverlessApplicationInitialCapacityInitialCapacityConfigWorkerConfigurationOutputReference(this, "worker_configuration"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._workerCount !== undefined) { hasAnyValues = true; internalValueResult.workerCount = this._workerCount; } if (this._workerConfiguration?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.workerConfiguration = this._workerConfiguration?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._workerCount = undefined; this._workerConfiguration.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._workerCount = value.workerCount; this._workerConfiguration.internalValue = value.workerConfiguration; } } get workerCount() { return this.getNumberAttribute('worker_count'); } set workerCount(value) { this._workerCount = value; } // Temporarily expose input value. Use with caution. get workerCountInput() { return this._workerCount; } get workerConfiguration() { return this._workerConfiguration; } putWorkerConfiguration(value) { this._workerConfiguration.internalValue = value; } resetWorkerConfiguration() { this._workerConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get workerConfigurationInput() { return this._workerConfiguration.internalValue; } } exports.EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference = EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference; _e = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference[_e] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference", version: "19.50.0" }; function emrserverlessApplicationInitialCapacityToTerraform(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 { initial_capacity_type: cdktf.stringToTerraform(struct.initialCapacityType), initial_capacity_config: emrserverlessApplicationInitialCapacityInitialCapacityConfigToTerraform(struct.initialCapacityConfig), }; } exports.emrserverlessApplicationInitialCapacityToTerraform = emrserverlessApplicationInitialCapacityToTerraform; function emrserverlessApplicationInitialCapacityToHclTerraform(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 = { initial_capacity_type: { value: cdktf.stringToHclTerraform(struct.initialCapacityType), isBlock: false, type: "simple", storageClassType: "string", }, initial_capacity_config: { value: emrserverlessApplicationInitialCapacityInitialCapacityConfigToHclTerraform(struct.initialCapacityConfig), isBlock: true, type: "list", storageClassType: "EmrserverlessApplicationInitialCapacityInitialCapacityConfigList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationInitialCapacityToHclTerraform = emrserverlessApplicationInitialCapacityToHclTerraform; class EmrserverlessApplicationInitialCapacityOutputReference 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; // initial_capacity_config - computed: false, optional: true, required: false this._initialCapacityConfig = new EmrserverlessApplicationInitialCapacityInitialCapacityConfigOutputReference(this, "initial_capacity_config"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._initialCapacityType !== undefined) { hasAnyValues = true; internalValueResult.initialCapacityType = this._initialCapacityType; } if (this._initialCapacityConfig?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.initialCapacityConfig = this._initialCapacityConfig?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._initialCapacityType = undefined; this._initialCapacityConfig.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._initialCapacityType = value.initialCapacityType; this._initialCapacityConfig.internalValue = value.initialCapacityConfig; } } get initialCapacityType() { return this.getStringAttribute('initial_capacity_type'); } set initialCapacityType(value) { this._initialCapacityType = value; } // Temporarily expose input value. Use with caution. get initialCapacityTypeInput() { return this._initialCapacityType; } get initialCapacityConfig() { return this._initialCapacityConfig; } putInitialCapacityConfig(value) { this._initialCapacityConfig.internalValue = value; } resetInitialCapacityConfig() { this._initialCapacityConfig.internalValue = undefined; } // Temporarily expose input value. Use with caution. get initialCapacityConfigInput() { return this._initialCapacityConfig.internalValue; } } exports.EmrserverlessApplicationInitialCapacityOutputReference = EmrserverlessApplicationInitialCapacityOutputReference; _f = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationInitialCapacityOutputReference[_f] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationInitialCapacityOutputReference", version: "19.50.0" }; class EmrserverlessApplicationInitialCapacityList 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 EmrserverlessApplicationInitialCapacityOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.EmrserverlessApplicationInitialCapacityList = EmrserverlessApplicationInitialCapacityList; _g = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationInitialCapacityList[_g] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationInitialCapacityList", version: "19.50.0" }; function emrserverlessApplicationInteractiveConfigurationToTerraform(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 { livy_endpoint_enabled: cdktf.booleanToTerraform(struct.livyEndpointEnabled), studio_enabled: cdktf.booleanToTerraform(struct.studioEnabled), }; } exports.emrserverlessApplicationInteractiveConfigurationToTerraform = emrserverlessApplicationInteractiveConfigurationToTerraform; function emrserverlessApplicationInteractiveConfigurationToHclTerraform(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 = { livy_endpoint_enabled: { value: cdktf.booleanToHclTerraform(struct.livyEndpointEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, studio_enabled: { value: cdktf.booleanToHclTerraform(struct.studioEnabled), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationInteractiveConfigurationToHclTerraform = emrserverlessApplicationInteractiveConfigurationToHclTerraform; class EmrserverlessApplicationInteractiveConfigurationOutputReference 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._livyEndpointEnabled !== undefined) { hasAnyValues = true; internalValueResult.livyEndpointEnabled = this._livyEndpointEnabled; } if (this._studioEnabled !== undefined) { hasAnyValues = true; internalValueResult.studioEnabled = this._studioEnabled; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._livyEndpointEnabled = undefined; this._studioEnabled = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._livyEndpointEnabled = value.livyEndpointEnabled; this._studioEnabled = value.studioEnabled; } } get livyEndpointEnabled() { return this.getBooleanAttribute('livy_endpoint_enabled'); } set livyEndpointEnabled(value) { this._livyEndpointEnabled = value; } resetLivyEndpointEnabled() { this._livyEndpointEnabled = undefined; } // Temporarily expose input value. Use with caution. get livyEndpointEnabledInput() { return this._livyEndpointEnabled; } get studioEnabled() { return this.getBooleanAttribute('studio_enabled'); } set studioEnabled(value) { this._studioEnabled = value; } resetStudioEnabled() { this._studioEnabled = undefined; } // Temporarily expose input value. Use with caution. get studioEnabledInput() { return this._studioEnabled; } } exports.EmrserverlessApplicationInteractiveConfigurationOutputReference = EmrserverlessApplicationInteractiveConfigurationOutputReference; _h = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationInteractiveConfigurationOutputReference[_h] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationInteractiveConfigurationOutputReference", version: "19.50.0" }; function emrserverlessApplicationMaximumCapacityToTerraform(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 { cpu: cdktf.stringToTerraform(struct.cpu), disk: cdktf.stringToTerraform(struct.disk), memory: cdktf.stringToTerraform(struct.memory), }; } exports.emrserverlessApplicationMaximumCapacityToTerraform = emrserverlessApplicationMaximumCapacityToTerraform; function emrserverlessApplicationMaximumCapacityToHclTerraform(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 = { cpu: { value: cdktf.stringToHclTerraform(struct.cpu), isBlock: false, type: "simple", storageClassType: "string", }, disk: { value: cdktf.stringToHclTerraform(struct.disk), isBlock: false, type: "simple", storageClassType: "string", }, memory: { value: cdktf.stringToHclTerraform(struct.memory), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationMaximumCapacityToHclTerraform = emrserverlessApplicationMaximumCapacityToHclTerraform; class EmrserverlessApplicationMaximumCapacityOutputReference 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._cpu !== undefined) { hasAnyValues = true; internalValueResult.cpu = this._cpu; } if (this._disk !== undefined) { hasAnyValues = true; internalValueResult.disk = this._disk; } if (this._memory !== undefined) { hasAnyValues = true; internalValueResult.memory = this._memory; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._cpu = undefined; this._disk = undefined; this._memory = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._cpu = value.cpu; this._disk = value.disk; this._memory = value.memory; } } get cpu() { return this.getStringAttribute('cpu'); } set cpu(value) { this._cpu = value; } // Temporarily expose input value. Use with caution. get cpuInput() { return this._cpu; } get disk() { return this.getStringAttribute('disk'); } set disk(value) { this._disk = value; } resetDisk() { this._disk = undefined; } // Temporarily expose input value. Use with caution. get diskInput() { return this._disk; } get memory() { return this.getStringAttribute('memory'); } set memory(value) { this._memory = value; } // Temporarily expose input value. Use with caution. get memoryInput() { return this._memory; } } exports.EmrserverlessApplicationMaximumCapacityOutputReference = EmrserverlessApplicationMaximumCapacityOutputReference; _j = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationMaximumCapacityOutputReference[_j] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationMaximumCapacityOutputReference", version: "19.50.0" }; function emrserverlessApplicationNetworkConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.securityGroupIds), subnet_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.subnetIds), }; } exports.emrserverlessApplicationNetworkConfigurationToTerraform = emrserverlessApplicationNetworkConfigurationToTerraform; function emrserverlessApplicationNetworkConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { security_group_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.securityGroupIds), isBlock: false, type: "set", storageClassType: "stringList", }, subnet_ids: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.subnetIds), isBlock: false, type: "set", storageClassType: "stringList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.emrserverlessApplicationNetworkConfigurationToHclTerraform = emrserverlessApplicationNetworkConfigurationToHclTerraform; class EmrserverlessApplicationNetworkConfigurationOutputReference 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._securityGroupIds !== undefined) { hasAnyValues = true; internalValueResult.securityGroupIds = this._securityGroupIds; } if (this._subnetIds !== undefined) { hasAnyValues = true; internalValueResult.subnetIds = this._subnetIds; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._securityGroupIds = undefined; this._subnetIds = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._securityGroupIds = value.securityGroupIds; this._subnetIds = value.subnetIds; } } get securityGroupIds() { return cdktf.Fn.tolist(this.getListAttribute('security_group_ids')); } set securityGroupIds(value) { this._securityGroupIds = value; } resetSecurityGroupIds() { this._securityGroupIds = undefined; } // Temporarily expose input value. Use with caution. get securityGroupIdsInput() { return this._securityGroupIds; } get subnetIds() { return cdktf.Fn.tolist(this.getListAttribute('subnet_ids')); } set subnetIds(value) { this._subnetIds = value; } resetSubnetIds() { this._subnetIds = undefined; } // Temporarily expose input value. Use with caution. get subnetIdsInput() { return this._subnetIds; } } exports.EmrserverlessApplicationNetworkConfigurationOutputReference = EmrserverlessApplicationNetworkConfigurationOutputReference; _k = JSII_RTTI_SYMBOL_1; EmrserverlessApplicationNetworkConfigurationOutputReference[_k] = { fqn: "@cdktf/provider-aws.emrserverlessApplication.EmrserverlessApplicationNetworkConfigurationOutputReference", version: "19.50.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/emrserverless_application aws_emrserverless_application} */ class EmrserverlessApplication extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a EmrserverlessApplication 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 EmrserverlessApplication to import * @param importFromId The id of the existing EmrserverlessApplication that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/emrserverless_application#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the EmrserverlessApplication to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_emrserverless_application", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/5.84.0/docs/resources/emrserverless_application aws_emrserverless_application} 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 EmrserverlessApplicationConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_emrserverless_application', terraformGeneratorMetadata: { providerName: 'aws', providerVersion: '5.84.0', providerVersionConstraint: '~> 5.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // auto_start_configuration - computed: false, optional: true, required: false this._autoStartConfiguration = new EmrserverlessApplicationAutoStartConfigurationOutputReference(this, "auto_start_configuration"); // auto_stop_configuration - computed: false, optional: true, required: false this._autoStopConfiguration = new EmrserverlessApplicationAutoStopConfigurationOutputReference(this, "auto_stop_configuration"); // image_configuration - computed: false, optional: true, required: false this._imageConfiguration = new EmrserverlessApplicationImageConfigurationOutputReference(this, "image_configuration"); // initial_capacity - computed: false, optional: true, required: false this._initialCapacity = new EmrserverlessApplicationInitialCapacityList(this, "initial_capacity", true); // interactive_configuration - computed: false, optional: true, required: false this._interactiveConfiguration = new EmrserverlessApplicationInteractiveConfigurationOutputReference(this, "interactive_configuration"); // maximum_capacity - computed: false, optional: true, required: false this._maximumCapacity = new EmrserverlessApplicationMaximumCapacityOutputReference(this, "maximum_capacity"); // network_configuration - computed: false, optional: true, required: false this._networkConfiguration = new EmrserverlessApplicationNetworkConfigurationOutputReference(this, "network_configuration"); this._architecture = config.architecture; this._id = config.id; this._name = config.name; this._releaseLabel = config.releaseLabel; this._tags = config.tags; this._tagsAll = config.tagsAll; this._type = config.type; this._autoStartConfiguration.internalValue = config.autoStartConfiguration; this._autoStopConfiguration.internalValue = config.autoStopConfiguration; this._imageConfiguration.internalValue = config.imageConfiguration; this._initialCapacity.internalValue = config.initialCapacity; this._interactiveConfiguration.internalValue = config.interactiveConfiguration; this._maximumCapacity.internalValue = config.maximumCapacity; this._networkConfiguration.internalValue = config.networkConfiguration; } get architecture() { return this.getStringAttribute('architecture'); } set architecture(value) { this._architecture = value; } resetArchitecture() { this._architecture = undefined; } // Temporarily expose input value. Use with caution. get architectureInput() { return this._architecture; } // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } 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; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get releaseLabel() { return this.getStringAttribute('release_label'); } set releaseLabel(value) { this._releaseLabel = value; } // Temporarily expose input value. Use with caution. get releaseLabelInput() { return this._releaseLabel; } get tags() { return this.getStringMapAttribute('tags'); } set tags(value) { this._tags = value; } resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. get tagsInput() { return this._tags; } get tagsAll() { return this.getStringMapAttribute('tags_all'); } set tagsAll(value) { this._tagsAll = value; } resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. get tagsAllInput() { return this._tagsAll; } 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 autoStartConfiguration() { return this._autoStartConfiguration; } putAutoStartConfiguration(value) { this._autoStartConfiguration.internalValue = value; } resetAutoStartConfiguration() { this._autoStartConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get autoStartConfigurationInput() { return this._autoStartConfiguration.internalValue; } get autoStopConfiguration() { return this._autoStopConfiguration; } putAutoStopConfiguration(value) { this._autoStopConfiguration.internalValue = value; } resetAutoStopConfiguration() { this._autoStopConfiguration.internalValue = undefined; } // Temporarily expose input value. Use with caution. get autoStopConfigurationInput() { return this._autoStopConfiguration