UNPKG

@cdktf/provider-aws

Version:

Prebuilt aws Provider for Terraform CDK (cdktf)

1,238 lines 347 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h; Object.defineProperty(exports, "__esModule", { value: true }); exports.RdsCluster = exports.RdsClusterTimeoutsOutputReference = exports.RdsClusterServerlessv2ScalingConfigurationOutputReference = exports.RdsClusterScalingConfigurationOutputReference = exports.RdsClusterS3ImportOutputReference = exports.RdsClusterRestoreToPointInTimeOutputReference = exports.RdsClusterMasterUserSecretList = exports.RdsClusterMasterUserSecretOutputReference = void 0; exports.rdsClusterMasterUserSecretToTerraform = rdsClusterMasterUserSecretToTerraform; exports.rdsClusterMasterUserSecretToHclTerraform = rdsClusterMasterUserSecretToHclTerraform; exports.rdsClusterRestoreToPointInTimeToTerraform = rdsClusterRestoreToPointInTimeToTerraform; exports.rdsClusterRestoreToPointInTimeToHclTerraform = rdsClusterRestoreToPointInTimeToHclTerraform; exports.rdsClusterS3ImportToTerraform = rdsClusterS3ImportToTerraform; exports.rdsClusterS3ImportToHclTerraform = rdsClusterS3ImportToHclTerraform; exports.rdsClusterScalingConfigurationToTerraform = rdsClusterScalingConfigurationToTerraform; exports.rdsClusterScalingConfigurationToHclTerraform = rdsClusterScalingConfigurationToHclTerraform; exports.rdsClusterServerlessv2ScalingConfigurationToTerraform = rdsClusterServerlessv2ScalingConfigurationToTerraform; exports.rdsClusterServerlessv2ScalingConfigurationToHclTerraform = rdsClusterServerlessv2ScalingConfigurationToHclTerraform; exports.rdsClusterTimeoutsToTerraform = rdsClusterTimeoutsToTerraform; exports.rdsClusterTimeoutsToHclTerraform = rdsClusterTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function rdsClusterMasterUserSecretToTerraform(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 {}; } function rdsClusterMasterUserSecretToHclTerraform(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 = {}; return attrs; } class RdsClusterMasterUserSecretOutputReference 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() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; } else { this.isEmptyObject = Object.keys(value).length === 0; } } // kms_key_id - computed: true, optional: false, required: false get kmsKeyId() { return this.getStringAttribute('kms_key_id'); } // secret_arn - computed: true, optional: false, required: false get secretArn() { return this.getStringAttribute('secret_arn'); } // secret_status - computed: true, optional: false, required: false get secretStatus() { return this.getStringAttribute('secret_status'); } } exports.RdsClusterMasterUserSecretOutputReference = RdsClusterMasterUserSecretOutputReference; _a = JSII_RTTI_SYMBOL_1; RdsClusterMasterUserSecretOutputReference[_a] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterMasterUserSecretOutputReference", version: "21.22.1" }; class RdsClusterMasterUserSecretList 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 RdsClusterMasterUserSecretOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.RdsClusterMasterUserSecretList = RdsClusterMasterUserSecretList; _b = JSII_RTTI_SYMBOL_1; RdsClusterMasterUserSecretList[_b] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterMasterUserSecretList", version: "21.22.1" }; function rdsClusterRestoreToPointInTimeToTerraform(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 { restore_to_time: cdktf.stringToTerraform(struct.restoreToTime), restore_type: cdktf.stringToTerraform(struct.restoreType), source_cluster_identifier: cdktf.stringToTerraform(struct.sourceClusterIdentifier), source_cluster_resource_id: cdktf.stringToTerraform(struct.sourceClusterResourceId), use_latest_restorable_time: cdktf.booleanToTerraform(struct.useLatestRestorableTime), }; } function rdsClusterRestoreToPointInTimeToHclTerraform(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 = { restore_to_time: { value: cdktf.stringToHclTerraform(struct.restoreToTime), isBlock: false, type: "simple", storageClassType: "string", }, restore_type: { value: cdktf.stringToHclTerraform(struct.restoreType), isBlock: false, type: "simple", storageClassType: "string", }, source_cluster_identifier: { value: cdktf.stringToHclTerraform(struct.sourceClusterIdentifier), isBlock: false, type: "simple", storageClassType: "string", }, source_cluster_resource_id: { value: cdktf.stringToHclTerraform(struct.sourceClusterResourceId), isBlock: false, type: "simple", storageClassType: "string", }, use_latest_restorable_time: { value: cdktf.booleanToHclTerraform(struct.useLatestRestorableTime), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class RdsClusterRestoreToPointInTimeOutputReference 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._restoreToTime !== undefined) { hasAnyValues = true; internalValueResult.restoreToTime = this._restoreToTime; } if (this._restoreType !== undefined) { hasAnyValues = true; internalValueResult.restoreType = this._restoreType; } if (this._sourceClusterIdentifier !== undefined) { hasAnyValues = true; internalValueResult.sourceClusterIdentifier = this._sourceClusterIdentifier; } if (this._sourceClusterResourceId !== undefined) { hasAnyValues = true; internalValueResult.sourceClusterResourceId = this._sourceClusterResourceId; } if (this._useLatestRestorableTime !== undefined) { hasAnyValues = true; internalValueResult.useLatestRestorableTime = this._useLatestRestorableTime; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._restoreToTime = undefined; this._restoreType = undefined; this._sourceClusterIdentifier = undefined; this._sourceClusterResourceId = undefined; this._useLatestRestorableTime = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._restoreToTime = value.restoreToTime; this._restoreType = value.restoreType; this._sourceClusterIdentifier = value.sourceClusterIdentifier; this._sourceClusterResourceId = value.sourceClusterResourceId; this._useLatestRestorableTime = value.useLatestRestorableTime; } } get restoreToTime() { return this.getStringAttribute('restore_to_time'); } set restoreToTime(value) { this._restoreToTime = value; } resetRestoreToTime() { this._restoreToTime = undefined; } // Temporarily expose input value. Use with caution. get restoreToTimeInput() { return this._restoreToTime; } get restoreType() { return this.getStringAttribute('restore_type'); } set restoreType(value) { this._restoreType = value; } resetRestoreType() { this._restoreType = undefined; } // Temporarily expose input value. Use with caution. get restoreTypeInput() { return this._restoreType; } get sourceClusterIdentifier() { return this.getStringAttribute('source_cluster_identifier'); } set sourceClusterIdentifier(value) { this._sourceClusterIdentifier = value; } resetSourceClusterIdentifier() { this._sourceClusterIdentifier = undefined; } // Temporarily expose input value. Use with caution. get sourceClusterIdentifierInput() { return this._sourceClusterIdentifier; } get sourceClusterResourceId() { return this.getStringAttribute('source_cluster_resource_id'); } set sourceClusterResourceId(value) { this._sourceClusterResourceId = value; } resetSourceClusterResourceId() { this._sourceClusterResourceId = undefined; } // Temporarily expose input value. Use with caution. get sourceClusterResourceIdInput() { return this._sourceClusterResourceId; } get useLatestRestorableTime() { return this.getBooleanAttribute('use_latest_restorable_time'); } set useLatestRestorableTime(value) { this._useLatestRestorableTime = value; } resetUseLatestRestorableTime() { this._useLatestRestorableTime = undefined; } // Temporarily expose input value. Use with caution. get useLatestRestorableTimeInput() { return this._useLatestRestorableTime; } } exports.RdsClusterRestoreToPointInTimeOutputReference = RdsClusterRestoreToPointInTimeOutputReference; _c = JSII_RTTI_SYMBOL_1; RdsClusterRestoreToPointInTimeOutputReference[_c] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterRestoreToPointInTimeOutputReference", version: "21.22.1" }; function rdsClusterS3ImportToTerraform(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 { bucket_name: cdktf.stringToTerraform(struct.bucketName), bucket_prefix: cdktf.stringToTerraform(struct.bucketPrefix), ingestion_role: cdktf.stringToTerraform(struct.ingestionRole), source_engine: cdktf.stringToTerraform(struct.sourceEngine), source_engine_version: cdktf.stringToTerraform(struct.sourceEngineVersion), }; } function rdsClusterS3ImportToHclTerraform(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 = { bucket_name: { value: cdktf.stringToHclTerraform(struct.bucketName), isBlock: false, type: "simple", storageClassType: "string", }, bucket_prefix: { value: cdktf.stringToHclTerraform(struct.bucketPrefix), isBlock: false, type: "simple", storageClassType: "string", }, ingestion_role: { value: cdktf.stringToHclTerraform(struct.ingestionRole), isBlock: false, type: "simple", storageClassType: "string", }, source_engine: { value: cdktf.stringToHclTerraform(struct.sourceEngine), isBlock: false, type: "simple", storageClassType: "string", }, source_engine_version: { value: cdktf.stringToHclTerraform(struct.sourceEngineVersion), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class RdsClusterS3ImportOutputReference 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._bucketName !== undefined) { hasAnyValues = true; internalValueResult.bucketName = this._bucketName; } if (this._bucketPrefix !== undefined) { hasAnyValues = true; internalValueResult.bucketPrefix = this._bucketPrefix; } if (this._ingestionRole !== undefined) { hasAnyValues = true; internalValueResult.ingestionRole = this._ingestionRole; } if (this._sourceEngine !== undefined) { hasAnyValues = true; internalValueResult.sourceEngine = this._sourceEngine; } if (this._sourceEngineVersion !== undefined) { hasAnyValues = true; internalValueResult.sourceEngineVersion = this._sourceEngineVersion; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucketName = undefined; this._bucketPrefix = undefined; this._ingestionRole = undefined; this._sourceEngine = undefined; this._sourceEngineVersion = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucketName = value.bucketName; this._bucketPrefix = value.bucketPrefix; this._ingestionRole = value.ingestionRole; this._sourceEngine = value.sourceEngine; this._sourceEngineVersion = value.sourceEngineVersion; } } get bucketName() { return this.getStringAttribute('bucket_name'); } set bucketName(value) { this._bucketName = value; } // Temporarily expose input value. Use with caution. get bucketNameInput() { return this._bucketName; } get bucketPrefix() { return this.getStringAttribute('bucket_prefix'); } set bucketPrefix(value) { this._bucketPrefix = value; } resetBucketPrefix() { this._bucketPrefix = undefined; } // Temporarily expose input value. Use with caution. get bucketPrefixInput() { return this._bucketPrefix; } get ingestionRole() { return this.getStringAttribute('ingestion_role'); } set ingestionRole(value) { this._ingestionRole = value; } // Temporarily expose input value. Use with caution. get ingestionRoleInput() { return this._ingestionRole; } get sourceEngine() { return this.getStringAttribute('source_engine'); } set sourceEngine(value) { this._sourceEngine = value; } // Temporarily expose input value. Use with caution. get sourceEngineInput() { return this._sourceEngine; } get sourceEngineVersion() { return this.getStringAttribute('source_engine_version'); } set sourceEngineVersion(value) { this._sourceEngineVersion = value; } // Temporarily expose input value. Use with caution. get sourceEngineVersionInput() { return this._sourceEngineVersion; } } exports.RdsClusterS3ImportOutputReference = RdsClusterS3ImportOutputReference; _d = JSII_RTTI_SYMBOL_1; RdsClusterS3ImportOutputReference[_d] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterS3ImportOutputReference", version: "21.22.1" }; function rdsClusterScalingConfigurationToTerraform(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 { auto_pause: cdktf.booleanToTerraform(struct.autoPause), max_capacity: cdktf.numberToTerraform(struct.maxCapacity), min_capacity: cdktf.numberToTerraform(struct.minCapacity), seconds_before_timeout: cdktf.numberToTerraform(struct.secondsBeforeTimeout), seconds_until_auto_pause: cdktf.numberToTerraform(struct.secondsUntilAutoPause), timeout_action: cdktf.stringToTerraform(struct.timeoutAction), }; } function rdsClusterScalingConfigurationToHclTerraform(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 = { auto_pause: { value: cdktf.booleanToHclTerraform(struct.autoPause), isBlock: false, type: "simple", storageClassType: "boolean", }, max_capacity: { value: cdktf.numberToHclTerraform(struct.maxCapacity), isBlock: false, type: "simple", storageClassType: "number", }, min_capacity: { value: cdktf.numberToHclTerraform(struct.minCapacity), isBlock: false, type: "simple", storageClassType: "number", }, seconds_before_timeout: { value: cdktf.numberToHclTerraform(struct.secondsBeforeTimeout), isBlock: false, type: "simple", storageClassType: "number", }, seconds_until_auto_pause: { value: cdktf.numberToHclTerraform(struct.secondsUntilAutoPause), isBlock: false, type: "simple", storageClassType: "number", }, timeout_action: { value: cdktf.stringToHclTerraform(struct.timeoutAction), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class RdsClusterScalingConfigurationOutputReference 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._autoPause !== undefined) { hasAnyValues = true; internalValueResult.autoPause = this._autoPause; } if (this._maxCapacity !== undefined) { hasAnyValues = true; internalValueResult.maxCapacity = this._maxCapacity; } if (this._minCapacity !== undefined) { hasAnyValues = true; internalValueResult.minCapacity = this._minCapacity; } if (this._secondsBeforeTimeout !== undefined) { hasAnyValues = true; internalValueResult.secondsBeforeTimeout = this._secondsBeforeTimeout; } if (this._secondsUntilAutoPause !== undefined) { hasAnyValues = true; internalValueResult.secondsUntilAutoPause = this._secondsUntilAutoPause; } if (this._timeoutAction !== undefined) { hasAnyValues = true; internalValueResult.timeoutAction = this._timeoutAction; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._autoPause = undefined; this._maxCapacity = undefined; this._minCapacity = undefined; this._secondsBeforeTimeout = undefined; this._secondsUntilAutoPause = undefined; this._timeoutAction = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._autoPause = value.autoPause; this._maxCapacity = value.maxCapacity; this._minCapacity = value.minCapacity; this._secondsBeforeTimeout = value.secondsBeforeTimeout; this._secondsUntilAutoPause = value.secondsUntilAutoPause; this._timeoutAction = value.timeoutAction; } } get autoPause() { return this.getBooleanAttribute('auto_pause'); } set autoPause(value) { this._autoPause = value; } resetAutoPause() { this._autoPause = undefined; } // Temporarily expose input value. Use with caution. get autoPauseInput() { return this._autoPause; } get maxCapacity() { return this.getNumberAttribute('max_capacity'); } set maxCapacity(value) { this._maxCapacity = value; } resetMaxCapacity() { this._maxCapacity = undefined; } // Temporarily expose input value. Use with caution. get maxCapacityInput() { return this._maxCapacity; } get minCapacity() { return this.getNumberAttribute('min_capacity'); } set minCapacity(value) { this._minCapacity = value; } resetMinCapacity() { this._minCapacity = undefined; } // Temporarily expose input value. Use with caution. get minCapacityInput() { return this._minCapacity; } get secondsBeforeTimeout() { return this.getNumberAttribute('seconds_before_timeout'); } set secondsBeforeTimeout(value) { this._secondsBeforeTimeout = value; } resetSecondsBeforeTimeout() { this._secondsBeforeTimeout = undefined; } // Temporarily expose input value. Use with caution. get secondsBeforeTimeoutInput() { return this._secondsBeforeTimeout; } get secondsUntilAutoPause() { return this.getNumberAttribute('seconds_until_auto_pause'); } set secondsUntilAutoPause(value) { this._secondsUntilAutoPause = value; } resetSecondsUntilAutoPause() { this._secondsUntilAutoPause = undefined; } // Temporarily expose input value. Use with caution. get secondsUntilAutoPauseInput() { return this._secondsUntilAutoPause; } get timeoutAction() { return this.getStringAttribute('timeout_action'); } set timeoutAction(value) { this._timeoutAction = value; } resetTimeoutAction() { this._timeoutAction = undefined; } // Temporarily expose input value. Use with caution. get timeoutActionInput() { return this._timeoutAction; } } exports.RdsClusterScalingConfigurationOutputReference = RdsClusterScalingConfigurationOutputReference; _e = JSII_RTTI_SYMBOL_1; RdsClusterScalingConfigurationOutputReference[_e] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterScalingConfigurationOutputReference", version: "21.22.1" }; function rdsClusterServerlessv2ScalingConfigurationToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { max_capacity: cdktf.numberToTerraform(struct.maxCapacity), min_capacity: cdktf.numberToTerraform(struct.minCapacity), seconds_until_auto_pause: cdktf.numberToTerraform(struct.secondsUntilAutoPause), }; } function rdsClusterServerlessv2ScalingConfigurationToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { max_capacity: { value: cdktf.numberToHclTerraform(struct.maxCapacity), isBlock: false, type: "simple", storageClassType: "number", }, min_capacity: { value: cdktf.numberToHclTerraform(struct.minCapacity), isBlock: false, type: "simple", storageClassType: "number", }, seconds_until_auto_pause: { value: cdktf.numberToHclTerraform(struct.secondsUntilAutoPause), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class RdsClusterServerlessv2ScalingConfigurationOutputReference 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._maxCapacity !== undefined) { hasAnyValues = true; internalValueResult.maxCapacity = this._maxCapacity; } if (this._minCapacity !== undefined) { hasAnyValues = true; internalValueResult.minCapacity = this._minCapacity; } if (this._secondsUntilAutoPause !== undefined) { hasAnyValues = true; internalValueResult.secondsUntilAutoPause = this._secondsUntilAutoPause; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._maxCapacity = undefined; this._minCapacity = undefined; this._secondsUntilAutoPause = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._maxCapacity = value.maxCapacity; this._minCapacity = value.minCapacity; this._secondsUntilAutoPause = value.secondsUntilAutoPause; } } get maxCapacity() { return this.getNumberAttribute('max_capacity'); } set maxCapacity(value) { this._maxCapacity = value; } // Temporarily expose input value. Use with caution. get maxCapacityInput() { return this._maxCapacity; } get minCapacity() { return this.getNumberAttribute('min_capacity'); } set minCapacity(value) { this._minCapacity = value; } // Temporarily expose input value. Use with caution. get minCapacityInput() { return this._minCapacity; } get secondsUntilAutoPause() { return this.getNumberAttribute('seconds_until_auto_pause'); } set secondsUntilAutoPause(value) { this._secondsUntilAutoPause = value; } resetSecondsUntilAutoPause() { this._secondsUntilAutoPause = undefined; } // Temporarily expose input value. Use with caution. get secondsUntilAutoPauseInput() { return this._secondsUntilAutoPause; } } exports.RdsClusterServerlessv2ScalingConfigurationOutputReference = RdsClusterServerlessv2ScalingConfigurationOutputReference; _f = JSII_RTTI_SYMBOL_1; RdsClusterServerlessv2ScalingConfigurationOutputReference[_f] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterServerlessv2ScalingConfigurationOutputReference", version: "21.22.1" }; function rdsClusterTimeoutsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } function rdsClusterTimeoutsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class RdsClusterTimeoutsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } get delete() { return this.getStringAttribute('delete'); } set delete(value) { this._delete = value; } resetDelete() { this._delete = undefined; } // Temporarily expose input value. Use with caution. get deleteInput() { return this._delete; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.RdsClusterTimeoutsOutputReference = RdsClusterTimeoutsOutputReference; _g = JSII_RTTI_SYMBOL_1; RdsClusterTimeoutsOutputReference[_g] = { fqn: "@cdktf/provider-aws.rdsCluster.RdsClusterTimeoutsOutputReference", version: "21.22.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/rds_cluster aws_rds_cluster} */ class RdsCluster extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a RdsCluster 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 RdsCluster to import * @param importFromId The id of the existing RdsCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/rds_cluster#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the RdsCluster to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_rds_cluster", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/rds_cluster aws_rds_cluster} 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 RdsClusterConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'aws_rds_cluster', 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 }); // master_user_secret - computed: true, optional: false, required: false this._masterUserSecret = new RdsClusterMasterUserSecretList(this, "master_user_secret", false); // restore_to_point_in_time - computed: false, optional: true, required: false this._restoreToPointInTime = new RdsClusterRestoreToPointInTimeOutputReference(this, "restore_to_point_in_time"); // s3_import - computed: false, optional: true, required: false this._s3Import = new RdsClusterS3ImportOutputReference(this, "s3_import"); // scaling_configuration - computed: false, optional: true, required: false this._scalingConfiguration = new RdsClusterScalingConfigurationOutputReference(this, "scaling_configuration"); // serverlessv2_scaling_configuration - computed: false, optional: true, required: false this._serverlessv2ScalingConfiguration = new RdsClusterServerlessv2ScalingConfigurationOutputReference(this, "serverlessv2_scaling_configuration"); // timeouts - computed: false, optional: true, required: false this._timeouts = new RdsClusterTimeoutsOutputReference(this, "timeouts"); this._allocatedStorage = config.allocatedStorage; this._allowMajorVersionUpgrade = config.allowMajorVersionUpgrade; this._applyImmediately = config.applyImmediately; this._availabilityZones = config.availabilityZones; this._backtrackWindow = config.backtrackWindow; this._backupRetentionPeriod = config.backupRetentionPeriod; this._caCertificateIdentifier = config.caCertificateIdentifier; this._clusterIdentifier = config.clusterIdentifier; this._clusterIdentifierPrefix = config.clusterIdentifierPrefix; this._clusterMembers = config.clusterMembers; this._clusterScalabilityType = config.clusterScalabilityType; this._copyTagsToSnapshot = config.copyTagsToSnapshot; this._databaseInsightsMode = config.databaseInsightsMode; this._databaseName = config.databaseName; this._dbClusterInstanceClass = config.dbClusterInstanceClass; this._dbClusterParameterGroupName = config.dbClusterParameterGroupName; this._dbInstanceParameterGroupName = config.dbInstanceParameterGroupName; this._dbSubnetGroupName = config.dbSubnetGroupName; this._dbSystemId = config.dbSystemId; this._deleteAutomatedBackups = config.deleteAutomatedBackups; this._deletionProtection = config.deletionProtection; this._domain = config.domain; this._domainIamRoleName = config.domainIamRoleName; this._enableGlobalWriteForwarding = config.enableGlobalWriteForwarding; this._enableHttpEndpoint = config.enableHttpEndpoint; this._enableLocalWriteForwarding = config.enableLocalWriteForwarding; this._enabledCloudwatchLogsExports = config.enabledCloudwatchLogsExports; this._engine = config.engine; this._engineLifecycleSupport = config.engineLifecycleSupport; this._engineMode = config.engineMode; this._engineVersion = config.engineVersion; this._finalSnapshotIdentifier = config.finalSnapshotIdentifier; this._globalClusterIdentifier = config.globalClusterIdentifier; this._iamDatabaseAuthenticationEnabled = config.iamDatabaseAuthenticationEnabled; this._iamRoles = config.iamRoles; this._id = config.id; this._iops = config.iops; this._kmsKeyId = config.kmsKeyId; this._manageMasterUserPassword = config.manageMasterUserPassword; this._masterPassword = config.masterPassword; this._masterPasswordWo = config.masterPasswordWo; this._masterPasswordWoVersion = config.masterPasswordWoVersion; this._masterUserSecretKmsKeyId = config.masterUserSecretKmsKeyId; this._masterUsername = config.masterUsername; this._monitoringInterval = config.monitoringInterval; this._monitoringRoleArn = config.monitoringRoleArn; this._networkType = config.networkType; this._performanceInsightsEnabled = config.performanceInsightsEnabled; this._performanceInsightsKmsKeyId = config.performanceInsightsKmsKeyId; this._performanceInsightsRetentionPeriod = config.performanceInsightsRetentionPeriod; this._port = config.port; this._preferredBackupWindow = config.preferredBackupWindow; this._preferredMaintenanceWindow = config.preferredMaintenanceWindow; this._region = config.region; this._replicationSourceIdentifier = config.replicationSourceIdentifier; this._skipFinalSnapshot = config.skipFinalSnapshot; this._snapshotIdentifier = config.snapshotIdentifier; this._sourceRegion = config.sourceRegion; this._storageEncrypted = config.storageEncrypted; this._storageType = config.storageType; this._tags = config.tags; this._tagsAll = config.tagsAll; this._vpcSecurityGroupIds = config.vpcSecurityGroupIds; this._restoreToPointInTime.internalValue = config.restoreToPointInTime; this._s3Import.internalValue = config.s3Import; this._scalingConfiguration.internalValue = config.scalingConfiguration; this._serverlessv2ScalingConfiguration.internalValue = config.serverlessv2ScalingConfiguration; this._timeouts.internalValue = config.timeouts; } get allocatedStorage() { return this.getNumberAttribute('allocated_storage'); } set allocatedStorage(value) { this._allocatedStorage = value; } resetAllocatedStorage() { this._allocatedStorage = undefined; } // Temporarily expose input value. Use with caution. get allocatedStorageInput() { return this._allocatedStorage; } get allowMajorVersionUpgrade() { return this.getBooleanAttribute('allow_major_version_upgrade'); } set allowMajorVersionUpgrade(value) { this._allowMajorVersionUpgrade = value; } resetAllowMajorVersionUpgrade() { this._allowMajorVersionUpgrade = undefined; } // Temporarily expose input value. Use with caution. get allowMajorVersionUpgradeInput() { return this._allowMajorVersionUpgrade; } get applyImmediately() { return this.getBooleanAttribute('apply_immediately'); } set applyImmediately(value) { this._applyImmediately = value; } resetApplyImmediately() { this._applyImmediately = undefined; } // Temporarily expose input value. Use with caution. get applyImmediatelyInput() { return this._applyImmediately; } // arn - computed: true, optional: false, required: false get arn() { return this.getStringAttribute('arn'); } get availabilityZones() { return cdktf.Fn.tolist(this.getListAttribute('availability_zones')); } set availabilityZones(value) { this._availabilityZones = value; } resetAvailabilityZones() { this._availabilityZones = undefined; } // Temporarily expose input value. Use with caution. get availabilityZonesInput() { return this._availabilityZones; } get backtrackWindow() { return this.getNumberAttribute('backtrack_window'); } set backtrackWindow(value) { this._backtrackWindow = value; } resetBacktrackWindow() { this._backtrackWindow = undefined; } // Temporarily expose input value. Use with caution. get backtrackWindowInput() { return this._backtrackWindow; } get backupRetentionPeriod() { return this.getNumberAttribute('backup_retention_period'); } set backupRetentionPeriod(value) { this._backupRetentionPeriod = value; } resetBackupRetentionPeriod() { this._backupRetentionPeriod = undefined; } // Temporarily expose input value. Use with caution. get backupRetentionPeriodInput() { return this._backupRetentionPeriod; } get caCertificateIdentifier() { return this.getStringAttribute('ca_certificate_identifier'); } set caCertificateIdentifier(value) { this._caCertificateIdentifier = value; } resetCaCertificateIdentifier() { this._caCertificateIdentifier = undefined; } // Temporarily expose input value. Use with caution. get caCertificateIdentifierInput() { return this._caCertificateIdentifier; } // ca_certificate_valid_till - computed: true, optional: false, required: false get caCertificateValidTill() { return this.getStringAttribute('ca_certificate_valid_till'); } get clusterIdentifier() { return this.getStringAttribute('cluster_identifier'); } set clusterIdentifier(value) { this._clusterIdentifier = value; } resetClusterIdentifier() { this._clusterIdentifier = undefined; } // Temporarily expose input value. Use with caution. get clusterIdentifierInput() { return this._clusterIdentifier; } get clusterIdentifierPrefix() { return this.getStringAttribute('cluster_identifier_prefix'); } set clusterIdentifierPrefix(value) { this._clusterIdentifierPrefix = value; } resetClusterIdentifierPrefix() { this._clusterIdentifierPrefix = undefined; } // Temporarily expose input value. Use with caution. get clusterIdentifierPrefixInput() { return this._clusterIdentifierPrefix; } get clusterMembers() { return cdktf.Fn.tolist(this.getListAttribute('cluster_members')); } set clusterMembers(value) { this._clusterMembers = value; } resetClusterMembers() { this._clusterMembers = undefined; } // Temporarily expose input value. Use with caution. get clusterMembersInput() { return this._clusterMembers; } // cluster_resource_id - computed: true, optional: false, required: false get clusterResourceId() { return this.getStringAttribute('cluster_resource_id'); } get clusterScalabilityType() { return this.getStringAttribute('cluster_scalability_type'); } set clusterScalabilityType(value) { this._clusterScalabilityType = value; } resetClusterScalabilityType() { this._clusterScalabilityType = undefined; } // Temporarily expose input value. Use with caution. get clusterScalabilityTypeInput() { return this._clusterScalabilityType; } get copyTagsToSnapshot() { return this.getBooleanAttribute('copy_tags_to_snapshot'); } set copyTagsToSnapshot(value) { this._copyTagsToSnapshot = value; } resetCopyTagsToSnapshot() { this._copyTagsToSnapshot = undefined; } // Temporarily expose input value. Use with caution. get copyTagsToSnapshotInput() { return this._copyTagsToSnapshot; } get databaseInsightsMode() { return this.getStringAttribute('database_insights_mode'); } set databaseInsightsMode(value) { this._databaseInsightsMode = value; } resetDatabaseInsightsMode() { this._databaseInsightsMode = undefined; } // Temporarily expose input value. Use with caution. get databaseInsightsModeInput() { return this._databaseInsightsMode; } get databaseName() { return this.getStringAttribute('database_name'); } set databaseName(value) { this._databaseName = value; } resetDatabaseName() { this._databaseName = undefined; } // Temporarily expose input value. Use with caution. get databaseNameInput() { return this._databaseName; } get dbClusterInstanceClass() { return this.getStringAttribute('db_cluster_instance_class'); } set dbClusterInstanceClass(value) { this._dbClusterInstanceClass = value; } resetDbClusterInstanceClass() { this._dbClusterInstanceClass = undefined; } // Temporarily expose input value. Use with caution. get dbClusterInstanceClassInput() { return this._dbClusterInstanceClass; } get dbClusterParameterGroupName() { return this.getStringAttribute('db_cluster_parameter_group_name'); } set dbClusterParameterGroupName(value) { this._d