@cdktf/provider-aws
Version:
Prebuilt aws Provider for Terraform CDK (cdktf)
1,277 lines • 190 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DocdbCluster = exports.DocdbClusterTimeoutsOutputReference = exports.DocdbClusterServerlessV2ScalingConfigurationOutputReference = exports.DocdbClusterRestoreToPointInTimeOutputReference = exports.DocdbClusterMasterUserSecretList = exports.DocdbClusterMasterUserSecretOutputReference = void 0;
exports.docdbClusterMasterUserSecretToTerraform = docdbClusterMasterUserSecretToTerraform;
exports.docdbClusterMasterUserSecretToHclTerraform = docdbClusterMasterUserSecretToHclTerraform;
exports.docdbClusterRestoreToPointInTimeToTerraform = docdbClusterRestoreToPointInTimeToTerraform;
exports.docdbClusterRestoreToPointInTimeToHclTerraform = docdbClusterRestoreToPointInTimeToHclTerraform;
exports.docdbClusterServerlessV2ScalingConfigurationToTerraform = docdbClusterServerlessV2ScalingConfigurationToTerraform;
exports.docdbClusterServerlessV2ScalingConfigurationToHclTerraform = docdbClusterServerlessV2ScalingConfigurationToHclTerraform;
exports.docdbClusterTimeoutsToTerraform = docdbClusterTimeoutsToTerraform;
exports.docdbClusterTimeoutsToHclTerraform = docdbClusterTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function docdbClusterMasterUserSecretToTerraform(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 docdbClusterMasterUserSecretToHclTerraform(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 DocdbClusterMasterUserSecretOutputReference 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.DocdbClusterMasterUserSecretOutputReference = DocdbClusterMasterUserSecretOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DocdbClusterMasterUserSecretOutputReference[_a] = { fqn: "@cdktf/provider-aws.docdbCluster.DocdbClusterMasterUserSecretOutputReference", version: "21.22.1" };
class DocdbClusterMasterUserSecretList 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 DocdbClusterMasterUserSecretOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DocdbClusterMasterUserSecretList = DocdbClusterMasterUserSecretList;
_b = JSII_RTTI_SYMBOL_1;
DocdbClusterMasterUserSecretList[_b] = { fqn: "@cdktf/provider-aws.docdbCluster.DocdbClusterMasterUserSecretList", version: "21.22.1" };
function docdbClusterRestoreToPointInTimeToTerraform(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),
use_latest_restorable_time: cdktf.booleanToTerraform(struct.useLatestRestorableTime),
};
}
function docdbClusterRestoreToPointInTimeToHclTerraform(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",
},
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 DocdbClusterRestoreToPointInTimeOutputReference 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._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._useLatestRestorableTime = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._restoreToTime = value.restoreToTime;
this._restoreType = value.restoreType;
this._sourceClusterIdentifier = value.sourceClusterIdentifier;
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;
}
// Temporarily expose input value. Use with caution.
get sourceClusterIdentifierInput() {
return this._sourceClusterIdentifier;
}
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.DocdbClusterRestoreToPointInTimeOutputReference = DocdbClusterRestoreToPointInTimeOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DocdbClusterRestoreToPointInTimeOutputReference[_c] = { fqn: "@cdktf/provider-aws.docdbCluster.DocdbClusterRestoreToPointInTimeOutputReference", version: "21.22.1" };
function docdbClusterServerlessV2ScalingConfigurationToTerraform(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),
};
}
function docdbClusterServerlessV2ScalingConfigurationToHclTerraform(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",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DocdbClusterServerlessV2ScalingConfigurationOutputReference 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;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._maxCapacity = undefined;
this._minCapacity = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._maxCapacity = value.maxCapacity;
this._minCapacity = value.minCapacity;
}
}
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;
}
}
exports.DocdbClusterServerlessV2ScalingConfigurationOutputReference = DocdbClusterServerlessV2ScalingConfigurationOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DocdbClusterServerlessV2ScalingConfigurationOutputReference[_d] = { fqn: "@cdktf/provider-aws.docdbCluster.DocdbClusterServerlessV2ScalingConfigurationOutputReference", version: "21.22.1" };
function docdbClusterTimeoutsToTerraform(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 docdbClusterTimeoutsToHclTerraform(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 DocdbClusterTimeoutsOutputReference 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.DocdbClusterTimeoutsOutputReference = DocdbClusterTimeoutsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DocdbClusterTimeoutsOutputReference[_e] = { fqn: "@cdktf/provider-aws.docdbCluster.DocdbClusterTimeoutsOutputReference", version: "21.22.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/docdb_cluster aws_docdb_cluster}
*/
class DocdbCluster extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DocdbCluster 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 DocdbCluster to import
* @param importFromId The id of the existing DocdbCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/docdb_cluster#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DocdbCluster to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "aws_docdb_cluster", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/aws/6.25.0/docs/resources/docdb_cluster aws_docdb_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 DocdbClusterConfig = {}
*/
constructor(scope, id, config = {}) {
super(scope, id, {
terraformResourceType: 'aws_docdb_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 DocdbClusterMasterUserSecretList(this, "master_user_secret", false);
// restore_to_point_in_time - computed: false, optional: true, required: false
this._restoreToPointInTime = new DocdbClusterRestoreToPointInTimeOutputReference(this, "restore_to_point_in_time");
// serverless_v2_scaling_configuration - computed: false, optional: true, required: false
this._serverlessV2ScalingConfiguration = new DocdbClusterServerlessV2ScalingConfigurationOutputReference(this, "serverless_v2_scaling_configuration");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new DocdbClusterTimeoutsOutputReference(this, "timeouts");
this._allowMajorVersionUpgrade = config.allowMajorVersionUpgrade;
this._applyImmediately = config.applyImmediately;
this._availabilityZones = config.availabilityZones;
this._backupRetentionPeriod = config.backupRetentionPeriod;
this._clusterIdentifier = config.clusterIdentifier;
this._clusterIdentifierPrefix = config.clusterIdentifierPrefix;
this._clusterMembers = config.clusterMembers;
this._dbClusterParameterGroupName = config.dbClusterParameterGroupName;
this._dbSubnetGroupName = config.dbSubnetGroupName;
this._deletionProtection = config.deletionProtection;
this._enabledCloudwatchLogsExports = config.enabledCloudwatchLogsExports;
this._engine = config.engine;
this._engineVersion = config.engineVersion;
this._finalSnapshotIdentifier = config.finalSnapshotIdentifier;
this._globalClusterIdentifier = config.globalClusterIdentifier;
this._id = config.id;
this._kmsKeyId = config.kmsKeyId;
this._manageMasterUserPassword = config.manageMasterUserPassword;
this._masterPassword = config.masterPassword;
this._masterPasswordWo = config.masterPasswordWo;
this._masterPasswordWoVersion = config.masterPasswordWoVersion;
this._masterUsername = config.masterUsername;
this._networkType = config.networkType;
this._port = config.port;
this._preferredBackupWindow = config.preferredBackupWindow;
this._preferredMaintenanceWindow = config.preferredMaintenanceWindow;
this._region = config.region;
this._skipFinalSnapshot = config.skipFinalSnapshot;
this._snapshotIdentifier = config.snapshotIdentifier;
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._serverlessV2ScalingConfiguration.internalValue = config.serverlessV2ScalingConfiguration;
this._timeouts.internalValue = config.timeouts;
}
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 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 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 dbClusterParameterGroupName() {
return this.getStringAttribute('db_cluster_parameter_group_name');
}
set dbClusterParameterGroupName(value) {
this._dbClusterParameterGroupName = value;
}
resetDbClusterParameterGroupName() {
this._dbClusterParameterGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get dbClusterParameterGroupNameInput() {
return this._dbClusterParameterGroupName;
}
get dbSubnetGroupName() {
return this.getStringAttribute('db_subnet_group_name');
}
set dbSubnetGroupName(value) {
this._dbSubnetGroupName = value;
}
resetDbSubnetGroupName() {
this._dbSubnetGroupName = undefined;
}
// Temporarily expose input value. Use with caution.
get dbSubnetGroupNameInput() {
return this._dbSubnetGroupName;
}
get deletionProtection() {
return this.getBooleanAttribute('deletion_protection');
}
set deletionProtection(value) {
this._deletionProtection = value;
}
resetDeletionProtection() {
this._deletionProtection = undefined;
}
// Temporarily expose input value. Use with caution.
get deletionProtectionInput() {
return this._deletionProtection;
}
get enabledCloudwatchLogsExports() {
return this.getListAttribute('enabled_cloudwatch_logs_exports');
}
set enabledCloudwatchLogsExports(value) {
this._enabledCloudwatchLogsExports = value;
}
resetEnabledCloudwatchLogsExports() {
this._enabledCloudwatchLogsExports = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledCloudwatchLogsExportsInput() {
return this._enabledCloudwatchLogsExports;
}
// endpoint - computed: true, optional: false, required: false
get endpoint() {
return this.getStringAttribute('endpoint');
}
get engine() {
return this.getStringAttribute('engine');
}
set engine(value) {
this._engine = value;
}
resetEngine() {
this._engine = undefined;
}
// Temporarily expose input value. Use with caution.
get engineInput() {
return this._engine;
}
get engineVersion() {
return this.getStringAttribute('engine_version');
}
set engineVersion(value) {
this._engineVersion = value;
}
resetEngineVersion() {
this._engineVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get engineVersionInput() {
return this._engineVersion;
}
get finalSnapshotIdentifier() {
return this.getStringAttribute('final_snapshot_identifier');
}
set finalSnapshotIdentifier(value) {
this._finalSnapshotIdentifier = value;
}
resetFinalSnapshotIdentifier() {
this._finalSnapshotIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get finalSnapshotIdentifierInput() {
return this._finalSnapshotIdentifier;
}
get globalClusterIdentifier() {
return this.getStringAttribute('global_cluster_identifier');
}
set globalClusterIdentifier(value) {
this._globalClusterIdentifier = value;
}
resetGlobalClusterIdentifier() {
this._globalClusterIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get globalClusterIdentifierInput() {
return this._globalClusterIdentifier;
}
// hosted_zone_id - computed: true, optional: false, required: false
get hostedZoneId() {
return this.getStringAttribute('hosted_zone_id');
}
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 kmsKeyId() {
return this.getStringAttribute('kms_key_id');
}
set kmsKeyId(value) {
this._kmsKeyId = value;
}
resetKmsKeyId() {
this._kmsKeyId = undefined;
}
// Temporarily expose input value. Use with caution.
get kmsKeyIdInput() {
return this._kmsKeyId;
}
get manageMasterUserPassword() {
return this.getBooleanAttribute('manage_master_user_password');
}
set manageMasterUserPassword(value) {
this._manageMasterUserPassword = value;
}
resetManageMasterUserPassword() {
this._manageMasterUserPassword = undefined;
}
// Temporarily expose input value. Use with caution.
get manageMasterUserPasswordInput() {
return this._manageMasterUserPassword;
}
get masterPassword() {
return this.getStringAttribute('master_password');
}
set masterPassword(value) {
this._masterPassword = value;
}
resetMasterPassword() {
this._masterPassword = undefined;
}
// Temporarily expose input value. Use with caution.
get masterPasswordInput() {
return this._masterPassword;
}
get masterPasswordWo() {
return this.getStringAttribute('master_password_wo');
}
set masterPasswordWo(value) {
this._masterPasswordWo = value;
}
resetMasterPasswordWo() {
this._masterPasswordWo = undefined;
}
// Temporarily expose input value. Use with caution.
get masterPasswordWoInput() {
return this._masterPasswordWo;
}
get masterPasswordWoVersion() {
return this.getNumberAttribute('master_password_wo_version');
}
set masterPasswordWoVersion(value) {
this._masterPasswordWoVersion = value;
}
resetMasterPasswordWoVersion() {
this._masterPasswordWoVersion = undefined;
}
// Temporarily expose input value. Use with caution.
get masterPasswordWoVersionInput() {
return this._masterPasswordWoVersion;
}
get masterUserSecret() {
return this._masterUserSecret;
}
get masterUsername() {
return this.getStringAttribute('master_username');
}
set masterUsername(value) {
this._masterUsername = value;
}
resetMasterUsername() {
this._masterUsername = undefined;
}
// Temporarily expose input value. Use with caution.
get masterUsernameInput() {
return this._masterUsername;
}
get networkType() {
return this.getStringAttribute('network_type');
}
set networkType(value) {
this._networkType = value;
}
resetNetworkType() {
this._networkType = undefined;
}
// Temporarily expose input value. Use with caution.
get networkTypeInput() {
return this._networkType;
}
get port() {
return this.getNumberAttribute('port');
}
set port(value) {
this._port = value;
}
resetPort() {
this._port = undefined;
}
// Temporarily expose input value. Use with caution.
get portInput() {
return this._port;
}
get preferredBackupWindow() {
return this.getStringAttribute('preferred_backup_window');
}
set preferredBackupWindow(value) {
this._preferredBackupWindow = value;
}
resetPreferredBackupWindow() {
this._preferredBackupWindow = undefined;
}
// Temporarily expose input value. Use with caution.
get preferredBackupWindowInput() {
return this._preferredBackupWindow;
}
get preferredMaintenanceWindow() {
return this.getStringAttribute('preferred_maintenance_window');
}
set preferredMaintenanceWindow(value) {
this._preferredMaintenanceWindow = value;
}
resetPreferredMaintenanceWindow() {
this._preferredMaintenanceWindow = undefined;
}
// Temporarily expose input value. Use with caution.
get preferredMaintenanceWindowInput() {
return this._preferredMaintenanceWindow;
}
// reader_endpoint - computed: true, optional: false, required: false
get readerEndpoint() {
return this.getStringAttribute('reader_endpoint');
}
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 skipFinalSnapshot() {
return this.getBooleanAttribute('skip_final_snapshot');
}
set skipFinalSnapshot(value) {
this._skipFinalSnapshot = value;
}
resetSkipFinalSnapshot() {
this._skipFinalSnapshot = undefined;
}
// Temporarily expose input value. Use with caution.
get skipFinalSnapshotInput() {
return this._skipFinalSnapshot;
}
get snapshotIdentifier() {
return this.getStringAttribute('snapshot_identifier');
}
set snapshotIdentifier(value) {
this._snapshotIdentifier = value;
}
resetSnapshotIdentifier() {
this._snapshotIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get snapshotIdentifierInput() {
return this._snapshotIdentifier;
}
get storageEncrypted() {
return this.getBooleanAttribute('storage_encrypted');
}
set storageEncrypted(value) {
this._storageEncrypted = value;
}
resetStorageEncrypted() {
this._storageEncrypted = undefined;
}
// Temporarily expose input value. Use with caution.
get storageEncryptedInput() {
return this._storageEncrypted;
}
get storageType() {
return this.getStringAttribute('storage_type');
}
set storageType(value) {
this._storageType = value;
}
resetStorageType() {
this._storageType = undefined;
}
// Temporarily expose input value. Use with caution.
get storageTypeInput() {
return this._storageType;
}
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 vpcSecurityGroupIds() {
return cdktf.Fn.tolist(this.getListAttribute('vpc_security_group_ids'));
}
set vpcSecurityGroupIds(value) {
this._vpcSecurityGroupIds = value;
}
resetVpcSecurityGroupIds() {
this._vpcSecurityGroupIds = undefined;
}
// Temporarily expose input value. Use with caution.
get vpcSecurityGroupIdsInput() {
return this._vpcSecurityGroupIds;
}
get restoreToPointInTime() {
return this._restoreToPointInTime;
}
putRestoreToPointInTime(value) {
this._restoreToPointInTime.internalValue = value;
}
resetRestoreToPointInTime() {
this._restoreToPointInTime.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get restoreToPointInTimeInput() {
return this._restoreToPointInTime.internalValue;
}
get serverlessV2ScalingConfiguration() {
return this._serverlessV2ScalingConfiguration;
}
putServerlessV2ScalingConfiguration(value) {
this._serverlessV2ScalingConfiguration.internalValue = value;
}
resetServerlessV2ScalingConfiguration() {
this._serverlessV2ScalingConfiguration.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get serverlessV2ScalingConfigurationInput() {
return this._serverlessV2ScalingConfiguration.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
allow_major_version_upgrade: cdktf.booleanToTerraform(this._allowMajorVersionUpgrade),
apply_immediately: cdktf.booleanToTerraform(this._applyImmediately),
availability_zones: cdktf.listMapper(cdktf.stringToTerraform, false)(this._availabilityZones),
backup_retention_period: cdktf.numberToTerraform(this._backupRetentionPeriod),
cluster_identifier: cdktf.stringToTerraform(this._clusterIdentifier),
cluster_identifier_prefix: cdktf.stringToTerraform(this._clusterIdentifierPrefix),
cluster_members: cdktf.listMapper(cdktf.stringToTerraform, false)(this._clusterMembers),
db_cluster_parameter_group_name: cdktf.stringToTerraform(this._dbClusterParameterGroupName),
db_subnet_group_name: cdktf.stringToTerraform(this._dbSubnetGroupName),
deletion_protection: cdktf.booleanToTerraform(this._deletionProtection),
enabled_cloudwatch_logs_exports: cdktf.listMapper(cdktf.stringToTerraform, false)(this._enabledCloudwatchLogsExports),
engine: cdktf.stringToTerraform(this._engine),
engine_version: cdktf.stringToTerraform(this._engineVersion),
final_snapshot_identifier: cdktf.stringToTerraform(this._finalSnapshotIdentifier),
global_cluster_identifier: cdktf.stringToTerraform(this._globalClusterIdentifier),
id: cdktf.stringToTerraform(this._id),
kms_key_id: cdktf.stringToTerraform(this._kmsKeyId),
manage_master_user_password: cdktf.booleanToTerraform(this._manageMasterUserPassword),
master_password: cdktf.stringToTerraform(this._masterPassword),
master_password_wo: cdktf.stringToTerraform(this._masterPasswordWo),
master_password_wo_version: cdktf.numberToTerraform(this._masterPasswordWoVersion),
master_username: cdktf.stringToTerraform(this._masterUsername),
network_type: cdktf.stringToTerraform(this._networkType),
port: cdktf.numberToTerraform(this._port),
preferred_backup_window: cdktf.stringToTerraform(this._preferredBackupWindow),
preferred_maintenance_window: cdktf.stringToTerraform(this._preferredMaintenanceWindow),
region: cdktf.stringToTerraform(this._region),
skip_final_snapshot: cdktf.booleanToTerraform(this._skipFinalSnapshot),
snapshot_identifier: cdktf.stringToTerraform(this._snapshotIdentifier),
storage_encrypted: cdktf.booleanToTerraform(this._storageEncrypted),
storage_type: cdktf.stringToTerraform(this._storageType),
tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
vpc_security_group_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(this._vpcSecurityGroupIds),
restore_to_point_in_time: docdbClusterRestoreToPointInTimeToTerraform(this._restoreToPointInTime.internalValue),
serverless_v2_scaling_configuration: docdbClusterServerlessV2ScalingConfigurationToTerraform(this._serverlessV2ScalingConfiguration.internalValue),
timeouts: docdbClusterTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
allow_major_version_upgrade: {
value: cdktf.booleanToHclTerraform(this._allowMajorVersionUpgrade),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
apply_immediately: {
value: cdktf.booleanToHclTerraform(this._applyImmediately),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
availability_zones: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._availabilityZones),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
backup_retention_period: {
value: cdktf.numberToHclTerraform(this._backupRetentionPeriod),
isBlock: false,
type: "simple",
storageClassType: "number",
},
cluster_identifier: {
value: cdktf.stringToHclTerraform(this._clusterIdentifier),
isBlock: false,
type: "simple",
storageClassType: "string",
},
cluster_identifier_prefix: {
value: cdktf.stringToHclTerraform(this._clusterIdentifierPrefix),
isBlock: false,
type: "simple",
storageClassType: "string",
},
cluster_members: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._clusterMembers),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
db_cluster_parameter_group_name: {
value: cdktf.stringToHclTerraform(this._dbClusterParameterGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
db_subnet_group_name: {
value: cdktf.stringToHclTerraform(this._dbSubnetGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
deletion_protection: {
value: cdktf.booleanToHclTerraform(this._deletionProtection),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enabled_cloudwatch_logs_exports: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._enabledCloudwatchLogsExports),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
engine: {
value: cdktf.stringToHclTerraform(this._engine),
isBlock: false,
type: "simple",
storageClassType: "string",
},
engine_version: {
value: cdktf.stringToHclTerraform(this._engineVersion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
final_snapshot_identifier: {
value: cdktf.stringToHclTerraform(this._finalSnapshotIdentifier),
isBlock: false,
type: "simple",
storageClassType: "string",
},
global_cluster_identifier: {
value: cdktf.stringToHclTerraform(this._globalClusterIdentifier),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
kms_key_id: {
value: cdktf.stringToHclTerraform(this._kmsKeyId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
manage_master_user_password: {
value: cdktf.booleanToHclTerraform(this._manageMasterUserPassword),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
master_password: {
value: cdktf.stringToHclTerraform(this._masterPassword),
isBlock: false,
type: "simple",
storageClassType: "string",
},
master_password_wo: {
value: cdktf.stringToHclTerraform(this._masterPasswordWo),
isBlock: false,
type: "simple",
storageClassType: "string",
},
master_password_wo_version: {
value: cdktf.numberToHclTerraform(this._masterPasswordWoVersion),
isBlock: false,
type: "simple",
storageClassType: "number",
},
master_username: {
value: cdktf.stringToHclTerraform(this._masterUsername),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_type: {
value: cdktf.stringToHclTerraform(this._networkType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port: {
value: cdktf.numberToHclTerraform(this._port),
isBlock: false,
type: "simple",
storageClassType: "number",
},
preferred_backup_window: {
value: cdktf.stringToHclTerraform(this._preferredBackupWindow),
isBlock: false,
type: "simple",
storageClassType: "string",
},
preferred_maintenance_window: {
value: cdktf.stringToHclTerraform(this._preferredMaintenanceWindow),
isBlock: false,
type: "simple",
storageClassType: "string",
},
region: {
value: cdktf.stringToHclTerraform(this._region),
isBlock: false,
type: "simple",
storageClassType: "string",
},
skip_final_snapshot: {
value: cdktf.booleanToHclTerraform(this._skipFinalSnapshot),
isB